@lovelybunch/api 1.0.69-alpha.15 → 1.0.69-alpha.16
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.
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { Context } from 'hono';
|
|
2
2
|
/**
|
|
3
3
|
* GET /api/v1/version
|
|
4
|
-
* Returns the current version of Coconut
|
|
4
|
+
* Returns the current version of Coconut
|
|
5
5
|
* Requires authentication
|
|
6
6
|
*/
|
|
7
7
|
export declare function GET(c: Context): Promise<(Response & import("hono").TypedResponse<{
|
|
8
8
|
success: true;
|
|
9
9
|
data: {
|
|
10
10
|
version: any;
|
|
11
|
-
name: any;
|
|
12
|
-
description: any;
|
|
13
11
|
};
|
|
14
12
|
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
15
13
|
success: false;
|
|
@@ -18,12 +16,6 @@ export declare function GET(c: Context): Promise<(Response & import("hono").Type
|
|
|
18
16
|
message: any;
|
|
19
17
|
};
|
|
20
18
|
}, 401, "json">) | (Response & import("hono").TypedResponse<{
|
|
21
|
-
success: false;
|
|
22
|
-
error: {
|
|
23
|
-
code: string;
|
|
24
|
-
message: string;
|
|
25
|
-
};
|
|
26
|
-
}, 404, "json">) | (Response & import("hono").TypedResponse<{
|
|
27
19
|
success: false;
|
|
28
20
|
error: {
|
|
29
21
|
code: string;
|
|
@@ -4,29 +4,28 @@ import { fileURLToPath } from 'url';
|
|
|
4
4
|
import { requireAuth } from '../../../../middleware/auth.js';
|
|
5
5
|
/**
|
|
6
6
|
* GET /api/v1/version
|
|
7
|
-
* Returns the current version of Coconut
|
|
7
|
+
* Returns the current version of Coconut
|
|
8
8
|
* Requires authentication
|
|
9
9
|
*/
|
|
10
10
|
export async function GET(c) {
|
|
11
11
|
try {
|
|
12
12
|
// Require authentication
|
|
13
13
|
requireAuth(c);
|
|
14
|
-
//
|
|
15
|
-
//
|
|
14
|
+
// Read the API package's own package.json
|
|
15
|
+
// This works both in dev (from source) and production (from dist)
|
|
16
16
|
const __filename = fileURLToPath(import.meta.url);
|
|
17
17
|
const __dirname = path.dirname(__filename);
|
|
18
|
-
// Navigate up
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
// Navigate up from dist/routes/api/v1/version to the package root
|
|
19
|
+
// In dev: src/routes/api/v1/version -> ../../../../..
|
|
20
|
+
// In prod: dist/routes/api/v1/version -> ../../../../..
|
|
21
|
+
let packageJsonPath = path.resolve(__dirname, '..', '..', '..', '..', '..', 'package.json');
|
|
21
22
|
// Read package.json
|
|
22
23
|
const content = await fs.readFile(packageJsonPath, 'utf-8');
|
|
23
24
|
const packageJson = JSON.parse(content);
|
|
24
25
|
return c.json({
|
|
25
26
|
success: true,
|
|
26
27
|
data: {
|
|
27
|
-
version: packageJson.version
|
|
28
|
-
name: packageJson.name,
|
|
29
|
-
description: packageJson.description
|
|
28
|
+
version: packageJson.version
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
31
|
}
|
|
@@ -41,20 +40,11 @@ export async function GET(c) {
|
|
|
41
40
|
}
|
|
42
41
|
}, 401);
|
|
43
42
|
}
|
|
44
|
-
if (error.code === 'ENOENT') {
|
|
45
|
-
return c.json({
|
|
46
|
-
success: false,
|
|
47
|
-
error: {
|
|
48
|
-
code: 'VERSION_NOT_FOUND',
|
|
49
|
-
message: 'Could not find package.json'
|
|
50
|
-
}
|
|
51
|
-
}, 404);
|
|
52
|
-
}
|
|
53
43
|
return c.json({
|
|
54
44
|
success: false,
|
|
55
45
|
error: {
|
|
56
46
|
code: 'VERSION_ERROR',
|
|
57
|
-
message: error.message
|
|
47
|
+
message: error.message || 'Failed to read version'
|
|
58
48
|
}
|
|
59
49
|
}, 500);
|
|
60
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovelybunch/api",
|
|
3
|
-
"version": "1.0.69-alpha.
|
|
3
|
+
"version": "1.0.69-alpha.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/server-with-static.js",
|
|
6
6
|
"exports": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@hono/node-server": "^1.13.7",
|
|
38
38
|
"@hono/node-ws": "^1.0.6",
|
|
39
|
-
"@lovelybunch/core": "^1.0.69-alpha.
|
|
40
|
-
"@lovelybunch/mcp": "^1.0.69-alpha.
|
|
41
|
-
"@lovelybunch/types": "^1.0.69-alpha.
|
|
39
|
+
"@lovelybunch/core": "^1.0.69-alpha.16",
|
|
40
|
+
"@lovelybunch/mcp": "^1.0.69-alpha.16",
|
|
41
|
+
"@lovelybunch/types": "^1.0.69-alpha.16",
|
|
42
42
|
"arctic": "^1.9.2",
|
|
43
43
|
"bcrypt": "^5.1.1",
|
|
44
44
|
"cookie": "^0.6.0",
|
|
@@ -651,7 +651,7 @@ Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}
|
|
|
651
651
|
|
|
652
652
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
653
653
|
|
|
654
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ez="DialogDescriptionWarning",Sz=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${OO(Ez).contentName}}.`;return w.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},oy=vO,jO=EO,ly=_O,jd=wO,Ld=CO,Md=NO,Fd=kO,om=DO;const LO=oy,_z=ly,MO=w.forwardRef(({className:e,...t},n)=>r.jsx(jd,{className:Ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));MO.displayName=jd.displayName;const wz=uc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),cy=w.forwardRef(({side:e="right",className:t,children:n,...s},a)=>r.jsxs(_z,{children:[r.jsx(MO,{}),r.jsxs(Ld,{ref:a,className:Ae(wz({side:e}),t),...s,children:[n,r.jsxs(om,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r.jsx(wr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));cy.displayName=Ld.displayName;const uy=({className:e,...t})=>r.jsx("div",{className:Ae("flex flex-col space-y-2 text-center sm:text-left",e),...t});uy.displayName="SheetHeader";const dy=w.forwardRef(({className:e,...t},n)=>r.jsx(Md,{ref:n,className:Ae("text-lg font-semibold text-foreground",e),...t}));dy.displayName=Md.displayName;const FO=w.forwardRef(({className:e,...t},n)=>r.jsx(Fd,{ref:n,className:Ae("text-sm text-muted-foreground",e),...t}));FO.displayName=Fd.displayName;function Q2({className:e,...t}){return r.jsx("div",{className:Ae("animate-pulse rounded-md bg-muted",e),...t})}const Cz=["top","right","bottom","left"],ki=Math.min,as=Math.max,xp=Math.round,Df=Math.floor,ta=e=>({x:e,y:e}),Tz={left:"right",right:"left",bottom:"top",top:"bottom"},Nz={start:"end",end:"start"};function Hx(e,t,n){return as(e,ki(t,n))}function Ua(e,t){return typeof e=="function"?e(t):e}function Ha(e){return e.split("-")[0]}function fc(e){return e.split("-")[1]}function hy(e){return e==="x"?"y":"x"}function fy(e){return e==="y"?"height":"width"}const Az=new Set(["top","bottom"]);function Qs(e){return Az.has(Ha(e))?"y":"x"}function py(e){return hy(Qs(e))}function kz(e,t,n){n===void 0&&(n=!1);const s=fc(e),a=py(e),o=fy(a);let u=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(u=vp(u)),[u,vp(u)]}function Rz(e){const t=vp(e);return[$x(e),t,$x(t)]}function $x(e){return e.replace(/start|end/g,t=>Nz[t])}const J2=["left","right"],ek=["right","left"],Dz=["top","bottom"],Iz=["bottom","top"];function Oz(e,t,n){switch(e){case"top":case"bottom":return n?t?ek:J2:t?J2:ek;case"left":case"right":return t?Dz:Iz;default:return[]}}function jz(e,t,n,s){const a=fc(e);let o=Oz(Ha(e),n==="start",s);return a&&(o=o.map(u=>u+"-"+a),t&&(o=o.concat(o.map($x)))),o}function vp(e){return e.replace(/left|right|bottom|top/g,t=>Tz[t])}function Lz(e){return{top:0,right:0,bottom:0,left:0,...e}}function PO(e){return typeof e!="number"?Lz(e):{top:e,right:e,bottom:e,left:e}}function yp(e){const{x:t,y:n,width:s,height:a}=e;return{width:s,height:a,top:n,left:t,right:t+s,bottom:n+a,x:t,y:n}}function tk(e,t,n){let{reference:s,floating:a}=e;const o=Qs(t),u=py(t),c=fy(u),d=Ha(t),h=o==="y",p=s.x+s.width/2-a.width/2,m=s.y+s.height/2-a.height/2,b=s[c]/2-a[c]/2;let v;switch(d){case"top":v={x:p,y:s.y-a.height};break;case"bottom":v={x:p,y:s.y+s.height};break;case"right":v={x:s.x+s.width,y:m};break;case"left":v={x:s.x-a.width,y:m};break;default:v={x:s.x,y:s.y}}switch(fc(t)){case"start":v[u]-=b*(n&&h?-1:1);break;case"end":v[u]+=b*(n&&h?-1:1);break}return v}const Mz=async(e,t,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:o=[],platform:u}=n,c=o.filter(Boolean),d=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:m}=tk(h,s,d),b=s,v={},C=0;for(let S=0;S<c.length;S++){const{name:g,fn:y}=c[S],{x:E,y:_,data:T,reset:A}=await y({x:p,y:m,initialPlacement:s,placement:b,strategy:a,middlewareData:v,rects:h,platform:u,elements:{reference:e,floating:t}});p=E??p,m=_??m,v={...v,[g]:{...v[g],...T}},A&&C<=50&&(C++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(h=A.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:a}):A.rects),{x:p,y:m}=tk(h,b,d)),S=-1)}return{x:p,y:m,placement:b,strategy:a,middlewareData:v}};async function hd(e,t){var n;t===void 0&&(t={});const{x:s,y:a,platform:o,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:v=0}=Ua(t,e),C=PO(v),g=c[b?m==="floating"?"reference":"floating":m],y=yp(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),E=m==="floating"?{x:s,y:a,width:u.floating.width,height:u.floating.height}:u.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),T=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},A=yp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:_,strategy:d}):E);return{top:(y.top-A.top+C.top)/T.y,bottom:(A.bottom-y.bottom+C.bottom)/T.y,left:(y.left-A.left+C.left)/T.x,right:(A.right-y.right+C.right)/T.x}}const Fz=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:a,rects:o,platform:u,elements:c,middlewareData:d}=t,{element:h,padding:p=0}=Ua(e,t)||{};if(h==null)return{};const m=PO(p),b={x:n,y:s},v=py(a),C=fy(v),S=await u.getDimensions(h),g=v==="y",y=g?"top":"left",E=g?"bottom":"right",_=g?"clientHeight":"clientWidth",T=o.reference[C]+o.reference[v]-b[v]-o.floating[C],A=b[v]-o.reference[v],k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let j=k?k[_]:0;(!j||!await(u.isElement==null?void 0:u.isElement(k)))&&(j=c.floating[_]||o.floating[C]);const R=T/2-A/2,F=j/2-S[C]/2-1,M=ki(m[y],F),H=ki(m[E],F),U=M,L=j-S[C]-H,$=j/2-S[C]/2+R,X=Hx(U,$,L),P=!d.arrow&&fc(a)!=null&&$!==X&&o.reference[C]/2-($<U?M:H)-S[C]/2<0,Z=P?$<U?$-U:$-L:0;return{[v]:b[v]+Z,data:{[v]:X,centerOffset:$-X-Z,...P&&{alignmentOffset:Z}},reset:P}}}),Pz=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:a,middlewareData:o,rects:u,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:S=!0,...g}=Ua(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Ha(a),E=Qs(c),_=Ha(c)===c,T=await(d.isRTL==null?void 0:d.isRTL(h.floating)),A=b||(_||!S?[vp(c)]:Rz(c)),k=C!=="none";!b&&k&&A.push(...jz(c,S,C,T));const j=[c,...A],R=await hd(t,g),F=[];let M=((s=o.flip)==null?void 0:s.overflows)||[];if(p&&F.push(R[y]),m){const $=kz(a,u,T);F.push(R[$[0]],R[$[1]])}if(M=[...M,{placement:a,overflows:F}],!F.every($=>$<=0)){var H,U;const $=(((H=o.flip)==null?void 0:H.index)||0)+1,X=j[$];if(X&&(!(m==="alignment"?E!==Qs(X):!1)||M.every(Y=>Qs(Y.placement)===E?Y.overflows[0]>0:!0)))return{data:{index:$,overflows:M},reset:{placement:X}};let P=(U=M.filter(Z=>Z.overflows[0]<=0).sort((Z,Y)=>Z.overflows[1]-Y.overflows[1])[0])==null?void 0:U.placement;if(!P)switch(v){case"bestFit":{var L;const Z=(L=M.filter(Y=>{if(k){const B=Qs(Y.placement);return B===E||B==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(B=>B>0).reduce((B,O)=>B+O,0)]).sort((Y,B)=>Y[1]-B[1])[0])==null?void 0:L[0];Z&&(P=Z);break}case"initialPlacement":P=c;break}if(a!==P)return{reset:{placement:P}}}return{}}}};function nk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rk(e){return Cz.some(t=>e[t]>=0)}const Bz=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:s="referenceHidden",...a}=Ua(e,t);switch(s){case"referenceHidden":{const o=await hd(t,{...a,elementContext:"reference"}),u=nk(o,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:rk(u)}}}case"escaped":{const o=await hd(t,{...a,altBoundary:!0}),u=nk(o,n.floating);return{data:{escapedOffsets:u,escaped:rk(u)}}}default:return{}}}}},BO=new Set(["left","top"]);async function Uz(e,t){const{placement:n,platform:s,elements:a}=e,o=await(s.isRTL==null?void 0:s.isRTL(a.floating)),u=Ha(n),c=fc(n),d=Qs(n)==="y",h=BO.has(u)?-1:1,p=o&&d?-1:1,m=Ua(t,e);let{mainAxis:b,crossAxis:v,alignmentAxis:C}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof C=="number"&&(v=c==="end"?C*-1:C),d?{x:v*p,y:b*h}:{x:b*h,y:v*p}}const Hz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:a,y:o,placement:u,middlewareData:c}=t,d=await Uz(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:a+d.x,y:o+d.y,data:{...d,placement:u}}}}},$z=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:a}=t,{mainAxis:o=!0,crossAxis:u=!1,limiter:c={fn:g=>{let{x:y,y:E}=g;return{x:y,y:E}}},...d}=Ua(e,t),h={x:n,y:s},p=await hd(t,d),m=Qs(Ha(a)),b=hy(m);let v=h[b],C=h[m];if(o){const g=b==="y"?"top":"left",y=b==="y"?"bottom":"right",E=v+p[g],_=v-p[y];v=Hx(E,v,_)}if(u){const g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",E=C+p[g],_=C-p[y];C=Hx(E,C,_)}const S=c.fn({...t,[b]:v,[m]:C});return{...S,data:{x:S.x-n,y:S.y-s,enabled:{[b]:o,[m]:u}}}}}},zz=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:a,rects:o,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Ua(e,t),p={x:n,y:s},m=Qs(a),b=hy(m);let v=p[b],C=p[m];const S=Ua(c,t),g=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const _=b==="y"?"height":"width",T=o.reference[b]-o.floating[_]+g.mainAxis,A=o.reference[b]+o.reference[_]-g.mainAxis;v<T?v=T:v>A&&(v=A)}if(h){var y,E;const _=b==="y"?"width":"height",T=BO.has(Ha(a)),A=o.reference[m]-o.floating[_]+(T&&((y=u.offset)==null?void 0:y[m])||0)+(T?0:g.crossAxis),k=o.reference[m]+o.reference[_]+(T?0:((E=u.offset)==null?void 0:E[m])||0)-(T?g.crossAxis:0);C<A?C=A:C>k&&(C=k)}return{[b]:v,[m]:C}}}},Gz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:a,rects:o,platform:u,elements:c}=t,{apply:d=()=>{},...h}=Ua(e,t),p=await hd(t,h),m=Ha(a),b=fc(a),v=Qs(a)==="y",{width:C,height:S}=o.floating;let g,y;m==="top"||m==="bottom"?(g=m,y=b===(await(u.isRTL==null?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(y=m,g=b==="end"?"top":"bottom");const E=S-p.top-p.bottom,_=C-p.left-p.right,T=ki(S-p[g],E),A=ki(C-p[y],_),k=!t.middlewareData.shift;let j=T,R=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=_),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(j=E),k&&!b){const M=as(p.left,0),H=as(p.right,0),U=as(p.top,0),L=as(p.bottom,0);v?R=C-2*(M!==0||H!==0?M+H:as(p.left,p.right)):j=S-2*(U!==0||L!==0?U+L:as(p.top,p.bottom))}await d({...t,availableWidth:R,availableHeight:j});const F=await u.getDimensions(c.floating);return C!==F.width||S!==F.height?{reset:{rects:!0}}:{}}}};function lm(){return typeof window<"u"}function pc(e){return UO(e)?(e.nodeName||"").toLowerCase():"#document"}function ls(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function aa(e){var t;return(t=(UO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function UO(e){return lm()?e instanceof Node||e instanceof ls(e).Node:!1}function Ls(e){return lm()?e instanceof Element||e instanceof ls(e).Element:!1}function ra(e){return lm()?e instanceof HTMLElement||e instanceof ls(e).HTMLElement:!1}function sk(e){return!lm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ls(e).ShadowRoot}const qz=new Set(["inline","contents"]);function Pd(e){const{overflow:t,overflowX:n,overflowY:s,display:a}=Ms(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!qz.has(a)}const Wz=new Set(["table","td","th"]);function Vz(e){return Wz.has(pc(e))}const Yz=[":popover-open",":modal"];function cm(e){return Yz.some(t=>{try{return e.matches(t)}catch{return!1}})}const Kz=["transform","translate","scale","rotate","perspective"],Xz=["transform","translate","scale","rotate","perspective","filter"],Zz=["paint","layout","strict","content"];function my(e){const t=gy(),n=Ls(e)?Ms(e):e;return Kz.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Xz.some(s=>(n.willChange||"").includes(s))||Zz.some(s=>(n.contain||"").includes(s))}function Qz(e){let t=Ri(e);for(;ra(t)&&!Wl(t);){if(my(t))return t;if(cm(t))return null;t=Ri(t)}return null}function gy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Jz=new Set(["html","body","#document"]);function Wl(e){return Jz.has(pc(e))}function Ms(e){return ls(e).getComputedStyle(e)}function um(e){return Ls(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ri(e){if(pc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sk(e)&&e.host||aa(e);return sk(t)?t.host:t}function HO(e){const t=Ri(e);return Wl(t)?e.ownerDocument?e.ownerDocument.body:e.body:ra(t)&&Pd(t)?t:HO(t)}function fd(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=HO(e),o=a===((s=e.ownerDocument)==null?void 0:s.body),u=ls(a);if(o){const c=zx(u);return t.concat(u,u.visualViewport||[],Pd(a)?a:[],c&&n?fd(c):[])}return t.concat(a,fd(a,[],n))}function zx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $O(e){const t=Ms(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=ra(e),o=a?e.offsetWidth:n,u=a?e.offsetHeight:s,c=xp(n)!==o||xp(s)!==u;return c&&(n=o,s=u),{width:n,height:s,$:c}}function by(e){return Ls(e)?e:e.contextElement}function Ml(e){const t=by(e);if(!ra(t))return ta(1);const n=t.getBoundingClientRect(),{width:s,height:a,$:o}=$O(t);let u=(o?xp(n.width):n.width)/s,c=(o?xp(n.height):n.height)/a;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const eG=ta(0);function zO(e){const t=ls(e);return!gy()||!t.visualViewport?eG:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tG(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ls(e)?!1:t}function mo(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=by(e);let u=ta(1);t&&(s?Ls(s)&&(u=Ml(s)):u=Ml(e));const c=tG(o,n,s)?zO(o):ta(0);let d=(a.left+c.x)/u.x,h=(a.top+c.y)/u.y,p=a.width/u.x,m=a.height/u.y;if(o){const b=ls(o),v=s&&Ls(s)?ls(s):s;let C=b,S=zx(C);for(;S&&s&&v!==C;){const g=Ml(S),y=S.getBoundingClientRect(),E=Ms(S),_=y.left+(S.clientLeft+parseFloat(E.paddingLeft))*g.x,T=y.top+(S.clientTop+parseFloat(E.paddingTop))*g.y;d*=g.x,h*=g.y,p*=g.x,m*=g.y,d+=_,h+=T,C=ls(S),S=zx(C)}}return yp({width:p,height:m,x:d,y:h})}function xy(e,t){const n=um(e).scrollLeft;return t?t.left+n:mo(aa(e)).left+n}function GO(e,t,n){n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=s.left+t.scrollLeft-(n?0:xy(e,s)),o=s.top+t.scrollTop;return{x:a,y:o}}function nG(e){let{elements:t,rect:n,offsetParent:s,strategy:a}=e;const o=a==="fixed",u=aa(s),c=t?cm(t.floating):!1;if(s===u||c&&o)return n;let d={scrollLeft:0,scrollTop:0},h=ta(1);const p=ta(0),m=ra(s);if((m||!m&&!o)&&((pc(s)!=="body"||Pd(u))&&(d=um(s)),ra(s))){const v=mo(s);h=Ml(s),p.x=v.x+s.clientLeft,p.y=v.y+s.clientTop}const b=u&&!m&&!o?GO(u,d,!0):ta(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+b.x,y:n.y*h.y-d.scrollTop*h.y+p.y+b.y}}function rG(e){return Array.from(e.getClientRects())}function sG(e){const t=aa(e),n=um(e),s=e.ownerDocument.body,a=as(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=as(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let u=-n.scrollLeft+xy(e);const c=-n.scrollTop;return Ms(s).direction==="rtl"&&(u+=as(t.clientWidth,s.clientWidth)-a),{width:a,height:o,x:u,y:c}}function aG(e,t){const n=ls(e),s=aa(e),a=n.visualViewport;let o=s.clientWidth,u=s.clientHeight,c=0,d=0;if(a){o=a.width,u=a.height;const h=gy();(!h||h&&t==="fixed")&&(c=a.offsetLeft,d=a.offsetTop)}return{width:o,height:u,x:c,y:d}}const iG=new Set(["absolute","fixed"]);function oG(e,t){const n=mo(e,!0,t==="fixed"),s=n.top+e.clientTop,a=n.left+e.clientLeft,o=ra(e)?Ml(e):ta(1),u=e.clientWidth*o.x,c=e.clientHeight*o.y,d=a*o.x,h=s*o.y;return{width:u,height:c,x:d,y:h}}function ak(e,t,n){let s;if(t==="viewport")s=aG(e,n);else if(t==="document")s=sG(aa(e));else if(Ls(t))s=oG(t,n);else{const a=zO(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return yp(s)}function qO(e,t){const n=Ri(e);return n===t||!Ls(n)||Wl(n)?!1:Ms(n).position==="fixed"||qO(n,t)}function lG(e,t){const n=t.get(e);if(n)return n;let s=fd(e,[],!1).filter(c=>Ls(c)&&pc(c)!=="body"),a=null;const o=Ms(e).position==="fixed";let u=o?Ri(e):e;for(;Ls(u)&&!Wl(u);){const c=Ms(u),d=my(u);!d&&c.position==="fixed"&&(a=null),(o?!d&&!a:!d&&c.position==="static"&&!!a&&iG.has(a.position)||Pd(u)&&!d&&qO(e,u))?s=s.filter(p=>p!==u):a=c,u=Ri(u)}return t.set(e,s),s}function cG(e){let{element:t,boundary:n,rootBoundary:s,strategy:a}=e;const u=[...n==="clippingAncestors"?cm(t)?[]:lG(t,this._c):[].concat(n),s],c=u[0],d=u.reduce((h,p)=>{const m=ak(t,p,a);return h.top=as(m.top,h.top),h.right=ki(m.right,h.right),h.bottom=ki(m.bottom,h.bottom),h.left=as(m.left,h.left),h},ak(t,c,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function uG(e){const{width:t,height:n}=$O(e);return{width:t,height:n}}function dG(e,t,n){const s=ra(t),a=aa(t),o=n==="fixed",u=mo(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=ta(0);function h(){d.x=xy(a)}if(s||!s&&!o)if((pc(t)!=="body"||Pd(a))&&(c=um(t)),s){const v=mo(t,!0,o,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else a&&h();o&&!s&&a&&h();const p=a&&!s&&!o?GO(a,c):ta(0),m=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:m,y:b,width:u.width,height:u.height}}function F0(e){return Ms(e).position==="static"}function ik(e,t){if(!ra(e)||Ms(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return aa(e)===n&&(n=n.ownerDocument.body),n}function WO(e,t){const n=ls(e);if(cm(e))return n;if(!ra(e)){let a=Ri(e);for(;a&&!Wl(a);){if(Ls(a)&&!F0(a))return a;a=Ri(a)}return n}let s=ik(e,t);for(;s&&Vz(s)&&F0(s);)s=ik(s,t);return s&&Wl(s)&&F0(s)&&!my(s)?n:s||Qz(e)||n}const hG=async function(e){const t=this.getOffsetParent||WO,n=this.getDimensions,s=await n(e.floating);return{reference:dG(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function fG(e){return Ms(e).direction==="rtl"}const pG={convertOffsetParentRelativeRectToViewportRelativeRect:nG,getDocumentElement:aa,getClippingRect:cG,getOffsetParent:WO,getElementRects:hG,getClientRects:rG,getDimensions:uG,getScale:Ml,isElement:Ls,isRTL:fG};function VO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mG(e,t){let n=null,s;const a=aa(e);function o(){var c;clearTimeout(s),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),o();const h=e.getBoundingClientRect(),{left:p,top:m,width:b,height:v}=h;if(c||t(),!b||!v)return;const C=Df(m),S=Df(a.clientWidth-(p+b)),g=Df(a.clientHeight-(m+v)),y=Df(p),_={rootMargin:-C+"px "+-S+"px "+-g+"px "+-y+"px",threshold:as(0,ki(1,d))||1};let T=!0;function A(k){const j=k[0].intersectionRatio;if(j!==d){if(!T)return u();j?u(!1,j):s=setTimeout(()=>{u(!1,1e-7)},1e3)}j===1&&!VO(h,e.getBoundingClientRect())&&u(),T=!1}try{n=new IntersectionObserver(A,{..._,root:a.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(e)}return u(!0),o}function gG(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=s,h=by(e),p=a||o?[...h?fd(h):[],...fd(t)]:[];p.forEach(y=>{a&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const m=h&&c?mG(h,n):null;let b=-1,v=null;u&&(v=new ResizeObserver(y=>{let[E]=y;E&&E.target===h&&v&&(v.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var _;(_=v)==null||_.observe(t)})),n()}),h&&!d&&v.observe(h),v.observe(t));let C,S=d?mo(e):null;d&&g();function g(){const y=mo(e);S&&!VO(S,y)&&n(),S=y,C=requestAnimationFrame(g)}return n(),()=>{var y;p.forEach(E=>{a&&E.removeEventListener("scroll",n),o&&E.removeEventListener("resize",n)}),m?.(),(y=v)==null||y.disconnect(),v=null,d&&cancelAnimationFrame(C)}}const bG=Hz,xG=$z,vG=Pz,yG=Gz,EG=Bz,ok=Fz,SG=zz,_G=(e,t,n)=>{const s=new Map,a={platform:pG,...n},o={...a.platform,_c:s};return Mz(e,t,{...a,platform:o})};var wG=typeof document<"u",CG=function(){},tp=wG?w.useLayoutEffect:CG;function Ep(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!Ep(e[s],t[s]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,a[s]))return!1;for(s=n;s--!==0;){const o=a[s];if(!(o==="_owner"&&e.$$typeof)&&!Ep(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function YO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lk(e,t){const n=YO(e);return Math.round(t*n)/n}function P0(e){const t=w.useRef(e);return tp(()=>{t.current=e}),t}function TG(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:o,floating:u}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[p,m]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,v]=w.useState(s);Ep(b,s)||v(s);const[C,S]=w.useState(null),[g,y]=w.useState(null),E=w.useCallback(Y=>{Y!==k.current&&(k.current=Y,S(Y))},[]),_=w.useCallback(Y=>{Y!==j.current&&(j.current=Y,y(Y))},[]),T=o||C,A=u||g,k=w.useRef(null),j=w.useRef(null),R=w.useRef(p),F=d!=null,M=P0(d),H=P0(a),U=P0(h),L=w.useCallback(()=>{if(!k.current||!j.current)return;const Y={placement:t,strategy:n,middleware:b};H.current&&(Y.platform=H.current),_G(k.current,j.current,Y).then(B=>{const O={...B,isPositioned:U.current!==!1};$.current&&!Ep(R.current,O)&&(R.current=O,ic.flushSync(()=>{m(O)}))})},[b,t,n,H,U]);tp(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,m(Y=>({...Y,isPositioned:!1})))},[h]);const $=w.useRef(!1);tp(()=>($.current=!0,()=>{$.current=!1}),[]),tp(()=>{if(T&&(k.current=T),A&&(j.current=A),T&&A){if(M.current)return M.current(T,A,L);L()}},[T,A,L,M,F]);const X=w.useMemo(()=>({reference:k,floating:j,setReference:E,setFloating:_}),[E,_]),P=w.useMemo(()=>({reference:T,floating:A}),[T,A]),Z=w.useMemo(()=>{const Y={position:n,left:0,top:0};if(!P.floating)return Y;const B=lk(P.floating,p.x),O=lk(P.floating,p.y);return c?{...Y,transform:"translate("+B+"px, "+O+"px)",...YO(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:O}},[n,c,P.floating,p.x,p.y]);return w.useMemo(()=>({...p,update:L,refs:X,elements:P,floatingStyles:Z}),[p,L,X,P,Z])}const NG=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:a}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?ok({element:s.current,padding:a}).fn(n):{}:s?ok({element:s,padding:a}).fn(n):{}}}},AG=(e,t)=>({...bG(e),options:[e,t]}),kG=(e,t)=>({...xG(e),options:[e,t]}),RG=(e,t)=>({...SG(e),options:[e,t]}),DG=(e,t)=>({...vG(e),options:[e,t]}),IG=(e,t)=>({...yG(e),options:[e,t]}),OG=(e,t)=>({...EG(e),options:[e,t]}),jG=(e,t)=>({...NG(e),options:[e,t]});var LG="Arrow",KO=w.forwardRef((e,t)=>{const{children:n,width:s=10,height:a=5,...o}=e;return r.jsx(ht.svg,{...o,ref:t,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})});KO.displayName=LG;var MG=KO;function vy(e){const[t,n]=w.useState(void 0);return ar(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let u,c;if("borderBoxSize"in o){const d=o.borderBoxSize,h=Array.isArray(d)?d[0]:d;u=h.inlineSize,c=h.blockSize}else u=e.offsetWidth,c=e.offsetHeight;n({width:u,height:c})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var yy="Popper",[XO,mc]=Mr(yy),[FG,ZO]=XO(yy),QO=e=>{const{__scopePopper:t,children:n}=e,[s,a]=w.useState(null);return r.jsx(FG,{scope:t,anchor:s,onAnchorChange:a,children:n})};QO.displayName=yy;var JO="PopperAnchor",e3=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...a}=e,o=ZO(JO,n),u=w.useRef(null),c=Nt(t,u),d=w.useRef(null);return w.useEffect(()=>{const h=d.current;d.current=s?.current||u.current,h!==d.current&&o.onAnchorChange(d.current)}),s?null:r.jsx(ht.div,{...a,ref:c})});e3.displayName=JO;var Ey="PopperContent",[PG,BG]=XO(Ey),t3=w.forwardRef((e,t)=>{const{__scopePopper:n,side:s="bottom",sideOffset:a=0,align:o="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:C,...S}=e,g=ZO(Ey,n),[y,E]=w.useState(null),_=Nt(t,K=>E(K)),[T,A]=w.useState(null),k=vy(T),j=k?.width??0,R=k?.height??0,F=s+(o!=="center"?"-"+o:""),M=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},H=Array.isArray(h)?h:[h],U=H.length>0,L={padding:M,boundary:H.filter(HG),altBoundary:U},{refs:$,floatingStyles:X,placement:P,isPositioned:Z,middlewareData:Y}=TG({strategy:"fixed",placement:F,whileElementsMounted:(...K)=>gG(...K,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[AG({mainAxis:a+R,alignmentAxis:u}),d&&kG({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?RG():void 0,...L}),d&&DG({...L}),IG({...L,apply:({elements:K,rects:G,availableWidth:Q,availableHeight:ce})=>{const{width:oe,height:te}=G.reference,pe=K.floating.style;pe.setProperty("--radix-popper-available-width",`${Q}px`),pe.setProperty("--radix-popper-available-height",`${ce}px`),pe.setProperty("--radix-popper-anchor-width",`${oe}px`),pe.setProperty("--radix-popper-anchor-height",`${te}px`)}}),T&&jG({element:T,padding:c}),$G({arrowWidth:j,arrowHeight:R}),b&&OG({strategy:"referenceHidden",...L})]}),[B,O]=s3(P),W=Ln(C);ar(()=>{Z&&W?.()},[Z,W]);const ne=Y.arrow?.x,z=Y.arrow?.y,V=Y.arrow?.centerOffset!==0,[le,se]=w.useState();return ar(()=>{y&&se(window.getComputedStyle(y).zIndex)},[y]),r.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(PG,{scope:n,placedSide:B,onArrowChange:A,arrowX:ne,arrowY:z,shouldHideArrow:V,children:r.jsx(ht.div,{"data-side":B,"data-align":O,...S,ref:_,style:{...S.style,animation:Z?void 0:"none"}})})})});t3.displayName=Ey;var n3="PopperArrow",UG={top:"bottom",right:"left",bottom:"top",left:"right"},r3=w.forwardRef(function(t,n){const{__scopePopper:s,...a}=t,o=BG(n3,s),u=UG[o.placedSide];return r.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:r.jsx(MG,{...a,ref:n,style:{...a.style,display:"block"}})})});r3.displayName=n3;function HG(e){return e!==null}var $G=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:s,middlewareData:a}=t,u=a.arrow?.centerOffset!==0,c=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[h,p]=s3(n),m={start:"0%",center:"50%",end:"100%"}[p],b=(a.arrow?.x??0)+c/2,v=(a.arrow?.y??0)+d/2;let C="",S="";return h==="bottom"?(C=u?m:`${b}px`,S=`${-d}px`):h==="top"?(C=u?m:`${b}px`,S=`${s.floating.height+d}px`):h==="right"?(C=`${-d}px`,S=u?m:`${v}px`):h==="left"&&(C=`${s.floating.width+d}px`,S=u?m:`${v}px`),{data:{x:C,y:S}}}});function s3(e){const[t,n="center"]=e.split("-");return[t,n]}var Sy=QO,_y=e3,wy=t3,Cy=r3,[dm,Ude]=Mr("Tooltip",[mc]),hm=mc(),a3="TooltipProvider",zG=700,Gx="tooltip.open",[GG,Ty]=dm(a3),i3=e=>{const{__scopeTooltip:t,delayDuration:n=zG,skipDelayDuration:s=300,disableHoverableContent:a=!1,children:o}=e,u=w.useRef(!0),c=w.useRef(!1),d=w.useRef(0);return w.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),r.jsx(GG,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,s)},[s]),isPointerInTransitRef:c,onPointerInTransitChange:w.useCallback(h=>{c.current=h},[]),disableHoverableContent:a,children:o})};i3.displayName=a3;var pd="Tooltip",[qG,fm]=dm(pd),o3=e=>{const{__scopeTooltip:t,children:n,open:s,defaultOpen:a,onOpenChange:o,disableHoverableContent:u,delayDuration:c}=e,d=Ty(pd,e.__scopeTooltip),h=hm(t),[p,m]=w.useState(null),b=Os(),v=w.useRef(0),C=u??d.disableHoverableContent,S=c??d.delayDuration,g=w.useRef(!1),[y,E]=na({prop:s,defaultProp:a??!1,onChange:j=>{j?(d.onOpen(),document.dispatchEvent(new CustomEvent(Gx))):d.onClose(),o?.(j)},caller:pd}),_=w.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),T=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,E(!0)},[E]),A=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E(!1)},[E]),k=w.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,E(!0),v.current=0},S)},[S,E]);return w.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),r.jsx(Sy,{...h,children:r.jsx(qG,{scope:t,contentId:b,open:y,stateAttribute:_,trigger:p,onTriggerChange:m,onTriggerEnter:w.useCallback(()=>{d.isOpenDelayedRef.current?k():T()},[d.isOpenDelayedRef,k,T]),onTriggerLeave:w.useCallback(()=>{C?A():(window.clearTimeout(v.current),v.current=0)},[A,C]),onOpen:T,onClose:A,disableHoverableContent:C,children:n})})};o3.displayName=pd;var qx="TooltipTrigger",l3=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,a=fm(qx,n),o=Ty(qx,n),u=hm(n),c=w.useRef(null),d=Nt(t,c,a.onTriggerChange),h=w.useRef(!1),p=w.useRef(!1),m=w.useCallback(()=>h.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),r.jsx(_y,{asChild:!0,...u,children:r.jsx(ht.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...s,ref:d,onPointerMove:Ve(e.onPointerMove,b=>{b.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ve(e.onPointerLeave,()=>{a.onTriggerLeave(),p.current=!1}),onPointerDown:Ve(e.onPointerDown,()=>{a.open&&a.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Ve(e.onFocus,()=>{h.current||a.onOpen()}),onBlur:Ve(e.onBlur,a.onClose),onClick:Ve(e.onClick,a.onClose)})})});l3.displayName=qx;var WG="TooltipPortal",[Hde,VG]=dm(WG,{forceMount:void 0}),Vl="TooltipContent",c3=w.forwardRef((e,t)=>{const n=VG(Vl,e.__scopeTooltip),{forceMount:s=n.forceMount,side:a="top",...o}=e,u=fm(Vl,e.__scopeTooltip);return r.jsx(mr,{present:s||u.open,children:u.disableHoverableContent?r.jsx(u3,{side:a,...o,ref:t}):r.jsx(YG,{side:a,...o,ref:t})})}),YG=w.forwardRef((e,t)=>{const n=fm(Vl,e.__scopeTooltip),s=Ty(Vl,e.__scopeTooltip),a=w.useRef(null),o=Nt(t,a),[u,c]=w.useState(null),{trigger:d,onClose:h}=n,p=a.current,{onPointerInTransitChange:m}=s,b=w.useCallback(()=>{c(null),m(!1)},[m]),v=w.useCallback((C,S)=>{const g=C.currentTarget,y={x:C.clientX,y:C.clientY},E=JG(y,g.getBoundingClientRect()),_=eq(y,E),T=tq(S.getBoundingClientRect()),A=rq([..._,...T]);c(A),m(!0)},[m]);return w.useEffect(()=>()=>b(),[b]),w.useEffect(()=>{if(d&&p){const C=g=>v(g,p),S=g=>v(g,d);return d.addEventListener("pointerleave",C),p.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",C),p.removeEventListener("pointerleave",S)}}},[d,p,v,b]),w.useEffect(()=>{if(u){const C=S=>{const g=S.target,y={x:S.clientX,y:S.clientY},E=d?.contains(g)||p?.contains(g),_=!nq(y,u);E?b():_&&(b(),h())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[d,p,u,h,b]),r.jsx(u3,{...e,ref:o})}),[KG,XG]=dm(pd,{isInside:!1}),ZG=sI("TooltipContent"),u3=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:s,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:u,...c}=e,d=fm(Vl,n),h=hm(n),{onClose:p}=d;return w.useEffect(()=>(document.addEventListener(Gx,p),()=>document.removeEventListener(Gx,p)),[p]),w.useEffect(()=>{if(d.trigger){const m=b=>{b.target?.contains(d.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,p]),r.jsx(cc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:r.jsxs(wy,{"data-state":d.stateAttribute,...h,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[r.jsx(ZG,{children:s}),r.jsx(KG,{scope:n,isInside:!0,children:r.jsx(D7,{id:d.contentId,role:"tooltip",children:a||s})})]})})});c3.displayName=Vl;var d3="TooltipArrow",QG=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,a=hm(n);return XG(d3,n).isInside?null:r.jsx(Cy,{...a,...s,ref:t})});QG.displayName=d3;function JG(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,s,a,o)){case o:return"left";case a:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function eq(e,t,n=5){const s=[];switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}function tq(e){const{top:t,right:n,bottom:s,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:s},{x:a,y:s}]}function nq(e,t){const{x:n,y:s}=e;let a=!1;for(let o=0,u=t.length-1;o<t.length;u=o++){const c=t[o],d=t[u],h=c.x,p=c.y,m=d.x,b=d.y;p>s!=b>s&&n<(m-h)*(s-p)/(b-p)+h&&(a=!a)}return a}function rq(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),sq(t)}function sq(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const a=e[s];for(;t.length>=2;){const o=t[t.length-1],u=t[t.length-2];if((o.x-u.x)*(a.y-u.y)>=(o.y-u.y)*(a.x-u.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const a=e[s];for(;n.length>=2;){const o=n[n.length-1],u=n[n.length-2];if((o.x-u.x)*(a.y-u.y)>=(o.y-u.y)*(a.x-u.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var aq=i3,iq=o3,oq=l3,h3=c3;const lq=aq,cq=iq,uq=oq,f3=w.forwardRef(({className:e,sideOffset:t=4,...n},s)=>r.jsx(h3,{ref:s,sideOffset:t,className:Ae("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));f3.displayName=h3.displayName;const dq="sidebar_state",hq=3600*24*7,fq="16rem",pq="18rem",mq="3rem",gq="b",p3=w.createContext(null);function pm(){const e=w.useContext(p3);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const m3=w.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:s,style:a,children:o,...u},c)=>{const d=aO(),[h,p]=w.useState(!1),[m,b]=w.useState(e),v=t??m,C=w.useCallback(E=>{const _=typeof E=="function"?E(v):E;n?n(_):b(_),document.cookie=`${dq}=${_}; path=/; max-age=${hq}`},[n,v]),S=w.useCallback(()=>d?p(E=>!E):C(E=>!E),[d,C,p]);w.useEffect(()=>{const E=_=>{_.key===gq&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),S())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[S]);const g=v?"expanded":"collapsed",y=w.useMemo(()=>({state:g,open:v,setOpen:C,isMobile:d,openMobile:h,setOpenMobile:p,toggleSidebar:S}),[g,v,C,d,h,p,S]);return r.jsx(p3.Provider,{value:y,children:r.jsx(lq,{delayDuration:0,children:r.jsx("div",{style:{"--sidebar-width":fq,"--sidebar-width-icon":mq,...a},className:Ae("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",s),ref:c,...u,children:o})})})});m3.displayName="SidebarProvider";const g3=w.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:s,children:a,...o},u)=>{const{isMobile:c,state:d,openMobile:h,setOpenMobile:p}=pm();return n==="none"?r.jsx("div",{className:Ae("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",s),ref:u,...o,children:a}):c?r.jsx(LO,{open:h,onOpenChange:p,...o,children:r.jsxs(cy,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":pq},side:e,children:[r.jsxs(uy,{className:"sr-only",children:[r.jsx(dy,{children:"Sidebar"}),r.jsx(FO,{children:"Displays the mobile sidebar."})]}),r.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):r.jsxs("div",{ref:u,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?n:"","data-variant":t,"data-side":e,children:[r.jsx("div",{className:Ae("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r.jsx("div",{className:Ae("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...o,children:r.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});g3.displayName="Sidebar";const b3=w.forwardRef(({className:e,onClick:t,...n},s)=>{const{toggleSidebar:a}=pm();return r.jsxs(re,{ref:s,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Ae("h-7 w-7",e),onClick:o=>{t?.(o),a()},...n,children:[r.jsx(zU,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});b3.displayName="SidebarTrigger";const bq=w.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:s}=pm();return r.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:Ae("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});bq.displayName="SidebarRail";const x3=w.forwardRef(({className:e,...t},n)=>r.jsx("main",{ref:n,className:Ae("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));x3.displayName="SidebarInset";const xq=w.forwardRef(({className:e,...t},n)=>r.jsx(Fe,{ref:n,"data-sidebar":"input",className:Ae("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));xq.displayName="SidebarInput";const v3=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"header",className:Ae("flex flex-col gap-2 p-2",e),...t}));v3.displayName="SidebarHeader";const y3=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"footer",className:Ae("flex flex-col gap-2 p-2",e),...t}));y3.displayName="SidebarFooter";const vq=w.forwardRef(({className:e,...t},n)=>r.jsx(Nr,{ref:n,"data-sidebar":"separator",className:Ae("mx-2 w-auto bg-sidebar-border",e),...t}));vq.displayName="SidebarSeparator";const E3=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"content",className:Ae("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));E3.displayName="SidebarContent";const np=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group",className:Ae("relative flex w-full min-w-0 flex-col p-2",e),...t}));np.displayName="SidebarGroup";const rp=w.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const a=t?lc:"div";return r.jsx(a,{ref:s,"data-sidebar":"group-label",className:Ae("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});rp.displayName="SidebarGroupLabel";const yq=w.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const a=t?lc:"button";return r.jsx(a,{ref:s,"data-sidebar":"group-action",className:Ae("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});yq.displayName="SidebarGroupAction";const sp=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group-content",className:Ae("w-full text-sm",e),...t}));sp.displayName="SidebarGroupContent";const kl=w.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu",className:Ae("flex w-full min-w-0 flex-col gap-1",e),...t}));kl.displayName="SidebarMenu";const Rl=w.forwardRef(({className:e,...t},n)=>r.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Ae("group/menu-item relative",e),...t}));Rl.displayName="SidebarMenuItem";const Eq=uc("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Dl=w.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:s="default",tooltip:a,className:o,...u},c)=>{const d=e?lc:"button",{isMobile:h,state:p}=pm(),m=r.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":s,"data-active":t,className:Ae(Eq({variant:n,size:s}),o),...u});return a?(typeof a=="string"&&(a={children:a}),r.jsxs(cq,{children:[r.jsx(uq,{asChild:!0,children:m}),r.jsx(f3,{side:"right",align:"center",hidden:p!=="collapsed"||h,...a})]})):m});Dl.displayName="SidebarMenuButton";const Sq=w.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...s},a)=>{const o=t?lc:"button";return r.jsx(o,{ref:a,"data-sidebar":"menu-action",className:Ae("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...s})});Sq.displayName="SidebarMenuAction";const Wx=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Ae("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Wx.displayName="SidebarMenuBadge";const _q=w.forwardRef(({className:e,showIcon:t=!1,...n},s)=>{const a=w.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return r.jsxs("div",{ref:s,"data-sidebar":"menu-skeleton",className:Ae("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&r.jsx(Q2,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r.jsx(Q2,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});_q.displayName="SidebarMenuSkeleton";const wq=w.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Ae("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));wq.displayName="SidebarMenuSub";const Cq=w.forwardRef(({...e},t)=>r.jsx("li",{ref:t,...e}));Cq.displayName="SidebarMenuSubItem";const Tq=w.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:s,...a},o)=>{const u=e?lc:"a";return r.jsx(u,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Ae("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...a})});Tq.displayName="SidebarMenuSubButton";const Nq="1.0.69-alpha.15",Aq={version:Nq};function kq({className:e}){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[r.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),r.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),r.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),r.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const Rq=[{title:"Home",url:"/",icon:xU},{title:"Proposals",url:"/proposals",icon:Wu},{title:"Agents",url:"/agents",icon:Tr},{title:"Code",url:"/code",icon:Si},{title:"Utilities",url:"/utilities",icon:$I}],Dq=[{title:"Overview",url:"/context/project",icon:_r},{title:"Architecture",url:"/context/architecture",icon:fo},{title:"Knowledge",url:"/context/knowledge",icon:m9},{title:"Resources",url:"/resources",icon:tm}],Iq=[{title:"Source Control",url:"/git",icon:Ei},{title:"Terminal",url:"/terminal",icon:Ci},{title:"Schedule",url:"/schedule",icon:Xf},{title:"Identity",url:"/identity",icon:yU}],Oq=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:HU,external:!0},{title:"Settings",url:"/settings/user",icon:ql}];function jq(){const{badges:e}=Vp();return r.jsxs(g3,{className:"bg-sidebar border-r border-sidebar-border",children:[r.jsx(v3,{children:r.jsx(kl,{children:r.jsx(Rl,{children:r.jsx(Dl,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:r.jsxs(at,{to:"/",children:[r.jsx(kq,{className:"size-8"}),r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsxs("span",{className:"font-semibold",children:[r.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),r.jsx("span",{children:" Studio"})]}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",Aq.version]})]})]})})})})}),r.jsxs(E3,{children:[r.jsxs(np,{children:[r.jsx(rp,{children:"Main"}),r.jsx(sp,{children:r.jsx(kl,{children:Rq.map(t=>r.jsxs(Rl,{children:[r.jsx(Dl,{asChild:!0,children:r.jsxs(at,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),t.title==="Code"&&e.codeSessions>0&&r.jsx(Wx,{className:"bg-blue-600 text-white dark:bg-blue-500",children:e.codeSessions})]},t.title))})})]}),r.jsxs(np,{children:[r.jsx(rp,{children:"Project"}),r.jsx(sp,{children:r.jsx(kl,{children:Dq.map(t=>r.jsx(Rl,{children:r.jsx(Dl,{asChild:!0,children:r.jsxs(at,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]}),r.jsxs(np,{children:[r.jsx(rp,{children:"System"}),r.jsx(sp,{children:r.jsx(kl,{children:Iq.map(t=>{let n=0;return t.title==="Source Control"&&e.gitChanges>0?n=e.gitChanges:t.title==="Terminal"&&e.terminalSessions>0?n=e.terminalSessions:t.title==="Schedule"&&e.runningScheduledJobs>0&&(n=e.runningScheduledJobs),r.jsxs(Rl,{children:[r.jsx(Dl,{asChild:!0,children:r.jsxs(at,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),n>0&&r.jsx(Wx,{className:"bg-blue-600 text-white dark:bg-blue-500",children:n})]},t.title)})})})]})]}),r.jsx(y3,{children:r.jsx(kl,{children:Oq.map(t=>r.jsx(Rl,{children:r.jsx(Dl,{asChild:!0,children:t.external?r.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]}):r.jsxs(at,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]})}function Vx(e,[t,n]){return Math.min(n,Math.max(t,e))}var Lq=w.createContext(void 0);function gc(e){const t=w.useContext(Lq);return e||t||"ltr"}function Ny(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Mq=[" ","Enter","ArrowUp","ArrowDown"],Fq=[" ","Enter"],go="Select",[mm,gm,Pq]=Kp(go),[bc,$de]=Mr(go,[Pq,mc]),bm=mc(),[Bq,Oi]=bc(go),[Uq,Hq]=bc(go),S3=e=>{const{__scopeSelect:t,children:n,open:s,defaultOpen:a,onOpenChange:o,value:u,defaultValue:c,onValueChange:d,dir:h,name:p,autoComplete:m,disabled:b,required:v,form:C}=e,S=bm(t),[g,y]=w.useState(null),[E,_]=w.useState(null),[T,A]=w.useState(!1),k=gc(h),[j,R]=na({prop:s,defaultProp:a??!1,onChange:o,caller:go}),[F,M]=na({prop:u,defaultProp:c,onChange:d,caller:go}),H=w.useRef(null),U=g?C||!!g.closest("form"):!0,[L,$]=w.useState(new Set),X=Array.from(L).map(P=>P.props.value).join(";");return r.jsx(Sy,{...S,children:r.jsxs(Bq,{required:v,scope:t,trigger:g,onTriggerChange:y,valueNode:E,onValueNodeChange:_,valueNodeHasChildren:T,onValueNodeHasChildrenChange:A,contentId:Os(),value:F,onValueChange:M,open:j,onOpenChange:R,dir:k,triggerPointerDownPosRef:H,disabled:b,children:[r.jsx(mm.Provider,{scope:t,children:r.jsx(Uq,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(P=>{$(Z=>new Set(Z).add(P))},[]),onNativeOptionRemove:w.useCallback(P=>{$(Z=>{const Y=new Set(Z);return Y.delete(P),Y})},[]),children:n})}),U?r.jsxs(W3,{"aria-hidden":!0,required:v,tabIndex:-1,name:p,autoComplete:m,value:F,onChange:P=>M(P.target.value),disabled:b,form:C,children:[F===void 0?r.jsx("option",{value:""}):null,Array.from(L)]},X):null]})})};S3.displayName=go;var _3="SelectTrigger",w3=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:s=!1,...a}=e,o=bm(n),u=Oi(_3,n),c=u.disabled||s,d=Nt(t,u.onTriggerChange),h=gm(n),p=w.useRef("touch"),[m,b,v]=Y3(S=>{const g=h().filter(_=>!_.disabled),y=g.find(_=>_.value===u.value),E=K3(g,S,y);E!==void 0&&u.onValueChange(E.value)}),C=S=>{c||(u.onOpenChange(!0),v()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return r.jsx(_y,{asChild:!0,...o,children:r.jsx(ht.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":V3(u.value)?"":void 0,...a,ref:d,onClick:Ve(a.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&C(S)}),onPointerDown:Ve(a.onPointerDown,S=>{p.current=S.pointerType;const g=S.target;g.hasPointerCapture(S.pointerId)&&g.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(C(S),S.preventDefault())}),onKeyDown:Ve(a.onKeyDown,S=>{const g=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&b(S.key),!(g&&S.key===" ")&&Mq.includes(S.key)&&(C(),S.preventDefault())})})})});w3.displayName=_3;var C3="SelectValue",T3=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:a,children:o,placeholder:u="",...c}=e,d=Oi(C3,n),{onValueNodeHasChildrenChange:h}=d,p=o!==void 0,m=Nt(t,d.onValueNodeChange);return ar(()=>{h(p)},[h,p]),r.jsx(ht.span,{...c,ref:m,style:{pointerEvents:"none"},children:V3(d.value)?r.jsx(r.Fragment,{children:u}):o})});T3.displayName=C3;var $q="SelectIcon",N3=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:s,...a}=e;return r.jsx(ht.span,{"aria-hidden":!0,...a,ref:t,children:s||"▼"})});N3.displayName=$q;var zq="SelectPortal",A3=e=>r.jsx(Rd,{asChild:!0,...e});A3.displayName=zq;var bo="SelectContent",k3=w.forwardRef((e,t)=>{const n=Oi(bo,e.__scopeSelect),[s,a]=w.useState();if(ar(()=>{a(new DocumentFragment)},[]),!n.open){const o=s;return o?ic.createPortal(r.jsx(R3,{scope:e.__scopeSelect,children:r.jsx(mm.Slot,{scope:e.__scopeSelect,children:r.jsx("div",{children:e.children})})}),o):null}return r.jsx(D3,{...e,ref:t})});k3.displayName=bo;var Ds=10,[R3,ji]=bc(bo),Gq="SelectContentImpl",qq=ho("SelectContent.RemoveScroll"),D3=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:s="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:u,side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:b,collisionPadding:v,sticky:C,hideWhenDetached:S,avoidCollisions:g,...y}=e,E=Oi(bo,n),[_,T]=w.useState(null),[A,k]=w.useState(null),j=Nt(t,K=>T(K)),[R,F]=w.useState(null),[M,H]=w.useState(null),U=gm(n),[L,$]=w.useState(!1),X=w.useRef(!1);w.useEffect(()=>{if(_)return ry(_)},[_]),ny();const P=w.useCallback(K=>{const[G,...Q]=U().map(te=>te.ref.current),[ce]=Q.slice(-1),oe=document.activeElement;for(const te of K)if(te===oe||(te?.scrollIntoView({block:"nearest"}),te===G&&A&&(A.scrollTop=0),te===ce&&A&&(A.scrollTop=A.scrollHeight),te?.focus(),document.activeElement!==oe))return},[U,A]),Z=w.useCallback(()=>P([R,_]),[P,R,_]);w.useEffect(()=>{L&&Z()},[L,Z]);const{onOpenChange:Y,triggerPointerDownPosRef:B}=E;w.useEffect(()=>{if(_){let K={x:0,y:0};const G=ce=>{K={x:Math.abs(Math.round(ce.pageX)-(B.current?.x??0)),y:Math.abs(Math.round(ce.pageY)-(B.current?.y??0))}},Q=ce=>{K.x<=10&&K.y<=10?ce.preventDefault():_.contains(ce.target)||Y(!1),document.removeEventListener("pointermove",G),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",Q,{capture:!0})}}},[_,Y,B]),w.useEffect(()=>{const K=()=>Y(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[Y]);const[O,W]=Y3(K=>{const G=U().filter(oe=>!oe.disabled),Q=G.find(oe=>oe.ref.current===document.activeElement),ce=K3(G,K,Q);ce&&setTimeout(()=>ce.ref.current.focus())}),ne=w.useCallback((K,G,Q)=>{const ce=!X.current&&!Q;(E.value!==void 0&&E.value===G||ce)&&(F(K),ce&&(X.current=!0))},[E.value]),z=w.useCallback(()=>_?.focus(),[_]),V=w.useCallback((K,G,Q)=>{const ce=!X.current&&!Q;(E.value!==void 0&&E.value===G||ce)&&H(K)},[E.value]),le=s==="popper"?Yx:I3,se=le===Yx?{side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:b,collisionPadding:v,sticky:C,hideWhenDetached:S,avoidCollisions:g}:{};return r.jsx(R3,{scope:n,content:_,viewport:A,onViewportChange:k,itemRefCallback:ne,selectedItem:R,onItemLeave:z,itemTextRefCallback:V,focusSelectedItem:Z,selectedItemText:M,position:s,isPositioned:L,searchRef:O,children:r.jsx(am,{as:qq,allowPinchZoom:!0,children:r.jsx(rm,{asChild:!0,trapped:E.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Ve(a,K=>{E.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:r.jsx(cc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:r.jsx(le,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:K=>K.preventDefault(),...y,...se,onPlaced:()=>$(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Ve(y.onKeyDown,K=>{const G=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!G&&K.key.length===1&&W(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let ce=U().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(K.key)&&(ce=ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const oe=K.target,te=ce.indexOf(oe);ce=ce.slice(te+1)}setTimeout(()=>P(ce)),K.preventDefault()}})})})})})})});D3.displayName=Gq;var Wq="SelectItemAlignedPosition",I3=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:s,...a}=e,o=Oi(bo,n),u=ji(bo,n),[c,d]=w.useState(null),[h,p]=w.useState(null),m=Nt(t,j=>p(j)),b=gm(n),v=w.useRef(!1),C=w.useRef(!0),{viewport:S,selectedItem:g,selectedItemText:y,focusSelectedItem:E}=u,_=w.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&h&&S&&g&&y){const j=o.trigger.getBoundingClientRect(),R=h.getBoundingClientRect(),F=o.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(o.dir!=="rtl"){const oe=M.left-R.left,te=F.left-oe,pe=j.left-te,ve=j.width+pe,Ge=Math.max(ve,R.width),Xe=window.innerWidth-Ds,De=Vx(te,[Ds,Math.max(Ds,Xe-Ge)]);c.style.minWidth=ve+"px",c.style.left=De+"px"}else{const oe=R.right-M.right,te=window.innerWidth-F.right-oe,pe=window.innerWidth-j.right-te,ve=j.width+pe,Ge=Math.max(ve,R.width),Xe=window.innerWidth-Ds,De=Vx(te,[Ds,Math.max(Ds,Xe-Ge)]);c.style.minWidth=ve+"px",c.style.right=De+"px"}const H=b(),U=window.innerHeight-Ds*2,L=S.scrollHeight,$=window.getComputedStyle(h),X=parseInt($.borderTopWidth,10),P=parseInt($.paddingTop,10),Z=parseInt($.borderBottomWidth,10),Y=parseInt($.paddingBottom,10),B=X+P+L+Y+Z,O=Math.min(g.offsetHeight*5,B),W=window.getComputedStyle(S),ne=parseInt(W.paddingTop,10),z=parseInt(W.paddingBottom,10),V=j.top+j.height/2-Ds,le=U-V,se=g.offsetHeight/2,K=g.offsetTop+se,G=X+P+K,Q=B-G;if(G<=V){const oe=H.length>0&&g===H[H.length-1].ref.current;c.style.bottom="0px";const te=h.clientHeight-S.offsetTop-S.offsetHeight,pe=Math.max(le,se+(oe?z:0)+te+Z),ve=G+pe;c.style.height=ve+"px"}else{const oe=H.length>0&&g===H[0].ref.current;c.style.top="0px";const pe=Math.max(V,X+S.offsetTop+(oe?ne:0)+se)+Q;c.style.height=pe+"px",S.scrollTop=G-V+S.offsetTop}c.style.margin=`${Ds}px 0`,c.style.minHeight=O+"px",c.style.maxHeight=U+"px",s?.(),requestAnimationFrame(()=>v.current=!0)}},[b,o.trigger,o.valueNode,c,h,S,g,y,o.dir,s]);ar(()=>_(),[_]);const[T,A]=w.useState();ar(()=>{h&&A(window.getComputedStyle(h).zIndex)},[h]);const k=w.useCallback(j=>{j&&C.current===!0&&(_(),E?.(),C.current=!1)},[_,E]);return r.jsx(Yq,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:k,children:r.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:r.jsx(ht.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});I3.displayName=Wq;var Vq="SelectPopperPosition",Yx=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:s="start",collisionPadding:a=Ds,...o}=e,u=bm(n);return r.jsx(wy,{...u,...o,ref:t,align:s,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Yx.displayName=Vq;var[Yq,Ay]=bc(bo,{}),Kx="SelectViewport",O3=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:s,...a}=e,o=ji(Kx,n),u=Ay(Kx,n),c=Nt(t,o.onViewportChange),d=w.useRef(0);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),r.jsx(mm.Slot,{scope:n,children:r.jsx(ht.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Ve(a.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:b}=u;if(b?.current&&m){const v=Math.abs(d.current-p.scrollTop);if(v>0){const C=window.innerHeight-Ds*2,S=parseFloat(m.style.minHeight),g=parseFloat(m.style.height),y=Math.max(S,g);if(y<C){const E=y+v,_=Math.min(C,E),T=E-_;m.style.height=_+"px",m.style.bottom==="0px"&&(p.scrollTop=T>0?T:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});O3.displayName=Kx;var j3="SelectGroup",[Kq,Xq]=bc(j3),Zq=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=Os();return r.jsx(Kq,{scope:n,id:a,children:r.jsx(ht.div,{role:"group","aria-labelledby":a,...s,ref:t})})});Zq.displayName=j3;var L3="SelectLabel",M3=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=Xq(L3,n);return r.jsx(ht.div,{id:a.id,...s,ref:t})});M3.displayName=L3;var Sp="SelectItem",[Qq,F3]=bc(Sp),P3=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:s,disabled:a=!1,textValue:o,...u}=e,c=Oi(Sp,n),d=ji(Sp,n),h=c.value===s,[p,m]=w.useState(o??""),[b,v]=w.useState(!1),C=Nt(t,E=>d.itemRefCallback?.(E,s,a)),S=Os(),g=w.useRef("touch"),y=()=>{a||(c.onValueChange(s),c.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return r.jsx(Qq,{scope:n,value:s,disabled:a,textId:S,isSelected:h,onItemTextChange:w.useCallback(E=>{m(_=>_||(E?.textContent??"").trim())},[]),children:r.jsx(mm.ItemSlot,{scope:n,value:s,disabled:a,textValue:p,children:r.jsx(ht.div,{role:"option","aria-labelledby":S,"data-highlighted":b?"":void 0,"aria-selected":h&&b,"data-state":h?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...u,ref:C,onFocus:Ve(u.onFocus,()=>v(!0)),onBlur:Ve(u.onBlur,()=>v(!1)),onClick:Ve(u.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:Ve(u.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:Ve(u.onPointerDown,E=>{g.current=E.pointerType}),onPointerMove:Ve(u.onPointerMove,E=>{g.current=E.pointerType,a?d.onItemLeave?.():g.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ve(u.onPointerLeave,E=>{E.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Ve(u.onKeyDown,E=>{d.searchRef?.current!==""&&E.key===" "||(Fq.includes(E.key)&&y(),E.key===" "&&E.preventDefault())})})})})});P3.displayName=Sp;var Hu="SelectItemText",B3=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:a,...o}=e,u=Oi(Hu,n),c=ji(Hu,n),d=F3(Hu,n),h=Hq(Hu,n),[p,m]=w.useState(null),b=Nt(t,y=>m(y),d.onItemTextChange,y=>c.itemTextRefCallback?.(y,d.value,d.disabled)),v=p?.textContent,C=w.useMemo(()=>r.jsx("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:S,onNativeOptionRemove:g}=h;return ar(()=>(S(C),()=>g(C)),[S,g,C]),r.jsxs(r.Fragment,{children:[r.jsx(ht.span,{id:d.textId,...o,ref:b}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?ic.createPortal(o.children,u.valueNode):null]})});B3.displayName=Hu;var U3="SelectItemIndicator",H3=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return F3(U3,n).isSelected?r.jsx(ht.span,{"aria-hidden":!0,...s,ref:t}):null});H3.displayName=U3;var Xx="SelectScrollUpButton",$3=w.forwardRef((e,t)=>{const n=ji(Xx,e.__scopeSelect),s=Ay(Xx,e.__scopeSelect),[a,o]=w.useState(!1),u=Nt(t,s.onScrollButtonChange);return ar(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollTop>0;o(h)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?r.jsx(G3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});$3.displayName=Xx;var Zx="SelectScrollDownButton",z3=w.forwardRef((e,t)=>{const n=ji(Zx,e.__scopeSelect),s=Ay(Zx,e.__scopeSelect),[a,o]=w.useState(!1),u=Nt(t,s.onScrollButtonChange);return ar(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<h;o(p)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?r.jsx(G3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});z3.displayName=Zx;var G3=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:s,...a}=e,o=ji("SelectScrollButton",n),u=w.useRef(null),c=gm(n),d=w.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return w.useEffect(()=>()=>d(),[d]),ar(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),r.jsx(ht.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Ve(a.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(s,50))}),onPointerMove:Ve(a.onPointerMove,()=>{o.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(s,50))}),onPointerLeave:Ve(a.onPointerLeave,()=>{d()})})}),Jq="SelectSeparator",q3=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return r.jsx(ht.div,{"aria-hidden":!0,...s,ref:t})});q3.displayName=Jq;var Qx="SelectArrow",eW=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=bm(n),o=Oi(Qx,n),u=ji(Qx,n);return o.open&&u.position==="popper"?r.jsx(Cy,{...a,...s,ref:t}):null});eW.displayName=Qx;var tW="SelectBubbleInput",W3=w.forwardRef(({__scopeSelect:e,value:t,...n},s)=>{const a=w.useRef(null),o=Nt(s,a),u=Ny(t);return w.useEffect(()=>{const c=a.current;if(!c)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==t&&p){const m=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(m)}},[u,t]),r.jsx(ht.select,{...n,style:{...lI,...n.style},ref:o,defaultValue:t})});W3.displayName=tW;function V3(e){return e===""||e===void 0}function Y3(e){const t=Ln(e),n=w.useRef(""),s=w.useRef(0),a=w.useCallback(u=>{const c=n.current+u;t(c),(function d(h){n.current=h,window.clearTimeout(s.current),h!==""&&(s.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),o=w.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,a,o]}function K3(e,t,n){const a=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let u=nW(e,Math.max(o,0));a.length===1&&(u=u.filter(h=>h!==n));const d=u.find(h=>h.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function nW(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var rW=S3,X3=w3,sW=T3,aW=N3,iW=A3,Z3=k3,oW=O3,Q3=M3,J3=P3,lW=B3,cW=H3,ej=$3,tj=z3,nj=q3;const Xt=rW,Zt=sW,qt=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(X3,{ref:s,className:Ae("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,r.jsx(aW,{asChild:!0,children:r.jsx(os,{className:"h-4 w-4 opacity-50"})})]}));qt.displayName=X3.displayName;const rj=w.forwardRef(({className:e,...t},n)=>r.jsx(ej,{ref:n,className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Gl,{className:"h-4 w-4"})}));rj.displayName=ej.displayName;const sj=w.forwardRef(({className:e,...t},n)=>r.jsx(tj,{ref:n,className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(os,{className:"h-4 w-4"})}));sj.displayName=tj.displayName;const Wt=w.forwardRef(({className:e,children:t,position:n="popper",...s},a)=>r.jsx(iW,{children:r.jsxs(Z3,{ref:a,className:Ae("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[r.jsx(rj,{}),r.jsx(oW,{className:Ae("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(sj,{})]})}));Wt.displayName=Z3.displayName;const uW=w.forwardRef(({className:e,...t},n)=>r.jsx(Q3,{ref:n,className:Ae("px-2 py-1.5 text-sm font-semibold",e),...t}));uW.displayName=Q3.displayName;const Le=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(J3,{ref:s,className:Ae("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(cW,{children:r.jsx(wo,{className:"h-4 w-4"})})}),r.jsx(lW,{children:t})]}));Le.displayName=J3.displayName;const dW=w.forwardRef(({className:e,...t},n)=>r.jsx(nj,{ref:n,className:Ae("-mx-1 my-1 h-px bg-muted",e),...t}));dW.displayName=nj.displayName;const pn=oy,_p=jO,hW=ly,aj=w.forwardRef(({className:e,...t},n)=>r.jsx(jd,{ref:n,className:Ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));aj.displayName=jd.displayName;const dn=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(hW,{children:[r.jsx(aj,{}),r.jsxs(Ld,{ref:s,className:Ae("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,r.jsxs(om,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(wr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));dn.displayName=Ld.displayName;const sn=({className:e,...t})=>r.jsx("div",{className:Ae("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});sn.displayName="DialogHeader";const hr=({className:e,...t})=>r.jsx("div",{className:Ae("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});hr.displayName="DialogFooter";const an=w.forwardRef(({className:e,...t},n)=>r.jsx(Md,{ref:n,className:Ae("text-lg font-semibold leading-none tracking-tight",e),...t}));an.displayName=Md.displayName;const Cn=w.forwardRef(({className:e,...t},n)=>r.jsx(Fd,{ref:n,className:Ae("text-sm text-muted-foreground",e),...t}));Cn.displayName=Fd.displayName;var xm="Checkbox",[fW,zde]=Mr(xm),[pW,ky]=fW(xm);function mW(e){const{__scopeCheckbox:t,checked:n,children:s,defaultChecked:a,disabled:o,form:u,name:c,onCheckedChange:d,required:h,value:p="on",internal_do_not_use_render:m}=e,[b,v]=na({prop:n,defaultProp:a??!1,onChange:d,caller:xm}),[C,S]=w.useState(null),[g,y]=w.useState(null),E=w.useRef(!1),_=C?!!u||!!C.closest("form"):!0,T={checked:b,disabled:o,setChecked:v,control:C,setControl:S,name:c,form:u,value:p,hasConsumerStoppedPropagationRef:E,required:h,defaultChecked:Ti(a)?!1:a,isFormControl:_,bubbleInput:g,setBubbleInput:y};return r.jsx(pW,{scope:t,...T,children:gW(m)?m(T):s})}var ij="CheckboxTrigger",oj=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...s},a)=>{const{control:o,value:u,disabled:c,checked:d,required:h,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:b,isFormControl:v,bubbleInput:C}=ky(ij,e),S=Nt(a,p),g=w.useRef(d);return w.useEffect(()=>{const y=o?.form;if(y){const E=()=>m(g.current);return y.addEventListener("reset",E),()=>y.removeEventListener("reset",E)}},[o,m]),r.jsx(ht.button,{type:"button",role:"checkbox","aria-checked":Ti(d)?"mixed":d,"aria-required":h,"data-state":hj(d),"data-disabled":c?"":void 0,disabled:c,value:u,...s,ref:S,onKeyDown:Ve(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Ve(n,y=>{m(E=>Ti(E)?!0:!E),C&&v&&(b.current=y.isPropagationStopped(),b.current||y.stopPropagation())})})});oj.displayName=ij;var Ry=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:s,checked:a,defaultChecked:o,required:u,disabled:c,value:d,onCheckedChange:h,form:p,...m}=e;return r.jsx(mW,{__scopeCheckbox:n,checked:a,defaultChecked:o,disabled:c,required:u,onCheckedChange:h,name:s,form:p,value:d,internal_do_not_use_render:({isFormControl:b})=>r.jsxs(r.Fragment,{children:[r.jsx(oj,{...m,ref:t,__scopeCheckbox:n}),b&&r.jsx(dj,{__scopeCheckbox:n})]})})});Ry.displayName=xm;var lj="CheckboxIndicator",cj=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:s,...a}=e,o=ky(lj,n);return r.jsx(mr,{present:s||Ti(o.checked)||o.checked===!0,children:r.jsx(ht.span,{"data-state":hj(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});cj.displayName=lj;var uj="CheckboxBubbleInput",dj=w.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:s,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:u,required:c,disabled:d,name:h,value:p,form:m,bubbleInput:b,setBubbleInput:v}=ky(uj,e),C=Nt(n,v),S=Ny(o),g=vy(s);w.useEffect(()=>{const E=b;if(!E)return;const _=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(_,"checked").set,k=!a.current;if(S!==o&&A){const j=new Event("click",{bubbles:k});E.indeterminate=Ti(o),A.call(E,Ti(o)?!1:o),E.dispatchEvent(j)}},[b,S,o,a]);const y=w.useRef(Ti(o)?!1:o);return r.jsx(ht.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??y.current,required:c,disabled:d,name:h,value:p,form:m,...t,tabIndex:-1,ref:C,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});dj.displayName=uj;function gW(e){return typeof e=="function"}function Ti(e){return e==="indeterminate"}function hj(e){return Ti(e)?"indeterminate":e?"checked":"unchecked"}const cs=w.forwardRef(({className:e,...t},n)=>r.jsx(Ry,{ref:n,className:Ae("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:r.jsx(cj,{className:Ae("flex items-center justify-center text-current"),children:r.jsx(wo,{className:"h-4 w-4"})})}));cs.displayName=Ry.displayName;const Da=w.forwardRef(({className:e,onCheckedChange:t,onChange:n,...s},a)=>{const o=u=>{n?.(u),t?.(u.target.checked)};return r.jsxs("label",{className:Ae("relative inline-flex cursor-pointer",e),children:[r.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:o,ref:a,...s}),r.jsx("div",{className:"block bg-gray-300 w-9 h-5 rounded-full transition-colors duration-200 ease-in-out peer-checked:bg-blue-600"}),r.jsx("div",{className:"absolute left-0 top-0 bg-white w-4 h-4 rounded-full mt-0.5 ml-0.5 transition-transform duration-200 ease-in-out transform peer-checked:translate-x-4 shadow"})]})});Da.displayName="Switch";function bW(e,t){return w.useReducer((n,s)=>t[n][s]??n,e)}var Dy="ScrollArea",[fj,Gde]=Mr(Dy),[xW,Ts]=fj(Dy),pj=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:s="hover",dir:a,scrollHideDelay:o=600,...u}=e,[c,d]=w.useState(null),[h,p]=w.useState(null),[m,b]=w.useState(null),[v,C]=w.useState(null),[S,g]=w.useState(null),[y,E]=w.useState(0),[_,T]=w.useState(0),[A,k]=w.useState(!1),[j,R]=w.useState(!1),F=Nt(t,H=>d(H)),M=gc(a);return r.jsx(xW,{scope:n,type:s,dir:M,scrollHideDelay:o,scrollArea:c,viewport:h,onViewportChange:p,content:m,onContentChange:b,scrollbarX:v,onScrollbarXChange:C,scrollbarXEnabled:A,onScrollbarXEnabledChange:k,scrollbarY:S,onScrollbarYChange:g,scrollbarYEnabled:j,onScrollbarYEnabledChange:R,onCornerWidthChange:E,onCornerHeightChange:T,children:r.jsx(ht.div,{dir:M,...u,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});pj.displayName=Dy;var mj="ScrollAreaViewport",gj=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:s,nonce:a,...o}=e,u=Ts(mj,n),c=w.useRef(null),d=Nt(t,c,u.onViewportChange);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),r.jsx(ht.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:r.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});gj.displayName=mj;var ia="ScrollAreaScrollbar",Iy=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=Ts(ia,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:u}=a,c=e.orientation==="horizontal";return w.useEffect(()=>(c?o(!0):u(!0),()=>{c?o(!1):u(!1)}),[c,o,u]),a.type==="hover"?r.jsx(vW,{...s,ref:t,forceMount:n}):a.type==="scroll"?r.jsx(yW,{...s,ref:t,forceMount:n}):a.type==="auto"?r.jsx(bj,{...s,ref:t,forceMount:n}):a.type==="always"?r.jsx(Oy,{...s,ref:t}):null});Iy.displayName=ia;var vW=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=Ts(ia,e.__scopeScrollArea),[o,u]=w.useState(!1);return w.useEffect(()=>{const c=a.scrollArea;let d=0;if(c){const h=()=>{window.clearTimeout(d),u(!0)},p=()=>{d=window.setTimeout(()=>u(!1),a.scrollHideDelay)};return c.addEventListener("pointerenter",h),c.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",h),c.removeEventListener("pointerleave",p)}}},[a.scrollArea,a.scrollHideDelay]),r.jsx(mr,{present:n||o,children:r.jsx(bj,{"data-state":o?"visible":"hidden",...s,ref:t})})}),yW=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=Ts(ia,e.__scopeScrollArea),o=e.orientation==="horizontal",u=ym(()=>d("SCROLL_END"),100),[c,d]=bW("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(c==="idle"){const h=window.setTimeout(()=>d("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(h)}},[c,a.scrollHideDelay,d]),w.useEffect(()=>{const h=a.viewport,p=o?"scrollLeft":"scrollTop";if(h){let m=h[p];const b=()=>{const v=h[p];m!==v&&(d("SCROLL"),u()),m=v};return h.addEventListener("scroll",b),()=>h.removeEventListener("scroll",b)}},[a.viewport,o,d,u]),r.jsx(mr,{present:n||c!=="hidden",children:r.jsx(Oy,{"data-state":c==="hidden"?"hidden":"visible",...s,ref:t,onPointerEnter:Ve(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ve(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),bj=w.forwardRef((e,t)=>{const n=Ts(ia,e.__scopeScrollArea),{forceMount:s,...a}=e,[o,u]=w.useState(!1),c=e.orientation==="horizontal",d=ym(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;u(c?h:p)}},10);return Yl(n.viewport,d),Yl(n.content,d),r.jsx(mr,{present:s||o,children:r.jsx(Oy,{"data-state":o?"visible":"hidden",...a,ref:t})})}),Oy=w.forwardRef((e,t)=>{const{orientation:n="vertical",...s}=e,a=Ts(ia,e.__scopeScrollArea),o=w.useRef(null),u=w.useRef(0),[c,d]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=Sj(c.viewport,c.content),p={...s,sizes:c,onSizesChange:d,hasThumb:h>0&&h<1,onThumbChange:b=>o.current=b,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:b=>u.current=b};function m(b,v){return TW(b,u.current,c,v)}return n==="horizontal"?r.jsx(EW,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const b=a.viewport.scrollLeft,v=ck(b,c,a.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollLeft=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollLeft=m(b,a.dir))}}):n==="vertical"?r.jsx(SW,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const b=a.viewport.scrollTop,v=ck(b,c);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollTop=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollTop=m(b))}}):null}),EW=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:s,...a}=e,o=Ts(ia,e.__scopeScrollArea),[u,c]=w.useState(),d=w.useRef(null),h=Nt(t,d,o.onScrollbarXChange);return w.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(vj,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":vm(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,m)=>{if(o.viewport){const b=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(b),wj(b,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&s({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Cp(u.paddingLeft),paddingEnd:Cp(u.paddingRight)}})}})}),SW=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:s,...a}=e,o=Ts(ia,e.__scopeScrollArea),[u,c]=w.useState(),d=w.useRef(null),h=Nt(t,d,o.onScrollbarYChange);return w.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(vj,{"data-orientation":"vertical",...a,ref:h,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":vm(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,m)=>{if(o.viewport){const b=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(b),wj(b,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&s({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Cp(u.paddingTop),paddingEnd:Cp(u.paddingBottom)}})}})}),[_W,xj]=fj(ia),vj=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:s,hasThumb:a,onThumbChange:o,onThumbPointerUp:u,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:p,onResize:m,...b}=e,v=Ts(ia,n),[C,S]=w.useState(null),g=Nt(t,F=>S(F)),y=w.useRef(null),E=w.useRef(""),_=v.viewport,T=s.content-s.viewport,A=Ln(p),k=Ln(d),j=ym(m,10);function R(F){if(y.current){const M=F.clientX-y.current.left,H=F.clientY-y.current.top;h({x:M,y:H})}}return w.useEffect(()=>{const F=M=>{const H=M.target;C?.contains(H)&&A(M,T)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[_,C,T,A]),w.useEffect(k,[s,k]),Yl(C,j),Yl(v.content,j),r.jsx(_W,{scope:n,scrollbar:C,hasThumb:a,onThumbChange:Ln(o),onThumbPointerUp:Ln(u),onThumbPositionChange:k,onThumbPointerDown:Ln(c),children:r.jsx(ht.div,{...b,ref:g,style:{position:"absolute",...b.style},onPointerDown:Ve(e.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),y.current=C.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),R(F))}),onPointerMove:Ve(e.onPointerMove,R),onPointerUp:Ve(e.onPointerUp,F=>{const M=F.target;M.hasPointerCapture(F.pointerId)&&M.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=E.current,v.viewport&&(v.viewport.style.scrollBehavior=""),y.current=null})})})}),wp="ScrollAreaThumb",yj=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=xj(wp,e.__scopeScrollArea);return r.jsx(mr,{present:n||a.hasThumb,children:r.jsx(wW,{ref:t,...s})})}),wW=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:s,...a}=e,o=Ts(wp,n),u=xj(wp,n),{onThumbPositionChange:c}=u,d=Nt(t,m=>u.onThumbChange(m)),h=w.useRef(void 0),p=ym(()=>{h.current&&(h.current(),h.current=void 0)},100);return w.useEffect(()=>{const m=o.viewport;if(m){const b=()=>{if(p(),!h.current){const v=NW(m,c);h.current=v,c()}};return c(),m.addEventListener("scroll",b),()=>m.removeEventListener("scroll",b)}},[o.viewport,p,c]),r.jsx(ht.div,{"data-state":u.hasThumb?"visible":"hidden",...a,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:Ve(e.onPointerDownCapture,m=>{const v=m.target.getBoundingClientRect(),C=m.clientX-v.left,S=m.clientY-v.top;u.onThumbPointerDown({x:C,y:S})}),onPointerUp:Ve(e.onPointerUp,u.onThumbPointerUp)})});yj.displayName=wp;var jy="ScrollAreaCorner",Ej=w.forwardRef((e,t)=>{const n=Ts(jy,e.__scopeScrollArea),s=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&s?r.jsx(CW,{...e,ref:t}):null});Ej.displayName=jy;var CW=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...s}=e,a=Ts(jy,n),[o,u]=w.useState(0),[c,d]=w.useState(0),h=!!(o&&c);return Yl(a.scrollbarX,()=>{const p=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(p),d(p)}),Yl(a.scrollbarY,()=>{const p=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(p),u(p)}),h?r.jsx(ht.div,{...s,ref:t,style:{width:o,height:c,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Cp(e){return e?parseInt(e,10):0}function Sj(e,t){const n=e/t;return isNaN(n)?0:n}function vm(e){const t=Sj(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-n)*t;return Math.max(s,18)}function TW(e,t,n,s="ltr"){const a=vm(n),o=a/2,u=t||o,c=a-u,d=n.scrollbar.paddingStart+u,h=n.scrollbar.size-n.scrollbar.paddingEnd-c,p=n.content-n.viewport,m=s==="ltr"?[0,p]:[p*-1,0];return _j([d,h],m)(e)}function ck(e,t,n="ltr"){const s=vm(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,u=t.content-t.viewport,c=o-s,d=n==="ltr"?[0,u]:[u*-1,0],h=Vx(e,d);return _j([0,u],[0,c])(h)}function _j(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const s=(t[1]-t[0])/(e[1]-e[0]);return t[0]+s*(n-e[0])}}function wj(e,t){return e>0&&e<t}var NW=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},s=0;return(function a(){const o={left:e.scrollLeft,top:e.scrollTop},u=n.left!==o.left,c=n.top!==o.top;(u||c)&&t(),n=o,s=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(s)};function ym(e,t){const n=Ln(e),s=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),w.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(n,t)},[n,t])}function Yl(e,t){const n=Ln(t);ar(()=>{let s=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(s),a.unobserve(e)}}},[e,n])}var Cj=pj,AW=gj,kW=Ej;const ws=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(Cj,{ref:s,className:Ae("relative overflow-hidden",e),...n,children:[r.jsx(AW,{className:"h-full w-full rounded-[inherit]",children:t}),r.jsx(Tj,{}),r.jsx(kW,{})]}));ws.displayName=Cj.displayName;const Tj=w.forwardRef(({className:e,orientation:t="vertical",...n},s)=>r.jsx(Iy,{ref:s,orientation:t,className:Ae("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:r.jsx(yj,{className:"relative flex-1 rounded-full bg-border"})}));Tj.displayName=Iy.displayName;function md(e){const t=[],n=String(e||"");let s=n.indexOf(","),a=0,o=!1;for(;!o;){s===-1&&(s=n.length,o=!0);const u=n.slice(a,s).trim();(u||!o)&&t.push(u),a=s+1,s=n.indexOf(",",a)}return t}function Em(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const RW=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,DW=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IW={};function uk(e,t){return(IW.jsx?DW:RW).test(e)}const OW=/[ \t\n\f\r]/g;function Bd(e){return typeof e=="object"?e.type==="text"?dk(e.value):!1:dk(e)}function dk(e){return e.replace(OW,"")===""}let Ud=class{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}};Ud.prototype.normal={};Ud.prototype.property={};Ud.prototype.space=void 0;function Nj(e,t){const n={},s={};for(const a of e)Object.assign(n,a.property),Object.assign(s,a.normal);return new Ud(n,s,t)}function gd(e){return e.toLowerCase()}let Kr=class{constructor(t,n){this.attribute=n,this.property=t}};Kr.prototype.attribute="";Kr.prototype.booleanish=!1;Kr.prototype.boolean=!1;Kr.prototype.commaOrSpaceSeparated=!1;Kr.prototype.commaSeparated=!1;Kr.prototype.defined=!1;Kr.prototype.mustUseProperty=!1;Kr.prototype.number=!1;Kr.prototype.overloadedBoolean=!1;Kr.prototype.property="";Kr.prototype.spaceSeparated=!1;Kr.prototype.space=void 0;let jW=0;const Dt=Co(),$n=Co(),Jx=Co(),qe=Co(),xn=Co(),Fl=Co(),rs=Co();function Co(){return 2**++jW}const ev=Object.freeze(Object.defineProperty({__proto__:null,boolean:Dt,booleanish:$n,commaOrSpaceSeparated:rs,commaSeparated:Fl,number:qe,overloadedBoolean:Jx,spaceSeparated:xn},Symbol.toStringTag,{value:"Module"})),B0=Object.keys(ev);let Ly=class extends Kr{constructor(t,n,s,a){let o=-1;if(super(t,n),hk(this,"space",a),typeof s=="number")for(;++o<B0.length;){const u=B0[o];hk(this,B0[o],(s&ev[u])===ev[u])}}};Ly.prototype.defined=!0;function hk(e,t,n){n&&(e[t]=n)}function xc(e){const t={},n={};for(const[s,a]of Object.entries(e.properties)){const o=new Ly(s,e.transform(e.attributes||{},s),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[gd(s)]=s,n[gd(o.attribute)]=s}return new Ud(t,n,e.space)}const Aj=xc({properties:{ariaActiveDescendant:null,ariaAtomic:$n,ariaAutoComplete:null,ariaBusy:$n,ariaChecked:$n,ariaColCount:qe,ariaColIndex:qe,ariaColSpan:qe,ariaControls:xn,ariaCurrent:null,ariaDescribedBy:xn,ariaDetails:null,ariaDisabled:$n,ariaDropEffect:xn,ariaErrorMessage:null,ariaExpanded:$n,ariaFlowTo:xn,ariaGrabbed:$n,ariaHasPopup:null,ariaHidden:$n,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xn,ariaLevel:qe,ariaLive:null,ariaModal:$n,ariaMultiLine:$n,ariaMultiSelectable:$n,ariaOrientation:null,ariaOwns:xn,ariaPlaceholder:null,ariaPosInSet:qe,ariaPressed:$n,ariaReadOnly:$n,ariaRelevant:null,ariaRequired:$n,ariaRoleDescription:xn,ariaRowCount:qe,ariaRowIndex:qe,ariaRowSpan:qe,ariaSelected:$n,ariaSetSize:qe,ariaSort:null,ariaValueMax:qe,ariaValueMin:qe,ariaValueNow:qe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function kj(e,t){return t in e?e[t]:t}function Rj(e,t){return kj(e,t.toLowerCase())}const LW=xc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fl,acceptCharset:xn,accessKey:xn,action:null,allow:null,allowFullScreen:Dt,allowPaymentRequest:Dt,allowUserMedia:Dt,alt:null,as:null,async:Dt,autoCapitalize:null,autoComplete:xn,autoFocus:Dt,autoPlay:Dt,blocking:xn,capture:null,charSet:null,checked:Dt,cite:null,className:xn,cols:qe,colSpan:null,content:null,contentEditable:$n,controls:Dt,controlsList:xn,coords:qe|Fl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Dt,defer:Dt,dir:null,dirName:null,disabled:Dt,download:Jx,draggable:$n,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Dt,formTarget:null,headers:xn,height:qe,hidden:Jx,high:qe,href:null,hrefLang:null,htmlFor:xn,httpEquiv:xn,id:null,imageSizes:null,imageSrcSet:null,inert:Dt,inputMode:null,integrity:null,is:null,isMap:Dt,itemId:null,itemProp:xn,itemRef:xn,itemScope:Dt,itemType:xn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Dt,low:qe,manifest:null,max:null,maxLength:qe,media:null,method:null,min:null,minLength:qe,multiple:Dt,muted:Dt,name:null,nonce:null,noModule:Dt,noValidate:Dt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Dt,optimum:qe,pattern:null,ping:xn,placeholder:null,playsInline:Dt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Dt,referrerPolicy:null,rel:xn,required:Dt,reversed:Dt,rows:qe,rowSpan:qe,sandbox:xn,scope:null,scoped:Dt,seamless:Dt,selected:Dt,shadowRootClonable:Dt,shadowRootDelegatesFocus:Dt,shadowRootMode:null,shape:null,size:qe,sizes:null,slot:null,span:qe,spellCheck:$n,src:null,srcDoc:null,srcLang:null,srcSet:null,start:qe,step:null,style:null,tabIndex:qe,target:null,title:null,translate:null,type:null,typeMustMatch:Dt,useMap:null,value:$n,width:qe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xn,axis:null,background:null,bgColor:null,border:qe,borderColor:null,bottomMargin:qe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Dt,declare:Dt,event:null,face:null,frame:null,frameBorder:null,hSpace:qe,leftMargin:qe,link:null,longDesc:null,lowSrc:null,marginHeight:qe,marginWidth:qe,noResize:Dt,noHref:Dt,noShade:Dt,noWrap:Dt,object:null,profile:null,prompt:null,rev:null,rightMargin:qe,rules:null,scheme:null,scrolling:$n,standby:null,summary:null,text:null,topMargin:qe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:qe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Dt,disableRemotePlayback:Dt,prefix:null,property:null,results:qe,security:null,unselectable:null},space:"html",transform:Rj}),MW=xc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:rs,accentHeight:qe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:qe,amplitude:qe,arabicForm:null,ascent:qe,attributeName:null,attributeType:null,azimuth:qe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:qe,by:null,calcMode:null,capHeight:qe,className:xn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:qe,diffuseConstant:qe,direction:null,display:null,dur:null,divisor:qe,dominantBaseline:null,download:Dt,dx:null,dy:null,edgeMode:null,editable:null,elevation:qe,enableBackground:null,end:null,event:null,exponent:qe,externalResourcesRequired:null,fill:null,fillOpacity:qe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Fl,g2:Fl,glyphName:Fl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:qe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:qe,horizOriginX:qe,horizOriginY:qe,id:null,ideographic:qe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:qe,k:qe,k1:qe,k2:qe,k3:qe,k4:qe,kernelMatrix:rs,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:qe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:qe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:qe,overlineThickness:qe,paintOrder:null,panose1:null,path:null,pathLength:qe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:qe,pointsAtY:qe,pointsAtZ:qe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rs,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rs,rev:rs,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rs,requiredFeatures:rs,requiredFonts:rs,requiredFormats:rs,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:qe,specularExponent:qe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:qe,strikethroughThickness:qe,string:null,stroke:null,strokeDashArray:rs,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:qe,strokeOpacity:qe,strokeWidth:null,style:null,surfaceScale:qe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rs,tabIndex:qe,tableValues:null,target:null,targetX:qe,targetY:qe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rs,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:qe,underlineThickness:qe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:qe,values:null,vAlphabetic:qe,vMathematical:qe,vectorEffect:null,vHanging:qe,vIdeographic:qe,version:null,vertAdvY:qe,vertOriginX:qe,vertOriginY:qe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:qe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kj}),Dj=xc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Ij=xc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Rj}),Oj=xc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),FW={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},PW=/[A-Z]/g,fk=/-[a-z]/g,BW=/^data[-\w.:]+$/i;function Hd(e,t){const n=gd(t);let s=t,a=Kr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&BW.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(fk,HW);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!fk.test(o)){let u=o.replace(PW,UW);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=Ly}return new a(s,t)}function UW(e){return"-"+e.toLowerCase()}function HW(e){return e.charAt(1).toUpperCase()}const vc=Nj([Aj,LW,Dj,Ij,Oj],"html"),Ga=Nj([Aj,MW,Dj,Ij,Oj],"svg");function bd(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Sm(e){return e.join(" ").trim()}var Sl={},U0,pk;function $W(){if(pk)return U0;pk=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
654
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ez="DialogDescriptionWarning",Sz=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${OO(Ez).contentName}}.`;return w.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},oy=vO,jO=EO,ly=_O,jd=wO,Ld=CO,Md=NO,Fd=kO,om=DO;const LO=oy,_z=ly,MO=w.forwardRef(({className:e,...t},n)=>r.jsx(jd,{className:Ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));MO.displayName=jd.displayName;const wz=uc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),cy=w.forwardRef(({side:e="right",className:t,children:n,...s},a)=>r.jsxs(_z,{children:[r.jsx(MO,{}),r.jsxs(Ld,{ref:a,className:Ae(wz({side:e}),t),...s,children:[n,r.jsxs(om,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r.jsx(wr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));cy.displayName=Ld.displayName;const uy=({className:e,...t})=>r.jsx("div",{className:Ae("flex flex-col space-y-2 text-center sm:text-left",e),...t});uy.displayName="SheetHeader";const dy=w.forwardRef(({className:e,...t},n)=>r.jsx(Md,{ref:n,className:Ae("text-lg font-semibold text-foreground",e),...t}));dy.displayName=Md.displayName;const FO=w.forwardRef(({className:e,...t},n)=>r.jsx(Fd,{ref:n,className:Ae("text-sm text-muted-foreground",e),...t}));FO.displayName=Fd.displayName;function Q2({className:e,...t}){return r.jsx("div",{className:Ae("animate-pulse rounded-md bg-muted",e),...t})}const Cz=["top","right","bottom","left"],ki=Math.min,as=Math.max,xp=Math.round,Df=Math.floor,ta=e=>({x:e,y:e}),Tz={left:"right",right:"left",bottom:"top",top:"bottom"},Nz={start:"end",end:"start"};function Hx(e,t,n){return as(e,ki(t,n))}function Ua(e,t){return typeof e=="function"?e(t):e}function Ha(e){return e.split("-")[0]}function fc(e){return e.split("-")[1]}function hy(e){return e==="x"?"y":"x"}function fy(e){return e==="y"?"height":"width"}const Az=new Set(["top","bottom"]);function Qs(e){return Az.has(Ha(e))?"y":"x"}function py(e){return hy(Qs(e))}function kz(e,t,n){n===void 0&&(n=!1);const s=fc(e),a=py(e),o=fy(a);let u=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(u=vp(u)),[u,vp(u)]}function Rz(e){const t=vp(e);return[$x(e),t,$x(t)]}function $x(e){return e.replace(/start|end/g,t=>Nz[t])}const J2=["left","right"],ek=["right","left"],Dz=["top","bottom"],Iz=["bottom","top"];function Oz(e,t,n){switch(e){case"top":case"bottom":return n?t?ek:J2:t?J2:ek;case"left":case"right":return t?Dz:Iz;default:return[]}}function jz(e,t,n,s){const a=fc(e);let o=Oz(Ha(e),n==="start",s);return a&&(o=o.map(u=>u+"-"+a),t&&(o=o.concat(o.map($x)))),o}function vp(e){return e.replace(/left|right|bottom|top/g,t=>Tz[t])}function Lz(e){return{top:0,right:0,bottom:0,left:0,...e}}function PO(e){return typeof e!="number"?Lz(e):{top:e,right:e,bottom:e,left:e}}function yp(e){const{x:t,y:n,width:s,height:a}=e;return{width:s,height:a,top:n,left:t,right:t+s,bottom:n+a,x:t,y:n}}function tk(e,t,n){let{reference:s,floating:a}=e;const o=Qs(t),u=py(t),c=fy(u),d=Ha(t),h=o==="y",p=s.x+s.width/2-a.width/2,m=s.y+s.height/2-a.height/2,b=s[c]/2-a[c]/2;let v;switch(d){case"top":v={x:p,y:s.y-a.height};break;case"bottom":v={x:p,y:s.y+s.height};break;case"right":v={x:s.x+s.width,y:m};break;case"left":v={x:s.x-a.width,y:m};break;default:v={x:s.x,y:s.y}}switch(fc(t)){case"start":v[u]-=b*(n&&h?-1:1);break;case"end":v[u]+=b*(n&&h?-1:1);break}return v}const Mz=async(e,t,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:o=[],platform:u}=n,c=o.filter(Boolean),d=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:m}=tk(h,s,d),b=s,v={},C=0;for(let S=0;S<c.length;S++){const{name:g,fn:y}=c[S],{x:E,y:_,data:T,reset:A}=await y({x:p,y:m,initialPlacement:s,placement:b,strategy:a,middlewareData:v,rects:h,platform:u,elements:{reference:e,floating:t}});p=E??p,m=_??m,v={...v,[g]:{...v[g],...T}},A&&C<=50&&(C++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(h=A.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:a}):A.rects),{x:p,y:m}=tk(h,b,d)),S=-1)}return{x:p,y:m,placement:b,strategy:a,middlewareData:v}};async function hd(e,t){var n;t===void 0&&(t={});const{x:s,y:a,platform:o,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:v=0}=Ua(t,e),C=PO(v),g=c[b?m==="floating"?"reference":"floating":m],y=yp(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),E=m==="floating"?{x:s,y:a,width:u.floating.width,height:u.floating.height}:u.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),T=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},A=yp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:_,strategy:d}):E);return{top:(y.top-A.top+C.top)/T.y,bottom:(A.bottom-y.bottom+C.bottom)/T.y,left:(y.left-A.left+C.left)/T.x,right:(A.right-y.right+C.right)/T.x}}const Fz=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:a,rects:o,platform:u,elements:c,middlewareData:d}=t,{element:h,padding:p=0}=Ua(e,t)||{};if(h==null)return{};const m=PO(p),b={x:n,y:s},v=py(a),C=fy(v),S=await u.getDimensions(h),g=v==="y",y=g?"top":"left",E=g?"bottom":"right",_=g?"clientHeight":"clientWidth",T=o.reference[C]+o.reference[v]-b[v]-o.floating[C],A=b[v]-o.reference[v],k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let j=k?k[_]:0;(!j||!await(u.isElement==null?void 0:u.isElement(k)))&&(j=c.floating[_]||o.floating[C]);const R=T/2-A/2,F=j/2-S[C]/2-1,M=ki(m[y],F),H=ki(m[E],F),U=M,L=j-S[C]-H,$=j/2-S[C]/2+R,X=Hx(U,$,L),P=!d.arrow&&fc(a)!=null&&$!==X&&o.reference[C]/2-($<U?M:H)-S[C]/2<0,Z=P?$<U?$-U:$-L:0;return{[v]:b[v]+Z,data:{[v]:X,centerOffset:$-X-Z,...P&&{alignmentOffset:Z}},reset:P}}}),Pz=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:a,middlewareData:o,rects:u,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:S=!0,...g}=Ua(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Ha(a),E=Qs(c),_=Ha(c)===c,T=await(d.isRTL==null?void 0:d.isRTL(h.floating)),A=b||(_||!S?[vp(c)]:Rz(c)),k=C!=="none";!b&&k&&A.push(...jz(c,S,C,T));const j=[c,...A],R=await hd(t,g),F=[];let M=((s=o.flip)==null?void 0:s.overflows)||[];if(p&&F.push(R[y]),m){const $=kz(a,u,T);F.push(R[$[0]],R[$[1]])}if(M=[...M,{placement:a,overflows:F}],!F.every($=>$<=0)){var H,U;const $=(((H=o.flip)==null?void 0:H.index)||0)+1,X=j[$];if(X&&(!(m==="alignment"?E!==Qs(X):!1)||M.every(Y=>Qs(Y.placement)===E?Y.overflows[0]>0:!0)))return{data:{index:$,overflows:M},reset:{placement:X}};let P=(U=M.filter(Z=>Z.overflows[0]<=0).sort((Z,Y)=>Z.overflows[1]-Y.overflows[1])[0])==null?void 0:U.placement;if(!P)switch(v){case"bestFit":{var L;const Z=(L=M.filter(Y=>{if(k){const B=Qs(Y.placement);return B===E||B==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(B=>B>0).reduce((B,O)=>B+O,0)]).sort((Y,B)=>Y[1]-B[1])[0])==null?void 0:L[0];Z&&(P=Z);break}case"initialPlacement":P=c;break}if(a!==P)return{reset:{placement:P}}}return{}}}};function nk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rk(e){return Cz.some(t=>e[t]>=0)}const Bz=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:s="referenceHidden",...a}=Ua(e,t);switch(s){case"referenceHidden":{const o=await hd(t,{...a,elementContext:"reference"}),u=nk(o,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:rk(u)}}}case"escaped":{const o=await hd(t,{...a,altBoundary:!0}),u=nk(o,n.floating);return{data:{escapedOffsets:u,escaped:rk(u)}}}default:return{}}}}},BO=new Set(["left","top"]);async function Uz(e,t){const{placement:n,platform:s,elements:a}=e,o=await(s.isRTL==null?void 0:s.isRTL(a.floating)),u=Ha(n),c=fc(n),d=Qs(n)==="y",h=BO.has(u)?-1:1,p=o&&d?-1:1,m=Ua(t,e);let{mainAxis:b,crossAxis:v,alignmentAxis:C}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof C=="number"&&(v=c==="end"?C*-1:C),d?{x:v*p,y:b*h}:{x:b*h,y:v*p}}const Hz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:a,y:o,placement:u,middlewareData:c}=t,d=await Uz(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:a+d.x,y:o+d.y,data:{...d,placement:u}}}}},$z=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:a}=t,{mainAxis:o=!0,crossAxis:u=!1,limiter:c={fn:g=>{let{x:y,y:E}=g;return{x:y,y:E}}},...d}=Ua(e,t),h={x:n,y:s},p=await hd(t,d),m=Qs(Ha(a)),b=hy(m);let v=h[b],C=h[m];if(o){const g=b==="y"?"top":"left",y=b==="y"?"bottom":"right",E=v+p[g],_=v-p[y];v=Hx(E,v,_)}if(u){const g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",E=C+p[g],_=C-p[y];C=Hx(E,C,_)}const S=c.fn({...t,[b]:v,[m]:C});return{...S,data:{x:S.x-n,y:S.y-s,enabled:{[b]:o,[m]:u}}}}}},zz=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:a,rects:o,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Ua(e,t),p={x:n,y:s},m=Qs(a),b=hy(m);let v=p[b],C=p[m];const S=Ua(c,t),g=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const _=b==="y"?"height":"width",T=o.reference[b]-o.floating[_]+g.mainAxis,A=o.reference[b]+o.reference[_]-g.mainAxis;v<T?v=T:v>A&&(v=A)}if(h){var y,E;const _=b==="y"?"width":"height",T=BO.has(Ha(a)),A=o.reference[m]-o.floating[_]+(T&&((y=u.offset)==null?void 0:y[m])||0)+(T?0:g.crossAxis),k=o.reference[m]+o.reference[_]+(T?0:((E=u.offset)==null?void 0:E[m])||0)-(T?g.crossAxis:0);C<A?C=A:C>k&&(C=k)}return{[b]:v,[m]:C}}}},Gz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:a,rects:o,platform:u,elements:c}=t,{apply:d=()=>{},...h}=Ua(e,t),p=await hd(t,h),m=Ha(a),b=fc(a),v=Qs(a)==="y",{width:C,height:S}=o.floating;let g,y;m==="top"||m==="bottom"?(g=m,y=b===(await(u.isRTL==null?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(y=m,g=b==="end"?"top":"bottom");const E=S-p.top-p.bottom,_=C-p.left-p.right,T=ki(S-p[g],E),A=ki(C-p[y],_),k=!t.middlewareData.shift;let j=T,R=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=_),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(j=E),k&&!b){const M=as(p.left,0),H=as(p.right,0),U=as(p.top,0),L=as(p.bottom,0);v?R=C-2*(M!==0||H!==0?M+H:as(p.left,p.right)):j=S-2*(U!==0||L!==0?U+L:as(p.top,p.bottom))}await d({...t,availableWidth:R,availableHeight:j});const F=await u.getDimensions(c.floating);return C!==F.width||S!==F.height?{reset:{rects:!0}}:{}}}};function lm(){return typeof window<"u"}function pc(e){return UO(e)?(e.nodeName||"").toLowerCase():"#document"}function ls(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function aa(e){var t;return(t=(UO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function UO(e){return lm()?e instanceof Node||e instanceof ls(e).Node:!1}function Ls(e){return lm()?e instanceof Element||e instanceof ls(e).Element:!1}function ra(e){return lm()?e instanceof HTMLElement||e instanceof ls(e).HTMLElement:!1}function sk(e){return!lm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ls(e).ShadowRoot}const qz=new Set(["inline","contents"]);function Pd(e){const{overflow:t,overflowX:n,overflowY:s,display:a}=Ms(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!qz.has(a)}const Wz=new Set(["table","td","th"]);function Vz(e){return Wz.has(pc(e))}const Yz=[":popover-open",":modal"];function cm(e){return Yz.some(t=>{try{return e.matches(t)}catch{return!1}})}const Kz=["transform","translate","scale","rotate","perspective"],Xz=["transform","translate","scale","rotate","perspective","filter"],Zz=["paint","layout","strict","content"];function my(e){const t=gy(),n=Ls(e)?Ms(e):e;return Kz.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Xz.some(s=>(n.willChange||"").includes(s))||Zz.some(s=>(n.contain||"").includes(s))}function Qz(e){let t=Ri(e);for(;ra(t)&&!Wl(t);){if(my(t))return t;if(cm(t))return null;t=Ri(t)}return null}function gy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Jz=new Set(["html","body","#document"]);function Wl(e){return Jz.has(pc(e))}function Ms(e){return ls(e).getComputedStyle(e)}function um(e){return Ls(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ri(e){if(pc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sk(e)&&e.host||aa(e);return sk(t)?t.host:t}function HO(e){const t=Ri(e);return Wl(t)?e.ownerDocument?e.ownerDocument.body:e.body:ra(t)&&Pd(t)?t:HO(t)}function fd(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=HO(e),o=a===((s=e.ownerDocument)==null?void 0:s.body),u=ls(a);if(o){const c=zx(u);return t.concat(u,u.visualViewport||[],Pd(a)?a:[],c&&n?fd(c):[])}return t.concat(a,fd(a,[],n))}function zx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $O(e){const t=Ms(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=ra(e),o=a?e.offsetWidth:n,u=a?e.offsetHeight:s,c=xp(n)!==o||xp(s)!==u;return c&&(n=o,s=u),{width:n,height:s,$:c}}function by(e){return Ls(e)?e:e.contextElement}function Ml(e){const t=by(e);if(!ra(t))return ta(1);const n=t.getBoundingClientRect(),{width:s,height:a,$:o}=$O(t);let u=(o?xp(n.width):n.width)/s,c=(o?xp(n.height):n.height)/a;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const eG=ta(0);function zO(e){const t=ls(e);return!gy()||!t.visualViewport?eG:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tG(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ls(e)?!1:t}function mo(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=by(e);let u=ta(1);t&&(s?Ls(s)&&(u=Ml(s)):u=Ml(e));const c=tG(o,n,s)?zO(o):ta(0);let d=(a.left+c.x)/u.x,h=(a.top+c.y)/u.y,p=a.width/u.x,m=a.height/u.y;if(o){const b=ls(o),v=s&&Ls(s)?ls(s):s;let C=b,S=zx(C);for(;S&&s&&v!==C;){const g=Ml(S),y=S.getBoundingClientRect(),E=Ms(S),_=y.left+(S.clientLeft+parseFloat(E.paddingLeft))*g.x,T=y.top+(S.clientTop+parseFloat(E.paddingTop))*g.y;d*=g.x,h*=g.y,p*=g.x,m*=g.y,d+=_,h+=T,C=ls(S),S=zx(C)}}return yp({width:p,height:m,x:d,y:h})}function xy(e,t){const n=um(e).scrollLeft;return t?t.left+n:mo(aa(e)).left+n}function GO(e,t,n){n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=s.left+t.scrollLeft-(n?0:xy(e,s)),o=s.top+t.scrollTop;return{x:a,y:o}}function nG(e){let{elements:t,rect:n,offsetParent:s,strategy:a}=e;const o=a==="fixed",u=aa(s),c=t?cm(t.floating):!1;if(s===u||c&&o)return n;let d={scrollLeft:0,scrollTop:0},h=ta(1);const p=ta(0),m=ra(s);if((m||!m&&!o)&&((pc(s)!=="body"||Pd(u))&&(d=um(s)),ra(s))){const v=mo(s);h=Ml(s),p.x=v.x+s.clientLeft,p.y=v.y+s.clientTop}const b=u&&!m&&!o?GO(u,d,!0):ta(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+b.x,y:n.y*h.y-d.scrollTop*h.y+p.y+b.y}}function rG(e){return Array.from(e.getClientRects())}function sG(e){const t=aa(e),n=um(e),s=e.ownerDocument.body,a=as(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=as(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let u=-n.scrollLeft+xy(e);const c=-n.scrollTop;return Ms(s).direction==="rtl"&&(u+=as(t.clientWidth,s.clientWidth)-a),{width:a,height:o,x:u,y:c}}function aG(e,t){const n=ls(e),s=aa(e),a=n.visualViewport;let o=s.clientWidth,u=s.clientHeight,c=0,d=0;if(a){o=a.width,u=a.height;const h=gy();(!h||h&&t==="fixed")&&(c=a.offsetLeft,d=a.offsetTop)}return{width:o,height:u,x:c,y:d}}const iG=new Set(["absolute","fixed"]);function oG(e,t){const n=mo(e,!0,t==="fixed"),s=n.top+e.clientTop,a=n.left+e.clientLeft,o=ra(e)?Ml(e):ta(1),u=e.clientWidth*o.x,c=e.clientHeight*o.y,d=a*o.x,h=s*o.y;return{width:u,height:c,x:d,y:h}}function ak(e,t,n){let s;if(t==="viewport")s=aG(e,n);else if(t==="document")s=sG(aa(e));else if(Ls(t))s=oG(t,n);else{const a=zO(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return yp(s)}function qO(e,t){const n=Ri(e);return n===t||!Ls(n)||Wl(n)?!1:Ms(n).position==="fixed"||qO(n,t)}function lG(e,t){const n=t.get(e);if(n)return n;let s=fd(e,[],!1).filter(c=>Ls(c)&&pc(c)!=="body"),a=null;const o=Ms(e).position==="fixed";let u=o?Ri(e):e;for(;Ls(u)&&!Wl(u);){const c=Ms(u),d=my(u);!d&&c.position==="fixed"&&(a=null),(o?!d&&!a:!d&&c.position==="static"&&!!a&&iG.has(a.position)||Pd(u)&&!d&&qO(e,u))?s=s.filter(p=>p!==u):a=c,u=Ri(u)}return t.set(e,s),s}function cG(e){let{element:t,boundary:n,rootBoundary:s,strategy:a}=e;const u=[...n==="clippingAncestors"?cm(t)?[]:lG(t,this._c):[].concat(n),s],c=u[0],d=u.reduce((h,p)=>{const m=ak(t,p,a);return h.top=as(m.top,h.top),h.right=ki(m.right,h.right),h.bottom=ki(m.bottom,h.bottom),h.left=as(m.left,h.left),h},ak(t,c,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function uG(e){const{width:t,height:n}=$O(e);return{width:t,height:n}}function dG(e,t,n){const s=ra(t),a=aa(t),o=n==="fixed",u=mo(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=ta(0);function h(){d.x=xy(a)}if(s||!s&&!o)if((pc(t)!=="body"||Pd(a))&&(c=um(t)),s){const v=mo(t,!0,o,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else a&&h();o&&!s&&a&&h();const p=a&&!s&&!o?GO(a,c):ta(0),m=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:m,y:b,width:u.width,height:u.height}}function F0(e){return Ms(e).position==="static"}function ik(e,t){if(!ra(e)||Ms(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return aa(e)===n&&(n=n.ownerDocument.body),n}function WO(e,t){const n=ls(e);if(cm(e))return n;if(!ra(e)){let a=Ri(e);for(;a&&!Wl(a);){if(Ls(a)&&!F0(a))return a;a=Ri(a)}return n}let s=ik(e,t);for(;s&&Vz(s)&&F0(s);)s=ik(s,t);return s&&Wl(s)&&F0(s)&&!my(s)?n:s||Qz(e)||n}const hG=async function(e){const t=this.getOffsetParent||WO,n=this.getDimensions,s=await n(e.floating);return{reference:dG(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function fG(e){return Ms(e).direction==="rtl"}const pG={convertOffsetParentRelativeRectToViewportRelativeRect:nG,getDocumentElement:aa,getClippingRect:cG,getOffsetParent:WO,getElementRects:hG,getClientRects:rG,getDimensions:uG,getScale:Ml,isElement:Ls,isRTL:fG};function VO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mG(e,t){let n=null,s;const a=aa(e);function o(){var c;clearTimeout(s),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),o();const h=e.getBoundingClientRect(),{left:p,top:m,width:b,height:v}=h;if(c||t(),!b||!v)return;const C=Df(m),S=Df(a.clientWidth-(p+b)),g=Df(a.clientHeight-(m+v)),y=Df(p),_={rootMargin:-C+"px "+-S+"px "+-g+"px "+-y+"px",threshold:as(0,ki(1,d))||1};let T=!0;function A(k){const j=k[0].intersectionRatio;if(j!==d){if(!T)return u();j?u(!1,j):s=setTimeout(()=>{u(!1,1e-7)},1e3)}j===1&&!VO(h,e.getBoundingClientRect())&&u(),T=!1}try{n=new IntersectionObserver(A,{..._,root:a.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(e)}return u(!0),o}function gG(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=s,h=by(e),p=a||o?[...h?fd(h):[],...fd(t)]:[];p.forEach(y=>{a&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const m=h&&c?mG(h,n):null;let b=-1,v=null;u&&(v=new ResizeObserver(y=>{let[E]=y;E&&E.target===h&&v&&(v.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var _;(_=v)==null||_.observe(t)})),n()}),h&&!d&&v.observe(h),v.observe(t));let C,S=d?mo(e):null;d&&g();function g(){const y=mo(e);S&&!VO(S,y)&&n(),S=y,C=requestAnimationFrame(g)}return n(),()=>{var y;p.forEach(E=>{a&&E.removeEventListener("scroll",n),o&&E.removeEventListener("resize",n)}),m?.(),(y=v)==null||y.disconnect(),v=null,d&&cancelAnimationFrame(C)}}const bG=Hz,xG=$z,vG=Pz,yG=Gz,EG=Bz,ok=Fz,SG=zz,_G=(e,t,n)=>{const s=new Map,a={platform:pG,...n},o={...a.platform,_c:s};return Mz(e,t,{...a,platform:o})};var wG=typeof document<"u",CG=function(){},tp=wG?w.useLayoutEffect:CG;function Ep(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!Ep(e[s],t[s]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,a[s]))return!1;for(s=n;s--!==0;){const o=a[s];if(!(o==="_owner"&&e.$$typeof)&&!Ep(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function YO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lk(e,t){const n=YO(e);return Math.round(t*n)/n}function P0(e){const t=w.useRef(e);return tp(()=>{t.current=e}),t}function TG(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:o,floating:u}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[p,m]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,v]=w.useState(s);Ep(b,s)||v(s);const[C,S]=w.useState(null),[g,y]=w.useState(null),E=w.useCallback(Y=>{Y!==k.current&&(k.current=Y,S(Y))},[]),_=w.useCallback(Y=>{Y!==j.current&&(j.current=Y,y(Y))},[]),T=o||C,A=u||g,k=w.useRef(null),j=w.useRef(null),R=w.useRef(p),F=d!=null,M=P0(d),H=P0(a),U=P0(h),L=w.useCallback(()=>{if(!k.current||!j.current)return;const Y={placement:t,strategy:n,middleware:b};H.current&&(Y.platform=H.current),_G(k.current,j.current,Y).then(B=>{const O={...B,isPositioned:U.current!==!1};$.current&&!Ep(R.current,O)&&(R.current=O,ic.flushSync(()=>{m(O)}))})},[b,t,n,H,U]);tp(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,m(Y=>({...Y,isPositioned:!1})))},[h]);const $=w.useRef(!1);tp(()=>($.current=!0,()=>{$.current=!1}),[]),tp(()=>{if(T&&(k.current=T),A&&(j.current=A),T&&A){if(M.current)return M.current(T,A,L);L()}},[T,A,L,M,F]);const X=w.useMemo(()=>({reference:k,floating:j,setReference:E,setFloating:_}),[E,_]),P=w.useMemo(()=>({reference:T,floating:A}),[T,A]),Z=w.useMemo(()=>{const Y={position:n,left:0,top:0};if(!P.floating)return Y;const B=lk(P.floating,p.x),O=lk(P.floating,p.y);return c?{...Y,transform:"translate("+B+"px, "+O+"px)",...YO(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:O}},[n,c,P.floating,p.x,p.y]);return w.useMemo(()=>({...p,update:L,refs:X,elements:P,floatingStyles:Z}),[p,L,X,P,Z])}const NG=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:a}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?ok({element:s.current,padding:a}).fn(n):{}:s?ok({element:s,padding:a}).fn(n):{}}}},AG=(e,t)=>({...bG(e),options:[e,t]}),kG=(e,t)=>({...xG(e),options:[e,t]}),RG=(e,t)=>({...SG(e),options:[e,t]}),DG=(e,t)=>({...vG(e),options:[e,t]}),IG=(e,t)=>({...yG(e),options:[e,t]}),OG=(e,t)=>({...EG(e),options:[e,t]}),jG=(e,t)=>({...NG(e),options:[e,t]});var LG="Arrow",KO=w.forwardRef((e,t)=>{const{children:n,width:s=10,height:a=5,...o}=e;return r.jsx(ht.svg,{...o,ref:t,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})});KO.displayName=LG;var MG=KO;function vy(e){const[t,n]=w.useState(void 0);return ar(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let u,c;if("borderBoxSize"in o){const d=o.borderBoxSize,h=Array.isArray(d)?d[0]:d;u=h.inlineSize,c=h.blockSize}else u=e.offsetWidth,c=e.offsetHeight;n({width:u,height:c})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var yy="Popper",[XO,mc]=Mr(yy),[FG,ZO]=XO(yy),QO=e=>{const{__scopePopper:t,children:n}=e,[s,a]=w.useState(null);return r.jsx(FG,{scope:t,anchor:s,onAnchorChange:a,children:n})};QO.displayName=yy;var JO="PopperAnchor",e3=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...a}=e,o=ZO(JO,n),u=w.useRef(null),c=Nt(t,u),d=w.useRef(null);return w.useEffect(()=>{const h=d.current;d.current=s?.current||u.current,h!==d.current&&o.onAnchorChange(d.current)}),s?null:r.jsx(ht.div,{...a,ref:c})});e3.displayName=JO;var Ey="PopperContent",[PG,BG]=XO(Ey),t3=w.forwardRef((e,t)=>{const{__scopePopper:n,side:s="bottom",sideOffset:a=0,align:o="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:C,...S}=e,g=ZO(Ey,n),[y,E]=w.useState(null),_=Nt(t,K=>E(K)),[T,A]=w.useState(null),k=vy(T),j=k?.width??0,R=k?.height??0,F=s+(o!=="center"?"-"+o:""),M=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},H=Array.isArray(h)?h:[h],U=H.length>0,L={padding:M,boundary:H.filter(HG),altBoundary:U},{refs:$,floatingStyles:X,placement:P,isPositioned:Z,middlewareData:Y}=TG({strategy:"fixed",placement:F,whileElementsMounted:(...K)=>gG(...K,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[AG({mainAxis:a+R,alignmentAxis:u}),d&&kG({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?RG():void 0,...L}),d&&DG({...L}),IG({...L,apply:({elements:K,rects:G,availableWidth:Q,availableHeight:ce})=>{const{width:oe,height:te}=G.reference,pe=K.floating.style;pe.setProperty("--radix-popper-available-width",`${Q}px`),pe.setProperty("--radix-popper-available-height",`${ce}px`),pe.setProperty("--radix-popper-anchor-width",`${oe}px`),pe.setProperty("--radix-popper-anchor-height",`${te}px`)}}),T&&jG({element:T,padding:c}),$G({arrowWidth:j,arrowHeight:R}),b&&OG({strategy:"referenceHidden",...L})]}),[B,O]=s3(P),W=Ln(C);ar(()=>{Z&&W?.()},[Z,W]);const ne=Y.arrow?.x,z=Y.arrow?.y,V=Y.arrow?.centerOffset!==0,[le,se]=w.useState();return ar(()=>{y&&se(window.getComputedStyle(y).zIndex)},[y]),r.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(PG,{scope:n,placedSide:B,onArrowChange:A,arrowX:ne,arrowY:z,shouldHideArrow:V,children:r.jsx(ht.div,{"data-side":B,"data-align":O,...S,ref:_,style:{...S.style,animation:Z?void 0:"none"}})})})});t3.displayName=Ey;var n3="PopperArrow",UG={top:"bottom",right:"left",bottom:"top",left:"right"},r3=w.forwardRef(function(t,n){const{__scopePopper:s,...a}=t,o=BG(n3,s),u=UG[o.placedSide];return r.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:r.jsx(MG,{...a,ref:n,style:{...a.style,display:"block"}})})});r3.displayName=n3;function HG(e){return e!==null}var $G=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:s,middlewareData:a}=t,u=a.arrow?.centerOffset!==0,c=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[h,p]=s3(n),m={start:"0%",center:"50%",end:"100%"}[p],b=(a.arrow?.x??0)+c/2,v=(a.arrow?.y??0)+d/2;let C="",S="";return h==="bottom"?(C=u?m:`${b}px`,S=`${-d}px`):h==="top"?(C=u?m:`${b}px`,S=`${s.floating.height+d}px`):h==="right"?(C=`${-d}px`,S=u?m:`${v}px`):h==="left"&&(C=`${s.floating.width+d}px`,S=u?m:`${v}px`),{data:{x:C,y:S}}}});function s3(e){const[t,n="center"]=e.split("-");return[t,n]}var Sy=QO,_y=e3,wy=t3,Cy=r3,[dm,Ude]=Mr("Tooltip",[mc]),hm=mc(),a3="TooltipProvider",zG=700,Gx="tooltip.open",[GG,Ty]=dm(a3),i3=e=>{const{__scopeTooltip:t,delayDuration:n=zG,skipDelayDuration:s=300,disableHoverableContent:a=!1,children:o}=e,u=w.useRef(!0),c=w.useRef(!1),d=w.useRef(0);return w.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),r.jsx(GG,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,s)},[s]),isPointerInTransitRef:c,onPointerInTransitChange:w.useCallback(h=>{c.current=h},[]),disableHoverableContent:a,children:o})};i3.displayName=a3;var pd="Tooltip",[qG,fm]=dm(pd),o3=e=>{const{__scopeTooltip:t,children:n,open:s,defaultOpen:a,onOpenChange:o,disableHoverableContent:u,delayDuration:c}=e,d=Ty(pd,e.__scopeTooltip),h=hm(t),[p,m]=w.useState(null),b=Os(),v=w.useRef(0),C=u??d.disableHoverableContent,S=c??d.delayDuration,g=w.useRef(!1),[y,E]=na({prop:s,defaultProp:a??!1,onChange:j=>{j?(d.onOpen(),document.dispatchEvent(new CustomEvent(Gx))):d.onClose(),o?.(j)},caller:pd}),_=w.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),T=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,E(!0)},[E]),A=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E(!1)},[E]),k=w.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,E(!0),v.current=0},S)},[S,E]);return w.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),r.jsx(Sy,{...h,children:r.jsx(qG,{scope:t,contentId:b,open:y,stateAttribute:_,trigger:p,onTriggerChange:m,onTriggerEnter:w.useCallback(()=>{d.isOpenDelayedRef.current?k():T()},[d.isOpenDelayedRef,k,T]),onTriggerLeave:w.useCallback(()=>{C?A():(window.clearTimeout(v.current),v.current=0)},[A,C]),onOpen:T,onClose:A,disableHoverableContent:C,children:n})})};o3.displayName=pd;var qx="TooltipTrigger",l3=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,a=fm(qx,n),o=Ty(qx,n),u=hm(n),c=w.useRef(null),d=Nt(t,c,a.onTriggerChange),h=w.useRef(!1),p=w.useRef(!1),m=w.useCallback(()=>h.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),r.jsx(_y,{asChild:!0,...u,children:r.jsx(ht.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...s,ref:d,onPointerMove:Ve(e.onPointerMove,b=>{b.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ve(e.onPointerLeave,()=>{a.onTriggerLeave(),p.current=!1}),onPointerDown:Ve(e.onPointerDown,()=>{a.open&&a.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Ve(e.onFocus,()=>{h.current||a.onOpen()}),onBlur:Ve(e.onBlur,a.onClose),onClick:Ve(e.onClick,a.onClose)})})});l3.displayName=qx;var WG="TooltipPortal",[Hde,VG]=dm(WG,{forceMount:void 0}),Vl="TooltipContent",c3=w.forwardRef((e,t)=>{const n=VG(Vl,e.__scopeTooltip),{forceMount:s=n.forceMount,side:a="top",...o}=e,u=fm(Vl,e.__scopeTooltip);return r.jsx(mr,{present:s||u.open,children:u.disableHoverableContent?r.jsx(u3,{side:a,...o,ref:t}):r.jsx(YG,{side:a,...o,ref:t})})}),YG=w.forwardRef((e,t)=>{const n=fm(Vl,e.__scopeTooltip),s=Ty(Vl,e.__scopeTooltip),a=w.useRef(null),o=Nt(t,a),[u,c]=w.useState(null),{trigger:d,onClose:h}=n,p=a.current,{onPointerInTransitChange:m}=s,b=w.useCallback(()=>{c(null),m(!1)},[m]),v=w.useCallback((C,S)=>{const g=C.currentTarget,y={x:C.clientX,y:C.clientY},E=JG(y,g.getBoundingClientRect()),_=eq(y,E),T=tq(S.getBoundingClientRect()),A=rq([..._,...T]);c(A),m(!0)},[m]);return w.useEffect(()=>()=>b(),[b]),w.useEffect(()=>{if(d&&p){const C=g=>v(g,p),S=g=>v(g,d);return d.addEventListener("pointerleave",C),p.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",C),p.removeEventListener("pointerleave",S)}}},[d,p,v,b]),w.useEffect(()=>{if(u){const C=S=>{const g=S.target,y={x:S.clientX,y:S.clientY},E=d?.contains(g)||p?.contains(g),_=!nq(y,u);E?b():_&&(b(),h())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[d,p,u,h,b]),r.jsx(u3,{...e,ref:o})}),[KG,XG]=dm(pd,{isInside:!1}),ZG=sI("TooltipContent"),u3=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:s,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:u,...c}=e,d=fm(Vl,n),h=hm(n),{onClose:p}=d;return w.useEffect(()=>(document.addEventListener(Gx,p),()=>document.removeEventListener(Gx,p)),[p]),w.useEffect(()=>{if(d.trigger){const m=b=>{b.target?.contains(d.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,p]),r.jsx(cc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:r.jsxs(wy,{"data-state":d.stateAttribute,...h,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[r.jsx(ZG,{children:s}),r.jsx(KG,{scope:n,isInside:!0,children:r.jsx(D7,{id:d.contentId,role:"tooltip",children:a||s})})]})})});c3.displayName=Vl;var d3="TooltipArrow",QG=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,a=hm(n);return XG(d3,n).isInside?null:r.jsx(Cy,{...a,...s,ref:t})});QG.displayName=d3;function JG(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,s,a,o)){case o:return"left";case a:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function eq(e,t,n=5){const s=[];switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}function tq(e){const{top:t,right:n,bottom:s,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:s},{x:a,y:s}]}function nq(e,t){const{x:n,y:s}=e;let a=!1;for(let o=0,u=t.length-1;o<t.length;u=o++){const c=t[o],d=t[u],h=c.x,p=c.y,m=d.x,b=d.y;p>s!=b>s&&n<(m-h)*(s-p)/(b-p)+h&&(a=!a)}return a}function rq(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),sq(t)}function sq(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const a=e[s];for(;t.length>=2;){const o=t[t.length-1],u=t[t.length-2];if((o.x-u.x)*(a.y-u.y)>=(o.y-u.y)*(a.x-u.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const a=e[s];for(;n.length>=2;){const o=n[n.length-1],u=n[n.length-2];if((o.x-u.x)*(a.y-u.y)>=(o.y-u.y)*(a.x-u.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var aq=i3,iq=o3,oq=l3,h3=c3;const lq=aq,cq=iq,uq=oq,f3=w.forwardRef(({className:e,sideOffset:t=4,...n},s)=>r.jsx(h3,{ref:s,sideOffset:t,className:Ae("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));f3.displayName=h3.displayName;const dq="sidebar_state",hq=3600*24*7,fq="16rem",pq="18rem",mq="3rem",gq="b",p3=w.createContext(null);function pm(){const e=w.useContext(p3);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const m3=w.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:s,style:a,children:o,...u},c)=>{const d=aO(),[h,p]=w.useState(!1),[m,b]=w.useState(e),v=t??m,C=w.useCallback(E=>{const _=typeof E=="function"?E(v):E;n?n(_):b(_),document.cookie=`${dq}=${_}; path=/; max-age=${hq}`},[n,v]),S=w.useCallback(()=>d?p(E=>!E):C(E=>!E),[d,C,p]);w.useEffect(()=>{const E=_=>{_.key===gq&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),S())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[S]);const g=v?"expanded":"collapsed",y=w.useMemo(()=>({state:g,open:v,setOpen:C,isMobile:d,openMobile:h,setOpenMobile:p,toggleSidebar:S}),[g,v,C,d,h,p,S]);return r.jsx(p3.Provider,{value:y,children:r.jsx(lq,{delayDuration:0,children:r.jsx("div",{style:{"--sidebar-width":fq,"--sidebar-width-icon":mq,...a},className:Ae("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",s),ref:c,...u,children:o})})})});m3.displayName="SidebarProvider";const g3=w.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:s,children:a,...o},u)=>{const{isMobile:c,state:d,openMobile:h,setOpenMobile:p}=pm();return n==="none"?r.jsx("div",{className:Ae("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",s),ref:u,...o,children:a}):c?r.jsx(LO,{open:h,onOpenChange:p,...o,children:r.jsxs(cy,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":pq},side:e,children:[r.jsxs(uy,{className:"sr-only",children:[r.jsx(dy,{children:"Sidebar"}),r.jsx(FO,{children:"Displays the mobile sidebar."})]}),r.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):r.jsxs("div",{ref:u,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?n:"","data-variant":t,"data-side":e,children:[r.jsx("div",{className:Ae("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r.jsx("div",{className:Ae("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...o,children:r.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});g3.displayName="Sidebar";const b3=w.forwardRef(({className:e,onClick:t,...n},s)=>{const{toggleSidebar:a}=pm();return r.jsxs(re,{ref:s,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Ae("h-7 w-7",e),onClick:o=>{t?.(o),a()},...n,children:[r.jsx(zU,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});b3.displayName="SidebarTrigger";const bq=w.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:s}=pm();return r.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:Ae("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});bq.displayName="SidebarRail";const x3=w.forwardRef(({className:e,...t},n)=>r.jsx("main",{ref:n,className:Ae("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));x3.displayName="SidebarInset";const xq=w.forwardRef(({className:e,...t},n)=>r.jsx(Fe,{ref:n,"data-sidebar":"input",className:Ae("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));xq.displayName="SidebarInput";const v3=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"header",className:Ae("flex flex-col gap-2 p-2",e),...t}));v3.displayName="SidebarHeader";const y3=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"footer",className:Ae("flex flex-col gap-2 p-2",e),...t}));y3.displayName="SidebarFooter";const vq=w.forwardRef(({className:e,...t},n)=>r.jsx(Nr,{ref:n,"data-sidebar":"separator",className:Ae("mx-2 w-auto bg-sidebar-border",e),...t}));vq.displayName="SidebarSeparator";const E3=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"content",className:Ae("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));E3.displayName="SidebarContent";const np=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group",className:Ae("relative flex w-full min-w-0 flex-col p-2",e),...t}));np.displayName="SidebarGroup";const rp=w.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const a=t?lc:"div";return r.jsx(a,{ref:s,"data-sidebar":"group-label",className:Ae("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});rp.displayName="SidebarGroupLabel";const yq=w.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const a=t?lc:"button";return r.jsx(a,{ref:s,"data-sidebar":"group-action",className:Ae("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});yq.displayName="SidebarGroupAction";const sp=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group-content",className:Ae("w-full text-sm",e),...t}));sp.displayName="SidebarGroupContent";const kl=w.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu",className:Ae("flex w-full min-w-0 flex-col gap-1",e),...t}));kl.displayName="SidebarMenu";const Rl=w.forwardRef(({className:e,...t},n)=>r.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Ae("group/menu-item relative",e),...t}));Rl.displayName="SidebarMenuItem";const Eq=uc("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Dl=w.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:s="default",tooltip:a,className:o,...u},c)=>{const d=e?lc:"button",{isMobile:h,state:p}=pm(),m=r.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":s,"data-active":t,className:Ae(Eq({variant:n,size:s}),o),...u});return a?(typeof a=="string"&&(a={children:a}),r.jsxs(cq,{children:[r.jsx(uq,{asChild:!0,children:m}),r.jsx(f3,{side:"right",align:"center",hidden:p!=="collapsed"||h,...a})]})):m});Dl.displayName="SidebarMenuButton";const Sq=w.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...s},a)=>{const o=t?lc:"button";return r.jsx(o,{ref:a,"data-sidebar":"menu-action",className:Ae("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...s})});Sq.displayName="SidebarMenuAction";const Wx=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Ae("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Wx.displayName="SidebarMenuBadge";const _q=w.forwardRef(({className:e,showIcon:t=!1,...n},s)=>{const a=w.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return r.jsxs("div",{ref:s,"data-sidebar":"menu-skeleton",className:Ae("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&r.jsx(Q2,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r.jsx(Q2,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});_q.displayName="SidebarMenuSkeleton";const wq=w.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Ae("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));wq.displayName="SidebarMenuSub";const Cq=w.forwardRef(({...e},t)=>r.jsx("li",{ref:t,...e}));Cq.displayName="SidebarMenuSubItem";const Tq=w.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:s,...a},o)=>{const u=e?lc:"a";return r.jsx(u,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Ae("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...a})});Tq.displayName="SidebarMenuSubButton";const Nq="1.0.69-alpha.16",Aq={version:Nq};function kq({className:e}){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[r.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),r.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),r.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),r.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const Rq=[{title:"Home",url:"/",icon:xU},{title:"Proposals",url:"/proposals",icon:Wu},{title:"Agents",url:"/agents",icon:Tr},{title:"Code",url:"/code",icon:Si},{title:"Utilities",url:"/utilities",icon:$I}],Dq=[{title:"Overview",url:"/context/project",icon:_r},{title:"Architecture",url:"/context/architecture",icon:fo},{title:"Knowledge",url:"/context/knowledge",icon:m9},{title:"Resources",url:"/resources",icon:tm}],Iq=[{title:"Source Control",url:"/git",icon:Ei},{title:"Terminal",url:"/terminal",icon:Ci},{title:"Schedule",url:"/schedule",icon:Xf},{title:"Identity",url:"/identity",icon:yU}],Oq=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:HU,external:!0},{title:"Settings",url:"/settings/user",icon:ql}];function jq(){const{badges:e}=Vp();return r.jsxs(g3,{className:"bg-sidebar border-r border-sidebar-border",children:[r.jsx(v3,{children:r.jsx(kl,{children:r.jsx(Rl,{children:r.jsx(Dl,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:r.jsxs(at,{to:"/",children:[r.jsx(kq,{className:"size-8"}),r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsxs("span",{className:"font-semibold",children:[r.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),r.jsx("span",{children:" Studio"})]}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",Aq.version]})]})]})})})})}),r.jsxs(E3,{children:[r.jsxs(np,{children:[r.jsx(rp,{children:"Main"}),r.jsx(sp,{children:r.jsx(kl,{children:Rq.map(t=>r.jsxs(Rl,{children:[r.jsx(Dl,{asChild:!0,children:r.jsxs(at,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),t.title==="Code"&&e.codeSessions>0&&r.jsx(Wx,{className:"bg-blue-600 text-white dark:bg-blue-500",children:e.codeSessions})]},t.title))})})]}),r.jsxs(np,{children:[r.jsx(rp,{children:"Project"}),r.jsx(sp,{children:r.jsx(kl,{children:Dq.map(t=>r.jsx(Rl,{children:r.jsx(Dl,{asChild:!0,children:r.jsxs(at,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]}),r.jsxs(np,{children:[r.jsx(rp,{children:"System"}),r.jsx(sp,{children:r.jsx(kl,{children:Iq.map(t=>{let n=0;return t.title==="Source Control"&&e.gitChanges>0?n=e.gitChanges:t.title==="Terminal"&&e.terminalSessions>0?n=e.terminalSessions:t.title==="Schedule"&&e.runningScheduledJobs>0&&(n=e.runningScheduledJobs),r.jsxs(Rl,{children:[r.jsx(Dl,{asChild:!0,children:r.jsxs(at,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),n>0&&r.jsx(Wx,{className:"bg-blue-600 text-white dark:bg-blue-500",children:n})]},t.title)})})})]})]}),r.jsx(y3,{children:r.jsx(kl,{children:Oq.map(t=>r.jsx(Rl,{children:r.jsx(Dl,{asChild:!0,children:t.external?r.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]}):r.jsxs(at,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]})}function Vx(e,[t,n]){return Math.min(n,Math.max(t,e))}var Lq=w.createContext(void 0);function gc(e){const t=w.useContext(Lq);return e||t||"ltr"}function Ny(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Mq=[" ","Enter","ArrowUp","ArrowDown"],Fq=[" ","Enter"],go="Select",[mm,gm,Pq]=Kp(go),[bc,$de]=Mr(go,[Pq,mc]),bm=mc(),[Bq,Oi]=bc(go),[Uq,Hq]=bc(go),S3=e=>{const{__scopeSelect:t,children:n,open:s,defaultOpen:a,onOpenChange:o,value:u,defaultValue:c,onValueChange:d,dir:h,name:p,autoComplete:m,disabled:b,required:v,form:C}=e,S=bm(t),[g,y]=w.useState(null),[E,_]=w.useState(null),[T,A]=w.useState(!1),k=gc(h),[j,R]=na({prop:s,defaultProp:a??!1,onChange:o,caller:go}),[F,M]=na({prop:u,defaultProp:c,onChange:d,caller:go}),H=w.useRef(null),U=g?C||!!g.closest("form"):!0,[L,$]=w.useState(new Set),X=Array.from(L).map(P=>P.props.value).join(";");return r.jsx(Sy,{...S,children:r.jsxs(Bq,{required:v,scope:t,trigger:g,onTriggerChange:y,valueNode:E,onValueNodeChange:_,valueNodeHasChildren:T,onValueNodeHasChildrenChange:A,contentId:Os(),value:F,onValueChange:M,open:j,onOpenChange:R,dir:k,triggerPointerDownPosRef:H,disabled:b,children:[r.jsx(mm.Provider,{scope:t,children:r.jsx(Uq,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(P=>{$(Z=>new Set(Z).add(P))},[]),onNativeOptionRemove:w.useCallback(P=>{$(Z=>{const Y=new Set(Z);return Y.delete(P),Y})},[]),children:n})}),U?r.jsxs(W3,{"aria-hidden":!0,required:v,tabIndex:-1,name:p,autoComplete:m,value:F,onChange:P=>M(P.target.value),disabled:b,form:C,children:[F===void 0?r.jsx("option",{value:""}):null,Array.from(L)]},X):null]})})};S3.displayName=go;var _3="SelectTrigger",w3=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:s=!1,...a}=e,o=bm(n),u=Oi(_3,n),c=u.disabled||s,d=Nt(t,u.onTriggerChange),h=gm(n),p=w.useRef("touch"),[m,b,v]=Y3(S=>{const g=h().filter(_=>!_.disabled),y=g.find(_=>_.value===u.value),E=K3(g,S,y);E!==void 0&&u.onValueChange(E.value)}),C=S=>{c||(u.onOpenChange(!0),v()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return r.jsx(_y,{asChild:!0,...o,children:r.jsx(ht.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":V3(u.value)?"":void 0,...a,ref:d,onClick:Ve(a.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&C(S)}),onPointerDown:Ve(a.onPointerDown,S=>{p.current=S.pointerType;const g=S.target;g.hasPointerCapture(S.pointerId)&&g.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(C(S),S.preventDefault())}),onKeyDown:Ve(a.onKeyDown,S=>{const g=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&b(S.key),!(g&&S.key===" ")&&Mq.includes(S.key)&&(C(),S.preventDefault())})})})});w3.displayName=_3;var C3="SelectValue",T3=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:a,children:o,placeholder:u="",...c}=e,d=Oi(C3,n),{onValueNodeHasChildrenChange:h}=d,p=o!==void 0,m=Nt(t,d.onValueNodeChange);return ar(()=>{h(p)},[h,p]),r.jsx(ht.span,{...c,ref:m,style:{pointerEvents:"none"},children:V3(d.value)?r.jsx(r.Fragment,{children:u}):o})});T3.displayName=C3;var $q="SelectIcon",N3=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:s,...a}=e;return r.jsx(ht.span,{"aria-hidden":!0,...a,ref:t,children:s||"▼"})});N3.displayName=$q;var zq="SelectPortal",A3=e=>r.jsx(Rd,{asChild:!0,...e});A3.displayName=zq;var bo="SelectContent",k3=w.forwardRef((e,t)=>{const n=Oi(bo,e.__scopeSelect),[s,a]=w.useState();if(ar(()=>{a(new DocumentFragment)},[]),!n.open){const o=s;return o?ic.createPortal(r.jsx(R3,{scope:e.__scopeSelect,children:r.jsx(mm.Slot,{scope:e.__scopeSelect,children:r.jsx("div",{children:e.children})})}),o):null}return r.jsx(D3,{...e,ref:t})});k3.displayName=bo;var Ds=10,[R3,ji]=bc(bo),Gq="SelectContentImpl",qq=ho("SelectContent.RemoveScroll"),D3=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:s="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:u,side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:b,collisionPadding:v,sticky:C,hideWhenDetached:S,avoidCollisions:g,...y}=e,E=Oi(bo,n),[_,T]=w.useState(null),[A,k]=w.useState(null),j=Nt(t,K=>T(K)),[R,F]=w.useState(null),[M,H]=w.useState(null),U=gm(n),[L,$]=w.useState(!1),X=w.useRef(!1);w.useEffect(()=>{if(_)return ry(_)},[_]),ny();const P=w.useCallback(K=>{const[G,...Q]=U().map(te=>te.ref.current),[ce]=Q.slice(-1),oe=document.activeElement;for(const te of K)if(te===oe||(te?.scrollIntoView({block:"nearest"}),te===G&&A&&(A.scrollTop=0),te===ce&&A&&(A.scrollTop=A.scrollHeight),te?.focus(),document.activeElement!==oe))return},[U,A]),Z=w.useCallback(()=>P([R,_]),[P,R,_]);w.useEffect(()=>{L&&Z()},[L,Z]);const{onOpenChange:Y,triggerPointerDownPosRef:B}=E;w.useEffect(()=>{if(_){let K={x:0,y:0};const G=ce=>{K={x:Math.abs(Math.round(ce.pageX)-(B.current?.x??0)),y:Math.abs(Math.round(ce.pageY)-(B.current?.y??0))}},Q=ce=>{K.x<=10&&K.y<=10?ce.preventDefault():_.contains(ce.target)||Y(!1),document.removeEventListener("pointermove",G),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",Q,{capture:!0})}}},[_,Y,B]),w.useEffect(()=>{const K=()=>Y(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[Y]);const[O,W]=Y3(K=>{const G=U().filter(oe=>!oe.disabled),Q=G.find(oe=>oe.ref.current===document.activeElement),ce=K3(G,K,Q);ce&&setTimeout(()=>ce.ref.current.focus())}),ne=w.useCallback((K,G,Q)=>{const ce=!X.current&&!Q;(E.value!==void 0&&E.value===G||ce)&&(F(K),ce&&(X.current=!0))},[E.value]),z=w.useCallback(()=>_?.focus(),[_]),V=w.useCallback((K,G,Q)=>{const ce=!X.current&&!Q;(E.value!==void 0&&E.value===G||ce)&&H(K)},[E.value]),le=s==="popper"?Yx:I3,se=le===Yx?{side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:b,collisionPadding:v,sticky:C,hideWhenDetached:S,avoidCollisions:g}:{};return r.jsx(R3,{scope:n,content:_,viewport:A,onViewportChange:k,itemRefCallback:ne,selectedItem:R,onItemLeave:z,itemTextRefCallback:V,focusSelectedItem:Z,selectedItemText:M,position:s,isPositioned:L,searchRef:O,children:r.jsx(am,{as:qq,allowPinchZoom:!0,children:r.jsx(rm,{asChild:!0,trapped:E.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Ve(a,K=>{E.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:r.jsx(cc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:r.jsx(le,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:K=>K.preventDefault(),...y,...se,onPlaced:()=>$(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Ve(y.onKeyDown,K=>{const G=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!G&&K.key.length===1&&W(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let ce=U().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(K.key)&&(ce=ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const oe=K.target,te=ce.indexOf(oe);ce=ce.slice(te+1)}setTimeout(()=>P(ce)),K.preventDefault()}})})})})})})});D3.displayName=Gq;var Wq="SelectItemAlignedPosition",I3=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:s,...a}=e,o=Oi(bo,n),u=ji(bo,n),[c,d]=w.useState(null),[h,p]=w.useState(null),m=Nt(t,j=>p(j)),b=gm(n),v=w.useRef(!1),C=w.useRef(!0),{viewport:S,selectedItem:g,selectedItemText:y,focusSelectedItem:E}=u,_=w.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&h&&S&&g&&y){const j=o.trigger.getBoundingClientRect(),R=h.getBoundingClientRect(),F=o.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(o.dir!=="rtl"){const oe=M.left-R.left,te=F.left-oe,pe=j.left-te,ve=j.width+pe,Ge=Math.max(ve,R.width),Xe=window.innerWidth-Ds,De=Vx(te,[Ds,Math.max(Ds,Xe-Ge)]);c.style.minWidth=ve+"px",c.style.left=De+"px"}else{const oe=R.right-M.right,te=window.innerWidth-F.right-oe,pe=window.innerWidth-j.right-te,ve=j.width+pe,Ge=Math.max(ve,R.width),Xe=window.innerWidth-Ds,De=Vx(te,[Ds,Math.max(Ds,Xe-Ge)]);c.style.minWidth=ve+"px",c.style.right=De+"px"}const H=b(),U=window.innerHeight-Ds*2,L=S.scrollHeight,$=window.getComputedStyle(h),X=parseInt($.borderTopWidth,10),P=parseInt($.paddingTop,10),Z=parseInt($.borderBottomWidth,10),Y=parseInt($.paddingBottom,10),B=X+P+L+Y+Z,O=Math.min(g.offsetHeight*5,B),W=window.getComputedStyle(S),ne=parseInt(W.paddingTop,10),z=parseInt(W.paddingBottom,10),V=j.top+j.height/2-Ds,le=U-V,se=g.offsetHeight/2,K=g.offsetTop+se,G=X+P+K,Q=B-G;if(G<=V){const oe=H.length>0&&g===H[H.length-1].ref.current;c.style.bottom="0px";const te=h.clientHeight-S.offsetTop-S.offsetHeight,pe=Math.max(le,se+(oe?z:0)+te+Z),ve=G+pe;c.style.height=ve+"px"}else{const oe=H.length>0&&g===H[0].ref.current;c.style.top="0px";const pe=Math.max(V,X+S.offsetTop+(oe?ne:0)+se)+Q;c.style.height=pe+"px",S.scrollTop=G-V+S.offsetTop}c.style.margin=`${Ds}px 0`,c.style.minHeight=O+"px",c.style.maxHeight=U+"px",s?.(),requestAnimationFrame(()=>v.current=!0)}},[b,o.trigger,o.valueNode,c,h,S,g,y,o.dir,s]);ar(()=>_(),[_]);const[T,A]=w.useState();ar(()=>{h&&A(window.getComputedStyle(h).zIndex)},[h]);const k=w.useCallback(j=>{j&&C.current===!0&&(_(),E?.(),C.current=!1)},[_,E]);return r.jsx(Yq,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:k,children:r.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:r.jsx(ht.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});I3.displayName=Wq;var Vq="SelectPopperPosition",Yx=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:s="start",collisionPadding:a=Ds,...o}=e,u=bm(n);return r.jsx(wy,{...u,...o,ref:t,align:s,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Yx.displayName=Vq;var[Yq,Ay]=bc(bo,{}),Kx="SelectViewport",O3=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:s,...a}=e,o=ji(Kx,n),u=Ay(Kx,n),c=Nt(t,o.onViewportChange),d=w.useRef(0);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),r.jsx(mm.Slot,{scope:n,children:r.jsx(ht.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Ve(a.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:b}=u;if(b?.current&&m){const v=Math.abs(d.current-p.scrollTop);if(v>0){const C=window.innerHeight-Ds*2,S=parseFloat(m.style.minHeight),g=parseFloat(m.style.height),y=Math.max(S,g);if(y<C){const E=y+v,_=Math.min(C,E),T=E-_;m.style.height=_+"px",m.style.bottom==="0px"&&(p.scrollTop=T>0?T:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});O3.displayName=Kx;var j3="SelectGroup",[Kq,Xq]=bc(j3),Zq=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=Os();return r.jsx(Kq,{scope:n,id:a,children:r.jsx(ht.div,{role:"group","aria-labelledby":a,...s,ref:t})})});Zq.displayName=j3;var L3="SelectLabel",M3=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=Xq(L3,n);return r.jsx(ht.div,{id:a.id,...s,ref:t})});M3.displayName=L3;var Sp="SelectItem",[Qq,F3]=bc(Sp),P3=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:s,disabled:a=!1,textValue:o,...u}=e,c=Oi(Sp,n),d=ji(Sp,n),h=c.value===s,[p,m]=w.useState(o??""),[b,v]=w.useState(!1),C=Nt(t,E=>d.itemRefCallback?.(E,s,a)),S=Os(),g=w.useRef("touch"),y=()=>{a||(c.onValueChange(s),c.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return r.jsx(Qq,{scope:n,value:s,disabled:a,textId:S,isSelected:h,onItemTextChange:w.useCallback(E=>{m(_=>_||(E?.textContent??"").trim())},[]),children:r.jsx(mm.ItemSlot,{scope:n,value:s,disabled:a,textValue:p,children:r.jsx(ht.div,{role:"option","aria-labelledby":S,"data-highlighted":b?"":void 0,"aria-selected":h&&b,"data-state":h?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...u,ref:C,onFocus:Ve(u.onFocus,()=>v(!0)),onBlur:Ve(u.onBlur,()=>v(!1)),onClick:Ve(u.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:Ve(u.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:Ve(u.onPointerDown,E=>{g.current=E.pointerType}),onPointerMove:Ve(u.onPointerMove,E=>{g.current=E.pointerType,a?d.onItemLeave?.():g.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ve(u.onPointerLeave,E=>{E.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Ve(u.onKeyDown,E=>{d.searchRef?.current!==""&&E.key===" "||(Fq.includes(E.key)&&y(),E.key===" "&&E.preventDefault())})})})})});P3.displayName=Sp;var Hu="SelectItemText",B3=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:a,...o}=e,u=Oi(Hu,n),c=ji(Hu,n),d=F3(Hu,n),h=Hq(Hu,n),[p,m]=w.useState(null),b=Nt(t,y=>m(y),d.onItemTextChange,y=>c.itemTextRefCallback?.(y,d.value,d.disabled)),v=p?.textContent,C=w.useMemo(()=>r.jsx("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:S,onNativeOptionRemove:g}=h;return ar(()=>(S(C),()=>g(C)),[S,g,C]),r.jsxs(r.Fragment,{children:[r.jsx(ht.span,{id:d.textId,...o,ref:b}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?ic.createPortal(o.children,u.valueNode):null]})});B3.displayName=Hu;var U3="SelectItemIndicator",H3=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return F3(U3,n).isSelected?r.jsx(ht.span,{"aria-hidden":!0,...s,ref:t}):null});H3.displayName=U3;var Xx="SelectScrollUpButton",$3=w.forwardRef((e,t)=>{const n=ji(Xx,e.__scopeSelect),s=Ay(Xx,e.__scopeSelect),[a,o]=w.useState(!1),u=Nt(t,s.onScrollButtonChange);return ar(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollTop>0;o(h)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?r.jsx(G3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});$3.displayName=Xx;var Zx="SelectScrollDownButton",z3=w.forwardRef((e,t)=>{const n=ji(Zx,e.__scopeSelect),s=Ay(Zx,e.__scopeSelect),[a,o]=w.useState(!1),u=Nt(t,s.onScrollButtonChange);return ar(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<h;o(p)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?r.jsx(G3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});z3.displayName=Zx;var G3=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:s,...a}=e,o=ji("SelectScrollButton",n),u=w.useRef(null),c=gm(n),d=w.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return w.useEffect(()=>()=>d(),[d]),ar(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),r.jsx(ht.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Ve(a.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(s,50))}),onPointerMove:Ve(a.onPointerMove,()=>{o.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(s,50))}),onPointerLeave:Ve(a.onPointerLeave,()=>{d()})})}),Jq="SelectSeparator",q3=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return r.jsx(ht.div,{"aria-hidden":!0,...s,ref:t})});q3.displayName=Jq;var Qx="SelectArrow",eW=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=bm(n),o=Oi(Qx,n),u=ji(Qx,n);return o.open&&u.position==="popper"?r.jsx(Cy,{...a,...s,ref:t}):null});eW.displayName=Qx;var tW="SelectBubbleInput",W3=w.forwardRef(({__scopeSelect:e,value:t,...n},s)=>{const a=w.useRef(null),o=Nt(s,a),u=Ny(t);return w.useEffect(()=>{const c=a.current;if(!c)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==t&&p){const m=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(m)}},[u,t]),r.jsx(ht.select,{...n,style:{...lI,...n.style},ref:o,defaultValue:t})});W3.displayName=tW;function V3(e){return e===""||e===void 0}function Y3(e){const t=Ln(e),n=w.useRef(""),s=w.useRef(0),a=w.useCallback(u=>{const c=n.current+u;t(c),(function d(h){n.current=h,window.clearTimeout(s.current),h!==""&&(s.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),o=w.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,a,o]}function K3(e,t,n){const a=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let u=nW(e,Math.max(o,0));a.length===1&&(u=u.filter(h=>h!==n));const d=u.find(h=>h.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function nW(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var rW=S3,X3=w3,sW=T3,aW=N3,iW=A3,Z3=k3,oW=O3,Q3=M3,J3=P3,lW=B3,cW=H3,ej=$3,tj=z3,nj=q3;const Xt=rW,Zt=sW,qt=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(X3,{ref:s,className:Ae("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,r.jsx(aW,{asChild:!0,children:r.jsx(os,{className:"h-4 w-4 opacity-50"})})]}));qt.displayName=X3.displayName;const rj=w.forwardRef(({className:e,...t},n)=>r.jsx(ej,{ref:n,className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Gl,{className:"h-4 w-4"})}));rj.displayName=ej.displayName;const sj=w.forwardRef(({className:e,...t},n)=>r.jsx(tj,{ref:n,className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(os,{className:"h-4 w-4"})}));sj.displayName=tj.displayName;const Wt=w.forwardRef(({className:e,children:t,position:n="popper",...s},a)=>r.jsx(iW,{children:r.jsxs(Z3,{ref:a,className:Ae("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[r.jsx(rj,{}),r.jsx(oW,{className:Ae("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(sj,{})]})}));Wt.displayName=Z3.displayName;const uW=w.forwardRef(({className:e,...t},n)=>r.jsx(Q3,{ref:n,className:Ae("px-2 py-1.5 text-sm font-semibold",e),...t}));uW.displayName=Q3.displayName;const Le=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(J3,{ref:s,className:Ae("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(cW,{children:r.jsx(wo,{className:"h-4 w-4"})})}),r.jsx(lW,{children:t})]}));Le.displayName=J3.displayName;const dW=w.forwardRef(({className:e,...t},n)=>r.jsx(nj,{ref:n,className:Ae("-mx-1 my-1 h-px bg-muted",e),...t}));dW.displayName=nj.displayName;const pn=oy,_p=jO,hW=ly,aj=w.forwardRef(({className:e,...t},n)=>r.jsx(jd,{ref:n,className:Ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));aj.displayName=jd.displayName;const dn=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(hW,{children:[r.jsx(aj,{}),r.jsxs(Ld,{ref:s,className:Ae("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,r.jsxs(om,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(wr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));dn.displayName=Ld.displayName;const sn=({className:e,...t})=>r.jsx("div",{className:Ae("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});sn.displayName="DialogHeader";const hr=({className:e,...t})=>r.jsx("div",{className:Ae("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});hr.displayName="DialogFooter";const an=w.forwardRef(({className:e,...t},n)=>r.jsx(Md,{ref:n,className:Ae("text-lg font-semibold leading-none tracking-tight",e),...t}));an.displayName=Md.displayName;const Cn=w.forwardRef(({className:e,...t},n)=>r.jsx(Fd,{ref:n,className:Ae("text-sm text-muted-foreground",e),...t}));Cn.displayName=Fd.displayName;var xm="Checkbox",[fW,zde]=Mr(xm),[pW,ky]=fW(xm);function mW(e){const{__scopeCheckbox:t,checked:n,children:s,defaultChecked:a,disabled:o,form:u,name:c,onCheckedChange:d,required:h,value:p="on",internal_do_not_use_render:m}=e,[b,v]=na({prop:n,defaultProp:a??!1,onChange:d,caller:xm}),[C,S]=w.useState(null),[g,y]=w.useState(null),E=w.useRef(!1),_=C?!!u||!!C.closest("form"):!0,T={checked:b,disabled:o,setChecked:v,control:C,setControl:S,name:c,form:u,value:p,hasConsumerStoppedPropagationRef:E,required:h,defaultChecked:Ti(a)?!1:a,isFormControl:_,bubbleInput:g,setBubbleInput:y};return r.jsx(pW,{scope:t,...T,children:gW(m)?m(T):s})}var ij="CheckboxTrigger",oj=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...s},a)=>{const{control:o,value:u,disabled:c,checked:d,required:h,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:b,isFormControl:v,bubbleInput:C}=ky(ij,e),S=Nt(a,p),g=w.useRef(d);return w.useEffect(()=>{const y=o?.form;if(y){const E=()=>m(g.current);return y.addEventListener("reset",E),()=>y.removeEventListener("reset",E)}},[o,m]),r.jsx(ht.button,{type:"button",role:"checkbox","aria-checked":Ti(d)?"mixed":d,"aria-required":h,"data-state":hj(d),"data-disabled":c?"":void 0,disabled:c,value:u,...s,ref:S,onKeyDown:Ve(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Ve(n,y=>{m(E=>Ti(E)?!0:!E),C&&v&&(b.current=y.isPropagationStopped(),b.current||y.stopPropagation())})})});oj.displayName=ij;var Ry=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:s,checked:a,defaultChecked:o,required:u,disabled:c,value:d,onCheckedChange:h,form:p,...m}=e;return r.jsx(mW,{__scopeCheckbox:n,checked:a,defaultChecked:o,disabled:c,required:u,onCheckedChange:h,name:s,form:p,value:d,internal_do_not_use_render:({isFormControl:b})=>r.jsxs(r.Fragment,{children:[r.jsx(oj,{...m,ref:t,__scopeCheckbox:n}),b&&r.jsx(dj,{__scopeCheckbox:n})]})})});Ry.displayName=xm;var lj="CheckboxIndicator",cj=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:s,...a}=e,o=ky(lj,n);return r.jsx(mr,{present:s||Ti(o.checked)||o.checked===!0,children:r.jsx(ht.span,{"data-state":hj(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});cj.displayName=lj;var uj="CheckboxBubbleInput",dj=w.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:s,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:u,required:c,disabled:d,name:h,value:p,form:m,bubbleInput:b,setBubbleInput:v}=ky(uj,e),C=Nt(n,v),S=Ny(o),g=vy(s);w.useEffect(()=>{const E=b;if(!E)return;const _=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(_,"checked").set,k=!a.current;if(S!==o&&A){const j=new Event("click",{bubbles:k});E.indeterminate=Ti(o),A.call(E,Ti(o)?!1:o),E.dispatchEvent(j)}},[b,S,o,a]);const y=w.useRef(Ti(o)?!1:o);return r.jsx(ht.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??y.current,required:c,disabled:d,name:h,value:p,form:m,...t,tabIndex:-1,ref:C,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});dj.displayName=uj;function gW(e){return typeof e=="function"}function Ti(e){return e==="indeterminate"}function hj(e){return Ti(e)?"indeterminate":e?"checked":"unchecked"}const cs=w.forwardRef(({className:e,...t},n)=>r.jsx(Ry,{ref:n,className:Ae("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:r.jsx(cj,{className:Ae("flex items-center justify-center text-current"),children:r.jsx(wo,{className:"h-4 w-4"})})}));cs.displayName=Ry.displayName;const Da=w.forwardRef(({className:e,onCheckedChange:t,onChange:n,...s},a)=>{const o=u=>{n?.(u),t?.(u.target.checked)};return r.jsxs("label",{className:Ae("relative inline-flex cursor-pointer",e),children:[r.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:o,ref:a,...s}),r.jsx("div",{className:"block bg-gray-300 w-9 h-5 rounded-full transition-colors duration-200 ease-in-out peer-checked:bg-blue-600"}),r.jsx("div",{className:"absolute left-0 top-0 bg-white w-4 h-4 rounded-full mt-0.5 ml-0.5 transition-transform duration-200 ease-in-out transform peer-checked:translate-x-4 shadow"})]})});Da.displayName="Switch";function bW(e,t){return w.useReducer((n,s)=>t[n][s]??n,e)}var Dy="ScrollArea",[fj,Gde]=Mr(Dy),[xW,Ts]=fj(Dy),pj=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:s="hover",dir:a,scrollHideDelay:o=600,...u}=e,[c,d]=w.useState(null),[h,p]=w.useState(null),[m,b]=w.useState(null),[v,C]=w.useState(null),[S,g]=w.useState(null),[y,E]=w.useState(0),[_,T]=w.useState(0),[A,k]=w.useState(!1),[j,R]=w.useState(!1),F=Nt(t,H=>d(H)),M=gc(a);return r.jsx(xW,{scope:n,type:s,dir:M,scrollHideDelay:o,scrollArea:c,viewport:h,onViewportChange:p,content:m,onContentChange:b,scrollbarX:v,onScrollbarXChange:C,scrollbarXEnabled:A,onScrollbarXEnabledChange:k,scrollbarY:S,onScrollbarYChange:g,scrollbarYEnabled:j,onScrollbarYEnabledChange:R,onCornerWidthChange:E,onCornerHeightChange:T,children:r.jsx(ht.div,{dir:M,...u,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});pj.displayName=Dy;var mj="ScrollAreaViewport",gj=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:s,nonce:a,...o}=e,u=Ts(mj,n),c=w.useRef(null),d=Nt(t,c,u.onViewportChange);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),r.jsx(ht.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:r.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});gj.displayName=mj;var ia="ScrollAreaScrollbar",Iy=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=Ts(ia,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:u}=a,c=e.orientation==="horizontal";return w.useEffect(()=>(c?o(!0):u(!0),()=>{c?o(!1):u(!1)}),[c,o,u]),a.type==="hover"?r.jsx(vW,{...s,ref:t,forceMount:n}):a.type==="scroll"?r.jsx(yW,{...s,ref:t,forceMount:n}):a.type==="auto"?r.jsx(bj,{...s,ref:t,forceMount:n}):a.type==="always"?r.jsx(Oy,{...s,ref:t}):null});Iy.displayName=ia;var vW=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=Ts(ia,e.__scopeScrollArea),[o,u]=w.useState(!1);return w.useEffect(()=>{const c=a.scrollArea;let d=0;if(c){const h=()=>{window.clearTimeout(d),u(!0)},p=()=>{d=window.setTimeout(()=>u(!1),a.scrollHideDelay)};return c.addEventListener("pointerenter",h),c.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",h),c.removeEventListener("pointerleave",p)}}},[a.scrollArea,a.scrollHideDelay]),r.jsx(mr,{present:n||o,children:r.jsx(bj,{"data-state":o?"visible":"hidden",...s,ref:t})})}),yW=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=Ts(ia,e.__scopeScrollArea),o=e.orientation==="horizontal",u=ym(()=>d("SCROLL_END"),100),[c,d]=bW("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(c==="idle"){const h=window.setTimeout(()=>d("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(h)}},[c,a.scrollHideDelay,d]),w.useEffect(()=>{const h=a.viewport,p=o?"scrollLeft":"scrollTop";if(h){let m=h[p];const b=()=>{const v=h[p];m!==v&&(d("SCROLL"),u()),m=v};return h.addEventListener("scroll",b),()=>h.removeEventListener("scroll",b)}},[a.viewport,o,d,u]),r.jsx(mr,{present:n||c!=="hidden",children:r.jsx(Oy,{"data-state":c==="hidden"?"hidden":"visible",...s,ref:t,onPointerEnter:Ve(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ve(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),bj=w.forwardRef((e,t)=>{const n=Ts(ia,e.__scopeScrollArea),{forceMount:s,...a}=e,[o,u]=w.useState(!1),c=e.orientation==="horizontal",d=ym(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;u(c?h:p)}},10);return Yl(n.viewport,d),Yl(n.content,d),r.jsx(mr,{present:s||o,children:r.jsx(Oy,{"data-state":o?"visible":"hidden",...a,ref:t})})}),Oy=w.forwardRef((e,t)=>{const{orientation:n="vertical",...s}=e,a=Ts(ia,e.__scopeScrollArea),o=w.useRef(null),u=w.useRef(0),[c,d]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=Sj(c.viewport,c.content),p={...s,sizes:c,onSizesChange:d,hasThumb:h>0&&h<1,onThumbChange:b=>o.current=b,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:b=>u.current=b};function m(b,v){return TW(b,u.current,c,v)}return n==="horizontal"?r.jsx(EW,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const b=a.viewport.scrollLeft,v=ck(b,c,a.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollLeft=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollLeft=m(b,a.dir))}}):n==="vertical"?r.jsx(SW,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const b=a.viewport.scrollTop,v=ck(b,c);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollTop=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollTop=m(b))}}):null}),EW=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:s,...a}=e,o=Ts(ia,e.__scopeScrollArea),[u,c]=w.useState(),d=w.useRef(null),h=Nt(t,d,o.onScrollbarXChange);return w.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(vj,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":vm(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,m)=>{if(o.viewport){const b=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(b),wj(b,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&s({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Cp(u.paddingLeft),paddingEnd:Cp(u.paddingRight)}})}})}),SW=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:s,...a}=e,o=Ts(ia,e.__scopeScrollArea),[u,c]=w.useState(),d=w.useRef(null),h=Nt(t,d,o.onScrollbarYChange);return w.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(vj,{"data-orientation":"vertical",...a,ref:h,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":vm(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,m)=>{if(o.viewport){const b=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(b),wj(b,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&s({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Cp(u.paddingTop),paddingEnd:Cp(u.paddingBottom)}})}})}),[_W,xj]=fj(ia),vj=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:s,hasThumb:a,onThumbChange:o,onThumbPointerUp:u,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:p,onResize:m,...b}=e,v=Ts(ia,n),[C,S]=w.useState(null),g=Nt(t,F=>S(F)),y=w.useRef(null),E=w.useRef(""),_=v.viewport,T=s.content-s.viewport,A=Ln(p),k=Ln(d),j=ym(m,10);function R(F){if(y.current){const M=F.clientX-y.current.left,H=F.clientY-y.current.top;h({x:M,y:H})}}return w.useEffect(()=>{const F=M=>{const H=M.target;C?.contains(H)&&A(M,T)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[_,C,T,A]),w.useEffect(k,[s,k]),Yl(C,j),Yl(v.content,j),r.jsx(_W,{scope:n,scrollbar:C,hasThumb:a,onThumbChange:Ln(o),onThumbPointerUp:Ln(u),onThumbPositionChange:k,onThumbPointerDown:Ln(c),children:r.jsx(ht.div,{...b,ref:g,style:{position:"absolute",...b.style},onPointerDown:Ve(e.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),y.current=C.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),R(F))}),onPointerMove:Ve(e.onPointerMove,R),onPointerUp:Ve(e.onPointerUp,F=>{const M=F.target;M.hasPointerCapture(F.pointerId)&&M.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=E.current,v.viewport&&(v.viewport.style.scrollBehavior=""),y.current=null})})})}),wp="ScrollAreaThumb",yj=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=xj(wp,e.__scopeScrollArea);return r.jsx(mr,{present:n||a.hasThumb,children:r.jsx(wW,{ref:t,...s})})}),wW=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:s,...a}=e,o=Ts(wp,n),u=xj(wp,n),{onThumbPositionChange:c}=u,d=Nt(t,m=>u.onThumbChange(m)),h=w.useRef(void 0),p=ym(()=>{h.current&&(h.current(),h.current=void 0)},100);return w.useEffect(()=>{const m=o.viewport;if(m){const b=()=>{if(p(),!h.current){const v=NW(m,c);h.current=v,c()}};return c(),m.addEventListener("scroll",b),()=>m.removeEventListener("scroll",b)}},[o.viewport,p,c]),r.jsx(ht.div,{"data-state":u.hasThumb?"visible":"hidden",...a,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:Ve(e.onPointerDownCapture,m=>{const v=m.target.getBoundingClientRect(),C=m.clientX-v.left,S=m.clientY-v.top;u.onThumbPointerDown({x:C,y:S})}),onPointerUp:Ve(e.onPointerUp,u.onThumbPointerUp)})});yj.displayName=wp;var jy="ScrollAreaCorner",Ej=w.forwardRef((e,t)=>{const n=Ts(jy,e.__scopeScrollArea),s=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&s?r.jsx(CW,{...e,ref:t}):null});Ej.displayName=jy;var CW=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...s}=e,a=Ts(jy,n),[o,u]=w.useState(0),[c,d]=w.useState(0),h=!!(o&&c);return Yl(a.scrollbarX,()=>{const p=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(p),d(p)}),Yl(a.scrollbarY,()=>{const p=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(p),u(p)}),h?r.jsx(ht.div,{...s,ref:t,style:{width:o,height:c,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Cp(e){return e?parseInt(e,10):0}function Sj(e,t){const n=e/t;return isNaN(n)?0:n}function vm(e){const t=Sj(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-n)*t;return Math.max(s,18)}function TW(e,t,n,s="ltr"){const a=vm(n),o=a/2,u=t||o,c=a-u,d=n.scrollbar.paddingStart+u,h=n.scrollbar.size-n.scrollbar.paddingEnd-c,p=n.content-n.viewport,m=s==="ltr"?[0,p]:[p*-1,0];return _j([d,h],m)(e)}function ck(e,t,n="ltr"){const s=vm(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,u=t.content-t.viewport,c=o-s,d=n==="ltr"?[0,u]:[u*-1,0],h=Vx(e,d);return _j([0,u],[0,c])(h)}function _j(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const s=(t[1]-t[0])/(e[1]-e[0]);return t[0]+s*(n-e[0])}}function wj(e,t){return e>0&&e<t}var NW=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},s=0;return(function a(){const o={left:e.scrollLeft,top:e.scrollTop},u=n.left!==o.left,c=n.top!==o.top;(u||c)&&t(),n=o,s=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(s)};function ym(e,t){const n=Ln(e),s=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),w.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(n,t)},[n,t])}function Yl(e,t){const n=Ln(t);ar(()=>{let s=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(s),a.unobserve(e)}}},[e,n])}var Cj=pj,AW=gj,kW=Ej;const ws=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(Cj,{ref:s,className:Ae("relative overflow-hidden",e),...n,children:[r.jsx(AW,{className:"h-full w-full rounded-[inherit]",children:t}),r.jsx(Tj,{}),r.jsx(kW,{})]}));ws.displayName=Cj.displayName;const Tj=w.forwardRef(({className:e,orientation:t="vertical",...n},s)=>r.jsx(Iy,{ref:s,orientation:t,className:Ae("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:r.jsx(yj,{className:"relative flex-1 rounded-full bg-border"})}));Tj.displayName=Iy.displayName;function md(e){const t=[],n=String(e||"");let s=n.indexOf(","),a=0,o=!1;for(;!o;){s===-1&&(s=n.length,o=!0);const u=n.slice(a,s).trim();(u||!o)&&t.push(u),a=s+1,s=n.indexOf(",",a)}return t}function Em(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const RW=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,DW=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IW={};function uk(e,t){return(IW.jsx?DW:RW).test(e)}const OW=/[ \t\n\f\r]/g;function Bd(e){return typeof e=="object"?e.type==="text"?dk(e.value):!1:dk(e)}function dk(e){return e.replace(OW,"")===""}let Ud=class{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}};Ud.prototype.normal={};Ud.prototype.property={};Ud.prototype.space=void 0;function Nj(e,t){const n={},s={};for(const a of e)Object.assign(n,a.property),Object.assign(s,a.normal);return new Ud(n,s,t)}function gd(e){return e.toLowerCase()}let Kr=class{constructor(t,n){this.attribute=n,this.property=t}};Kr.prototype.attribute="";Kr.prototype.booleanish=!1;Kr.prototype.boolean=!1;Kr.prototype.commaOrSpaceSeparated=!1;Kr.prototype.commaSeparated=!1;Kr.prototype.defined=!1;Kr.prototype.mustUseProperty=!1;Kr.prototype.number=!1;Kr.prototype.overloadedBoolean=!1;Kr.prototype.property="";Kr.prototype.spaceSeparated=!1;Kr.prototype.space=void 0;let jW=0;const Dt=Co(),$n=Co(),Jx=Co(),qe=Co(),xn=Co(),Fl=Co(),rs=Co();function Co(){return 2**++jW}const ev=Object.freeze(Object.defineProperty({__proto__:null,boolean:Dt,booleanish:$n,commaOrSpaceSeparated:rs,commaSeparated:Fl,number:qe,overloadedBoolean:Jx,spaceSeparated:xn},Symbol.toStringTag,{value:"Module"})),B0=Object.keys(ev);let Ly=class extends Kr{constructor(t,n,s,a){let o=-1;if(super(t,n),hk(this,"space",a),typeof s=="number")for(;++o<B0.length;){const u=B0[o];hk(this,B0[o],(s&ev[u])===ev[u])}}};Ly.prototype.defined=!0;function hk(e,t,n){n&&(e[t]=n)}function xc(e){const t={},n={};for(const[s,a]of Object.entries(e.properties)){const o=new Ly(s,e.transform(e.attributes||{},s),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[gd(s)]=s,n[gd(o.attribute)]=s}return new Ud(t,n,e.space)}const Aj=xc({properties:{ariaActiveDescendant:null,ariaAtomic:$n,ariaAutoComplete:null,ariaBusy:$n,ariaChecked:$n,ariaColCount:qe,ariaColIndex:qe,ariaColSpan:qe,ariaControls:xn,ariaCurrent:null,ariaDescribedBy:xn,ariaDetails:null,ariaDisabled:$n,ariaDropEffect:xn,ariaErrorMessage:null,ariaExpanded:$n,ariaFlowTo:xn,ariaGrabbed:$n,ariaHasPopup:null,ariaHidden:$n,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xn,ariaLevel:qe,ariaLive:null,ariaModal:$n,ariaMultiLine:$n,ariaMultiSelectable:$n,ariaOrientation:null,ariaOwns:xn,ariaPlaceholder:null,ariaPosInSet:qe,ariaPressed:$n,ariaReadOnly:$n,ariaRelevant:null,ariaRequired:$n,ariaRoleDescription:xn,ariaRowCount:qe,ariaRowIndex:qe,ariaRowSpan:qe,ariaSelected:$n,ariaSetSize:qe,ariaSort:null,ariaValueMax:qe,ariaValueMin:qe,ariaValueNow:qe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function kj(e,t){return t in e?e[t]:t}function Rj(e,t){return kj(e,t.toLowerCase())}const LW=xc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fl,acceptCharset:xn,accessKey:xn,action:null,allow:null,allowFullScreen:Dt,allowPaymentRequest:Dt,allowUserMedia:Dt,alt:null,as:null,async:Dt,autoCapitalize:null,autoComplete:xn,autoFocus:Dt,autoPlay:Dt,blocking:xn,capture:null,charSet:null,checked:Dt,cite:null,className:xn,cols:qe,colSpan:null,content:null,contentEditable:$n,controls:Dt,controlsList:xn,coords:qe|Fl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Dt,defer:Dt,dir:null,dirName:null,disabled:Dt,download:Jx,draggable:$n,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Dt,formTarget:null,headers:xn,height:qe,hidden:Jx,high:qe,href:null,hrefLang:null,htmlFor:xn,httpEquiv:xn,id:null,imageSizes:null,imageSrcSet:null,inert:Dt,inputMode:null,integrity:null,is:null,isMap:Dt,itemId:null,itemProp:xn,itemRef:xn,itemScope:Dt,itemType:xn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Dt,low:qe,manifest:null,max:null,maxLength:qe,media:null,method:null,min:null,minLength:qe,multiple:Dt,muted:Dt,name:null,nonce:null,noModule:Dt,noValidate:Dt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Dt,optimum:qe,pattern:null,ping:xn,placeholder:null,playsInline:Dt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Dt,referrerPolicy:null,rel:xn,required:Dt,reversed:Dt,rows:qe,rowSpan:qe,sandbox:xn,scope:null,scoped:Dt,seamless:Dt,selected:Dt,shadowRootClonable:Dt,shadowRootDelegatesFocus:Dt,shadowRootMode:null,shape:null,size:qe,sizes:null,slot:null,span:qe,spellCheck:$n,src:null,srcDoc:null,srcLang:null,srcSet:null,start:qe,step:null,style:null,tabIndex:qe,target:null,title:null,translate:null,type:null,typeMustMatch:Dt,useMap:null,value:$n,width:qe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xn,axis:null,background:null,bgColor:null,border:qe,borderColor:null,bottomMargin:qe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Dt,declare:Dt,event:null,face:null,frame:null,frameBorder:null,hSpace:qe,leftMargin:qe,link:null,longDesc:null,lowSrc:null,marginHeight:qe,marginWidth:qe,noResize:Dt,noHref:Dt,noShade:Dt,noWrap:Dt,object:null,profile:null,prompt:null,rev:null,rightMargin:qe,rules:null,scheme:null,scrolling:$n,standby:null,summary:null,text:null,topMargin:qe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:qe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Dt,disableRemotePlayback:Dt,prefix:null,property:null,results:qe,security:null,unselectable:null},space:"html",transform:Rj}),MW=xc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:rs,accentHeight:qe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:qe,amplitude:qe,arabicForm:null,ascent:qe,attributeName:null,attributeType:null,azimuth:qe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:qe,by:null,calcMode:null,capHeight:qe,className:xn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:qe,diffuseConstant:qe,direction:null,display:null,dur:null,divisor:qe,dominantBaseline:null,download:Dt,dx:null,dy:null,edgeMode:null,editable:null,elevation:qe,enableBackground:null,end:null,event:null,exponent:qe,externalResourcesRequired:null,fill:null,fillOpacity:qe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Fl,g2:Fl,glyphName:Fl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:qe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:qe,horizOriginX:qe,horizOriginY:qe,id:null,ideographic:qe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:qe,k:qe,k1:qe,k2:qe,k3:qe,k4:qe,kernelMatrix:rs,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:qe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:qe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:qe,overlineThickness:qe,paintOrder:null,panose1:null,path:null,pathLength:qe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:qe,pointsAtY:qe,pointsAtZ:qe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rs,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rs,rev:rs,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rs,requiredFeatures:rs,requiredFonts:rs,requiredFormats:rs,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:qe,specularExponent:qe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:qe,strikethroughThickness:qe,string:null,stroke:null,strokeDashArray:rs,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:qe,strokeOpacity:qe,strokeWidth:null,style:null,surfaceScale:qe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rs,tabIndex:qe,tableValues:null,target:null,targetX:qe,targetY:qe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rs,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:qe,underlineThickness:qe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:qe,values:null,vAlphabetic:qe,vMathematical:qe,vectorEffect:null,vHanging:qe,vIdeographic:qe,version:null,vertAdvY:qe,vertOriginX:qe,vertOriginY:qe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:qe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kj}),Dj=xc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Ij=xc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Rj}),Oj=xc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),FW={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},PW=/[A-Z]/g,fk=/-[a-z]/g,BW=/^data[-\w.:]+$/i;function Hd(e,t){const n=gd(t);let s=t,a=Kr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&BW.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(fk,HW);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!fk.test(o)){let u=o.replace(PW,UW);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=Ly}return new a(s,t)}function UW(e){return"-"+e.toLowerCase()}function HW(e){return e.charAt(1).toUpperCase()}const vc=Nj([Aj,LW,Dj,Ij,Oj],"html"),Ga=Nj([Aj,MW,Dj,Ij,Oj],"svg");function bd(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Sm(e){return e.join(" ").trim()}var Sl={},U0,pk;function $W(){if(pk)return U0;pk=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
655
655
|
`,h="/",p="*",m="",b="comment",v="declaration";U0=function(S,g){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];g=g||{};var y=1,E=1;function _(L){var $=L.match(t);$&&(y+=$.length);var X=L.lastIndexOf(d);E=~X?L.length-X:E+L.length}function T(){var L={line:y,column:E};return function($){return $.position=new A(L),R(),$}}function A(L){this.start=L,this.end={line:y,column:E},this.source=g.source}A.prototype.content=S;function k(L){var $=new Error(g.source+":"+y+":"+E+": "+L);if($.reason=L,$.filename=g.source,$.line=y,$.column=E,$.source=S,!g.silent)throw $}function j(L){var $=L.exec(S);if($){var X=$[0];return _(X),S=S.slice(X.length),$}}function R(){j(n)}function F(L){var $;for(L=L||[];$=M();)$!==!1&&L.push($);return L}function M(){var L=T();if(!(h!=S.charAt(0)||p!=S.charAt(1))){for(var $=2;m!=S.charAt($)&&(p!=S.charAt($)||h!=S.charAt($+1));)++$;if($+=2,m===S.charAt($-1))return k("End of comment missing");var X=S.slice(2,$-2);return E+=2,_(X),S=S.slice($),E+=2,L({type:b,comment:X})}}function H(){var L=T(),$=j(s);if($){if(M(),!j(a))return k("property missing ':'");var X=j(o),P=L({type:v,property:C($[0].replace(e,m)),value:X?C(X[0].replace(e,m)):m});return j(u),P}}function U(){var L=[];F(L);for(var $;$=H();)$!==!1&&(L.push($),F(L));return L}return R(),U()};function C(S){return S?S.replace(c,m):m}return U0}var mk;function zW(){if(mk)return Sl;mk=1;var e=Sl&&Sl.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.default=n;var t=e($W());function n(s,a){var o=null;if(!s||typeof s!="string")return o;var u=(0,t.default)(s),c=typeof a=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,p=d.value;c?a(h,p,d):p&&(o=o||{},o[h]=p)}}),o}return Sl}var Du={},gk;function GW(){if(gk)return Du;gk=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},u=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),o(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(a,c):h=h.replace(s,c),h.replace(t,u))};return Du.camelCase=d,Du}var Iu,bk;function qW(){if(bk)return Iu;bk=1;var e=Iu&&Iu.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(zW()),n=GW();function s(a,o){var u={};return!a||typeof a!="string"||(0,t.default)(a,function(c,d){c&&d&&(u[(0,n.camelCase)(c,o)]=d)}),u}return s.default=s,Iu=s,Iu}var WW=qW();const VW=nc(WW),_m=jj("end"),oa=jj("start");function jj(e){return t;function t(n){const s=n&&n.position&&n.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function Lj(e){const t=oa(e),n=_m(e);if(t&&n)return{start:t,end:n}}function Vu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?xk(e.position):"start"in e||"end"in e?xk(e):"line"in e||"column"in e?tv(e):""}function tv(e){return vk(e&&e.line)+":"+vk(e&&e.column)}function xk(e){return tv(e&&e.start)+"-"+tv(e&&e.end)}function vk(e){return e&&typeof e=="number"?e:1}class gr extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let a="",o={},u=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?a=t:!o.cause&&t&&(u=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof s=="string"){const d=s.indexOf(":");d===-1?o.ruleId=s:(o.source=s.slice(0,d),o.ruleId=s.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const c=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=c?c.line:void 0,this.name=Vu(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=u&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gr.prototype.file="";gr.prototype.name="";gr.prototype.reason="";gr.prototype.message="";gr.prototype.stack="";gr.prototype.column=void 0;gr.prototype.line=void 0;gr.prototype.ancestors=void 0;gr.prototype.cause=void 0;gr.prototype.fatal=void 0;gr.prototype.place=void 0;gr.prototype.ruleId=void 0;gr.prototype.source=void 0;const My={}.hasOwnProperty,YW=new Map,KW=/[A-Z]/g,XW=new Set(["table","tbody","thead","tfoot","tr"]),ZW=new Set(["td","th"]),Mj="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fj(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=aV(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=sV(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ga:vc,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Pj(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Pj(e,t,n){if(t.type==="element")return QW(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return JW(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return tV(e,t,n);if(t.type==="mdxjsEsm")return eV(e,t);if(t.type==="root")return nV(e,t,n);if(t.type==="text")return rV(e,t)}function QW(e,t,n){const s=e.schema;let a=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(a=Ga,e.schema=a),e.ancestors.push(t);const o=Uj(e,t.tagName,!1),u=iV(e,t);let c=Py(e,t);return XW.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Bd(d):!0})),Bj(e,u,o,t),Fy(u,c),e.ancestors.pop(),e.schema=s,e.create(t,o,u,n)}function JW(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}xd(e,t.position)}function eV(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xd(e,t.position)}function tV(e,t,n){const s=e.schema;let a=s;t.name==="svg"&&s.space==="html"&&(a=Ga,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:Uj(e,t.name,!0),u=oV(e,t),c=Py(e,t);return Bj(e,u,o,t),Fy(u,c),e.ancestors.pop(),e.schema=s,e.create(t,o,u,n)}function nV(e,t,n){const s={};return Fy(s,Py(e,t)),e.create(t,e.Fragment,s,n)}function rV(e,t){return t.value}function Bj(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function Fy(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function sV(e,t,n){return s;function s(a,o,u,c){const h=Array.isArray(u.children)?n:t;return c?h(o,u,c):h(o,u)}}function aV(e,t){return n;function n(s,a,o,u){const c=Array.isArray(o.children),d=oa(s);return t(a,o,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function iV(e,t){const n={};let s,a;for(a in t.properties)if(a!=="children"&&My.call(t.properties,a)){const o=lV(e,a,t.properties[a]);if(o){const[u,c]=o;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&ZW.has(t.tagName)?s=c:n[u]=c}}if(s){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return n}function oV(e,t){const n={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const o=s.data.estree.body[0];o.type;const u=o.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else xd(e,t.position);else{const a=s.name;let o;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const c=s.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else xd(e,t.position);else o=s.value===null?!0:s.value;n[a]=o}return n}function Py(e,t){const n=[];let s=-1;const a=e.passKeys?new Map:YW;for(;++s<t.children.length;){const o=t.children[s];let u;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=a.get(d)||0;u=d+"-"+h,a.set(d,h+1)}}const c=Pj(e,o,u);c!==void 0&&n.push(c)}return n}function lV(e,t,n){const s=Hd(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?Em(n):Sm(n)),s.property==="style"){let a=typeof n=="object"?n:cV(e,String(n));return e.stylePropertyNameCase==="css"&&(a=uV(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&s.space?FW[s.property]||s.property:s.attribute,n]}}function cV(e,t){try{return VW(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,a=new gr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Mj+"#cannot-parse-style-attribute",a}}function Uj(e,t,n){let s;if(!n)s={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let o=-1,u;for(;++o<a.length;){const c=uk(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}s=u}else s=uk(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const a=s.value;return My.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(s);xd(e)}function xd(e,t){const n=new gr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Mj+"#cannot-handle-mdx-estrees-without-createevaluater",n}function uV(e){const t={};let n;for(n in e)My.call(e,n)&&(t[dV(n)]=e[n]);return t}function dV(e){let t=e.replace(KW,hV);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function hV(e){return"-"+e.toLowerCase()}const Pl={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},fV={};function By(e,t){const n=fV,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Hj(e,s,a)}function Hj(e,t,n){if(pV(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return yk(e.children,t,n)}return Array.isArray(e)?yk(e,t,n):""}function yk(e,t,n){const s=[];let a=-1;for(;++a<e.length;)s[a]=Hj(e[a],t,n);return s.join("")}function pV(e){return!!(e&&typeof e=="object")}const Ek=document.createElement("i");function vd(e){const t="&"+e+";";Ek.innerHTML=t;const n=Ek.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function us(e,t,n,s){const a=e.length;let o=0,u;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,s.length<1e4)u=Array.from(s),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);o<s.length;)u=s.slice(o,o+1e4),u.unshift(t,0),e.splice(...u),o+=1e4,t+=1e4}function ys(e,t){return e.length>0?(us(e,e.length,0,t),e):t}const Sk={}.hasOwnProperty;function $j(e){const t={};let n=-1;for(;++n<e.length;)mV(t,e[n]);return t}function mV(e,t){let n;for(n in t){const a=(Sk.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let u;if(o)for(u in o){Sk.call(a,u)||(a[u]=[]);const c=o[u];gV(a[u],Array.isArray(c)?c:c?[c]:[])}}}function gV(e,t){let n=-1;const s=[];for(;++n<t.length;)(t[n].add==="after"?e:s).push(t[n]);us(e,0,0,s)}function zj(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function js(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Or=Li(/[A-Za-z]/),Cr=Li(/[\dA-Za-z]/),bV=Li(/[#-'*+\--9=?A-Z^-~]/);function Tp(e){return e!==null&&(e<32||e===127)}const nv=Li(/\d/),xV=Li(/[\dA-Fa-f]/),vV=Li(/[!-/:-@[-`{-~]/);function xt(e){return e!==null&&e<-2}function mn(e){return e!==null&&(e<0||e===32)}function zt(e){return e===-2||e===-1||e===32}const wm=Li(new RegExp("\\p{P}|\\p{S}","u")),xo=Li(/\s/);function Li(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function yc(e){const t=[];let n=-1,s=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let u="";if(o===37&&Cr(e.charCodeAt(n+1))&&Cr(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(u=String.fromCharCode(o));else if(o>55295&&o<57344){const c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(u=String.fromCharCode(o,c),a=1):u="�"}else u=String.fromCharCode(o);u&&(t.push(e.slice(s,n),encodeURIComponent(u)),s=n+a+1,u=""),a&&(n+=a,a=0)}return t.join("")+e.slice(s)}function Kt(e,t,n,s){const a=s?s-1:Number.POSITIVE_INFINITY;let o=0;return u;function u(d){return zt(d)?(e.enter(n),c(d)):t(d)}function c(d){return zt(d)&&o++<a?(e.consume(d),c):(e.exit(n),t(d))}}const yV={tokenize:EV};function EV(e){const t=e.attempt(this.parser.constructs.contentInitial,s,a);let n;return t;function s(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Kt(e,t,"linePrefix")}function a(c){return e.enter("paragraph"),o(c)}function o(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return xt(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),u)}}const SV={tokenize:_V},_k={tokenize:wV};function _V(e){const t=this,n=[];let s=0,a,o,u;return c;function c(_){if(s<n.length){const T=n[s];return t.containerState=T[1],e.attempt(T[0].continuation,d,h)(_)}return h(_)}function d(_){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&E();const T=t.events.length;let A=T,k;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){k=t.events[A][1].end;break}y(s);let j=T;for(;j<t.events.length;)t.events[j][1].end={...k},j++;return us(t.events,A+1,0,t.events.slice(T)),t.events.length=j,h(_)}return c(_)}function h(_){if(s===n.length){if(!a)return b(_);if(a.currentConstruct&&a.currentConstruct.concrete)return C(_);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_k,p,m)(_)}function p(_){return a&&E(),y(s),b(_)}function m(_){return t.parser.lazy[t.now().line]=s!==n.length,u=t.now().offset,C(_)}function b(_){return t.containerState={},e.attempt(_k,v,C)(_)}function v(_){return s++,n.push([t.currentConstruct,t.containerState]),b(_)}function C(_){if(_===null){a&&E(),y(0),e.consume(_);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),S(_)}function S(_){if(_===null){g(e.exit("chunkFlow"),!0),y(0),e.consume(_);return}return xt(_)?(e.consume(_),g(e.exit("chunkFlow")),s=0,t.interrupt=void 0,c):(e.consume(_),S)}function g(_,T){const A=t.sliceStream(_);if(T&&A.push(null),_.previous=o,o&&(o.next=_),o=_,a.defineSkip(_.start),a.write(A),t.parser.lazy[_.start.line]){let k=a.events.length;for(;k--;)if(a.events[k][1].start.offset<u&&(!a.events[k][1].end||a.events[k][1].end.offset>u))return;const j=t.events.length;let R=j,F,M;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(F){M=t.events[R][1].end;break}F=!0}for(y(s),k=j;k<t.events.length;)t.events[k][1].end={...M},k++;us(t.events,R+1,0,t.events.slice(j)),t.events.length=k}}function y(_){let T=n.length;for(;T-- >_;){const A=n[T];t.containerState=A[1],A[0].exit.call(t,e)}n.length=_}function E(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function wV(e,t,n){return Kt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Kl(e){if(e===null||mn(e)||xo(e))return 1;if(wm(e))return 2}function Cm(e,t,n){const s=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!s.includes(o)&&(t=o(t,n),s.push(o))}return t}const rv={name:"attention",resolveAll:CV,tokenize:TV};function CV(e,t){let n=-1,s,a,o,u,c,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(s=n;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[s][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[s][1].end.offset-e[s][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[s][1].end},b={...e[n][1].start};wk(m,-d),wk(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[s][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},o={type:d>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[n][1].start}},a={type:d>1?"strong":"emphasis",start:{...u.start},end:{...c.end}},e[s][1].end={...u.start},e[n][1].start={...c.end},h=[],e[s][1].end.offset-e[s][1].start.offset&&(h=ys(h,[["enter",e[s][1],t],["exit",e[s][1],t]])),h=ys(h,[["enter",a,t],["enter",u,t],["exit",u,t],["enter",o,t]]),h=ys(h,Cm(t.parser.constructs.insideSpan.null,e.slice(s+1,n),t)),h=ys(h,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=ys(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,us(e,s-1,n-s+3,h),n=s+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function TV(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,a=Kl(s);let o;return u;function u(d){return o=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===o)return e.consume(d),c;const h=e.exit("attentionSequence"),p=Kl(d),m=!p||p===2&&a||n.includes(d),b=!a||a===2&&p||n.includes(s);return h._open=!!(o===42?m:m&&(a||!b)),h._close=!!(o===42?b:b&&(p||!m)),t(d)}}function wk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const NV={name:"autolink",tokenize:AV};function AV(e,t,n){let s=0;return a;function a(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return Or(v)?(e.consume(v),u):v===64?n(v):h(v)}function u(v){return v===43||v===45||v===46||Cr(v)?(s=1,c(v)):h(v)}function c(v){return v===58?(e.consume(v),s=0,d):(v===43||v===45||v===46||Cr(v))&&s++<32?(e.consume(v),c):(s=0,h(v))}function d(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Tp(v)?n(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),p):bV(v)?(e.consume(v),h):n(v)}function p(v){return Cr(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),s=0,p):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):b(v)}function b(v){if((v===45||Cr(v))&&s++<63){const C=v===45?b:m;return e.consume(v),C}return n(v)}}const $d={partial:!0,tokenize:kV};function kV(e,t,n){return s;function s(o){return zt(o)?Kt(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||xt(o)?t(o):n(o)}}const Gj={continuation:{tokenize:DV},exit:IV,name:"blockQuote",tokenize:RV};function RV(e,t,n){const s=this;return a;function a(u){if(u===62){const c=s.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return n(u)}function o(u){return zt(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function DV(e,t,n){const s=this;return a;function a(u){return zt(u)?Kt(e,o,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(Gj,t,n)(u)}}function IV(e){e.exit("blockQuote")}const qj={name:"characterEscape",tokenize:OV};function OV(e,t,n){return s;function s(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return vV(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Wj={name:"characterReference",tokenize:jV};function jV(e,t,n){const s=this;let a=0,o,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,u=Cr,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=xV,p):(e.enter("characterReferenceValue"),o=7,u=nv,p(m))}function p(m){if(m===59&&a){const b=e.exit("characterReferenceValue");return u===Cr&&!vd(s.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&a++<o?(e.consume(m),p):n(m)}}const Ck={partial:!0,tokenize:MV},Tk={concrete:!0,name:"codeFenced",tokenize:LV};function LV(e,t,n){const s=this,a={partial:!0,tokenize:A};let o=0,u=0,c;return d;function d(k){return h(k)}function h(k){const j=s.events[s.events.length-1];return o=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,c=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(k)}function p(k){return k===c?(u++,e.consume(k),p):u<3?n(k):(e.exit("codeFencedFenceSequence"),zt(k)?Kt(e,m,"whitespace")(k):m(k))}function m(k){return k===null||xt(k)?(e.exit("codeFencedFence"),s.interrupt?t(k):e.check(Ck,S,T)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===null||xt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(k)):zt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Kt(e,v,"whitespace")(k)):k===96&&k===c?n(k):(e.consume(k),b)}function v(k){return k===null||xt(k)?m(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),C(k))}function C(k){return k===null||xt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(k)):k===96&&k===c?n(k):(e.consume(k),C)}function S(k){return e.attempt(a,T,g)(k)}function g(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),y}function y(k){return o>0&&zt(k)?Kt(e,E,"linePrefix",o+1)(k):E(k)}function E(k){return k===null||xt(k)?e.check(Ck,S,T)(k):(e.enter("codeFlowValue"),_(k))}function _(k){return k===null||xt(k)?(e.exit("codeFlowValue"),E(k)):(e.consume(k),_)}function T(k){return e.exit("codeFenced"),t(k)}function A(k,j,R){let F=0;return M;function M(X){return k.enter("lineEnding"),k.consume(X),k.exit("lineEnding"),H}function H(X){return k.enter("codeFencedFence"),zt(X)?Kt(k,U,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):U(X)}function U(X){return X===c?(k.enter("codeFencedFenceSequence"),L(X)):R(X)}function L(X){return X===c?(F++,k.consume(X),L):F>=u?(k.exit("codeFencedFenceSequence"),zt(X)?Kt(k,$,"whitespace")(X):$(X)):R(X)}function $(X){return X===null||xt(X)?(k.exit("codeFencedFence"),j(X)):R(X)}}}function MV(e,t,n){const s=this;return a;function a(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return s.parser.lazy[s.now().line]?n(u):t(u)}}const H0={name:"codeIndented",tokenize:PV},FV={partial:!0,tokenize:BV};function PV(e,t,n){const s=this;return a;function a(h){return e.enter("codeIndented"),Kt(e,o,"linePrefix",5)(h)}function o(h){const p=s.events[s.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):xt(h)?e.attempt(FV,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||xt(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function BV(e,t,n){const s=this;return a;function a(u){return s.parser.lazy[s.now().line]?n(u):xt(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):Kt(e,o,"linePrefix",5)(u)}function o(u){const c=s.events[s.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):xt(u)?a(u):n(u)}}const UV={name:"codeText",previous:$V,resolve:HV,tokenize:zV};function HV(e){let t=e.length-4,n=3,s,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)a===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(a=s):(s===t||e[s][1].type==="lineEnding")&&(e[a][1].type="codeTextData",s!==a+2&&(e[a][1].end=e[s-1][1].end,e.splice(a+2,s-a-2),t-=s-a-2,s=a+2),a=void 0);return e}function $V(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function zV(e,t,n){let s=0,a,o;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),s++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(o=e.enter("codeTextSequence"),a=0,p(m)):xt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||xt(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),a++,p):a===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",h(m))}}class GV{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,n,s){const a=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return s&&Ou(this.left,s),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ou(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ou(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ou(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ou(this.left,n.reverse())}}}function Ou(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Vj(e){const t={};let n=-1,s,a,o,u,c,d,h;const p=new GV(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(s=p.get(n),n&&s[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=s[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,qV(p,n)),n=t[n],h=!0);else if(s[1]._container){for(o=n,a=void 0;o--;)if(u=p.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(a&&(p.get(a)[1].type="lineEndingBlank"),u[1].type="lineEnding",a=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;a&&(s[1].end={...p.get(a)[1].start},c=p.slice(a,n),c.unshift(s),p.splice(a,n-a+1,c))}}return us(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function qV(e,t){const n=e.get(t)[1],s=e.get(t)[2];let a=t-1;const o=[];let u=n._tokenizer;u||(u=s.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let p,m,b=-1,v=n,C=0,S=0;const g=[S];for(;v;){for(;e.get(++a)[1]!==v;);o.push(a),v._tokenizer||(p=s.sliceStream(v),v.next||p.push(null),m&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(S=b+1,g.push(S),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):g.pop(),b=g.length;b--;){const y=c.slice(g[b],g[b+1]),E=o.pop();d.push([E,E+y.length-1]),e.splice(E,2,y)}for(d.reverse(),b=-1;++b<d.length;)h[C+d[b][0]]=C+d[b][1],C+=d[b][1]-d[b][0]-1;return h}const WV={resolve:YV,tokenize:KV},VV={partial:!0,tokenize:XV};function YV(e){return Vj(e),e}function KV(e,t){let n;return s;function s(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(c)}function a(c){return c===null?o(c):xt(c)?e.check(VV,u,o)(c):(e.consume(c),a)}function o(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function XV(e,t,n){const s=this;return a;function a(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Kt(e,o,"linePrefix")}function o(u){if(u===null||xt(u))return n(u);const c=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(s.parser.constructs.flow,n,t)(u)}}function Yj(e,t,n,s,a,o,u,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(y){return y===60?(e.enter(s),e.enter(a),e.enter(o),e.consume(y),e.exit(o),b):y===null||y===32||y===41||Tp(y)?n(y):(e.enter(s),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(y))}function b(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(a),e.exit(s),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),v(y))}function v(y){return y===62?(e.exit("chunkString"),e.exit(c),b(y)):y===null||y===60||xt(y)?n(y):(e.consume(y),y===92?C:v)}function C(y){return y===60||y===62||y===92?(e.consume(y),v):v(y)}function S(y){return!p&&(y===null||y===41||mn(y))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(s),t(y)):p<h&&y===40?(e.consume(y),p++,S):y===41?(e.consume(y),p--,S):y===null||y===32||y===40||Tp(y)?n(y):(e.consume(y),y===92?g:S)}function g(y){return y===40||y===41||y===92?(e.consume(y),S):S(y)}}function Kj(e,t,n,s,a,o){const u=this;let c=0,d;return h;function h(v){return e.enter(s),e.enter(a),e.consume(v),e.exit(a),e.enter(o),p}function p(v){return c>999||v===null||v===91||v===93&&!d||v===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(v):v===93?(e.exit(o),e.enter(a),e.consume(v),e.exit(a),e.exit(s),t):xt(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||xt(v)||c++>999?(e.exit("chunkString"),p(v)):(e.consume(v),d||(d=!zt(v)),v===92?b:m)}function b(v){return v===91||v===92||v===93?(e.consume(v),c++,m):m(v)}}function Xj(e,t,n,s,a,o){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(s),e.enter(a),e.consume(b),e.exit(a),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(a),e.consume(b),e.exit(a),e.exit(s),t):(e.enter(o),h(b))}function h(b){return b===u?(e.exit(o),d(u)):b===null?n(b):xt(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Kt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||xt(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?m:p)}function m(b){return b===u||b===92?(e.consume(b),p):p(b)}}function Yu(e,t){let n;return s;function s(a){return xt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,s):zt(a)?Kt(e,s,n?"linePrefix":"lineSuffix")(a):t(a)}}const ZV={name:"definition",tokenize:JV},QV={partial:!0,tokenize:eY};function JV(e,t,n){const s=this;let a;return o;function o(v){return e.enter("definition"),u(v)}function u(v){return Kj.call(s,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function c(v){return a=js(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return mn(v)?Yu(e,h)(v):h(v)}function h(v){return Yj(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function p(v){return e.attempt(QV,m,m)(v)}function m(v){return zt(v)?Kt(e,b,"whitespace")(v):b(v)}function b(v){return v===null||xt(v)?(e.exit("definition"),s.parser.defined.push(a),t(v)):n(v)}}function eY(e,t,n){return s;function s(c){return mn(c)?Yu(e,a)(c):n(c)}function a(c){return Xj(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return zt(c)?Kt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||xt(c)?t(c):n(c)}}const tY={name:"hardBreakEscape",tokenize:nY};function nY(e,t,n){return s;function s(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return xt(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const rY={name:"headingAtx",resolve:sY,tokenize:aY};function sY(e,t){let n=e.length-2,s=3,a,o;return e[s][1].type==="whitespace"&&(s+=2),n-2>s&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&e[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s&&(a={type:"atxHeadingText",start:e[s][1].start,end:e[n][1].end},o={type:"chunkText",start:e[s][1].start,end:e[n][1].end,contentType:"text"},us(e,s,n-s+1,[["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t]])),e}function aY(e,t,n){let s=0;return a;function a(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&s++<6?(e.consume(p),u):p===null||mn(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||xt(p)?(e.exit("atxHeading"),t(p)):zt(p)?Kt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||mn(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const iY=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Nk=["pre","script","style","textarea"],oY={concrete:!0,name:"htmlFlow",resolveTo:uY,tokenize:dY},lY={partial:!0,tokenize:fY},cY={partial:!0,tokenize:hY};function uY(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function dY(e,t,n){const s=this;let a,o,u,c,d;return h;function h(z){return p(z)}function p(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),m}function m(z){return z===33?(e.consume(z),b):z===47?(e.consume(z),o=!0,S):z===63?(e.consume(z),a=3,s.interrupt?t:O):Or(z)?(e.consume(z),u=String.fromCharCode(z),g):n(z)}function b(z){return z===45?(e.consume(z),a=2,v):z===91?(e.consume(z),a=5,c=0,C):Or(z)?(e.consume(z),a=4,s.interrupt?t:O):n(z)}function v(z){return z===45?(e.consume(z),s.interrupt?t:O):n(z)}function C(z){const V="CDATA[";return z===V.charCodeAt(c++)?(e.consume(z),c===V.length?s.interrupt?t:U:C):n(z)}function S(z){return Or(z)?(e.consume(z),u=String.fromCharCode(z),g):n(z)}function g(z){if(z===null||z===47||z===62||mn(z)){const V=z===47,le=u.toLowerCase();return!V&&!o&&Nk.includes(le)?(a=1,s.interrupt?t(z):U(z)):iY.includes(u.toLowerCase())?(a=6,V?(e.consume(z),y):s.interrupt?t(z):U(z)):(a=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(z):o?E(z):_(z))}return z===45||Cr(z)?(e.consume(z),u+=String.fromCharCode(z),g):n(z)}function y(z){return z===62?(e.consume(z),s.interrupt?t:U):n(z)}function E(z){return zt(z)?(e.consume(z),E):M(z)}function _(z){return z===47?(e.consume(z),M):z===58||z===95||Or(z)?(e.consume(z),T):zt(z)?(e.consume(z),_):M(z)}function T(z){return z===45||z===46||z===58||z===95||Cr(z)?(e.consume(z),T):A(z)}function A(z){return z===61?(e.consume(z),k):zt(z)?(e.consume(z),A):_(z)}function k(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),d=z,j):zt(z)?(e.consume(z),k):R(z)}function j(z){return z===d?(e.consume(z),d=null,F):z===null||xt(z)?n(z):(e.consume(z),j)}function R(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||mn(z)?A(z):(e.consume(z),R)}function F(z){return z===47||z===62||zt(z)?_(z):n(z)}function M(z){return z===62?(e.consume(z),H):n(z)}function H(z){return z===null||xt(z)?U(z):zt(z)?(e.consume(z),H):n(z)}function U(z){return z===45&&a===2?(e.consume(z),P):z===60&&a===1?(e.consume(z),Z):z===62&&a===4?(e.consume(z),W):z===63&&a===3?(e.consume(z),O):z===93&&a===5?(e.consume(z),B):xt(z)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(lY,ne,L)(z)):z===null||xt(z)?(e.exit("htmlFlowData"),L(z)):(e.consume(z),U)}function L(z){return e.check(cY,$,ne)(z)}function $(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),X}function X(z){return z===null||xt(z)?L(z):(e.enter("htmlFlowData"),U(z))}function P(z){return z===45?(e.consume(z),O):U(z)}function Z(z){return z===47?(e.consume(z),u="",Y):U(z)}function Y(z){if(z===62){const V=u.toLowerCase();return Nk.includes(V)?(e.consume(z),W):U(z)}return Or(z)&&u.length<8?(e.consume(z),u+=String.fromCharCode(z),Y):U(z)}function B(z){return z===93?(e.consume(z),O):U(z)}function O(z){return z===62?(e.consume(z),W):z===45&&a===2?(e.consume(z),O):U(z)}function W(z){return z===null||xt(z)?(e.exit("htmlFlowData"),ne(z)):(e.consume(z),W)}function ne(z){return e.exit("htmlFlow"),t(z)}}function hY(e,t,n){const s=this;return a;function a(u){return xt(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):n(u)}function o(u){return s.parser.lazy[s.now().line]?n(u):t(u)}}function fY(e,t,n){return s;function s(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt($d,t,n)}}const pY={name:"htmlText",tokenize:mY};function mY(e,t,n){const s=this;let a,o,u;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),A):O===63?(e.consume(O),_):Or(O)?(e.consume(O),R):n(O)}function h(O){return O===45?(e.consume(O),p):O===91?(e.consume(O),o=0,C):Or(O)?(e.consume(O),E):n(O)}function p(O){return O===45?(e.consume(O),v):n(O)}function m(O){return O===null?n(O):O===45?(e.consume(O),b):xt(O)?(u=m,Z(O)):(e.consume(O),m)}function b(O){return O===45?(e.consume(O),v):m(O)}function v(O){return O===62?P(O):O===45?b(O):m(O)}function C(O){const W="CDATA[";return O===W.charCodeAt(o++)?(e.consume(O),o===W.length?S:C):n(O)}function S(O){return O===null?n(O):O===93?(e.consume(O),g):xt(O)?(u=S,Z(O)):(e.consume(O),S)}function g(O){return O===93?(e.consume(O),y):S(O)}function y(O){return O===62?P(O):O===93?(e.consume(O),y):S(O)}function E(O){return O===null||O===62?P(O):xt(O)?(u=E,Z(O)):(e.consume(O),E)}function _(O){return O===null?n(O):O===63?(e.consume(O),T):xt(O)?(u=_,Z(O)):(e.consume(O),_)}function T(O){return O===62?P(O):_(O)}function A(O){return Or(O)?(e.consume(O),k):n(O)}function k(O){return O===45||Cr(O)?(e.consume(O),k):j(O)}function j(O){return xt(O)?(u=j,Z(O)):zt(O)?(e.consume(O),j):P(O)}function R(O){return O===45||Cr(O)?(e.consume(O),R):O===47||O===62||mn(O)?F(O):n(O)}function F(O){return O===47?(e.consume(O),P):O===58||O===95||Or(O)?(e.consume(O),M):xt(O)?(u=F,Z(O)):zt(O)?(e.consume(O),F):P(O)}function M(O){return O===45||O===46||O===58||O===95||Cr(O)?(e.consume(O),M):H(O)}function H(O){return O===61?(e.consume(O),U):xt(O)?(u=H,Z(O)):zt(O)?(e.consume(O),H):F(O)}function U(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),a=O,L):xt(O)?(u=U,Z(O)):zt(O)?(e.consume(O),U):(e.consume(O),$)}function L(O){return O===a?(e.consume(O),a=void 0,X):O===null?n(O):xt(O)?(u=L,Z(O)):(e.consume(O),L)}function $(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||mn(O)?F(O):(e.consume(O),$)}function X(O){return O===47||O===62||mn(O)?F(O):n(O)}function P(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function Z(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Y}function Y(O){return zt(O)?Kt(e,B,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):B(O)}function B(O){return e.enter("htmlTextData"),u(O)}}const Uy={name:"labelEnd",resolveAll:vY,resolveTo:yY,tokenize:EY},gY={tokenize:SY},bY={tokenize:_Y},xY={tokenize:wY};function vY(e){let t=-1;const n=[];for(;++t<e.length;){const s=e[t][1];if(n.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const a=s.type==="labelImage"?4:2;s.type="data",t+=a}}return e.length!==n.length&&us(e,0,e.length,n),e}function yY(e,t){let n=e.length,s=0,a,o,u,c;for(;n--;)if(a=e[n][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=n,a.type!=="labelLink")){s=2;break}}else a.type==="labelEnd"&&(u=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[u][1].end}},p={type:"labelText",start:{...e[o+s+2][1].end},end:{...e[u-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=ys(c,e.slice(o+1,o+s+3)),c=ys(c,[["enter",p,t]]),c=ys(c,Cm(t.parser.constructs.insideSpan.null,e.slice(o+s+4,u-3),t)),c=ys(c,[["exit",p,t],e[u-2],e[u-1],["exit",h,t]]),c=ys(c,e.slice(u+1)),c=ys(c,[["exit",d,t]]),us(e,o,e.length,c),e}function EY(e,t,n){const s=this;let a=s.events.length,o,u;for(;a--;)if((s.events[a][1].type==="labelImage"||s.events[a][1].type==="labelLink")&&!s.events[a][1]._balanced){o=s.events[a][1];break}return c;function c(b){return o?o._inactive?m(b):(u=s.parser.defined.includes(js(s.sliceSerialize({start:o.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(gY,p,u?p:m)(b):b===91?e.attempt(bY,p,u?h:m)(b):u?p(b):m(b)}function h(b){return e.attempt(xY,p,m)(b)}function p(b){return t(b)}function m(b){return o._balanced=!0,n(b)}}function SY(e,t,n){return s;function s(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return mn(m)?Yu(e,o)(m):o(m)}function o(m){return m===41?p(m):Yj(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return mn(m)?Yu(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?Xj(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return mn(m)?Yu(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function _Y(e,t,n){const s=this;return a;function a(c){return Kj.call(s,e,o,u,"reference","referenceMarker","referenceString")(c)}function o(c){return s.parser.defined.includes(js(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function wY(e,t,n){return s;function s(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const CY={name:"labelStartImage",resolveAll:Uy.resolveAll,tokenize:TY};function TY(e,t,n){const s=this;return a;function a(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(c):t(c)}}const NY={name:"labelStartLink",resolveAll:Uy.resolveAll,tokenize:AY};function AY(e,t,n){const s=this;return a;function a(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),o}function o(u){return u===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(u):t(u)}}const $0={name:"lineEnding",tokenize:kY};function kY(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Kt(e,t,"linePrefix")}}const ap={name:"thematicBreak",tokenize:RY};function RY(e,t,n){let s=0,a;return o;function o(h){return e.enter("thematicBreak"),u(h)}function u(h){return a=h,c(h)}function c(h){return h===a?(e.enter("thematicBreakSequence"),d(h)):s>=3&&(h===null||xt(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===a?(e.consume(h),s++,d):(e.exit("thematicBreakSequence"),zt(h)?Kt(e,c,"whitespace")(h):c(h))}}const qr={continuation:{tokenize:jY},exit:MY,name:"list",tokenize:OY},DY={partial:!0,tokenize:FY},IY={partial:!0,tokenize:LY};function OY(e,t,n){const s=this,a=s.events[s.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,u=0;return c;function c(v){const C=s.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!s.containerState.marker||v===s.containerState.marker:nv(v)){if(s.containerState.type||(s.containerState.type=C,e.enter(C,{_container:!0})),C==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(ap,n,h)(v):h(v);if(!s.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return nv(v)&&++u<10?(e.consume(v),d):(!s.interrupt||u<2)&&(s.containerState.marker?v===s.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||v,e.check($d,s.interrupt?n:p,e.attempt(DY,b,m))}function p(v){return s.containerState.initialBlankLine=!0,o++,b(v)}function m(v){return zt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),b):n(v)}function b(v){return s.containerState.size=o+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function jY(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check($d,a,o);function a(c){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,Kt(e,t,"listItemIndent",s.containerState.size+1)(c)}function o(c){return s.containerState.furtherBlankLines||!zt(c)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,u(c)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(IY,t,u)(c))}function u(c){return s.containerState._closeFlow=!0,s.interrupt=void 0,Kt(e,e.attempt(qr,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function LY(e,t,n){const s=this;return Kt(e,a,"listItemIndent",s.containerState.size+1);function a(o){const u=s.events[s.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===s.containerState.size?t(o):n(o)}}function MY(e){e.exit(this.containerState.type)}function FY(e,t,n){const s=this;return Kt(e,a,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const u=s.events[s.events.length-1];return!zt(o)&&u&&u[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Ak={name:"setextUnderline",resolveTo:PY,tokenize:BY};function PY(e,t){let n=e.length,s,a,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){s=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const u={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",u,t]),e.splice(o+1,0,["exit",e[s][1],t]),e[s][1].end={...e[o][1].end}):e[s][1]=u,e.push(["exit",u,t]),e}function BY(e,t,n){const s=this;let a;return o;function o(h){let p=s.events.length,m;for(;p--;)if(s.events[p][1].type!=="lineEnding"&&s.events[p][1].type!=="linePrefix"&&s.events[p][1].type!=="content"){m=s.events[p][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||m)?(e.enter("setextHeadingLine"),a=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===a?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),zt(h)?Kt(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||xt(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const UY={tokenize:HY};function HY(e){const t=this,n=e.attempt($d,s,e.attempt(this.parser.constructs.flowInitial,a,Kt(e,e.attempt(this.parser.constructs.flow,a,e.attempt(WV,a)),"linePrefix")));return n;function s(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const $Y={resolveAll:Qj()},zY=Zj("string"),GY=Zj("text");function Zj(e){return{resolveAll:Qj(e==="text"?qY:void 0),tokenize:t};function t(n){const s=this,a=this.parser.constructs[e],o=n.attempt(a,u,c);return u;function u(p){return h(p)?o(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),o(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const m=a[p];let b=-1;if(m)for(;++b<m.length;){const v=m[b];if(!v.previous||v.previous.call(s,s.previous))return!0}return!1}}}function Qj(e){return t;function t(n,s){let a=-1,o;for(;++a<=n.length;)o===void 0?n[a]&&n[a][1].type==="data"&&(o=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==o+2&&(n[o][1].end=n[a-1][1].end,n.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(n,s):n}}function qY(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const s=e[n-1][1],a=t.sliceStream(s);let o=a.length,u=-1,c=0,d;for(;o--;){const h=a[o];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)d=!0,c++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?u:s.start._bufferIndex+u,_index:s.start._index+o,line:s.end.line,column:s.end.column-c,offset:s.end.offset-c},end:{...s.end}};s.end={...h.start},s.start.offset===s.end.offset?Object.assign(s,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const WY={42:qr,43:qr,45:qr,48:qr,49:qr,50:qr,51:qr,52:qr,53:qr,54:qr,55:qr,56:qr,57:qr,62:Gj},VY={91:ZV},YY={[-2]:H0,[-1]:H0,32:H0},KY={35:rY,42:ap,45:[Ak,ap],60:oY,61:Ak,95:ap,96:Tk,126:Tk},XY={38:Wj,92:qj},ZY={[-5]:$0,[-4]:$0,[-3]:$0,33:CY,38:Wj,42:rv,60:[NV,pY],91:NY,92:[tY,qj],93:Uy,95:rv,96:UV},QY={null:[rv,$Y]},JY={null:[42,95]},eK={null:[]},tK=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:JY,contentInitial:VY,disable:eK,document:WY,flow:KY,flowInitial:YY,insideSpan:QY,string:XY,text:ZY},Symbol.toStringTag,{value:"Module"}));function nK(e,t,n){let s={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let u=[],c=[];const d={attempt:j(A),check:j(k),consume:E,enter:_,exit:T,interrupt:j(k,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:C,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:m};let p=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function m(H){return u=ys(u,H),g(),u[u.length-1]!==null?[]:(R(t,0),h.events=Cm(o,h.events,h),h.events)}function b(H,U){return sK(v(H),U)}function v(H){return rK(u,H)}function C(){const{_bufferIndex:H,_index:U,line:L,column:$,offset:X}=s;return{_bufferIndex:H,_index:U,line:L,column:$,offset:X}}function S(H){a[H.line]=H.column,M()}function g(){let H;for(;s._index<u.length;){const U=u[s._index];if(typeof U=="string")for(H=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===H&&s._bufferIndex<U.length;)y(U.charCodeAt(s._bufferIndex));else y(U)}}function y(H){p=p(H)}function E(H){xt(H)?(s.line++,s.column=1,s.offset+=H===-3?2:1,M()):H!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===u[s._index].length&&(s._bufferIndex=-1,s._index++)),h.previous=H}function _(H,U){const L=U||{};return L.type=H,L.start=C(),h.events.push(["enter",L,h]),c.push(L),L}function T(H){const U=c.pop();return U.end=C(),h.events.push(["exit",U,h]),U}function A(H,U){R(H,U.from)}function k(H,U){U.restore()}function j(H,U){return L;function L($,X,P){let Z,Y,B,O;return Array.isArray($)?ne($):"tokenize"in $?ne([$]):W($);function W(se){return K;function K(G){const Q=G!==null&&se[G],ce=G!==null&&se.null,oe=[...Array.isArray(Q)?Q:Q?[Q]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return ne(oe)(G)}}function ne(se){return Z=se,Y=0,se.length===0?P:z(se[Y])}function z(se){return K;function K(G){return O=F(),B=se,se.partial||(h.currentConstruct=se),se.name&&h.parser.constructs.disable.null.includes(se.name)?le():se.tokenize.call(U?Object.assign(Object.create(h),U):h,d,V,le)(G)}}function V(se){return H(B,O),X}function le(se){return O.restore(),++Y<Z.length?z(Z[Y]):P}}}function R(H,U){H.resolveAll&&!o.includes(H)&&o.push(H),H.resolve&&us(h.events,U,h.events.length-U,H.resolve(h.events.slice(U),h)),H.resolveTo&&(h.events=H.resolveTo(h.events,h))}function F(){const H=C(),U=h.previous,L=h.currentConstruct,$=h.events.length,X=Array.from(c);return{from:$,restore:P};function P(){s=H,h.previous=U,h.currentConstruct=L,h.events.length=$,c=X,M()}}function M(){s.line in a&&s.column<2&&(s.column=a[s.line],s.offset+=a[s.line]-1)}}function rK(e,t){const n=t.start._index,s=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let u;if(n===a)u=[e[n].slice(s,o)];else{if(u=e.slice(n,a),s>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(s):u.shift()}o>0&&u.push(e[a].slice(0,o))}return u}function sK(e,t){let n=-1;const s=[];let a;for(;++n<e.length;){const o=e[n];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
|
|
656
656
|
`;break}case-3:{u=`\r
|
|
657
657
|
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&a)continue;u=" ";break}default:u=String.fromCharCode(o)}a=o===-2,s.push(u)}return s.join("")}function aK(e){const s={constructs:$j([tK,...(e||{}).extensions||[]]),content:a(yV),defined:[],document:a(SV),flow:a(UY),lazy:{},string:a(zY),text:a(GY)};return s;function a(o){return u;function u(c){return nK(s,o,c)}}}function iK(e){for(;!Vj(e););return e}const kk=/[\0\t\n\r]/g;function oK(){let e=1,t="",n=!0,s;return a;function a(o,u,c){const d=[];let h,p,m,b,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(kk.lastIndex=m,h=kk.exec(o),b=h&&h.index!==void 0?h.index:o.length,v=o.charCodeAt(b),!h){t=o.slice(m);break}if(v===10&&m===b&&s)d.push(-3),s=void 0;else switch(s&&(d.push(-5),s=void 0),m<b&&(d.push(o.slice(m,b)),e+=b-m),v){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:s=!0,e=1}m=b+1}return c&&(s&&d.push(-5),t&&d.push(t),d.push(null)),d}}const lK=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cK(e){return e.replace(lK,uK)}function uK(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return zj(n.slice(o?2:1),o?16:10)}return vd(n)||e}const Jj={}.hasOwnProperty;function dK(e,t,n){return typeof t!="string"&&(n=t,t=void 0),hK(n)(iK(aK(n).document().write(oK()(e,t,!0))))}function hK(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(st),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Ge),blockQuote:o(ce),characterEscape:F,characterReference:F,codeFenced:o(oe),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(oe,u),codeText:o(te,u),codeTextData:F,data:F,codeFlowValue:F,definition:o(pe),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(ve),hardBreakEscape:o(Xe),hardBreakTrailing:o(Xe),htmlFlow:o(De,u),htmlFlowData:F,htmlText:o(De,u),htmlTextData:F,image:o(Ye),label:u,link:o(st),listItem:o(It),listItemValue:b,listOrdered:o(pt,m),listUnordered:o(pt),paragraph:o(Et),reference:z,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(Ge),strong:o(Ot),thematicBreak:o(ke)},exit:{atxHeading:d(),atxHeadingSequence:A,autolink:d(),autolinkEmail:Q,autolinkProtocol:G,blockQuote:d(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:se,characterReference:K,codeFenced:d(g),codeFencedFence:S,codeFencedFenceInfo:v,codeFencedFenceMeta:C,codeFlowValue:M,codeIndented:d(y),codeText:d(X),codeTextData:M,data:M,definition:d(),definitionDestinationString:T,definitionLabelString:E,definitionTitleString:_,emphasis:d(),hardBreakEscape:d(U),hardBreakTrailing:d(U),htmlFlow:d(L),htmlFlowData:M,htmlText:d($),htmlTextData:M,image:d(Z),label:B,labelText:Y,lineEnding:H,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:V,resourceDestinationString:O,resourceTitleString:W,resource:ne,setextHeading:d(R),setextHeadingLineSequence:j,setextHeadingText:k,strong:d(),thematicBreak:d()}};eL(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(fe){let we={type:"root",children:[]};const He={stack:[we],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:p,data:n},Qe=[];let dt=-1;for(;++dt<fe.length;)if(fe[dt][1].type==="listOrdered"||fe[dt][1].type==="listUnordered")if(fe[dt][0]==="enter")Qe.push(dt);else{const Vt=Qe.pop();dt=a(fe,Vt,dt)}for(dt=-1;++dt<fe.length;){const Vt=t[fe[dt][0]];Jj.call(Vt,fe[dt][1].type)&&Vt[fe[dt][1].type].call(Object.assign({sliceSerialize:fe[dt][2].sliceSerialize},He),fe[dt][1])}if(He.tokenStack.length>0){const Vt=He.tokenStack[He.tokenStack.length-1];(Vt[1]||Rk).call(He,void 0,Vt[0])}for(we.position={start:gi(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:gi(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},dt=-1;++dt<t.transforms.length;)we=t.transforms[dt](we)||we;return we}function a(fe,we,He){let Qe=we-1,dt=-1,Vt=!1,mt,on,Dn,Oe;for(;++Qe<=He;){const Je=fe[Qe];switch(Je[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Je[0]==="enter"?dt++:dt--,Oe=void 0;break}case"lineEndingBlank":{Je[0]==="enter"&&(mt&&!Oe&&!dt&&!Dn&&(Dn=Qe),Oe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Oe=void 0}if(!dt&&Je[0]==="enter"&&Je[1].type==="listItemPrefix"||dt===-1&&Je[0]==="exit"&&(Je[1].type==="listUnordered"||Je[1].type==="listOrdered")){if(mt){let Ct=Qe;for(on=void 0;Ct--;){const bt=fe[Ct];if(bt[1].type==="lineEnding"||bt[1].type==="lineEndingBlank"){if(bt[0]==="exit")continue;on&&(fe[on][1].type="lineEndingBlank",Vt=!0),bt[1].type="lineEnding",on=Ct}else if(!(bt[1].type==="linePrefix"||bt[1].type==="blockQuotePrefix"||bt[1].type==="blockQuotePrefixWhitespace"||bt[1].type==="blockQuoteMarker"||bt[1].type==="listItemIndent"))break}Dn&&(!on||Dn<on)&&(mt._spread=!0),mt.end=Object.assign({},on?fe[on][1].start:Je[1].end),fe.splice(on||Qe,0,["exit",mt,Je[2]]),Qe++,He++}if(Je[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},Je[1].start),end:void 0};mt=Ct,fe.splice(Qe,0,["enter",Ct,Je[2]]),Qe++,He++,Dn=void 0,Oe=!0}}}return fe[we][1]._spread=Vt,He}function o(fe,we){return He;function He(Qe){c.call(this,fe(Qe),Qe),we&&we.call(this,Qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(fe,we,He){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([we,He||void 0]),fe.position={start:gi(we.start),end:void 0}}function d(fe){return we;function we(He){fe&&fe.call(this,He),h.call(this,He)}}function h(fe,we){const He=this.stack.pop(),Qe=this.tokenStack.pop();if(Qe)Qe[0].type!==fe.type&&(we?we.call(this,fe,Qe[0]):(Qe[1]||Rk).call(this,fe,Qe[0]));else throw new Error("Cannot close `"+fe.type+"` ("+Vu({start:fe.start,end:fe.end})+"): it’s not open");He.position.end=gi(fe.end)}function p(){return By(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(fe){if(this.data.expectingFirstListItemValue){const we=this.stack[this.stack.length-2];we.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function v(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.lang=fe}function C(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.meta=fe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.value=fe.replace(/(\r?\n|\r)$/g,"")}function E(fe){const we=this.resume(),He=this.stack[this.stack.length-1];He.label=we,He.identifier=js(this.sliceSerialize(fe)).toLowerCase()}function _(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.title=fe}function T(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.url=fe}function A(fe){const we=this.stack[this.stack.length-1];if(!we.depth){const He=this.sliceSerialize(fe).length;we.depth=He}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function j(fe){const we=this.stack[this.stack.length-1];we.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function F(fe){const He=this.stack[this.stack.length-1].children;let Qe=He[He.length-1];(!Qe||Qe.type!=="text")&&(Qe=yn(),Qe.position={start:gi(fe.start),end:void 0},He.push(Qe)),this.stack.push(Qe)}function M(fe){const we=this.stack.pop();we.value+=this.sliceSerialize(fe),we.position.end=gi(fe.end)}function H(fe){const we=this.stack[this.stack.length-1];if(this.data.atHardBreak){const He=we.children[we.children.length-1];He.position.end=gi(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(we.type)&&(F.call(this,fe),M.call(this,fe))}function U(){this.data.atHardBreak=!0}function L(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.value=fe}function $(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.value=fe}function X(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.value=fe}function P(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=we,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function Z(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=we,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function Y(fe){const we=this.sliceSerialize(fe),He=this.stack[this.stack.length-2];He.label=cK(we),He.identifier=js(we).toLowerCase()}function B(){const fe=this.stack[this.stack.length-1],we=this.resume(),He=this.stack[this.stack.length-1];if(this.data.inReference=!0,He.type==="link"){const Qe=fe.children;He.children=Qe}else He.alt=we}function O(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.url=fe}function W(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.title=fe}function ne(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function V(fe){const we=this.resume(),He=this.stack[this.stack.length-1];He.label=we,He.identifier=js(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function le(fe){this.data.characterReferenceType=fe.type}function se(fe){const we=this.sliceSerialize(fe),He=this.data.characterReferenceType;let Qe;He?(Qe=zj(we,He==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Qe=vd(we);const dt=this.stack[this.stack.length-1];dt.value+=Qe}function K(fe){const we=this.stack.pop();we.position.end=gi(fe.end)}function G(fe){M.call(this,fe);const we=this.stack[this.stack.length-1];we.url=this.sliceSerialize(fe)}function Q(fe){M.call(this,fe);const we=this.stack[this.stack.length-1];we.url="mailto:"+this.sliceSerialize(fe)}function ce(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function te(){return{type:"inlineCode",value:""}}function pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function Ge(){return{type:"heading",depth:0,children:[]}}function Xe(){return{type:"break"}}function De(){return{type:"html",value:""}}function Ye(){return{type:"image",title:null,url:"",alt:null}}function st(){return{type:"link",title:null,url:"",children:[]}}function pt(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function It(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function Et(){return{type:"paragraph",children:[]}}function Ot(){return{type:"strong",children:[]}}function yn(){return{type:"text",value:""}}function ke(){return{type:"thematicBreak"}}}function gi(e){return{line:e.line,column:e.column,offset:e.offset}}function eL(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?eL(e,s):fK(e,s)}}function fK(e,t){let n;for(n in t)if(Jj.call(t,n))switch(n){case"canContainEols":{const s=t[n];s&&e[n].push(...s);break}case"transforms":{const s=t[n];s&&e[n].push(...s);break}case"enter":case"exit":{const s=t[n];s&&Object.assign(e[n],s);break}}}function Rk(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Vu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Vu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Vu({start:t.start,end:t.end})+") is still open")}function tL(e){const t=this;t.parser=n;function n(s){return dK(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function pK(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function mK(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
package/static/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
|
|
10
10
|
<title>Coconut - Agentic Development Environment</title>
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-8zDqsxO-.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-uyccX96d.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body class="font-inter">
|