@artemdev04/design-system 1.3.0 → 1.5.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,84 +1,94 @@
1
- (function(P,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):(P=typeof globalThis<"u"?globalThis:P||self,m(P.MyDesignSystem={},P.jsxRuntime,P.React,P.ReactDOM))})(this,(function(P,m,y,zo){"use strict";function $o(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=$o(y);function ls(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=ls(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function cs(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=ls(t))&&(s&&(s+=" "),s+=e);return s}const us=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,ds=cs,oe=(t,e)=>n=>{var s;if((e==null?void 0:e.variants)==null)return ds(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=us(u)||us(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,b]=p;return Array.isArray(b)?b.includes({...o,...a}[g]):{...o,...a}[g]===b})?[...c,d,f]:c},[]);return ds(t,r,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
1
+ (function(S,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],h):(S=typeof globalThis<"u"?globalThis:S||self,h(S.MyDesignSystem={},S.jsxRuntime,S.React,S.ReactDOM))})(this,(function(S,h,g,Xo){"use strict";function Yo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ot=Yo(g);function us(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=us(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function ds(){for(var e,t,n=0,s="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=us(e))&&(s&&(s+=" "),s+=t);return s}const fs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hs=ds,Pe=(e,t)=>n=>{var s;if((t==null?void 0:t.variants)==null)return hs(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:o}=t,i=Object.keys(r).map(c=>{const u=n==null?void 0:n[c],d=o==null?void 0:o[c];if(u===null)return null;const f=fs(u)||fs(d);return r[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((c,u)=>{let{class:d,className:f,...m}=u;return Object.entries(m).every(p=>{let[y,b]=p;return Array.isArray(b)?b.includes({...o,...a}[y]):{...o,...a}[y]===b})?[...c,d,f]:c},[]);return hs(e,i,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 _o=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uo=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,s)=>s?s.toUpperCase():n.toLowerCase()),fs=t=>{const e=Uo(t);return e.charAt(0).toUpperCase()+e.slice(1)},hs=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim(),Ro=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
6
+ */const qo=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zo=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase()),ms=e=>{const t=Zo(e);return t.charAt(0).toUpperCase()+t.slice(1)},ps=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim(),Jo=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="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 Wo={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 Qo={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 Go=y.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:o,iconNode:r,...a},l)=>y.createElement("svg",{ref:l,...Wo,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:hs("lucide",i),...!o&&!Ro(a)&&{"aria-hidden":"true"},...a},[...r.map(([c,u])=>y.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
16
+ */const ea=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:r="",children:o,iconNode:i,...a},l)=>g.createElement("svg",{ref:l,...Qo,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:ps("lucide",r),...!o&&!Jo(a)&&{"aria-hidden":"true"},...a},[...i.map(([c,u])=>g.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 tt=(t,e)=>{const n=y.forwardRef(({className:s,...i},o)=>y.createElement(Go,{ref:o,iconNode:e,className:hs(`lucide-${_o(fs(t))}`,`lucide-${t}`,s),...i}));return n.displayName=fs(t),n};/**
21
+ */const q=(e,t)=>{const n=g.forwardRef(({className:s,...r},o)=>g.createElement(ea,{ref:o,iconNode:t,className:ps(`lucide-${qo(ms(e))}`,`lucide-${e}`,s),...r}));return n.displayName=ms(e),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 ms=tt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
26
+ */const Ot=q("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 Ko=tt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
31
+ */const gs=q("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
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 Ho=tt("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"}]]);/**
36
+ */const ta=q("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
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 Xo=tt("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
41
+ */const na=q("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"}]]);/**
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 Yo=tt("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
46
+ */const sa=q("circle-dot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
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 qo=tt("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
51
+ */const ra=q("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
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 Zo=tt("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
56
+ */const ia=q("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
57
57
  * @license lucide-react v0.562.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const Jo=tt("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"}]]);/**
61
+ */const oa=q("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
62
62
  * @license lucide-react v0.562.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const Qo=tt("slash",[["path",{d:"M22 2 2 22",key:"y4kqgn"}]]);/**
66
+ */const aa=q("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
67
67
  * @license lucide-react v0.562.0 - ISC
68
68
  *
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const ta=tt("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"}]]);/**
71
+ */const la=q("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"}]]);/**
72
72
  * @license lucide-react v0.562.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const ea=tt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),na=(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},sa=(t,e)=>({classGroupId:t,validator:e}),ps=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),ae="-",gs=[],ia="arbitrary..",ra=t=>{const e=aa(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return oa(r);const a=r.split(ae),l=a[0]===""&&a.length>1?1:0;return ys(a,l,e)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=s[r],c=n[r];return l?c?na(c,l):l:c||gs}return n[r]||gs}}},ys=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],o=n.nextPart.get(i);if(o){const c=ys(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}},oa=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?ia+s:void 0})(),aa=t=>{const{theme:e,classGroups:n}=t;return la(n,e)},la=(t,e)=>{const n=ps();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];ca(r,e,n,s)}},ca=(t,e,n,s)=>{if(typeof t=="string"){ua(t,e,n);return}if(typeof t=="function"){da(t,e,n,s);return}fa(t,e,n,s)},ua=(t,e,n)=>{const s=t===""?e:bs(e,t);s.classGroupId=n},da=(t,e,n,s)=>{if(ha(t)){Fe(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(sa(n,t))},fa=(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,bs(e,a),n,s)}},bs=(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=ps(),n.nextPart.set(r,a)),n=a}return n},ha=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,ma=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)}}},je="!",xs=":",pa=[],vs=(t,e,n,s,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),ga=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 b=i[g];if(r===0&&a===0){if(b===xs){o.push(i.slice(l,g)),l=g+1;continue}if(b==="/"){c=g;continue}}b==="["?r++:b==="]"?r--:b==="("?a++:b===")"&&a--}const d=o.length===0?i:i.slice(l);let f=d,h=!1;d.endsWith(je)?(f=d.slice(0,-1),h=!0):d.startsWith(je)&&(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+xs,o=s;s=r=>r.startsWith(i)?o(r.slice(i.length)):vs(pa,!1,r,void 0,!0)}if(n){const i=s;s=o=>n({className:o,parseClassName:i})}return s},ya=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}},ba=t=>({cache:ma(t.cacheSize),parseClassName:ga(t),sortModifiers:ya(t),...ra(t)}),xa=/\s+/,va=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:o}=e,r=[],a=t.trim().split(xa);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 b=!!g,v=s(b?p.substring(0,g):p);if(!v){if(!b){l=u+(l.length>0?" "+l:l);continue}if(v=s(p),!v){l=u+(l.length>0?" "+l:l);continue}b=!1}const T=f.length===0?"":f.length===1?f[0]:o(f).join(":"),w=h?T+je:T,E=w+v;if(r.indexOf(E)>-1)continue;r.push(E);const A=i(v,b);for(let D=0;D<A.length;++D){const L=A[D];r.push(w+L)}l=u+(l.length>0?" "+l:l)}return l},wa=(...t)=>{let e=0,n,s,i="";for(;e<t.length;)(n=t[e++])&&(s=ws(n))&&(i&&(i+=" "),i+=s);return i},ws=t=>{if(typeof t=="string")return t;let e,n="";for(let s=0;s<t.length;s++)t[s]&&(e=ws(t[s]))&&(n&&(n+=" "),n+=e);return n},Ta=(t,...e)=>{let n,s,i,o;const r=l=>{const c=e.reduce((u,d)=>d(u),t());return n=ba(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=va(l,n);return i(l,u),u};return o=r,(...l)=>o(wa(...l))},Sa=[],$=t=>{const e=n=>n[t]||Sa;return e.isThemeGetter=!0,e},Ts=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ss=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ka=/^\d+\/\d+$/,Ca=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Aa=/\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$/,Pa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Va=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ma=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pt=t=>ka.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)),lt=t=>Ca.test(t),Da=()=>!0,Ea=t=>Aa.test(t)&&!Pa.test(t),ks=()=>!1,La=t=>Va.test(t),Ia=t=>Ma.test(t),Na=t=>!S(t)&&!k(t),Ba=t=>Vt(t,Ms,ks),S=t=>Ts.test(t),xt=t=>Vt(t,Ds,Ea),ze=t=>Vt(t,$a,I),Cs=t=>Vt(t,Ps,ks),Fa=t=>Vt(t,Vs,Ia),le=t=>Vt(t,Es,La),k=t=>Ss.test(t),Wt=t=>Mt(t,Ds),ja=t=>Mt(t,_a),As=t=>Mt(t,Ps),Oa=t=>Mt(t,Ms),za=t=>Mt(t,Vs),ce=t=>Mt(t,Es,!0),Vt=(t,e,n)=>{const s=Ts.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Mt=(t,e,n=!1)=>{const s=Ss.exec(t);return s?s[1]?e(s[1]):n:!1},Ps=t=>t==="position"||t==="percentage",Vs=t=>t==="image"||t==="url",Ms=t=>t==="length"||t==="size"||t==="bg-size",Ds=t=>t==="length",$a=t=>t==="number",_a=t=>t==="family-name",Es=t=>t==="shadow",Ua=Ta(()=>{const t=$("color"),e=$("font"),n=$("text"),s=$("font-weight"),i=$("tracking"),o=$("leading"),r=$("breakpoint"),a=$("container"),l=$("spacing"),c=$("radius"),u=$("shadow"),d=$("inset-shadow"),f=$("text-shadow"),h=$("drop-shadow"),p=$("blur"),g=$("perspective"),b=$("aspect"),v=$("ease"),T=$("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...E(),k,S],D=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],x=()=>[k,S,l],N=()=>[Pt,"full","auto",...x()],U=()=>[mt,"none","subgrid",k,S],it=()=>["auto",{span:["full",mt,k,S]},mt,k,S],At=()=>[mt,"auto",k,S],De=()=>["auto","min","max","fr",k,S],Rt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ft=()=>["start","end","center","stretch","center-safe","end-safe"],ot=()=>["auto",...x()],B=()=>[Pt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],C=()=>[t,k,S],at=()=>[...E(),As,Cs,{position:[k,S]}],ht=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ee=()=>["auto","cover","contain",Oa,Ba,{size:[k,S]}],os=()=>[Oe,Wt,xt],X=()=>["","none","full",c,k,S],q=()=>["",I,Wt,xt],Le=()=>["solid","dashed","dotted","double"],jo=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>[I,Oe,As,Cs],Oo=()=>["","none",p,k,S],Ie=()=>["none",I,k,S],Ne=()=>["none",I,k,S],as=()=>[I,k,S],Be=()=>[Pt,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lt],breakpoint:[lt],color:[Da],container:[lt],"drop-shadow":[lt],ease:["in","out","in-out"],font:[Na],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lt],shadow:[lt],spacing:["px",I],text:[lt],"text-shadow":[lt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pt,S,k,b]}],container:["container"],columns:[{columns:[I,S,k,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:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],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",k,S]}],basis:[{basis:[Pt,"full","auto",a,...x()]}],"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,k,S]}],shrink:[{shrink:["",I,k,S]}],order:[{order:[mt,"first","last","none",k,S]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:it()}],"col-start":[{"col-start":At()}],"col-end":[{"col-end":At()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:it()}],"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":De()}],"auto-rows":[{"auto-rows":De()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...Rt(),"normal"]}],"justify-items":[{"justify-items":[...ft(),"normal"]}],"justify-self":[{"justify-self":["auto",...ft()]}],"align-content":[{content:["normal",...Rt()]}],"align-items":[{items:[...ft(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ft(),{baseline:["","last"]}]}],"place-content":[{"place-content":Rt()}],"place-items":[{"place-items":[...ft(),"baseline"]}],"place-self":[{"place-self":["auto",...ft()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:ot()}],mx:[{mx:ot()}],my:[{my:ot()}],ms:[{ms:ot()}],me:[{me:ot()}],mt:[{mt:ot()}],mr:[{mr:ot()}],mb:[{mb:ot()}],ml:[{ml:ot()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[a,"screen",...B()]}],"min-w":[{"min-w":[a,"screen","none",...B()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,Wt,xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,k,ze]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Oe,S]}],"font-family":[{font:[ja,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,k,S]}],"line-clamp":[{"line-clamp":[I,"none",k,ze]}],leading:[{leading:[o,...x()]}],"list-image":[{"list-image":["none",k,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",k,S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Le(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",k,xt]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[I,"auto",k,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",k,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",k,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:at()}],"bg-repeat":[{bg:ht()}],"bg-size":[{bg:Ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mt,k,S],radial:["",k,S],conic:[mt,k,S]},za,Fa]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:os()}],"gradient-via-pos":[{via:os()}],"gradient-to-pos":[{to:os()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"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:[...Le(),"hidden","none"]}],"divide-style":[{divide:[...Le(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...Le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,k,S]}],"outline-w":[{outline:["",I,Wt,xt]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,ce,le]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,ce,le]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[I,xt]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,ce,le]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[I,k,S]}],"mix-blend":[{"mix-blend":[...jo(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":jo()}],"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":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[k,S]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"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":E()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:at()}],"mask-repeat":[{mask:ht()}],"mask-size":[{mask:Ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",k,S]}],filter:[{filter:["","none",k,S]}],blur:[{blur:Oo()}],brightness:[{brightness:[I,k,S]}],contrast:[{contrast:[I,k,S]}],"drop-shadow":[{"drop-shadow":["","none",h,ce,le]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",I,k,S]}],"hue-rotate":[{"hue-rotate":[I,k,S]}],invert:[{invert:["",I,k,S]}],saturate:[{saturate:[I,k,S]}],sepia:[{sepia:["",I,k,S]}],"backdrop-filter":[{"backdrop-filter":["","none",k,S]}],"backdrop-blur":[{"backdrop-blur":Oo()}],"backdrop-brightness":[{"backdrop-brightness":[I,k,S]}],"backdrop-contrast":[{"backdrop-contrast":[I,k,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,k,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,k,S]}],"backdrop-invert":[{"backdrop-invert":["",I,k,S]}],"backdrop-opacity":[{"backdrop-opacity":[I,k,S]}],"backdrop-saturate":[{"backdrop-saturate":[I,k,S]}],"backdrop-sepia":[{"backdrop-sepia":["",I,k,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",k,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",k,S]}],ease:[{ease:["linear","initial",v,k,S]}],delay:[{delay:[I,k,S]}],animate:[{animate:["none",T,k,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,k,S]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:Ne()}],"scale-x":[{"scale-x":Ne()}],"scale-y":[{"scale-y":Ne()}],"scale-z":[{"scale-z":Ne()}],"scale-3d":["scale-3d"],skew:[{skew:as()}],"skew-x":[{"skew-x":as()}],"skew-y":[{"skew-y":as()}],transform:[{transform:[k,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"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",k,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":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",k,S]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[I,Wt,xt,ze]}],stroke:[{stroke:["none",...C()]}],"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 V(...t){return Ua(cs(t))}const Ra={error:Ho,info:qo,noData:Jo,success:ms,warning:ta},Wa=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 Ga({children:t,className:e,icon:n,ref:s,showIcon:i=!1,variant:o,...r}){const a=Ra[o||"warning"];return m.jsxs("div",{className:V(Wa({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 Ka({children:t,className:e,...n}){return m.jsx("h5",{className:V("font-bold leading-none tracking-tight",e),...n,children:t})}function Ha({children:t,className:e,...n}){return m.jsx("div",{className:V("text-sm opacity-90",e),...n,children:t})}const $e=y.createContext({});function _e(t){const e=y.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ue=typeof window<"u",Ls=Ue?y.useLayoutEffect:y.useEffect,ue=y.createContext(null);function Re(t,e){t.indexOf(e)===-1&&t.push(e)}function We(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ct=(t,e,n)=>n>e?e:n<t?t:n;function Ge(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Dt=()=>{},ut=()=>{};process.env.NODE_ENV!=="production"&&(Dt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(Ge(e,n))},ut=(t,e,n)=>{if(!t)throw new Error(Ge(e,n))});const dt={},Is=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ns(t){return typeof t=="object"&&t!==null}const Bs=t=>/^0[^.\s]+$/u.test(t);function Ke(t){let e;return()=>(e===void 0&&(e=t()),e)}const Z=t=>t,Xa=(t,e)=>n=>e(t(n)),Gt=(...t)=>t.reduce(Xa),Kt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class He{constructor(){this.subscriptions=[]}add(e){return Re(this.subscriptions,e),()=>We(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 et=t=>t*1e3,J=t=>t/1e3;function Fs(t,e){return e?t*(1e3/e):0}const js=new Set;function Xe(t,e,n){t||js.has(e)||(console.warn(Ge(e,n)),js.add(e))}const Os=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ya=1e-7,qa=12;function Za(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Os(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Ya&&++a<qa);return r}function Ht(t,e,n,s){if(t===e&&n===s)return Z;const i=o=>Za(o,0,1,t,n);return o=>o===0||o===1?o:Os(i(o),e,s)}const zs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,$s=t=>e=>1-t(1-e),_s=Ht(.33,1.53,.69,.99),Ye=$s(_s),Us=zs(Ye),Rs=t=>(t*=2)<1?.5*Ye(t):.5*(2-Math.pow(2,-10*(t-1))),qe=t=>1-Math.sin(Math.acos(t)),Ws=$s(qe),Gs=zs(qe),Ja=Ht(.42,0,1,1),Qa=Ht(0,0,.58,1),Ks=Ht(.42,0,.58,1),tl=t=>Array.isArray(t)&&typeof t[0]!="number",Hs=t=>Array.isArray(t)&&typeof t[0]=="number",Xs={linear:Z,easeIn:Ja,easeInOut:Ks,easeOut:Qa,circIn:qe,circInOut:Gs,circOut:Ws,backIn:Ye,backInOut:Us,backOut:_s,anticipate:Rs},el=t=>typeof t=="string",Ze=t=>{if(Hs(t)){ut(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(el(t))return ut(Xs[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Xs[t];return t},de=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function nl(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 sl=40;function Ys(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=de.reduce((w,E)=>(w[E]=nl(o),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:p}=r,g=()=>{const w=dt.useManualTiming?i.timestamp:performance.now();n=!1,dt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,sl),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))},b=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:de.reduce((w,E)=>{const A=r[E];return w[E]=(D,L=!1,x=!1)=>(n||b(),A.schedule(D,L,x)),w},{}),cancel:w=>{for(let E=0;E<de.length;E++)r[de[E]].cancel(w)},state:i,steps:r}}const{schedule:F,cancel:pt,state:W,steps:Je}=Ys(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let fe;function il(){fe=void 0}const Y={now:()=>(fe===void 0&&Y.set(W.isProcessing||dt.useManualTiming?W.timestamp:performance.now()),fe),set:t=>{fe=t,queueMicrotask(il)}},qs=t=>e=>typeof e=="string"&&e.startsWith(t),Zs=qs("--"),rl=qs("var(--"),Qe=t=>rl(t)?ol.test(t.split("/*")[0].trim()):!1,ol=/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=>ct(0,1,t)},he={...Et,default:1},Yt=t=>Math.round(t*1e5)/1e5,tn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function al(t){return t==null}const ll=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,en=(t,e)=>n=>!!(typeof n=="string"&&ll.test(n)&&n.startsWith(t)||e&&!al(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(tn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},cl=t=>ct(0,255,t),nn={...Et,transform:t=>Math.round(cl(t))},vt={test:en("rgb","red"),parse:Js("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+nn.transform(t)+", "+nn.transform(e)+", "+nn.transform(n)+", "+Yt(Xt.transform(s))+")"};function ul(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 sn={test:en("#"),parse:ul,transform:vt.transform},qt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),gt=qt("deg"),rt=qt("%"),M=qt("px"),dl=qt("vh"),fl=qt("vw"),Qs={...rt,parse:t=>rt.parse(t)/100,transform:t=>rt.transform(t*100)},Lt={test:en("hsl","hue"),parse:Js("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+rt.transform(Yt(e))+", "+rt.transform(Yt(n))+", "+Yt(Xt.transform(s))+")"},z={test:t=>vt.test(t)||sn.test(t)||Lt.test(t),parse:t=>vt.test(t)?vt.parse(t):Lt.test(t)?Lt.parse(t):sn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?vt.transform(t):Lt.transform(t),getAnimatableNone:t=>{const e=z.parse(t);return e.alpha=0,z.transform(e)}},hl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ml(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(tn))==null?void 0:e.length)||0)+(((n=t.match(hl))==null?void 0:n.length)||0)>0}const ti="number",ei="color",pl="var",gl="var(",ni="${}",yl=/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(yl,l=>(z.test(l)?(s.color.push(o),i.push(ei),n.push(z.parse(l))):l.startsWith(gl)?(s.var.push(o),i.push(pl),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+=z.transform(i[r]):o+=i[r]}return o}}const bl=t=>typeof t=="number"?0:z.test(t)?z.getAnimatableNone(t):t;function xl(t){const e=si(t);return ii(t)(e.map(bl))}const yt={test:ml,parse:si,createTransformer:ii,getAnimatableNone:xl};function rn(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=rn(l,a,t+1/3),o=rn(l,a,t),r=rn(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 j=(t,e,n)=>t+(e-t)*n,on=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},wl=[sn,vt,Lt],Tl=t=>wl.find(e=>e.test(t));function ri(t){const e=Tl(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 oi=(t,e)=>{const n=ri(t),s=ri(e);if(!n||!s)return me(t,e);const i={...n};return o=>(i.red=on(n.red,s.red,o),i.green=on(n.green,s.green,o),i.blue=on(n.blue,s.blue,o),i.alpha=j(n.alpha,s.alpha,o),vt.transform(i))},an=new Set(["none","hidden"]);function Sl(t,e){return an.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function kl(t,e){return n=>j(t,e,n)}function ln(t){return typeof t=="number"?kl:typeof t=="string"?Qe(t)?me:z.test(t)?oi:Pl:Array.isArray(t)?ai:typeof t=="object"?z.test(t)?oi:Cl:me}function ai(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>ln(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]=ln(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Al(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 Pl=(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?an.has(t)&&!i.values.length||an.has(e)&&!s.values.length?Sl(t,e):Gt(ai(Al(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 li(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?j(t,e,n):ln(t)(t,e)}const Vl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>F.update(e,n),stop:()=>pt(e),now:()=>W.isProcessing?W.timestamp:Y.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)})`},pe=2e4;function cn(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 Ml(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(cn(s),pe);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:J(i)}}const Dl=5;function ui(t,e,n){const s=Math.max(e-Dl,0);return Fs(n-t(s),e-s)}const O={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},un=.001;function El({duration:t=O.duration,bounce:e=O.bounce,velocity:n=O.velocity,mass:s=O.mass}){let i,o;Dt(t<=et(O.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=ct(O.minDamping,O.maxDamping,r),t=ct(O.minDuration,O.maxDuration,J(t)),r<1?(i=c=>{const u=c*r,d=u*t,f=u-n,h=dn(c,r),p=Math.exp(-d);return un-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=dn(Math.pow(c,2),r);return(-i(c)+un>0?-1:1)*((f-h)*p)/g}):(i=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-un+u*d},o=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=Il(i,o,a);if(t=et(t),isNaN(l))return{stiffness:O.stiffness,damping:O.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const Ll=12;function Il(t,e,n){let s=n;for(let i=1;i<Ll;i++)s=s-t(s)/e(s);return s}function dn(t,e){return t*Math.sqrt(1-e*e)}const Nl=["duration","bounce"],Bl=["stiffness","damping","mass"];function di(t,e){return e.some(n=>t[n]!==void 0)}function Fl(t){let e={velocity:O.velocity,stiffness:O.stiffness,damping:O.damping,mass:O.mass,isResolvedFromDuration:!1,...t};if(!di(t,Bl)&&di(t,Nl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*ct(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:O.mass,stiffness:i,damping:o}}else{const n=El(t);e={...e,...n,mass:O.mass},e.isResolvedFromDuration=!0}return e}function ge(t=O.visualDuration,e=O.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:-J(n.velocity||0)}),p=f||0,g=c/(2*Math.sqrt(l*u)),b=r-o,v=J(Math.sqrt(l/u)),T=Math.abs(b)<5;s||(s=T?O.restSpeed.granular:O.restSpeed.default),i||(i=T?O.restDelta.granular:O.restDelta.default);let w;if(g<1){const A=dn(v,g);w=D=>{const L=Math.exp(-g*v*D);return r-L*((p+g*v*b)/A*Math.sin(A*D)+b*Math.cos(A*D))}}else if(g===1)w=A=>r-Math.exp(-v*A)*(b+(p+v*b)*A);else{const A=v*Math.sqrt(g*g-1);w=D=>{const L=Math.exp(-g*v*D),x=Math.min(A*D,300);return r-L*((p+g*v*b)*Math.sinh(x)+A*b*Math.cosh(x))/A}}const E={calculatedDuration:h&&d||null,next:A=>{const D=w(A);if(h)a.done=A>=d;else{let L=A===0?p:0;g<1&&(L=A===0?et(p):ui(w,A,D));const x=Math.abs(L)<=s,N=Math.abs(r-D)<=i;a.done=x&&N}return a.value=a.done?r:D,a},toString:()=>{const A=Math.min(cn(E),pe),D=ci(L=>E.next(A*L).value,A,30);return A+"ms "+D},toTransition:()=>{}};return E}ge.applyToOptions=t=>{const e=Ml(t,100,ge);return t.ease=e.ease,t.duration=et(e.duration),t.type="keyframes",t};function fn({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=x=>a!==void 0&&x<a||l!==void 0&&x>l,p=x=>a===void 0?l:l===void 0||Math.abs(a-x)<Math.abs(l-x)?a:l;let g=n*e;const b=d+g,v=r===void 0?b:r(b);v!==b&&(g=v-d);const T=x=>-g*Math.exp(-x/s),w=x=>v+T(x),E=x=>{const N=T(x),U=w(x);f.done=Math.abs(N)<=c,f.value=f.done?v:U};let A,D;const L=x=>{h(f.value)&&(A=x,D=ge({keyframes:[f.value,p(f.value)],velocity:ui(w,x,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return L(0),{calculatedDuration:null,next:x=>{let N=!1;return!D&&A===void 0&&(N=!0,E(x),L(x)),A!==void 0&&x>=A?D.next(x-A):(!N&&E(x),f)}}}function jl(t,e,n){const s=[],i=n||dt.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 Ol(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ut(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=jl(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(ct(t[0],t[o-1],u)):c}function zl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Kt(0,e,s);t.push(j(n,1,i))}}function $l(t){const e=[0];return zl(e,t.length-1),e}function _l(t,e){return t.map(n=>n*e)}function Ul(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=tl(s)?s.map(Ze):Ze(s),o={done:!1,value:e[0]},r=_l(n&&n.length===e.length?n:$l(e),t),a=Ol(r,e,{ease:Array.isArray(i)?i:Ul(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Rl=t=>t!==null;function hn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Rl),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Wl={decay:fn,inertia:fn,tween:It,keyframes:It,spring:ge};function fi(t){typeof t.type=="string"&&(t.type=Wl[t.type])}class mn{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 Gl=t=>t/100;class pn extends mn{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!==Y.now()&&this.tick(Y.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&&ut(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(Gl,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=cn(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:b}=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 v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,E=s;if(d){const x=Math.min(this.currentTime,i)/a;let N=Math.floor(x),U=x%1;!U&&x>=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"&&(E=r)),w=ct(0,1,U)*a}const A=T?{done:!1,value:u[0]}:E.next(w);o&&(A.value=o(A.value));let{done:D}=A;!T&&l!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return L&&p!==fn&&(A.value=hn(u,this.options,b,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=et(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(Y.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=Vl,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(Y.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,gn=t=>{const e=wt(Math.atan2(t[1],t[0]));return yn(e)},Hl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:gn,rotateZ:gn,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},yn=t=>(t=t%360,t<0&&(t+=360),t),hi=gn,mi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),pi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Xl={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=>yn(wt(Math.atan2(t[6],t[5]))),rotateY:t=>yn(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 bn(t){return t.includes("scale")?1:0}function xn(t,e){if(!t||t==="none")return bn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Xl,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Hl,i=a}if(!i)return bn(e);const o=s[e],r=i[1].split(",").map(ql);return typeof o=="function"?o(r):r[o]}const Yl=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return xn(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"],Bt=new Set(Nt),gi=t=>t===Et||t===M,Zl=new Set(["x","y","z"]),Jl=Nt.filter(t=>!Zl.has(t));function Ql(t){const e=[];return Jl.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})=>xn(e,"x"),y:(t,{transform:e})=>xn(e,"y")};Tt.translateX=Tt.x,Tt.translateY=Tt.y;const St=new Set;let vn=!1,wn=!1,Tn=!1;function yi(){if(wn){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=Ql(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)})}wn=!1,vn=!1,St.forEach(t=>t.complete(Tn)),St.clear()}function bi(){St.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(wn=!0)})}function tc(){Tn=!0,bi(),yi(),Tn=!1}class Sn{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,F.read(bi),F.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])}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 ec=t=>t.startsWith("--");function nc(t,e,n){ec(e)?t.style.setProperty(e,n):t.style[e]=n}const sc=Ke(()=>window.ScrollTimeline!==void 0),ic={};function rc(t,e){const n=Ke(t);return()=>ic[e]??n()}const xi=rc(()=>{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})`,vi={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"?xi()?ci(t,e):"ease-out":Hs(t)?Jt(t):Array.isArray(t)?t.map(n=>wi(n,e)||vi.easeOut):vi[t]}function oc(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 ac({type:t,...e}){return Ti(t)&&xi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class lc extends mn{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,ut(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=ac(e);this.animation=oc(n,s,i,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=hn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):nc(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=et(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&&sc()?(this.animation.timeline=e,Z):n(this)}}const Si={anticipate:Rs,backInOut:Us,circInOut:Gs};function cc(t){return t in Si}function uc(t){typeof t.ease=="string"&&cc(t.ease)&&(t.ease=Si[t.ease])}const ki=10;class dc extends lc{constructor(e){uc(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 pn({...r,autoplay:!1}),l=et(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ki).value,a.sample(l).value,ki),a.stop()}}const Ci=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(yt.test(t)||t==="0")&&!t.startsWith("url("));function fc(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 hc(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=Ci(i,e),a=Ci(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:fc(t)||(n==="spring"||Ti(n))&&s}function kn(t){t.duration=0,t.type="keyframes"}const mc=new Set(["opacity","clipPath","filter","transform"]),pc=Ke(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gc(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 pc()&&n&&mc.has(n)&&(n!=="transform"||!c)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const yc=40;class bc extends mn{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,b;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Y.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)||Sn;this.keyframeResolver=new h(a,(g,b,v)=>this.onKeyframesResolved(g,b,f,!v),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=Y.now(),hc(e,o,r,a)||((dt.instantAnimations||!l)&&(u==null||u(hn(e,s,n))),e[0]=e[e.length-1],kn(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>yc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!c&&gc(f)?new dc({...f,element:f.motionValue.owner.current}):new pn(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(),tc()),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 xc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vc(t){const e=xc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const wc=4;function Ai(t,e,n=1){ut(n<=wc,`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 Is(r)?parseFloat(r):r}return Qe(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]),Tc={test:t=>t==="auto",parse:t=>t},Vi=t=>e=>e.test(t),Mi=[Et,M,rt,gt,fl,dl,Tc],Di=t=>Mi.find(Vi(t));function Sc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Bs(t):!0}const kc=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(tn)||[];if(!s)return t;const i=n.replace(s,"");let o=kc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Ac=/\b([a-z-]*)\(.*?\)/gu,An={...yt,getAnimatableNone:t=>{const e=t.match(Ac);return e?e.map(Cc).join(" "):t}},Ei={...Et,transform:Math.round},Pn={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,...{rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:he,scaleX:he,scaleY:he,scaleZ:he,skew:gt,skewX:gt,skewY:gt,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:Xt,originX:Qs,originY:Qs,originZ:M},zIndex:Ei,fillOpacity:Xt,strokeOpacity:Xt,numOctaves:Ei},Pc={...Pn,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:An,WebkitFilter:An},Li=t=>Pc[t];function Ii(t,e){let n=Li(t);return n!==An&&(n=yt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Vc=new Set(["auto","none","0"]);function Mc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Vc.has(o)&&Zt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Ii(n,i)}class Dc extends Sn{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(),Qe(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||Sc(e[i]))&&s.push(i);s.length&&Mc(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 Ec(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 Bi(t){return Ns(t)&&"offsetHeight"in t}const Fi=30,Lc=t=>!isNaN(parseFloat(t));class Ic{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const i=Y.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=Y.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Lc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Xe(!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 He);const s=this.events[e].add(n);return e==="change"?()=>{s(),F.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=Y.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Fi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fi);return Fs(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 Ft(t,e){return new Ic(t,e)}const{schedule:Vn}=Ys(queueMicrotask,!1),nt={x:!1,y:!1};function ji(){return nt.x||nt.y}function Nc(t){return t==="x"||t==="y"?nt[t]?null:(nt[t]=!0,()=>{nt[t]=!1}):nt.x||nt.y?null:(nt.x=nt.y=!0,()=>{nt.x=nt.y=!1})}function Oi(t,e){const n=Ec(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function zi(t){return!(t.pointerType==="touch"||ji())}function Bc(t,e,n={}){const[s,i,o]=Oi(t,n),r=a=>{if(!zi(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=d=>{zi(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const $i=(t,e)=>e?t===e?!0:$i(t,e.parentElement):!1,Mn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Fc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function jc(t){return Fc.has(t.tagName)||t.tabIndex!==-1}const ye=new WeakSet;function _i(t){return e=>{e.key==="Enter"&&t(e)}}function Dn(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=_i(()=>{if(ye.has(n))return;Dn(n,"down");const i=_i(()=>{Dn(n,"up")}),o=()=>Dn(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 Ui(t){return Mn(t)&&!ji()}function zc(t,e,n={}){const[s,i,o]=Oi(t,n),r=a=>{const l=a.currentTarget;if(!Ui(a))return;ye.add(l);const c=e(l,a),u=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ye.has(l)&&ye.delete(l),Ui(h)&&typeof c=="function"&&c(h,{success:p})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||$i(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),Bi(a)&&(a.addEventListener("focus",c=>Oc(c,i)),!jc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Ri(t){return Ns(t)&&"ownerSVGElement"in t}function $c(t){return Ri(t)&&t.tagName==="svg"}function _c(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:_c(n,o),a=Math.abs(r-i);let l=t*a;if(s){const c=o*t;l=Ze(s)(l/c)*c}return e+l}}const G=t=>!!(t&&t.getVelocity),Uc=[...Mi,z,yt],Rc=t=>Uc.find(Vi(t)),En=y.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 Wc(...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 Gc(...t){return re.useCallback(Wc(...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=Bi(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 Hc({children:t,isPresent:e,anchorX:n,root:s}){const i=y.useId(),o=y.useRef(null),r=y.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=y.useContext(En),l=Gc(o,t==null?void 0:t.ref);return y.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 b=s??document.head;return b.appendChild(g),g.sheet&&g.sheet.insertRule(`
77
- [data-motion-pop-id="${i}"] {
76
+ */const ca=q("slash",[["path",{d:"M22 2 2 22",key:"y4kqgn"}]]);/**
77
+ * @license lucide-react v0.562.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const ua=q("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"}]]);/**
82
+ * @license lucide-react v0.562.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const da=q("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fa=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},ha=(e,t)=>({classGroupId:e,validator:t}),ys=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),at="-",bs=[],ma="arbitrary..",pa=e=>{const t=ya(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return ga(i);const a=i.split(at),l=a[0]===""&&a.length>1?1:0;return xs(a,l,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const l=s[i],c=n[i];return l?c?fa(c,l):l:c||bs}return n[i]||bs}}},xs=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const c=xs(e,t+1,o);if(c)return c}const i=n.validators;if(i===null)return;const a=t===0?e.join(at):e.slice(t).join(at),l=i.length;for(let c=0;c<l;c++){const u=i[c];if(u.validator(a))return u.classGroupId}},ga=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?ma+s:void 0})(),ya=e=>{const{theme:t,classGroups:n}=e;return ba(n,t)},ba=(e,t)=>{const n=ys();for(const s in e){const r=e[s];Ft(r,n,s,t)}return n},Ft=(e,t,n,s)=>{const r=e.length;for(let o=0;o<r;o++){const i=e[o];xa(i,t,n,s)}},xa=(e,t,n,s)=>{if(typeof e=="string"){va(e,t,n);return}if(typeof e=="function"){wa(e,t,n,s);return}Ta(e,t,n,s)},va=(e,t,n)=>{const s=e===""?t:vs(t,e);s.classGroupId=n},wa=(e,t,n,s)=>{if(Sa(e)){Ft(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(ha(n,e))},Ta=(e,t,n,s)=>{const r=Object.entries(e),o=r.length;for(let i=0;i<o;i++){const[a,l]=r[i];Ft(l,vs(t,a),n,s)}},vs=(e,t)=>{let n=e;const s=t.split(at),r=s.length;for(let o=0;o<r;o++){const i=s[o];let a=n.nextPart.get(i);a||(a=ys(),n.nextPart.set(i,a)),n=a}return n},Sa=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ka=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const r=(o,i)=>{n[o]=i,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(o){let i=n[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return r(o,i),i},set(o,i){o in n?n[o]=i:r(o,i)}}},jt="!",ws=":",Ca=[],Ts=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),Aa=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const o=[];let i=0,a=0,l=0,c;const u=r.length;for(let y=0;y<u;y++){const b=r[y];if(i===0&&a===0){if(b===ws){o.push(r.slice(l,y)),l=y+1;continue}if(b==="/"){c=y;continue}}b==="["?i++:b==="]"?i--:b==="("?a++:b===")"&&a--}const d=o.length===0?r:r.slice(l);let f=d,m=!1;d.endsWith(jt)?(f=d.slice(0,-1),m=!0):d.startsWith(jt)&&(f=d.slice(1),m=!0);const p=c&&c>l?c-l:void 0;return Ts(o,m,f,p)};if(t){const r=t+ws,o=s;s=i=>i.startsWith(r)?o(i.slice(r.length)):Ts(Ca,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},Pa=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let r=[];for(let o=0;o<n.length;o++){const i=n[o],a=i[0]==="[",l=t.has(i);a||l?(r.length>0&&(r.sort(),s.push(...r),r=[]),s.push(i)):r.push(i)}return r.length>0&&(r.sort(),s.push(...r)),s}},Va=e=>({cache:ka(e.cacheSize),parseClassName:Aa(e),sortModifiers:Pa(e),...pa(e)}),Ma=/\s+/,Da=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o}=t,i=[],a=e.trim().split(Ma);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:y}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let b=!!y,v=s(b?p.substring(0,y):p);if(!v){if(!b){l=u+(l.length>0?" "+l:l);continue}if(v=s(p),!v){l=u+(l.length>0?" "+l:l);continue}b=!1}const k=f.length===0?"":f.length===1?f[0]:o(f).join(":"),w=m?k+jt:k,E=w+v;if(i.indexOf(E)>-1)continue;i.push(E);const V=r(v,b);for(let D=0;D<V.length;++D){const N=V[D];i.push(w+N)}l=u+(l.length>0?" "+l:l)}return l},Ea=(...e)=>{let t=0,n,s,r="";for(;t<e.length;)(n=e[t++])&&(s=Ss(n))&&(r&&(r+=" "),r+=s);return r},Ss=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=Ss(e[s]))&&(n&&(n+=" "),n+=t);return n},Na=(e,...t)=>{let n,s,r,o;const i=l=>{const c=t.reduce((u,d)=>d(u),e());return n=Va(c),s=n.cache.get,r=n.cache.set,o=a,a(l)},a=l=>{const c=s(l);if(c)return c;const u=Da(l,n);return r(l,u),u};return o=i,(...l)=>o(Ea(...l))},La=[],$=e=>{const t=n=>n[e]||La;return t.isThemeGetter=!0,t},ks=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cs=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ia=/^\d+\/\d+$/,Ba=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Oa=/\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$/,Fa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ja=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_a=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ve=e=>Ia.test(e),L=e=>!!e&&!Number.isNaN(Number(e)),me=e=>!!e&&Number.isInteger(Number(e)),_t=e=>e.endsWith("%")&&L(e.slice(0,-1)),le=e=>Ba.test(e),$a=()=>!0,za=e=>Oa.test(e)&&!Fa.test(e),As=()=>!1,Ua=e=>ja.test(e),Wa=e=>_a.test(e),Ka=e=>!C(e)&&!A(e),Ga=e=>Me(e,Es,As),C=e=>ks.test(e),xe=e=>Me(e,Ns,za),$t=e=>Me(e,qa,L),Ps=e=>Me(e,Ms,As),Ra=e=>Me(e,Ds,Wa),lt=e=>Me(e,Ls,Ua),A=e=>Cs.test(e),Ge=e=>De(e,Ns),Ha=e=>De(e,Za),Vs=e=>De(e,Ms),Xa=e=>De(e,Es),Ya=e=>De(e,Ds),ct=e=>De(e,Ls,!0),Me=(e,t,n)=>{const s=ks.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},De=(e,t,n=!1)=>{const s=Cs.exec(e);return s?s[1]?t(s[1]):n:!1},Ms=e=>e==="position"||e==="percentage",Ds=e=>e==="image"||e==="url",Es=e=>e==="length"||e==="size"||e==="bg-size",Ns=e=>e==="length",qa=e=>e==="number",Za=e=>e==="family-name",Ls=e=>e==="shadow",Ja=Na(()=>{const e=$("color"),t=$("font"),n=$("text"),s=$("font-weight"),r=$("tracking"),o=$("leading"),i=$("breakpoint"),a=$("container"),l=$("spacing"),c=$("radius"),u=$("shadow"),d=$("inset-shadow"),f=$("text-shadow"),m=$("drop-shadow"),p=$("blur"),y=$("perspective"),b=$("aspect"),v=$("ease"),k=$("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...E(),A,C],D=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],x=()=>[A,C,l],I=()=>[Ve,"full","auto",...x()],U=()=>[me,"none","subgrid",A,C],re=()=>["auto",{span:["full",me,A,C]},me,A,C],Ae=()=>[me,"auto",A,C],Dt=()=>["auto","min","max","fr",A,C],Ke=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],oe=()=>["auto",...x()],B=()=>[Ve,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],P=()=>[e,A,C],ae=()=>[...E(),Vs,Ps,{position:[A,C]}],he=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Et=()=>["auto","cover","contain",Xa,Ga,{size:[A,C]}],ls=()=>[_t,Ge,xe],X=()=>["","none","full",c,A,C],Z=()=>["",L,Ge,xe],Nt=()=>["solid","dashed","dotted","double"],Ro=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>[L,_t,Vs,Ps],Ho=()=>["","none",p,A,C],Lt=()=>["none",L,A,C],It=()=>["none",L,A,C],cs=()=>[L,A,C],Bt=()=>[Ve,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[le],breakpoint:[le],color:[$a],container:[le],"drop-shadow":[le],ease:["in","out","in-out"],font:[Ka],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[le],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[le],shadow:[le],spacing:["px",L],text:[le],"text-shadow":[le],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ve,C,A,b]}],container:["container"],columns:[{columns:[L,C,A,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:V()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[me,"auto",A,C]}],basis:[{basis:[Ve,"full","auto",a,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[L,Ve,"auto","initial","none",C]}],grow:[{grow:["",L,A,C]}],shrink:[{shrink:["",L,A,C]}],order:[{order:[me,"first","last","none",A,C]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":Ae()}],"col-end":[{"col-end":Ae()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":Ae()}],"row-end":[{"row-end":Ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Dt()}],"auto-rows":[{"auto-rows":Dt()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...Ke(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...Ke()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ke()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:oe()}],mx:[{mx:oe()}],my:[{my:oe()}],ms:[{ms:oe()}],me:[{me:oe()}],mt:[{mt:oe()}],mr:[{mr:oe()}],mb:[{mb:oe()}],ml:[{ml:oe()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[a,"screen",...B()]}],"min-w":[{"min-w":[a,"screen","none",...B()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,Ge,xe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,A,$t]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_t,C]}],"font-family":[{font:[Ha,C,t]}],"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:[r,A,C]}],"line-clamp":[{"line-clamp":[L,"none",A,$t]}],leading:[{leading:[o,...x()]}],"list-image":[{"list-image":["none",A,C]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",A,C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Nt(),"wavy"]}],"text-decoration-thickness":[{decoration:[L,"from-font","auto",A,xe]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[L,"auto",A,C]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",A,C]}],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",A,C]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:he()}],"bg-size":[{bg:Et()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},me,A,C],radial:["",A,C],conic:[me,A,C]},Ya,Ra]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ls()}],"gradient-via-pos":[{via:ls()}],"gradient-to-pos":[{to:ls()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Nt(),"hidden","none"]}],"divide-style":[{divide:[...Nt(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...Nt(),"none","hidden"]}],"outline-offset":[{"outline-offset":[L,A,C]}],"outline-w":[{outline:["",L,Ge,xe]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,ct,lt]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",d,ct,lt]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[L,xe]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",f,ct,lt]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[L,A,C]}],"mix-blend":[{"mix-blend":[...Ro(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ro()}],"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":[L]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[A,C]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":E()}],"mask-image-conic-pos":[{"mask-conic":[L]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:he()}],"mask-size":[{mask:Et()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",A,C]}],filter:[{filter:["","none",A,C]}],blur:[{blur:Ho()}],brightness:[{brightness:[L,A,C]}],contrast:[{contrast:[L,A,C]}],"drop-shadow":[{"drop-shadow":["","none",m,ct,lt]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",L,A,C]}],"hue-rotate":[{"hue-rotate":[L,A,C]}],invert:[{invert:["",L,A,C]}],saturate:[{saturate:[L,A,C]}],sepia:[{sepia:["",L,A,C]}],"backdrop-filter":[{"backdrop-filter":["","none",A,C]}],"backdrop-blur":[{"backdrop-blur":Ho()}],"backdrop-brightness":[{"backdrop-brightness":[L,A,C]}],"backdrop-contrast":[{"backdrop-contrast":[L,A,C]}],"backdrop-grayscale":[{"backdrop-grayscale":["",L,A,C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[L,A,C]}],"backdrop-invert":[{"backdrop-invert":["",L,A,C]}],"backdrop-opacity":[{"backdrop-opacity":[L,A,C]}],"backdrop-saturate":[{"backdrop-saturate":[L,A,C]}],"backdrop-sepia":[{"backdrop-sepia":["",L,A,C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",A,C]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[L,"initial",A,C]}],ease:[{ease:["linear","initial",v,A,C]}],delay:[{delay:[L,A,C]}],animate:[{animate:["none",k,A,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,A,C]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Lt()}],"rotate-x":[{"rotate-x":Lt()}],"rotate-y":[{"rotate-y":Lt()}],"rotate-z":[{"rotate-z":Lt()}],scale:[{scale:It()}],"scale-x":[{"scale-x":It()}],"scale-y":[{"scale-y":It()}],"scale-z":[{"scale-z":It()}],"scale-3d":["scale-3d"],skew:[{skew:cs()}],"skew-x":[{"skew-x":cs()}],"skew-y":[{"skew-y":cs()}],transform:[{transform:[A,C,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Bt()}],"translate-x":[{"translate-x":Bt()}],"translate-y":[{"translate-y":Bt()}],"translate-z":[{"translate-z":Bt()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",A,C]}],"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":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",A,C]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[L,Ge,xe,$t]}],stroke:[{stroke:["none",...P()]}],"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 T(...e){return Ja(ds(e))}const Qa={error:na,info:oa,noData:la,success:Ot,warning:ua},el=Pe("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 tl({children:e,className:t,icon:n,ref:s,showIcon:r=!1,variant:o,...i}){const a=Qa[o||"warning"];return h.jsxs("div",{className:T(el({variant:o}),t),ref:s,role:o==="error"?"alert":"status",...i,children:[e,(r||n)&&h.jsx("div",{className:"absolute top-2 right-2",children:n||h.jsx(a,{size:22})})]})}function nl({children:e,className:t,...n}){return h.jsx("h5",{className:T("font-bold leading-none tracking-tight",t),...n,children:e})}function sl({children:e,className:t,...n}){return h.jsx("div",{className:T("text-sm opacity-90",t),...n,children:e})}const rl=Pe("inline-flex items-center justify-center rounded-full font-medium transition-colors duration-200 cursor-default",{defaultVariants:{size:"md",variant:"default"},variants:{size:{lg:"px-3 py-1 text-base",md:"px-2.5 py-0.5 text-sm",sm:"px-2 py-0.5 text-xs"},variant:{default:"bg-transparent border-2 border-border-strong text-text-secondary hover:bg-surface-secondary hover:text-text",error:"bg-error text-white border border-border",info:"bg-info text-white border border-border dark:text-gray-700",success:"bg-success text-white dark:text-gray-700 ",warning:"bg-warning text-white dark:text-gray-700"}}});function il({as:e,children:t,className:n,icon:s,size:r="md",variant:o="default",...i}){const a=e??"span";return h.jsxs(a,{className:T(rl({size:r,variant:o}),n),...i,children:[s&&h.jsx("span",{className:"mr-1.5 flex-shrink-0",children:s}),t]})}const zt=g.createContext({});function Ut(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Wt=typeof window<"u",Is=Wt?g.useLayoutEffect:g.useEffect,ut=g.createContext(null);function Kt(e,t){e.indexOf(t)===-1&&e.push(t)}function Gt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ce=(e,t,n)=>n>t?t:n<e?e:n;function Rt(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ee=()=>{},ue=()=>{};process.env.NODE_ENV!=="production"&&(Ee=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Rt(t,n))},ue=(e,t,n)=>{if(!e)throw new Error(Rt(t,n))});const de={},Bs=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Os(e){return typeof e=="object"&&e!==null}const Fs=e=>/^0[^.\s]+$/u.test(e);function Ht(e){let t;return()=>(t===void 0&&(t=e()),t)}const J=e=>e,ol=(e,t)=>n=>t(e(n)),Re=(...e)=>e.reduce(ol),He=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class Xt{constructor(){this.subscriptions=[]}add(t){return Kt(this.subscriptions,t),()=>Gt(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let o=0;o<r;o++){const i=this.subscriptions[o];i&&i(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const te=e=>e*1e3,Q=e=>e/1e3;function js(e,t){return t?e*(1e3/t):0}const _s=new Set;function Yt(e,t,n){e||_s.has(t)||(console.warn(Rt(t,n)),_s.add(t))}const $s=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,al=1e-7,ll=12;function cl(e,t,n,s,r){let o,i,a=0;do i=t+(n-t)/2,o=$s(i,s,r)-e,o>0?n=i:t=i;while(Math.abs(o)>al&&++a<ll);return i}function Xe(e,t,n,s){if(e===t&&n===s)return J;const r=o=>cl(o,0,1,e,n);return o=>o===0||o===1?o:$s(r(o),t,s)}const zs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Us=e=>t=>1-e(1-t),Ws=Xe(.33,1.53,.69,.99),qt=Us(Ws),Ks=zs(qt),Gs=e=>(e*=2)<1?.5*qt(e):.5*(2-Math.pow(2,-10*(e-1))),Zt=e=>1-Math.sin(Math.acos(e)),Rs=Us(Zt),Hs=zs(Zt),ul=Xe(.42,0,1,1),dl=Xe(0,0,.58,1),Xs=Xe(.42,0,.58,1),fl=e=>Array.isArray(e)&&typeof e[0]!="number",Ys=e=>Array.isArray(e)&&typeof e[0]=="number",qs={linear:J,easeIn:ul,easeInOut:Xs,easeOut:dl,circIn:Zt,circInOut:Hs,circOut:Rs,backIn:qt,backInOut:Ks,backOut:Ws,anticipate:Gs},hl=e=>typeof e=="string",Jt=e=>{if(Ys(e)){ue(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return Xe(t,n,s,r)}else if(hl(e))return ue(qs[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),qs[e];return e},dt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ml(e,t){let n=new Set,s=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){i.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&r?n:s;return d&&i.add(u),p.has(u)||p.add(u),u},cancel:u=>{s.delete(u),i.delete(u)},process:u=>{if(a=u,r){o=!0;return}r=!0,[n,s]=[s,n],n.forEach(l),n.clear(),r=!1,o&&(o=!1,c.process(u))}};return c}const pl=40;function Zs(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=dt.reduce((w,E)=>(w[E]=ml(o),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:m,postRender:p}=i,y=()=>{const w=de.useManualTiming?r.timestamp:performance.now();n=!1,de.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(w-r.timestamp,pl),1)),r.timestamp=w,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),f.process(r),m.process(r),p.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(y))},b=()=>{n=!0,s=!0,r.isProcessing||e(y)};return{schedule:dt.reduce((w,E)=>{const V=i[E];return w[E]=(D,N=!1,x=!1)=>(n||b(),V.schedule(D,N,x)),w},{}),cancel:w=>{for(let E=0;E<dt.length;E++)i[dt[E]].cancel(w)},state:r,steps:i}}const{schedule:O,cancel:pe,state:K,steps:Qt}=Zs(typeof requestAnimationFrame<"u"?requestAnimationFrame:J,!0);let ft;function gl(){ft=void 0}const Y={now:()=>(ft===void 0&&Y.set(K.isProcessing||de.useManualTiming?K.timestamp:performance.now()),ft),set:e=>{ft=e,queueMicrotask(gl)}},Js=e=>t=>typeof t=="string"&&t.startsWith(e),Qs=Js("--"),yl=Js("var(--"),en=e=>yl(e)?bl.test(e.split("/*")[0].trim()):!1,bl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ne={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ye={...Ne,transform:e=>ce(0,1,e)},ht={...Ne,default:1},qe=e=>Math.round(e*1e5)/1e5,tn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xl(e){return e==null}const vl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,nn=(e,t)=>n=>!!(typeof n=="string"&&vl.test(n)&&n.startsWith(e)||t&&!xl(n)&&Object.prototype.hasOwnProperty.call(n,t)),er=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,o,i,a]=s.match(tn);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},wl=e=>ce(0,255,e),sn={...Ne,transform:e=>Math.round(wl(e))},ve={test:nn("rgb","red"),parse:er("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+sn.transform(e)+", "+sn.transform(t)+", "+sn.transform(n)+", "+qe(Ye.transform(s))+")"};function Tl(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const rn={test:nn("#"),parse:Tl,transform:ve.transform},Ze=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ge=Ze("deg"),ie=Ze("%"),M=Ze("px"),Sl=Ze("vh"),kl=Ze("vw"),tr={...ie,parse:e=>ie.parse(e)/100,transform:e=>ie.transform(e*100)},Le={test:nn("hsl","hue"),parse:er("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ie.transform(qe(t))+", "+ie.transform(qe(n))+", "+qe(Ye.transform(s))+")"},_={test:e=>ve.test(e)||rn.test(e)||Le.test(e),parse:e=>ve.test(e)?ve.parse(e):Le.test(e)?Le.parse(e):rn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ve.transform(e):Le.transform(e),getAnimatableNone:e=>{const t=_.parse(e);return t.alpha=0,_.transform(t)}},Cl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Al(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(tn))==null?void 0:t.length)||0)+(((n=e.match(Cl))==null?void 0:n.length)||0)>0}const nr="number",sr="color",Pl="var",Vl="var(",rr="${}",Ml=/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 Je(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const a=t.replace(Ml,l=>(_.test(l)?(s.color.push(o),r.push(sr),n.push(_.parse(l))):l.startsWith(Vl)?(s.var.push(o),r.push(Pl),n.push(l)):(s.number.push(o),r.push(nr),n.push(parseFloat(l))),++o,rr)).split(rr);return{values:n,split:a,indexes:s,types:r}}function ir(e){return Je(e).values}function or(e){const{split:t,types:n}=Je(e),s=t.length;return r=>{let o="";for(let i=0;i<s;i++)if(o+=t[i],r[i]!==void 0){const a=n[i];a===nr?o+=qe(r[i]):a===sr?o+=_.transform(r[i]):o+=r[i]}return o}}const Dl=e=>typeof e=="number"?0:_.test(e)?_.getAnimatableNone(e):e;function El(e){const t=ir(e);return or(e)(t.map(Dl))}const ye={test:Al,parse:ir,createTransformer:or,getAnimatableNone:El};function on(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Nl({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,o=0,i=0;if(!t)r=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=on(l,a,e+1/3),o=on(l,a,e),i=on(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:s}}function mt(e,t){return n=>n>0?t:e}const F=(e,t,n)=>e+(t-e)*n,an=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Ll=[rn,ve,Le],Il=e=>Ll.find(t=>t.test(e));function ar(e){const t=Il(e);if(Ee(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Le&&(n=Nl(n)),n}const lr=(e,t)=>{const n=ar(e),s=ar(t);if(!n||!s)return mt(e,t);const r={...n};return o=>(r.red=an(n.red,s.red,o),r.green=an(n.green,s.green,o),r.blue=an(n.blue,s.blue,o),r.alpha=F(n.alpha,s.alpha,o),ve.transform(r))},ln=new Set(["none","hidden"]);function Bl(e,t){return ln.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ol(e,t){return n=>F(e,t,n)}function cn(e){return typeof e=="number"?Ol:typeof e=="string"?en(e)?mt:_.test(e)?lr:_l:Array.isArray(e)?cr:typeof e=="object"?_.test(e)?lr:Fl:mt}function cr(e,t){const n=[...e],s=n.length,r=e.map((o,i)=>cn(o)(o,t[i]));return o=>{for(let i=0;i<s;i++)n[i]=r[i](o);return n}}function Fl(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=cn(e[r])(e[r],t[r]));return r=>{for(const o in s)n[o]=s[o](r);return n}}function jl(e,t){const n=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],i=e.indexes[o][s[o]],a=e.values[i]??0;n[r]=a,s[o]++}return n}const _l=(e,t)=>{const n=ye.createTransformer(t),s=Je(e),r=Je(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?ln.has(e)&&!r.values.length||ln.has(t)&&!s.values.length?Bl(e,t):Re(cr(jl(s,r),r.values),n):(Ee(!0,`Complex values '${e}' and '${t}' 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"),mt(e,t))};function ur(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?F(e,t,n):cn(e)(e,t)}const $l=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>O.update(t,n),stop:()=>pe(t),now:()=>K.isProcessing?K.timestamp:Y.now()}},dr=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)s+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},pt=2e4;function un(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<pt;)t+=n,s=e.next(t);return t>=pt?1/0:t}function zl(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(un(s),pt);return{type:"keyframes",ease:o=>s.next(r*o).value/t,duration:Q(r)}}const Ul=5;function fr(e,t,n){const s=Math.max(t-Ul,0);return js(n-e(s),t-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},dn=.001;function Wl({duration:e=j.duration,bounce:t=j.bounce,velocity:n=j.velocity,mass:s=j.mass}){let r,o;Ee(e<=te(j.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=ce(j.minDamping,j.maxDamping,i),e=ce(j.minDuration,j.maxDuration,Q(e)),i<1?(r=c=>{const u=c*i,d=u*e,f=u-n,m=fn(c,i),p=Math.exp(-d);return dn-f/m*p},o=c=>{const d=c*i*e,f=d*n+n,m=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),y=fn(Math.pow(c,2),i);return(-r(c)+dn>0?-1:1)*((f-m)*p)/y}):(r=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-dn+u*d},o=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=Gl(r,o,a);if(e=te(e),isNaN(l))return{stiffness:j.stiffness,damping:j.damping,duration:e};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:i*2*Math.sqrt(s*c),duration:e}}}const Kl=12;function Gl(e,t,n){let s=n;for(let r=1;r<Kl;r++)s=s-e(s)/t(s);return s}function fn(e,t){return e*Math.sqrt(1-t*t)}const Rl=["duration","bounce"],Hl=["stiffness","damping","mass"];function hr(e,t){return t.some(n=>e[n]!==void 0)}function Xl(e){let t={velocity:j.velocity,stiffness:j.stiffness,damping:j.damping,mass:j.mass,isResolvedFromDuration:!1,...e};if(!hr(e,Hl)&&hr(e,Rl))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,o=2*ce(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:j.mass,stiffness:r,damping:o}}else{const n=Wl(e);t={...t,...n,mass:j.mass},t.isResolvedFromDuration=!0}return t}function gt(e=j.visualDuration,t=j.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:m}=Xl({...n,velocity:-Q(n.velocity||0)}),p=f||0,y=c/(2*Math.sqrt(l*u)),b=i-o,v=Q(Math.sqrt(l/u)),k=Math.abs(b)<5;s||(s=k?j.restSpeed.granular:j.restSpeed.default),r||(r=k?j.restDelta.granular:j.restDelta.default);let w;if(y<1){const V=fn(v,y);w=D=>{const N=Math.exp(-y*v*D);return i-N*((p+y*v*b)/V*Math.sin(V*D)+b*Math.cos(V*D))}}else if(y===1)w=V=>i-Math.exp(-v*V)*(b+(p+v*b)*V);else{const V=v*Math.sqrt(y*y-1);w=D=>{const N=Math.exp(-y*v*D),x=Math.min(V*D,300);return i-N*((p+y*v*b)*Math.sinh(x)+V*b*Math.cosh(x))/V}}const E={calculatedDuration:m&&d||null,next:V=>{const D=w(V);if(m)a.done=V>=d;else{let N=V===0?p:0;y<1&&(N=V===0?te(p):fr(w,V,D));const x=Math.abs(N)<=s,I=Math.abs(i-D)<=r;a.done=x&&I}return a.value=a.done?i:D,a},toString:()=>{const V=Math.min(un(E),pt),D=dr(N=>E.next(V*N).value,V,30);return V+"ms "+D},toTransition:()=>{}};return E}gt.applyToOptions=e=>{const t=zl(e,100,gt);return e.ease=t.ease,e.duration=te(t.duration),e.type="keyframes",e};function hn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=x=>a!==void 0&&x<a||l!==void 0&&x>l,p=x=>a===void 0?l:l===void 0||Math.abs(a-x)<Math.abs(l-x)?a:l;let y=n*t;const b=d+y,v=i===void 0?b:i(b);v!==b&&(y=v-d);const k=x=>-y*Math.exp(-x/s),w=x=>v+k(x),E=x=>{const I=k(x),U=w(x);f.done=Math.abs(I)<=c,f.value=f.done?v:U};let V,D;const N=x=>{m(f.value)&&(V=x,D=gt({keyframes:[f.value,p(f.value)],velocity:fr(w,x,f.value),damping:r,stiffness:o,restDelta:c,restSpeed:u}))};return N(0),{calculatedDuration:null,next:x=>{let I=!1;return!D&&V===void 0&&(I=!0,E(x),N(x)),V!==void 0&&x>=V?D.next(x-V):(!I&&E(x),f)}}}function Yl(e,t,n){const s=[],r=n||de.mix||ur,o=e.length-1;for(let i=0;i<o;i++){let a=r(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||J:t;a=Re(l,a)}s.push(a)}return s}function ql(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(ue(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Yl(t,s,r),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=He(e[d],e[d+1],u);return a[d](f)};return n?u=>c(ce(e[0],e[o-1],u)):c}function Zl(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=He(0,t,s);e.push(F(n,1,r))}}function Jl(e){const t=[0];return Zl(t,e.length-1),t}function Ql(e,t){return e.map(n=>n*t)}function ec(e,t){return e.map(()=>t||Xs).splice(0,e.length-1)}function Ie({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=fl(s)?s.map(Jt):Jt(s),o={done:!1,value:t[0]},i=Ql(n&&n.length===t.length?n:Jl(t),e),a=ql(i,t,{ease:Array.isArray(r)?r:ec(t,r)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const tc=e=>e!==null;function mn(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter(tc),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const nc={decay:hn,inertia:hn,tween:Ie,keyframes:Ie,spring:gt};function mr(e){typeof e.type=="string"&&(e.type=nc[e.type])}class pn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const sc=e=>e/100;class gn extends pn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,r;const{motionValue:n}=this.options;n&&n.updatedAt!==Y.now()&&this.tick(Y.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;mr(t);const{type:n=Ie,repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const l=n||Ie;process.env.NODE_ENV!=="production"&&l!==Ie&&ue(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Ie&&typeof a[0]!="number"&&(this.mixKeyframes=Re(sc,ur(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=un(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:r,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:m,type:p,onUpdate:y,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?v<0:v>r;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let w=this.currentTime,E=s;if(d){const x=Math.min(this.currentTime,r)/a;let I=Math.floor(x),U=x%1;!U&&x>=1&&(U=1),U===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(f==="reverse"?(U=1-U,m&&(U-=m/a)):f==="mirror"&&(E=i)),w=ce(0,1,U)*a}const V=k?{done:!1,value:u[0]}:E.next(w);o&&(V.value=o(V.value));let{done:D}=V;!k&&l!==null&&(D=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return N&&p!==hn&&(V.value=mn(u,this.options,b,this.speed)),y&&y(V.value),N&&this.finish(),V}then(t,n){return this.finished.then(t,n)}get duration(){return Q(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Q(t)}get time(){return Q(this.currentTime)}set time(t){var n;t=te(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Y.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Q(this.currentTime))}play(){var r,o;if(this.isStopped)return;const{driver:t=$l,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(r=this.options).onPlay)==null||o.call(r);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(Y.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function rc(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const we=e=>e*180/Math.PI,yn=e=>{const t=we(Math.atan2(e[1],e[0]));return bn(t)},ic={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:yn,rotateZ:yn,skewX:e=>we(Math.atan(e[1])),skewY:e=>we(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},bn=e=>(e=e%360,e<0&&(e+=360),e),pr=yn,gr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),yr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),oc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gr,scaleY:yr,scale:e=>(gr(e)+yr(e))/2,rotateX:e=>bn(we(Math.atan2(e[6],e[5]))),rotateY:e=>bn(we(Math.atan2(-e[2],e[0]))),rotateZ:pr,rotate:pr,skewX:e=>we(Math.atan(e[4])),skewY:e=>we(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function xn(e){return e.includes("scale")?1:0}function vn(e,t){if(!e||e==="none")return xn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=oc,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=ic,r=a}if(!r)return xn(t);const o=s[t],i=r[1].split(",").map(lc);return typeof o=="function"?o(i):i[o]}const ac=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return vn(n,t)};function lc(e){return parseFloat(e.trim())}const Be=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Oe=new Set(Be),br=e=>e===Ne||e===M,cc=new Set(["x","y","z"]),uc=Be.filter(e=>!cc.has(e));function dc(e){const t=[];return uc.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Te={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>vn(t,"x"),y:(e,{transform:t})=>vn(t,"y")};Te.translateX=Te.x,Te.translateY=Te.y;const Se=new Set;let wn=!1,Tn=!1,Sn=!1;function xr(){if(Tn){const e=Array.from(Se).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=dc(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([o,i])=>{var a;(a=s.getValue(o))==null||a.set(i)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Tn=!1,wn=!1,Se.forEach(e=>e.complete(Sn)),Se.clear()}function vr(){Se.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Tn=!0)})}function fc(){Sn=!0,vr(),xr(),Sn=!1}class kn{constructor(t,n,s,r,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Se.add(this),wn||(wn=!0,O.read(vr),O.resolveKeyframes(xr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;if(t[0]===null){const o=r==null?void 0:r.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const a=s.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),r&&o===void 0&&r.set(t[0])}rc(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Se.delete(this)}cancel(){this.state==="scheduled"&&(Se.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const hc=e=>e.startsWith("--");function mc(e,t,n){hc(t)?e.style.setProperty(t,n):e.style[t]=n}const pc=Ht(()=>window.ScrollTimeline!==void 0),gc={};function yc(e,t){const n=Ht(e);return()=>gc[t]??n()}const wr=yc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qe=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Tr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qe([0,.65,.55,1]),circOut:Qe([.55,0,1,.45]),backIn:Qe([.31,.01,.66,-.59]),backOut:Qe([.33,1.53,.69,.99])};function Sr(e,t){if(e)return typeof e=="function"?wr()?dr(e,t):"ease-out":Ys(e)?Qe(e):Array.isArray(e)?e.map(n=>Sr(n,t)||Tr.easeOut):Tr[e]}function bc(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Sr(a,r);Array.isArray(d)&&(u.easing=d);const f={delay:s,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function kr(e){return typeof e=="function"&&"applyToOptions"in e}function xc({type:e,...t}){return kr(e)&&wr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class vc extends pn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:r,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,ue(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=xc(t);this.animation=bc(n,s,r,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=mn(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):mc(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 t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return Q(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Q(t)}get time(){return Q(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=te(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&pc()?(this.animation.timeline=t,J):n(this)}}const Cr={anticipate:Gs,backInOut:Ks,circInOut:Hs};function wc(e){return e in Cr}function Tc(e){typeof e.ease=="string"&&wc(e.ease)&&(e.ease=Cr[e.ease])}const Ar=10;class Sc extends vc{constructor(t){Tc(t),mr(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:r,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new gn({...i,autoplay:!1}),l=te(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Ar).value,a.sample(l).value,Ar),a.stop()}}const Pr=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ye.test(e)||e==="0")&&!e.startsWith("url("));function kc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Cc(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=Pr(r,t),a=Pr(o,t);return Ee(i===a,`You are trying to animate ${t} from "${r}" to "${o}". "${i?o:r}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:kc(e)||(n==="spring"||kr(n))&&s}function Cn(e){e.duration=0,e.type="keyframes"}const Ac=new Set(["opacity","clipPath","filter","transform"]),Pc=Ht(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Vc(e){var u;const{motionValue:t,name:n,repeatDelay:s,repeatType:r,damping:o,type:i}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Pc()&&n&&Ac.has(n)&&(n!=="transform"||!c)&&!l&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const Mc=40;class Dc extends pn{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var p;super(),this.stop=()=>{var y,b;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Y.now();const f={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:i,name:l,motionValue:c,element:u,...d},m=(u==null?void 0:u.KeyframeResolver)||kn;this.keyframeResolver=new m(a,(y,b,v)=>this.onKeyframesResolved(y,b,f,!v),l,c,u),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,s,r){this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=Y.now(),Cc(t,o,i,a)||((de.instantAnimations||!l)&&(u==null||u(mn(t,s,n))),t[0]=t[t.length-1],Cn(s),s.repeat=0);const f={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>Mc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},m=!c&&Vc(f)?new Sc({...f,element:f.motionValue.owner.current}):new gn(f);m.finished.then(()=>this.notifyFinished()).catch(J),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),fc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Ec=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Nc(e){const t=Ec.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Lc=4;function Vr(e,t,n=1){ue(n<=Lc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=Nc(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return Bs(i)?parseFloat(i):i}return en(r)?Vr(r,t,n+1):r}function An(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Mr=new Set(["width","height","top","left","right","bottom",...Be]),Ic={test:e=>e==="auto",parse:e=>e},Dr=e=>t=>t.test(e),Er=[Ne,M,ie,ge,kl,Sl,Ic],Nr=e=>Er.find(Dr(e));function Bc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Fs(e):!0}const Oc=new Set(["brightness","contrast","saturate","opacity"]);function Fc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(tn)||[];if(!s)return e;const r=n.replace(s,"");let o=Oc.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const jc=/\b([a-z-]*)\(.*?\)/gu,Pn={...ye,getAnimatableNone:e=>{const t=e.match(jc);return t?t.map(Fc).join(" "):e}},Lr={...Ne,transform:Math.round},Vn={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,...{rotate:ge,rotateX:ge,rotateY:ge,rotateZ:ge,scale:ht,scaleX:ht,scaleY:ht,scaleZ:ht,skew:ge,skewX:ge,skewY:ge,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:Ye,originX:tr,originY:tr,originZ:M},zIndex:Lr,fillOpacity:Ye,strokeOpacity:Ye,numOctaves:Lr},_c={...Vn,color:_,backgroundColor:_,outlineColor:_,fill:_,stroke:_,borderColor:_,borderTopColor:_,borderRightColor:_,borderBottomColor:_,borderLeftColor:_,filter:Pn,WebkitFilter:Pn},Ir=e=>_c[e];function Br(e,t){let n=Ir(e);return n!==Pn&&(n=ye),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $c=new Set(["auto","none","0"]);function zc(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!$c.has(o)&&Je(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Br(n,r)}class Uc extends kn{constructor(t,n,s,r,o){super(t,n,s,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),en(c))){const u=Vr(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Mr.has(s)||t.length!==2)return;const[r,o]=t,i=Nr(r),a=Nr(o);if(i!==a)if(br(i)&&br(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Te[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||Bc(t[r]))&&s.push(r);s.length&&zc(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Te[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=s.length-1,i=s[o];s[o]=Te[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Wc(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const r=(n==null?void 0:n[e])??s.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const Or=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Fr(e){return Os(e)&&"offsetHeight"in e}const jr=30,Kc=e=>!isNaN(parseFloat(e));class Gc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const r=Y.now();if(this.updatedAt!==r&&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 i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Y.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Kc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Yt(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Xt);const s=this.events[t].add(n);return t==="change"?()=>{s(),O.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Y.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>jr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,jr);return js(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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 t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fe(e,t){return new Gc(e,t)}const{schedule:Mn}=Zs(queueMicrotask,!1),ne={x:!1,y:!1};function _r(){return ne.x||ne.y}function Rc(e){return e==="x"||e==="y"?ne[e]?null:(ne[e]=!0,()=>{ne[e]=!1}):ne.x||ne.y?null:(ne.x=ne.y=!0,()=>{ne.x=ne.y=!1})}function $r(e,t){const n=Wc(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function zr(e){return!(e.pointerType==="touch"||_r())}function Hc(e,t,n={}){const[s,r,o]=$r(e,n),i=a=>{if(!zr(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{zr(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,r)};return s.forEach(a=>{a.addEventListener("pointerenter",i,r)}),o}const Ur=(e,t)=>t?e===t?!0:Ur(e,t.parentElement):!1,Dn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Xc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Yc(e){return Xc.has(e.tagName)||e.tabIndex!==-1}const yt=new WeakSet;function Wr(e){return t=>{t.key==="Enter"&&e(t)}}function En(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const qc=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Wr(()=>{if(yt.has(n))return;En(n,"down");const r=Wr(()=>{En(n,"up")}),o=()=>En(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Kr(e){return Dn(e)&&!_r()}function Zc(e,t,n={}){const[s,r,o]=$r(e,n),i=a=>{const l=a.currentTarget;if(!Kr(a))return;yt.add(l);const c=t(l,a),u=(m,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),yt.has(l)&&yt.delete(l),Kr(m)&&typeof c=="function"&&c(m,{success:p})},d=m=>{u(m,l===window||l===document||n.useGlobalTarget||Ur(l,m.target))},f=m=>{u(m,!1)};window.addEventListener("pointerup",d,r),window.addEventListener("pointercancel",f,r)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,r),Fr(a)&&(a.addEventListener("focus",c=>qc(c,r)),!Yc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Gr(e){return Os(e)&&"ownerSVGElement"in e}function Jc(e){return Gr(e)&&e.tagName==="svg"}function Qc(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function Rr(e=.1,{startDelay:t=0,from:n=0,ease:s}={}){return(r,o)=>{const i=typeof n=="number"?n:Qc(n,o),a=Math.abs(i-r);let l=e*a;if(s){const c=o*e;l=Jt(s)(l/c)*c}return t+l}}const G=e=>!!(e&&e.getVelocity),eu=[...Er,_,ye],tu=e=>eu.find(Dr(e)),Nn=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Hr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nu(...e){return t=>{let n=!1;const s=e.map(r=>{const o=Hr(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<s.length;r++){const o=s[r];typeof o=="function"?o():Hr(e[r],null)}}}}function su(...e){return ot.useCallback(nu(...e),e)}class ru extends ot.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=n.offsetParent,r=Fr(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=r-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function iu({children:e,isPresent:t,anchorX:n,root:s}){const r=g.useId(),o=g.useRef(null),i=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=g.useContext(Nn),l=su(o,e==null?void 0:e.ref);return g.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:m}=i.current;if(t||!o.current||!c||!u)return;const p=n==="left"?`left: ${f}`:`right: ${m}`;o.current.dataset.motionPopId=r;const y=document.createElement("style");a&&(y.nonce=a);const b=s??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
87
+ [data-motion-pop-id="${r}"] {
78
88
  position: absolute !important;
79
89
  width: ${c}px !important;
80
90
  height: ${u}px !important;
81
91
  ${p}px !important;
82
92
  top: ${d}px !important;
83
93
  }
84
- `),()=>{b.contains(g)&&b.removeChild(g)}},[e]),m.jsx(Kc,{isPresent:e,childRef:o,sizeRef:r,children:re.cloneElement(t,{ref:l})})}const Xc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const c=_e(Yc),u=y.useId();let d=!0,f=y.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}),y.useMemo(()=>{c.forEach((h,p)=>c.set(p,!1))},[n]),re.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),r==="popLayout"&&(t=m.jsx(Hc,{isPresent:n,anchorX:a,root:l,children:t})),m.jsx(ue.Provider,{value:f,children:t})};function Yc(){return new Map}function Ki(t=!0){const e=y.useContext(ue);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=y.useId();y.useEffect(()=>{if(t)return i(o)},[t]);const r=y.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const be=t=>t.key||"";function Hi(t){const e=[];return y.Children.forEach(t,n=>{y.isValidElement(n)&&e.push(n)}),e}const xe=({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=y.useMemo(()=>Hi(t),[t]),f=r&&!c?[]:d.map(be),h=y.useRef(!0),p=y.useRef(d),g=_e(()=>new Map),[b,v]=y.useState(d),[T,w]=y.useState(d);Ls(()=>{h.current=!1,p.current=d;for(let D=0;D<T.length;D++){const L=be(T[D]);f.includes(L)?g.delete(L):g.get(L)!==!0&&g.set(L,!1)}},[T,f.length,f.join("-")]);const E=[];if(d!==b){let D=[...d];for(let L=0;L<T.length;L++){const x=T[L],N=be(x);f.includes(N)||(D.splice(L,0,x),E.push(x))}return o==="wait"&&E.length&&(D=E),w(Hi(D)),v(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}=y.useContext($e);return m.jsx(m.Fragment,{children:T.map(D=>{const L=be(D),x=r&&!c?!1:d===T||f.includes(L),N=()=>{if(g.has(L))g.set(L,!0);else return;let U=!0;g.forEach(it=>{it||(U=!1)}),U&&(A==null||A(),w(p.current),r&&(u==null||u()),s&&s())};return m.jsx(Xc,{isPresent:x,initial:!h.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:x?void 0:N,anchorX:a,children:D},L)})})},Xi=y.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"]},jt={};for(const t in Yi)jt[t]={isEnabled:e=>Yi[t].some(n=>!!e[n])};function qc(t){for(const e in t)jt[e]={...jt[e],...t[e]}}const Zc=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")||Zc.has(t)}let qi=t=>!ve(t);function Jc(t){typeof t=="function"&&(qi=e=>e.startsWith("on")?!ve(e):t(e))}try{Jc(require("@emotion/is-prop-valid").default)}catch{}function Qc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(qi(i)||n===!0&&ve(i)||!e&&!ve(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const we=y.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 tu(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 eu(t){const{initial:e,animate:n}=tu(t,y.useContext(we));return y.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(M.test(t))t=parseFloat(t);else return t;const n=Qi(t,e.target.x),s=Qi(t,e.target.y);return`${n}% ${s}%`}},nu={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=j(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:nu};function tr(t,{layout:e,layoutId:n}){return Bt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Nn[t]||t==="opacity")}const su={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},iu=Nt.length;function ru(t,e,n){let s="",i=!0;for(let o=0;o<iu;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,Pn[r]);if(!l){i=!1;const u=su[r]||r;s+=`${u}(${c}) `}n&&(e[r]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Bn(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(Bt.has(l)){r=!0;continue}else if(Zs(l)){i[l]=c;continue}else{const u=Ni(c,Pn[l]);l.startsWith("origin")?(a=!0,o[l]=u):s[l]=u}}if(e.transform||(r||n?s.transform=ru(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 Fn=()=>({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 ou({transformTemplate:t},e){return y.useMemo(()=>{const n=Fn();return Bn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function au(t,e){const n=t.style||{},s={};return er(s,n,t),Object.assign(s,ou(t,e)),s}function lu(t,e){const n={},s=au(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 cu={offset:"stroke-dashoffset",array:"stroke-dasharray"},uu={offset:"strokeDashoffset",array:"strokeDasharray"};function du(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?cu:uu;t[o.offset]=M.transform(-s);const r=M.transform(e),a=M.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(Bn(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&&du(d,i,o,r,!1)}const sr=()=>({...Fn(),attrs:{}}),ir=t=>typeof t=="string"&&t.toLowerCase()==="svg";function fu(t,e,n,s){const i=y.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 hu=["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 jn(t){return typeof t!="string"||t.includes("-")?!1:!!(hu.indexOf(t)>-1||/[A-Z]/u.test(t))}function mu(t,e,n,{latestValues:s},i,o=!1){const a=(jn(t)?fu:lu)(e,s,i,t),l=Qc(e,typeof t=="string",o),c=t!==y.Fragment?{...l,...a,ref:n}:{},{children:u}=e,d=y.useMemo(()=>G(u)?u.get():u,[u]);return y.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 On(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 ke(t){return G(t)?t.get():t}function pu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:gu(n,s,i,t),renderState:e()}}function gu(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=ke(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=On(t,f[h]);if(p){const{transitionEnd:g,transition:b,...v}=p;for(const T in v){let w=v[T];if(Array.isArray(w)){const E=u?w.length-1:0;w=w[E]}w!==null&&(i[T]=w)}for(const T in g)i[T]=g[T]}}}return i}const or=t=>(e,n)=>{const s=y.useContext(we),i=y.useContext(ue),o=()=>pu(t,e,s,i);return n?o():_e(o)};function zn(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 yu=or({scrapeMotionValuesFromProps:zn,createRenderState:Fn});function ar(t,e,n){const s=zn(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 bu=or({scrapeMotionValuesFromProps:ar,createRenderState:sr}),xu=Symbol.for("motionComponentSymbol");function Ot(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function vu(t,e,n){return y.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Ot(n)&&(n.current=s))},[e])}const $n=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lr="data-"+$n("framerAppearId"),cr=y.createContext({});function wu(t,e,n,s,i){var g,b;const{visualElement:o}=y.useContext(we),r=y.useContext(Xi),a=y.useContext(ue),l=y.useContext(En).reducedMotion,c=y.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=y.useContext(cr);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&Tu(c.current,n,i,d);const f=y.useRef(!1);y.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[lr],p=y.useRef(!!h&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Ls(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),p.current&&u.animationState&&u.animationState.animateChanges())}),y.useEffect(()=>{u&&(!p.current&&u.animationState&&u.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,h)}),p.current=!1),u.enteringChildren=void 0)}),u}function Tu(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&&Ot(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=jn(t)?bu:yu;function o(a,l){let c;const u={...y.useContext(En),...a,layoutId:Su(a)},{isStatic:d}=u,f=eu(a),h=i(a,d);if(!d&&Ue){ku(u,n);const p=Cu(u);c=p.MeasureLayout,f.visualElement=wu(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,mu(t,a,vu(h,f.visualElement,l),h,d,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=y.forwardRef(o);return r[xu]=t,r}function Su({layoutId:t}){const e=y.useContext($e).id;return e&&t!==void 0?e+"-"+t:t}function ku(t,e){const n=y.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"):ut(!1,s,"lazy-strict-mode")}}function Cu(t){const{drag:e,layout:n}=jt;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 Au(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"&&Xe(!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 Pu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Vu(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 Un(t){return t===void 0||t===1}function Rn({scale:t,scaleX:e,scaleY:n}){return!Un(t)||!Un(e)||!Un(n)}function kt(t){return Rn(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 Ce(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=Ce(t,i,s)),Ce(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 Mu(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&&$t(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&&kt(o.latestValues)&&$t(t,o.latestValues))}e.x<yr&&e.x>gr&&(e.x=1),e.y<yr&&e.y>gr&&(e.y=1)}function zt(t,e){t.min=t.min+e,t.max=t.max+e}function br(t,e,n,s,i=.5){const o=j(t.min,t.max,i);Wn(t,e,n,o,s)}function $t(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 xr(t,e){return dr(Vu(t.getBoundingClientRect(),e))}function Du(t,e,n){const s=xr(t,n),{scroll:i}=e;return i&&(zt(s.x,i.offset.x),zt(s.y,i.offset.y)),s}const vr=()=>({translate:0,scale:1,origin:0,originPoint:0}),_t=()=>({x:vr(),y:vr()}),wr=()=>({min:0,max:0}),_=()=>({x:wr(),y:wr()}),Gn={current:null},Tr={current:!1};function Eu(){if(Tr.current=!0,!!Ue)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 Lu=new WeakMap;function Iu(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,Ft(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,Ft(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 Nu{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=Sn,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=Y.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,F.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,Lu.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||Eu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Gn.current,process.env.NODE_ENV!=="production"&&Xe(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=Bt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&F.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 jt){const n=jt[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=Iu(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=Ft(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)||Bs(s))?s=parseFloat(s):!Rc(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=On(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 He),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Vn.render(this.render)}}class kr extends Nu{constructor(){super(...arguments),this.KeyframeResolver=Dc}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 Cr(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 Bu(t){return window.getComputedStyle(t)}class Fu extends kr{constructor(){super(...arguments),this.type="html",this.renderInstance=Cr}readValueFromInstance(e,n){var s;if(Bt.has(n))return(s=this.projection)!=null&&s.isProjecting?bn(n):Yl(e,n);{const i=Bu(e),o=(Zs(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return xr(e,n)}build(e,n,s){Bn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return zn(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 ju(t,e,n,s){Cr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ar.has(i)?i:$n(i),e.attrs[i])}class Ou extends kr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Bt.has(n)){const s=Li(n);return s&&s.default||0}return n=Ar.has(n)?n:$n(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){ju(e,n,s,i)}mount(e){this.isSVGTag=ir(e.tagName),super.mount(e)}}const zu=(t,e)=>jn(t)?new Ou(e):new Fu(e,{allowProjection:t!==y.Fragment});function Ut(t,e,n){const s=t.getProps();return On(s,e,n!==void 0?n:s.custom,t)}const Kn=t=>Array.isArray(t);function $u(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ft(n))}function _u(t){return Kn(t)?t[t.length-1]||0:t}function Uu(t,e){const n=Ut(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=_u(o[r]);$u(t,r,a)}}function Ru(t){return!!(G(t)&&t.add)}function Hn(t,e){const n=t.getValue("willChange");if(Ru(n))return n.add(e);if(!n&&dt.WillChange){const s=new dt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Pr(t){return t.props[lr]}const Wu=t=>t!==null;function Gu(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Wu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Ku={type:"spring",stiffness:500,damping:25,restSpeed:10},Hu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Xu={type:"keyframes",duration:.8},Yu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qu=(t,{keyframes:e})=>e.length>2?Xu:Bt.has(t)?t.startsWith("scale")?Hu(e[1]):Ku:Yu;function Zu({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-et(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};Zu(a)||Object.assign(u,qu(t,u)),u.duration&&(u.duration=et(u.duration)),u.repeatDelay&&(u.repeatDelay=et(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(kn(u),u.delay===0&&(d=!0)),(dt.instantAnimations||dt.skipAnimations)&&(d=!0,kn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&e.get()!==void 0){const f=Gu(u.keyframes,a);if(f!==void 0){F.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new pn(u):new bc(u)};function Ju({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&&Ju(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 v=Pr(t);if(v){const T=window.MotionHandoffAnimation(v,u,F);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 b=d.animation;b&&l.push(b)}return r&&Promise.all(l).then(()=>{F.update(()=>{r&&Uu(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=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(Vr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return Qu(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 Qu(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 td(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"?Ut(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 ed=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<ed;n++){const s=In[n],i=t.props[s];(Qt(i)||i===!1)&&(e[s]=i)}return e}const nd=[...Ln].reverse(),sd=Ln.length;function id(t){return e=>Promise.all(e.map(({animation:n,options:s})=>td(t,n,s)))}function rd(t){let e=id(t),n=Lr(),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: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 b=0;b<sd;b++){const v=nd[b],T=n[v],w=c[v]!==void 0?c[v]:u[v],E=Qt(w),A=v===l?T.isActive:null;A===!1&&(p=b);let D=w===u[v]&&w!==c[v]&&E;if(D&&s&&t.manuallyAnimateOnMount&&(D=!1),T.protectedKeys={...h},!T.isActive&&A===null||!w&&!T.prevProp||Te(w)||typeof w=="boolean")continue;const L=od(T.prevProp,w);let x=L||v===l&&T.isActive&&!D&&E||b>p&&E,N=!1;const U=Array.isArray(w)?w:[w];let it=U.reduce(i(v),{});A===!1&&(it={});const{prevResolvedValues:At={}}=T,De={...At,...it},Rt=B=>{x=!0,f.has(B)&&(N=!0,f.delete(B)),T.needsAnimating[B]=!0;const C=t.getValue(B);C&&(C.liveStyle=!1)};for(const B in De){const C=it[B],at=At[B];if(h.hasOwnProperty(B))continue;let ht=!1;Kn(C)&&Kn(at)?ht=!Dr(C,at):ht=C!==at,ht?C!=null?Rt(B):f.add(B):C!==void 0&&f.has(B)?Rt(B):T.protectedKeys[B]=!0}T.prevProp=w,T.prevResolvedValues=it,T.isActive&&(h={...h,...it}),s&&t.blockInitialAnimation&&(x=!1);const ft=D&&L;x&&(!ft||N)&&d.push(...U.map(B=>{const C={type:v};if(typeof B=="string"&&s&&!ft&&t.manuallyAnimateOnMount&&t.parent){const{parent:at}=t,ht=Ut(at,B);if(at.enteringChildren&&ht){const{delayChildren:Ee}=ht.transition||{};C.delay=Mr(at.enteringChildren,t,Ee)}}return{animation:B,options:C}}))}if(f.size){const b={};if(typeof c.initial!="boolean"){const v=Ut(t,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(b.transition=v.transition)}f.forEach(v=>{const T=t.getBaseTarget(v),w=t.getValue(v);w&&(w.liveStyle=!0),b[v]=T??null}),d.push({animation:b})}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 od(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Dr(e,t):!1}function Ct(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lr(){return{animate:Ct(!0),whileInView:Ct(),whileHover:Ct(),whileTap:Ct(),whileDrag:Ct(),whileFocus:Ct(),exit:Ct()}}class bt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class ad extends bt{constructor(e){super(e),e.animationState||(e.animationState=rd(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 ld=0;class cd extends bt{constructor(){super(...arguments),this.id=ld++}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 ud={animation:{Feature:ad},exit:{Feature:cd}};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 dd=t=>e=>Mn(e)&&t(e,ne(e));function se(t,e,n,s){return ee(t,e,dd(n),s)}const Ir=1e-4,fd=1-Ir,hd=1+Ir,Nr=.01,md=0-Nr,pd=0+Nr;function K(t){return t.max-t.min}function gd(t,e,n){return Math.abs(t-e)<=n}function Br(t,e,n,s=.5){t.origin=s,t.originPoint=j(e.min,e.max,t.origin),t.scale=K(n)/K(e),t.translate=j(n.min,n.max,t.origin)-t.originPoint,(t.scale>=fd&&t.scale<=hd||isNaN(t.scale))&&(t.scale=1),(t.translate>=md&&t.translate<=pd||isNaN(t.translate))&&(t.translate=0)}function ie(t,e,n,s){Br(t.x,e.x,n.x,s?s.originX:void 0),Br(t.y,e.y,n.y,s?s.originY:void 0)}function Fr(t,e,n){t.min=n.min+e.min,t.max=t.min+K(e)}function yd(t,e,n){Fr(t.x,e.x,n.x),Fr(t.y,e.y,n.y)}function jr(t,e,n){t.min=e.min-n.min,t.max=t.min+K(e)}function Ae(t,e,n){jr(t.x,e.x,n.x),jr(t.y,e.y,n.y)}function Q(t){return[t("x"),t("y")]}const Or=({current:t})=>t?t.ownerDocument.defaultView:null,zr=(t,e)=>Math.abs(t-e);function bd(t,e){const n=zr(t.x,e.x),s=zr(t.y,e.y);return Math.sqrt(n**2+s**2)}class $r{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=bd(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:g}=f,{timestamp:b}=W;this.history.push({...g,timestamp:b});const{onStart:v,onMove:T}=this.handlers;h||(v&&v(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),F.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Zn(f.type==="pointercancel"?this.lastMoveEventInfo:qn(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,v),g&&g(f,v)},!Mn(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,Ur(e)),offset:_r(t,xd(e)),velocity:vd(e,.1)}}function xd(t){return t[0]}function Ur(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=Ur(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>et(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 wd(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?j(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?j(n,t,s.max):Math.min(t,n)),t}function Rr(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 Td(t,{top:e,left:n,bottom:s,right:i}){return{x:Rr(t.x,n,i),y:Rr(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 Sd(t,e){return{x:Wr(t.x,e.x),y:Wr(t.y,e.y)}}function kd(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)),ct(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 Jn=.35;function Ad(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 Pd=new WeakMap;class Vd{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=Nc(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(v=>{let T=this.getAxisMotionValue(v).get()||0;if(rt.test(T)){const{projection:w}=this.visualElement;if(w&&w.layout){const E=w.layout.layoutBox[v];E&&(T=K(E)*(parseFloat(T)/100))}}this.originPoint[v]=T}),g&&F.postRender(()=>g(d,f)),Hn(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:b}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=Md(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),b&&b(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 $r(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:Or(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&&F.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=wd(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&&Ot(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Td(s.layoutBox,e):this.constraints=!1,this.elastic=Ad(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Q(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||!Ot(e))return!1;const s=e.current;ut(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=Du(s,i.root,this.visualElement.getTransformPagePoint());let r=Sd(i.layout.layoutBox,o);if(n){const a=n(Pu(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]-j(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ot(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]=kd({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(j(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;Pd.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();Ot(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()),F.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 Md(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Dd extends bt{constructor(e){super(e),this.removeGroupControls=Z,this.removeListeners=Z,this.controls=new Vd(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&&F.postRender(()=>t(e,n))};class Ed extends bt{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(e){this.session=new $r(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Or(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&&F.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 Ld extends y.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()||F.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Vn.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=y.useContext($e);return m.jsx(Ld,{...t,layoutGroup:s,switchLayoutGroup:y.useContext(cr),isPresent:e,safeToRemove:n})}function Id(t,e,n){const s=G(t)?t:Ft(t);return s.start(Xn("",s,e,n)),s.animation}const Nd=(t,e)=>t.depth-e.depth;class Bd{constructor(){this.children=[],this.isDirty=!1}add(e){Re(this.children,e),this.isDirty=!0}remove(e){We(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Nd),this.isDirty=!1,this.children.forEach(e)}}function Fd(t,e){const n=Y.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(pt(s),t(o-e))};return F.setup(s,!0),()=>pt(s)}const Yr=["TopLeft","TopRight","BottomLeft","BottomRight"],jd=Yr.length,qr=t=>typeof t=="string"?parseFloat(t):t,Zr=t=>typeof t=="number"||M.test(t);function Od(t,e,n,s,i,o){i?(t.opacity=j(0,n.opacity??1,zd(s)),t.opacityExit=j(e.opacity??1,0,$d(s))):o&&(t.opacity=j(e.opacity??1,n.opacity??1,s));for(let r=0;r<jd;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(j(qr(l),qr(c),s),0),(rt.test(c)||rt.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=j(e.rotate||0,n.rotate||0,s))}function Jr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const zd=Qr(0,.5,Ws),$d=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 st(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=Ce(t,1/n,s),i!==void 0&&(t=Ce(t,1/i,s)),t}function _d(t,e=0,n=1,s=.5,i,o=t,r=t){if(rt.test(e)&&(e=parseFloat(e),e=j(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=j(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){_d(t,e[n],e[s],e[i],e.scale,o,r)}const Ud=["x","scaleX","originX"],Rd=["y","scaleY","originY"];function io(t,e,n,s){so(t.x,e,Ud,n?n.x:void 0,s?s.x:void 0),so(t.y,e,Rd,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 Wd(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 Gd{constructor(){this.members=[]}add(e){Re(this.members,e),e.scheduleRender()}remove(e){if(We(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: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"],Hd=1e3;let Xd=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",F,!(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=Xd++,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(Zd),this.nodes.forEach(ef),this.nodes.forEach(nf),this.nodes.forEach(Jd)},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 Bd)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new He),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=Ri(r)&&!$c(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;F.read(()=>{d=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=Fd(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()||lf,{onLayoutAnimationStart:g,onLayoutAnimationComplete:b}=c.getProps(),v=!this.targetLayout||!co(this.targetLayout,h),T=!d&&f;if(this.options.layoutRoot||this.resumeFrom||T||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Cn(p,"layout"),onPlay:g,onComplete:b};(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(sf),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(tf),this.nodes.forEach(Yd),this.nodes.forEach(qd)):this.nodes.forEach(go),this.clearAllSnapshots();const a=Y.now();W.delta=ct(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,Je.update.process(W),Je.preRender.process(W),Je.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Qd),this.sharedNodes.forEach(rf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,F.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){F.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||kt(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)),cf(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(uf))){const{scroll:u}=this.root;u&&(zt(a.x,u.offset.x),zt(a.y,u.offset.y))}return a}removeElementScroll(r){var l;const a=_();if(st(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&&st(a,r),zt(a.x,d.offset.x),zt(a.y,d.offset.y))}return a}applyTransform(r,a=!1){const l=_();st(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&&$t(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),kt(u.latestValues)&&$t(l,u.latestValues)}return kt(this.latestValues)&&$t(l,this.latestValues),l}removeTransform(r){const a=_();st(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!kt(c.latestValues))continue;Rn(c.latestValues)&&c.updateSnapshot();const u=_(),d=c.measurePageBox();st(u,d),io(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return kt(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(),yd(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):st(this.target,this.layout.layoutBox),pr(this.target,this.targetDelta)):st(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||Rn(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),st(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;st(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Mu(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,b=this.getStack(),v=!b||b.members.length<=1,T=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(af));this.animationProgress=0;let w;this.mixTargetDelta=E=>{const A=E/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),of(this.relativeTarget,this.relativeTargetOrigin,f,A),w&&Wd(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=_()),st(w,this.relativeTarget)),g&&(this.animationValues=u,Od(u,c,this.latestValues,A,T,v)),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=F.update(()=>{Ve.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ft(0)),this.currentAnimation=Id(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(Hd),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}st(a,l),$t(a,u),ie(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Gd),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=ke(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=ke(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!kt(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 p in Nn){if(u[p]===void 0)continue;const{correct:g,applyTo:b,isCSSVariable:v}=Nn[p],T=d==="none"?u[p]:g(u[p],c);if(b){const w=b.length;for(let E=0;E<w;E++)r[b[E]]=T}else v?this.options.visualElement.renderState.vars[p]=T:r[p]=T}this.options.layoutId&&(r.pointerEvents=c===this?ke(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 Yd(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 Zd(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 Jd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Qd(t){t.clearSnapshot()}function po(t){t.clearMeasurements()}function go(t){t.isLayoutDirty=!1}function tf(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 ef(t){t.resolveTargetDelta()}function nf(t){t.calcProjection()}function sf(t){t.resetSkewAndRotation()}function rf(t){t.removeLeadSnapshot()}function bo(t,e,n){t.translate=j(e.translate,0,n),t.scale=j(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function xo(t,e,n,s){t.min=j(e.min,n.min,s),t.max=j(e.max,n.max,s)}function of(t,e,n,s){xo(t.x,e.x,n.x,s),xo(t.y,e.y,n.y,s)}function af(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const lf={duration:.45,ease:[.4,0,.1,1]},vo=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),wo=vo("applewebkit/")&&!vo("chrome/")?Math.round:Z;function To(t){t.min=wo(t.min),t.max=wo(t.max)}function cf(t){To(t.x),To(t.y)}function So(t,e,n){return t==="position"||t==="preserve-aspect"&&!gd(uo(e),uo(n),.2)}function uf(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const df=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},ko=mo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ns.current){const t=new df({});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"}),ff={pan:{Feature:Ed},drag:{Feature:Dd,ProjectionNode:ko,MeasureLayout:Xr}};function Co(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&&F.postRender(()=>o(e,ne(e)))}class hf extends bt{mount(){const{current:e}=this.node;e&&(this.unmount=Bc(e,(n,s)=>(Co(this.node,s,"Start"),i=>Co(this.node,i,"End"))))}unmount(){}}class mf 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&&F.postRender(()=>o(e,ne(e)))}class pf extends bt{mount(){const{current:e}=this.node;e&&(this.unmount=zc(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,gf=t=>{const e=ss.get(t.target);e&&e(t)},yf=t=>{t.forEach(gf)};function bf({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(yf,{root:t,...e})),s[i]}function xf(t,e,n){const s=bf(e);return ss.set(t,n),s.observe(t),()=>{ss.delete(t),s.unobserve(t)}}const vf={some:0,all:1};class wf 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: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 xf(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(Tf(e,n))&&this.startObserver()}unmount(){}}function Tf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Sf={...ud,...{inView:{Feature:wf},tap:{Feature:pf},focus:{Feature:mf},hover:{Feature:hf}},...ff,...{layout:{ProjectionNode:ko,MeasureLayout:Xr}}},H=Au(Sf,zu);function kf({children:t,className:e,...n}){return m.jsx("nav",{"aria-label":"Breadcrumb",className:V("w-full",e),...n,children:t})}function Cf({children:t,className:e,...n}){return m.jsx("ol",{className:V("flex flex-row gap-2 items-center justify-start",e),...n,children:t})}function Af({children:t,className:e,...n}){return m.jsx("li",{className:V("inline-flex items-center text-nowrap gap-1",e),...n,children:t})}function Pf({children:t,className:e,current:n,...s}){return n?m.jsx("span",{"aria-current":"page",className:V("text-sm text-text",e),children:t}):m.jsx("a",{className:V("text-sm text-text-secondary hover:text-text",e),...s,children:t})}function Vf({children:t,className:e,text:n,...s}){const[i,o]=y.useState(!1),r=y.useRef(null);y.useEffect(()=>{function l(u){!i||!r.current||r.current.contains(u.target)||o(!1)}document.addEventListener("mousedown",l);function c(u){u.key==="Escape"&&o(!1)}return document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c)}},[i]);function a(){o(l=>!l)}return m.jsxs("li",{className:"flex flex-col gap-1 relative",ref:r,children:[m.jsxs("button",{"aria-expanded":i,"aria-haspopup":"true","aria-label":"More options",className:V("flex flex-row gap-1 items-center justify-center rounded-md text-sm text-text-secondary px-2 hover:bg-surface-secondary hover:text-text transition-colors",e),onClick:a,...s,children:[n||m.jsx(Yo,{}),m.jsx(H.span,{animate:{rotate:i?180:0},children:m.jsx(Ko,{})})]}),m.jsx(xe,{children:i&&m.jsx(H.div,{animate:{opacity:1,scale:1,y:0},className:"absolute left-0 top-full mt-1 z-50 flex flex-col gap-1 rounded-md border border-border-subtle bg-surface px-2 py-1 shadow-md",exit:{opacity:0,scale:.95,y:-5},initial:{opacity:0,scale:.95,y:-5},transition:{duration:.1},children:t})})]})}function Mf({className:t,icon:e,...n}){return m.jsx("li",{"aria-hidden":"true",className:V("text-text-secondary",t),role:"presentation",...n,children:e??m.jsx(Qo,{className:"size-4"})})}const Df=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:V("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 Po({children:t,className:e,ref:n,variant:s,...i}){return m.jsx("button",{className:V(Df({variant:s}),e),ref:n,...i,children:t})}function Ef({children:t,className:e,ref:n,...s}){return m.jsx("div",{className:V("rounded-md border bg-surface border-border shadow-sm ",e),ref:n,...s,children:t})}function Lf({children:t,className:e,ref:n,...s}){return m.jsxs("div",{className:V("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 If({children:t,className:e,ref:n,...s}){return m.jsx("h3",{className:V("font-semibold leading-none tracking-tight text-xl",e),ref:n,...s,children:t})}function Nf({children:t,className:e,ref:n,...s}){return m.jsx("p",{className:V("font-semibold text-text-secondary",e),ref:n,...s,children:t})}function Bf({children:t,className:e,ref:n,...s}){return m.jsx("div",{className:V("p-4",e),ref:n,...s,children:t})}function Ff({children:t,className:e,ref:n,...s}){return m.jsxs("div",{className:V("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 Me({children:t,className:e,disabled:n,error:s,ref:i,...o}){return m.jsx("label",{className:V("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 jf({boxClassName:t,checked:e,className:n,disabled:s,error:i,icon:o,id:r,label:a,onCheckedChange:l,ref:c,...u}){const d=y.useId(),f=r||d;return m.jsxs("div",{className:V("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:V("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:V("flex items-center justify-center pointer-events-none text-on-primary",e?"opacity-100":"opacity-0 transition-opacity duration-200"),children:o||m.jsx(ms,{size:14,strokeWidth:3})})})]}),a&&m.jsx(Me,{disabled:s,error:i,htmlFor:f,children:a})]})}const Vo=y.createContext(null);function Mo(){const t=y.useContext(Vo);if(!t)throw new Error("Dialog components (like DialogTrigger, DialogContent) must be used within a <Dialog> provider.");return t}function Do({children:t,defaultOpen:e=!1,onOpenChange:n,open:s}){const[i,o]=y.useState(e),r=s!==void 0,a=r?s:i,l=y.useCallback(c=>{r?n==null||n(c):o(c)},[r,n]);return m.jsx(Vo.Provider,{value:{onOpenChange:l,open:a},children:t})}function Of({children:t,ref:e,variant:n,...s}){const{onOpenChange:i}=Mo();return m.jsx(Po,{onClick:()=>i(!0),ref:e,...s,variant:n,children:t})}const zf=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"}}}),$f={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 Eo({children:t,className:e,closeButton:n=!1,position:s,ref:i,...o}){const{onOpenChange:r,open:a}=Mo();y.useEffect(()=>{function c(u){u.key==="Escape"&&r(!1)}return document.body.addEventListener("keydown",c),()=>document.body.removeEventListener("keydown",c)},[r]);const l=$f[s??"center"];return zo.createPortal(m.jsx(xe,{children:a&&m.jsxs(H.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(H.div,{"aria-modal":"true",className:V(zf({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(ea,{size:32})})]})]})}),document.body)}function _f({children:t,className:e,ref:n,subtitle:s,title:i,...o}){return m.jsxs("div",{className:V("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 Uf({children:t,className:e,ref:n,text:s,...i}){return m.jsxs("div",{className:V("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 Rf({children:t,className:e,...n}){return m.jsx("div",{className:V("flex-1 overflow-y-auto min-h-0",e),...n,children:t})}function Wf({children:t,className:e,ref:n,...s}){return m.jsx("div",{className:V("w-full flex flex-row justify-end items-center gap-4 bottom-0",e),ref:n,...s,children:t})}function Gf({className:t,disabled:e,errorText:n,icon:s,id:i,ref:o,suffix:r,...a}){const l=y.useId(),c=i||l,u=`${c}-error`;return m.jsxs("div",{className:"flex flex-col relative",children:[m.jsxs("div",{className:V("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(xe,{mode:"wait",children:n&&m.jsx(H.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 Kf({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:V("flex items-center justify-center",t),...c,"aria-label":"Loading",role:"status",children:m.jsx(H.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(H.div,{className:"rounded-full border border-border",style:{backgroundColor:e??"var(--primary)",height:l,width:l},variants:d},h))})})}function Hf({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:V("relative flex justify-center items-center",t),...r,style:{height:o,width:o},children:[m.jsx(H.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(H.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 Xf({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:V("relative flex items-center justify-center",s),role:"status",...a,children:m.jsx(H.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(H.li,{style:{backgroundColor:i??"var(--primary)",borderRadius:n/2,width:n},variants:u},f))})})}function Yf({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:V("relative flex items-center justify-center",t),...l,"aria-label":"Loading",role:"status",children:m.jsx(H.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 Lo=y.createContext(null);function qf({children:t,className:e,disabled:n,name:s,onValueChange:i,value:o,...r}){const a=y.useId(),l=s||a;return m.jsx(Lo.Provider,{value:{disabled:n,name:l,onValueChange:i,value:o},children:m.jsx("div",{className:V("flex flex-col gap-2",e),role:"radiogroup",...r,children:t})})}function Zf({className:t,id:e,label:n,value:s,...i}){const o=y.use(Lo);if(!o)throw new Error("RadioButton must be used within a RadioGroup");const r=y.useId(),a=e||r,l=o.value===s,c=i.disabled||o.disabled;return m.jsxs("label",{className:V("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:V("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(Xo,{className:V("h-2.5 w-2.5 block transition-transform duration-200",l?"scale-100":"scale-0"),fill:"currentColor"})}),n&&m.jsx(Me,{disabled:c,htmlFor:a,children:n})]})}function Jf({children:t,className:e,orientation:n="horizontal",style:s,thickness:i=1,...o}){const r=n==="horizontal";return i<=0&&(i=1),m.jsx("div",{"aria-orientation":n,className:V("shrink-0 bg-text rounded",r?"w-full":"h-full",e),role:"separator",style:{[r?"height":"width"]:`${i}px`,...s},...o,...o,children:t})}const Io=768;function Qf(){return y.useSyncExternalStore(t=>{const e=window.matchMedia(`(max-width: ${Io-1}px)`);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},()=>window.matchMedia(`(max-width: ${Io-1}px)`).matches,()=>!1)}const No=y.createContext(null);function Bo(){const t=y.useContext(No);if(!t)throw new Error("useSidebar must be used within a <Sidebar> provider.");return t}function th({children:t,collapsed:e,defaultCollapsed:n=!1,mobileOpen:s,onCollapsedChange:i,onMobileOpenChange:o}){const r=Qf(),[a,l]=y.useState(n),c=e!==void 0,u=c?e:a,[d,f]=y.useState(!1),h=s!==void 0,p=h?s:d,g=y.useCallback(w=>{c?i==null||i(w):l(w)},[c,i]),b=y.useCallback(w=>{h?o==null||o(w):f(w)},[h,o]),v=y.useCallback(()=>{r?b(!p):g(!u)},[r,p,b,u,g]),T=y.useMemo(()=>({collapsed:u,isMobile:r,mobileOpen:p,setCollapsed:g,setMobileOpen:b,toggleSidebar:v}),[u,p,g,b,v,r]);return m.jsx(No.Provider,{value:T,children:t})}function eh({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}=Bo();return u?m.jsx(Do,{onOpenChange:f,open:d,children:m.jsx(Eo,{closeButton:!1,position:o,...s,className:V("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:V("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 nh({children:t,className:e,...n}){return m.jsx("div",{className:V("flex flex-col p-2 shrink-0 border-b-2 border-border",e),...n,children:t})}function sh({children:t,className:e,ref:n,...s}){return m.jsx("div",{className:V("flex flex-col gap-2 flex-1 p-2",e),ref:n,...s,children:t})}function ih({categoryTitle:t,children:e,className:n,icon:s,...i}){const o="group-data-[collapsed=true]/sidebar:hidden";return m.jsx("div",{className:V("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:V("font-bold text-lg whitespace-nowrap overflow-hidden",o),children:e}),m.jsx("div",{className:V("hidden group-data-[collapsed=true]/sidebar:block"),children:s??m.jsx(Zo,{strokeWidth:3})})]}):m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"shrink-0 flex items-center justify-center",children:s}),m.jsx("div",{className:V("whitespace-nowrap overflow-hidden transition-opacity duration-200",o),children:e})]})})}function rh({children:t,className:e,...n}){return m.jsx("div",{className:V("flex flex-col p-2 mt-auto shrink-0 border-t-2 border-border",e),...n,children:t})}function oh({children:t,className:e,...n}){const{toggleSidebar:s}=Bo();return m.jsx("button",{className:V("p-2 rounded border border-border hover:bg-border transition-colors bg-border-subtle",e),onClick:()=>s(),title:"Toggle sidebar",...n,children:t})}function ah({checked:t,className:e,disabled:n,error:s,id:i,label:o,onChange:r,onCheckedChange:a,ref:l,switchIcon:c,...u}){const d=y.useId(),f=i||d,h=p=>{a(p.target.checked),r&&r(p)};return m.jsxs(m.Fragment,{children:[m.jsxs("label",{className:V("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(H.div,{className:V("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(H.div,{animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},initial:{opacity:0,scale:.5},children:c},t?"on":"off")})]}),o&&m.jsx(Me,{disabled:n,error:s,htmlFor:f,children:o})]})}const Fo=y.createContext(null);function lh({children:t,className:e,defaultValue:n,onValueChange:s,tabsDirection:i="horizontal",...o}){const[r,a]=y.useState(n??""),l=y.useId(),c=y.useCallback(d=>{a(d),s==null||s(d)},[s]),u=y.useMemo(()=>({activeTab:r,baseId:l,setActiveTab:c,tabsDirection:i}),[r,l,c,i]);return m.jsx(Fo.Provider,{value:u,children:m.jsx("div",{className:V("flex gap-3 w-full rounded-lg bg-surface p-4",i==="horizontal"?"flex-col items-center":"flex-row",e),...o,children:t})})}function rs(){const t=y.use(Fo);if(!t)throw new Error("Tabs components (like TabsList, Tab or TabContent) must be used within a <Tabs> provider.");return t}function ch({children:t,className:e,grow:n=!1,justify:s="start",...i}){const{tabsDirection:o}=rs(),r=o==="horizontal";return m.jsx("div",{"aria-orientation":o,className:V("flex border-text-secondary",r?"flex-row border-b w-full":"flex-col border-r shrink-0",s==="center"&&"justify-center",s==="end"&&"justify-end",s==="between"&&"justify-between",n&&"[&>*]:flex-1",e),role:"tablist",...i,children:t})}function uh({children:t,className:e,disabled:n,value:s,...i}){const{activeTab:o,baseId:r,setActiveTab:a,tabsDirection:l}=rs(),c=o===s;return m.jsx("button",{"aria-controls":`${r}-content-${s}`,"aria-selected":c,className:V("flex items-center px-1.5 text-text text-xl border-transparent transition-colors duration-200",n&&"text-text-secondary cursor-default",!n&&!c&&"hover:bg-surface-subtle hover:border-border-strong",c&&"bg-info-surface border-primary",l==="horizontal"?"rounded-t-md -mb-px border-b pt-1":"rounded-l-md -mr-px border-r py-1",e),disabled:n,id:`${r}-tab-${s}`,onClick:()=>{a(s)},role:"tab",tabIndex:c?0:-1,type:"button",...i,children:t})}function dh({children:t,className:e,value:n,...s}){const{activeTab:i,baseId:o}=rs();return i===n?m.jsx("div",{"aria-labelledby":`${o}-tab-${n}`,className:V("p-2 rounded-md flex-1 w-full",e),id:`${o}-content-${n}`,role:"tabpanel",tabIndex:0,...s,children:t}):null}const fh=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 hh({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:V(fh({align:t,color:i,italic:o,size:a,underline:l,weight:c}),s),ref:r,...u,children:n})}function mh({className:t,disabled:e,errorText:n,id:s,ref:i,...o}){const r=y.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:V("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(xe,{mode:"wait",children:n&&m.jsx(H.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})})]})}P.Alert=Ga,P.AlertMessage=Ha,P.AlertTitle=Ka,P.Breadcrumb=kf,P.BreadcrumbItem=Af,P.BreadcrumbLink=Pf,P.BreadcrumbList=Cf,P.BreadcrumbMenu=Vf,P.BreadcrumbSeparator=Mf,P.Button=Po,P.Card=Ef,P.CardContent=Bf,P.CardDescription=Nf,P.CardFooter=Ff,P.CardHeader=Lf,P.CardTitle=If,P.Checkbox=jf,P.Dialog=Do,P.DialogBody=Rf,P.DialogButtons=Wf,P.DialogContent=Eo,P.DialogFooter=Uf,P.DialogHeader=_f,P.DialogTrigger=Of,P.Dots=Kf,P.Input=Gf,P.Label=Me,P.Orbital=Hf,P.RadioButton=Zf,P.RadioGroup=qf,P.ScreenLoader=Xf,P.Separator=Jf,P.Sidebar=th,P.SidebarBody=sh,P.SidebarContent=eh,P.SidebarFooter=rh,P.SidebarHeader=nh,P.SidebarItem=ih,P.SidebarTrigger=oh,P.Spinner=Yf,P.Switch=ah,P.Tab=uh,P.TabContent=dh,P.Tabs=lh,P.TabsList=ch,P.Text=hh,P.Textarea=mh,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})}));
94
+ `),()=>{b.contains(y)&&b.removeChild(y)}},[t]),h.jsx(ru,{isPresent:t,childRef:o,sizeRef:i,children:ot.cloneElement(e,{ref:l})})}const ou=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,root:l})=>{const c=Ut(au),u=g.useId();let d=!0,f=g.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:r,onExitComplete:m=>{c.set(m,!0);for(const p of c.values())if(!p)return;s&&s()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,s]);return o&&d&&(f={...f}),g.useMemo(()=>{c.forEach((m,p)=>c.set(p,!1))},[n]),ot.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),i==="popLayout"&&(e=h.jsx(iu,{isPresent:n,anchorX:a,root:l,children:e})),h.jsx(ut.Provider,{value:f,children:e})};function au(){return new Map}function Xr(e=!0){const t=g.useContext(ut);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=g.useId();g.useEffect(()=>{if(e)return r(o)},[e]);const i=g.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const bt=e=>e.key||"";function Yr(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const xt=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",root:l})=>{const[c,u]=Xr(i),d=g.useMemo(()=>Yr(e),[e]),f=i&&!c?[]:d.map(bt),m=g.useRef(!0),p=g.useRef(d),y=Ut(()=>new Map),[b,v]=g.useState(d),[k,w]=g.useState(d);Is(()=>{m.current=!1,p.current=d;for(let D=0;D<k.length;D++){const N=bt(k[D]);f.includes(N)?y.delete(N):y.get(N)!==!0&&y.set(N,!1)}},[k,f.length,f.join("-")]);const E=[];if(d!==b){let D=[...d];for(let N=0;N<k.length;N++){const x=k[N],I=bt(x);f.includes(I)||(D.splice(N,0,x),E.push(x))}return o==="wait"&&E.length&&(D=E),w(Yr(D)),v(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&k.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:V}=g.useContext(zt);return h.jsx(h.Fragment,{children:k.map(D=>{const N=bt(D),x=i&&!c?!1:d===k||f.includes(N),I=()=>{if(y.has(N))y.set(N,!0);else return;let U=!0;y.forEach(re=>{re||(U=!1)}),U&&(V==null||V(),w(p.current),i&&(u==null||u()),s&&s())};return h.jsx(ou,{isPresent:x,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:l,onExitComplete:x?void 0:I,anchorX:a,children:D},N)})})},qr=g.createContext({strict:!1}),Zr={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"]},je={};for(const e in Zr)je[e]={isEnabled:t=>Zr[e].some(n=>!!t[n])};function lu(e){for(const t in e)je[t]={...je[t],...e[t]}}const cu=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 vt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cu.has(e)}let Jr=e=>!vt(e);function uu(e){typeof e=="function"&&(Jr=t=>t.startsWith("on")?!vt(t):e(t))}try{uu(require("@emotion/is-prop-valid").default)}catch{}function du(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||(Jr(r)||n===!0&&vt(r)||!t&&!vt(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const wt=g.createContext({});function Tt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function et(e){return typeof e=="string"||Array.isArray(e)}const Ln=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],In=["initial",...Ln];function St(e){return Tt(e.animate)||In.some(t=>et(e[t]))}function Qr(e){return!!(St(e)||e.variants)}function fu(e,t){if(St(e)){const{initial:n,animate:s}=e;return{initial:n===!1||et(n)?n:void 0,animate:et(s)?s:void 0}}return e.inherit!==!1?t:{}}function hu(e){const{initial:t,animate:n}=fu(e,g.useContext(wt));return g.useMemo(()=>({initial:t,animate:n}),[ei(t),ei(n)])}function ei(e){return Array.isArray(e)?e.join(" "):e}function ti(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const tt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(M.test(e))e=parseFloat(e);else return e;const n=ti(e,t.target.x),s=ti(e,t.target.y);return`${n}% ${s}%`}},mu={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=ye.parse(e);if(r.length>5)return s;const o=ye.createTransformer(e),i=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+i]/=a,r[1+i]/=l;const c=F(a,l,.5);return typeof r[2+i]=="number"&&(r[2+i]/=c),typeof r[3+i]=="number"&&(r[3+i]/=c),o(r)}},Bn={borderRadius:{...tt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tt,borderTopRightRadius:tt,borderBottomLeftRadius:tt,borderBottomRightRadius:tt,boxShadow:mu};function ni(e,{layout:t,layoutId:n}){return Oe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Bn[e]||e==="opacity")}const pu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gu=Be.length;function yu(e,t,n){let s="",r=!0;for(let o=0;o<gu;o++){const i=Be[o],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Or(a,Vn[i]);if(!l){r=!1;const u=pu[i]||i;s+=`${u}(${c}) `}n&&(t[i]=c)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function On(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Oe.has(l)){i=!0;continue}else if(Qs(l)){r[l]=c;continue}else{const u=Or(c,Vn[l]);l.startsWith("origin")?(a=!0,o[l]=u):s[l]=u}}if(t.transform||(i||n?s.transform=yu(t,e.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 Fn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function si(e,t,n){for(const s in t)!G(t[s])&&!ni(s,n)&&(e[s]=t[s])}function bu({transformTemplate:e},t){return g.useMemo(()=>{const n=Fn();return On(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xu(e,t){const n=e.style||{},s={};return si(s,n,e),Object.assign(s,bu(e,t)),s}function vu(e,t){const n={},s=xu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const wu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tu={offset:"strokeDashoffset",array:"strokeDasharray"};function Su(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?wu:Tu;e[o.offset]=M.transform(-s);const i=M.transform(t),a=M.transform(n);e[o.array]=`${i} ${a}`}function ri(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:o=1,pathOffset:i=0,...a},l,c,u){if(On(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;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),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&Su(d,r,o,i,!1)}const ii=()=>({...Fn(),attrs:{}}),oi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ku(e,t,n,s){const r=g.useMemo(()=>{const o=ii();return ri(o,t,oi(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};si(o,e.style,e),r.style={...o,...r.style}}return r}const Cu=["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 jn(e){return typeof e!="string"||e.includes("-")?!1:!!(Cu.indexOf(e)>-1||/[A-Z]/u.test(e))}function Au(e,t,n,{latestValues:s},r,o=!1){const a=(jn(e)?ku:vu)(t,s,r,e),l=du(t,typeof e=="string",o),c=e!==g.Fragment?{...l,...a,ref:n}:{},{children:u}=t,d=g.useMemo(()=>G(u)?u.get():u,[u]);return g.createElement(e,{...c,children:d})}function ai(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function _n(e,t,n,s){if(typeof t=="function"){const[r,o]=ai(s);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=ai(s);t=t(n!==void 0?n:e.custom,r,o)}return t}function kt(e){return G(e)?e.get():e}function Pu({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Vu(n,s,r,e),renderState:t()}}function Vu(e,t,n,s){const r={},o=s(e,{});for(const f in o)r[f]=kt(o[f]);let{initial:i,animate:a}=e;const l=St(e),c=Qr(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!Tt(d)){const f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){const p=_n(e,f[m]);if(p){const{transitionEnd:y,transition:b,...v}=p;for(const k in v){let w=v[k];if(Array.isArray(w)){const E=u?w.length-1:0;w=w[E]}w!==null&&(r[k]=w)}for(const k in y)r[k]=y[k]}}}return r}const li=e=>(t,n)=>{const s=g.useContext(wt),r=g.useContext(ut),o=()=>Pu(e,t,s,r);return n?o():Ut(o)};function $n(e,t,n){var o;const{style:s}=e,r={};for(const i in s)(G(s[i])||t.style&&G(t.style[i])||ni(i,e)||((o=n==null?void 0:n.getValue(i))==null?void 0:o.liveStyle)!==void 0)&&(r[i]=s[i]);return r}const Mu=li({scrapeMotionValuesFromProps:$n,createRenderState:Fn});function ci(e,t,n){const s=$n(e,t,n);for(const r in e)if(G(e[r])||G(t[r])){const o=Be.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[o]=e[r]}return s}const Du=li({scrapeMotionValuesFromProps:ci,createRenderState:ii}),Eu=Symbol.for("motionComponentSymbol");function _e(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Nu(e,t,n){return g.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):_e(n)&&(n.current=s))},[t])}const zn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ui="data-"+zn("framerAppearId"),di=g.createContext({});function Lu(e,t,n,s,r){var y,b;const{visualElement:o}=g.useContext(wt),i=g.useContext(qr),a=g.useContext(ut),l=g.useContext(Nn).reducedMotion,c=g.useRef(null);s=s||i.renderer,!c.current&&s&&(c.current=s(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=g.useContext(di);u&&!u.projection&&r&&(u.type==="html"||u.type==="svg")&&Iu(c.current,n,r,d);const f=g.useRef(!1);g.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const m=n[ui],p=g.useRef(!!m&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,m))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,m)));return Is(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),p.current&&u.animationState&&u.animationState.animateChanges())}),g.useEffect(()=>{u&&(!p.current&&u.animationState&&u.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,m)}),p.current=!1),u.enteringChildren=void 0)}),u}function Iu(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:fi(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||a&&_e(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:l,layoutRoot:c})}function fi(e){if(e)return e.options.allowProjection!==!1?e.projection:fi(e.parent)}function Un(e,{forwardMotionProps:t=!1}={},n,s){n&&lu(n);const r=jn(e)?Du:Mu;function o(a,l){let c;const u={...g.useContext(Nn),...a,layoutId:Bu(a)},{isStatic:d}=u,f=hu(a),m=r(a,d);if(!d&&Wt){Ou(u,n);const p=Fu(u);c=p.MeasureLayout,f.visualElement=Lu(e,m,u,s,p.ProjectionNode)}return h.jsxs(wt.Provider,{value:f,children:[c&&f.visualElement?h.jsx(c,{visualElement:f.visualElement,...u}):null,Au(e,a,Nu(m,f.visualElement,l),m,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const i=g.forwardRef(o);return i[Eu]=e,i}function Bu({layoutId:e}){const t=g.useContext(zt).id;return t&&e!==void 0?t+"-"+e:e}function Ou(e,t){const n=g.useContext(qr).strict;if(process.env.NODE_ENV!=="production"&&t&&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.";e.ignoreStrict?Ee(!1,s,"lazy-strict-mode"):ue(!1,s,"lazy-strict-mode")}}function Fu(e){const{drag:t,layout:n}=je;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function ju(e,t){if(typeof Proxy>"u")return Un;const n=new Map,s=(o,i)=>Un(o,i,e,t),r=(o,i)=>(process.env.NODE_ENV!=="production"&&Yt(!1,"motion() is deprecated. Use motion.create() instead."),s(o,i));return new Proxy(r,{get:(o,i)=>i==="create"?s:(n.has(i)||n.set(i,Un(i,void 0,e,t)),n.get(i))})}function hi({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function _u({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $u(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Wn(e){return e===void 0||e===1}function Kn({scale:e,scaleX:t,scaleY:n}){return!Wn(e)||!Wn(t)||!Wn(n)}function ke(e){return Kn(e)||mi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function mi(e){return pi(e.x)||pi(e.y)}function pi(e){return e&&e!=="0%"}function Ct(e,t,n){const s=e-n,r=t*s;return n+r}function gi(e,t,n,s,r){return r!==void 0&&(e=Ct(e,r,s)),Ct(e,n,s)+t}function Gn(e,t=0,n=1,s,r){e.min=gi(e.min,t,n,s,r),e.max=gi(e.max,t,n,s,r)}function yi(e,{x:t,y:n}){Gn(e.x,t.translate,t.scale,t.originPoint),Gn(e.y,n.translate,n.scale,n.originPoint)}const bi=.999999999999,xi=1.0000000000001;function zu(e,t,n,s=!1){const r=n.length;if(!r)return;t.x=t.y=1;let o,i;for(let a=0;a<r;a++){o=n[a],i=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&&ze(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,yi(e,i)),s&&ke(o.latestValues)&&ze(e,o.latestValues))}t.x<xi&&t.x>bi&&(t.x=1),t.y<xi&&t.y>bi&&(t.y=1)}function $e(e,t){e.min=e.min+t,e.max=e.max+t}function vi(e,t,n,s,r=.5){const o=F(e.min,e.max,r);Gn(e,t,n,o,s)}function ze(e,t){vi(e.x,t.x,t.scaleX,t.scale,t.originX),vi(e.y,t.y,t.scaleY,t.scale,t.originY)}function wi(e,t){return hi($u(e.getBoundingClientRect(),t))}function Uu(e,t,n){const s=wi(e,n),{scroll:r}=t;return r&&($e(s.x,r.offset.x),$e(s.y,r.offset.y)),s}const Ti=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ue=()=>({x:Ti(),y:Ti()}),Si=()=>({min:0,max:0}),z=()=>({x:Si(),y:Si()}),Rn={current:null},ki={current:!1};function Wu(){if(ki.current=!0,!!Wt)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Rn.current=e.matches;e.addEventListener("change",t),t()}else Rn.current=!1}const Ku=new WeakMap;function Gu(e,t,n){for(const s in t){const r=t[s],o=n[s];if(G(r))e.addValue(s,r);else if(G(o))e.addValue(s,Fe(r,{owner:e}));else if(o!==r)if(e.hasValue(s)){const i=e.getValue(s);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(s);e.addValue(s,Fe(i!==void 0?i:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Ci=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ru{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=kn,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=Y.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,O.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=St(n),this.isVariantNode=Qr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const m=d[f];l[f]!==void 0&&G(m)&&m.set(l[f])}}mount(t){var n;this.current=t,Ku.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,r)=>this.bindToMotionValue(r,s)),ki.current||Wu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Rn.current,process.env.NODE_ENV!=="production"&&Yt(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 t;this.projection&&this.projection.unmount(),pe(this.notifyUpdate),pe(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.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(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Oe.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&O.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in je){const n=je[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];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):z()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ci.length;s++){const r=Ci[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,i=t[o];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=Gu(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Fe(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Bs(s)||Fs(s))?s=parseFloat(s):!tu(s)&&ye.test(n)&&(s=Br(t,n)),this.setBaseTarget(t,G(s)?s.get():s)),G(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const i=_n(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(s=i[t])}if(n&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!G(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Xt),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Mn.render(this.render)}}class Ai extends Ru{constructor(){super(...arguments),this.KeyframeResolver=Uc}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;G(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Pi(e,{style:t,vars:n},s,r){const o=e.style;let i;for(i in t)o[i]=t[i];r==null||r.applyProjectionStyles(o,s);for(i in n)o.setProperty(i,n[i])}function Hu(e){return window.getComputedStyle(e)}class Xu extends Ai{constructor(){super(...arguments),this.type="html",this.renderInstance=Pi}readValueFromInstance(t,n){var s;if(Oe.has(n))return(s=this.projection)!=null&&s.isProjecting?xn(n):ac(t,n);{const r=Hu(t),o=(Qs(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wi(t,n)}build(t,n,s){On(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return $n(t,n,s)}}const Vi=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 Yu(e,t,n,s){Pi(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Vi.has(r)?r:zn(r),t.attrs[r])}class qu extends Ai{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Oe.has(n)){const s=Ir(n);return s&&s.default||0}return n=Vi.has(n)?n:zn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return ci(t,n,s)}build(t,n,s){ri(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Yu(t,n,s,r)}mount(t){this.isSVGTag=oi(t.tagName),super.mount(t)}}const Zu=(e,t)=>jn(e)?new qu(t):new Xu(t,{allowProjection:e!==g.Fragment});function We(e,t,n){const s=e.getProps();return _n(s,t,n!==void 0?n:s.custom,e)}const Hn=e=>Array.isArray(e);function Ju(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fe(n))}function Qu(e){return Hn(e)?e[e.length-1]||0:e}function ed(e,t){const n=We(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const a=Qu(o[i]);Ju(e,i,a)}}function td(e){return!!(G(e)&&e.add)}function Xn(e,t){const n=e.getValue("willChange");if(td(n))return n.add(t);if(!n&&de.WillChange){const s=new de.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Mi(e){return e.props[ui]}const nd=e=>e!==null;function sd(e,{repeat:t,repeatType:n="loop"},s){const r=e.filter(nd),o=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[o]}const rd={type:"spring",stiffness:500,damping:25,restSpeed:10},id=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),od={type:"keyframes",duration:.8},ad={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ld=(e,{keyframes:t})=>t.length>2?od:Oe.has(e)?e.startsWith("scale")?id(t[1]):rd:ad;function cd({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:o,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Yn=(e,t,n,s={},r,o)=>i=>{const a=An(s,e)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-te(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};cd(a)||Object.assign(u,ld(e,u)),u.duration&&(u.duration=te(u.duration)),u.repeatDelay&&(u.repeatDelay=te(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Cn(u),u.delay===0&&(d=!0)),(de.instantAnimations||de.skipAnimations)&&(d=!0,Cn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=sd(u.keyframes,a);if(f!==void 0){O.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new gn(u):new Dc(u)};function ud({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Di(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:i,...a}=t;s&&(o=s);const l=[],c=r&&e.animationState&&e.animationState.getState()[r];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||c&&ud(c,u))continue;const m={delay:n,...An(o||{},u)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===p&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const v=Mi(e);if(v){const k=window.MotionHandoffAnimation(v,u,O);k!==null&&(m.startTime=k,y=!0)}}Xn(e,u),d.start(Yn(u,d,f,e.shouldReduceMotion&&Mr.has(u)?{type:!1}:m,e,y));const b=d.animation;b&&l.push(b)}return i&&Promise.all(l).then(()=>{O.update(()=>{i&&ed(e,i)})}),l}function Ei(e,t,n,s=0,r=1){const o=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),i=e.size,a=(i-1)*s;return typeof n=="function"?n(o,i):r===1?o*s:a-o*s}function qn(e,t,n={}){var l;const s=We(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const o=s?()=>Promise.all(Di(e,s,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=r;return dd(e,t,c,u,d,f,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[c,u]=a==="beforeChildren"?[o,i]:[i,o];return c().then(()=>u())}else return Promise.all([o(),i(n.delay)])}function dd(e,t,n=0,s=0,r=0,o=1,i){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(qn(l,t,{...i,delay:n+(typeof s=="function"?0:s)+Ei(e.variantChildren,l,s,r,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function fd(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>qn(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=qn(e,t,n);else{const r=typeof t=="function"?We(e,t,n.custom):t;s=Promise.all(Di(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function Ni(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const hd=In.length;function Li(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Li(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<hd;n++){const s=In[n],r=e.props[s];(et(r)||r===!1)&&(t[s]=r)}return t}const md=[...Ln].reverse(),pd=Ln.length;function gd(e){return t=>Promise.all(t.map(({animation:n,options:s})=>fd(e,n,s)))}function yd(e){let t=gd(e),n=Ii(),s=!0;const r=l=>(c,u)=>{var f;const d=We(e,u,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:m,transitionEnd:p,...y}=d;c={...c,...y,...p}}return c};function o(l){t=l(e)}function i(l){const{props:c}=e,u=Li(e.parent)||{},d=[],f=new Set;let m={},p=1/0;for(let b=0;b<pd;b++){const v=md[b],k=n[v],w=c[v]!==void 0?c[v]:u[v],E=et(w),V=v===l?k.isActive:null;V===!1&&(p=b);let D=w===u[v]&&w!==c[v]&&E;if(D&&s&&e.manuallyAnimateOnMount&&(D=!1),k.protectedKeys={...m},!k.isActive&&V===null||!w&&!k.prevProp||Tt(w)||typeof w=="boolean")continue;const N=bd(k.prevProp,w);let x=N||v===l&&k.isActive&&!D&&E||b>p&&E,I=!1;const U=Array.isArray(w)?w:[w];let re=U.reduce(r(v),{});V===!1&&(re={});const{prevResolvedValues:Ae={}}=k,Dt={...Ae,...re},Ke=B=>{x=!0,f.has(B)&&(I=!0,f.delete(B)),k.needsAnimating[B]=!0;const P=e.getValue(B);P&&(P.liveStyle=!1)};for(const B in Dt){const P=re[B],ae=Ae[B];if(m.hasOwnProperty(B))continue;let he=!1;Hn(P)&&Hn(ae)?he=!Ni(P,ae):he=P!==ae,he?P!=null?Ke(B):f.add(B):P!==void 0&&f.has(B)?Ke(B):k.protectedKeys[B]=!0}k.prevProp=w,k.prevResolvedValues=re,k.isActive&&(m={...m,...re}),s&&e.blockInitialAnimation&&(x=!1);const fe=D&&N;x&&(!fe||I)&&d.push(...U.map(B=>{const P={type:v};if(typeof B=="string"&&s&&!fe&&e.manuallyAnimateOnMount&&e.parent){const{parent:ae}=e,he=We(ae,B);if(ae.enteringChildren&&he){const{delayChildren:Et}=he.transition||{};P.delay=Ei(ae.enteringChildren,e,Et)}}return{animation:B,options:P}}))}if(f.size){const b={};if(typeof c.initial!="boolean"){const v=We(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(b.transition=v.transition)}f.forEach(v=>{const k=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),b[v]=k??null}),d.push({animation:b})}let y=!!d.length;return s&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,y?t(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(l,c)}),n[l].isActive=c;const u=i(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:i,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Ii()}}}function bd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ni(t,e):!1}function Ce(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ii(){return{animate:Ce(!0),whileInView:Ce(),whileHover:Ce(),whileTap:Ce(),whileDrag:Ce(),whileFocus:Ce(),exit:Ce()}}class be{constructor(t){this.isMounted=!1,this.node=t}update(){}}class xd extends be{constructor(t){super(t),t.animationState||(t.animationState=yd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Tt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let vd=0;class wd extends be{constructor(){super(...arguments),this.id=vd++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Td={animation:{Feature:xd},exit:{Feature:wd}};function nt(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function st(e){return{point:{x:e.pageX,y:e.pageY}}}const Sd=e=>t=>Dn(t)&&e(t,st(t));function rt(e,t,n,s){return nt(e,t,Sd(n),s)}const Bi=1e-4,kd=1-Bi,Cd=1+Bi,Oi=.01,Ad=0-Oi,Pd=0+Oi;function R(e){return e.max-e.min}function Vd(e,t,n){return Math.abs(e-t)<=n}function Fi(e,t,n,s=.5){e.origin=s,e.originPoint=F(t.min,t.max,e.origin),e.scale=R(n)/R(t),e.translate=F(n.min,n.max,e.origin)-e.originPoint,(e.scale>=kd&&e.scale<=Cd||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ad&&e.translate<=Pd||isNaN(e.translate))&&(e.translate=0)}function it(e,t,n,s){Fi(e.x,t.x,n.x,s?s.originX:void 0),Fi(e.y,t.y,n.y,s?s.originY:void 0)}function ji(e,t,n){e.min=n.min+t.min,e.max=e.min+R(t)}function Md(e,t,n){ji(e.x,t.x,n.x),ji(e.y,t.y,n.y)}function _i(e,t,n){e.min=t.min-n.min,e.max=e.min+R(t)}function At(e,t,n){_i(e.x,t.x,n.x),_i(e.y,t.y,n.y)}function ee(e){return[e("x"),e("y")]}const $i=({current:e})=>e?e.ownerDocument.defaultView:null,zi=(e,t)=>Math.abs(e-t);function Dd(e,t){const n=zi(e.x,t.x),s=zi(e.y,t.y);return Math.sqrt(n**2+s**2)}class Ui{constructor(t,n,{transformPagePoint:s,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:i=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=Jn(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=Dd(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:y}=f,{timestamp:b}=K;this.history.push({...y,timestamp:b});const{onStart:v,onMove:k}=this.handlers;m||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Zn(m,this.transformPagePoint),O.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Jn(f.type==="pointercancel"?this.lastMoveEventInfo:Zn(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,v),y&&y(f,v)},!Dn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=i,this.contextWindow=r||window;const a=st(t),l=Zn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=K;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Jn(l,this.history)),this.removeListeners=Re(rt(this.contextWindow,"pointermove",this.handlePointerMove),rt(this.contextWindow,"pointerup",this.handlePointerUp),rt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),pe(this.updatePoint)}}function Zn(e,t){return t?{point:t(e.point)}:e}function Wi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jn({point:e},t){return{point:e,delta:Wi(e,Ki(t)),offset:Wi(e,Ed(t)),velocity:Nd(t,.1)}}function Ed(e){return e[0]}function Ki(e){return e[e.length-1]}function Nd(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=Ki(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>te(t)));)n--;if(!s)return{x:0,y:0};const o=Q(r.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const i={x:(r.x-s.x)/o,y:(r.y-s.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Ld(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?F(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?F(n,e,s.max):Math.min(e,n)),e}function Gi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Id(e,{top:t,left:n,bottom:s,right:r}){return{x:Gi(e.x,n,r),y:Gi(e.y,t,s)}}function Ri(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function Bd(e,t){return{x:Ri(e.x,t.x),y:Ri(e.y,t.y)}}function Od(e,t){let n=.5;const s=R(e),r=R(t);return r>s?n=He(t.min,t.max-s,e.min):s>r&&(n=He(e.min,e.max-r,t.min)),ce(0,1,n)}function Fd(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Qn=.35;function jd(e=Qn){return e===!1?e=0:e===!0&&(e=Qn),{x:Hi(e,"left","right"),y:Hi(e,"top","bottom")}}function Hi(e,t,n){return{min:Xi(e,t),max:Xi(e,n)}}function Xi(e,t){return typeof e=="number"?e:e[t]||0}const _d=new WeakMap;class $d{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(st(d).point)},i=(d,f)=>{const{drag:m,dragPropagation:p,onDragStart:y}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Rc(m),!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),ee(v=>{let k=this.getAxisMotionValue(v).get()||0;if(ie.test(k)){const{projection:w}=this.visualElement;if(w&&w.layout){const E=w.layout.layoutBox[v];E&&(k=R(E)*(parseFloat(k)/100))}}this.originPoint[v]=k}),y&&O.postRender(()=>y(d,f)),Xn(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:y,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=zd(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),b&&b(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>ee(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 Ui(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:$i(this.visualElement)})}stop(t,n){const s=t||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!s)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&O.postRender(()=>a(s,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.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(t,n,s){const{drag:r}=this.getProps();if(!s||!Pt(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(i=Ld(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var o;const{dragConstraints:t,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,r=this.constraints;t&&_e(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=Id(s.layoutBox,t):this.constraints=!1,this.elastic=jd(n),r!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&ee(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Fd(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!_e(t))return!1;const s=t.current;ue(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:r}=this.visualElement;if(!r||!r.layout)return!1;const o=Uu(s,r.root,this.visualElement.getTransformPagePoint());let i=Bd(r.layout.layoutBox,o);if(n){const a=n(_u(i));this.hasMutatedConstraints=!!a,a&&(i=hi(a))}return i}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ee(u=>{if(!Pt(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=r?200:1e6,m=r?40:1e7,p={type:"inertia",velocity:s?t[u]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Xn(this.visualElement,t),s.start(Yn(t,s,0,n,this.visualElement,!1))}stopAnimation(){ee(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ee(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){ee(n=>{const{drag:s}=this.getProps();if(!Pt(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[n];o.set(t[n]-F(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!_e(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ee(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();r[i]=Od({min:l,max:l},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),ee(i=>{if(!Pt(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(F(l,c,r[i]))})}addListeners(){if(!this.visualElement.current)return;_d.set(this.visualElement,this);const t=this.visualElement.current,n=rt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();_e(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),O.read(s);const i=nt(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ee(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{i(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Qn,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Pt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function zd(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ud extends be{constructor(t){super(t),this.removeGroupControls=J,this.removeListeners=J,this.controls=new $d(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||J}unmount(){this.removeGroupControls(),this.removeListeners()}}const Yi=e=>(t,n)=>{e&&O.postRender(()=>e(t,n))};class Wd extends be{constructor(){super(...arguments),this.removePointerDownListener=J}onPointerDown(t){this.session=new Ui(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$i(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:Yi(t),onStart:Yi(n),onMove:s,onEnd:(o,i)=>{delete this.session,r&&O.postRender(()=>r(o,i))}}}mount(){this.removePointerDownListener=rt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Vt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let es=!1;class Kd extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),s&&s.register&&r&&s.register(o),es&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Vt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:o}=this.props,{projection:i}=s;return i&&(i.isPresent=o,es=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||O.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Mn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;es=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function qi(e){const[t,n]=Xr(),s=g.useContext(zt);return h.jsx(Kd,{...e,layoutGroup:s,switchLayoutGroup:g.useContext(di),isPresent:t,safeToRemove:n})}function Gd(e,t,n){const s=G(e)?e:Fe(e);return s.start(Yn("",s,t,n)),s.animation}const Rd=(e,t)=>e.depth-t.depth;class Hd{constructor(){this.children=[],this.isDirty=!1}add(t){Kt(this.children,t),this.isDirty=!0}remove(t){Gt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Rd),this.isDirty=!1,this.children.forEach(t)}}function Xd(e,t){const n=Y.now(),s=({timestamp:r})=>{const o=r-n;o>=t&&(pe(s),e(o-t))};return O.setup(s,!0),()=>pe(s)}const Zi=["TopLeft","TopRight","BottomLeft","BottomRight"],Yd=Zi.length,Ji=e=>typeof e=="string"?parseFloat(e):e,Qi=e=>typeof e=="number"||M.test(e);function qd(e,t,n,s,r,o){r?(e.opacity=F(0,n.opacity??1,Zd(s)),e.opacityExit=F(t.opacity??1,0,Jd(s))):o&&(e.opacity=F(t.opacity??1,n.opacity??1,s));for(let i=0;i<Yd;i++){const a=`border${Zi[i]}Radius`;let l=eo(t,a),c=eo(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Qi(l)===Qi(c)?(e[a]=Math.max(F(Ji(l),Ji(c),s),0),(ie.test(c)||ie.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=F(t.rotate||0,n.rotate||0,s))}function eo(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Zd=to(0,.5,Rs),Jd=to(.5,.95,J);function to(e,t,n){return s=>s<e?0:s>t?1:n(He(e,t,s))}function no(e,t){e.min=t.min,e.max=t.max}function se(e,t){no(e.x,t.x),no(e.y,t.y)}function so(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ro(e,t,n,s,r){return e-=t,e=Ct(e,1/n,s),r!==void 0&&(e=Ct(e,1/r,s)),e}function Qd(e,t=0,n=1,s=.5,r,o=e,i=e){if(ie.test(t)&&(t=parseFloat(t),t=F(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=F(o.min,o.max,s);e===o&&(a-=t),e.min=ro(e.min,t,n,a,r),e.max=ro(e.max,t,n,a,r)}function io(e,t,[n,s,r],o,i){Qd(e,t[n],t[s],t[r],t.scale,o,i)}const ef=["x","scaleX","originX"],tf=["y","scaleY","originY"];function oo(e,t,n,s){io(e.x,t,ef,n?n.x:void 0,s?s.x:void 0),io(e.y,t,tf,n?n.y:void 0,s?s.y:void 0)}function ao(e){return e.translate===0&&e.scale===1}function lo(e){return ao(e.x)&&ao(e.y)}function co(e,t){return e.min===t.min&&e.max===t.max}function nf(e,t){return co(e.x,t.x)&&co(e.y,t.y)}function uo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fo(e,t){return uo(e.x,t.x)&&uo(e.y,t.y)}function ho(e){return R(e.x)/R(e.y)}function mo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class sf{constructor(){this.members=[]}add(t){Kt(this.members,t),t.scheduleRender()}remove(t){if(Gt(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let s;for(let r=n;r>=0;r--){const o=this.members[r];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function rf(e,t,n){let s="";const r=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((r||o||i)&&(s=`translate3d(${r}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:m,skewY:p}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),d&&(s+=`rotateX(${d}deg) `),f&&(s+=`rotateY(${f}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const ts=["","X","Y","Z"],of=1e3;let af=0;function ns(e,t,n,s){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function po(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mi(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",O,!(r||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&po(s)}function go({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(i={},a=t==null?void 0:t()){this.id=af++,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(uf),this.nodes.forEach(mf),this.nodes.forEach(pf),this.nodes.forEach(df)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,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 Hd)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Xt),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=Gr(i)&&!Jc(i),this.instance=i;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;O.read(()=>{d=window.innerWidth}),e(i,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,u&&u(),u=Xd(f,250),Vt.hasAnimatedSinceResize&&(Vt.hasAnimatedSinceResize=!1,this.nodes.forEach(xo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||vf,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=c.getProps(),v=!this.targetLayout||!fo(this.targetLayout,m),k=!d&&f;if(this.options.layoutRoot||this.resumeFrom||k||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...An(p,"layout"),onPlay:y,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,k)}else d||xo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),pe(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(gf),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&po(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(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(yo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(bo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(hf),this.nodes.forEach(lf),this.nodes.forEach(cf)):this.nodes.forEach(bo),this.clearAllSnapshots();const a=Y.now();K.delta=ce(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,Qt.update.process(K),Qt.preRender.process(K),Qt.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ff),this.sharedNodes.forEach(yf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,O.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){O.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!R(this.snapshot.measuredBox.x)&&!R(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 i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=z(),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,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!lo(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&this.instance&&(a||ke(this.latestValues)||u)&&(r(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),wf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:i}=this.options;if(!i)return z();const a=i.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(Tf))){const{scroll:u}=this.root;u&&($e(a.x,u.offset.x),$e(a.y,u.offset.y))}return a}removeElementScroll(i){var l;const a=z();if(se(a,i),(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&&se(a,i),$e(a.x,d.offset.x),$e(a.y,d.offset.y))}return a}applyTransform(i,a=!1){const l=z();se(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ze(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ke(u.latestValues)&&ze(l,u.latestValues)}return ke(this.latestValues)&&ze(l,this.latestValues),l}removeTransform(i){const a=z();se(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ke(c.latestValues))continue;Kn(c.latestValues)&&c.updateSnapshot();const u=z(),d=c.measurePageBox();se(u,d),oo(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return ke(this.latestValues)&&oo(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==K.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var m;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(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=K.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=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Md(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):se(this.target,this.layout.layoutBox),yi(this.target,this.targetDelta)):se(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||Kn(this.parent.latestValues)||mi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,a,l){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),At(this.relativeTargetOrigin,a,l),se(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===K.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;se(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;zu(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=z());const{target:m}=i;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(so(this.prevProjectionDelta.x,this.projectionDelta.x),so(this.prevProjectionDelta.y,this.projectionDelta.y)),it(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!mo(this.projectionDelta.x,this.prevProjectionDelta.x)||!mo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ue(),this.projectionDelta=Ue(),this.projectionDeltaWithTransform=Ue()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Ue();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=z(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,y=m!==p,b=this.getStack(),v=!b||b.members.length<=1,k=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(xf));this.animationProgress=0;let w;this.mixTargetDelta=E=>{const V=E/1e3;vo(d.x,i.x,V),vo(d.y,i.y,V),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(At(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),bf(this.relativeTarget,this.relativeTargetOrigin,f,V),w&&nf(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=z()),se(w,this.relativeTarget)),y&&(this.animationValues=u,qd(u,c,this.latestValues,V,k,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){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&&(pe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=O.update(()=>{Vt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Fe(0)),this.currentAnimation=Gd(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),i.onUpdate&&i.onUpdate(u)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(of),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&Co(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||z();const d=R(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=R(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}se(a,l),ze(a,u),it(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new sf),this.sharedNodes.get(i).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 i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ns("z",i,c,this.animationValues);for(let u=0;u<ts.length;u++)ns(`rotate${ts[u]}`,i,c,this.animationValues),ns(`skew${ts[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=kt(a==null?void 0:a.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=kt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ke(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=rf(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),i.transform=d;const{x:f,y:m}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,c.animationValues?i.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:i.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in Bn){if(u[p]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:v}=Bn[p],k=d==="none"?u[p]:y(u[p],c);if(b){const w=b.length;for(let E=0;E<w;E++)i[b[E]]=k}else v?this.options.visualElement.renderState.vars[p]=k:i[p]=k}this.options.layoutId&&(i.pointerEvents=c===this?kt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(yo),this.root.sharedNodes.clear()}}}function lf(e){e.updateLayout()}function cf(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?ee(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],m=R(f);f.min=s[d].min,f.max=f.min+m}):Co(o,t.layoutBox,s)&&ee(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],m=R(s[d]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=Ue();it(a,s,t.layoutBox);const l=Ue();i?it(l,e.applyTransform(r,!0),t.measuredBox):it(l,s,t.layoutBox);const c=!lo(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:m}=d;if(f&&m){const p=z();At(p,t.layoutBox,f.layoutBox);const y=z();At(y,s,m.layoutBox),fo(p,y)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function uf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function df(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ff(e){e.clearSnapshot()}function yo(e){e.clearMeasurements()}function bo(e){e.isLayoutDirty=!1}function hf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function xo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function mf(e){e.resolveTargetDelta()}function pf(e){e.calcProjection()}function gf(e){e.resetSkewAndRotation()}function yf(e){e.removeLeadSnapshot()}function vo(e,t,n){e.translate=F(t.translate,0,n),e.scale=F(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function wo(e,t,n,s){e.min=F(t.min,n.min,s),e.max=F(t.max,n.max,s)}function bf(e,t,n,s){wo(e.x,t.x,n.x,s),wo(e.y,t.y,n.y,s)}function xf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const vf={duration:.45,ease:[.4,0,.1,1]},To=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),So=To("applewebkit/")&&!To("chrome/")?Math.round:J;function ko(e){e.min=So(e.min),e.max=So(e.max)}function wf(e){ko(e.x),ko(e.y)}function Co(e,t,n){return e==="position"||e==="preserve-aspect"&&!Vd(ho(t),ho(n),.2)}function Tf(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Sf=go({attachResizeListener:(e,t)=>nt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ss={current:void 0},Ao=go({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ss.current){const e=new Sf({});e.mount(window),e.setOptions({layoutScroll:!0}),ss.current=e}return ss.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),kf={pan:{Feature:Wd},drag:{Feature:Ud,ProjectionNode:Ao,MeasureLayout:qi}};function Po(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&O.postRender(()=>o(t,st(t)))}class Cf extends be{mount(){const{current:t}=this.node;t&&(this.unmount=Hc(t,(n,s)=>(Po(this.node,s,"Start"),r=>Po(this.node,r,"End"))))}unmount(){}}class Af extends be{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=Re(nt(this.node.current,"focus",()=>this.onFocus()),nt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Vo(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=s[r];o&&O.postRender(()=>o(t,st(t)))}class Pf extends be{mount(){const{current:t}=this.node;t&&(this.unmount=Zc(t,(n,s)=>(Vo(this.node,s,"Start"),(r,{success:o})=>Vo(this.node,r,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const rs=new WeakMap,is=new WeakMap,Vf=e=>{const t=rs.get(e.target);t&&t(e)},Mf=e=>{e.forEach(Vf)};function Df({root:e,...t}){const n=e||document;is.has(n)||is.set(n,{});const s=is.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Mf,{root:e,...t})),s[r]}function Ef(e,t,n){const s=Df(t);return rs.set(e,n),s.observe(e),()=>{rs.delete(e),s.unobserve(e)}}const Nf={some:0,all:1};class Lf extends be{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Nf[r]},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 Ef(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(If(t,n))&&this.startObserver()}unmount(){}}function If({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Bf={...Td,...{inView:{Feature:Lf},tap:{Feature:Pf},focus:{Feature:Af},hover:{Feature:Cf}},...kf,...{layout:{ProjectionNode:Ao,MeasureLayout:qi}}},H=ju(Bf,Zu);function Of({children:e,className:t,...n}){return h.jsx("nav",{"aria-label":"Breadcrumb",className:T("w-full",t),...n,children:e})}function Ff({children:e,className:t,...n}){return h.jsx("ol",{className:T("flex flex-row gap-2 items-center justify-start",t),...n,children:e})}function jf({children:e,className:t,...n}){return h.jsx("li",{className:T("inline-flex items-center text-nowrap gap-1",t),...n,children:e})}function _f({children:e,className:t,current:n,...s}){return n?h.jsx("span",{"aria-current":"page",className:T("text-sm text-text",t),children:e}):h.jsx("a",{className:T("text-sm text-text-secondary hover:text-text",t),...s,children:e})}function $f({children:e,className:t,text:n,...s}){const[r,o]=g.useState(!1),i=g.useRef(null);g.useEffect(()=>{function l(u){!r||!i.current||i.current.contains(u.target)||o(!1)}document.addEventListener("mousedown",l);function c(u){u.key==="Escape"&&o(!1)}return document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c)}},[r]);function a(){o(l=>!l)}return h.jsxs("li",{className:"flex flex-col gap-1 relative",ref:i,children:[h.jsxs("button",{"aria-expanded":r,"aria-haspopup":"true","aria-label":"More options",className:T("flex flex-row gap-1 items-center justify-center rounded-md text-sm text-text-secondary px-2 hover:bg-surface-secondary hover:text-text transition-colors",t),onClick:a,...s,children:[n||h.jsx(ia,{}),h.jsx(H.span,{animate:{rotate:r?180:0},children:h.jsx(gs,{})})]}),h.jsx(xt,{children:r&&h.jsx(H.div,{animate:{opacity:1,scale:1,y:0},className:"absolute left-0 top-full mt-1 z-50 flex flex-col gap-1 rounded-md border border-border-subtle bg-surface px-2 py-1 shadow-md",exit:{opacity:0,scale:.95,y:-5},initial:{opacity:0,scale:.95,y:-5},transition:{duration:.1},children:e})})]})}function zf({className:e,icon:t,...n}){return h.jsx("li",{"aria-hidden":"true",className:T("text-text-secondary",e),role:"presentation",...n,children:t??h.jsx(ca,{className:"size-4"})})}const Uf=Pe(["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:T("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 Mo({children:e,className:t,ref:n,variant:s,...r}){return h.jsx("button",{className:T(Uf({variant:s}),t),ref:n,...r,children:e})}function Wf({children:e,className:t,ref:n,...s}){return h.jsx("div",{className:T("rounded-md border bg-surface border-border shadow-sm ",t),ref:n,...s,children:e})}function Kf({children:e,className:t,ref:n,...s}){return h.jsxs("div",{className:T("flex flex-col p-4 pb-3 ",t),ref:n,...s,children:[e,h.jsx("div",{className:"h-[2px] w-full bg-border-strong mt-2"})]})}function Gf({children:e,className:t,ref:n,...s}){return h.jsx("h3",{className:T("font-semibold leading-none tracking-tight text-xl",t),ref:n,...s,children:e})}function Rf({children:e,className:t,ref:n,...s}){return h.jsx("p",{className:T("font-semibold text-text-secondary",t),ref:n,...s,children:e})}function Hf({children:e,className:t,ref:n,...s}){return h.jsx("div",{className:T("p-4",t),ref:n,...s,children:e})}function Xf({children:e,className:t,ref:n,...s}){return h.jsxs("div",{className:T("flex flex-col gap-2 p-4 pt-0 text-text-secondary text-sm",t),ref:n,...s,children:[h.jsx("div",{className:"h-[1px] w-full bg-border"}),e]})}function Mt({children:e,className:t,disabled:n,error:s,ref:r,...o}){return h.jsx("label",{className:T("text-sm font-medium leading-none select-none cursor-pointer",n&&"cursor-not-allowed opacity-70",s&&"text-error-text",t),ref:r,...o,children:e})}function Yf({boxClassName:e,checked:t,className:n,disabled:s,error:r,icon:o,id:i,label:a,onCheckedChange:l,ref:c,...u}){const d=g.useId(),f=i||d;return h.jsxs("div",{className:T("flex items-center space-x-2 group w-fit",n),children:[h.jsxs("div",{className:"relative flex items-center",children:[h.jsx("input",{checked:t,className:"peer sr-only",disabled:s,id:f,onChange:m=>l(m.target.checked),ref:c,type:"checkbox",...u}),h.jsx("label",{className:T("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",t&&"bg-primary border-primary text-on-primary group-hover:ring-primary/20",r&&"border-error-border group-hover:ring-error/10 ",s&&"cursor-not-allowed bg-disabled-surface border-disabled-border opacity-50 group-hover:ring-0",e),htmlFor:f,children:h.jsx("div",{className:T("flex items-center justify-center pointer-events-none text-on-primary",t?"opacity-100":"opacity-0 transition-opacity duration-200"),children:o||h.jsx(Ot,{size:14,strokeWidth:3})})})]}),a&&h.jsx(Mt,{disabled:s,error:r,htmlFor:f,children:a})]})}function Do(e){g.useEffect(()=>{const t=n=>{n.key==="Escape"&&e(n)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e])}const Eo=g.createContext(null);function No(){const e=g.useContext(Eo);if(!e)throw new Error("Dialog components (like DialogTrigger, DialogContent) must be used within a <Dialog> provider.");return e}function Lo({children:e,defaultOpen:t=!1,onOpenChange:n,open:s}){const[r,o]=g.useState(t),i=s!==void 0,a=i?s:r,l=g.useCallback(c=>{i?n==null||n(c):o(c)},[i,n]);return h.jsx(Eo.Provider,{value:{onOpenChange:l,open:a},children:e})}function qf({children:e,ref:t,variant:n,...s}){const{onOpenChange:r}=No();return h.jsx(Mo,{onClick:()=>r(!0),ref:t,...s,variant:n,children:e})}const Zf=Pe("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"}}}),Jf={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 Io({children:e,className:t,closeButton:n=!1,position:s,ref:r,...o}){const{onOpenChange:i,open:a}=No();Do(()=>i(!1));const l=Jf[s??"center"];return Xo.createPortal(h.jsx(xt,{children:a&&h.jsxs(H.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:[h.jsx("div",{"aria-label":"Close overlay",className:"fixed inset-0 bg-black/70 hover:cursor-default",onClick:()=>i(!1),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&i(!1)},role:"button",tabIndex:-1}),h.jsxs(H.div,{"aria-modal":"true",className:T(Zf({position:s}),t),onClick:c=>c.stopPropagation(),role:"dialog",...l,ref:r,...o,children:[e,n&&h.jsx("button",{"aria-label":"Close dialog",className:"absolute top-4 right-4 hover:scale-105 hover:text-primary transition-all cursor-pointer",onClick:()=>i(!1),children:h.jsx(da,{size:32})})]})]})}),document.body)}function Qf({children:e,className:t,ref:n,subtitle:s,title:r,...o}){return h.jsxs("div",{className:T("flex flex-col gap-1 border-b-2 border-text pb-1 mb-3",t),ref:n,...o,children:[r&&h.jsx("h3",{className:"font-bold text-xl",children:r}),s&&h.jsx("p",{className:"text-text-secondary text-lg",children:s}),e]})}function eh({children:e,className:t,ref:n,text:s,...r}){return h.jsxs("div",{className:T("flex border-y-2 border-text p-2 my-2",t),ref:n,...r,children:[s&&h.jsx("p",{className:"w-full text-text italic text-center",children:s}),e]})}function th({children:e,className:t,...n}){return h.jsx("div",{className:T("flex-1 overflow-y-auto min-h-0",t),...n,children:e})}function nh({children:e,className:t,ref:n,...s}){return h.jsx("div",{className:T("w-full flex flex-row justify-end items-center gap-4 bottom-0",t),ref:n,...s,children:e})}function Bo(e,t){g.useEffect(()=>{const n=s=>{!e.current||e.current.contains(s.target)||t(s)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])}const Oo=g.createContext(null);function Fo(){const e=g.use(Oo);if(!e)throw new Error("Components like DropdownTrigger, DropdownItem and DropdownMenu must be used within <Dropdown> component.");return e}function sh({children:e,className:t,onOpenChange:n,open:s,triggerAction:r="click",...o}){const[i,a]=g.useState(s??!1),l=g.useRef(null),c=s!==void 0;function u(p){c||a(p),n==null||n(p)}const d=c?s:i;function f(){r==="hover"&&(l.current&&clearTimeout(l.current),u(!0))}function m(){r==="hover"&&(l.current=setTimeout(()=>{u(!1)},250))}return g.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]),h.jsx(Oo.Provider,{value:{onOpenChange:u,open:d,triggerAction:r},children:h.jsx("div",{className:T("relative flex flex-col gap-1",t),onMouseEnter:f,onMouseLeave:m,...o,children:e})})}function rh({children:e,className:t,onClick:n,...s}){const{onOpenChange:r,open:o,triggerAction:i}=Fo();function a(l){n==null||n(l),i==="click"&&r(!0)}return h.jsx("button",{"aria-expanded":o,"aria-haspopup":"menu",className:T("p-2 bg-surface hover:bg-surface-secondary rounded-md border transition-all border-border-strong",t),onClick:a,type:"button",...s,children:e})}function ih({active:e,as:t,children:n,className:s,icon:r,showIcon:o,variant:i="button",...a}){const l=t??"button",c=i==="checkbox"?"menuitemcheckbox":i==="radio"?"menuitemradio":"menuitem",u=l==="button";return h.jsxs(l,{"aria-checked":i==="checkbox"||i==="radio"?e:void 0,className:T("px-2 py-1 gap-2 flex flex-row items-center justify-between text-nowrap group hover:bg-surface-secondary focus:bg-surface-secondary outline-none",e&&"font-bold",a.disabled&&"opacity-50 cursor-not-allowed",s),role:c,type:u?"button":void 0,...a,children:[h.jsx("div",{className:"flex items-center gap-2",children:n}),o&&h.jsx("div",{className:"flex items-center justify-center w-5 h-5",children:r||h.jsxs(h.Fragment,{children:[i==="link"&&h.jsx(ta,{className:"w-4 h-4"}),(i==="button"||i==="checkbox")&&e&&h.jsx(Ot,{className:"w-4 h-4"}),i==="radio"&&e&&h.jsx(sa,{className:"w-4 h-4"})]})})]})}const oh=Pe("absolute flex flex-col p-1 gap-1 bg-surface rounded border border-border shadow z-20 min-w-max",{defaultVariants:{position:"bottom-start"},variants:{position:{"bottom-center":"top-full left-1/2 -translate-x-1/2 mt-1","bottom-end":"top-full right-0 mt-1","bottom-start":"top-full left-0 mt-1","left-center":"right-full -translate-y-1/2 top-1/2 mr-1","left-end":"right-full -translate-y-full top-full mr-1","left-start":"right-full top-0 mr-1","right-center":"left-full -translate-y-1/2 top-1/2 ml-1","right-end":"left-full -translate-y-full top-full ml-1","right-start":"left-full top-0 ml-1","top-center":"bottom-full left-1/2 -translate-x-1/2 mb-1","top-end":"bottom-full right-0 mb-1","top-start":"bottom-full left-0 mb-1"}}});function ah({children:e,className:t,position:n,...s}){const{onOpenChange:r,open:o}=Fo(),i=g.useRef(null);return Bo(i,()=>r(!1)),Do(()=>r(!1)),g.useEffect(()=>{if(!o)return;function a(l){var c;if(i.current&&(l.key==="ArrowDown"||l.key==="ArrowUp")){l.preventDefault();const u=Array.from(i.current.querySelectorAll('[role^="menuitem"]'));if(!u.length)return;const d=u.indexOf(document.activeElement);let f=0;l.key==="ArrowDown"?f=d<u.length-1?d+1:0:l.key==="ArrowUp"&&(f=d>0?d-1:u.length-1),(c=u[f])==null||c.focus()}}return document.body.addEventListener("keydown",a),()=>{document.body.removeEventListener("keydown",a)}},[o]),o?h.jsx("div",{"aria-orientation":"vertical",className:T(oh({position:n}),t),ref:i,role:"menu",tabIndex:-1,...s,children:e}):null}function lh({className:e,disabled:t,errorText:n,icon:s,id:r,ref:o,suffix:i,...a}){const l=g.useId(),c=r||l,u=`${c}-error`;return h.jsxs("div",{className:"flex flex-col relative",children:[h.jsxs("div",{className:T("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",t&&"opacity-50 cursor-not-allowed bg-disabled-surface",n&&!t?"border-error focus-within:ring-error":"border-border focus-within:ring-primary-focus",e),children:[s&&h.jsx("div",{className:"text-text flex pr-1 border-r-2 border-text",children:s}),h.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 ${t&&"cursor-not-allowed"}`,disabled:t,id:c,ref:o,...a}),i&&h.jsx("div",{className:"flex shrink-0 text-text-secondary",children:i})]}),h.jsx(xt,{mode:"wait",children:n&&h.jsx(H.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 ch({className:e,color:t,dotsCount:n=3,duration:s=.7,gap:r=6,itemStagger:o=.2,jumpHeight:i=15,repeatDuration:a=.5,size:l=10,...c}){const u={animate:{transition:{delayChildren:Rr(o)}}},d={animate:{transition:{duration:s,ease:"easeInOut",repeat:1/0,repeatDelay:a},y:[0,-i,0]}};return h.jsx("div",{className:T("flex items-center justify-center",e),...c,"aria-label":"Loading",role:"status",children:h.jsx(H.div,{animate:"animate",className:"flex flex-row w-full h-full",initial:"initial",style:{gap:r},variants:u,children:Array.from({length:n}).map((f,m)=>h.jsx(H.div,{className:"rounded-full border border-border",style:{backgroundColor:t??"var(--primary)",height:l,width:l},variants:d},m))})})}function uh({className:e,primaryColor:t,primaryDuration:n=1,secondaryColor:s,secondaryDuration:r=.8,size:o=48,...i}){const a=o/2,l=o*.35,c=o*.2;return h.jsxs("div",{className:T("relative flex justify-center items-center",e),...i,style:{height:o,width:o},children:[h.jsx(H.div,{animate:{rotate:360},className:"absolute top-0 left-1/2 rounded-full",style:{backgroundColor:t??"var(--primary)",height:l,transformOrigin:`50% ${a}px`,width:l,x:"-50%"},transition:{duration:n,ease:"linear",repeat:1/0}}),h.jsx(H.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:r,ease:"linear",repeat:1/0}})]})}function dh({barCount:e=5,barHeight:t,barWidth:n=16,className:s,color:r,duration:o,itemStagger:i=.15,...a}){const l=Math.max(10,t/4),c={animate:{opacity:1,transition:{delayChildren:Rr(i)}},initial:{opacity:0}},u={animate:{height:[l,t,l],transition:{duration:o||e*.3,ease:"easeInOut",repeat:1/0}},initial:{height:l}},d=Array.from({length:e},(f,m)=>m);return h.jsx("div",{"aria-label":"Loading",className:T("relative flex items-center justify-center",s),role:"status",...a,children:h.jsx(H.ul,{animate:"animate",className:"flex flex-row gap-4 h-full w-full items-center justify-center",initial:"initial",style:{height:t},variants:c,children:d.map(f=>h.jsx(H.li,{style:{backgroundColor:r??"var(--primary)",borderRadius:n/2,width:n},variants:u},f))})})}function fh({className:e,duration:t=2,ease:n="easeInOut",primaryColor:s,rotationsCount:r=5,secondaryColor:o,size:i=72,thickness:a,...l}){return t=t<.25?.25:t,h.jsx("div",{className:T("relative flex items-center justify-center",e),...l,"aria-label":"Loading",role:"status",children:h.jsx(H.div,{animate:{rotate:r*360},className:"relative rounded-full flex items-center justify-center overflow-hidden",style:{borderColor:s??"var(--primary)",borderTopColor:o??"var(--secondary)",borderWidth:a||i/6,height:i,width:i},transition:{duration:t,ease:n,repeat:1/0,type:n==="linear"?void 0:"spring"}})})}const jo=g.createContext(null);function hh({children:e,className:t,disabled:n,name:s,onValueChange:r,value:o,...i}){const a=g.useId(),l=s||a;return h.jsx(jo.Provider,{value:{disabled:n,name:l,onValueChange:r,value:o},children:h.jsx("div",{className:T("flex flex-col gap-2",t),role:"radiogroup",...i,children:e})})}function mh({className:e,id:t,label:n,value:s,...r}){const o=g.use(jo);if(!o)throw new Error("RadioButton must be used within a RadioGroup");const i=g.useId(),a=t||i,l=o.value===s,c=r.disabled||o.disabled;return h.jsxs("label",{className:T("flex items-center gap-2 group relative transition-opacity group",c?"cursor-not-allowed opacity-50":"cursor-pointer"),children:[h.jsx("input",{checked:l,className:"peer sr-only",disabled:c,id:a,name:o.name,onChange:()=>o.onValueChange(s),type:"radio",value:s,...r}),h.jsx("div",{className:T("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",e),children:h.jsx(ra,{className:T("h-2.5 w-2.5 block transition-transform duration-200",l?"scale-100":"scale-0"),fill:"currentColor"})}),n&&h.jsx(Mt,{disabled:c,htmlFor:a,children:n})]})}const _o=768;function $o(){return g.useSyncExternalStore(e=>{const t=window.matchMedia(`(max-width: ${_o-1}px)`);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},()=>window.matchMedia(`(max-width: ${_o-1}px)`).matches,()=>!1)}const zo=g.createContext(null);function os(){const e=g.use(zo);if(!e)throw new Error("Select Components like SelectTrigger, SelectContent and SelectItem must be used inside the Select component ");return e}function ph({children:e,className:t,mode:n="single",name:s,onSelect:r,ref:o,value:i,...a}){const[l,c]=g.useState(n==="multiple"?[]:""),[u,d]=g.useState(!1),f=i!==void 0?i:l;function m(p){let y;if(n==="multiple"){const b=Array.isArray(f)?f:[];b.includes(p)?y=b.filter(v=>v!==p):y=[...b,p]}else y=p;c(y),r&&r(y)}return h.jsxs(zo.Provider,{value:{mode:n,onOpenChange:d,onSelect:m,open:u,value:f},children:[h.jsx("div",{className:T("relative flex flex-col",t),...a,children:e}),n==="multiple"&&Array.isArray(f)?f.map((p,y)=>h.jsx("input",{name:s,ref:y===0?o:void 0,type:"hidden",value:p},p)):h.jsx("input",{name:s,ref:o,type:"hidden",value:f})]})}function gh({children:e,className:t,placeholder:n="Select option",valueFormatter:s,...r}){const{onOpenChange:o,value:i}=os();function a(){o(!0)}const l=Array.isArray(i),c=l?i.length>0:!!i;let u=n;return c&&(s?l?u=i.map(f=>s(f)).map((f,m)=>h.jsxs("span",{children:[f,m<i.length-1?", ":""]},i[m])):u=s(i):u=l?i.join(", "):i),h.jsxs("button",{className:T("flex min-w-[150px] items-center justify-between p-2 border-border border bg-input-background cursor-pointer rounded focus:outline-none focus:ring-2 focus:ring-input-focus hover:bg-input-focus",!c&&"text-text-secondary",t),onClick:a,type:"button",...r,children:[h.jsx("span",{className:"truncate",children:e??u}),h.jsx(gs,{className:"ml-2 opacity-50 text-xs"})]})}function yh({children:e,className:t,...n}){const{onOpenChange:s,open:r}=os(),o=$o(),i=g.useRef(null);if(Bo(i,()=>s(!1)),g.useEffect(()=>{if(!r)return;function l(c){var u;if(i.current){if(c.key==="Escape"){s(!1);return}if(c.key==="ArrowDown"||c.key==="ArrowUp"){c.preventDefault();const d=Array.from(i.current.querySelectorAll('[role="option"]'));if(!d.length)return;const f=d.indexOf(document.activeElement);let m=0;c.key==="ArrowDown"?m=f<d.length-1?f+1:0:c.key==="ArrowUp"&&(m=f>0?f-1:d.length-1),(u=d[m])==null||u.focus()}}}return document.body.addEventListener("keydown",l),()=>{document.body.removeEventListener("keydown",l)}},[r,s]),!r)return null;const a=o?"fixed bottom-0 left-0 w-full max-h-[30vh] rounded-b-none border-b-0":"absolute top-[110%] w-full max-h-[250px] shadow-md";return h.jsx("div",{className:T("bg-input-background border rounded-md border-border overflow-y-auto z-50","focus:outline-none",a,t),ref:i,role:"listbox",tabIndex:-1,...n,children:e})}function bh({children:e,className:t,value:n,...s}){const{mode:r,onOpenChange:o,onSelect:i,value:a}=os();function l(){i(n),r==="single"&&o(!1)}function c(d){(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),l())}const u=Array.isArray(a)?a.includes(n):a===n;return h.jsx("div",{"aria-selected":u,className:T("cursor-pointer p-1 ","hover:bg-input-hover focus:bg-input-hover","focus:outline-none focus:ring-2 ring-input-focus",u&&"font-bold text-primary",t),"data-value":n,onClick:l,onKeyDown:c,role:"option",tabIndex:-1,...s,children:e})}function xh({children:e,className:t,orientation:n="horizontal",style:s,thickness:r=1,...o}){const i=n==="horizontal";return r<=0&&(r=1),h.jsx("div",{"aria-orientation":n,className:T("shrink-0 bg-text rounded",i?"w-full":"h-full",t),role:"separator",style:{[i?"height":"width"]:`${r}px`,...s},...o,...o,children:e})}const Uo=g.createContext(null);function Wo(){const e=g.useContext(Uo);if(!e)throw new Error("useSidebar must be used within a <Sidebar> provider.");return e}function vh({children:e,collapsed:t,defaultCollapsed:n=!1,mobileOpen:s,onCollapsedChange:r,onMobileOpenChange:o}){const i=$o(),[a,l]=g.useState(n),c=t!==void 0,u=c?t:a,[d,f]=g.useState(!1),m=s!==void 0,p=m?s:d,y=g.useCallback(w=>{c?r==null||r(w):l(w)},[c,r]),b=g.useCallback(w=>{m?o==null||o(w):f(w)},[m,o]),v=g.useCallback(()=>{i?b(!p):y(!u)},[i,p,b,u,y]),k=g.useMemo(()=>({collapsed:u,isMobile:i,mobileOpen:p,setCollapsed:y,setMobileOpen:b,toggleSidebar:v}),[u,p,y,b,v,i]);return h.jsx(Uo.Provider,{value:k,children:e})}function wh({children:e,className:t,collapsedWidth:n="3.5rem",dialogProps:s,ref:r,side:o="left",style:i,width:a="16rem",...l}){const{collapsed:c,isMobile:u,mobileOpen:d,setMobileOpen:f}=Wo();return u?h.jsx(Lo,{onOpenChange:f,open:d,children:h.jsx(Io,{closeButton:!1,position:o,...s,className:T("h-full bg-surface text-text border-border border-r",t,s==null?void 0:s.className),children:h.jsx("div",{className:"group/sidebar h-full flex flex-col","data-collapsed":"false",children:e})})}):h.jsx("aside",{className:T("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",t),"data-collapsed":c,ref:r,style:{width:c?n:a,...i},...l,children:e})}function Th({children:e,className:t,...n}){return h.jsx("div",{className:T("flex flex-col p-2 shrink-0 border-b-2 border-border",t),...n,children:e})}function Sh({children:e,className:t,ref:n,...s}){return h.jsx("div",{className:T("flex flex-col gap-2 flex-1 p-2",t),ref:n,...s,children:e})}function kh({categoryTitle:e,children:t,className:n,icon:s,...r}){const o="group-data-[collapsed=true]/sidebar:hidden";return h.jsx("div",{className:T("flex flex-row items-center gap-2 rounded-md p-2 transition-all","justify-start",e?"mt-2":"cursor-pointer hover:bg-info-surface",n),...r,children:e?h.jsxs(h.Fragment,{children:[h.jsx("h4",{className:T("font-bold text-lg whitespace-nowrap overflow-hidden",o),children:t}),h.jsx("div",{className:T("hidden group-data-[collapsed=true]/sidebar:block"),children:s??h.jsx(aa,{strokeWidth:3})})]}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"shrink-0 flex items-center justify-center",children:s}),h.jsx("div",{className:T("whitespace-nowrap overflow-hidden transition-opacity duration-200",o),children:t})]})})}function Ch({children:e,className:t,...n}){return h.jsx("div",{className:T("flex flex-col p-2 mt-auto shrink-0 border-t-2 border-border",t),...n,children:e})}function Ah({children:e,className:t,...n}){const{toggleSidebar:s}=Wo();return h.jsx("button",{className:T("p-2 rounded border border-border hover:bg-border transition-colors bg-border-subtle",t),onClick:()=>s(),title:"Toggle sidebar",...n,children:e})}const Ph={skeleton:"_skeleton_f10w5_1"};function Vh({className:e,variant:t,...n}){return h.jsx("div",{"aria-hidden":"true",className:T("bg-gray-600 relative overflow-hidden",t==="circle"?"rounded-full":"rounded-md",Ph.skeleton,e),role:"status",...n})}const Ko={status:"_status_tuepx_1",heartbeat:"_heartbeat_tuepx_5"},Mh={fast:"0.7s",normal:"1.3s",slow:"2.5s"};function Dh({className:e,speed:t="normal",style:n,variant:s="default",...r}){const o=typeof t=="number"?`${t}ms`:Mh[t];return h.jsx("div",{className:T("size-3 rounded-full bg-disabled-surface",Ko.status,s==="heartbeat"&&Ko.heartbeat,e),role:"status",style:{...n,"--status-duration":o},...r})}function Eh({checked:e,className:t,disabled:n,error:s,id:r,label:o,onChange:i,onCheckedChange:a,ref:l,switchIcon:c,...u}){const d=g.useId(),f=r||d,m=p=>{a(p.target.checked),i&&i(p)};return h.jsxs(h.Fragment,{children:[h.jsxs("label",{className:T("flex h-8 w-[60px] cursor-pointer items-center rounded-full p-1 transition-colors duration-300 shadow",e?"bg-primary":"bg-border-strong",n&&"cursor-not-allowed opacity-50",e?"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",t),htmlFor:f,children:[h.jsx("input",{checked:e,className:"peer sr-only",disabled:n,id:f,onChange:m,ref:l,type:"checkbox",...u}),h.jsx(H.div,{className:T("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&&h.jsx(H.div,{animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},initial:{opacity:0,scale:.5},children:c},e?"on":"off")})]}),o&&h.jsx(Mt,{disabled:n,error:s,htmlFor:f,children:o})]})}const Go=g.createContext(null);function Nh({children:e,className:t,defaultValue:n,onValueChange:s,tabsDirection:r="horizontal",...o}){const[i,a]=g.useState(n??""),l=g.useId(),c=g.useCallback(d=>{a(d),s==null||s(d)},[s]),u=g.useMemo(()=>({activeTab:i,baseId:l,setActiveTab:c,tabsDirection:r}),[i,l,c,r]);return h.jsx(Go.Provider,{value:u,children:h.jsx("div",{className:T("flex gap-3 w-full rounded-lg bg-surface p-4",r==="horizontal"?"flex-col items-center":"flex-row",t),...o,children:e})})}function as(){const e=g.use(Go);if(!e)throw new Error("Tabs components (like TabsList, Tab or TabContent) must be used within a <Tabs> provider.");return e}function Lh({children:e,className:t,grow:n=!1,justify:s="start",...r}){const{tabsDirection:o}=as(),i=o==="horizontal";return h.jsx("div",{"aria-orientation":o,className:T("flex border-text-secondary",i?"flex-row border-b w-full":"flex-col border-r shrink-0",s==="center"&&"justify-center",s==="end"&&"justify-end",s==="between"&&"justify-between",n&&"[&>*]:flex-1",t),role:"tablist",...r,children:e})}function Ih({children:e,className:t,disabled:n,value:s,...r}){const{activeTab:o,baseId:i,setActiveTab:a,tabsDirection:l}=as(),c=o===s;return h.jsx("button",{"aria-controls":`${i}-content-${s}`,"aria-selected":c,className:T("flex items-center px-1.5 text-text text-xl border-transparent transition-colors duration-200",n&&"text-text-secondary cursor-default",!n&&!c&&"hover:bg-surface-subtle hover:border-border-strong",c&&"bg-info-surface border-primary",l==="horizontal"?"rounded-t-md -mb-px border-b pt-1":"rounded-l-md -mr-px border-r py-1",t),disabled:n,id:`${i}-tab-${s}`,onClick:()=>{a(s)},role:"tab",tabIndex:c?0:-1,type:"button",...r,children:e})}function Bh({children:e,className:t,value:n,...s}){const{activeTab:r,baseId:o}=as();return r===n?h.jsx("div",{"aria-labelledby":`${o}-tab-${n}`,className:T("p-2 rounded-md flex-1 w-full",t),id:`${o}-content-${n}`,role:"tabpanel",tabIndex:0,...s,children:e}):null}function Oh({children:e,className:t,disabled:n,icon:s,iconAriaLabel:r="Tag action",onIconClick:o,variant:i="solid",...a}){const l=o?"button":"span";return h.jsxs("span",{className:T("inline-flex items-center justify-center gap-1.5 rounded-md text-sm font-medium transition-all","text-text bg-surface border-2 border-border-strong","px-3 py-1 transition-all",i==="dashed"&&"border-dashed",n&&"opacity-50 pointer-events-none",s&&"pr-1",t),...a,children:[h.jsx("span",{className:"leading-none",children:e}),s&&h.jsx(l,{"aria-label":o?r:void 0,className:T("flex items-center justify-center shrink-0 transition-colors p-0.5 rounded-sm","text-text-secondary",o?"cursor-pointer hover:text-primary-focus hover:bg-black/5 dark:hover:bg-white/10":"cursor-default select-none pointer-events-none"),onClick:o?c=>{c.stopPropagation(),o==null||o()}:void 0,type:o?"button":void 0,children:s})]})}const Fh=Pe("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 jh({align:e,as:t,children:n,className:s,color:r,italic:o,ref:i,size:a,underline:l,weight:c,...u}){const d=t||"p";return h.jsx(d,{className:T(Fh({align:e,color:r,italic:o,size:a,underline:l,weight:c}),s),ref:i,...u,children:n})}function _h({className:e,disabled:t,errorText:n,id:s,ref:r,...o}){const i=g.useId(),a=s||i,l=`${a}-error`;return h.jsxs("div",{className:"w-full flex flex-col relative",children:[h.jsx("textarea",{"aria-describedby":n?l:void 0,"aria-invalid":!!n,className:T("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",t&&"opacity-50 cursor-not-allowed bg-disabled-surface",n&&!t?"border-error focus-within:ring-error":"border-border focus-within:ring-primary-focus",e),disabled:t,id:a,ref:r,...o}),h.jsx(xt,{mode:"wait",children:n&&h.jsx(H.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})})]})}S.Alert=tl,S.AlertMessage=sl,S.AlertTitle=nl,S.Badge=il,S.Breadcrumb=Of,S.BreadcrumbItem=jf,S.BreadcrumbLink=_f,S.BreadcrumbList=Ff,S.BreadcrumbMenu=$f,S.BreadcrumbSeparator=zf,S.Button=Mo,S.Card=Wf,S.CardContent=Hf,S.CardDescription=Rf,S.CardFooter=Xf,S.CardHeader=Kf,S.CardTitle=Gf,S.Checkbox=Yf,S.Dialog=Lo,S.DialogBody=th,S.DialogButtons=nh,S.DialogContent=Io,S.DialogFooter=eh,S.DialogHeader=Qf,S.DialogTrigger=qf,S.Dots=ch,S.Dropdown=sh,S.DropdownItem=ih,S.DropdownMenu=ah,S.DropdownTrigger=rh,S.Input=lh,S.Label=Mt,S.Orbital=uh,S.RadioButton=mh,S.RadioGroup=hh,S.ScreenLoader=dh,S.Select=ph,S.SelectContent=yh,S.SelectItem=bh,S.SelectTrigger=gh,S.Separator=xh,S.Sidebar=vh,S.SidebarBody=Sh,S.SidebarContent=wh,S.SidebarFooter=Ch,S.SidebarHeader=Th,S.SidebarItem=kh,S.SidebarTrigger=Ah,S.Skeleton=Vh,S.Spinner=fh,S.Status=Dh,S.Switch=Eh,S.Tab=Ih,S.TabContent=Bh,S.Tabs=Nh,S.TabsList=Lh,S.Tag=Oh,S.Text=jh,S.Textarea=_h,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})}));