@lovelybunch/api 1.0.65 → 1.0.66
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.
|
@@ -160,6 +160,12 @@ app.post('/providers/github/token', async (c) => {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
const record = await saveGithubToken(token, expiresAt);
|
|
163
|
+
try {
|
|
164
|
+
await storeCredentials('x-access-token', token);
|
|
165
|
+
}
|
|
166
|
+
catch (credError) {
|
|
167
|
+
console.warn('[git] Failed to install GitHub token into credential store:', credError);
|
|
168
|
+
}
|
|
163
169
|
return c.json({ success: true, data: { expiresAt: record.expiresAt } });
|
|
164
170
|
}
|
|
165
171
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovelybunch/api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.66",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/server-with-static.js",
|
|
6
6
|
"exports": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@hono/node-server": "^1.13.7",
|
|
34
34
|
"@hono/node-ws": "^1.0.6",
|
|
35
|
-
"@lovelybunch/core": "^1.0.
|
|
36
|
-
"@lovelybunch/mcp": "^1.0.
|
|
37
|
-
"@lovelybunch/types": "^1.0.
|
|
35
|
+
"@lovelybunch/core": "^1.0.66",
|
|
36
|
+
"@lovelybunch/mcp": "^1.0.66",
|
|
37
|
+
"@lovelybunch/types": "^1.0.66",
|
|
38
38
|
"arctic": "^1.9.2",
|
|
39
39
|
"bcrypt": "^5.1.1",
|
|
40
40
|
"cookie": "^0.6.0",
|
|
@@ -556,7 +556,7 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
|
|
|
556
556
|
|
|
557
557
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
558
558
|
|
|
559
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return C.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},A$="DialogDescriptionWarning",N$=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${oO(A$).contentName}}.`;return C.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},qx=VI,lO=KI,Wx=ZI,vd=QI,xd=JI,yd=tO,Ed=rO,Vp=sO;const cO=qx,k$=Wx,uO=C.forwardRef(({className:e,...t},n)=>r.jsx(vd,{className:Te("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}));uO.displayName=vd.displayName;const R$=Yl("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"}}),Vx=C.forwardRef(({side:e="right",className:t,children:n,...a},s)=>r.jsxs(k$,{children:[r.jsx(uO,{}),r.jsxs(xd,{ref:s,className:Te(R$({side:e}),t),...a,children:[n,r.jsxs(Vp,{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(Sr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Vx.displayName=xd.displayName;const Yx=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-2 text-center sm:text-left",e),...t});Yx.displayName="SheetHeader";const Kx=C.forwardRef(({className:e,...t},n)=>r.jsx(yd,{ref:n,className:Te("text-lg font-semibold text-foreground",e),...t}));Kx.displayName=yd.displayName;const dO=C.forwardRef(({className:e,...t},n)=>r.jsx(Ed,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));dO.displayName=Ed.displayName;function k2({className:e,...t}){return r.jsx("div",{className:Te("animate-pulse rounded-md bg-muted",e),...t})}const D$=["top","right","bottom","left"],bi=Math.min,Kr=Math.max,ap=Math.round,gf=Math.floor,qa=e=>({x:e,y:e}),I$={left:"right",right:"left",bottom:"top",top:"bottom"},O$={start:"end",end:"start"};function Sv(e,t,n){return Kr(e,bi(t,n))}function Cs(e,t){return typeof e=="function"?e(t):e}function Ts(e){return e.split("-")[0]}function Zl(e){return e.split("-")[1]}function Xx(e){return e==="x"?"y":"x"}function Zx(e){return e==="y"?"height":"width"}const L$=new Set(["top","bottom"]);function $a(e){return L$.has(Ts(e))?"y":"x"}function Qx(e){return Xx($a(e))}function j$(e,t,n){n===void 0&&(n=!1);const a=Zl(e),s=Qx(e),o=Zx(s);let u=s==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(u=sp(u)),[u,sp(u)]}function M$(e){const t=sp(e);return[wv(e),t,wv(t)]}function wv(e){return e.replace(/start|end/g,t=>O$[t])}const R2=["left","right"],D2=["right","left"],F$=["top","bottom"],P$=["bottom","top"];function B$(e,t,n){switch(e){case"top":case"bottom":return n?t?D2:R2:t?R2:D2;case"left":case"right":return t?F$:P$;default:return[]}}function U$(e,t,n,a){const s=Zl(e);let o=B$(Ts(e),n==="start",a);return s&&(o=o.map(u=>u+"-"+s),t&&(o=o.concat(o.map(wv)))),o}function sp(e){return e.replace(/left|right|bottom|top/g,t=>I$[t])}function H$(e){return{top:0,right:0,bottom:0,left:0,...e}}function hO(e){return typeof e!="number"?H$(e):{top:e,right:e,bottom:e,left:e}}function ip(e){const{x:t,y:n,width:a,height:s}=e;return{width:a,height:s,top:n,left:t,right:t+a,bottom:n+s,x:t,y:n}}function I2(e,t,n){let{reference:a,floating:s}=e;const o=$a(t),u=Qx(t),c=Zx(u),d=Ts(t),h=o==="y",p=a.x+a.width/2-s.width/2,m=a.y+a.height/2-s.height/2,b=a[c]/2-s[c]/2;let x;switch(d){case"top":x={x:p,y:a.y-s.height};break;case"bottom":x={x:p,y:a.y+a.height};break;case"right":x={x:a.x+a.width,y:m};break;case"left":x={x:a.x-s.width,y:m};break;default:x={x:a.x,y:a.y}}switch(Zl(t)){case"start":x[u]-=b*(n&&h?-1:1);break;case"end":x[u]+=b*(n&&h?-1:1);break}return x}const $$=async(e,t,n)=>{const{placement:a="bottom",strategy:s="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:s}),{x:p,y:m}=I2(h,a,d),b=a,x={},w=0;for(let S=0;S<c.length;S++){const{name:g,fn:y}=c[S],{x:_,y:E,data:T,reset:k}=await y({x:p,y:m,initialPlacement:a,placement:b,strategy:s,middlewareData:x,rects:h,platform:u,elements:{reference:e,floating:t}});p=_??p,m=E??m,x={...x,[g]:{...x[g],...T}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(b=k.placement),k.rects&&(h=k.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:p,y:m}=I2(h,b,d)),S=-1)}return{x:p,y:m,placement:b,strategy:s,middlewareData:x}};async function Wu(e,t){var n;t===void 0&&(t={});const{x:a,y:s,platform:o,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:x=0}=Cs(t,e),w=hO(x),g=c[b?m==="floating"?"reference":"floating":m],y=ip(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})),_=m==="floating"?{x:a,y:s,width:u.floating.width,height:u.floating.height}:u.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),T=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},k=ip(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:E,strategy:d}):_);return{top:(y.top-k.top+w.top)/T.y,bottom:(k.bottom-y.bottom+w.bottom)/T.y,left:(y.left-k.left+w.left)/T.x,right:(k.right-y.right+w.right)/T.x}}const z$=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:s,rects:o,platform:u,elements:c,middlewareData:d}=t,{element:h,padding:p=0}=Cs(e,t)||{};if(h==null)return{};const m=hO(p),b={x:n,y:a},x=Qx(s),w=Zx(x),S=await u.getDimensions(h),g=x==="y",y=g?"top":"left",_=g?"bottom":"right",E=g?"clientHeight":"clientWidth",T=o.reference[w]+o.reference[x]-b[x]-o.floating[w],k=b[x]-o.reference[x],N=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let I=N?N[E]:0;(!I||!await(u.isElement==null?void 0:u.isElement(N)))&&(I=c.floating[E]||o.floating[w]);const R=T/2-k/2,M=I/2-S[w]/2-1,j=bi(m[y],M),P=bi(m[_],M),z=j,U=I-S[w]-P,G=I/2-S[w]/2+R,J=Sv(z,G,U),B=!d.arrow&&Zl(s)!=null&&G!==J&&o.reference[w]/2-(G<z?j:P)-S[w]/2<0,q=B?G<z?G-z:G-U:0;return{[x]:b[x]+q,data:{[x]:J,centerOffset:G-J-q,...B&&{alignmentOffset:q}},reset:B}}}),G$=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:s,middlewareData:o,rects:u,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...g}=Cs(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Ts(s),_=$a(c),E=Ts(c)===c,T=await(d.isRTL==null?void 0:d.isRTL(h.floating)),k=b||(E||!S?[sp(c)]:M$(c)),N=w!=="none";!b&&N&&k.push(...U$(c,S,w,T));const I=[c,...k],R=await Wu(t,g),M=[];let j=((a=o.flip)==null?void 0:a.overflows)||[];if(p&&M.push(R[y]),m){const G=j$(s,u,T);M.push(R[G[0]],R[G[1]])}if(j=[...j,{placement:s,overflows:M}],!M.every(G=>G<=0)){var P,z;const G=(((P=o.flip)==null?void 0:P.index)||0)+1,J=I[G];if(J&&(!(m==="alignment"?_!==$a(J):!1)||j.every(Y=>$a(Y.placement)===_?Y.overflows[0]>0:!0)))return{data:{index:G,overflows:j},reset:{placement:J}};let B=(z=j.filter(q=>q.overflows[0]<=0).sort((q,Y)=>q.overflows[1]-Y.overflows[1])[0])==null?void 0:z.placement;if(!B)switch(x){case"bestFit":{var U;const q=(U=j.filter(Y=>{if(N){const F=$a(Y.placement);return F===_||F==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(F=>F>0).reduce((F,L)=>F+L,0)]).sort((Y,F)=>Y[1]-F[1])[0])==null?void 0:U[0];q&&(B=q);break}case"initialPlacement":B=c;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function O2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function L2(e){return D$.some(t=>e[t]>=0)}const q$=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...s}=Cs(e,t);switch(a){case"referenceHidden":{const o=await Wu(t,{...s,elementContext:"reference"}),u=O2(o,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:L2(u)}}}case"escaped":{const o=await Wu(t,{...s,altBoundary:!0}),u=O2(o,n.floating);return{data:{escapedOffsets:u,escaped:L2(u)}}}default:return{}}}}},fO=new Set(["left","top"]);async function W$(e,t){const{placement:n,platform:a,elements:s}=e,o=await(a.isRTL==null?void 0:a.isRTL(s.floating)),u=Ts(n),c=Zl(n),d=$a(n)==="y",h=fO.has(u)?-1:1,p=o&&d?-1:1,m=Cs(t,e);let{mainAxis:b,crossAxis:x,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof w=="number"&&(x=c==="end"?w*-1:w),d?{x:x*p,y:b*h}:{x:b*h,y:x*p}}const V$=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:s,y:o,placement:u,middlewareData:c}=t,d=await W$(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(a=c.arrow)!=null&&a.alignmentOffset?{}:{x:s+d.x,y:o+d.y,data:{...d,placement:u}}}}},Y$=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:s}=t,{mainAxis:o=!0,crossAxis:u=!1,limiter:c={fn:g=>{let{x:y,y:_}=g;return{x:y,y:_}}},...d}=Cs(e,t),h={x:n,y:a},p=await Wu(t,d),m=$a(Ts(s)),b=Xx(m);let x=h[b],w=h[m];if(o){const g=b==="y"?"top":"left",y=b==="y"?"bottom":"right",_=x+p[g],E=x-p[y];x=Sv(_,x,E)}if(u){const g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",_=w+p[g],E=w-p[y];w=Sv(_,w,E)}const S=c.fn({...t,[b]:x,[m]:w});return{...S,data:{x:S.x-n,y:S.y-a,enabled:{[b]:o,[m]:u}}}}}},K$=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:s,rects:o,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Cs(e,t),p={x:n,y:a},m=$a(s),b=Xx(m);let x=p[b],w=p[m];const S=Cs(c,t),g=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const E=b==="y"?"height":"width",T=o.reference[b]-o.floating[E]+g.mainAxis,k=o.reference[b]+o.reference[E]-g.mainAxis;x<T?x=T:x>k&&(x=k)}if(h){var y,_;const E=b==="y"?"width":"height",T=fO.has(Ts(s)),k=o.reference[m]-o.floating[E]+(T&&((y=u.offset)==null?void 0:y[m])||0)+(T?0:g.crossAxis),N=o.reference[m]+o.reference[E]+(T?0:((_=u.offset)==null?void 0:_[m])||0)-(T?g.crossAxis:0);w<k?w=k:w>N&&(w=N)}return{[b]:x,[m]:w}}}},X$=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:s,rects:o,platform:u,elements:c}=t,{apply:d=()=>{},...h}=Cs(e,t),p=await Wu(t,h),m=Ts(s),b=Zl(s),x=$a(s)==="y",{width:w,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 _=S-p.top-p.bottom,E=w-p.left-p.right,T=bi(S-p[g],_),k=bi(w-p[y],E),N=!t.middlewareData.shift;let I=T,R=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=E),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(I=_),N&&!b){const j=Kr(p.left,0),P=Kr(p.right,0),z=Kr(p.top,0),U=Kr(p.bottom,0);x?R=w-2*(j!==0||P!==0?j+P:Kr(p.left,p.right)):I=S-2*(z!==0||U!==0?z+U:Kr(p.top,p.bottom))}await d({...t,availableWidth:R,availableHeight:I});const M=await u.getDimensions(c.floating);return w!==M.width||S!==M.height?{reset:{rects:!0}}:{}}}};function Yp(){return typeof window<"u"}function Ql(e){return pO(e)?(e.nodeName||"").toLowerCase():"#document"}function Qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qa(e){var t;return(t=(pO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pO(e){return Yp()?e instanceof Node||e instanceof Qr(e).Node:!1}function Ta(e){return Yp()?e instanceof Element||e instanceof Qr(e).Element:!1}function Ya(e){return Yp()?e instanceof HTMLElement||e instanceof Qr(e).HTMLElement:!1}function j2(e){return!Yp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qr(e).ShadowRoot}const Z$=new Set(["inline","contents"]);function _d(e){const{overflow:t,overflowX:n,overflowY:a,display:s}=Aa(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!Z$.has(s)}const Q$=new Set(["table","td","th"]);function J$(e){return Q$.has(Ql(e))}const ez=[":popover-open",":modal"];function Kp(e){return ez.some(t=>{try{return e.matches(t)}catch{return!1}})}const tz=["transform","translate","scale","rotate","perspective"],nz=["transform","translate","scale","rotate","perspective","filter"],rz=["paint","layout","strict","content"];function Jx(e){const t=ey(),n=Ta(e)?Aa(e):e;return tz.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||nz.some(a=>(n.willChange||"").includes(a))||rz.some(a=>(n.contain||"").includes(a))}function az(e){let t=vi(e);for(;Ya(t)&&!Ll(t);){if(Jx(t))return t;if(Kp(t))return null;t=vi(t)}return null}function ey(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sz=new Set(["html","body","#document"]);function Ll(e){return sz.has(Ql(e))}function Aa(e){return Qr(e).getComputedStyle(e)}function Xp(e){return Ta(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vi(e){if(Ql(e)==="html")return e;const t=e.assignedSlot||e.parentNode||j2(e)&&e.host||Qa(e);return j2(t)?t.host:t}function mO(e){const t=vi(e);return Ll(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ya(t)&&_d(t)?t:mO(t)}function Vu(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=mO(e),o=s===((a=e.ownerDocument)==null?void 0:a.body),u=Qr(s);if(o){const c=Cv(u);return t.concat(u,u.visualViewport||[],_d(s)?s:[],c&&n?Vu(c):[])}return t.concat(s,Vu(s,[],n))}function Cv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gO(e){const t=Aa(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const s=Ya(e),o=s?e.offsetWidth:n,u=s?e.offsetHeight:a,c=ap(n)!==o||ap(a)!==u;return c&&(n=o,a=u),{width:n,height:a,$:c}}function ty(e){return Ta(e)?e:e.contextElement}function Sl(e){const t=ty(e);if(!Ya(t))return qa(1);const n=t.getBoundingClientRect(),{width:a,height:s,$:o}=gO(t);let u=(o?ap(n.width):n.width)/a,c=(o?ap(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const iz=qa(0);function bO(e){const t=Qr(e);return!ey()||!t.visualViewport?iz:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oz(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Qr(e)?!1:t}function so(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=ty(e);let u=qa(1);t&&(a?Ta(a)&&(u=Sl(a)):u=Sl(e));const c=oz(o,n,a)?bO(o):qa(0);let d=(s.left+c.x)/u.x,h=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(o){const b=Qr(o),x=a&&Ta(a)?Qr(a):a;let w=b,S=Cv(w);for(;S&&a&&x!==w;){const g=Sl(S),y=S.getBoundingClientRect(),_=Aa(S),E=y.left+(S.clientLeft+parseFloat(_.paddingLeft))*g.x,T=y.top+(S.clientTop+parseFloat(_.paddingTop))*g.y;d*=g.x,h*=g.y,p*=g.x,m*=g.y,d+=E,h+=T,w=Qr(S),S=Cv(w)}}return ip({width:p,height:m,x:d,y:h})}function ny(e,t){const n=Xp(e).scrollLeft;return t?t.left+n:so(Qa(e)).left+n}function vO(e,t,n){n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=a.left+t.scrollLeft-(n?0:ny(e,a)),o=a.top+t.scrollTop;return{x:s,y:o}}function lz(e){let{elements:t,rect:n,offsetParent:a,strategy:s}=e;const o=s==="fixed",u=Qa(a),c=t?Kp(t.floating):!1;if(a===u||c&&o)return n;let d={scrollLeft:0,scrollTop:0},h=qa(1);const p=qa(0),m=Ya(a);if((m||!m&&!o)&&((Ql(a)!=="body"||_d(u))&&(d=Xp(a)),Ya(a))){const x=so(a);h=Sl(a),p.x=x.x+a.clientLeft,p.y=x.y+a.clientTop}const b=u&&!m&&!o?vO(u,d,!0):qa(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 cz(e){return Array.from(e.getClientRects())}function uz(e){const t=Qa(e),n=Xp(e),a=e.ownerDocument.body,s=Kr(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),o=Kr(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+ny(e);const c=-n.scrollTop;return Aa(a).direction==="rtl"&&(u+=Kr(t.clientWidth,a.clientWidth)-s),{width:s,height:o,x:u,y:c}}function dz(e,t){const n=Qr(e),a=Qa(e),s=n.visualViewport;let o=a.clientWidth,u=a.clientHeight,c=0,d=0;if(s){o=s.width,u=s.height;const h=ey();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}return{width:o,height:u,x:c,y:d}}const hz=new Set(["absolute","fixed"]);function fz(e,t){const n=so(e,!0,t==="fixed"),a=n.top+e.clientTop,s=n.left+e.clientLeft,o=Ya(e)?Sl(e):qa(1),u=e.clientWidth*o.x,c=e.clientHeight*o.y,d=s*o.x,h=a*o.y;return{width:u,height:c,x:d,y:h}}function M2(e,t,n){let a;if(t==="viewport")a=dz(e,n);else if(t==="document")a=uz(Qa(e));else if(Ta(t))a=fz(t,n);else{const s=bO(e);a={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ip(a)}function xO(e,t){const n=vi(e);return n===t||!Ta(n)||Ll(n)?!1:Aa(n).position==="fixed"||xO(n,t)}function pz(e,t){const n=t.get(e);if(n)return n;let a=Vu(e,[],!1).filter(c=>Ta(c)&&Ql(c)!=="body"),s=null;const o=Aa(e).position==="fixed";let u=o?vi(e):e;for(;Ta(u)&&!Ll(u);){const c=Aa(u),d=Jx(u);!d&&c.position==="fixed"&&(s=null),(o?!d&&!s:!d&&c.position==="static"&&!!s&&hz.has(s.position)||_d(u)&&!d&&xO(e,u))?a=a.filter(p=>p!==u):s=c,u=vi(u)}return t.set(e,a),a}function mz(e){let{element:t,boundary:n,rootBoundary:a,strategy:s}=e;const u=[...n==="clippingAncestors"?Kp(t)?[]:pz(t,this._c):[].concat(n),a],c=u[0],d=u.reduce((h,p)=>{const m=M2(t,p,s);return h.top=Kr(m.top,h.top),h.right=bi(m.right,h.right),h.bottom=bi(m.bottom,h.bottom),h.left=Kr(m.left,h.left),h},M2(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function gz(e){const{width:t,height:n}=gO(e);return{width:t,height:n}}function bz(e,t,n){const a=Ya(t),s=Qa(t),o=n==="fixed",u=so(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=qa(0);function h(){d.x=ny(s)}if(a||!a&&!o)if((Ql(t)!=="body"||_d(s))&&(c=Xp(t)),a){const x=so(t,!0,o,t);d.x=x.x+t.clientLeft,d.y=x.y+t.clientTop}else s&&h();o&&!a&&s&&h();const p=s&&!a&&!o?vO(s,c):qa(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 x0(e){return Aa(e).position==="static"}function F2(e,t){if(!Ya(e)||Aa(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qa(e)===n&&(n=n.ownerDocument.body),n}function yO(e,t){const n=Qr(e);if(Kp(e))return n;if(!Ya(e)){let s=vi(e);for(;s&&!Ll(s);){if(Ta(s)&&!x0(s))return s;s=vi(s)}return n}let a=F2(e,t);for(;a&&J$(a)&&x0(a);)a=F2(a,t);return a&&Ll(a)&&x0(a)&&!Jx(a)?n:a||az(e)||n}const vz=async function(e){const t=this.getOffsetParent||yO,n=this.getDimensions,a=await n(e.floating);return{reference:bz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function xz(e){return Aa(e).direction==="rtl"}const yz={convertOffsetParentRelativeRectToViewportRelativeRect:lz,getDocumentElement:Qa,getClippingRect:mz,getOffsetParent:yO,getElementRects:vz,getClientRects:cz,getDimensions:gz,getScale:Sl,isElement:Ta,isRTL:xz};function EO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ez(e,t){let n=null,a;const s=Qa(e);function o(){var c;clearTimeout(a),(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:x}=h;if(c||t(),!b||!x)return;const w=gf(m),S=gf(s.clientWidth-(p+b)),g=gf(s.clientHeight-(m+x)),y=gf(p),E={rootMargin:-w+"px "+-S+"px "+-g+"px "+-y+"px",threshold:Kr(0,bi(1,d))||1};let T=!0;function k(N){const I=N[0].intersectionRatio;if(I!==d){if(!T)return u();I?u(!1,I):a=setTimeout(()=>{u(!1,1e-7)},1e3)}I===1&&!EO(h,e.getBoundingClientRect())&&u(),T=!1}try{n=new IntersectionObserver(k,{...E,root:s.ownerDocument})}catch{n=new IntersectionObserver(k,E)}n.observe(e)}return u(!0),o}function _z(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=a,h=ty(e),p=s||o?[...h?Vu(h):[],...Vu(t)]:[];p.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const m=h&&c?Ez(h,n):null;let b=-1,x=null;u&&(x=new ResizeObserver(y=>{let[_]=y;_&&_.target===h&&x&&(x.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var E;(E=x)==null||E.observe(t)})),n()}),h&&!d&&x.observe(h),x.observe(t));let w,S=d?so(e):null;d&&g();function g(){const y=so(e);S&&!EO(S,y)&&n(),S=y,w=requestAnimationFrame(g)}return n(),()=>{var y;p.forEach(_=>{s&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),m?.(),(y=x)==null||y.disconnect(),x=null,d&&cancelAnimationFrame(w)}}const Sz=V$,wz=Y$,Cz=G$,Tz=X$,Az=q$,P2=z$,Nz=K$,kz=(e,t,n)=>{const a=new Map,s={platform:yz,...n},o={...s.platform,_c:a};return $$(e,t,{...s,platform:o})};var Rz=typeof document<"u",Dz=function(){},Bf=Rz?C.useLayoutEffect:Dz;function op(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,a,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!op(e[a],t[a]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){const o=s[a];if(!(o==="_owner"&&e.$$typeof)&&!op(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function _O(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function B2(e,t){const n=_O(e);return Math.round(t*n)/n}function y0(e){const t=C.useRef(e);return Bf(()=>{t.current=e}),t}function Iz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:s,elements:{reference:o,floating:u}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[p,m]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=C.useState(a);op(b,a)||x(a);const[w,S]=C.useState(null),[g,y]=C.useState(null),_=C.useCallback(Y=>{Y!==N.current&&(N.current=Y,S(Y))},[]),E=C.useCallback(Y=>{Y!==I.current&&(I.current=Y,y(Y))},[]),T=o||w,k=u||g,N=C.useRef(null),I=C.useRef(null),R=C.useRef(p),M=d!=null,j=y0(d),P=y0(s),z=y0(h),U=C.useCallback(()=>{if(!N.current||!I.current)return;const Y={placement:t,strategy:n,middleware:b};P.current&&(Y.platform=P.current),kz(N.current,I.current,Y).then(F=>{const L={...F,isPositioned:z.current!==!1};G.current&&!op(R.current,L)&&(R.current=L,ql.flushSync(()=>{m(L)}))})},[b,t,n,P,z]);Bf(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,m(Y=>({...Y,isPositioned:!1})))},[h]);const G=C.useRef(!1);Bf(()=>(G.current=!0,()=>{G.current=!1}),[]),Bf(()=>{if(T&&(N.current=T),k&&(I.current=k),T&&k){if(j.current)return j.current(T,k,U);U()}},[T,k,U,j,M]);const J=C.useMemo(()=>({reference:N,floating:I,setReference:_,setFloating:E}),[_,E]),B=C.useMemo(()=>({reference:T,floating:k}),[T,k]),q=C.useMemo(()=>{const Y={position:n,left:0,top:0};if(!B.floating)return Y;const F=B2(B.floating,p.x),L=B2(B.floating,p.y);return c?{...Y,transform:"translate("+F+"px, "+L+"px)",..._O(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:L}},[n,c,B.floating,p.x,p.y]);return C.useMemo(()=>({...p,update:U,refs:J,elements:B,floatingStyles:q}),[p,U,J,B,q])}const Oz=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:s}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?P2({element:a.current,padding:s}).fn(n):{}:a?P2({element:a,padding:s}).fn(n):{}}}},Lz=(e,t)=>({...Sz(e),options:[e,t]}),jz=(e,t)=>({...wz(e),options:[e,t]}),Mz=(e,t)=>({...Nz(e),options:[e,t]}),Fz=(e,t)=>({...Cz(e),options:[e,t]}),Pz=(e,t)=>({...Tz(e),options:[e,t]}),Bz=(e,t)=>({...Az(e),options:[e,t]}),Uz=(e,t)=>({...Oz(e),options:[e,t]});var Hz="Arrow",SO=C.forwardRef((e,t)=>{const{children:n,width:a=10,height:s=5,...o}=e;return r.jsx(ot.svg,{...o,ref:t,width:a,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})});SO.displayName=Hz;var $z=SO;function ry(e){const[t,n]=C.useState(void 0);return nr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[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 a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var ay="Popper",[wO,Jl]=Ar(ay),[zz,CO]=wO(ay),TO=e=>{const{__scopePopper:t,children:n}=e,[a,s]=C.useState(null);return r.jsx(zz,{scope:t,anchor:a,onAnchorChange:s,children:n})};TO.displayName=ay;var AO="PopperAnchor",NO=C.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...s}=e,o=CO(AO,n),u=C.useRef(null),c=Et(t,u),d=C.useRef(null);return C.useEffect(()=>{const h=d.current;d.current=a?.current||u.current,h!==d.current&&o.onAnchorChange(d.current)}),a?null:r.jsx(ot.div,{...s,ref:c})});NO.displayName=AO;var sy="PopperContent",[Gz,qz]=wO(sy),kO=C.forwardRef((e,t)=>{const{__scopePopper:n,side:a="bottom",sideOffset:s=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:x="optimized",onPlaced:w,...S}=e,g=CO(sy,n),[y,_]=C.useState(null),E=Et(t,Z=>_(Z)),[T,k]=C.useState(null),N=ry(T),I=N?.width??0,R=N?.height??0,M=a+(o!=="center"?"-"+o:""),j=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},P=Array.isArray(h)?h:[h],z=P.length>0,U={padding:j,boundary:P.filter(Vz),altBoundary:z},{refs:G,floatingStyles:J,placement:B,isPositioned:q,middlewareData:Y}=Iz({strategy:"fixed",placement:M,whileElementsMounted:(...Z)=>_z(...Z,{animationFrame:x==="always"}),elements:{reference:g.anchor},middleware:[Lz({mainAxis:s+R,alignmentAxis:u}),d&&jz({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Mz():void 0,...U}),d&&Fz({...U}),Pz({...U,apply:({elements:Z,rects:W,availableWidth:le,availableHeight:he})=>{const{width:ce,height:fe}=W.reference,Ue=Z.floating.style;Ue.setProperty("--radix-popper-available-width",`${le}px`),Ue.setProperty("--radix-popper-available-height",`${he}px`),Ue.setProperty("--radix-popper-anchor-width",`${ce}px`),Ue.setProperty("--radix-popper-anchor-height",`${fe}px`)}}),T&&Uz({element:T,padding:c}),Yz({arrowWidth:I,arrowHeight:R}),b&&Bz({strategy:"referenceHidden",...U})]}),[F,L]=IO(B),V=kn(w);nr(()=>{q&&V?.()},[q,V]);const Q=Y.arrow?.x,$=Y.arrow?.y,ee=Y.arrow?.centerOffset!==0,[ae,oe]=C.useState();return nr(()=>{y&&oe(window.getComputedStyle(y).zIndex)},[y]),r.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:q?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(Gz,{scope:n,placedSide:F,onArrowChange:k,arrowX:Q,arrowY:$,shouldHideArrow:ee,children:r.jsx(ot.div,{"data-side":F,"data-align":L,...S,ref:E,style:{...S.style,animation:q?void 0:"none"}})})})});kO.displayName=sy;var RO="PopperArrow",Wz={top:"bottom",right:"left",bottom:"top",left:"right"},DO=C.forwardRef(function(t,n){const{__scopePopper:a,...s}=t,o=qz(RO,a),u=Wz[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($z,{...s,ref:n,style:{...s.style,display:"block"}})})});DO.displayName=RO;function Vz(e){return e!==null}var Yz=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:s}=t,u=s.arrow?.centerOffset!==0,c=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[h,p]=IO(n),m={start:"0%",center:"50%",end:"100%"}[p],b=(s.arrow?.x??0)+c/2,x=(s.arrow?.y??0)+d/2;let w="",S="";return h==="bottom"?(w=u?m:`${b}px`,S=`${-d}px`):h==="top"?(w=u?m:`${b}px`,S=`${a.floating.height+d}px`):h==="right"?(w=`${-d}px`,S=u?m:`${x}px`):h==="left"&&(w=`${a.floating.width+d}px`,S=u?m:`${x}px`),{data:{x:w,y:S}}}});function IO(e){const[t,n="center"]=e.split("-");return[t,n]}var iy=TO,oy=NO,ly=kO,cy=DO,[Zp,Due]=Ar("Tooltip",[Jl]),Qp=Jl(),OO="TooltipProvider",Kz=700,Tv="tooltip.open",[Xz,uy]=Zp(OO),LO=e=>{const{__scopeTooltip:t,delayDuration:n=Kz,skipDelayDuration:a=300,disableHoverableContent:s=!1,children:o}=e,u=C.useRef(!0),c=C.useRef(!1),d=C.useRef(0);return C.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),r.jsx(Xz,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:C.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:C.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,a)},[a]),isPointerInTransitRef:c,onPointerInTransitChange:C.useCallback(h=>{c.current=h},[]),disableHoverableContent:s,children:o})};LO.displayName=OO;var Yu="Tooltip",[Zz,Jp]=Zp(Yu),jO=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:s,onOpenChange:o,disableHoverableContent:u,delayDuration:c}=e,d=uy(Yu,e.__scopeTooltip),h=Qp(t),[p,m]=C.useState(null),b=wa(),x=C.useRef(0),w=u??d.disableHoverableContent,S=c??d.delayDuration,g=C.useRef(!1),[y,_]=Va({prop:a,defaultProp:s??!1,onChange:I=>{I?(d.onOpen(),document.dispatchEvent(new CustomEvent(Tv))):d.onClose(),o?.(I)},caller:Yu}),E=C.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),T=C.useCallback(()=>{window.clearTimeout(x.current),x.current=0,g.current=!1,_(!0)},[_]),k=C.useCallback(()=>{window.clearTimeout(x.current),x.current=0,_(!1)},[_]),N=C.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{g.current=!0,_(!0),x.current=0},S)},[S,_]);return C.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),r.jsx(iy,{...h,children:r.jsx(Zz,{scope:t,contentId:b,open:y,stateAttribute:E,trigger:p,onTriggerChange:m,onTriggerEnter:C.useCallback(()=>{d.isOpenDelayedRef.current?N():T()},[d.isOpenDelayedRef,N,T]),onTriggerLeave:C.useCallback(()=>{w?k():(window.clearTimeout(x.current),x.current=0)},[k,w]),onOpen:T,onClose:k,disableHoverableContent:w,children:n})})};jO.displayName=Yu;var Av="TooltipTrigger",MO=C.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=Jp(Av,n),o=uy(Av,n),u=Qp(n),c=C.useRef(null),d=Et(t,c,s.onTriggerChange),h=C.useRef(!1),p=C.useRef(!1),m=C.useCallback(()=>h.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),r.jsx(oy,{asChild:!0,...u,children:r.jsx(ot.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...a,ref:d,onPointerMove:Ge(e.onPointerMove,b=>{b.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ge(e.onPointerLeave,()=>{s.onTriggerLeave(),p.current=!1}),onPointerDown:Ge(e.onPointerDown,()=>{s.open&&s.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Ge(e.onFocus,()=>{h.current||s.onOpen()}),onBlur:Ge(e.onBlur,s.onClose),onClick:Ge(e.onClick,s.onClose)})})});MO.displayName=Av;var Qz="TooltipPortal",[Iue,Jz]=Zp(Qz,{forceMount:void 0}),jl="TooltipContent",FO=C.forwardRef((e,t)=>{const n=Jz(jl,e.__scopeTooltip),{forceMount:a=n.forceMount,side:s="top",...o}=e,u=Jp(jl,e.__scopeTooltip);return r.jsx(ur,{present:a||u.open,children:u.disableHoverableContent?r.jsx(PO,{side:s,...o,ref:t}):r.jsx(eG,{side:s,...o,ref:t})})}),eG=C.forwardRef((e,t)=>{const n=Jp(jl,e.__scopeTooltip),a=uy(jl,e.__scopeTooltip),s=C.useRef(null),o=Et(t,s),[u,c]=C.useState(null),{trigger:d,onClose:h}=n,p=s.current,{onPointerInTransitChange:m}=a,b=C.useCallback(()=>{c(null),m(!1)},[m]),x=C.useCallback((w,S)=>{const g=w.currentTarget,y={x:w.clientX,y:w.clientY},_=sG(y,g.getBoundingClientRect()),E=iG(y,_),T=oG(S.getBoundingClientRect()),k=cG([...E,...T]);c(k),m(!0)},[m]);return C.useEffect(()=>()=>b(),[b]),C.useEffect(()=>{if(d&&p){const w=g=>x(g,p),S=g=>x(g,d);return d.addEventListener("pointerleave",w),p.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",S)}}},[d,p,x,b]),C.useEffect(()=>{if(u){const w=S=>{const g=S.target,y={x:S.clientX,y:S.clientY},_=d?.contains(g)||p?.contains(g),E=!lG(y,u);_?b():E&&(b(),h())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,p,u,h,b]),r.jsx(PO,{...e,ref:o})}),[tG,nG]=Zp(Yu,{isInside:!1}),rG=LD("TooltipContent"),PO=C.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:u,...c}=e,d=Jp(jl,n),h=Qp(n),{onClose:p}=d;return C.useEffect(()=>(document.addEventListener(Tv,p),()=>document.removeEventListener(Tv,p)),[p]),C.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(Vl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:r.jsxs(ly,{"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(rG,{children:a}),r.jsx(tG,{scope:n,isInside:!0,children:r.jsx(i7,{id:d.contentId,role:"tooltip",children:s||a})})]})})});FO.displayName=jl;var BO="TooltipArrow",aG=C.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=Qp(n);return nG(BO,n).isInside?null:r.jsx(cy,{...s,...a,ref:t})});aG.displayName=BO;function sG(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,a,s,o)){case o:return"left";case s:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function iG(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function oG(e){const{top:t,right:n,bottom:a,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:a},{x:s,y:a}]}function lG(e,t){const{x:n,y:a}=e;let s=!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>a!=b>a&&n<(m-h)*(a-p)/(b-p)+h&&(s=!s)}return s}function cG(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),uG(t)}function uG(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const s=e[a];for(;t.length>=2;){const o=t[t.length-1],u=t[t.length-2];if((o.x-u.x)*(s.y-u.y)>=(o.y-u.y)*(s.x-u.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const s=e[a];for(;n.length>=2;){const o=n[n.length-1],u=n[n.length-2];if((o.x-u.x)*(s.y-u.y)>=(o.y-u.y)*(s.x-u.x))n.pop();else break}n.push(s)}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 dG=LO,hG=jO,fG=MO,UO=FO;const pG=dG,mG=hG,gG=fG,HO=C.forwardRef(({className:e,sideOffset:t=4,...n},a)=>r.jsx(UO,{ref:a,sideOffset:t,className:Te("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}));HO.displayName=UO.displayName;const bG="sidebar_state",vG=3600*24*7,xG="16rem",yG="18rem",EG="3rem",_G="b",$O=C.createContext(null);function em(){const e=C.useContext($O);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const zO=C.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:a,style:s,children:o,...u},c)=>{const d=OI(),[h,p]=C.useState(!1),[m,b]=C.useState(e),x=t??m,w=C.useCallback(_=>{const E=typeof _=="function"?_(x):_;n?n(E):b(E),document.cookie=`${bG}=${E}; path=/; max-age=${vG}`},[n,x]),S=C.useCallback(()=>d?p(_=>!_):w(_=>!_),[d,w,p]);C.useEffect(()=>{const _=E=>{E.key===_G&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),S())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[S]);const g=x?"expanded":"collapsed",y=C.useMemo(()=>({state:g,open:x,setOpen:w,isMobile:d,openMobile:h,setOpenMobile:p,toggleSidebar:S}),[g,x,w,d,h,p,S]);return r.jsx($O.Provider,{value:y,children:r.jsx(pG,{delayDuration:0,children:r.jsx("div",{style:{"--sidebar-width":xG,"--sidebar-width-icon":EG,...s},className:Te("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",a),ref:c,...u,children:o})})})});zO.displayName="SidebarProvider";const GO=C.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:a,children:s,...o},u)=>{const{isMobile:c,state:d,openMobile:h,setOpenMobile:p}=em();return n==="none"?r.jsx("div",{className:Te("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",a),ref:u,...o,children:s}):c?r.jsx(cO,{open:h,onOpenChange:p,...o,children:r.jsxs(Vx,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":yG},side:e,children:[r.jsxs(Yx,{className:"sr-only",children:[r.jsx(Kx,{children:"Sidebar"}),r.jsx(dO,{children:"Displays the mobile sidebar."})]}),r.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):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:Te("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:Te("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",a),...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:s})})]})});GO.displayName="Sidebar";const qO=C.forwardRef(({className:e,onClick:t,...n},a)=>{const{toggleSidebar:s}=em();return r.jsxs(ne,{ref:a,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Te("h-7 w-7",e),onClick:o=>{t?.(o),s()},...n,children:[r.jsx(r9,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});qO.displayName="SidebarTrigger";const SG=C.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:a}=em();return r.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:Te("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})});SG.displayName="SidebarRail";const WO=C.forwardRef(({className:e,...t},n)=>r.jsx("main",{ref:n,className:Te("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}));WO.displayName="SidebarInset";const wG=C.forwardRef(({className:e,...t},n)=>r.jsx(We,{ref:n,"data-sidebar":"input",className:Te("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));wG.displayName="SidebarInput";const VO=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"header",className:Te("flex flex-col gap-2 p-2",e),...t}));VO.displayName="SidebarHeader";const YO=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"footer",className:Te("flex flex-col gap-2 p-2",e),...t}));YO.displayName="SidebarFooter";const CG=C.forwardRef(({className:e,...t},n)=>r.jsx(ea,{ref:n,"data-sidebar":"separator",className:Te("mx-2 w-auto bg-sidebar-border",e),...t}));CG.displayName="SidebarSeparator";const KO=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"content",className:Te("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));KO.displayName="SidebarContent";const Uf=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group",className:Te("relative flex w-full min-w-0 flex-col p-2",e),...t}));Uf.displayName="SidebarGroup";const Hf=C.forwardRef(({className:e,asChild:t=!1,...n},a)=>{const s=t?Wl:"div";return r.jsx(s,{ref:a,"data-sidebar":"group-label",className:Te("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})});Hf.displayName="SidebarGroupLabel";const TG=C.forwardRef(({className:e,asChild:t=!1,...n},a)=>{const s=t?Wl:"button";return r.jsx(s,{ref:a,"data-sidebar":"group-action",className:Te("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})});TG.displayName="SidebarGroupAction";const $f=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group-content",className:Te("w-full text-sm",e),...t}));$f.displayName="SidebarGroupContent";const bl=C.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu",className:Te("flex w-full min-w-0 flex-col gap-1",e),...t}));bl.displayName="SidebarMenu";const vl=C.forwardRef(({className:e,...t},n)=>r.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Te("group/menu-item relative",e),...t}));vl.displayName="SidebarMenuItem";const AG=Yl("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"}}),xl=C.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:a="default",tooltip:s,className:o,...u},c)=>{const d=e?Wl:"button",{isMobile:h,state:p}=em(),m=r.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":a,"data-active":t,className:Te(AG({variant:n,size:a}),o),...u});return s?(typeof s=="string"&&(s={children:s}),r.jsxs(mG,{children:[r.jsx(gG,{asChild:!0,children:m}),r.jsx(HO,{side:"right",align:"center",hidden:p!=="collapsed"||h,...s})]})):m});xl.displayName="SidebarMenuButton";const NG=C.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...a},s)=>{const o=t?Wl:"button";return r.jsx(o,{ref:s,"data-sidebar":"menu-action",className:Te("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),...a})});NG.displayName="SidebarMenuAction";const Nv=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Te("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}));Nv.displayName="SidebarMenuBadge";const kG=C.forwardRef(({className:e,showIcon:t=!1,...n},a)=>{const s=C.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return r.jsxs("div",{ref:a,"data-sidebar":"menu-skeleton",className:Te("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&r.jsx(k2,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r.jsx(k2,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});kG.displayName="SidebarMenuSkeleton";const RG=C.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Te("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}));RG.displayName="SidebarMenuSub";const DG=C.forwardRef(({...e},t)=>r.jsx("li",{ref:t,...e}));DG.displayName="SidebarMenuSubItem";const IG=C.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:a,...s},o)=>{const u=e?Wl:"a";return r.jsx(u,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Te("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",a),...s})});IG.displayName="SidebarMenuSubButton";const OG="1.0.65",LG={version:OG};function jG({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 MG=[{title:"Home",url:"/",icon:LU},{title:"Proposals",url:"/proposals",icon:Ru},{title:"Agents",url:"/agents",icon:Zr},{title:"Code",url:"/code",icon:ci},{title:"Utilities",url:"/utilities",icon:gI}],FG=[{title:"Overview",url:"/context/project",icon:pa},{title:"Architecture",url:"/context/architecture",icon:qu},{title:"Knowledge",url:"/context/knowledge",icon:z7},{title:"Resources",url:"/resources",icon:Hp}],PG=[{title:"Source Control",url:"/git",icon:li},{title:"Terminal",url:"/terminal",icon:Ss},{title:"Schedule",url:"/schedule",icon:oI}],BG=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:t9,external:!0},{title:"Settings",url:"/settings",icon:Ol}];function UG(){const{badges:e}=md();return r.jsxs(GO,{className:"bg-sidebar border-r border-sidebar-border",children:[r.jsx(VO,{children:r.jsx(bl,{children:r.jsx(vl,{children:r.jsx(xl,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:r.jsxs(et,{to:"/",children:[r.jsx(jG,{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",LG.version]})]})]})})})})}),r.jsxs(KO,{children:[r.jsxs(Uf,{children:[r.jsx(Hf,{children:"Main"}),r.jsx($f,{children:r.jsx(bl,{children:MG.map(t=>r.jsxs(vl,{children:[r.jsx(xl,{asChild:!0,children:r.jsxs(et,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),t.title==="Code"&&e.codeSessions>0&&r.jsx(Nv,{className:"bg-blue-600 text-white dark:bg-blue-500",children:e.codeSessions})]},t.title))})})]}),r.jsxs(Uf,{children:[r.jsx(Hf,{children:"Project"}),r.jsx($f,{children:r.jsx(bl,{children:FG.map(t=>r.jsx(vl,{children:r.jsx(xl,{asChild:!0,children:r.jsxs(et,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]}),r.jsxs(Uf,{children:[r.jsx(Hf,{children:"System"}),r.jsx($f,{children:r.jsx(bl,{children:PG.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(vl,{children:[r.jsx(xl,{asChild:!0,children:r.jsxs(et,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),n>0&&r.jsx(Nv,{className:"bg-blue-600 text-white dark:bg-blue-500",children:n})]},t.title)})})})]})]}),r.jsx(YO,{children:r.jsx(bl,{children:BG.map(t=>r.jsx(vl,{children:r.jsx(xl,{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(et,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]})}function kv(e,[t,n]){return Math.min(n,Math.max(t,e))}var HG=C.createContext(void 0);function ec(e){const t=C.useContext(HG);return e||t||"ltr"}function dy(e){const t=C.useRef({value:e,previous:e});return C.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var $G=[" ","Enter","ArrowUp","ArrowDown"],zG=[" ","Enter"],io="Select",[tm,nm,GG]=Mp(io),[tc,Oue]=Ar(io,[GG,Jl]),rm=Jl(),[qG,Ei]=tc(io),[WG,VG]=tc(io),XO=e=>{const{__scopeSelect:t,children:n,open:a,defaultOpen:s,onOpenChange:o,value:u,defaultValue:c,onValueChange:d,dir:h,name:p,autoComplete:m,disabled:b,required:x,form:w}=e,S=rm(t),[g,y]=C.useState(null),[_,E]=C.useState(null),[T,k]=C.useState(!1),N=ec(h),[I,R]=Va({prop:a,defaultProp:s??!1,onChange:o,caller:io}),[M,j]=Va({prop:u,defaultProp:c,onChange:d,caller:io}),P=C.useRef(null),z=g?w||!!g.closest("form"):!0,[U,G]=C.useState(new Set),J=Array.from(U).map(B=>B.props.value).join(";");return r.jsx(iy,{...S,children:r.jsxs(qG,{required:x,scope:t,trigger:g,onTriggerChange:y,valueNode:_,onValueNodeChange:E,valueNodeHasChildren:T,onValueNodeHasChildrenChange:k,contentId:wa(),value:M,onValueChange:j,open:I,onOpenChange:R,dir:N,triggerPointerDownPosRef:P,disabled:b,children:[r.jsx(tm.Provider,{scope:t,children:r.jsx(WG,{scope:e.__scopeSelect,onNativeOptionAdd:C.useCallback(B=>{G(q=>new Set(q).add(B))},[]),onNativeOptionRemove:C.useCallback(B=>{G(q=>{const Y=new Set(q);return Y.delete(B),Y})},[]),children:n})}),z?r.jsxs(y3,{"aria-hidden":!0,required:x,tabIndex:-1,name:p,autoComplete:m,value:M,onChange:B=>j(B.target.value),disabled:b,form:w,children:[M===void 0?r.jsx("option",{value:""}):null,Array.from(U)]},J):null]})})};XO.displayName=io;var ZO="SelectTrigger",QO=C.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...s}=e,o=rm(n),u=Ei(ZO,n),c=u.disabled||a,d=Et(t,u.onTriggerChange),h=nm(n),p=C.useRef("touch"),[m,b,x]=_3(S=>{const g=h().filter(E=>!E.disabled),y=g.find(E=>E.value===u.value),_=S3(g,S,y);_!==void 0&&u.onValueChange(_.value)}),w=S=>{c||(u.onOpenChange(!0),x()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return r.jsx(oy,{asChild:!0,...o,children:r.jsx(ot.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":E3(u.value)?"":void 0,...s,ref:d,onClick:Ge(s.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&w(S)}),onPointerDown:Ge(s.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"&&(w(S),S.preventDefault())}),onKeyDown:Ge(s.onKeyDown,S=>{const g=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&b(S.key),!(g&&S.key===" ")&&$G.includes(S.key)&&(w(),S.preventDefault())})})})});QO.displayName=ZO;var JO="SelectValue",e3=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,children:o,placeholder:u="",...c}=e,d=Ei(JO,n),{onValueNodeHasChildrenChange:h}=d,p=o!==void 0,m=Et(t,d.onValueNodeChange);return nr(()=>{h(p)},[h,p]),r.jsx(ot.span,{...c,ref:m,style:{pointerEvents:"none"},children:E3(d.value)?r.jsx(r.Fragment,{children:u}):o})});e3.displayName=JO;var YG="SelectIcon",t3=C.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...s}=e;return r.jsx(ot.span,{"aria-hidden":!0,...s,ref:t,children:a||"▼"})});t3.displayName=YG;var KG="SelectPortal",n3=e=>r.jsx(gd,{asChild:!0,...e});n3.displayName=KG;var oo="SelectContent",r3=C.forwardRef((e,t)=>{const n=Ei(oo,e.__scopeSelect),[a,s]=C.useState();if(nr(()=>{s(new DocumentFragment)},[]),!n.open){const o=a;return o?ql.createPortal(r.jsx(a3,{scope:e.__scopeSelect,children:r.jsx(tm.Slot,{scope:e.__scopeSelect,children:r.jsx("div",{children:e.children})})}),o):null}return r.jsx(s3,{...e,ref:t})});r3.displayName=oo;var _a=10,[a3,_i]=tc(oo),XG="SelectContentImpl",ZG=ro("SelectContent.RemoveScroll"),s3=C.forwardRef((e,t)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:u,side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:b,collisionPadding:x,sticky:w,hideWhenDetached:S,avoidCollisions:g,...y}=e,_=Ei(oo,n),[E,T]=C.useState(null),[k,N]=C.useState(null),I=Et(t,Z=>T(Z)),[R,M]=C.useState(null),[j,P]=C.useState(null),z=nm(n),[U,G]=C.useState(!1),J=C.useRef(!1);C.useEffect(()=>{if(E)return Hx(E)},[E]),Ux();const B=C.useCallback(Z=>{const[W,...le]=z().map(fe=>fe.ref.current),[he]=le.slice(-1),ce=document.activeElement;for(const fe of Z)if(fe===ce||(fe?.scrollIntoView({block:"nearest"}),fe===W&&k&&(k.scrollTop=0),fe===he&&k&&(k.scrollTop=k.scrollHeight),fe?.focus(),document.activeElement!==ce))return},[z,k]),q=C.useCallback(()=>B([R,E]),[B,R,E]);C.useEffect(()=>{U&&q()},[U,q]);const{onOpenChange:Y,triggerPointerDownPosRef:F}=_;C.useEffect(()=>{if(E){let Z={x:0,y:0};const W=he=>{Z={x:Math.abs(Math.round(he.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(he.pageY)-(F.current?.y??0))}},le=he=>{Z.x<=10&&Z.y<=10?he.preventDefault():E.contains(he.target)||Y(!1),document.removeEventListener("pointermove",W),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",le,{capture:!0})}}},[E,Y,F]),C.useEffect(()=>{const Z=()=>Y(!1);return window.addEventListener("blur",Z),window.addEventListener("resize",Z),()=>{window.removeEventListener("blur",Z),window.removeEventListener("resize",Z)}},[Y]);const[L,V]=_3(Z=>{const W=z().filter(ce=>!ce.disabled),le=W.find(ce=>ce.ref.current===document.activeElement),he=S3(W,Z,le);he&&setTimeout(()=>he.ref.current.focus())}),Q=C.useCallback((Z,W,le)=>{const he=!J.current&&!le;(_.value!==void 0&&_.value===W||he)&&(M(Z),he&&(J.current=!0))},[_.value]),$=C.useCallback(()=>E?.focus(),[E]),ee=C.useCallback((Z,W,le)=>{const he=!J.current&&!le;(_.value!==void 0&&_.value===W||he)&&P(Z)},[_.value]),ae=a==="popper"?Rv:i3,oe=ae===Rv?{side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:b,collisionPadding:x,sticky:w,hideWhenDetached:S,avoidCollisions:g}:{};return r.jsx(a3,{scope:n,content:E,viewport:k,onViewportChange:N,itemRefCallback:Q,selectedItem:R,onItemLeave:$,itemTextRefCallback:ee,focusSelectedItem:q,selectedItemText:j,position:a,isPositioned:U,searchRef:L,children:r.jsx(qp,{as:ZG,allowPinchZoom:!0,children:r.jsx(zp,{asChild:!0,trapped:_.open,onMountAutoFocus:Z=>{Z.preventDefault()},onUnmountAutoFocus:Ge(s,Z=>{_.trigger?.focus({preventScroll:!0}),Z.preventDefault()}),children:r.jsx(Vl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:Z=>Z.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:r.jsx(ae,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:Z=>Z.preventDefault(),...y,...oe,onPlaced:()=>G(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Ge(y.onKeyDown,Z=>{const W=Z.ctrlKey||Z.altKey||Z.metaKey;if(Z.key==="Tab"&&Z.preventDefault(),!W&&Z.key.length===1&&V(Z.key),["ArrowUp","ArrowDown","Home","End"].includes(Z.key)){let he=z().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(Z.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes(Z.key)){const ce=Z.target,fe=he.indexOf(ce);he=he.slice(fe+1)}setTimeout(()=>B(he)),Z.preventDefault()}})})})})})})});s3.displayName=XG;var QG="SelectItemAlignedPosition",i3=C.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...s}=e,o=Ei(oo,n),u=_i(oo,n),[c,d]=C.useState(null),[h,p]=C.useState(null),m=Et(t,I=>p(I)),b=nm(n),x=C.useRef(!1),w=C.useRef(!0),{viewport:S,selectedItem:g,selectedItemText:y,focusSelectedItem:_}=u,E=C.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&h&&S&&g&&y){const I=o.trigger.getBoundingClientRect(),R=h.getBoundingClientRect(),M=o.valueNode.getBoundingClientRect(),j=y.getBoundingClientRect();if(o.dir!=="rtl"){const ce=j.left-R.left,fe=M.left-ce,Ue=I.left-fe,Re=I.width+Ue,it=Math.max(Re,R.width),lt=window.innerWidth-_a,Oe=kv(fe,[_a,Math.max(_a,lt-it)]);c.style.minWidth=Re+"px",c.style.left=Oe+"px"}else{const ce=R.right-j.right,fe=window.innerWidth-M.right-ce,Ue=window.innerWidth-I.right-fe,Re=I.width+Ue,it=Math.max(Re,R.width),lt=window.innerWidth-_a,Oe=kv(fe,[_a,Math.max(_a,lt-it)]);c.style.minWidth=Re+"px",c.style.right=Oe+"px"}const P=b(),z=window.innerHeight-_a*2,U=S.scrollHeight,G=window.getComputedStyle(h),J=parseInt(G.borderTopWidth,10),B=parseInt(G.paddingTop,10),q=parseInt(G.borderBottomWidth,10),Y=parseInt(G.paddingBottom,10),F=J+B+U+Y+q,L=Math.min(g.offsetHeight*5,F),V=window.getComputedStyle(S),Q=parseInt(V.paddingTop,10),$=parseInt(V.paddingBottom,10),ee=I.top+I.height/2-_a,ae=z-ee,oe=g.offsetHeight/2,Z=g.offsetTop+oe,W=J+B+Z,le=F-W;if(W<=ee){const ce=P.length>0&&g===P[P.length-1].ref.current;c.style.bottom="0px";const fe=h.clientHeight-S.offsetTop-S.offsetHeight,Ue=Math.max(ae,oe+(ce?$:0)+fe+q),Re=W+Ue;c.style.height=Re+"px"}else{const ce=P.length>0&&g===P[0].ref.current;c.style.top="0px";const Ue=Math.max(ee,J+S.offsetTop+(ce?Q:0)+oe)+le;c.style.height=Ue+"px",S.scrollTop=W-ee+S.offsetTop}c.style.margin=`${_a}px 0`,c.style.minHeight=L+"px",c.style.maxHeight=z+"px",a?.(),requestAnimationFrame(()=>x.current=!0)}},[b,o.trigger,o.valueNode,c,h,S,g,y,o.dir,a]);nr(()=>E(),[E]);const[T,k]=C.useState();nr(()=>{h&&k(window.getComputedStyle(h).zIndex)},[h]);const N=C.useCallback(I=>{I&&w.current===!0&&(E(),_?.(),w.current=!1)},[E,_]);return r.jsx(eq,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:x,onScrollButtonChange:N,children:r.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:r.jsx(ot.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});i3.displayName=QG;var JG="SelectPopperPosition",Rv=C.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:s=_a,...o}=e,u=rm(n);return r.jsx(ly,{...u,...o,ref:t,align:a,collisionPadding:s,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)"}})});Rv.displayName=JG;var[eq,hy]=tc(oo,{}),Dv="SelectViewport",o3=C.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...s}=e,o=_i(Dv,n),u=hy(Dv,n),c=Et(t,o.onViewportChange),d=C.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:a}),r.jsx(tm.Slot,{scope:n,children:r.jsx(ot.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Ge(s.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:b}=u;if(b?.current&&m){const x=Math.abs(d.current-p.scrollTop);if(x>0){const w=window.innerHeight-_a*2,S=parseFloat(m.style.minHeight),g=parseFloat(m.style.height),y=Math.max(S,g);if(y<w){const _=y+x,E=Math.min(w,_),T=_-E;m.style.height=E+"px",m.style.bottom==="0px"&&(p.scrollTop=T>0?T:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});o3.displayName=Dv;var l3="SelectGroup",[tq,nq]=tc(l3),rq=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=wa();return r.jsx(tq,{scope:n,id:s,children:r.jsx(ot.div,{role:"group","aria-labelledby":s,...a,ref:t})})});rq.displayName=l3;var c3="SelectLabel",u3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=nq(c3,n);return r.jsx(ot.div,{id:s.id,...a,ref:t})});u3.displayName=c3;var lp="SelectItem",[aq,d3]=tc(lp),h3=C.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:s=!1,textValue:o,...u}=e,c=Ei(lp,n),d=_i(lp,n),h=c.value===a,[p,m]=C.useState(o??""),[b,x]=C.useState(!1),w=Et(t,_=>d.itemRefCallback?.(_,a,s)),S=wa(),g=C.useRef("touch"),y=()=>{s||(c.onValueChange(a),c.onOpenChange(!1))};if(a==="")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(aq,{scope:n,value:a,disabled:s,textId:S,isSelected:h,onItemTextChange:C.useCallback(_=>{m(E=>E||(_?.textContent??"").trim())},[]),children:r.jsx(tm.ItemSlot,{scope:n,value:a,disabled:s,textValue:p,children:r.jsx(ot.div,{role:"option","aria-labelledby":S,"data-highlighted":b?"":void 0,"aria-selected":h&&b,"data-state":h?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...u,ref:w,onFocus:Ge(u.onFocus,()=>x(!0)),onBlur:Ge(u.onBlur,()=>x(!1)),onClick:Ge(u.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:Ge(u.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:Ge(u.onPointerDown,_=>{g.current=_.pointerType}),onPointerMove:Ge(u.onPointerMove,_=>{g.current=_.pointerType,s?d.onItemLeave?.():g.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ge(u.onPointerLeave,_=>{_.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Ge(u.onKeyDown,_=>{d.searchRef?.current!==""&&_.key===" "||(zG.includes(_.key)&&y(),_.key===" "&&_.preventDefault())})})})})});h3.displayName=lp;var Cu="SelectItemText",f3=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,...o}=e,u=Ei(Cu,n),c=_i(Cu,n),d=d3(Cu,n),h=VG(Cu,n),[p,m]=C.useState(null),b=Et(t,y=>m(y),d.onItemTextChange,y=>c.itemTextRefCallback?.(y,d.value,d.disabled)),x=p?.textContent,w=C.useMemo(()=>r.jsx("option",{value:d.value,disabled:d.disabled,children:x},d.value),[d.disabled,d.value,x]),{onNativeOptionAdd:S,onNativeOptionRemove:g}=h;return nr(()=>(S(w),()=>g(w)),[S,g,w]),r.jsxs(r.Fragment,{children:[r.jsx(ot.span,{id:d.textId,...o,ref:b}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?ql.createPortal(o.children,u.valueNode):null]})});f3.displayName=Cu;var p3="SelectItemIndicator",m3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return d3(p3,n).isSelected?r.jsx(ot.span,{"aria-hidden":!0,...a,ref:t}):null});m3.displayName=p3;var Iv="SelectScrollUpButton",g3=C.forwardRef((e,t)=>{const n=_i(Iv,e.__scopeSelect),a=hy(Iv,e.__scopeSelect),[s,o]=C.useState(!1),u=Et(t,a.onScrollButtonChange);return nr(()=>{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]),s?r.jsx(v3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});g3.displayName=Iv;var Ov="SelectScrollDownButton",b3=C.forwardRef((e,t)=>{const n=_i(Ov,e.__scopeSelect),a=hy(Ov,e.__scopeSelect),[s,o]=C.useState(!1),u=Et(t,a.onScrollButtonChange);return nr(()=>{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]),s?r.jsx(v3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});b3.displayName=Ov;var v3=C.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...s}=e,o=_i("SelectScrollButton",n),u=C.useRef(null),c=nm(n),d=C.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return C.useEffect(()=>()=>d(),[d]),nr(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),r.jsx(ot.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:Ge(s.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(a,50))}),onPointerMove:Ge(s.onPointerMove,()=>{o.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(a,50))}),onPointerLeave:Ge(s.onPointerLeave,()=>{d()})})}),sq="SelectSeparator",x3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return r.jsx(ot.div,{"aria-hidden":!0,...a,ref:t})});x3.displayName=sq;var Lv="SelectArrow",iq=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=rm(n),o=Ei(Lv,n),u=_i(Lv,n);return o.open&&u.position==="popper"?r.jsx(cy,{...s,...a,ref:t}):null});iq.displayName=Lv;var oq="SelectBubbleInput",y3=C.forwardRef(({__scopeSelect:e,value:t,...n},a)=>{const s=C.useRef(null),o=Et(a,s),u=dy(t);return C.useEffect(()=>{const c=s.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(ot.select,{...n,style:{...PD,...n.style},ref:o,defaultValue:t})});y3.displayName=oq;function E3(e){return e===""||e===void 0}function _3(e){const t=kn(e),n=C.useRef(""),a=C.useRef(0),s=C.useCallback(u=>{const c=n.current+u;t(c),(function d(h){n.current=h,window.clearTimeout(a.current),h!==""&&(a.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),o=C.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,s,o]}function S3(e,t,n){const s=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let u=lq(e,Math.max(o,0));s.length===1&&(u=u.filter(h=>h!==n));const d=u.find(h=>h.textValue.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function lq(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var cq=XO,w3=QO,uq=e3,dq=t3,hq=n3,C3=r3,fq=o3,T3=u3,A3=h3,pq=f3,mq=m3,N3=g3,k3=b3,R3=x3;const an=cq,sn=uq,Qt=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(w3,{ref:a,className:Te("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(dq,{asChild:!0,children:r.jsx(di,{className:"h-4 w-4 opacity-50"})})]}));Qt.displayName=w3.displayName;const D3=C.forwardRef(({className:e,...t},n)=>r.jsx(N3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Ix,{className:"h-4 w-4"})}));D3.displayName=N3.displayName;const I3=C.forwardRef(({className:e,...t},n)=>r.jsx(k3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(di,{className:"h-4 w-4"})}));I3.displayName=k3.displayName;const Jt=C.forwardRef(({className:e,children:t,position:n="popper",...a},s)=>r.jsx(hq,{children:r.jsxs(C3,{ref:s,className:Te("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,...a,children:[r.jsx(D3,{}),r.jsx(fq,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(I3,{})]})}));Jt.displayName=C3.displayName;const gq=C.forwardRef(({className:e,...t},n)=>r.jsx(T3,{ref:n,className:Te("px-2 py-1.5 text-sm font-semibold",e),...t}));gq.displayName=T3.displayName;const Le=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(A3,{ref:a,className:Te("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(mq,{children:r.jsx(uo,{className:"h-4 w-4"})})}),r.jsx(pq,{children:t})]}));Le.displayName=A3.displayName;const bq=C.forwardRef(({className:e,...t},n)=>r.jsx(R3,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));bq.displayName=R3.displayName;const Hn=qx,cp=lO,vq=Wx,O3=C.forwardRef(({className:e,...t},n)=>r.jsx(vd,{ref:n,className:Te("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}));O3.displayName=vd.displayName;const Dn=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(vq,{children:[r.jsx(O3,{}),r.jsxs(xd,{ref:a,className:Te("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(Vp,{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(Sr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Dn.displayName=xd.displayName;const Cn=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Cn.displayName="DialogHeader";const wr=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});wr.displayName="DialogFooter";const Tn=C.forwardRef(({className:e,...t},n)=>r.jsx(yd,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));Tn.displayName=yd.displayName;const Un=C.forwardRef(({className:e,...t},n)=>r.jsx(Ed,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));Un.displayName=Ed.displayName;var am="Checkbox",[xq,Lue]=Ar(am),[yq,fy]=xq(am);function Eq(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:s,disabled:o,form:u,name:c,onCheckedChange:d,required:h,value:p="on",internal_do_not_use_render:m}=e,[b,x]=Va({prop:n,defaultProp:s??!1,onChange:d,caller:am}),[w,S]=C.useState(null),[g,y]=C.useState(null),_=C.useRef(!1),E=w?!!u||!!w.closest("form"):!0,T={checked:b,disabled:o,setChecked:x,control:w,setControl:S,name:c,form:u,value:p,hasConsumerStoppedPropagationRef:_,required:h,defaultChecked:pi(s)?!1:s,isFormControl:E,bubbleInput:g,setBubbleInput:y};return r.jsx(yq,{scope:t,...T,children:_q(m)?m(T):a})}var L3="CheckboxTrigger",j3=C.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},s)=>{const{control:o,value:u,disabled:c,checked:d,required:h,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:b,isFormControl:x,bubbleInput:w}=fy(L3,e),S=Et(s,p),g=C.useRef(d);return C.useEffect(()=>{const y=o?.form;if(y){const _=()=>m(g.current);return y.addEventListener("reset",_),()=>y.removeEventListener("reset",_)}},[o,m]),r.jsx(ot.button,{type:"button",role:"checkbox","aria-checked":pi(d)?"mixed":d,"aria-required":h,"data-state":U3(d),"data-disabled":c?"":void 0,disabled:c,value:u,...a,ref:S,onKeyDown:Ge(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Ge(n,y=>{m(_=>pi(_)?!0:!_),w&&x&&(b.current=y.isPropagationStopped(),b.current||y.stopPropagation())})})});j3.displayName=L3;var py=C.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:s,defaultChecked:o,required:u,disabled:c,value:d,onCheckedChange:h,form:p,...m}=e;return r.jsx(Eq,{__scopeCheckbox:n,checked:s,defaultChecked:o,disabled:c,required:u,onCheckedChange:h,name:a,form:p,value:d,internal_do_not_use_render:({isFormControl:b})=>r.jsxs(r.Fragment,{children:[r.jsx(j3,{...m,ref:t,__scopeCheckbox:n}),b&&r.jsx(B3,{__scopeCheckbox:n})]})})});py.displayName=am;var M3="CheckboxIndicator",F3=C.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...s}=e,o=fy(M3,n);return r.jsx(ur,{present:a||pi(o.checked)||o.checked===!0,children:r.jsx(ot.span,{"data-state":U3(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});F3.displayName=M3;var P3="CheckboxBubbleInput",B3=C.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:u,required:c,disabled:d,name:h,value:p,form:m,bubbleInput:b,setBubbleInput:x}=fy(P3,e),w=Et(n,x),S=dy(o),g=ry(a);C.useEffect(()=>{const _=b;if(!_)return;const E=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(E,"checked").set,N=!s.current;if(S!==o&&k){const I=new Event("click",{bubbles:N});_.indeterminate=pi(o),k.call(_,pi(o)?!1:o),_.dispatchEvent(I)}},[b,S,o,s]);const y=C.useRef(pi(o)?!1:o);return r.jsx(ot.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??y.current,required:c,disabled:d,name:h,value:p,form:m,...t,tabIndex:-1,ref:w,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});B3.displayName=P3;function _q(e){return typeof e=="function"}function pi(e){return e==="indeterminate"}function U3(e){return pi(e)?"indeterminate":e?"checked":"unchecked"}const Wa=C.forwardRef(({className:e,...t},n)=>r.jsx(py,{ref:n,className:Te("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(F3,{className:Te("flex items-center justify-center text-current"),children:r.jsx(uo,{className:"h-4 w-4"})})}));Wa.displayName=py.displayName;const mi=C.forwardRef(({className:e,onCheckedChange:t,onChange:n,...a},s)=>{const o=u=>{n?.(u),t?.(u.target.checked)};return r.jsxs("label",{className:Te("relative inline-flex cursor-pointer",e),children:[r.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:o,ref:s,...a}),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"})]})});mi.displayName="Switch";function Sq(e,t){return C.useReducer((n,a)=>t[n][a]??n,e)}var my="ScrollArea",[H3,jue]=Ar(my),[wq,ga]=H3(my),$3=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:a="hover",dir:s,scrollHideDelay:o=600,...u}=e,[c,d]=C.useState(null),[h,p]=C.useState(null),[m,b]=C.useState(null),[x,w]=C.useState(null),[S,g]=C.useState(null),[y,_]=C.useState(0),[E,T]=C.useState(0),[k,N]=C.useState(!1),[I,R]=C.useState(!1),M=Et(t,P=>d(P)),j=ec(s);return r.jsx(wq,{scope:n,type:a,dir:j,scrollHideDelay:o,scrollArea:c,viewport:h,onViewportChange:p,content:m,onContentChange:b,scrollbarX:x,onScrollbarXChange:w,scrollbarXEnabled:k,onScrollbarXEnabledChange:N,scrollbarY:S,onScrollbarYChange:g,scrollbarYEnabled:I,onScrollbarYEnabledChange:R,onCornerWidthChange:_,onCornerHeightChange:T,children:r.jsx(ot.div,{dir:j,...u,ref:M,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});$3.displayName=my;var z3="ScrollAreaViewport",G3=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:a,nonce:s,...o}=e,u=ga(z3,n),c=C.useRef(null),d=Et(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:s}),r.jsx(ot.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:a})})]})});G3.displayName=z3;var Ja="ScrollAreaScrollbar",gy=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=ga(Ja,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:u}=s,c=e.orientation==="horizontal";return C.useEffect(()=>(c?o(!0):u(!0),()=>{c?o(!1):u(!1)}),[c,o,u]),s.type==="hover"?r.jsx(Cq,{...a,ref:t,forceMount:n}):s.type==="scroll"?r.jsx(Tq,{...a,ref:t,forceMount:n}):s.type==="auto"?r.jsx(q3,{...a,ref:t,forceMount:n}):s.type==="always"?r.jsx(by,{...a,ref:t}):null});gy.displayName=Ja;var Cq=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=ga(Ja,e.__scopeScrollArea),[o,u]=C.useState(!1);return C.useEffect(()=>{const c=s.scrollArea;let d=0;if(c){const h=()=>{window.clearTimeout(d),u(!0)},p=()=>{d=window.setTimeout(()=>u(!1),s.scrollHideDelay)};return c.addEventListener("pointerenter",h),c.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",h),c.removeEventListener("pointerleave",p)}}},[s.scrollArea,s.scrollHideDelay]),r.jsx(ur,{present:n||o,children:r.jsx(q3,{"data-state":o?"visible":"hidden",...a,ref:t})})}),Tq=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=ga(Ja,e.__scopeScrollArea),o=e.orientation==="horizontal",u=im(()=>d("SCROLL_END"),100),[c,d]=Sq("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 C.useEffect(()=>{if(c==="idle"){const h=window.setTimeout(()=>d("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(h)}},[c,s.scrollHideDelay,d]),C.useEffect(()=>{const h=s.viewport,p=o?"scrollLeft":"scrollTop";if(h){let m=h[p];const b=()=>{const x=h[p];m!==x&&(d("SCROLL"),u()),m=x};return h.addEventListener("scroll",b),()=>h.removeEventListener("scroll",b)}},[s.viewport,o,d,u]),r.jsx(ur,{present:n||c!=="hidden",children:r.jsx(by,{"data-state":c==="hidden"?"hidden":"visible",...a,ref:t,onPointerEnter:Ge(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ge(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),q3=C.forwardRef((e,t)=>{const n=ga(Ja,e.__scopeScrollArea),{forceMount:a,...s}=e,[o,u]=C.useState(!1),c=e.orientation==="horizontal",d=im(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;u(c?h:p)}},10);return Ml(n.viewport,d),Ml(n.content,d),r.jsx(ur,{present:a||o,children:r.jsx(by,{"data-state":o?"visible":"hidden",...s,ref:t})})}),by=C.forwardRef((e,t)=>{const{orientation:n="vertical",...a}=e,s=ga(Ja,e.__scopeScrollArea),o=C.useRef(null),u=C.useRef(0),[c,d]=C.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=X3(c.viewport,c.content),p={...a,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,x){return Iq(b,u.current,c,x)}return n==="horizontal"?r.jsx(Aq,{...p,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const b=s.viewport.scrollLeft,x=U2(b,c,s.dir);o.current.style.transform=`translate3d(${x}px, 0, 0)`}},onWheelScroll:b=>{s.viewport&&(s.viewport.scrollLeft=b)},onDragScroll:b=>{s.viewport&&(s.viewport.scrollLeft=m(b,s.dir))}}):n==="vertical"?r.jsx(Nq,{...p,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const b=s.viewport.scrollTop,x=U2(b,c);o.current.style.transform=`translate3d(0, ${x}px, 0)`}},onWheelScroll:b=>{s.viewport&&(s.viewport.scrollTop=b)},onDragScroll:b=>{s.viewport&&(s.viewport.scrollTop=m(b))}}):null}),Aq=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...s}=e,o=ga(Ja,e.__scopeScrollArea),[u,c]=C.useState(),d=C.useRef(null),h=Et(t,d,o.onScrollbarXChange);return C.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(V3,{"data-orientation":"horizontal",...s,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":sm(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),Q3(b,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&a({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:dp(u.paddingLeft),paddingEnd:dp(u.paddingRight)}})}})}),Nq=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...s}=e,o=ga(Ja,e.__scopeScrollArea),[u,c]=C.useState(),d=C.useRef(null),h=Et(t,d,o.onScrollbarYChange);return C.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(V3,{"data-orientation":"vertical",...s,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":sm(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),Q3(b,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&a({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:dp(u.paddingTop),paddingEnd:dp(u.paddingBottom)}})}})}),[kq,W3]=H3(Ja),V3=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:a,hasThumb:s,onThumbChange:o,onThumbPointerUp:u,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:p,onResize:m,...b}=e,x=ga(Ja,n),[w,S]=C.useState(null),g=Et(t,M=>S(M)),y=C.useRef(null),_=C.useRef(""),E=x.viewport,T=a.content-a.viewport,k=kn(p),N=kn(d),I=im(m,10);function R(M){if(y.current){const j=M.clientX-y.current.left,P=M.clientY-y.current.top;h({x:j,y:P})}}return C.useEffect(()=>{const M=j=>{const P=j.target;w?.contains(P)&&k(j,T)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[E,w,T,k]),C.useEffect(N,[a,N]),Ml(w,I),Ml(x.content,I),r.jsx(kq,{scope:n,scrollbar:w,hasThumb:s,onThumbChange:kn(o),onThumbPointerUp:kn(u),onThumbPositionChange:N,onThumbPointerDown:kn(c),children:r.jsx(ot.div,{...b,ref:g,style:{position:"absolute",...b.style},onPointerDown:Ge(e.onPointerDown,M=>{M.button===0&&(M.target.setPointerCapture(M.pointerId),y.current=w.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),R(M))}),onPointerMove:Ge(e.onPointerMove,R),onPointerUp:Ge(e.onPointerUp,M=>{const j=M.target;j.hasPointerCapture(M.pointerId)&&j.releasePointerCapture(M.pointerId),document.body.style.webkitUserSelect=_.current,x.viewport&&(x.viewport.style.scrollBehavior=""),y.current=null})})})}),up="ScrollAreaThumb",Y3=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=W3(up,e.__scopeScrollArea);return r.jsx(ur,{present:n||s.hasThumb,children:r.jsx(Rq,{ref:t,...a})})}),Rq=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:a,...s}=e,o=ga(up,n),u=W3(up,n),{onThumbPositionChange:c}=u,d=Et(t,m=>u.onThumbChange(m)),h=C.useRef(void 0),p=im(()=>{h.current&&(h.current(),h.current=void 0)},100);return C.useEffect(()=>{const m=o.viewport;if(m){const b=()=>{if(p(),!h.current){const x=Oq(m,c);h.current=x,c()}};return c(),m.addEventListener("scroll",b),()=>m.removeEventListener("scroll",b)}},[o.viewport,p,c]),r.jsx(ot.div,{"data-state":u.hasThumb?"visible":"hidden",...s,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:Ge(e.onPointerDownCapture,m=>{const x=m.target.getBoundingClientRect(),w=m.clientX-x.left,S=m.clientY-x.top;u.onThumbPointerDown({x:w,y:S})}),onPointerUp:Ge(e.onPointerUp,u.onThumbPointerUp)})});Y3.displayName=up;var vy="ScrollAreaCorner",K3=C.forwardRef((e,t)=>{const n=ga(vy,e.__scopeScrollArea),a=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&a?r.jsx(Dq,{...e,ref:t}):null});K3.displayName=vy;var Dq=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,...a}=e,s=ga(vy,n),[o,u]=C.useState(0),[c,d]=C.useState(0),h=!!(o&&c);return Ml(s.scrollbarX,()=>{const p=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(p),d(p)}),Ml(s.scrollbarY,()=>{const p=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(p),u(p)}),h?r.jsx(ot.div,{...a,ref:t,style:{width:o,height:c,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function dp(e){return e?parseInt(e,10):0}function X3(e,t){const n=e/t;return isNaN(n)?0:n}function sm(e){const t=X3(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,a=(e.scrollbar.size-n)*t;return Math.max(a,18)}function Iq(e,t,n,a="ltr"){const s=sm(n),o=s/2,u=t||o,c=s-u,d=n.scrollbar.paddingStart+u,h=n.scrollbar.size-n.scrollbar.paddingEnd-c,p=n.content-n.viewport,m=a==="ltr"?[0,p]:[p*-1,0];return Z3([d,h],m)(e)}function U2(e,t,n="ltr"){const a=sm(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,u=t.content-t.viewport,c=o-a,d=n==="ltr"?[0,u]:[u*-1,0],h=kv(e,d);return Z3([0,u],[0,c])(h)}function Z3(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(n-e[0])}}function Q3(e,t){return e>0&&e<t}var Oq=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},a=0;return(function s(){const o={left:e.scrollLeft,top:e.scrollTop},u=n.left!==o.left,c=n.top!==o.top;(u||c)&&t(),n=o,a=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(a)};function im(e,t){const n=kn(e),a=C.useRef(0);return C.useEffect(()=>()=>window.clearTimeout(a.current),[]),C.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(n,t)},[n,t])}function Ml(e,t){const n=kn(t);nr(()=>{let a=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(a),a=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(a),s.unobserve(e)}}},[e,n])}var J3=$3,Lq=G3,jq=K3;const Na=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(J3,{ref:a,className:Te("relative overflow-hidden",e),...n,children:[r.jsx(Lq,{className:"h-full w-full rounded-[inherit]",children:t}),r.jsx(eL,{}),r.jsx(jq,{})]}));Na.displayName=J3.displayName;const eL=C.forwardRef(({className:e,orientation:t="vertical",...n},a)=>r.jsx(gy,{ref:a,orientation:t,className:Te("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(Y3,{className:"relative flex-1 rounded-full bg-border"})}));eL.displayName=gy.displayName;function Ku(e){const t=[],n=String(e||"");let a=n.indexOf(","),s=0,o=!1;for(;!o;){a===-1&&(a=n.length,o=!0);const u=n.slice(s,a).trim();(u||!o)&&t.push(u),s=a+1,a=n.indexOf(",",s)}return t}function om(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Mq=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fq=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pq={};function H2(e,t){return(Pq.jsx?Fq:Mq).test(e)}const Bq=/[ \t\n\f\r]/g;function Sd(e){return typeof e=="object"?e.type==="text"?$2(e.value):!1:$2(e)}function $2(e){return e.replace(Bq,"")===""}let wd=class{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}};wd.prototype.normal={};wd.prototype.property={};wd.prototype.space=void 0;function tL(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new wd(n,a,t)}function Xu(e){return e.toLowerCase()}let Mr=class{constructor(t,n){this.attribute=n,this.property=t}};Mr.prototype.attribute="";Mr.prototype.booleanish=!1;Mr.prototype.boolean=!1;Mr.prototype.commaOrSpaceSeparated=!1;Mr.prototype.commaSeparated=!1;Mr.prototype.defined=!1;Mr.prototype.mustUseProperty=!1;Mr.prototype.number=!1;Mr.prototype.overloadedBoolean=!1;Mr.prototype.property="";Mr.prototype.spaceSeparated=!1;Mr.prototype.space=void 0;let Uq=0;const Nt=fo(),Pn=fo(),jv=fo(),$e=fo(),dn=fo(),wl=fo(),Vr=fo();function fo(){return 2**++Uq}const Mv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Nt,booleanish:Pn,commaOrSpaceSeparated:Vr,commaSeparated:wl,number:$e,overloadedBoolean:jv,spaceSeparated:dn},Symbol.toStringTag,{value:"Module"})),E0=Object.keys(Mv);let xy=class extends Mr{constructor(t,n,a,s){let o=-1;if(super(t,n),z2(this,"space",s),typeof a=="number")for(;++o<E0.length;){const u=E0[o];z2(this,E0[o],(a&Mv[u])===Mv[u])}}};xy.prototype.defined=!0;function z2(e,t,n){n&&(e[t]=n)}function nc(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new xy(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[Xu(a)]=a,n[Xu(o.attribute)]=a}return new wd(t,n,e.space)}const nL=nc({properties:{ariaActiveDescendant:null,ariaAtomic:Pn,ariaAutoComplete:null,ariaBusy:Pn,ariaChecked:Pn,ariaColCount:$e,ariaColIndex:$e,ariaColSpan:$e,ariaControls:dn,ariaCurrent:null,ariaDescribedBy:dn,ariaDetails:null,ariaDisabled:Pn,ariaDropEffect:dn,ariaErrorMessage:null,ariaExpanded:Pn,ariaFlowTo:dn,ariaGrabbed:Pn,ariaHasPopup:null,ariaHidden:Pn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dn,ariaLevel:$e,ariaLive:null,ariaModal:Pn,ariaMultiLine:Pn,ariaMultiSelectable:Pn,ariaOrientation:null,ariaOwns:dn,ariaPlaceholder:null,ariaPosInSet:$e,ariaPressed:Pn,ariaReadOnly:Pn,ariaRelevant:null,ariaRequired:Pn,ariaRoleDescription:dn,ariaRowCount:$e,ariaRowIndex:$e,ariaRowSpan:$e,ariaSelected:Pn,ariaSetSize:$e,ariaSort:null,ariaValueMax:$e,ariaValueMin:$e,ariaValueNow:$e,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function rL(e,t){return t in e?e[t]:t}function aL(e,t){return rL(e,t.toLowerCase())}const Hq=nc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:wl,acceptCharset:dn,accessKey:dn,action:null,allow:null,allowFullScreen:Nt,allowPaymentRequest:Nt,allowUserMedia:Nt,alt:null,as:null,async:Nt,autoCapitalize:null,autoComplete:dn,autoFocus:Nt,autoPlay:Nt,blocking:dn,capture:null,charSet:null,checked:Nt,cite:null,className:dn,cols:$e,colSpan:null,content:null,contentEditable:Pn,controls:Nt,controlsList:dn,coords:$e|wl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Nt,defer:Nt,dir:null,dirName:null,disabled:Nt,download:jv,draggable:Pn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Nt,formTarget:null,headers:dn,height:$e,hidden:jv,high:$e,href:null,hrefLang:null,htmlFor:dn,httpEquiv:dn,id:null,imageSizes:null,imageSrcSet:null,inert:Nt,inputMode:null,integrity:null,is:null,isMap:Nt,itemId:null,itemProp:dn,itemRef:dn,itemScope:Nt,itemType:dn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Nt,low:$e,manifest:null,max:null,maxLength:$e,media:null,method:null,min:null,minLength:$e,multiple:Nt,muted:Nt,name:null,nonce:null,noModule:Nt,noValidate:Nt,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:Nt,optimum:$e,pattern:null,ping:dn,placeholder:null,playsInline:Nt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Nt,referrerPolicy:null,rel:dn,required:Nt,reversed:Nt,rows:$e,rowSpan:$e,sandbox:dn,scope:null,scoped:Nt,seamless:Nt,selected:Nt,shadowRootClonable:Nt,shadowRootDelegatesFocus:Nt,shadowRootMode:null,shape:null,size:$e,sizes:null,slot:null,span:$e,spellCheck:Pn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$e,step:null,style:null,tabIndex:$e,target:null,title:null,translate:null,type:null,typeMustMatch:Nt,useMap:null,value:Pn,width:$e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dn,axis:null,background:null,bgColor:null,border:$e,borderColor:null,bottomMargin:$e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Nt,declare:Nt,event:null,face:null,frame:null,frameBorder:null,hSpace:$e,leftMargin:$e,link:null,longDesc:null,lowSrc:null,marginHeight:$e,marginWidth:$e,noResize:Nt,noHref:Nt,noShade:Nt,noWrap:Nt,object:null,profile:null,prompt:null,rev:null,rightMargin:$e,rules:null,scheme:null,scrolling:Pn,standby:null,summary:null,text:null,topMargin:$e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Nt,disableRemotePlayback:Nt,prefix:null,property:null,results:$e,security:null,unselectable:null},space:"html",transform:aL}),$q=nc({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:Vr,accentHeight:$e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$e,amplitude:$e,arabicForm:null,ascent:$e,attributeName:null,attributeType:null,azimuth:$e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$e,by:null,calcMode:null,capHeight:$e,className:dn,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:$e,diffuseConstant:$e,direction:null,display:null,dur:null,divisor:$e,dominantBaseline:null,download:Nt,dx:null,dy:null,edgeMode:null,editable:null,elevation:$e,enableBackground:null,end:null,event:null,exponent:$e,externalResourcesRequired:null,fill:null,fillOpacity:$e,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:wl,g2:wl,glyphName:wl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$e,horizOriginX:$e,horizOriginY:$e,id:null,ideographic:$e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$e,k:$e,k1:$e,k2:$e,k3:$e,k4:$e,kernelMatrix:Vr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$e,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:$e,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:$e,overlineThickness:$e,paintOrder:null,panose1:null,path:null,pathLength:$e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$e,pointsAtY:$e,pointsAtZ:$e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Vr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Vr,rev:Vr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Vr,requiredFeatures:Vr,requiredFonts:Vr,requiredFormats:Vr,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:$e,specularExponent:$e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$e,strikethroughThickness:$e,string:null,stroke:null,strokeDashArray:Vr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$e,strokeOpacity:$e,strokeWidth:null,style:null,surfaceScale:$e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Vr,tabIndex:$e,tableValues:null,target:null,targetX:$e,targetY:$e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Vr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$e,underlineThickness:$e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$e,values:null,vAlphabetic:$e,vMathematical:$e,vectorEffect:null,vHanging:$e,vIdeographic:$e,version:null,vertAdvY:$e,vertOriginX:$e,vertOriginY:$e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rL}),sL=nc({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()}}),iL=nc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:aL}),oL=nc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zq={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"},Gq=/[A-Z]/g,G2=/-[a-z]/g,qq=/^data[-\w.:]+$/i;function Cd(e,t){const n=Xu(t);let a=t,s=Mr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qq.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(G2,Vq);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!G2.test(o)){let u=o.replace(Gq,Wq);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=xy}return new s(a,t)}function Wq(e){return"-"+e.toLowerCase()}function Vq(e){return e.charAt(1).toUpperCase()}const rc=tL([nL,Hq,sL,iL,oL],"html"),ks=tL([nL,$q,sL,iL,oL],"svg");function Zu(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function lm(e){return e.join(" ").trim()}var dl={},_0,q2;function Yq(){if(q2)return _0;q2=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
559
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return C.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},A$="DialogDescriptionWarning",N$=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${oO(A$).contentName}}.`;return C.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},qx=VI,lO=KI,Wx=ZI,vd=QI,xd=JI,yd=tO,Ed=rO,Vp=sO;const cO=qx,k$=Wx,uO=C.forwardRef(({className:e,...t},n)=>r.jsx(vd,{className:Te("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}));uO.displayName=vd.displayName;const R$=Yl("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"}}),Vx=C.forwardRef(({side:e="right",className:t,children:n,...a},s)=>r.jsxs(k$,{children:[r.jsx(uO,{}),r.jsxs(xd,{ref:s,className:Te(R$({side:e}),t),...a,children:[n,r.jsxs(Vp,{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(Sr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Vx.displayName=xd.displayName;const Yx=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-2 text-center sm:text-left",e),...t});Yx.displayName="SheetHeader";const Kx=C.forwardRef(({className:e,...t},n)=>r.jsx(yd,{ref:n,className:Te("text-lg font-semibold text-foreground",e),...t}));Kx.displayName=yd.displayName;const dO=C.forwardRef(({className:e,...t},n)=>r.jsx(Ed,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));dO.displayName=Ed.displayName;function k2({className:e,...t}){return r.jsx("div",{className:Te("animate-pulse rounded-md bg-muted",e),...t})}const D$=["top","right","bottom","left"],bi=Math.min,Kr=Math.max,ap=Math.round,gf=Math.floor,qa=e=>({x:e,y:e}),I$={left:"right",right:"left",bottom:"top",top:"bottom"},O$={start:"end",end:"start"};function Sv(e,t,n){return Kr(e,bi(t,n))}function Cs(e,t){return typeof e=="function"?e(t):e}function Ts(e){return e.split("-")[0]}function Zl(e){return e.split("-")[1]}function Xx(e){return e==="x"?"y":"x"}function Zx(e){return e==="y"?"height":"width"}const L$=new Set(["top","bottom"]);function $a(e){return L$.has(Ts(e))?"y":"x"}function Qx(e){return Xx($a(e))}function j$(e,t,n){n===void 0&&(n=!1);const a=Zl(e),s=Qx(e),o=Zx(s);let u=s==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(u=sp(u)),[u,sp(u)]}function M$(e){const t=sp(e);return[wv(e),t,wv(t)]}function wv(e){return e.replace(/start|end/g,t=>O$[t])}const R2=["left","right"],D2=["right","left"],F$=["top","bottom"],P$=["bottom","top"];function B$(e,t,n){switch(e){case"top":case"bottom":return n?t?D2:R2:t?R2:D2;case"left":case"right":return t?F$:P$;default:return[]}}function U$(e,t,n,a){const s=Zl(e);let o=B$(Ts(e),n==="start",a);return s&&(o=o.map(u=>u+"-"+s),t&&(o=o.concat(o.map(wv)))),o}function sp(e){return e.replace(/left|right|bottom|top/g,t=>I$[t])}function H$(e){return{top:0,right:0,bottom:0,left:0,...e}}function hO(e){return typeof e!="number"?H$(e):{top:e,right:e,bottom:e,left:e}}function ip(e){const{x:t,y:n,width:a,height:s}=e;return{width:a,height:s,top:n,left:t,right:t+a,bottom:n+s,x:t,y:n}}function I2(e,t,n){let{reference:a,floating:s}=e;const o=$a(t),u=Qx(t),c=Zx(u),d=Ts(t),h=o==="y",p=a.x+a.width/2-s.width/2,m=a.y+a.height/2-s.height/2,b=a[c]/2-s[c]/2;let x;switch(d){case"top":x={x:p,y:a.y-s.height};break;case"bottom":x={x:p,y:a.y+a.height};break;case"right":x={x:a.x+a.width,y:m};break;case"left":x={x:a.x-s.width,y:m};break;default:x={x:a.x,y:a.y}}switch(Zl(t)){case"start":x[u]-=b*(n&&h?-1:1);break;case"end":x[u]+=b*(n&&h?-1:1);break}return x}const $$=async(e,t,n)=>{const{placement:a="bottom",strategy:s="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:s}),{x:p,y:m}=I2(h,a,d),b=a,x={},w=0;for(let S=0;S<c.length;S++){const{name:g,fn:y}=c[S],{x:_,y:E,data:T,reset:k}=await y({x:p,y:m,initialPlacement:a,placement:b,strategy:s,middlewareData:x,rects:h,platform:u,elements:{reference:e,floating:t}});p=_??p,m=E??m,x={...x,[g]:{...x[g],...T}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(b=k.placement),k.rects&&(h=k.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:p,y:m}=I2(h,b,d)),S=-1)}return{x:p,y:m,placement:b,strategy:s,middlewareData:x}};async function Wu(e,t){var n;t===void 0&&(t={});const{x:a,y:s,platform:o,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:x=0}=Cs(t,e),w=hO(x),g=c[b?m==="floating"?"reference":"floating":m],y=ip(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})),_=m==="floating"?{x:a,y:s,width:u.floating.width,height:u.floating.height}:u.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),T=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},k=ip(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:E,strategy:d}):_);return{top:(y.top-k.top+w.top)/T.y,bottom:(k.bottom-y.bottom+w.bottom)/T.y,left:(y.left-k.left+w.left)/T.x,right:(k.right-y.right+w.right)/T.x}}const z$=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:s,rects:o,platform:u,elements:c,middlewareData:d}=t,{element:h,padding:p=0}=Cs(e,t)||{};if(h==null)return{};const m=hO(p),b={x:n,y:a},x=Qx(s),w=Zx(x),S=await u.getDimensions(h),g=x==="y",y=g?"top":"left",_=g?"bottom":"right",E=g?"clientHeight":"clientWidth",T=o.reference[w]+o.reference[x]-b[x]-o.floating[w],k=b[x]-o.reference[x],N=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let I=N?N[E]:0;(!I||!await(u.isElement==null?void 0:u.isElement(N)))&&(I=c.floating[E]||o.floating[w]);const R=T/2-k/2,M=I/2-S[w]/2-1,j=bi(m[y],M),P=bi(m[_],M),z=j,U=I-S[w]-P,G=I/2-S[w]/2+R,J=Sv(z,G,U),B=!d.arrow&&Zl(s)!=null&&G!==J&&o.reference[w]/2-(G<z?j:P)-S[w]/2<0,q=B?G<z?G-z:G-U:0;return{[x]:b[x]+q,data:{[x]:J,centerOffset:G-J-q,...B&&{alignmentOffset:q}},reset:B}}}),G$=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:s,middlewareData:o,rects:u,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...g}=Cs(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Ts(s),_=$a(c),E=Ts(c)===c,T=await(d.isRTL==null?void 0:d.isRTL(h.floating)),k=b||(E||!S?[sp(c)]:M$(c)),N=w!=="none";!b&&N&&k.push(...U$(c,S,w,T));const I=[c,...k],R=await Wu(t,g),M=[];let j=((a=o.flip)==null?void 0:a.overflows)||[];if(p&&M.push(R[y]),m){const G=j$(s,u,T);M.push(R[G[0]],R[G[1]])}if(j=[...j,{placement:s,overflows:M}],!M.every(G=>G<=0)){var P,z;const G=(((P=o.flip)==null?void 0:P.index)||0)+1,J=I[G];if(J&&(!(m==="alignment"?_!==$a(J):!1)||j.every(Y=>$a(Y.placement)===_?Y.overflows[0]>0:!0)))return{data:{index:G,overflows:j},reset:{placement:J}};let B=(z=j.filter(q=>q.overflows[0]<=0).sort((q,Y)=>q.overflows[1]-Y.overflows[1])[0])==null?void 0:z.placement;if(!B)switch(x){case"bestFit":{var U;const q=(U=j.filter(Y=>{if(N){const F=$a(Y.placement);return F===_||F==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(F=>F>0).reduce((F,L)=>F+L,0)]).sort((Y,F)=>Y[1]-F[1])[0])==null?void 0:U[0];q&&(B=q);break}case"initialPlacement":B=c;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function O2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function L2(e){return D$.some(t=>e[t]>=0)}const q$=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...s}=Cs(e,t);switch(a){case"referenceHidden":{const o=await Wu(t,{...s,elementContext:"reference"}),u=O2(o,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:L2(u)}}}case"escaped":{const o=await Wu(t,{...s,altBoundary:!0}),u=O2(o,n.floating);return{data:{escapedOffsets:u,escaped:L2(u)}}}default:return{}}}}},fO=new Set(["left","top"]);async function W$(e,t){const{placement:n,platform:a,elements:s}=e,o=await(a.isRTL==null?void 0:a.isRTL(s.floating)),u=Ts(n),c=Zl(n),d=$a(n)==="y",h=fO.has(u)?-1:1,p=o&&d?-1:1,m=Cs(t,e);let{mainAxis:b,crossAxis:x,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof w=="number"&&(x=c==="end"?w*-1:w),d?{x:x*p,y:b*h}:{x:b*h,y:x*p}}const V$=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:s,y:o,placement:u,middlewareData:c}=t,d=await W$(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(a=c.arrow)!=null&&a.alignmentOffset?{}:{x:s+d.x,y:o+d.y,data:{...d,placement:u}}}}},Y$=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:s}=t,{mainAxis:o=!0,crossAxis:u=!1,limiter:c={fn:g=>{let{x:y,y:_}=g;return{x:y,y:_}}},...d}=Cs(e,t),h={x:n,y:a},p=await Wu(t,d),m=$a(Ts(s)),b=Xx(m);let x=h[b],w=h[m];if(o){const g=b==="y"?"top":"left",y=b==="y"?"bottom":"right",_=x+p[g],E=x-p[y];x=Sv(_,x,E)}if(u){const g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",_=w+p[g],E=w-p[y];w=Sv(_,w,E)}const S=c.fn({...t,[b]:x,[m]:w});return{...S,data:{x:S.x-n,y:S.y-a,enabled:{[b]:o,[m]:u}}}}}},K$=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:s,rects:o,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Cs(e,t),p={x:n,y:a},m=$a(s),b=Xx(m);let x=p[b],w=p[m];const S=Cs(c,t),g=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const E=b==="y"?"height":"width",T=o.reference[b]-o.floating[E]+g.mainAxis,k=o.reference[b]+o.reference[E]-g.mainAxis;x<T?x=T:x>k&&(x=k)}if(h){var y,_;const E=b==="y"?"width":"height",T=fO.has(Ts(s)),k=o.reference[m]-o.floating[E]+(T&&((y=u.offset)==null?void 0:y[m])||0)+(T?0:g.crossAxis),N=o.reference[m]+o.reference[E]+(T?0:((_=u.offset)==null?void 0:_[m])||0)-(T?g.crossAxis:0);w<k?w=k:w>N&&(w=N)}return{[b]:x,[m]:w}}}},X$=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:s,rects:o,platform:u,elements:c}=t,{apply:d=()=>{},...h}=Cs(e,t),p=await Wu(t,h),m=Ts(s),b=Zl(s),x=$a(s)==="y",{width:w,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 _=S-p.top-p.bottom,E=w-p.left-p.right,T=bi(S-p[g],_),k=bi(w-p[y],E),N=!t.middlewareData.shift;let I=T,R=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=E),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(I=_),N&&!b){const j=Kr(p.left,0),P=Kr(p.right,0),z=Kr(p.top,0),U=Kr(p.bottom,0);x?R=w-2*(j!==0||P!==0?j+P:Kr(p.left,p.right)):I=S-2*(z!==0||U!==0?z+U:Kr(p.top,p.bottom))}await d({...t,availableWidth:R,availableHeight:I});const M=await u.getDimensions(c.floating);return w!==M.width||S!==M.height?{reset:{rects:!0}}:{}}}};function Yp(){return typeof window<"u"}function Ql(e){return pO(e)?(e.nodeName||"").toLowerCase():"#document"}function Qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qa(e){var t;return(t=(pO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pO(e){return Yp()?e instanceof Node||e instanceof Qr(e).Node:!1}function Ta(e){return Yp()?e instanceof Element||e instanceof Qr(e).Element:!1}function Ya(e){return Yp()?e instanceof HTMLElement||e instanceof Qr(e).HTMLElement:!1}function j2(e){return!Yp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qr(e).ShadowRoot}const Z$=new Set(["inline","contents"]);function _d(e){const{overflow:t,overflowX:n,overflowY:a,display:s}=Aa(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!Z$.has(s)}const Q$=new Set(["table","td","th"]);function J$(e){return Q$.has(Ql(e))}const ez=[":popover-open",":modal"];function Kp(e){return ez.some(t=>{try{return e.matches(t)}catch{return!1}})}const tz=["transform","translate","scale","rotate","perspective"],nz=["transform","translate","scale","rotate","perspective","filter"],rz=["paint","layout","strict","content"];function Jx(e){const t=ey(),n=Ta(e)?Aa(e):e;return tz.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||nz.some(a=>(n.willChange||"").includes(a))||rz.some(a=>(n.contain||"").includes(a))}function az(e){let t=vi(e);for(;Ya(t)&&!Ll(t);){if(Jx(t))return t;if(Kp(t))return null;t=vi(t)}return null}function ey(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sz=new Set(["html","body","#document"]);function Ll(e){return sz.has(Ql(e))}function Aa(e){return Qr(e).getComputedStyle(e)}function Xp(e){return Ta(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vi(e){if(Ql(e)==="html")return e;const t=e.assignedSlot||e.parentNode||j2(e)&&e.host||Qa(e);return j2(t)?t.host:t}function mO(e){const t=vi(e);return Ll(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ya(t)&&_d(t)?t:mO(t)}function Vu(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=mO(e),o=s===((a=e.ownerDocument)==null?void 0:a.body),u=Qr(s);if(o){const c=Cv(u);return t.concat(u,u.visualViewport||[],_d(s)?s:[],c&&n?Vu(c):[])}return t.concat(s,Vu(s,[],n))}function Cv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gO(e){const t=Aa(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const s=Ya(e),o=s?e.offsetWidth:n,u=s?e.offsetHeight:a,c=ap(n)!==o||ap(a)!==u;return c&&(n=o,a=u),{width:n,height:a,$:c}}function ty(e){return Ta(e)?e:e.contextElement}function Sl(e){const t=ty(e);if(!Ya(t))return qa(1);const n=t.getBoundingClientRect(),{width:a,height:s,$:o}=gO(t);let u=(o?ap(n.width):n.width)/a,c=(o?ap(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const iz=qa(0);function bO(e){const t=Qr(e);return!ey()||!t.visualViewport?iz:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oz(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Qr(e)?!1:t}function so(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=ty(e);let u=qa(1);t&&(a?Ta(a)&&(u=Sl(a)):u=Sl(e));const c=oz(o,n,a)?bO(o):qa(0);let d=(s.left+c.x)/u.x,h=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(o){const b=Qr(o),x=a&&Ta(a)?Qr(a):a;let w=b,S=Cv(w);for(;S&&a&&x!==w;){const g=Sl(S),y=S.getBoundingClientRect(),_=Aa(S),E=y.left+(S.clientLeft+parseFloat(_.paddingLeft))*g.x,T=y.top+(S.clientTop+parseFloat(_.paddingTop))*g.y;d*=g.x,h*=g.y,p*=g.x,m*=g.y,d+=E,h+=T,w=Qr(S),S=Cv(w)}}return ip({width:p,height:m,x:d,y:h})}function ny(e,t){const n=Xp(e).scrollLeft;return t?t.left+n:so(Qa(e)).left+n}function vO(e,t,n){n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=a.left+t.scrollLeft-(n?0:ny(e,a)),o=a.top+t.scrollTop;return{x:s,y:o}}function lz(e){let{elements:t,rect:n,offsetParent:a,strategy:s}=e;const o=s==="fixed",u=Qa(a),c=t?Kp(t.floating):!1;if(a===u||c&&o)return n;let d={scrollLeft:0,scrollTop:0},h=qa(1);const p=qa(0),m=Ya(a);if((m||!m&&!o)&&((Ql(a)!=="body"||_d(u))&&(d=Xp(a)),Ya(a))){const x=so(a);h=Sl(a),p.x=x.x+a.clientLeft,p.y=x.y+a.clientTop}const b=u&&!m&&!o?vO(u,d,!0):qa(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 cz(e){return Array.from(e.getClientRects())}function uz(e){const t=Qa(e),n=Xp(e),a=e.ownerDocument.body,s=Kr(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),o=Kr(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+ny(e);const c=-n.scrollTop;return Aa(a).direction==="rtl"&&(u+=Kr(t.clientWidth,a.clientWidth)-s),{width:s,height:o,x:u,y:c}}function dz(e,t){const n=Qr(e),a=Qa(e),s=n.visualViewport;let o=a.clientWidth,u=a.clientHeight,c=0,d=0;if(s){o=s.width,u=s.height;const h=ey();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}return{width:o,height:u,x:c,y:d}}const hz=new Set(["absolute","fixed"]);function fz(e,t){const n=so(e,!0,t==="fixed"),a=n.top+e.clientTop,s=n.left+e.clientLeft,o=Ya(e)?Sl(e):qa(1),u=e.clientWidth*o.x,c=e.clientHeight*o.y,d=s*o.x,h=a*o.y;return{width:u,height:c,x:d,y:h}}function M2(e,t,n){let a;if(t==="viewport")a=dz(e,n);else if(t==="document")a=uz(Qa(e));else if(Ta(t))a=fz(t,n);else{const s=bO(e);a={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ip(a)}function xO(e,t){const n=vi(e);return n===t||!Ta(n)||Ll(n)?!1:Aa(n).position==="fixed"||xO(n,t)}function pz(e,t){const n=t.get(e);if(n)return n;let a=Vu(e,[],!1).filter(c=>Ta(c)&&Ql(c)!=="body"),s=null;const o=Aa(e).position==="fixed";let u=o?vi(e):e;for(;Ta(u)&&!Ll(u);){const c=Aa(u),d=Jx(u);!d&&c.position==="fixed"&&(s=null),(o?!d&&!s:!d&&c.position==="static"&&!!s&&hz.has(s.position)||_d(u)&&!d&&xO(e,u))?a=a.filter(p=>p!==u):s=c,u=vi(u)}return t.set(e,a),a}function mz(e){let{element:t,boundary:n,rootBoundary:a,strategy:s}=e;const u=[...n==="clippingAncestors"?Kp(t)?[]:pz(t,this._c):[].concat(n),a],c=u[0],d=u.reduce((h,p)=>{const m=M2(t,p,s);return h.top=Kr(m.top,h.top),h.right=bi(m.right,h.right),h.bottom=bi(m.bottom,h.bottom),h.left=Kr(m.left,h.left),h},M2(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function gz(e){const{width:t,height:n}=gO(e);return{width:t,height:n}}function bz(e,t,n){const a=Ya(t),s=Qa(t),o=n==="fixed",u=so(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=qa(0);function h(){d.x=ny(s)}if(a||!a&&!o)if((Ql(t)!=="body"||_d(s))&&(c=Xp(t)),a){const x=so(t,!0,o,t);d.x=x.x+t.clientLeft,d.y=x.y+t.clientTop}else s&&h();o&&!a&&s&&h();const p=s&&!a&&!o?vO(s,c):qa(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 x0(e){return Aa(e).position==="static"}function F2(e,t){if(!Ya(e)||Aa(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qa(e)===n&&(n=n.ownerDocument.body),n}function yO(e,t){const n=Qr(e);if(Kp(e))return n;if(!Ya(e)){let s=vi(e);for(;s&&!Ll(s);){if(Ta(s)&&!x0(s))return s;s=vi(s)}return n}let a=F2(e,t);for(;a&&J$(a)&&x0(a);)a=F2(a,t);return a&&Ll(a)&&x0(a)&&!Jx(a)?n:a||az(e)||n}const vz=async function(e){const t=this.getOffsetParent||yO,n=this.getDimensions,a=await n(e.floating);return{reference:bz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function xz(e){return Aa(e).direction==="rtl"}const yz={convertOffsetParentRelativeRectToViewportRelativeRect:lz,getDocumentElement:Qa,getClippingRect:mz,getOffsetParent:yO,getElementRects:vz,getClientRects:cz,getDimensions:gz,getScale:Sl,isElement:Ta,isRTL:xz};function EO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ez(e,t){let n=null,a;const s=Qa(e);function o(){var c;clearTimeout(a),(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:x}=h;if(c||t(),!b||!x)return;const w=gf(m),S=gf(s.clientWidth-(p+b)),g=gf(s.clientHeight-(m+x)),y=gf(p),E={rootMargin:-w+"px "+-S+"px "+-g+"px "+-y+"px",threshold:Kr(0,bi(1,d))||1};let T=!0;function k(N){const I=N[0].intersectionRatio;if(I!==d){if(!T)return u();I?u(!1,I):a=setTimeout(()=>{u(!1,1e-7)},1e3)}I===1&&!EO(h,e.getBoundingClientRect())&&u(),T=!1}try{n=new IntersectionObserver(k,{...E,root:s.ownerDocument})}catch{n=new IntersectionObserver(k,E)}n.observe(e)}return u(!0),o}function _z(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=a,h=ty(e),p=s||o?[...h?Vu(h):[],...Vu(t)]:[];p.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const m=h&&c?Ez(h,n):null;let b=-1,x=null;u&&(x=new ResizeObserver(y=>{let[_]=y;_&&_.target===h&&x&&(x.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var E;(E=x)==null||E.observe(t)})),n()}),h&&!d&&x.observe(h),x.observe(t));let w,S=d?so(e):null;d&&g();function g(){const y=so(e);S&&!EO(S,y)&&n(),S=y,w=requestAnimationFrame(g)}return n(),()=>{var y;p.forEach(_=>{s&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),m?.(),(y=x)==null||y.disconnect(),x=null,d&&cancelAnimationFrame(w)}}const Sz=V$,wz=Y$,Cz=G$,Tz=X$,Az=q$,P2=z$,Nz=K$,kz=(e,t,n)=>{const a=new Map,s={platform:yz,...n},o={...s.platform,_c:a};return $$(e,t,{...s,platform:o})};var Rz=typeof document<"u",Dz=function(){},Bf=Rz?C.useLayoutEffect:Dz;function op(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,a,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!op(e[a],t[a]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){const o=s[a];if(!(o==="_owner"&&e.$$typeof)&&!op(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function _O(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function B2(e,t){const n=_O(e);return Math.round(t*n)/n}function y0(e){const t=C.useRef(e);return Bf(()=>{t.current=e}),t}function Iz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:s,elements:{reference:o,floating:u}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[p,m]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=C.useState(a);op(b,a)||x(a);const[w,S]=C.useState(null),[g,y]=C.useState(null),_=C.useCallback(Y=>{Y!==N.current&&(N.current=Y,S(Y))},[]),E=C.useCallback(Y=>{Y!==I.current&&(I.current=Y,y(Y))},[]),T=o||w,k=u||g,N=C.useRef(null),I=C.useRef(null),R=C.useRef(p),M=d!=null,j=y0(d),P=y0(s),z=y0(h),U=C.useCallback(()=>{if(!N.current||!I.current)return;const Y={placement:t,strategy:n,middleware:b};P.current&&(Y.platform=P.current),kz(N.current,I.current,Y).then(F=>{const L={...F,isPositioned:z.current!==!1};G.current&&!op(R.current,L)&&(R.current=L,ql.flushSync(()=>{m(L)}))})},[b,t,n,P,z]);Bf(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,m(Y=>({...Y,isPositioned:!1})))},[h]);const G=C.useRef(!1);Bf(()=>(G.current=!0,()=>{G.current=!1}),[]),Bf(()=>{if(T&&(N.current=T),k&&(I.current=k),T&&k){if(j.current)return j.current(T,k,U);U()}},[T,k,U,j,M]);const J=C.useMemo(()=>({reference:N,floating:I,setReference:_,setFloating:E}),[_,E]),B=C.useMemo(()=>({reference:T,floating:k}),[T,k]),q=C.useMemo(()=>{const Y={position:n,left:0,top:0};if(!B.floating)return Y;const F=B2(B.floating,p.x),L=B2(B.floating,p.y);return c?{...Y,transform:"translate("+F+"px, "+L+"px)",..._O(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:L}},[n,c,B.floating,p.x,p.y]);return C.useMemo(()=>({...p,update:U,refs:J,elements:B,floatingStyles:q}),[p,U,J,B,q])}const Oz=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:s}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?P2({element:a.current,padding:s}).fn(n):{}:a?P2({element:a,padding:s}).fn(n):{}}}},Lz=(e,t)=>({...Sz(e),options:[e,t]}),jz=(e,t)=>({...wz(e),options:[e,t]}),Mz=(e,t)=>({...Nz(e),options:[e,t]}),Fz=(e,t)=>({...Cz(e),options:[e,t]}),Pz=(e,t)=>({...Tz(e),options:[e,t]}),Bz=(e,t)=>({...Az(e),options:[e,t]}),Uz=(e,t)=>({...Oz(e),options:[e,t]});var Hz="Arrow",SO=C.forwardRef((e,t)=>{const{children:n,width:a=10,height:s=5,...o}=e;return r.jsx(ot.svg,{...o,ref:t,width:a,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})});SO.displayName=Hz;var $z=SO;function ry(e){const[t,n]=C.useState(void 0);return nr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[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 a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var ay="Popper",[wO,Jl]=Ar(ay),[zz,CO]=wO(ay),TO=e=>{const{__scopePopper:t,children:n}=e,[a,s]=C.useState(null);return r.jsx(zz,{scope:t,anchor:a,onAnchorChange:s,children:n})};TO.displayName=ay;var AO="PopperAnchor",NO=C.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...s}=e,o=CO(AO,n),u=C.useRef(null),c=Et(t,u),d=C.useRef(null);return C.useEffect(()=>{const h=d.current;d.current=a?.current||u.current,h!==d.current&&o.onAnchorChange(d.current)}),a?null:r.jsx(ot.div,{...s,ref:c})});NO.displayName=AO;var sy="PopperContent",[Gz,qz]=wO(sy),kO=C.forwardRef((e,t)=>{const{__scopePopper:n,side:a="bottom",sideOffset:s=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:x="optimized",onPlaced:w,...S}=e,g=CO(sy,n),[y,_]=C.useState(null),E=Et(t,Z=>_(Z)),[T,k]=C.useState(null),N=ry(T),I=N?.width??0,R=N?.height??0,M=a+(o!=="center"?"-"+o:""),j=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},P=Array.isArray(h)?h:[h],z=P.length>0,U={padding:j,boundary:P.filter(Vz),altBoundary:z},{refs:G,floatingStyles:J,placement:B,isPositioned:q,middlewareData:Y}=Iz({strategy:"fixed",placement:M,whileElementsMounted:(...Z)=>_z(...Z,{animationFrame:x==="always"}),elements:{reference:g.anchor},middleware:[Lz({mainAxis:s+R,alignmentAxis:u}),d&&jz({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Mz():void 0,...U}),d&&Fz({...U}),Pz({...U,apply:({elements:Z,rects:W,availableWidth:le,availableHeight:he})=>{const{width:ce,height:fe}=W.reference,Ue=Z.floating.style;Ue.setProperty("--radix-popper-available-width",`${le}px`),Ue.setProperty("--radix-popper-available-height",`${he}px`),Ue.setProperty("--radix-popper-anchor-width",`${ce}px`),Ue.setProperty("--radix-popper-anchor-height",`${fe}px`)}}),T&&Uz({element:T,padding:c}),Yz({arrowWidth:I,arrowHeight:R}),b&&Bz({strategy:"referenceHidden",...U})]}),[F,L]=IO(B),V=kn(w);nr(()=>{q&&V?.()},[q,V]);const Q=Y.arrow?.x,$=Y.arrow?.y,ee=Y.arrow?.centerOffset!==0,[ae,oe]=C.useState();return nr(()=>{y&&oe(window.getComputedStyle(y).zIndex)},[y]),r.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:q?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(Gz,{scope:n,placedSide:F,onArrowChange:k,arrowX:Q,arrowY:$,shouldHideArrow:ee,children:r.jsx(ot.div,{"data-side":F,"data-align":L,...S,ref:E,style:{...S.style,animation:q?void 0:"none"}})})})});kO.displayName=sy;var RO="PopperArrow",Wz={top:"bottom",right:"left",bottom:"top",left:"right"},DO=C.forwardRef(function(t,n){const{__scopePopper:a,...s}=t,o=qz(RO,a),u=Wz[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($z,{...s,ref:n,style:{...s.style,display:"block"}})})});DO.displayName=RO;function Vz(e){return e!==null}var Yz=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:s}=t,u=s.arrow?.centerOffset!==0,c=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[h,p]=IO(n),m={start:"0%",center:"50%",end:"100%"}[p],b=(s.arrow?.x??0)+c/2,x=(s.arrow?.y??0)+d/2;let w="",S="";return h==="bottom"?(w=u?m:`${b}px`,S=`${-d}px`):h==="top"?(w=u?m:`${b}px`,S=`${a.floating.height+d}px`):h==="right"?(w=`${-d}px`,S=u?m:`${x}px`):h==="left"&&(w=`${a.floating.width+d}px`,S=u?m:`${x}px`),{data:{x:w,y:S}}}});function IO(e){const[t,n="center"]=e.split("-");return[t,n]}var iy=TO,oy=NO,ly=kO,cy=DO,[Zp,Due]=Ar("Tooltip",[Jl]),Qp=Jl(),OO="TooltipProvider",Kz=700,Tv="tooltip.open",[Xz,uy]=Zp(OO),LO=e=>{const{__scopeTooltip:t,delayDuration:n=Kz,skipDelayDuration:a=300,disableHoverableContent:s=!1,children:o}=e,u=C.useRef(!0),c=C.useRef(!1),d=C.useRef(0);return C.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),r.jsx(Xz,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:C.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:C.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,a)},[a]),isPointerInTransitRef:c,onPointerInTransitChange:C.useCallback(h=>{c.current=h},[]),disableHoverableContent:s,children:o})};LO.displayName=OO;var Yu="Tooltip",[Zz,Jp]=Zp(Yu),jO=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:s,onOpenChange:o,disableHoverableContent:u,delayDuration:c}=e,d=uy(Yu,e.__scopeTooltip),h=Qp(t),[p,m]=C.useState(null),b=wa(),x=C.useRef(0),w=u??d.disableHoverableContent,S=c??d.delayDuration,g=C.useRef(!1),[y,_]=Va({prop:a,defaultProp:s??!1,onChange:I=>{I?(d.onOpen(),document.dispatchEvent(new CustomEvent(Tv))):d.onClose(),o?.(I)},caller:Yu}),E=C.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),T=C.useCallback(()=>{window.clearTimeout(x.current),x.current=0,g.current=!1,_(!0)},[_]),k=C.useCallback(()=>{window.clearTimeout(x.current),x.current=0,_(!1)},[_]),N=C.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{g.current=!0,_(!0),x.current=0},S)},[S,_]);return C.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),r.jsx(iy,{...h,children:r.jsx(Zz,{scope:t,contentId:b,open:y,stateAttribute:E,trigger:p,onTriggerChange:m,onTriggerEnter:C.useCallback(()=>{d.isOpenDelayedRef.current?N():T()},[d.isOpenDelayedRef,N,T]),onTriggerLeave:C.useCallback(()=>{w?k():(window.clearTimeout(x.current),x.current=0)},[k,w]),onOpen:T,onClose:k,disableHoverableContent:w,children:n})})};jO.displayName=Yu;var Av="TooltipTrigger",MO=C.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=Jp(Av,n),o=uy(Av,n),u=Qp(n),c=C.useRef(null),d=Et(t,c,s.onTriggerChange),h=C.useRef(!1),p=C.useRef(!1),m=C.useCallback(()=>h.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),r.jsx(oy,{asChild:!0,...u,children:r.jsx(ot.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...a,ref:d,onPointerMove:Ge(e.onPointerMove,b=>{b.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ge(e.onPointerLeave,()=>{s.onTriggerLeave(),p.current=!1}),onPointerDown:Ge(e.onPointerDown,()=>{s.open&&s.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Ge(e.onFocus,()=>{h.current||s.onOpen()}),onBlur:Ge(e.onBlur,s.onClose),onClick:Ge(e.onClick,s.onClose)})})});MO.displayName=Av;var Qz="TooltipPortal",[Iue,Jz]=Zp(Qz,{forceMount:void 0}),jl="TooltipContent",FO=C.forwardRef((e,t)=>{const n=Jz(jl,e.__scopeTooltip),{forceMount:a=n.forceMount,side:s="top",...o}=e,u=Jp(jl,e.__scopeTooltip);return r.jsx(ur,{present:a||u.open,children:u.disableHoverableContent?r.jsx(PO,{side:s,...o,ref:t}):r.jsx(eG,{side:s,...o,ref:t})})}),eG=C.forwardRef((e,t)=>{const n=Jp(jl,e.__scopeTooltip),a=uy(jl,e.__scopeTooltip),s=C.useRef(null),o=Et(t,s),[u,c]=C.useState(null),{trigger:d,onClose:h}=n,p=s.current,{onPointerInTransitChange:m}=a,b=C.useCallback(()=>{c(null),m(!1)},[m]),x=C.useCallback((w,S)=>{const g=w.currentTarget,y={x:w.clientX,y:w.clientY},_=sG(y,g.getBoundingClientRect()),E=iG(y,_),T=oG(S.getBoundingClientRect()),k=cG([...E,...T]);c(k),m(!0)},[m]);return C.useEffect(()=>()=>b(),[b]),C.useEffect(()=>{if(d&&p){const w=g=>x(g,p),S=g=>x(g,d);return d.addEventListener("pointerleave",w),p.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",S)}}},[d,p,x,b]),C.useEffect(()=>{if(u){const w=S=>{const g=S.target,y={x:S.clientX,y:S.clientY},_=d?.contains(g)||p?.contains(g),E=!lG(y,u);_?b():E&&(b(),h())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,p,u,h,b]),r.jsx(PO,{...e,ref:o})}),[tG,nG]=Zp(Yu,{isInside:!1}),rG=LD("TooltipContent"),PO=C.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:u,...c}=e,d=Jp(jl,n),h=Qp(n),{onClose:p}=d;return C.useEffect(()=>(document.addEventListener(Tv,p),()=>document.removeEventListener(Tv,p)),[p]),C.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(Vl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:r.jsxs(ly,{"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(rG,{children:a}),r.jsx(tG,{scope:n,isInside:!0,children:r.jsx(i7,{id:d.contentId,role:"tooltip",children:s||a})})]})})});FO.displayName=jl;var BO="TooltipArrow",aG=C.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=Qp(n);return nG(BO,n).isInside?null:r.jsx(cy,{...s,...a,ref:t})});aG.displayName=BO;function sG(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,a,s,o)){case o:return"left";case s:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function iG(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function oG(e){const{top:t,right:n,bottom:a,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:a},{x:s,y:a}]}function lG(e,t){const{x:n,y:a}=e;let s=!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>a!=b>a&&n<(m-h)*(a-p)/(b-p)+h&&(s=!s)}return s}function cG(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),uG(t)}function uG(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const s=e[a];for(;t.length>=2;){const o=t[t.length-1],u=t[t.length-2];if((o.x-u.x)*(s.y-u.y)>=(o.y-u.y)*(s.x-u.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const s=e[a];for(;n.length>=2;){const o=n[n.length-1],u=n[n.length-2];if((o.x-u.x)*(s.y-u.y)>=(o.y-u.y)*(s.x-u.x))n.pop();else break}n.push(s)}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 dG=LO,hG=jO,fG=MO,UO=FO;const pG=dG,mG=hG,gG=fG,HO=C.forwardRef(({className:e,sideOffset:t=4,...n},a)=>r.jsx(UO,{ref:a,sideOffset:t,className:Te("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}));HO.displayName=UO.displayName;const bG="sidebar_state",vG=3600*24*7,xG="16rem",yG="18rem",EG="3rem",_G="b",$O=C.createContext(null);function em(){const e=C.useContext($O);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const zO=C.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:a,style:s,children:o,...u},c)=>{const d=OI(),[h,p]=C.useState(!1),[m,b]=C.useState(e),x=t??m,w=C.useCallback(_=>{const E=typeof _=="function"?_(x):_;n?n(E):b(E),document.cookie=`${bG}=${E}; path=/; max-age=${vG}`},[n,x]),S=C.useCallback(()=>d?p(_=>!_):w(_=>!_),[d,w,p]);C.useEffect(()=>{const _=E=>{E.key===_G&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),S())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[S]);const g=x?"expanded":"collapsed",y=C.useMemo(()=>({state:g,open:x,setOpen:w,isMobile:d,openMobile:h,setOpenMobile:p,toggleSidebar:S}),[g,x,w,d,h,p,S]);return r.jsx($O.Provider,{value:y,children:r.jsx(pG,{delayDuration:0,children:r.jsx("div",{style:{"--sidebar-width":xG,"--sidebar-width-icon":EG,...s},className:Te("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",a),ref:c,...u,children:o})})})});zO.displayName="SidebarProvider";const GO=C.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:a,children:s,...o},u)=>{const{isMobile:c,state:d,openMobile:h,setOpenMobile:p}=em();return n==="none"?r.jsx("div",{className:Te("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",a),ref:u,...o,children:s}):c?r.jsx(cO,{open:h,onOpenChange:p,...o,children:r.jsxs(Vx,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":yG},side:e,children:[r.jsxs(Yx,{className:"sr-only",children:[r.jsx(Kx,{children:"Sidebar"}),r.jsx(dO,{children:"Displays the mobile sidebar."})]}),r.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):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:Te("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:Te("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",a),...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:s})})]})});GO.displayName="Sidebar";const qO=C.forwardRef(({className:e,onClick:t,...n},a)=>{const{toggleSidebar:s}=em();return r.jsxs(ne,{ref:a,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Te("h-7 w-7",e),onClick:o=>{t?.(o),s()},...n,children:[r.jsx(r9,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});qO.displayName="SidebarTrigger";const SG=C.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:a}=em();return r.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:Te("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})});SG.displayName="SidebarRail";const WO=C.forwardRef(({className:e,...t},n)=>r.jsx("main",{ref:n,className:Te("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}));WO.displayName="SidebarInset";const wG=C.forwardRef(({className:e,...t},n)=>r.jsx(We,{ref:n,"data-sidebar":"input",className:Te("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));wG.displayName="SidebarInput";const VO=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"header",className:Te("flex flex-col gap-2 p-2",e),...t}));VO.displayName="SidebarHeader";const YO=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"footer",className:Te("flex flex-col gap-2 p-2",e),...t}));YO.displayName="SidebarFooter";const CG=C.forwardRef(({className:e,...t},n)=>r.jsx(ea,{ref:n,"data-sidebar":"separator",className:Te("mx-2 w-auto bg-sidebar-border",e),...t}));CG.displayName="SidebarSeparator";const KO=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"content",className:Te("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));KO.displayName="SidebarContent";const Uf=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group",className:Te("relative flex w-full min-w-0 flex-col p-2",e),...t}));Uf.displayName="SidebarGroup";const Hf=C.forwardRef(({className:e,asChild:t=!1,...n},a)=>{const s=t?Wl:"div";return r.jsx(s,{ref:a,"data-sidebar":"group-label",className:Te("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})});Hf.displayName="SidebarGroupLabel";const TG=C.forwardRef(({className:e,asChild:t=!1,...n},a)=>{const s=t?Wl:"button";return r.jsx(s,{ref:a,"data-sidebar":"group-action",className:Te("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})});TG.displayName="SidebarGroupAction";const $f=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group-content",className:Te("w-full text-sm",e),...t}));$f.displayName="SidebarGroupContent";const bl=C.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu",className:Te("flex w-full min-w-0 flex-col gap-1",e),...t}));bl.displayName="SidebarMenu";const vl=C.forwardRef(({className:e,...t},n)=>r.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Te("group/menu-item relative",e),...t}));vl.displayName="SidebarMenuItem";const AG=Yl("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"}}),xl=C.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:a="default",tooltip:s,className:o,...u},c)=>{const d=e?Wl:"button",{isMobile:h,state:p}=em(),m=r.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":a,"data-active":t,className:Te(AG({variant:n,size:a}),o),...u});return s?(typeof s=="string"&&(s={children:s}),r.jsxs(mG,{children:[r.jsx(gG,{asChild:!0,children:m}),r.jsx(HO,{side:"right",align:"center",hidden:p!=="collapsed"||h,...s})]})):m});xl.displayName="SidebarMenuButton";const NG=C.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...a},s)=>{const o=t?Wl:"button";return r.jsx(o,{ref:s,"data-sidebar":"menu-action",className:Te("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),...a})});NG.displayName="SidebarMenuAction";const Nv=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Te("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}));Nv.displayName="SidebarMenuBadge";const kG=C.forwardRef(({className:e,showIcon:t=!1,...n},a)=>{const s=C.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return r.jsxs("div",{ref:a,"data-sidebar":"menu-skeleton",className:Te("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&r.jsx(k2,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r.jsx(k2,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});kG.displayName="SidebarMenuSkeleton";const RG=C.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Te("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}));RG.displayName="SidebarMenuSub";const DG=C.forwardRef(({...e},t)=>r.jsx("li",{ref:t,...e}));DG.displayName="SidebarMenuSubItem";const IG=C.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:a,...s},o)=>{const u=e?Wl:"a";return r.jsx(u,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Te("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",a),...s})});IG.displayName="SidebarMenuSubButton";const OG="1.0.66",LG={version:OG};function jG({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 MG=[{title:"Home",url:"/",icon:LU},{title:"Proposals",url:"/proposals",icon:Ru},{title:"Agents",url:"/agents",icon:Zr},{title:"Code",url:"/code",icon:ci},{title:"Utilities",url:"/utilities",icon:gI}],FG=[{title:"Overview",url:"/context/project",icon:pa},{title:"Architecture",url:"/context/architecture",icon:qu},{title:"Knowledge",url:"/context/knowledge",icon:z7},{title:"Resources",url:"/resources",icon:Hp}],PG=[{title:"Source Control",url:"/git",icon:li},{title:"Terminal",url:"/terminal",icon:Ss},{title:"Schedule",url:"/schedule",icon:oI}],BG=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:t9,external:!0},{title:"Settings",url:"/settings",icon:Ol}];function UG(){const{badges:e}=md();return r.jsxs(GO,{className:"bg-sidebar border-r border-sidebar-border",children:[r.jsx(VO,{children:r.jsx(bl,{children:r.jsx(vl,{children:r.jsx(xl,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:r.jsxs(et,{to:"/",children:[r.jsx(jG,{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",LG.version]})]})]})})})})}),r.jsxs(KO,{children:[r.jsxs(Uf,{children:[r.jsx(Hf,{children:"Main"}),r.jsx($f,{children:r.jsx(bl,{children:MG.map(t=>r.jsxs(vl,{children:[r.jsx(xl,{asChild:!0,children:r.jsxs(et,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),t.title==="Code"&&e.codeSessions>0&&r.jsx(Nv,{className:"bg-blue-600 text-white dark:bg-blue-500",children:e.codeSessions})]},t.title))})})]}),r.jsxs(Uf,{children:[r.jsx(Hf,{children:"Project"}),r.jsx($f,{children:r.jsx(bl,{children:FG.map(t=>r.jsx(vl,{children:r.jsx(xl,{asChild:!0,children:r.jsxs(et,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]}),r.jsxs(Uf,{children:[r.jsx(Hf,{children:"System"}),r.jsx($f,{children:r.jsx(bl,{children:PG.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(vl,{children:[r.jsx(xl,{asChild:!0,children:r.jsxs(et,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),n>0&&r.jsx(Nv,{className:"bg-blue-600 text-white dark:bg-blue-500",children:n})]},t.title)})})})]})]}),r.jsx(YO,{children:r.jsx(bl,{children:BG.map(t=>r.jsx(vl,{children:r.jsx(xl,{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(et,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]})}function kv(e,[t,n]){return Math.min(n,Math.max(t,e))}var HG=C.createContext(void 0);function ec(e){const t=C.useContext(HG);return e||t||"ltr"}function dy(e){const t=C.useRef({value:e,previous:e});return C.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var $G=[" ","Enter","ArrowUp","ArrowDown"],zG=[" ","Enter"],io="Select",[tm,nm,GG]=Mp(io),[tc,Oue]=Ar(io,[GG,Jl]),rm=Jl(),[qG,Ei]=tc(io),[WG,VG]=tc(io),XO=e=>{const{__scopeSelect:t,children:n,open:a,defaultOpen:s,onOpenChange:o,value:u,defaultValue:c,onValueChange:d,dir:h,name:p,autoComplete:m,disabled:b,required:x,form:w}=e,S=rm(t),[g,y]=C.useState(null),[_,E]=C.useState(null),[T,k]=C.useState(!1),N=ec(h),[I,R]=Va({prop:a,defaultProp:s??!1,onChange:o,caller:io}),[M,j]=Va({prop:u,defaultProp:c,onChange:d,caller:io}),P=C.useRef(null),z=g?w||!!g.closest("form"):!0,[U,G]=C.useState(new Set),J=Array.from(U).map(B=>B.props.value).join(";");return r.jsx(iy,{...S,children:r.jsxs(qG,{required:x,scope:t,trigger:g,onTriggerChange:y,valueNode:_,onValueNodeChange:E,valueNodeHasChildren:T,onValueNodeHasChildrenChange:k,contentId:wa(),value:M,onValueChange:j,open:I,onOpenChange:R,dir:N,triggerPointerDownPosRef:P,disabled:b,children:[r.jsx(tm.Provider,{scope:t,children:r.jsx(WG,{scope:e.__scopeSelect,onNativeOptionAdd:C.useCallback(B=>{G(q=>new Set(q).add(B))},[]),onNativeOptionRemove:C.useCallback(B=>{G(q=>{const Y=new Set(q);return Y.delete(B),Y})},[]),children:n})}),z?r.jsxs(y3,{"aria-hidden":!0,required:x,tabIndex:-1,name:p,autoComplete:m,value:M,onChange:B=>j(B.target.value),disabled:b,form:w,children:[M===void 0?r.jsx("option",{value:""}):null,Array.from(U)]},J):null]})})};XO.displayName=io;var ZO="SelectTrigger",QO=C.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...s}=e,o=rm(n),u=Ei(ZO,n),c=u.disabled||a,d=Et(t,u.onTriggerChange),h=nm(n),p=C.useRef("touch"),[m,b,x]=_3(S=>{const g=h().filter(E=>!E.disabled),y=g.find(E=>E.value===u.value),_=S3(g,S,y);_!==void 0&&u.onValueChange(_.value)}),w=S=>{c||(u.onOpenChange(!0),x()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return r.jsx(oy,{asChild:!0,...o,children:r.jsx(ot.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":E3(u.value)?"":void 0,...s,ref:d,onClick:Ge(s.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&w(S)}),onPointerDown:Ge(s.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"&&(w(S),S.preventDefault())}),onKeyDown:Ge(s.onKeyDown,S=>{const g=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&b(S.key),!(g&&S.key===" ")&&$G.includes(S.key)&&(w(),S.preventDefault())})})})});QO.displayName=ZO;var JO="SelectValue",e3=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,children:o,placeholder:u="",...c}=e,d=Ei(JO,n),{onValueNodeHasChildrenChange:h}=d,p=o!==void 0,m=Et(t,d.onValueNodeChange);return nr(()=>{h(p)},[h,p]),r.jsx(ot.span,{...c,ref:m,style:{pointerEvents:"none"},children:E3(d.value)?r.jsx(r.Fragment,{children:u}):o})});e3.displayName=JO;var YG="SelectIcon",t3=C.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...s}=e;return r.jsx(ot.span,{"aria-hidden":!0,...s,ref:t,children:a||"▼"})});t3.displayName=YG;var KG="SelectPortal",n3=e=>r.jsx(gd,{asChild:!0,...e});n3.displayName=KG;var oo="SelectContent",r3=C.forwardRef((e,t)=>{const n=Ei(oo,e.__scopeSelect),[a,s]=C.useState();if(nr(()=>{s(new DocumentFragment)},[]),!n.open){const o=a;return o?ql.createPortal(r.jsx(a3,{scope:e.__scopeSelect,children:r.jsx(tm.Slot,{scope:e.__scopeSelect,children:r.jsx("div",{children:e.children})})}),o):null}return r.jsx(s3,{...e,ref:t})});r3.displayName=oo;var _a=10,[a3,_i]=tc(oo),XG="SelectContentImpl",ZG=ro("SelectContent.RemoveScroll"),s3=C.forwardRef((e,t)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:u,side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:b,collisionPadding:x,sticky:w,hideWhenDetached:S,avoidCollisions:g,...y}=e,_=Ei(oo,n),[E,T]=C.useState(null),[k,N]=C.useState(null),I=Et(t,Z=>T(Z)),[R,M]=C.useState(null),[j,P]=C.useState(null),z=nm(n),[U,G]=C.useState(!1),J=C.useRef(!1);C.useEffect(()=>{if(E)return Hx(E)},[E]),Ux();const B=C.useCallback(Z=>{const[W,...le]=z().map(fe=>fe.ref.current),[he]=le.slice(-1),ce=document.activeElement;for(const fe of Z)if(fe===ce||(fe?.scrollIntoView({block:"nearest"}),fe===W&&k&&(k.scrollTop=0),fe===he&&k&&(k.scrollTop=k.scrollHeight),fe?.focus(),document.activeElement!==ce))return},[z,k]),q=C.useCallback(()=>B([R,E]),[B,R,E]);C.useEffect(()=>{U&&q()},[U,q]);const{onOpenChange:Y,triggerPointerDownPosRef:F}=_;C.useEffect(()=>{if(E){let Z={x:0,y:0};const W=he=>{Z={x:Math.abs(Math.round(he.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(he.pageY)-(F.current?.y??0))}},le=he=>{Z.x<=10&&Z.y<=10?he.preventDefault():E.contains(he.target)||Y(!1),document.removeEventListener("pointermove",W),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",le,{capture:!0})}}},[E,Y,F]),C.useEffect(()=>{const Z=()=>Y(!1);return window.addEventListener("blur",Z),window.addEventListener("resize",Z),()=>{window.removeEventListener("blur",Z),window.removeEventListener("resize",Z)}},[Y]);const[L,V]=_3(Z=>{const W=z().filter(ce=>!ce.disabled),le=W.find(ce=>ce.ref.current===document.activeElement),he=S3(W,Z,le);he&&setTimeout(()=>he.ref.current.focus())}),Q=C.useCallback((Z,W,le)=>{const he=!J.current&&!le;(_.value!==void 0&&_.value===W||he)&&(M(Z),he&&(J.current=!0))},[_.value]),$=C.useCallback(()=>E?.focus(),[E]),ee=C.useCallback((Z,W,le)=>{const he=!J.current&&!le;(_.value!==void 0&&_.value===W||he)&&P(Z)},[_.value]),ae=a==="popper"?Rv:i3,oe=ae===Rv?{side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:b,collisionPadding:x,sticky:w,hideWhenDetached:S,avoidCollisions:g}:{};return r.jsx(a3,{scope:n,content:E,viewport:k,onViewportChange:N,itemRefCallback:Q,selectedItem:R,onItemLeave:$,itemTextRefCallback:ee,focusSelectedItem:q,selectedItemText:j,position:a,isPositioned:U,searchRef:L,children:r.jsx(qp,{as:ZG,allowPinchZoom:!0,children:r.jsx(zp,{asChild:!0,trapped:_.open,onMountAutoFocus:Z=>{Z.preventDefault()},onUnmountAutoFocus:Ge(s,Z=>{_.trigger?.focus({preventScroll:!0}),Z.preventDefault()}),children:r.jsx(Vl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:Z=>Z.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:r.jsx(ae,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:Z=>Z.preventDefault(),...y,...oe,onPlaced:()=>G(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Ge(y.onKeyDown,Z=>{const W=Z.ctrlKey||Z.altKey||Z.metaKey;if(Z.key==="Tab"&&Z.preventDefault(),!W&&Z.key.length===1&&V(Z.key),["ArrowUp","ArrowDown","Home","End"].includes(Z.key)){let he=z().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(Z.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes(Z.key)){const ce=Z.target,fe=he.indexOf(ce);he=he.slice(fe+1)}setTimeout(()=>B(he)),Z.preventDefault()}})})})})})})});s3.displayName=XG;var QG="SelectItemAlignedPosition",i3=C.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...s}=e,o=Ei(oo,n),u=_i(oo,n),[c,d]=C.useState(null),[h,p]=C.useState(null),m=Et(t,I=>p(I)),b=nm(n),x=C.useRef(!1),w=C.useRef(!0),{viewport:S,selectedItem:g,selectedItemText:y,focusSelectedItem:_}=u,E=C.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&h&&S&&g&&y){const I=o.trigger.getBoundingClientRect(),R=h.getBoundingClientRect(),M=o.valueNode.getBoundingClientRect(),j=y.getBoundingClientRect();if(o.dir!=="rtl"){const ce=j.left-R.left,fe=M.left-ce,Ue=I.left-fe,Re=I.width+Ue,it=Math.max(Re,R.width),lt=window.innerWidth-_a,Oe=kv(fe,[_a,Math.max(_a,lt-it)]);c.style.minWidth=Re+"px",c.style.left=Oe+"px"}else{const ce=R.right-j.right,fe=window.innerWidth-M.right-ce,Ue=window.innerWidth-I.right-fe,Re=I.width+Ue,it=Math.max(Re,R.width),lt=window.innerWidth-_a,Oe=kv(fe,[_a,Math.max(_a,lt-it)]);c.style.minWidth=Re+"px",c.style.right=Oe+"px"}const P=b(),z=window.innerHeight-_a*2,U=S.scrollHeight,G=window.getComputedStyle(h),J=parseInt(G.borderTopWidth,10),B=parseInt(G.paddingTop,10),q=parseInt(G.borderBottomWidth,10),Y=parseInt(G.paddingBottom,10),F=J+B+U+Y+q,L=Math.min(g.offsetHeight*5,F),V=window.getComputedStyle(S),Q=parseInt(V.paddingTop,10),$=parseInt(V.paddingBottom,10),ee=I.top+I.height/2-_a,ae=z-ee,oe=g.offsetHeight/2,Z=g.offsetTop+oe,W=J+B+Z,le=F-W;if(W<=ee){const ce=P.length>0&&g===P[P.length-1].ref.current;c.style.bottom="0px";const fe=h.clientHeight-S.offsetTop-S.offsetHeight,Ue=Math.max(ae,oe+(ce?$:0)+fe+q),Re=W+Ue;c.style.height=Re+"px"}else{const ce=P.length>0&&g===P[0].ref.current;c.style.top="0px";const Ue=Math.max(ee,J+S.offsetTop+(ce?Q:0)+oe)+le;c.style.height=Ue+"px",S.scrollTop=W-ee+S.offsetTop}c.style.margin=`${_a}px 0`,c.style.minHeight=L+"px",c.style.maxHeight=z+"px",a?.(),requestAnimationFrame(()=>x.current=!0)}},[b,o.trigger,o.valueNode,c,h,S,g,y,o.dir,a]);nr(()=>E(),[E]);const[T,k]=C.useState();nr(()=>{h&&k(window.getComputedStyle(h).zIndex)},[h]);const N=C.useCallback(I=>{I&&w.current===!0&&(E(),_?.(),w.current=!1)},[E,_]);return r.jsx(eq,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:x,onScrollButtonChange:N,children:r.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:r.jsx(ot.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});i3.displayName=QG;var JG="SelectPopperPosition",Rv=C.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:s=_a,...o}=e,u=rm(n);return r.jsx(ly,{...u,...o,ref:t,align:a,collisionPadding:s,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)"}})});Rv.displayName=JG;var[eq,hy]=tc(oo,{}),Dv="SelectViewport",o3=C.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...s}=e,o=_i(Dv,n),u=hy(Dv,n),c=Et(t,o.onViewportChange),d=C.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:a}),r.jsx(tm.Slot,{scope:n,children:r.jsx(ot.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Ge(s.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:b}=u;if(b?.current&&m){const x=Math.abs(d.current-p.scrollTop);if(x>0){const w=window.innerHeight-_a*2,S=parseFloat(m.style.minHeight),g=parseFloat(m.style.height),y=Math.max(S,g);if(y<w){const _=y+x,E=Math.min(w,_),T=_-E;m.style.height=E+"px",m.style.bottom==="0px"&&(p.scrollTop=T>0?T:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});o3.displayName=Dv;var l3="SelectGroup",[tq,nq]=tc(l3),rq=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=wa();return r.jsx(tq,{scope:n,id:s,children:r.jsx(ot.div,{role:"group","aria-labelledby":s,...a,ref:t})})});rq.displayName=l3;var c3="SelectLabel",u3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=nq(c3,n);return r.jsx(ot.div,{id:s.id,...a,ref:t})});u3.displayName=c3;var lp="SelectItem",[aq,d3]=tc(lp),h3=C.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:s=!1,textValue:o,...u}=e,c=Ei(lp,n),d=_i(lp,n),h=c.value===a,[p,m]=C.useState(o??""),[b,x]=C.useState(!1),w=Et(t,_=>d.itemRefCallback?.(_,a,s)),S=wa(),g=C.useRef("touch"),y=()=>{s||(c.onValueChange(a),c.onOpenChange(!1))};if(a==="")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(aq,{scope:n,value:a,disabled:s,textId:S,isSelected:h,onItemTextChange:C.useCallback(_=>{m(E=>E||(_?.textContent??"").trim())},[]),children:r.jsx(tm.ItemSlot,{scope:n,value:a,disabled:s,textValue:p,children:r.jsx(ot.div,{role:"option","aria-labelledby":S,"data-highlighted":b?"":void 0,"aria-selected":h&&b,"data-state":h?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...u,ref:w,onFocus:Ge(u.onFocus,()=>x(!0)),onBlur:Ge(u.onBlur,()=>x(!1)),onClick:Ge(u.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:Ge(u.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:Ge(u.onPointerDown,_=>{g.current=_.pointerType}),onPointerMove:Ge(u.onPointerMove,_=>{g.current=_.pointerType,s?d.onItemLeave?.():g.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ge(u.onPointerLeave,_=>{_.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Ge(u.onKeyDown,_=>{d.searchRef?.current!==""&&_.key===" "||(zG.includes(_.key)&&y(),_.key===" "&&_.preventDefault())})})})})});h3.displayName=lp;var Cu="SelectItemText",f3=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,...o}=e,u=Ei(Cu,n),c=_i(Cu,n),d=d3(Cu,n),h=VG(Cu,n),[p,m]=C.useState(null),b=Et(t,y=>m(y),d.onItemTextChange,y=>c.itemTextRefCallback?.(y,d.value,d.disabled)),x=p?.textContent,w=C.useMemo(()=>r.jsx("option",{value:d.value,disabled:d.disabled,children:x},d.value),[d.disabled,d.value,x]),{onNativeOptionAdd:S,onNativeOptionRemove:g}=h;return nr(()=>(S(w),()=>g(w)),[S,g,w]),r.jsxs(r.Fragment,{children:[r.jsx(ot.span,{id:d.textId,...o,ref:b}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?ql.createPortal(o.children,u.valueNode):null]})});f3.displayName=Cu;var p3="SelectItemIndicator",m3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return d3(p3,n).isSelected?r.jsx(ot.span,{"aria-hidden":!0,...a,ref:t}):null});m3.displayName=p3;var Iv="SelectScrollUpButton",g3=C.forwardRef((e,t)=>{const n=_i(Iv,e.__scopeSelect),a=hy(Iv,e.__scopeSelect),[s,o]=C.useState(!1),u=Et(t,a.onScrollButtonChange);return nr(()=>{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]),s?r.jsx(v3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});g3.displayName=Iv;var Ov="SelectScrollDownButton",b3=C.forwardRef((e,t)=>{const n=_i(Ov,e.__scopeSelect),a=hy(Ov,e.__scopeSelect),[s,o]=C.useState(!1),u=Et(t,a.onScrollButtonChange);return nr(()=>{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]),s?r.jsx(v3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});b3.displayName=Ov;var v3=C.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...s}=e,o=_i("SelectScrollButton",n),u=C.useRef(null),c=nm(n),d=C.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return C.useEffect(()=>()=>d(),[d]),nr(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),r.jsx(ot.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:Ge(s.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(a,50))}),onPointerMove:Ge(s.onPointerMove,()=>{o.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(a,50))}),onPointerLeave:Ge(s.onPointerLeave,()=>{d()})})}),sq="SelectSeparator",x3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return r.jsx(ot.div,{"aria-hidden":!0,...a,ref:t})});x3.displayName=sq;var Lv="SelectArrow",iq=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=rm(n),o=Ei(Lv,n),u=_i(Lv,n);return o.open&&u.position==="popper"?r.jsx(cy,{...s,...a,ref:t}):null});iq.displayName=Lv;var oq="SelectBubbleInput",y3=C.forwardRef(({__scopeSelect:e,value:t,...n},a)=>{const s=C.useRef(null),o=Et(a,s),u=dy(t);return C.useEffect(()=>{const c=s.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(ot.select,{...n,style:{...PD,...n.style},ref:o,defaultValue:t})});y3.displayName=oq;function E3(e){return e===""||e===void 0}function _3(e){const t=kn(e),n=C.useRef(""),a=C.useRef(0),s=C.useCallback(u=>{const c=n.current+u;t(c),(function d(h){n.current=h,window.clearTimeout(a.current),h!==""&&(a.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),o=C.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,s,o]}function S3(e,t,n){const s=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let u=lq(e,Math.max(o,0));s.length===1&&(u=u.filter(h=>h!==n));const d=u.find(h=>h.textValue.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function lq(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var cq=XO,w3=QO,uq=e3,dq=t3,hq=n3,C3=r3,fq=o3,T3=u3,A3=h3,pq=f3,mq=m3,N3=g3,k3=b3,R3=x3;const an=cq,sn=uq,Qt=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(w3,{ref:a,className:Te("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(dq,{asChild:!0,children:r.jsx(di,{className:"h-4 w-4 opacity-50"})})]}));Qt.displayName=w3.displayName;const D3=C.forwardRef(({className:e,...t},n)=>r.jsx(N3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Ix,{className:"h-4 w-4"})}));D3.displayName=N3.displayName;const I3=C.forwardRef(({className:e,...t},n)=>r.jsx(k3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(di,{className:"h-4 w-4"})}));I3.displayName=k3.displayName;const Jt=C.forwardRef(({className:e,children:t,position:n="popper",...a},s)=>r.jsx(hq,{children:r.jsxs(C3,{ref:s,className:Te("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,...a,children:[r.jsx(D3,{}),r.jsx(fq,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(I3,{})]})}));Jt.displayName=C3.displayName;const gq=C.forwardRef(({className:e,...t},n)=>r.jsx(T3,{ref:n,className:Te("px-2 py-1.5 text-sm font-semibold",e),...t}));gq.displayName=T3.displayName;const Le=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(A3,{ref:a,className:Te("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(mq,{children:r.jsx(uo,{className:"h-4 w-4"})})}),r.jsx(pq,{children:t})]}));Le.displayName=A3.displayName;const bq=C.forwardRef(({className:e,...t},n)=>r.jsx(R3,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));bq.displayName=R3.displayName;const Hn=qx,cp=lO,vq=Wx,O3=C.forwardRef(({className:e,...t},n)=>r.jsx(vd,{ref:n,className:Te("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}));O3.displayName=vd.displayName;const Dn=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(vq,{children:[r.jsx(O3,{}),r.jsxs(xd,{ref:a,className:Te("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(Vp,{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(Sr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Dn.displayName=xd.displayName;const Cn=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Cn.displayName="DialogHeader";const wr=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});wr.displayName="DialogFooter";const Tn=C.forwardRef(({className:e,...t},n)=>r.jsx(yd,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));Tn.displayName=yd.displayName;const Un=C.forwardRef(({className:e,...t},n)=>r.jsx(Ed,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));Un.displayName=Ed.displayName;var am="Checkbox",[xq,Lue]=Ar(am),[yq,fy]=xq(am);function Eq(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:s,disabled:o,form:u,name:c,onCheckedChange:d,required:h,value:p="on",internal_do_not_use_render:m}=e,[b,x]=Va({prop:n,defaultProp:s??!1,onChange:d,caller:am}),[w,S]=C.useState(null),[g,y]=C.useState(null),_=C.useRef(!1),E=w?!!u||!!w.closest("form"):!0,T={checked:b,disabled:o,setChecked:x,control:w,setControl:S,name:c,form:u,value:p,hasConsumerStoppedPropagationRef:_,required:h,defaultChecked:pi(s)?!1:s,isFormControl:E,bubbleInput:g,setBubbleInput:y};return r.jsx(yq,{scope:t,...T,children:_q(m)?m(T):a})}var L3="CheckboxTrigger",j3=C.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},s)=>{const{control:o,value:u,disabled:c,checked:d,required:h,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:b,isFormControl:x,bubbleInput:w}=fy(L3,e),S=Et(s,p),g=C.useRef(d);return C.useEffect(()=>{const y=o?.form;if(y){const _=()=>m(g.current);return y.addEventListener("reset",_),()=>y.removeEventListener("reset",_)}},[o,m]),r.jsx(ot.button,{type:"button",role:"checkbox","aria-checked":pi(d)?"mixed":d,"aria-required":h,"data-state":U3(d),"data-disabled":c?"":void 0,disabled:c,value:u,...a,ref:S,onKeyDown:Ge(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Ge(n,y=>{m(_=>pi(_)?!0:!_),w&&x&&(b.current=y.isPropagationStopped(),b.current||y.stopPropagation())})})});j3.displayName=L3;var py=C.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:s,defaultChecked:o,required:u,disabled:c,value:d,onCheckedChange:h,form:p,...m}=e;return r.jsx(Eq,{__scopeCheckbox:n,checked:s,defaultChecked:o,disabled:c,required:u,onCheckedChange:h,name:a,form:p,value:d,internal_do_not_use_render:({isFormControl:b})=>r.jsxs(r.Fragment,{children:[r.jsx(j3,{...m,ref:t,__scopeCheckbox:n}),b&&r.jsx(B3,{__scopeCheckbox:n})]})})});py.displayName=am;var M3="CheckboxIndicator",F3=C.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...s}=e,o=fy(M3,n);return r.jsx(ur,{present:a||pi(o.checked)||o.checked===!0,children:r.jsx(ot.span,{"data-state":U3(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});F3.displayName=M3;var P3="CheckboxBubbleInput",B3=C.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:u,required:c,disabled:d,name:h,value:p,form:m,bubbleInput:b,setBubbleInput:x}=fy(P3,e),w=Et(n,x),S=dy(o),g=ry(a);C.useEffect(()=>{const _=b;if(!_)return;const E=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(E,"checked").set,N=!s.current;if(S!==o&&k){const I=new Event("click",{bubbles:N});_.indeterminate=pi(o),k.call(_,pi(o)?!1:o),_.dispatchEvent(I)}},[b,S,o,s]);const y=C.useRef(pi(o)?!1:o);return r.jsx(ot.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??y.current,required:c,disabled:d,name:h,value:p,form:m,...t,tabIndex:-1,ref:w,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});B3.displayName=P3;function _q(e){return typeof e=="function"}function pi(e){return e==="indeterminate"}function U3(e){return pi(e)?"indeterminate":e?"checked":"unchecked"}const Wa=C.forwardRef(({className:e,...t},n)=>r.jsx(py,{ref:n,className:Te("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(F3,{className:Te("flex items-center justify-center text-current"),children:r.jsx(uo,{className:"h-4 w-4"})})}));Wa.displayName=py.displayName;const mi=C.forwardRef(({className:e,onCheckedChange:t,onChange:n,...a},s)=>{const o=u=>{n?.(u),t?.(u.target.checked)};return r.jsxs("label",{className:Te("relative inline-flex cursor-pointer",e),children:[r.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:o,ref:s,...a}),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"})]})});mi.displayName="Switch";function Sq(e,t){return C.useReducer((n,a)=>t[n][a]??n,e)}var my="ScrollArea",[H3,jue]=Ar(my),[wq,ga]=H3(my),$3=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:a="hover",dir:s,scrollHideDelay:o=600,...u}=e,[c,d]=C.useState(null),[h,p]=C.useState(null),[m,b]=C.useState(null),[x,w]=C.useState(null),[S,g]=C.useState(null),[y,_]=C.useState(0),[E,T]=C.useState(0),[k,N]=C.useState(!1),[I,R]=C.useState(!1),M=Et(t,P=>d(P)),j=ec(s);return r.jsx(wq,{scope:n,type:a,dir:j,scrollHideDelay:o,scrollArea:c,viewport:h,onViewportChange:p,content:m,onContentChange:b,scrollbarX:x,onScrollbarXChange:w,scrollbarXEnabled:k,onScrollbarXEnabledChange:N,scrollbarY:S,onScrollbarYChange:g,scrollbarYEnabled:I,onScrollbarYEnabledChange:R,onCornerWidthChange:_,onCornerHeightChange:T,children:r.jsx(ot.div,{dir:j,...u,ref:M,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});$3.displayName=my;var z3="ScrollAreaViewport",G3=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:a,nonce:s,...o}=e,u=ga(z3,n),c=C.useRef(null),d=Et(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:s}),r.jsx(ot.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:a})})]})});G3.displayName=z3;var Ja="ScrollAreaScrollbar",gy=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=ga(Ja,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:u}=s,c=e.orientation==="horizontal";return C.useEffect(()=>(c?o(!0):u(!0),()=>{c?o(!1):u(!1)}),[c,o,u]),s.type==="hover"?r.jsx(Cq,{...a,ref:t,forceMount:n}):s.type==="scroll"?r.jsx(Tq,{...a,ref:t,forceMount:n}):s.type==="auto"?r.jsx(q3,{...a,ref:t,forceMount:n}):s.type==="always"?r.jsx(by,{...a,ref:t}):null});gy.displayName=Ja;var Cq=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=ga(Ja,e.__scopeScrollArea),[o,u]=C.useState(!1);return C.useEffect(()=>{const c=s.scrollArea;let d=0;if(c){const h=()=>{window.clearTimeout(d),u(!0)},p=()=>{d=window.setTimeout(()=>u(!1),s.scrollHideDelay)};return c.addEventListener("pointerenter",h),c.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",h),c.removeEventListener("pointerleave",p)}}},[s.scrollArea,s.scrollHideDelay]),r.jsx(ur,{present:n||o,children:r.jsx(q3,{"data-state":o?"visible":"hidden",...a,ref:t})})}),Tq=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=ga(Ja,e.__scopeScrollArea),o=e.orientation==="horizontal",u=im(()=>d("SCROLL_END"),100),[c,d]=Sq("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 C.useEffect(()=>{if(c==="idle"){const h=window.setTimeout(()=>d("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(h)}},[c,s.scrollHideDelay,d]),C.useEffect(()=>{const h=s.viewport,p=o?"scrollLeft":"scrollTop";if(h){let m=h[p];const b=()=>{const x=h[p];m!==x&&(d("SCROLL"),u()),m=x};return h.addEventListener("scroll",b),()=>h.removeEventListener("scroll",b)}},[s.viewport,o,d,u]),r.jsx(ur,{present:n||c!=="hidden",children:r.jsx(by,{"data-state":c==="hidden"?"hidden":"visible",...a,ref:t,onPointerEnter:Ge(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ge(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),q3=C.forwardRef((e,t)=>{const n=ga(Ja,e.__scopeScrollArea),{forceMount:a,...s}=e,[o,u]=C.useState(!1),c=e.orientation==="horizontal",d=im(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;u(c?h:p)}},10);return Ml(n.viewport,d),Ml(n.content,d),r.jsx(ur,{present:a||o,children:r.jsx(by,{"data-state":o?"visible":"hidden",...s,ref:t})})}),by=C.forwardRef((e,t)=>{const{orientation:n="vertical",...a}=e,s=ga(Ja,e.__scopeScrollArea),o=C.useRef(null),u=C.useRef(0),[c,d]=C.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=X3(c.viewport,c.content),p={...a,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,x){return Iq(b,u.current,c,x)}return n==="horizontal"?r.jsx(Aq,{...p,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const b=s.viewport.scrollLeft,x=U2(b,c,s.dir);o.current.style.transform=`translate3d(${x}px, 0, 0)`}},onWheelScroll:b=>{s.viewport&&(s.viewport.scrollLeft=b)},onDragScroll:b=>{s.viewport&&(s.viewport.scrollLeft=m(b,s.dir))}}):n==="vertical"?r.jsx(Nq,{...p,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const b=s.viewport.scrollTop,x=U2(b,c);o.current.style.transform=`translate3d(0, ${x}px, 0)`}},onWheelScroll:b=>{s.viewport&&(s.viewport.scrollTop=b)},onDragScroll:b=>{s.viewport&&(s.viewport.scrollTop=m(b))}}):null}),Aq=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...s}=e,o=ga(Ja,e.__scopeScrollArea),[u,c]=C.useState(),d=C.useRef(null),h=Et(t,d,o.onScrollbarXChange);return C.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(V3,{"data-orientation":"horizontal",...s,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":sm(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),Q3(b,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&a({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:dp(u.paddingLeft),paddingEnd:dp(u.paddingRight)}})}})}),Nq=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...s}=e,o=ga(Ja,e.__scopeScrollArea),[u,c]=C.useState(),d=C.useRef(null),h=Et(t,d,o.onScrollbarYChange);return C.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(V3,{"data-orientation":"vertical",...s,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":sm(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),Q3(b,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&a({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:dp(u.paddingTop),paddingEnd:dp(u.paddingBottom)}})}})}),[kq,W3]=H3(Ja),V3=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:a,hasThumb:s,onThumbChange:o,onThumbPointerUp:u,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:p,onResize:m,...b}=e,x=ga(Ja,n),[w,S]=C.useState(null),g=Et(t,M=>S(M)),y=C.useRef(null),_=C.useRef(""),E=x.viewport,T=a.content-a.viewport,k=kn(p),N=kn(d),I=im(m,10);function R(M){if(y.current){const j=M.clientX-y.current.left,P=M.clientY-y.current.top;h({x:j,y:P})}}return C.useEffect(()=>{const M=j=>{const P=j.target;w?.contains(P)&&k(j,T)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[E,w,T,k]),C.useEffect(N,[a,N]),Ml(w,I),Ml(x.content,I),r.jsx(kq,{scope:n,scrollbar:w,hasThumb:s,onThumbChange:kn(o),onThumbPointerUp:kn(u),onThumbPositionChange:N,onThumbPointerDown:kn(c),children:r.jsx(ot.div,{...b,ref:g,style:{position:"absolute",...b.style},onPointerDown:Ge(e.onPointerDown,M=>{M.button===0&&(M.target.setPointerCapture(M.pointerId),y.current=w.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),R(M))}),onPointerMove:Ge(e.onPointerMove,R),onPointerUp:Ge(e.onPointerUp,M=>{const j=M.target;j.hasPointerCapture(M.pointerId)&&j.releasePointerCapture(M.pointerId),document.body.style.webkitUserSelect=_.current,x.viewport&&(x.viewport.style.scrollBehavior=""),y.current=null})})})}),up="ScrollAreaThumb",Y3=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=W3(up,e.__scopeScrollArea);return r.jsx(ur,{present:n||s.hasThumb,children:r.jsx(Rq,{ref:t,...a})})}),Rq=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:a,...s}=e,o=ga(up,n),u=W3(up,n),{onThumbPositionChange:c}=u,d=Et(t,m=>u.onThumbChange(m)),h=C.useRef(void 0),p=im(()=>{h.current&&(h.current(),h.current=void 0)},100);return C.useEffect(()=>{const m=o.viewport;if(m){const b=()=>{if(p(),!h.current){const x=Oq(m,c);h.current=x,c()}};return c(),m.addEventListener("scroll",b),()=>m.removeEventListener("scroll",b)}},[o.viewport,p,c]),r.jsx(ot.div,{"data-state":u.hasThumb?"visible":"hidden",...s,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:Ge(e.onPointerDownCapture,m=>{const x=m.target.getBoundingClientRect(),w=m.clientX-x.left,S=m.clientY-x.top;u.onThumbPointerDown({x:w,y:S})}),onPointerUp:Ge(e.onPointerUp,u.onThumbPointerUp)})});Y3.displayName=up;var vy="ScrollAreaCorner",K3=C.forwardRef((e,t)=>{const n=ga(vy,e.__scopeScrollArea),a=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&a?r.jsx(Dq,{...e,ref:t}):null});K3.displayName=vy;var Dq=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,...a}=e,s=ga(vy,n),[o,u]=C.useState(0),[c,d]=C.useState(0),h=!!(o&&c);return Ml(s.scrollbarX,()=>{const p=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(p),d(p)}),Ml(s.scrollbarY,()=>{const p=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(p),u(p)}),h?r.jsx(ot.div,{...a,ref:t,style:{width:o,height:c,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function dp(e){return e?parseInt(e,10):0}function X3(e,t){const n=e/t;return isNaN(n)?0:n}function sm(e){const t=X3(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,a=(e.scrollbar.size-n)*t;return Math.max(a,18)}function Iq(e,t,n,a="ltr"){const s=sm(n),o=s/2,u=t||o,c=s-u,d=n.scrollbar.paddingStart+u,h=n.scrollbar.size-n.scrollbar.paddingEnd-c,p=n.content-n.viewport,m=a==="ltr"?[0,p]:[p*-1,0];return Z3([d,h],m)(e)}function U2(e,t,n="ltr"){const a=sm(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,u=t.content-t.viewport,c=o-a,d=n==="ltr"?[0,u]:[u*-1,0],h=kv(e,d);return Z3([0,u],[0,c])(h)}function Z3(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(n-e[0])}}function Q3(e,t){return e>0&&e<t}var Oq=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},a=0;return(function s(){const o={left:e.scrollLeft,top:e.scrollTop},u=n.left!==o.left,c=n.top!==o.top;(u||c)&&t(),n=o,a=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(a)};function im(e,t){const n=kn(e),a=C.useRef(0);return C.useEffect(()=>()=>window.clearTimeout(a.current),[]),C.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(n,t)},[n,t])}function Ml(e,t){const n=kn(t);nr(()=>{let a=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(a),a=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(a),s.unobserve(e)}}},[e,n])}var J3=$3,Lq=G3,jq=K3;const Na=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(J3,{ref:a,className:Te("relative overflow-hidden",e),...n,children:[r.jsx(Lq,{className:"h-full w-full rounded-[inherit]",children:t}),r.jsx(eL,{}),r.jsx(jq,{})]}));Na.displayName=J3.displayName;const eL=C.forwardRef(({className:e,orientation:t="vertical",...n},a)=>r.jsx(gy,{ref:a,orientation:t,className:Te("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(Y3,{className:"relative flex-1 rounded-full bg-border"})}));eL.displayName=gy.displayName;function Ku(e){const t=[],n=String(e||"");let a=n.indexOf(","),s=0,o=!1;for(;!o;){a===-1&&(a=n.length,o=!0);const u=n.slice(s,a).trim();(u||!o)&&t.push(u),s=a+1,a=n.indexOf(",",s)}return t}function om(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Mq=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fq=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pq={};function H2(e,t){return(Pq.jsx?Fq:Mq).test(e)}const Bq=/[ \t\n\f\r]/g;function Sd(e){return typeof e=="object"?e.type==="text"?$2(e.value):!1:$2(e)}function $2(e){return e.replace(Bq,"")===""}let wd=class{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}};wd.prototype.normal={};wd.prototype.property={};wd.prototype.space=void 0;function tL(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new wd(n,a,t)}function Xu(e){return e.toLowerCase()}let Mr=class{constructor(t,n){this.attribute=n,this.property=t}};Mr.prototype.attribute="";Mr.prototype.booleanish=!1;Mr.prototype.boolean=!1;Mr.prototype.commaOrSpaceSeparated=!1;Mr.prototype.commaSeparated=!1;Mr.prototype.defined=!1;Mr.prototype.mustUseProperty=!1;Mr.prototype.number=!1;Mr.prototype.overloadedBoolean=!1;Mr.prototype.property="";Mr.prototype.spaceSeparated=!1;Mr.prototype.space=void 0;let Uq=0;const Nt=fo(),Pn=fo(),jv=fo(),$e=fo(),dn=fo(),wl=fo(),Vr=fo();function fo(){return 2**++Uq}const Mv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Nt,booleanish:Pn,commaOrSpaceSeparated:Vr,commaSeparated:wl,number:$e,overloadedBoolean:jv,spaceSeparated:dn},Symbol.toStringTag,{value:"Module"})),E0=Object.keys(Mv);let xy=class extends Mr{constructor(t,n,a,s){let o=-1;if(super(t,n),z2(this,"space",s),typeof a=="number")for(;++o<E0.length;){const u=E0[o];z2(this,E0[o],(a&Mv[u])===Mv[u])}}};xy.prototype.defined=!0;function z2(e,t,n){n&&(e[t]=n)}function nc(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new xy(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[Xu(a)]=a,n[Xu(o.attribute)]=a}return new wd(t,n,e.space)}const nL=nc({properties:{ariaActiveDescendant:null,ariaAtomic:Pn,ariaAutoComplete:null,ariaBusy:Pn,ariaChecked:Pn,ariaColCount:$e,ariaColIndex:$e,ariaColSpan:$e,ariaControls:dn,ariaCurrent:null,ariaDescribedBy:dn,ariaDetails:null,ariaDisabled:Pn,ariaDropEffect:dn,ariaErrorMessage:null,ariaExpanded:Pn,ariaFlowTo:dn,ariaGrabbed:Pn,ariaHasPopup:null,ariaHidden:Pn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dn,ariaLevel:$e,ariaLive:null,ariaModal:Pn,ariaMultiLine:Pn,ariaMultiSelectable:Pn,ariaOrientation:null,ariaOwns:dn,ariaPlaceholder:null,ariaPosInSet:$e,ariaPressed:Pn,ariaReadOnly:Pn,ariaRelevant:null,ariaRequired:Pn,ariaRoleDescription:dn,ariaRowCount:$e,ariaRowIndex:$e,ariaRowSpan:$e,ariaSelected:Pn,ariaSetSize:$e,ariaSort:null,ariaValueMax:$e,ariaValueMin:$e,ariaValueNow:$e,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function rL(e,t){return t in e?e[t]:t}function aL(e,t){return rL(e,t.toLowerCase())}const Hq=nc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:wl,acceptCharset:dn,accessKey:dn,action:null,allow:null,allowFullScreen:Nt,allowPaymentRequest:Nt,allowUserMedia:Nt,alt:null,as:null,async:Nt,autoCapitalize:null,autoComplete:dn,autoFocus:Nt,autoPlay:Nt,blocking:dn,capture:null,charSet:null,checked:Nt,cite:null,className:dn,cols:$e,colSpan:null,content:null,contentEditable:Pn,controls:Nt,controlsList:dn,coords:$e|wl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Nt,defer:Nt,dir:null,dirName:null,disabled:Nt,download:jv,draggable:Pn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Nt,formTarget:null,headers:dn,height:$e,hidden:jv,high:$e,href:null,hrefLang:null,htmlFor:dn,httpEquiv:dn,id:null,imageSizes:null,imageSrcSet:null,inert:Nt,inputMode:null,integrity:null,is:null,isMap:Nt,itemId:null,itemProp:dn,itemRef:dn,itemScope:Nt,itemType:dn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Nt,low:$e,manifest:null,max:null,maxLength:$e,media:null,method:null,min:null,minLength:$e,multiple:Nt,muted:Nt,name:null,nonce:null,noModule:Nt,noValidate:Nt,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:Nt,optimum:$e,pattern:null,ping:dn,placeholder:null,playsInline:Nt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Nt,referrerPolicy:null,rel:dn,required:Nt,reversed:Nt,rows:$e,rowSpan:$e,sandbox:dn,scope:null,scoped:Nt,seamless:Nt,selected:Nt,shadowRootClonable:Nt,shadowRootDelegatesFocus:Nt,shadowRootMode:null,shape:null,size:$e,sizes:null,slot:null,span:$e,spellCheck:Pn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$e,step:null,style:null,tabIndex:$e,target:null,title:null,translate:null,type:null,typeMustMatch:Nt,useMap:null,value:Pn,width:$e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dn,axis:null,background:null,bgColor:null,border:$e,borderColor:null,bottomMargin:$e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Nt,declare:Nt,event:null,face:null,frame:null,frameBorder:null,hSpace:$e,leftMargin:$e,link:null,longDesc:null,lowSrc:null,marginHeight:$e,marginWidth:$e,noResize:Nt,noHref:Nt,noShade:Nt,noWrap:Nt,object:null,profile:null,prompt:null,rev:null,rightMargin:$e,rules:null,scheme:null,scrolling:Pn,standby:null,summary:null,text:null,topMargin:$e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Nt,disableRemotePlayback:Nt,prefix:null,property:null,results:$e,security:null,unselectable:null},space:"html",transform:aL}),$q=nc({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:Vr,accentHeight:$e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$e,amplitude:$e,arabicForm:null,ascent:$e,attributeName:null,attributeType:null,azimuth:$e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$e,by:null,calcMode:null,capHeight:$e,className:dn,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:$e,diffuseConstant:$e,direction:null,display:null,dur:null,divisor:$e,dominantBaseline:null,download:Nt,dx:null,dy:null,edgeMode:null,editable:null,elevation:$e,enableBackground:null,end:null,event:null,exponent:$e,externalResourcesRequired:null,fill:null,fillOpacity:$e,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:wl,g2:wl,glyphName:wl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$e,horizOriginX:$e,horizOriginY:$e,id:null,ideographic:$e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$e,k:$e,k1:$e,k2:$e,k3:$e,k4:$e,kernelMatrix:Vr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$e,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:$e,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:$e,overlineThickness:$e,paintOrder:null,panose1:null,path:null,pathLength:$e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$e,pointsAtY:$e,pointsAtZ:$e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Vr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Vr,rev:Vr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Vr,requiredFeatures:Vr,requiredFonts:Vr,requiredFormats:Vr,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:$e,specularExponent:$e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$e,strikethroughThickness:$e,string:null,stroke:null,strokeDashArray:Vr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$e,strokeOpacity:$e,strokeWidth:null,style:null,surfaceScale:$e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Vr,tabIndex:$e,tableValues:null,target:null,targetX:$e,targetY:$e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Vr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$e,underlineThickness:$e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$e,values:null,vAlphabetic:$e,vMathematical:$e,vectorEffect:null,vHanging:$e,vIdeographic:$e,version:null,vertAdvY:$e,vertOriginX:$e,vertOriginY:$e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rL}),sL=nc({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()}}),iL=nc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:aL}),oL=nc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zq={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"},Gq=/[A-Z]/g,G2=/-[a-z]/g,qq=/^data[-\w.:]+$/i;function Cd(e,t){const n=Xu(t);let a=t,s=Mr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qq.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(G2,Vq);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!G2.test(o)){let u=o.replace(Gq,Wq);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=xy}return new s(a,t)}function Wq(e){return"-"+e.toLowerCase()}function Vq(e){return e.charAt(1).toUpperCase()}const rc=tL([nL,Hq,sL,iL,oL],"html"),ks=tL([nL,$q,sL,iL,oL],"svg");function Zu(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function lm(e){return e.join(" ").trim()}var dl={},_0,q2;function Yq(){if(q2)return _0;q2=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
560
560
|
`,h="/",p="*",m="",b="comment",x="declaration";_0=function(S,g){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];g=g||{};var y=1,_=1;function E(U){var G=U.match(t);G&&(y+=G.length);var J=U.lastIndexOf(d);_=~J?U.length-J:_+U.length}function T(){var U={line:y,column:_};return function(G){return G.position=new k(U),R(),G}}function k(U){this.start=U,this.end={line:y,column:_},this.source=g.source}k.prototype.content=S;function N(U){var G=new Error(g.source+":"+y+":"+_+": "+U);if(G.reason=U,G.filename=g.source,G.line=y,G.column=_,G.source=S,!g.silent)throw G}function I(U){var G=U.exec(S);if(G){var J=G[0];return E(J),S=S.slice(J.length),G}}function R(){I(n)}function M(U){var G;for(U=U||[];G=j();)G!==!1&&U.push(G);return U}function j(){var U=T();if(!(h!=S.charAt(0)||p!=S.charAt(1))){for(var G=2;m!=S.charAt(G)&&(p!=S.charAt(G)||h!=S.charAt(G+1));)++G;if(G+=2,m===S.charAt(G-1))return N("End of comment missing");var J=S.slice(2,G-2);return _+=2,E(J),S=S.slice(G),_+=2,U({type:b,comment:J})}}function P(){var U=T(),G=I(a);if(G){if(j(),!I(s))return N("property missing ':'");var J=I(o),B=U({type:x,property:w(G[0].replace(e,m)),value:J?w(J[0].replace(e,m)):m});return I(u),B}}function z(){var U=[];M(U);for(var G;G=P();)G!==!1&&(U.push(G),M(U));return U}return R(),z()};function w(S){return S?S.replace(c,m):m}return _0}var W2;function Kq(){if(W2)return dl;W2=1;var e=dl&&dl.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(dl,"__esModule",{value:!0}),dl.default=n;var t=e(Yq());function n(a,s){var o=null;if(!a||typeof a!="string")return o;var u=(0,t.default)(a),c=typeof s=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,p=d.value;c?s(h,p,d):p&&(o=o||{},o[h]=p)}}),o}return dl}var mu={},V2;function Xq(){if(V2)return mu;V2=1,Object.defineProperty(mu,"__esModule",{value:!0}),mu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(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(s,c):h=h.replace(a,c),h.replace(t,u))};return mu.camelCase=d,mu}var gu,Y2;function Zq(){if(Y2)return gu;Y2=1;var e=gu&&gu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(Kq()),n=Xq();function a(s,o){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,o)]=d)}),u}return a.default=a,gu=a,gu}var Qq=Zq();const Jq=Ul(Qq),cm=lL("end"),es=lL("start");function lL(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function cL(e){const t=es(e),n=cm(e);if(t&&n)return{start:t,end:n}}function Du(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?K2(e.position):"start"in e||"end"in e?K2(e):"line"in e||"column"in e?Fv(e):""}function Fv(e){return X2(e&&e.line)+":"+X2(e&&e.column)}function K2(e){return Fv(e&&e.start)+"-"+Fv(e&&e.end)}function X2(e){return e&&typeof e=="number"?e:1}class dr extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",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"?s=t:!o.cause&&t&&(u=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const d=a.indexOf(":");d===-1?o.ruleId=a:(o.source=a.slice(0,d),o.ruleId=a.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=s,this.line=c?c.line:void 0,this.name=Du(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}}dr.prototype.file="";dr.prototype.name="";dr.prototype.reason="";dr.prototype.message="";dr.prototype.stack="";dr.prototype.column=void 0;dr.prototype.line=void 0;dr.prototype.ancestors=void 0;dr.prototype.cause=void 0;dr.prototype.fatal=void 0;dr.prototype.place=void 0;dr.prototype.ruleId=void 0;dr.prototype.source=void 0;const yy={}.hasOwnProperty,eW=new Map,tW=/[A-Z]/g,nW=new Set(["table","tbody","thead","tfoot","tr"]),rW=new Set(["td","th"]),uL="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function dL(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=dW(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");a=uW(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,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"?ks:rc,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=hL(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function hL(e,t,n){if(t.type==="element")return aW(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return sW(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return oW(e,t,n);if(t.type==="mdxjsEsm")return iW(e,t);if(t.type==="root")return lW(e,t,n);if(t.type==="text")return cW(e,t)}function aW(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=ks,e.schema=s),e.ancestors.push(t);const o=pL(e,t.tagName,!1),u=hW(e,t);let c=_y(e,t);return nW.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Sd(d):!0})),fL(e,u,o,t),Ey(u,c),e.ancestors.pop(),e.schema=a,e.create(t,o,u,n)}function sW(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}Qu(e,t.position)}function iW(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qu(e,t.position)}function oW(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=ks,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:pL(e,t.name,!0),u=fW(e,t),c=_y(e,t);return fL(e,u,o,t),Ey(u,c),e.ancestors.pop(),e.schema=a,e.create(t,o,u,n)}function lW(e,t,n){const a={};return Ey(a,_y(e,t)),e.create(t,e.Fragment,a,n)}function cW(e,t){return t.value}function fL(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function Ey(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function uW(e,t,n){return a;function a(s,o,u,c){const h=Array.isArray(u.children)?n:t;return c?h(o,u,c):h(o,u)}}function dW(e,t){return n;function n(a,s,o,u){const c=Array.isArray(o.children),d=es(a);return t(s,o,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function hW(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&yy.call(t.properties,s)){const o=pW(e,s,t.properties[s]);if(o){const[u,c]=o;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&rW.has(t.tagName)?a=c:n[u]=c}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function fW(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.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 Qu(e,t.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const c=a.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else Qu(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function _y(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:eW;for(;++a<t.children.length;){const o=t.children[a];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=s.get(d)||0;u=d+"-"+h,s.set(d,h+1)}}const c=hL(e,o,u);c!==void 0&&n.push(c)}return n}function pW(e,t,n){const a=Cd(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?om(n):lm(n)),a.property==="style"){let s=typeof n=="object"?n:mW(e,String(n));return e.stylePropertyNameCase==="css"&&(s=gW(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?zq[a.property]||a.property:a.attribute,n]}}function mW(e,t){try{return Jq(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new dr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=uL+"#cannot-parse-style-attribute",s}}function pL(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,u;for(;++o<s.length;){const c=H2(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}a=u}else a=H2(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return yy.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);Qu(e)}function Qu(e,t){const n=new dr("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=uL+"#cannot-handle-mdx-estrees-without-createevaluater",n}function gW(e){const t={};let n;for(n in e)yy.call(e,n)&&(t[bW(n)]=e[n]);return t}function bW(e){let t=e.replace(tW,vW);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function vW(e){return"-"+e.toLowerCase()}const Cl={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"]},xW={};function Sy(e,t){const n=xW,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mL(e,a,s)}function mL(e,t,n){if(yW(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 Z2(e.children,t,n)}return Array.isArray(e)?Z2(e,t,n):""}function Z2(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=mL(e[s],t,n);return a.join("")}function yW(e){return!!(e&&typeof e=="object")}const Q2=document.createElement("i");function Ju(e){const t="&"+e+";";Q2.innerHTML=t;const n=Q2.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Jr(e,t,n,a){const s=e.length;let o=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)u=Array.from(a),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);o<a.length;)u=a.slice(o,o+1e4),u.unshift(t,0),e.splice(...u),o+=1e4,t+=1e4}function ua(e,t){return e.length>0?(Jr(e,e.length,0,t),e):t}const J2={}.hasOwnProperty;function gL(e){const t={};let n=-1;for(;++n<e.length;)EW(t,e[n]);return t}function EW(e,t){let n;for(n in t){const s=(J2.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let u;if(o)for(u in o){J2.call(s,u)||(s[u]=[]);const c=o[u];_W(s[u],Array.isArray(c)?c:c?[c]:[])}}}function _W(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Jr(e,0,0,a)}function bL(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 Ca(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const _r=Si(/[A-Za-z]/),br=Si(/[\dA-Za-z]/),SW=Si(/[#-'*+\--9=?A-Z^-~]/);function hp(e){return e!==null&&(e<32||e===127)}const Pv=Si(/\d/),wW=Si(/[\dA-Fa-f]/),CW=Si(/[!-/:-@[-`{-~]/);function mt(e){return e!==null&&e<-2}function cn(e){return e!==null&&(e<0||e===32)}function Bt(e){return e===-2||e===-1||e===32}const um=Si(new RegExp("\\p{P}|\\p{S}","u")),lo=Si(/\s/);function Si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ac(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let u="";if(o===37&&br(e.charCodeAt(n+1))&&br(e.charCodeAt(n+2)))s=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),s=1):u="�"}else u=String.fromCharCode(o);u&&(t.push(e.slice(a,n),encodeURIComponent(u)),a=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function zt(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return u;function u(d){return Bt(d)?(e.enter(n),c(d)):t(d)}function c(d){return Bt(d)&&o++<s?(e.consume(d),c):(e.exit(n),t(d))}}const TW={tokenize:AW};function AW(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),zt(e,t,"linePrefix")}function s(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 mt(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),u)}}const NW={tokenize:kW},ek={tokenize:RW};function kW(e){const t=this,n=[];let a=0,s,o,u;return c;function c(E){if(a<n.length){const T=n[a];return t.containerState=T[1],e.attempt(T[0].continuation,d,h)(E)}return h(E)}function d(E){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&_();const T=t.events.length;let k=T,N;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){N=t.events[k][1].end;break}y(a);let I=T;for(;I<t.events.length;)t.events[I][1].end={...N},I++;return Jr(t.events,k+1,0,t.events.slice(T)),t.events.length=I,h(E)}return c(E)}function h(E){if(a===n.length){if(!s)return b(E);if(s.currentConstruct&&s.currentConstruct.concrete)return w(E);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ek,p,m)(E)}function p(E){return s&&_(),y(a),b(E)}function m(E){return t.parser.lazy[t.now().line]=a!==n.length,u=t.now().offset,w(E)}function b(E){return t.containerState={},e.attempt(ek,x,w)(E)}function x(E){return a++,n.push([t.currentConstruct,t.containerState]),b(E)}function w(E){if(E===null){s&&_(),y(0),e.consume(E);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),S(E)}function S(E){if(E===null){g(e.exit("chunkFlow"),!0),y(0),e.consume(E);return}return mt(E)?(e.consume(E),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,c):(e.consume(E),S)}function g(E,T){const k=t.sliceStream(E);if(T&&k.push(null),E.previous=o,o&&(o.next=E),o=E,s.defineSkip(E.start),s.write(k),t.parser.lazy[E.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<u&&(!s.events[N][1].end||s.events[N][1].end.offset>u))return;const I=t.events.length;let R=I,M,j;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(M){j=t.events[R][1].end;break}M=!0}for(y(a),N=I;N<t.events.length;)t.events[N][1].end={...j},N++;Jr(t.events,R+1,0,t.events.slice(I)),t.events.length=N}}function y(E){let T=n.length;for(;T-- >E;){const k=n[T];t.containerState=k[1],k[0].exit.call(t,e)}n.length=E}function _(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function RW(e,t,n){return zt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fl(e){if(e===null||cn(e)||lo(e))return 1;if(um(e))return 2}function dm(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!a.includes(o)&&(t=o(t,n),a.push(o))}return t}const Bv={name:"attention",resolveAll:DW,tokenize:IW};function DW(e,t){let n=-1,a,s,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(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[a][1].end},b={...e[n][1].start};tk(m,-d),tk(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[a][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},o={type:d>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...u.start},end:{...c.end}},e[a][1].end={...u.start},e[n][1].start={...c.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=ua(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=ua(h,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",o,t]]),h=ua(h,dm(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=ua(h,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=ua(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Jr(e,a-1,n-a+3,h),n=a+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function IW(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Fl(a);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=Fl(d),m=!p||p===2&&s||n.includes(d),b=!s||s===2&&p||n.includes(a);return h._open=!!(o===42?m:m&&(s||!b)),h._close=!!(o===42?b:b&&(p||!m)),t(d)}}function tk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const OW={name:"autolink",tokenize:LW};function LW(e,t,n){let a=0;return s;function s(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(x){return _r(x)?(e.consume(x),u):x===64?n(x):h(x)}function u(x){return x===43||x===45||x===46||br(x)?(a=1,c(x)):h(x)}function c(x){return x===58?(e.consume(x),a=0,d):(x===43||x===45||x===46||br(x))&&a++<32?(e.consume(x),c):(a=0,h(x))}function d(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||hp(x)?n(x):(e.consume(x),d)}function h(x){return x===64?(e.consume(x),p):SW(x)?(e.consume(x),h):n(x)}function p(x){return br(x)?m(x):n(x)}function m(x){return x===46?(e.consume(x),a=0,p):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):b(x)}function b(x){if((x===45||br(x))&&a++<63){const w=x===45?b:m;return e.consume(x),w}return n(x)}}const Td={partial:!0,tokenize:jW};function jW(e,t,n){return a;function a(o){return Bt(o)?zt(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||mt(o)?t(o):n(o)}}const vL={continuation:{tokenize:FW},exit:PW,name:"blockQuote",tokenize:MW};function MW(e,t,n){const a=this;return s;function s(u){if(u===62){const c=a.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 Bt(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function FW(e,t,n){const a=this;return s;function s(u){return Bt(u)?zt(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(vL,t,n)(u)}}function PW(e){e.exit("blockQuote")}const xL={name:"characterEscape",tokenize:BW};function BW(e,t,n){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return CW(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const yL={name:"characterReference",tokenize:UW};function UW(e,t,n){const a=this;let s=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=br,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=wW,p):(e.enter("characterReferenceValue"),o=7,u=Pv,p(m))}function p(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return u===br&&!Ju(a.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<o?(e.consume(m),p):n(m)}}const nk={partial:!0,tokenize:$W},rk={concrete:!0,name:"codeFenced",tokenize:HW};function HW(e,t,n){const a=this,s={partial:!0,tokenize:k};let o=0,u=0,c;return d;function d(N){return h(N)}function h(N){const I=a.events[a.events.length-1];return o=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,c=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(N)}function p(N){return N===c?(u++,e.consume(N),p):u<3?n(N):(e.exit("codeFencedFenceSequence"),Bt(N)?zt(e,m,"whitespace")(N):m(N))}function m(N){return N===null||mt(N)?(e.exit("codeFencedFence"),a.interrupt?t(N):e.check(nk,S,T)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(N))}function b(N){return N===null||mt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(N)):Bt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),zt(e,x,"whitespace")(N)):N===96&&N===c?n(N):(e.consume(N),b)}function x(N){return N===null||mt(N)?m(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(N))}function w(N){return N===null||mt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(N)):N===96&&N===c?n(N):(e.consume(N),w)}function S(N){return e.attempt(s,T,g)(N)}function g(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),y}function y(N){return o>0&&Bt(N)?zt(e,_,"linePrefix",o+1)(N):_(N)}function _(N){return N===null||mt(N)?e.check(nk,S,T)(N):(e.enter("codeFlowValue"),E(N))}function E(N){return N===null||mt(N)?(e.exit("codeFlowValue"),_(N)):(e.consume(N),E)}function T(N){return e.exit("codeFenced"),t(N)}function k(N,I,R){let M=0;return j;function j(J){return N.enter("lineEnding"),N.consume(J),N.exit("lineEnding"),P}function P(J){return N.enter("codeFencedFence"),Bt(J)?zt(N,z,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):z(J)}function z(J){return J===c?(N.enter("codeFencedFenceSequence"),U(J)):R(J)}function U(J){return J===c?(M++,N.consume(J),U):M>=u?(N.exit("codeFencedFenceSequence"),Bt(J)?zt(N,G,"whitespace")(J):G(J)):R(J)}function G(J){return J===null||mt(J)?(N.exit("codeFencedFence"),I(J)):R(J)}}}function $W(e,t,n){const a=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return a.parser.lazy[a.now().line]?n(u):t(u)}}const S0={name:"codeIndented",tokenize:GW},zW={partial:!0,tokenize:qW};function GW(e,t,n){const a=this;return s;function s(h){return e.enter("codeIndented"),zt(e,o,"linePrefix",5)(h)}function o(h){const p=a.events[a.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):mt(h)?e.attempt(zW,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||mt(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function qW(e,t,n){const a=this;return s;function s(u){return a.parser.lazy[a.now().line]?n(u):mt(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):zt(e,o,"linePrefix",5)(u)}function o(u){const c=a.events[a.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):mt(u)?s(u):n(u)}}const WW={name:"codeText",previous:YW,resolve:VW,tokenize:KW};function VW(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function YW(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function KW(e,t,n){let a=0,s,o;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),a++,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"),s=0,p(m)):mt(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||mt(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),s++,p):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",h(m))}}class XW{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 a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&bu(this.left,a),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),bu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),bu(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);bu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);bu(this.left,n.reverse())}}}function bu(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 EL(e){const t={};let n=-1,a,s,o,u,c,d,h;const p=new XW(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(a=p.get(n),n&&a[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=a[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(a[0]==="enter")a[1].contentType&&(Object.assign(t,ZW(p,n)),n=t[n],h=!0);else if(a[1]._container){for(o=n,s=void 0;o--;)if(u=p.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(a[1].end={...p.get(s)[1].start},c=p.slice(s,n),c.unshift(a),p.splice(s,n-s+1,c))}}return Jr(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function ZW(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const o=[];let u=n._tokenizer;u||(u=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let p,m,b=-1,x=n,w=0,S=0;const g=[S];for(;x;){for(;e.get(++s)[1]!==x;);o.push(s),x._tokenizer||(p=a.sliceStream(x),x.next||p.push(null),m&&u.defineSkip(x.start),x._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),x._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=x,x=x.next}for(x=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),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(u.events=[],x?(x._tokenizer=void 0,x.previous=void 0):g.pop(),b=g.length;b--;){const y=c.slice(g[b],g[b+1]),_=o.pop();d.push([_,_+y.length-1]),e.splice(_,2,y)}for(d.reverse(),b=-1;++b<d.length;)h[w+d[b][0]]=w+d[b][1],w+=d[b][1]-d[b][0]-1;return h}const QW={resolve:eV,tokenize:tV},JW={partial:!0,tokenize:nV};function eV(e){return EL(e),e}function tV(e,t){let n;return a;function a(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?o(c):mt(c)?e.check(JW,u,o)(c):(e.consume(c),s)}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,s}}function nV(e,t,n){const a=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),zt(e,o,"linePrefix")}function o(u){if(u===null||mt(u))return n(u);const c=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(a.parser.constructs.flow,n,t)(u)}}function _L(e,t,n,a,s,o,u,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(y){return y===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(y),e.exit(o),b):y===null||y===32||y===41||hp(y)?n(y):(e.enter(a),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(s),e.exit(a),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),x(y))}function x(y){return y===62?(e.exit("chunkString"),e.exit(c),b(y)):y===null||y===60||mt(y)?n(y):(e.consume(y),y===92?w:x)}function w(y){return y===60||y===62||y===92?(e.consume(y),x):x(y)}function S(y){return!p&&(y===null||y===41||cn(y))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(a),t(y)):p<h&&y===40?(e.consume(y),p++,S):y===41?(e.consume(y),p--,S):y===null||y===32||y===40||hp(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 SL(e,t,n,a,s,o){const u=this;let c=0,d;return h;function h(x){return e.enter(a),e.enter(s),e.consume(x),e.exit(s),e.enter(o),p}function p(x){return c>999||x===null||x===91||x===93&&!d||x===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(x):x===93?(e.exit(o),e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):mt(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||x===91||x===93||mt(x)||c++>999?(e.exit("chunkString"),p(x)):(e.consume(x),d||(d=!Bt(x)),x===92?b:m)}function b(x){return x===91||x===92||x===93?(e.consume(x),c++,m):m(x)}}function wL(e,t,n,a,s,o){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(a),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(a),t):(e.enter(o),h(b))}function h(b){return b===u?(e.exit(o),d(u)):b===null?n(b):mt(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),zt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||mt(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 Iu(e,t){let n;return a;function a(s){return mt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):Bt(s)?zt(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const rV={name:"definition",tokenize:sV},aV={partial:!0,tokenize:iV};function sV(e,t,n){const a=this;let s;return o;function o(x){return e.enter("definition"),u(x)}function u(x){return SL.call(a,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function c(x){return s=Ca(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),d):n(x)}function d(x){return cn(x)?Iu(e,h)(x):h(x)}function h(x){return _L(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function p(x){return e.attempt(aV,m,m)(x)}function m(x){return Bt(x)?zt(e,b,"whitespace")(x):b(x)}function b(x){return x===null||mt(x)?(e.exit("definition"),a.parser.defined.push(s),t(x)):n(x)}}function iV(e,t,n){return a;function a(c){return cn(c)?Iu(e,s)(c):n(c)}function s(c){return wL(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return Bt(c)?zt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||mt(c)?t(c):n(c)}}const oV={name:"hardBreakEscape",tokenize:lV};function lV(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return mt(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const cV={name:"headingAtx",resolve:uV,tokenize:dV};function uV(e,t){let n=e.length-2,a=3,s,o;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},o={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Jr(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function dV(e,t,n){let a=0;return s;function s(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&a++<6?(e.consume(p),u):p===null||cn(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||mt(p)?(e.exit("atxHeading"),t(p)):Bt(p)?zt(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||cn(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const hV=["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"],ak=["pre","script","style","textarea"],fV={concrete:!0,name:"htmlFlow",resolveTo:gV,tokenize:bV},pV={partial:!0,tokenize:xV},mV={partial:!0,tokenize:vV};function gV(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 bV(e,t,n){const a=this;let s,o,u,c,d;return h;function h($){return p($)}function p($){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume($),m}function m($){return $===33?(e.consume($),b):$===47?(e.consume($),o=!0,S):$===63?(e.consume($),s=3,a.interrupt?t:L):_r($)?(e.consume($),u=String.fromCharCode($),g):n($)}function b($){return $===45?(e.consume($),s=2,x):$===91?(e.consume($),s=5,c=0,w):_r($)?(e.consume($),s=4,a.interrupt?t:L):n($)}function x($){return $===45?(e.consume($),a.interrupt?t:L):n($)}function w($){const ee="CDATA[";return $===ee.charCodeAt(c++)?(e.consume($),c===ee.length?a.interrupt?t:z:w):n($)}function S($){return _r($)?(e.consume($),u=String.fromCharCode($),g):n($)}function g($){if($===null||$===47||$===62||cn($)){const ee=$===47,ae=u.toLowerCase();return!ee&&!o&&ak.includes(ae)?(s=1,a.interrupt?t($):z($)):hV.includes(u.toLowerCase())?(s=6,ee?(e.consume($),y):a.interrupt?t($):z($)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n($):o?_($):E($))}return $===45||br($)?(e.consume($),u+=String.fromCharCode($),g):n($)}function y($){return $===62?(e.consume($),a.interrupt?t:z):n($)}function _($){return Bt($)?(e.consume($),_):j($)}function E($){return $===47?(e.consume($),j):$===58||$===95||_r($)?(e.consume($),T):Bt($)?(e.consume($),E):j($)}function T($){return $===45||$===46||$===58||$===95||br($)?(e.consume($),T):k($)}function k($){return $===61?(e.consume($),N):Bt($)?(e.consume($),k):E($)}function N($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(e.consume($),d=$,I):Bt($)?(e.consume($),N):R($)}function I($){return $===d?(e.consume($),d=null,M):$===null||mt($)?n($):(e.consume($),I)}function R($){return $===null||$===34||$===39||$===47||$===60||$===61||$===62||$===96||cn($)?k($):(e.consume($),R)}function M($){return $===47||$===62||Bt($)?E($):n($)}function j($){return $===62?(e.consume($),P):n($)}function P($){return $===null||mt($)?z($):Bt($)?(e.consume($),P):n($)}function z($){return $===45&&s===2?(e.consume($),B):$===60&&s===1?(e.consume($),q):$===62&&s===4?(e.consume($),V):$===63&&s===3?(e.consume($),L):$===93&&s===5?(e.consume($),F):mt($)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(pV,Q,U)($)):$===null||mt($)?(e.exit("htmlFlowData"),U($)):(e.consume($),z)}function U($){return e.check(mV,G,Q)($)}function G($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),J}function J($){return $===null||mt($)?U($):(e.enter("htmlFlowData"),z($))}function B($){return $===45?(e.consume($),L):z($)}function q($){return $===47?(e.consume($),u="",Y):z($)}function Y($){if($===62){const ee=u.toLowerCase();return ak.includes(ee)?(e.consume($),V):z($)}return _r($)&&u.length<8?(e.consume($),u+=String.fromCharCode($),Y):z($)}function F($){return $===93?(e.consume($),L):z($)}function L($){return $===62?(e.consume($),V):$===45&&s===2?(e.consume($),L):z($)}function V($){return $===null||mt($)?(e.exit("htmlFlowData"),Q($)):(e.consume($),V)}function Q($){return e.exit("htmlFlow"),t($)}}function vV(e,t,n){const a=this;return s;function s(u){return mt(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):n(u)}function o(u){return a.parser.lazy[a.now().line]?n(u):t(u)}}function xV(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Td,t,n)}}const yV={name:"htmlText",tokenize:EV};function EV(e,t,n){const a=this;let s,o,u;return c;function c(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),d}function d(L){return L===33?(e.consume(L),h):L===47?(e.consume(L),k):L===63?(e.consume(L),E):_r(L)?(e.consume(L),R):n(L)}function h(L){return L===45?(e.consume(L),p):L===91?(e.consume(L),o=0,w):_r(L)?(e.consume(L),_):n(L)}function p(L){return L===45?(e.consume(L),x):n(L)}function m(L){return L===null?n(L):L===45?(e.consume(L),b):mt(L)?(u=m,q(L)):(e.consume(L),m)}function b(L){return L===45?(e.consume(L),x):m(L)}function x(L){return L===62?B(L):L===45?b(L):m(L)}function w(L){const V="CDATA[";return L===V.charCodeAt(o++)?(e.consume(L),o===V.length?S:w):n(L)}function S(L){return L===null?n(L):L===93?(e.consume(L),g):mt(L)?(u=S,q(L)):(e.consume(L),S)}function g(L){return L===93?(e.consume(L),y):S(L)}function y(L){return L===62?B(L):L===93?(e.consume(L),y):S(L)}function _(L){return L===null||L===62?B(L):mt(L)?(u=_,q(L)):(e.consume(L),_)}function E(L){return L===null?n(L):L===63?(e.consume(L),T):mt(L)?(u=E,q(L)):(e.consume(L),E)}function T(L){return L===62?B(L):E(L)}function k(L){return _r(L)?(e.consume(L),N):n(L)}function N(L){return L===45||br(L)?(e.consume(L),N):I(L)}function I(L){return mt(L)?(u=I,q(L)):Bt(L)?(e.consume(L),I):B(L)}function R(L){return L===45||br(L)?(e.consume(L),R):L===47||L===62||cn(L)?M(L):n(L)}function M(L){return L===47?(e.consume(L),B):L===58||L===95||_r(L)?(e.consume(L),j):mt(L)?(u=M,q(L)):Bt(L)?(e.consume(L),M):B(L)}function j(L){return L===45||L===46||L===58||L===95||br(L)?(e.consume(L),j):P(L)}function P(L){return L===61?(e.consume(L),z):mt(L)?(u=P,q(L)):Bt(L)?(e.consume(L),P):M(L)}function z(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),s=L,U):mt(L)?(u=z,q(L)):Bt(L)?(e.consume(L),z):(e.consume(L),G)}function U(L){return L===s?(e.consume(L),s=void 0,J):L===null?n(L):mt(L)?(u=U,q(L)):(e.consume(L),U)}function G(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||cn(L)?M(L):(e.consume(L),G)}function J(L){return L===47||L===62||cn(L)?M(L):n(L)}function B(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function q(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),Y}function Y(L){return Bt(L)?zt(e,F,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):F(L)}function F(L){return e.enter("htmlTextData"),u(L)}}const wy={name:"labelEnd",resolveAll:CV,resolveTo:TV,tokenize:AV},_V={tokenize:NV},SV={tokenize:kV},wV={tokenize:RV};function CV(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&Jr(e,0,e.length,n),e}function TV(e,t){let n=e.length,a=0,s,o,u,c;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){a=2;break}}else s.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+a+2][1].end},end:{...e[u-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=ua(c,e.slice(o+1,o+a+3)),c=ua(c,[["enter",p,t]]),c=ua(c,dm(t.parser.constructs.insideSpan.null,e.slice(o+a+4,u-3),t)),c=ua(c,[["exit",p,t],e[u-2],e[u-1],["exit",h,t]]),c=ua(c,e.slice(u+1)),c=ua(c,[["exit",d,t]]),Jr(e,o,e.length,c),e}function AV(e,t,n){const a=this;let s=a.events.length,o,u;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return c;function c(b){return o?o._inactive?m(b):(u=a.parser.defined.includes(Ca(a.sliceSerialize({start:o.end,end:a.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(_V,p,u?p:m)(b):b===91?e.attempt(SV,p,u?h:m)(b):u?p(b):m(b)}function h(b){return e.attempt(wV,p,m)(b)}function p(b){return t(b)}function m(b){return o._balanced=!0,n(b)}}function NV(e,t,n){return a;function a(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return cn(m)?Iu(e,o)(m):o(m)}function o(m){return m===41?p(m):_L(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return cn(m)?Iu(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?wL(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return cn(m)?Iu(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 kV(e,t,n){const a=this;return s;function s(c){return SL.call(a,e,o,u,"reference","referenceMarker","referenceString")(c)}function o(c){return a.parser.defined.includes(Ca(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function RV(e,t,n){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const DV={name:"labelStartImage",resolveAll:wy.resolveAll,tokenize:IV};function IV(e,t,n){const a=this;return s;function s(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 a.parser.constructs?n(c):t(c)}}const OV={name:"labelStartLink",resolveAll:wy.resolveAll,tokenize:LV};function LV(e,t,n){const a=this;return s;function s(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 a.parser.constructs?n(u):t(u)}}const w0={name:"lineEnding",tokenize:jV};function jV(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),zt(e,t,"linePrefix")}}const zf={name:"thematicBreak",tokenize:MV};function MV(e,t,n){let a=0,s;return o;function o(h){return e.enter("thematicBreak"),u(h)}function u(h){return s=h,c(h)}function c(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):a>=3&&(h===null||mt(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===s?(e.consume(h),a++,d):(e.exit("thematicBreakSequence"),Bt(h)?zt(e,c,"whitespace")(h):c(h))}}const jr={continuation:{tokenize:UV},exit:$V,name:"list",tokenize:BV},FV={partial:!0,tokenize:zV},PV={partial:!0,tokenize:HV};function BV(e,t,n){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(x){const w=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Pv(x)){if(a.containerState.type||(a.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(zf,n,h)(x):h(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(x)}return n(x)}function d(x){return Pv(x)&&++u<10?(e.consume(x),d):(!a.interrupt||u<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):n(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(Td,a.interrupt?n:p,e.attempt(FV,b,m))}function p(x){return a.containerState.initialBlankLine=!0,o++,b(x)}function m(x){return Bt(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),b):n(x)}function b(x){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function UV(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Td,s,o);function s(c){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,zt(e,t,"listItemIndent",a.containerState.size+1)(c)}function o(c){return a.containerState.furtherBlankLines||!Bt(c)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,u(c)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(PV,t,u)(c))}function u(c){return a.containerState._closeFlow=!0,a.interrupt=void 0,zt(e,e.attempt(jr,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function HV(e,t,n){const a=this;return zt(e,s,"listItemIndent",a.containerState.size+1);function s(o){const u=a.events[a.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===a.containerState.size?t(o):n(o)}}function $V(e){e.exit(this.containerState.type)}function zV(e,t,n){const a=this;return zt(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const u=a.events[a.events.length-1];return!Bt(o)&&u&&u[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const sk={name:"setextUnderline",resolveTo:GV,tokenize:qV};function GV(e,t){let n=e.length,a,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=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[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",u,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=u,e.push(["exit",u,t]),e}function qV(e,t,n){const a=this;let s;return o;function o(h){let p=a.events.length,m;for(;p--;)if(a.events[p][1].type!=="lineEnding"&&a.events[p][1].type!=="linePrefix"&&a.events[p][1].type!=="content"){m=a.events[p][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||m)?(e.enter("setextHeadingLine"),s=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===s?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Bt(h)?zt(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||mt(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const WV={tokenize:VV};function VV(e){const t=this,n=e.attempt(Td,a,e.attempt(this.parser.constructs.flowInitial,s,zt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(QW,s)),"linePrefix")));return n;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const YV={resolveAll:TL()},KV=CL("string"),XV=CL("text");function CL(e){return{resolveAll:TL(e==="text"?ZV:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],o=n.attempt(s,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=s[p];let b=-1;if(m)for(;++b<m.length;){const x=m[b];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function TL(e){return t;function t(n,a){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,a):n}}function ZV(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 a=e[n-1][1],s=t.sliceStream(a);let o=s.length,u=-1,c=0,d;for(;o--;){const h=s[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:a.start._bufferIndex+u,_index:a.start._index+o,line:a.end.line,column:a.end.column-c,offset:a.end.offset-c},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const QV={42:jr,43:jr,45:jr,48:jr,49:jr,50:jr,51:jr,52:jr,53:jr,54:jr,55:jr,56:jr,57:jr,62:vL},JV={91:rV},eY={[-2]:S0,[-1]:S0,32:S0},tY={35:cV,42:zf,45:[sk,zf],60:fV,61:sk,95:zf,96:rk,126:rk},nY={38:yL,92:xL},rY={[-5]:w0,[-4]:w0,[-3]:w0,33:DV,38:yL,42:Bv,60:[OW,yV],91:OV,92:[oV,xL],93:wy,95:Bv,96:WW},aY={null:[Bv,YV]},sY={null:[42,95]},iY={null:[]},oY=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:sY,contentInitial:JV,disable:iY,document:QV,flow:tY,flowInitial:eY,insideSpan:aY,string:nY,text:rY},Symbol.toStringTag,{value:"Module"}));function lY(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let u=[],c=[];const d={attempt:I(k),check:I(N),consume:_,enter:E,exit:T,interrupt:I(N,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:w,parser:e,previous:null,sliceSerialize:b,sliceStream:x,write:m};let p=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function m(P){return u=ua(u,P),g(),u[u.length-1]!==null?[]:(R(t,0),h.events=dm(o,h.events,h),h.events)}function b(P,z){return uY(x(P),z)}function x(P){return cY(u,P)}function w(){const{_bufferIndex:P,_index:z,line:U,column:G,offset:J}=a;return{_bufferIndex:P,_index:z,line:U,column:G,offset:J}}function S(P){s[P.line]=P.column,j()}function g(){let P;for(;a._index<u.length;){const z=u[a._index];if(typeof z=="string")for(P=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===P&&a._bufferIndex<z.length;)y(z.charCodeAt(a._bufferIndex));else y(z)}}function y(P){p=p(P)}function _(P){mt(P)?(a.line++,a.column=1,a.offset+=P===-3?2:1,j()):P!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===u[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=P}function E(P,z){const U=z||{};return U.type=P,U.start=w(),h.events.push(["enter",U,h]),c.push(U),U}function T(P){const z=c.pop();return z.end=w(),h.events.push(["exit",z,h]),z}function k(P,z){R(P,z.from)}function N(P,z){z.restore()}function I(P,z){return U;function U(G,J,B){let q,Y,F,L;return Array.isArray(G)?Q(G):"tokenize"in G?Q([G]):V(G);function V(oe){return Z;function Z(W){const le=W!==null&&oe[W],he=W!==null&&oe.null,ce=[...Array.isArray(le)?le:le?[le]:[],...Array.isArray(he)?he:he?[he]:[]];return Q(ce)(W)}}function Q(oe){return q=oe,Y=0,oe.length===0?B:$(oe[Y])}function $(oe){return Z;function Z(W){return L=M(),F=oe,oe.partial||(h.currentConstruct=oe),oe.name&&h.parser.constructs.disable.null.includes(oe.name)?ae():oe.tokenize.call(z?Object.assign(Object.create(h),z):h,d,ee,ae)(W)}}function ee(oe){return P(F,L),J}function ae(oe){return L.restore(),++Y<q.length?$(q[Y]):B}}}function R(P,z){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&Jr(h.events,z,h.events.length-z,P.resolve(h.events.slice(z),h)),P.resolveTo&&(h.events=P.resolveTo(h.events,h))}function M(){const P=w(),z=h.previous,U=h.currentConstruct,G=h.events.length,J=Array.from(c);return{from:G,restore:B};function B(){a=P,h.previous=z,h.currentConstruct=U,h.events.length=G,c=J,j()}}function j(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function cY(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(a,o)];else{if(u=e.slice(n,s),a>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(a):u.shift()}o>0&&u.push(e[s].slice(0,o))}return u}function uY(e,t){let n=-1;const a=[];let s;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=`
|
|
561
561
|
`;break}case-3:{u=`\r
|
|
562
562
|
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(o)}s=o===-2,a.push(u)}return a.join("")}function dY(e){const a={constructs:gL([oY,...(e||{}).extensions||[]]),content:s(TW),defined:[],document:s(NW),flow:s(WV),lazy:{},string:s(KV),text:s(XV)};return a;function s(o){return u;function u(c){return lY(a,o,c)}}}function hY(e){for(;!EL(e););return e}const ik=/[\0\t\n\r]/g;function fY(){let e=1,t="",n=!0,a;return s;function s(o,u,c){const d=[];let h,p,m,b,x;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(ik.lastIndex=m,h=ik.exec(o),b=h&&h.index!==void 0?h.index:o.length,x=o.charCodeAt(b),!h){t=o.slice(m);break}if(x===10&&m===b&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),m<b&&(d.push(o.slice(m,b)),e+=b-m),x){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:a=!0,e=1}m=b+1}return c&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const pY=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mY(e){return e.replace(pY,gY)}function gY(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return bL(n.slice(o?2:1),o?16:10)}return Ju(n)||e}const AL={}.hasOwnProperty;function bY(e,t,n){return typeof t!="string"&&(n=t,t=void 0),vY(n)(hY(dY(n).document().write(fY()(e,t,!0))))}function vY(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Dt),autolinkProtocol:M,autolinkEmail:M,atxHeading:o(it),blockQuote:o(he),characterEscape:M,characterReference:M,codeFenced:o(ce),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(ce,u),codeText:o(fe,u),codeTextData:M,data:M,codeFlowValue:M,definition:o(Ue),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(Re),hardBreakEscape:o(lt),hardBreakTrailing:o(lt),htmlFlow:o(Oe,u),htmlFlowData:M,htmlText:o(Oe,u),htmlTextData:M,image:o(Gt),label:u,link:o(Dt),listItem:o(en),listItemValue:b,listOrdered:o(St,m),listUnordered:o(St),paragraph:o(jt),reference:$,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(it),strong:o(wt),thematicBreak:o(Ce)},exit:{atxHeading:d(),atxHeadingSequence:k,autolink:d(),autolinkEmail:le,autolinkProtocol:W,blockQuote:d(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:oe,characterReference:Z,codeFenced:d(g),codeFencedFence:S,codeFencedFenceInfo:x,codeFencedFenceMeta:w,codeFlowValue:j,codeIndented:d(y),codeText:d(J),codeTextData:j,data:j,definition:d(),definitionDestinationString:T,definitionLabelString:_,definitionTitleString:E,emphasis:d(),hardBreakEscape:d(z),hardBreakTrailing:d(z),htmlFlow:d(U),htmlFlowData:j,htmlText:d(G),htmlTextData:j,image:d(q),label:F,labelText:Y,lineEnding:P,link:d(B),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ee,resourceDestinationString:L,resourceTitleString:V,resource:Q,setextHeading:d(R),setextHeadingLineSequence:I,setextHeadingText:N,strong:d(),thematicBreak:d()}};NL(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(de){let Ee={type:"root",children:[]};const je={stack:[Ee],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:p,data:n},Xe=[];let ut=-1;for(;++ut<de.length;)if(de[ut][1].type==="listOrdered"||de[ut][1].type==="listUnordered")if(de[ut][0]==="enter")Xe.push(ut);else{const qt=Xe.pop();ut=s(de,qt,ut)}for(ut=-1;++ut<de.length;){const qt=t[de[ut][0]];AL.call(qt,de[ut][1].type)&&qt[de[ut][1].type].call(Object.assign({sliceSerialize:de[ut][2].sliceSerialize},je),de[ut][1])}if(je.tokenStack.length>0){const qt=je.tokenStack[je.tokenStack.length-1];(qt[1]||ok).call(je,void 0,qt[0])}for(Ee.position={start:ri(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:ri(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},ut=-1;++ut<t.transforms.length;)Ee=t.transforms[ut](Ee)||Ee;return Ee}function s(de,Ee,je){let Xe=Ee-1,ut=-1,qt=!1,ht,on,In,Fe;for(;++Xe<=je;){const Ke=de[Xe];switch(Ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ke[0]==="enter"?ut++:ut--,Fe=void 0;break}case"lineEndingBlank":{Ke[0]==="enter"&&(ht&&!Fe&&!ut&&!In&&(In=Xe),Fe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Fe=void 0}if(!ut&&Ke[0]==="enter"&&Ke[1].type==="listItemPrefix"||ut===-1&&Ke[0]==="exit"&&(Ke[1].type==="listUnordered"||Ke[1].type==="listOrdered")){if(ht){let yt=Xe;for(on=void 0;yt--;){const ft=de[yt];if(ft[1].type==="lineEnding"||ft[1].type==="lineEndingBlank"){if(ft[0]==="exit")continue;on&&(de[on][1].type="lineEndingBlank",qt=!0),ft[1].type="lineEnding",on=yt}else if(!(ft[1].type==="linePrefix"||ft[1].type==="blockQuotePrefix"||ft[1].type==="blockQuotePrefixWhitespace"||ft[1].type==="blockQuoteMarker"||ft[1].type==="listItemIndent"))break}In&&(!on||In<on)&&(ht._spread=!0),ht.end=Object.assign({},on?de[on][1].start:Ke[1].end),de.splice(on||Xe,0,["exit",ht,Ke[2]]),Xe++,je++}if(Ke[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},Ke[1].start),end:void 0};ht=yt,de.splice(Xe,0,["enter",yt,Ke[2]]),Xe++,je++,In=void 0,Fe=!0}}}return de[Ee][1]._spread=qt,je}function o(de,Ee){return je;function je(Xe){c.call(this,de(Xe),Xe),Ee&&Ee.call(this,Xe)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(de,Ee,je){this.stack[this.stack.length-1].children.push(de),this.stack.push(de),this.tokenStack.push([Ee,je||void 0]),de.position={start:ri(Ee.start),end:void 0}}function d(de){return Ee;function Ee(je){de&&de.call(this,je),h.call(this,je)}}function h(de,Ee){const je=this.stack.pop(),Xe=this.tokenStack.pop();if(Xe)Xe[0].type!==de.type&&(Ee?Ee.call(this,de,Xe[0]):(Xe[1]||ok).call(this,de,Xe[0]));else throw new Error("Cannot close `"+de.type+"` ("+Du({start:de.start,end:de.end})+"): it’s not open");je.position.end=ri(de.end)}function p(){return Sy(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(de){if(this.data.expectingFirstListItemValue){const Ee=this.stack[this.stack.length-2];Ee.start=Number.parseInt(this.sliceSerialize(de),10),this.data.expectingFirstListItemValue=void 0}}function x(){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.lang=de}function w(){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.meta=de}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=de.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=de.replace(/(\r?\n|\r)$/g,"")}function _(de){const Ee=this.resume(),je=this.stack[this.stack.length-1];je.label=Ee,je.identifier=Ca(this.sliceSerialize(de)).toLowerCase()}function E(){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=de}function T(){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=de}function k(de){const Ee=this.stack[this.stack.length-1];if(!Ee.depth){const je=this.sliceSerialize(de).length;Ee.depth=je}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function I(de){const Ee=this.stack[this.stack.length-1];Ee.depth=this.sliceSerialize(de).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function M(de){const je=this.stack[this.stack.length-1].children;let Xe=je[je.length-1];(!Xe||Xe.type!=="text")&&(Xe=mn(),Xe.position={start:ri(de.start),end:void 0},je.push(Xe)),this.stack.push(Xe)}function j(de){const Ee=this.stack.pop();Ee.value+=this.sliceSerialize(de),Ee.position.end=ri(de.end)}function P(de){const Ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const je=Ee.children[Ee.children.length-1];je.position.end=ri(de.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ee.type)&&(M.call(this,de),j.call(this,de))}function z(){this.data.atHardBreak=!0}function U(){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=de}function G(){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=de}function J(){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=de}function B(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=Ee,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function q(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=Ee,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function Y(de){const Ee=this.sliceSerialize(de),je=this.stack[this.stack.length-2];je.label=mY(Ee),je.identifier=Ca(Ee).toLowerCase()}function F(){const de=this.stack[this.stack.length-1],Ee=this.resume(),je=this.stack[this.stack.length-1];if(this.data.inReference=!0,je.type==="link"){const Xe=de.children;je.children=Xe}else je.alt=Ee}function L(){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=de}function V(){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=de}function Q(){this.data.inReference=void 0}function $(){this.data.referenceType="collapsed"}function ee(de){const Ee=this.resume(),je=this.stack[this.stack.length-1];je.label=Ee,je.identifier=Ca(this.sliceSerialize(de)).toLowerCase(),this.data.referenceType="full"}function ae(de){this.data.characterReferenceType=de.type}function oe(de){const Ee=this.sliceSerialize(de),je=this.data.characterReferenceType;let Xe;je?(Xe=bL(Ee,je==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Xe=Ju(Ee);const ut=this.stack[this.stack.length-1];ut.value+=Xe}function Z(de){const Ee=this.stack.pop();Ee.position.end=ri(de.end)}function W(de){j.call(this,de);const Ee=this.stack[this.stack.length-1];Ee.url=this.sliceSerialize(de)}function le(de){j.call(this,de);const Ee=this.stack[this.stack.length-1];Ee.url="mailto:"+this.sliceSerialize(de)}function he(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function fe(){return{type:"inlineCode",value:""}}function Ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Re(){return{type:"emphasis",children:[]}}function it(){return{type:"heading",depth:0,children:[]}}function lt(){return{type:"break"}}function Oe(){return{type:"html",value:""}}function Gt(){return{type:"image",title:null,url:"",alt:null}}function Dt(){return{type:"link",title:null,url:"",children:[]}}function St(de){return{type:"list",ordered:de.type==="listOrdered",start:null,spread:de._spread,children:[]}}function en(de){return{type:"listItem",spread:de._spread,checked:null,children:[]}}function jt(){return{type:"paragraph",children:[]}}function wt(){return{type:"strong",children:[]}}function mn(){return{type:"text",value:""}}function Ce(){return{type:"thematicBreak"}}}function ri(e){return{line:e.line,column:e.column,offset:e.offset}}function NL(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?NL(e,a):xY(e,a)}}function xY(e,t){let n;for(n in t)if(AL.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function ok(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Du({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Du({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Du({start:t.start,end:t.end})+") is still open")}function kL(e){const t=this;t.parser=n;function n(a){return bY(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function yY(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 EY(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-DuLX7Zvh.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-ChgXTZpc.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body class="font-inter">
|