knowns 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/ui/index.css +0 -3
- package/dist/ui/main.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.5] - 2024-12-26
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Kanban Board**: Fixed an issue where columns with many tasks were not scrollable. The entire board area is now vertically scrollable.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **Build Process**: The UI now dynamically displays the version from `package.json`.
|
|
15
|
+
- The version is injected at build time, so it's always up-to-date.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- The UI build process now uses a separate script (`scripts/build-ui.js`) for more robust version injection.
|
|
19
|
+
|
|
8
20
|
## [0.1.3] - 2024-12-26
|
|
9
21
|
|
|
10
22
|
### Fixed
|
|
@@ -95,6 +107,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
95
107
|
- CLAUDE.md with complete guidelines for AI agents
|
|
96
108
|
- Example workflows and patterns
|
|
97
109
|
|
|
110
|
+
[0.1.5]: https://github.com/knowns-dev/knowns/compare/v0.1.3...v0.1.5
|
|
98
111
|
[0.1.3]: https://github.com/knowns-dev/knowns/compare/v0.1.2...v0.1.3
|
|
99
112
|
[0.1.2]: https://github.com/knowns-dev/knowns/compare/v0.1.1...v0.1.2
|
|
100
113
|
[0.1.1]: https://github.com/knowns-dev/knowns/compare/v0.1.0...v0.1.1
|
package/dist/ui/index.css
CHANGED
package/dist/ui/main.js
CHANGED
|
@@ -282,7 +282,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
282
282
|
|
|
283
283
|
If you want to hide the \`${$.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
284
284
|
|
|
285
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${$.docsSlug}`;return q5.useEffect(()=>{if(Q){if(!document.getElementById(Q))console.error(Y)}},[Y,Q]),null},qv="DialogDescriptionWarning",Gv=({contentRef:Q,descriptionId:$})=>{let G=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fT(qv).contentName}}.`;return q5.useEffect(()=>{let K=Q.current?.getAttribute("aria-describedby");if($&&K){if(!document.getElementById($))console.warn(G)}},[G,Q,$]),null},wX=jT;var CX=ET,V7=bT,P7=yT,jX=hT,DX=xT,Eq=mT;var x2=J0(Q1(),1),pT=wX;var Wv=CX,lT=YJ.forwardRef(({className:Q,...$},Y)=>x2.jsxDEV(V7,{className:a0("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",Q),...$,ref:Y},void 0,!1,void 0,this));lT.displayName=V7.displayName;var Hv=LX("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{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"}}),WU=YJ.forwardRef(({side:Q="right",className:$,children:Y,...G},K)=>x2.jsxDEV(Wv,{children:[x2.jsxDEV(lT,{},void 0,!1,void 0,this),x2.jsxDEV(P7,{ref:K,className:a0(Hv({side:Q}),$),...G,children:[x2.jsxDEV(Eq,{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:[x2.jsxDEV(L2,{className:"h-4 w-4"},void 0,!1,void 0,this),x2.jsxDEV("span",{className:"sr-only",children:"Close"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y]},void 0,!0,void 0,this)]},void 0,!0,void 0,this));WU.displayName=P7.displayName;var HU=({className:Q,...$})=>x2.jsxDEV("div",{className:a0("flex flex-col space-y-2 text-center sm:text-left",Q),...$},void 0,!1,void 0,this);HU.displayName="SheetHeader";var Bv=({className:Q,...$})=>x2.jsxDEV("div",{className:a0("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",Q),...$},void 0,!1,void 0,this);Bv.displayName="SheetFooter";var BU=YJ.forwardRef(({className:Q,...$},Y)=>x2.jsxDEV(jX,{ref:Y,className:a0("text-lg font-semibold text-foreground",Q),...$},void 0,!1,void 0,this));BU.displayName=jX.displayName;var UU=YJ.forwardRef(({className:Q,...$},Y)=>x2.jsxDEV(DX,{ref:Y,className:a0("text-sm text-muted-foreground",Q),...$},void 0,!1,void 0,this));UU.displayName=DX.displayName;var dT=J0(Q1(),1);function zU({className:Q,...$}){return dT.jsxDEV("div",{className:a0("animate-pulse rounded-md bg-primary/10",Q),...$},void 0,!1,void 0,this)}var TP=J0(k0(),1);var O1=J0(k0(),1);var s4=J0(k0(),1);var rT=["top","right","bottom","left"];var{min:f9,max:g4,round:GJ,floor:KJ}=Math,Q9=(Q)=>({x:Q,y:Q}),Uv={left:"right",right:"left",bottom:"top",top:"bottom"},zv={start:"end",end:"start"};function yq(Q,$,Y){return g4(Q,f9($,Y))}function p9(Q,$){return typeof Q==="function"?Q($):Q}function l9(Q){return Q.split("-")[0]}function m8(Q){return Q.split("-")[1]}function gq(Q){return Q==="x"?"y":"x"}function hq(Q){return Q==="y"?"height":"width"}var Fv=new Set(["top","bottom"]);function J9(Q){return Fv.has(l9(Q))?"y":"x"}function vq(Q){return gq(J9(Q))}function aT(Q,$,Y){if(Y===void 0)Y=!1;let G=m8(Q),K=vq(Q),H=hq(K),B=K==="x"?G===(Y?"end":"start")?"right":"left":G==="start"?"bottom":"top";if($.reference[H]>$.floating[H])B=qJ(B);return[B,qJ(B)]}function nT(Q){let $=qJ(Q);return[bq(Q),$,bq($)]}function bq(Q){return Q.replace(/start|end/g,($)=>zv[$])}var iT=["left","right"],cT=["right","left"],Lv=["top","bottom"],Mv=["bottom","top"];function Nv(Q,$,Y){switch(Q){case"top":case"bottom":if(Y)return $?cT:iT;return $?iT:cT;case"left":case"right":return $?Lv:Mv;default:return[]}}function sT(Q,$,Y,G){let K=m8(Q),H=Nv(l9(Q),Y==="start",G);if(K){if(H=H.map((B)=>B+"-"+K),$)H=H.concat(H.map(bq))}return H}function qJ(Q){return Q.replace(/left|right|bottom|top/g,($)=>Uv[$])}function Rv(Q){return{top:0,right:0,bottom:0,left:0,...Q}}function FU(Q){return typeof Q!=="number"?Rv(Q):{top:Q,right:Q,bottom:Q,left:Q}}function u8(Q){let{x:$,y:Y,width:G,height:K}=Q;return{width:G,height:K,top:Y,left:$,right:$+G,bottom:Y+K,x:$,y:Y}}function oT(Q,$,Y){let{reference:G,floating:K}=Q,H=J9($),B=vq($),z=hq(B),F=l9($),R=H==="y",N=G.x+G.width/2-K.width/2,L=G.y+G.height/2-K.height/2,O=G[z]/2-K[z]/2,A;switch(F){case"top":A={x:N,y:G.y-K.height};break;case"bottom":A={x:N,y:G.y+G.height};break;case"right":A={x:G.x+G.width,y:L};break;case"left":A={x:G.x-K.width,y:L};break;default:A={x:G.x,y:G.y}}switch(m8($)){case"start":A[B]-=O*(Y&&R?-1:1);break;case"end":A[B]+=O*(Y&&R?-1:1);break}return A}var ZV=async(Q,$,Y)=>{let{placement:G="bottom",strategy:K="absolute",middleware:H=[],platform:B}=Y,z=H.filter(Boolean),F=await(B.isRTL==null?void 0:B.isRTL($)),R=await B.getElementRects({reference:Q,floating:$,strategy:K}),{x:N,y:L}=oT(R,G,F),O=G,A={},C=0;for(let D=0;D<z.length;D++){let{name:b,fn:y}=z[D],{x:k,y:f,data:a,reset:s}=await y({x:N,y:L,initialPlacement:G,placement:O,strategy:K,middlewareData:A,rects:R,platform:B,elements:{reference:Q,floating:$}});if(N=k!=null?k:N,L=f!=null?f:L,A={...A,[b]:{...A[b],...a}},s&&C<=50){if(C++,typeof s==="object"){if(s.placement)O=s.placement;if(s.rects)R=s.rects===!0?await B.getElementRects({reference:Q,floating:$,strategy:K}):s.rects;({x:N,y:L}=oT(R,O,F))}D=-1}}return{x:N,y:L,placement:O,strategy:K,middlewareData:A}};async function SX(Q,$){var Y;if($===void 0)$={};let{x:G,y:K,platform:H,rects:B,elements:z,strategy:F}=Q,{boundary:R="clippingAncestors",rootBoundary:N="viewport",elementContext:L="floating",altBoundary:O=!1,padding:A=0}=p9($,Q),C=FU(A),b=z[O?L==="floating"?"reference":"floating":L],y=u8(await H.getClippingRect({element:((Y=await(H.isElement==null?void 0:H.isElement(b)))!=null?Y:!0)?b:b.contextElement||await(H.getDocumentElement==null?void 0:H.getDocumentElement(z.floating)),boundary:R,rootBoundary:N,strategy:F})),k=L==="floating"?{x:G,y:K,width:B.floating.width,height:B.floating.height}:B.reference,f=await(H.getOffsetParent==null?void 0:H.getOffsetParent(z.floating)),a=await(H.isElement==null?void 0:H.isElement(f))?await(H.getScale==null?void 0:H.getScale(f))||{x:1,y:1}:{x:1,y:1},s=u8(H.convertOffsetParentRelativeRectToViewportRelativeRect?await H.convertOffsetParentRelativeRectToViewportRelativeRect({elements:z,rect:k,offsetParent:f,strategy:F}):k);return{top:(y.top-s.top+C.top)/a.y,bottom:(s.bottom-y.bottom+C.bottom)/a.y,left:(y.left-s.left+C.left)/a.x,right:(s.right-y.right+C.right)/a.x}}var XV=(Q)=>({name:"arrow",options:Q,async fn($){let{x:Y,y:G,placement:K,rects:H,platform:B,elements:z,middlewareData:F}=$,{element:R,padding:N=0}=p9(Q,$)||{};if(R==null)return{};let L=FU(N),O={x:Y,y:G},A=vq(K),C=hq(A),D=await B.getDimensions(R),b=A==="y",y=b?"top":"left",k=b?"bottom":"right",f=b?"clientHeight":"clientWidth",a=H.reference[C]+H.reference[A]-O[A]-H.floating[C],s=O[A]-H.reference[A],g=await(B.getOffsetParent==null?void 0:B.getOffsetParent(R)),c=g?g[f]:0;if(!c||!await(B.isElement==null?void 0:B.isElement(g)))c=z.floating[f]||H.floating[C];let h=a/2-s/2,Z0=c/2-D[C]/2-1,E=f9(L[y],Z0),_0=f9(L[k],Z0),t=E,n=c-D[C]-_0,z0=c/2-D[C]/2+h,o=yq(t,z0,n),H0=!F.arrow&&m8(K)!=null&&z0!==o&&H.reference[C]/2-(z0<t?E:_0)-D[C]/2<0,G0=H0?z0<t?z0-t:z0-n:0;return{[A]:O[A]+G0,data:{[A]:o,centerOffset:z0-o-G0,...H0&&{alignmentOffset:G0}},reset:H0}}});var QV=function(Q){if(Q===void 0)Q={};return{name:"flip",options:Q,async fn($){var Y,G;let{placement:K,middlewareData:H,rects:B,initialPlacement:z,platform:F,elements:R}=$,{mainAxis:N=!0,crossAxis:L=!0,fallbackPlacements:O,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:D=!0,...b}=p9(Q,$);if((Y=H.arrow)!=null&&Y.alignmentOffset)return{};let y=l9(K),k=J9(z),f=l9(z)===z,a=await(F.isRTL==null?void 0:F.isRTL(R.floating)),s=O||(f||!D?[qJ(z)]:nT(z)),g=C!=="none";if(!O&&g)s.push(...sT(z,D,C,a));let c=[z,...s],h=await SX($,b),Z0=[],E=((G=H.flip)==null?void 0:G.overflows)||[];if(N)Z0.push(h[y]);if(L){let z0=aT(K,B,a);Z0.push(h[z0[0]],h[z0[1]])}if(E=[...E,{placement:K,overflows:Z0}],!Z0.every((z0)=>z0<=0)){var _0,t;let z0=(((_0=H.flip)==null?void 0:_0.index)||0)+1,o=c[z0];if(o){if(!(L==="alignment"?k!==J9(o):!1)||E.every((e)=>J9(e.placement)===k?e.overflows[0]>0:!0))return{data:{index:z0,overflows:E},reset:{placement:o}}}let H0=(t=E.filter((G0)=>G0.overflows[0]<=0).sort((G0,e)=>G0.overflows[1]-e.overflows[1])[0])==null?void 0:t.placement;if(!H0)switch(A){case"bestFit":{var n;let G0=(n=E.filter((e)=>{if(g){let U0=J9(e.placement);return U0===k||U0==="y"}return!0}).map((e)=>[e.placement,e.overflows.filter((U0)=>U0>0).reduce((U0,T)=>U0+T,0)]).sort((e,U0)=>e[1]-U0[1])[0])==null?void 0:n[0];if(G0)H0=G0;break}case"initialPlacement":H0=z;break}if(K!==H0)return{reset:{placement:H0}}}return{}}}};function tT(Q,$){return{top:Q.top-$.height,right:Q.right-$.width,bottom:Q.bottom-$.height,left:Q.left-$.width}}function eT(Q){return rT.some(($)=>Q[$]>=0)}var JV=function(Q){if(Q===void 0)Q={};return{name:"hide",options:Q,async fn($){let{rects:Y}=$,{strategy:G="referenceHidden",...K}=p9(Q,$);switch(G){case"referenceHidden":{let H=await SX($,{...K,elementContext:"reference"}),B=tT(H,Y.reference);return{data:{referenceHiddenOffsets:B,referenceHidden:eT(B)}}}case"escaped":{let H=await SX($,{...K,altBoundary:!0}),B=tT(H,Y.floating);return{data:{escapedOffsets:B,escaped:eT(B)}}}default:return{}}}}};var $V=new Set(["left","top"]);async function _v(Q,$){let{placement:Y,platform:G,elements:K}=Q,H=await(G.isRTL==null?void 0:G.isRTL(K.floating)),B=l9(Y),z=m8(Y),F=J9(Y)==="y",R=$V.has(B)?-1:1,N=H&&F?-1:1,L=p9($,Q),{mainAxis:O,crossAxis:A,alignmentAxis:C}=typeof L==="number"?{mainAxis:L,crossAxis:0,alignmentAxis:null}:{mainAxis:L.mainAxis||0,crossAxis:L.crossAxis||0,alignmentAxis:L.alignmentAxis};if(z&&typeof C==="number")A=z==="end"?C*-1:C;return F?{x:A*N,y:O*R}:{x:O*R,y:A*N}}var YV=function(Q){if(Q===void 0)Q=0;return{name:"offset",options:Q,async fn($){var Y,G;let{x:K,y:H,placement:B,middlewareData:z}=$,F=await _v($,Q);if(B===((Y=z.offset)==null?void 0:Y.placement)&&(G=z.arrow)!=null&&G.alignmentOffset)return{};return{x:K+F.x,y:H+F.y,data:{...F,placement:B}}}}},qV=function(Q){if(Q===void 0)Q={};return{name:"shift",options:Q,async fn($){let{x:Y,y:G,placement:K}=$,{mainAxis:H=!0,crossAxis:B=!1,limiter:z={fn:(b)=>{let{x:y,y:k}=b;return{x:y,y:k}}},...F}=p9(Q,$),R={x:Y,y:G},N=await SX($,F),L=J9(l9(K)),O=gq(L),A=R[O],C=R[L];if(H){let b=O==="y"?"top":"left",y=O==="y"?"bottom":"right",k=A+N[b],f=A-N[y];A=yq(k,A,f)}if(B){let b=L==="y"?"top":"left",y=L==="y"?"bottom":"right",k=C+N[b],f=C-N[y];C=yq(k,C,f)}let D=z.fn({...$,[O]:A,[L]:C});return{...D,data:{x:D.x-Y,y:D.y-G,enabled:{[O]:H,[L]:B}}}}}},GV=function(Q){if(Q===void 0)Q={};return{options:Q,fn($){let{x:Y,y:G,placement:K,rects:H,middlewareData:B}=$,{offset:z=0,mainAxis:F=!0,crossAxis:R=!0}=p9(Q,$),N={x:Y,y:G},L=J9(K),O=gq(L),A=N[O],C=N[L],D=p9(z,$),b=typeof D==="number"?{mainAxis:D,crossAxis:0}:{mainAxis:0,crossAxis:0,...D};if(F){let f=O==="y"?"height":"width",a=H.reference[O]-H.floating[f]+b.mainAxis,s=H.reference[O]+H.reference[f]-b.mainAxis;if(A<a)A=a;else if(A>s)A=s}if(R){var y,k;let f=O==="y"?"width":"height",a=$V.has(l9(K)),s=H.reference[L]-H.floating[f]+(a?((y=B.offset)==null?void 0:y[L])||0:0)+(a?0:b.crossAxis),g=H.reference[L]+H.reference[f]+(a?0:((k=B.offset)==null?void 0:k[L])||0)-(a?b.crossAxis:0);if(C<s)C=s;else if(C>g)C=g}return{[O]:A,[L]:C}}}},KV=function(Q){if(Q===void 0)Q={};return{name:"size",options:Q,async fn($){var Y,G;let{placement:K,rects:H,platform:B,elements:z}=$,{apply:F=()=>{},...R}=p9(Q,$),N=await SX($,R),L=l9(K),O=m8(K),A=J9(K)==="y",{width:C,height:D}=H.floating,b,y;if(L==="top"||L==="bottom")b=L,y=O===(await(B.isRTL==null?void 0:B.isRTL(z.floating))?"start":"end")?"left":"right";else y=L,b=O==="end"?"top":"bottom";let k=D-N.top-N.bottom,f=C-N.left-N.right,a=f9(D-N[b],k),s=f9(C-N[y],f),g=!$.middlewareData.shift,c=a,h=s;if((Y=$.middlewareData.shift)!=null&&Y.enabled.x)h=f;if((G=$.middlewareData.shift)!=null&&G.enabled.y)c=k;if(g&&!O){let E=g4(N.left,0),_0=g4(N.right,0),t=g4(N.top,0),n=g4(N.bottom,0);if(A)h=C-2*(E!==0||_0!==0?E+_0:g4(N.left,N.right));else c=D-2*(t!==0||n!==0?t+n:g4(N.top,N.bottom))}await F({...$,availableWidth:h,availableHeight:c});let Z0=await B.getDimensions(z.floating);if(C!==Z0.width||D!==Z0.height)return{reset:{rects:!0}};return{}}}};function xq(){return typeof window<"u"}function p8(Q){if(HV(Q))return(Q.nodeName||"").toLowerCase();return"#document"}function n4(Q){var $;return(Q==null||($=Q.ownerDocument)==null?void 0:$.defaultView)||window}function $9(Q){var $;return($=(HV(Q)?Q.ownerDocument:Q.document)||window.document)==null?void 0:$.documentElement}function HV(Q){if(!xq())return!1;return Q instanceof Node||Q instanceof n4(Q).Node}function k2(Q){if(!xq())return!1;return Q instanceof Element||Q instanceof n4(Q).Element}function Y9(Q){if(!xq())return!1;return Q instanceof HTMLElement||Q instanceof n4(Q).HTMLElement}function WV(Q){if(!xq()||typeof ShadowRoot>"u")return!1;return Q instanceof ShadowRoot||Q instanceof n4(Q).ShadowRoot}var Ov=new Set(["inline","contents"]);function EX(Q){let{overflow:$,overflowX:Y,overflowY:G,display:K}=m2(Q);return/auto|scroll|overlay|hidden|clip/.test($+G+Y)&&!Ov.has(K)}var Av=new Set(["table","td","th"]);function BV(Q){return Av.has(p8(Q))}var Iv=[":popover-open",":modal"];function WJ(Q){return Iv.some(($)=>{try{return Q.matches($)}catch(Y){return!1}})}var Tv=["transform","translate","scale","rotate","perspective"],Vv=["transform","translate","scale","rotate","perspective","filter"],Pv=["paint","layout","strict","content"];function kq(Q){let $=mq(),Y=k2(Q)?m2(Q):Q;return Tv.some((G)=>Y[G]?Y[G]!=="none":!1)||(Y.containerType?Y.containerType!=="normal":!1)||!$&&(Y.backdropFilter?Y.backdropFilter!=="none":!1)||!$&&(Y.filter?Y.filter!=="none":!1)||Vv.some((G)=>(Y.willChange||"").includes(G))||Pv.some((G)=>(Y.contain||"").includes(G))}function UV(Q){let $=I6(Q);while(Y9($)&&!l8($)){if(kq($))return $;else if(WJ($))return null;$=I6($)}return null}function mq(){if(typeof CSS>"u"||!CSS.supports)return!1;return CSS.supports("-webkit-backdrop-filter","none")}var wv=new Set(["html","body","#document"]);function l8(Q){return wv.has(p8(Q))}function m2(Q){return n4(Q).getComputedStyle(Q)}function HJ(Q){if(k2(Q))return{scrollLeft:Q.scrollLeft,scrollTop:Q.scrollTop};return{scrollLeft:Q.scrollX,scrollTop:Q.scrollY}}function I6(Q){if(p8(Q)==="html")return Q;let $=Q.assignedSlot||Q.parentNode||WV(Q)&&Q.host||$9(Q);return WV($)?$.host:$}function zV(Q){let $=I6(Q);if(l8($))return Q.ownerDocument?Q.ownerDocument.body:Q.body;if(Y9($)&&EX($))return $;return zV($)}function f8(Q,$,Y){var G;if($===void 0)$=[];if(Y===void 0)Y=!0;let K=zV(Q),H=K===((G=Q.ownerDocument)==null?void 0:G.body),B=n4(K);if(H){let z=uq(B);return $.concat(B,B.visualViewport||[],EX(K)?K:[],z&&Y?f8(z):[])}return $.concat(K,f8(K,[],Y))}function uq(Q){return Q.parent&&Object.getPrototypeOf(Q.parent)?Q.frameElement:null}function NV(Q){let $=m2(Q),Y=parseFloat($.width)||0,G=parseFloat($.height)||0,K=Y9(Q),H=K?Q.offsetWidth:Y,B=K?Q.offsetHeight:G,z=GJ(Y)!==H||GJ(G)!==B;if(z)Y=H,G=B;return{width:Y,height:G,$:z}}function MU(Q){return!k2(Q)?Q.contextElement:Q}function bX(Q){let $=MU(Q);if(!Y9($))return Q9(1);let Y=$.getBoundingClientRect(),{width:G,height:K,$:H}=NV($),B=(H?GJ(Y.width):Y.width)/G,z=(H?GJ(Y.height):Y.height)/K;if(!B||!Number.isFinite(B))B=1;if(!z||!Number.isFinite(z))z=1;return{x:B,y:z}}var Cv=Q9(0);function RV(Q){let $=n4(Q);if(!mq()||!$.visualViewport)return Cv;return{x:$.visualViewport.offsetLeft,y:$.visualViewport.offsetTop}}function jv(Q,$,Y){if($===void 0)$=!1;if(!Y||$&&Y!==n4(Q))return!1;return $}function d8(Q,$,Y,G){if($===void 0)$=!1;if(Y===void 0)Y=!1;let K=Q.getBoundingClientRect(),H=MU(Q),B=Q9(1);if($)if(G){if(k2(G))B=bX(G)}else B=bX(Q);let z=jv(H,Y,G)?RV(H):Q9(0),F=(K.left+z.x)/B.x,R=(K.top+z.y)/B.y,N=K.width/B.x,L=K.height/B.y;if(H){let O=n4(H),A=G&&k2(G)?n4(G):G,C=O,D=uq(C);while(D&&G&&A!==C){let b=bX(D),y=D.getBoundingClientRect(),k=m2(D),f=y.left+(D.clientLeft+parseFloat(k.paddingLeft))*b.x,a=y.top+(D.clientTop+parseFloat(k.paddingTop))*b.y;F*=b.x,R*=b.y,N*=b.x,L*=b.y,F+=f,R+=a,C=n4(D),D=uq(C)}}return u8({width:N,height:L,x:F,y:R})}function fq(Q,$){let Y=HJ(Q).scrollLeft;if(!$)return d8($9(Q)).left+Y;return $.left+Y}function _V(Q,$){let Y=Q.getBoundingClientRect(),G=Y.left+$.scrollLeft-fq(Q,Y),K=Y.top+$.scrollTop;return{x:G,y:K}}function Dv(Q){let{elements:$,rect:Y,offsetParent:G,strategy:K}=Q,H=K==="fixed",B=$9(G),z=$?WJ($.floating):!1;if(G===B||z&&H)return Y;let F={scrollLeft:0,scrollTop:0},R=Q9(1),N=Q9(0),L=Y9(G);if(L||!L&&!H){if(p8(G)!=="body"||EX(B))F=HJ(G);if(Y9(G)){let A=d8(G);R=bX(G),N.x=A.x+G.clientLeft,N.y=A.y+G.clientTop}}let O=B&&!L&&!H?_V(B,F):Q9(0);return{width:Y.width*R.x,height:Y.height*R.y,x:Y.x*R.x-F.scrollLeft*R.x+N.x+O.x,y:Y.y*R.y-F.scrollTop*R.y+N.y+O.y}}function Sv(Q){return Array.from(Q.getClientRects())}function Ev(Q){let $=$9(Q),Y=HJ(Q),G=Q.ownerDocument.body,K=g4($.scrollWidth,$.clientWidth,G.scrollWidth,G.clientWidth),H=g4($.scrollHeight,$.clientHeight,G.scrollHeight,G.clientHeight),B=-Y.scrollLeft+fq(Q),z=-Y.scrollTop;if(m2(G).direction==="rtl")B+=g4($.clientWidth,G.clientWidth)-K;return{width:K,height:H,x:B,y:z}}var FV=25;function bv(Q,$){let Y=n4(Q),G=$9(Q),K=Y.visualViewport,H=G.clientWidth,B=G.clientHeight,z=0,F=0;if(K){H=K.width,B=K.height;let N=mq();if(!N||N&&$==="fixed")z=K.offsetLeft,F=K.offsetTop}let R=fq(G);if(R<=0){let N=G.ownerDocument,L=N.body,O=getComputedStyle(L),A=N.compatMode==="CSS1Compat"?parseFloat(O.marginLeft)+parseFloat(O.marginRight)||0:0,C=Math.abs(G.clientWidth-L.clientWidth-A);if(C<=FV)H-=C}else if(R<=FV)H+=R;return{width:H,height:B,x:z,y:F}}var yv=new Set(["absolute","fixed"]);function gv(Q,$){let Y=d8(Q,!0,$==="fixed"),G=Y.top+Q.clientTop,K=Y.left+Q.clientLeft,H=Y9(Q)?bX(Q):Q9(1),B=Q.clientWidth*H.x,z=Q.clientHeight*H.y,F=K*H.x,R=G*H.y;return{width:B,height:z,x:F,y:R}}function LV(Q,$,Y){let G;if($==="viewport")G=bv(Q,Y);else if($==="document")G=Ev($9(Q));else if(k2($))G=gv($,Y);else{let K=RV(Q);G={x:$.x-K.x,y:$.y-K.y,width:$.width,height:$.height}}return u8(G)}function OV(Q,$){let Y=I6(Q);if(Y===$||!k2(Y)||l8(Y))return!1;return m2(Y).position==="fixed"||OV(Y,$)}function hv(Q,$){let Y=$.get(Q);if(Y)return Y;let G=f8(Q,[],!1).filter((z)=>k2(z)&&p8(z)!=="body"),K=null,H=m2(Q).position==="fixed",B=H?I6(Q):Q;while(k2(B)&&!l8(B)){let z=m2(B),F=kq(B);if(!F&&z.position==="fixed")K=null;if(H?!F&&!K:!F&&z.position==="static"&&!!K&&yv.has(K.position)||EX(B)&&!F&&OV(Q,B))G=G.filter((N)=>N!==B);else K=z;B=I6(B)}return $.set(Q,G),G}function vv(Q){let{element:$,boundary:Y,rootBoundary:G,strategy:K}=Q,B=[...Y==="clippingAncestors"?WJ($)?[]:hv($,this._c):[].concat(Y),G],z=B[0],F=B.reduce((R,N)=>{let L=LV($,N,K);return R.top=g4(L.top,R.top),R.right=f9(L.right,R.right),R.bottom=f9(L.bottom,R.bottom),R.left=g4(L.left,R.left),R},LV($,z,K));return{width:F.right-F.left,height:F.bottom-F.top,x:F.left,y:F.top}}function xv(Q){let{width:$,height:Y}=NV(Q);return{width:$,height:Y}}function kv(Q,$,Y){let G=Y9($),K=$9($),H=Y==="fixed",B=d8(Q,!0,H,$),z={scrollLeft:0,scrollTop:0},F=Q9(0);function R(){F.x=fq(K)}if(G||!G&&!H){if(p8($)!=="body"||EX(K))z=HJ($);if(G){let A=d8($,!0,H,$);F.x=A.x+$.clientLeft,F.y=A.y+$.clientTop}else if(K)R()}if(H&&!G&&K)R();let N=K&&!G&&!H?_V(K,z):Q9(0),L=B.left+z.scrollLeft-F.x-N.x,O=B.top+z.scrollTop-F.y-N.y;return{x:L,y:O,width:B.width,height:B.height}}function LU(Q){return m2(Q).position==="static"}function MV(Q,$){if(!Y9(Q)||m2(Q).position==="fixed")return null;if($)return $(Q);let Y=Q.offsetParent;if($9(Q)===Y)Y=Y.ownerDocument.body;return Y}function AV(Q,$){let Y=n4(Q);if(WJ(Q))return Y;if(!Y9(Q)){let K=I6(Q);while(K&&!l8(K)){if(k2(K)&&!LU(K))return K;K=I6(K)}return Y}let G=MV(Q,$);while(G&&BV(G)&&LU(G))G=MV(G,$);if(G&&l8(G)&&LU(G)&&!kq(G))return Y;return G||UV(Q)||Y}var mv=async function(Q){let $=this.getOffsetParent||AV,Y=this.getDimensions,G=await Y(Q.floating);return{reference:kv(Q.reference,await $(Q.floating),Q.strategy),floating:{x:0,y:0,width:G.width,height:G.height}}};function uv(Q){return m2(Q).direction==="rtl"}var IV={convertOffsetParentRelativeRectToViewportRelativeRect:Dv,getDocumentElement:$9,getClippingRect:vv,getOffsetParent:AV,getElementRects:mv,getClientRects:Sv,getDimensions:xv,getScale:bX,isElement:k2,isRTL:uv};function TV(Q,$){return Q.x===$.x&&Q.y===$.y&&Q.width===$.width&&Q.height===$.height}function fv(Q,$){let Y=null,G,K=$9(Q);function H(){var z;clearTimeout(G),(z=Y)==null||z.disconnect(),Y=null}function B(z,F){if(z===void 0)z=!1;if(F===void 0)F=1;H();let R=Q.getBoundingClientRect(),{left:N,top:L,width:O,height:A}=R;if(!z)$();if(!O||!A)return;let C=KJ(L),D=KJ(K.clientWidth-(N+O)),b=KJ(K.clientHeight-(L+A)),y=KJ(N),f={rootMargin:-C+"px "+-D+"px "+-b+"px "+-y+"px",threshold:g4(0,f9(1,F))||1},a=!0;function s(g){let c=g[0].intersectionRatio;if(c!==F){if(!a)return B();if(!c)G=setTimeout(()=>{B(!1,0.0000001)},1000);else B(!1,c)}if(c===1&&!TV(R,Q.getBoundingClientRect()))B();a=!1}try{Y=new IntersectionObserver(s,{...f,root:K.ownerDocument})}catch(g){Y=new IntersectionObserver(s,f)}Y.observe(Q)}return B(!0),H}function NU(Q,$,Y,G){if(G===void 0)G={};let{ancestorScroll:K=!0,ancestorResize:H=!0,elementResize:B=typeof ResizeObserver==="function",layoutShift:z=typeof IntersectionObserver==="function",animationFrame:F=!1}=G,R=MU(Q),N=K||H?[...R?f8(R):[],...f8($)]:[];N.forEach((y)=>{K&&y.addEventListener("scroll",Y,{passive:!0}),H&&y.addEventListener("resize",Y)});let L=R&&z?fv(R,Y):null,O=-1,A=null;if(B){if(A=new ResizeObserver((y)=>{let[k]=y;if(k&&k.target===R&&A)A.unobserve($),cancelAnimationFrame(O),O=requestAnimationFrame(()=>{var f;(f=A)==null||f.observe($)});Y()}),R&&!F)A.observe(R);A.observe($)}let C,D=F?d8(Q):null;if(F)b();function b(){let y=d8(Q);if(D&&!TV(D,y))Y();D=y,C=requestAnimationFrame(b)}return Y(),()=>{var y;if(N.forEach((k)=>{K&&k.removeEventListener("scroll",Y),H&&k.removeEventListener("resize",Y)}),L==null||L(),(y=A)==null||y.disconnect(),A=null,F)cancelAnimationFrame(C)}}var VV=YV;var PV=qV,wV=QV,CV=KV,jV=JV,RU=XV;var DV=GV,_U=(Q,$,Y)=>{let G=new Map,K={platform:IV,...Y},H={...K.platform,_c:G};return ZV(Q,$,{...K,platform:H})};var v5=J0(k0(),1),EV=J0(k0(),1),bV=J0(V8(),1),pv=typeof document<"u",lv=function(){},pq=pv?EV.useLayoutEffect:lv;function lq(Q,$){if(Q===$)return!0;if(typeof Q!==typeof $)return!1;if(typeof Q==="function"&&Q.toString()===$.toString())return!0;let Y,G,K;if(Q&&$&&typeof Q==="object"){if(Array.isArray(Q)){if(Y=Q.length,Y!==$.length)return!1;for(G=Y;G--!==0;)if(!lq(Q[G],$[G]))return!1;return!0}if(K=Object.keys(Q),Y=K.length,Y!==Object.keys($).length)return!1;for(G=Y;G--!==0;)if(!{}.hasOwnProperty.call($,K[G]))return!1;for(G=Y;G--!==0;){let H=K[G];if(H==="_owner"&&Q.$$typeof)continue;if(!lq(Q[H],$[H]))return!1}return!0}return Q!==Q&&$!==$}function yV(Q){if(typeof window>"u")return 1;return(Q.ownerDocument.defaultView||window).devicePixelRatio||1}function SV(Q,$){let Y=yV(Q);return Math.round($*Y)/Y}function OU(Q){let $=v5.useRef(Q);return pq(()=>{$.current=Q}),$}function gV(Q){if(Q===void 0)Q={};let{placement:$="bottom",strategy:Y="absolute",middleware:G=[],platform:K,elements:{reference:H,floating:B}={},transform:z=!0,whileElementsMounted:F,open:R}=Q,[N,L]=v5.useState({x:0,y:0,strategy:Y,placement:$,middlewareData:{},isPositioned:!1}),[O,A]=v5.useState(G);if(!lq(O,G))A(G);let[C,D]=v5.useState(null),[b,y]=v5.useState(null),k=v5.useCallback((e)=>{if(e!==g.current)g.current=e,D(e)},[]),f=v5.useCallback((e)=>{if(e!==c.current)c.current=e,y(e)},[]),a=H||C,s=B||b,g=v5.useRef(null),c=v5.useRef(null),h=v5.useRef(N),Z0=F!=null,E=OU(F),_0=OU(K),t=OU(R),n=v5.useCallback(()=>{if(!g.current||!c.current)return;let e={placement:$,strategy:Y,middleware:O};if(_0.current)e.platform=_0.current;_U(g.current,c.current,e).then((U0)=>{let T={...U0,isPositioned:t.current!==!1};if(z0.current&&!lq(h.current,T))h.current=T,bV.flushSync(()=>{L(T)})})},[O,$,Y,_0,t]);pq(()=>{if(R===!1&&h.current.isPositioned)h.current.isPositioned=!1,L((e)=>({...e,isPositioned:!1}))},[R]);let z0=v5.useRef(!1);pq(()=>{return z0.current=!0,()=>{z0.current=!1}},[]),pq(()=>{if(a)g.current=a;if(s)c.current=s;if(a&&s){if(E.current)return E.current(a,s,n);n()}},[a,s,n,E,Z0]);let o=v5.useMemo(()=>({reference:g,floating:c,setReference:k,setFloating:f}),[k,f]),H0=v5.useMemo(()=>({reference:a,floating:s}),[a,s]),G0=v5.useMemo(()=>{let e={position:Y,left:0,top:0};if(!H0.floating)return e;let U0=SV(H0.floating,N.x),T=SV(H0.floating,N.y);if(z)return{...e,transform:"translate("+U0+"px, "+T+"px)",...yV(H0.floating)>=1.5&&{willChange:"transform"}};return{position:Y,left:U0,top:T}},[Y,z,H0.floating,N.x,N.y]);return v5.useMemo(()=>({...N,update:n,refs:o,elements:H0,floatingStyles:G0}),[N,n,o,H0,G0])}var dv=(Q)=>{function $(Y){return{}.hasOwnProperty.call(Y,"current")}return{name:"arrow",options:Q,fn(Y){let{element:G,padding:K}=typeof Q==="function"?Q(Y):Q;if(G&&$(G)){if(G.current!=null)return RU({element:G.current,padding:K}).fn(Y);return{}}if(G)return RU({element:G,padding:K}).fn(Y);return{}}}},hV=(Q,$)=>({...VV(Q),options:[Q,$]}),vV=(Q,$)=>({...PV(Q),options:[Q,$]}),xV=(Q,$)=>({...DV(Q),options:[Q,$]}),kV=(Q,$)=>({...wV(Q),options:[Q,$]}),mV=(Q,$)=>({...CV(Q),options:[Q,$]});var uV=(Q,$)=>({...jV(Q),options:[Q,$]});var fV=(Q,$)=>({...dv(Q),options:[Q,$]});var pV=J0(k0(),1);var AU=J0(l5(),1),iv="Arrow",lV=pV.forwardRef((Q,$)=>{let{children:Y,width:G=10,height:K=5,...H}=Q;return AU.jsx(A5.svg,{...H,ref:$,width:G,height:K,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:Q.asChild?Y:AU.jsx("polygon",{points:"0,0 30,0 15,10"})})});lV.displayName=iv;var dV=lV;var iV=J0(k0(),1);function cV(Q){let[$,Y]=iV.useState(void 0);return c4(()=>{if(Q){Y({width:Q.offsetWidth,height:Q.offsetHeight});let G=new ResizeObserver((K)=>{if(!Array.isArray(K))return;if(!K.length)return;let H=K[0],B,z;if("borderBoxSize"in H){let F=H.borderBoxSize,R=Array.isArray(F)?F[0]:F;B=R.inlineSize,z=R.blockSize}else B=Q.offsetWidth,z=Q.offsetHeight;Y({width:B,height:z})});return G.observe(Q,{box:"border-box"}),()=>G.unobserve(Q)}else Y(void 0)},[Q]),$}var w7=J0(l5(),1);var IU="Popper",[rV,TU]=_X(IU),[rv,aV]=rV(IU),nV=(Q)=>{let{__scopePopper:$,children:Y}=Q,[G,K]=s4.useState(null);return w7.jsx(rv,{scope:$,anchor:G,onAnchorChange:K,children:Y})};nV.displayName=IU;var sV="PopperAnchor",oV=s4.forwardRef((Q,$)=>{let{__scopePopper:Y,virtualRef:G,...K}=Q,H=aV(sV,Y),B=s4.useRef(null),z=W4($,B),F=s4.useRef(null);return s4.useEffect(()=>{let R=F.current;if(F.current=G?.current||B.current,R!==F.current)H.onAnchorChange(F.current)}),G?null:w7.jsx(A5.div,{...K,ref:z})});oV.displayName=sV;var VU="PopperContent",[av,nv]=rV(VU),tV=s4.forwardRef((Q,$)=>{let{__scopePopper:Y,side:G="bottom",sideOffset:K=0,align:H="center",alignOffset:B=0,arrowPadding:z=0,avoidCollisions:F=!0,collisionBoundary:R=[],collisionPadding:N=0,sticky:L="partial",hideWhenDetached:O=!1,updatePositionStrategy:A="optimized",onPlaced:C,...D}=Q,b=aV(VU,Y),[y,k]=s4.useState(null),f=W4($,(C0)=>k(C0)),[a,s]=s4.useState(null),g=cV(a),c=g?.width??0,h=g?.height??0,Z0=G+(H!=="center"?"-"+H:""),E=typeof N==="number"?N:{top:0,right:0,bottom:0,left:0,...N},_0=Array.isArray(R)?R:[R],t=_0.length>0,n={padding:E,boundary:_0.filter(ov),altBoundary:t},{refs:z0,floatingStyles:o,placement:H0,isPositioned:G0,middlewareData:e}=gV({strategy:"fixed",placement:Z0,whileElementsMounted:(...C0)=>{return NU(...C0,{animationFrame:A==="always"})},elements:{reference:b.anchor},middleware:[hV({mainAxis:K+h,alignmentAxis:B}),F&&vV({mainAxis:!0,crossAxis:!1,limiter:L==="partial"?xV():void 0,...n}),F&&kV({...n}),mV({...n,apply:({elements:C0,rects:u0,availableWidth:$1,availableHeight:v1})=>{let{width:R0,height:h0}=u0.reference,Y1=C0.floating.style;Y1.setProperty("--radix-popper-available-width",`${$1}px`),Y1.setProperty("--radix-popper-available-height",`${v1}px`),Y1.setProperty("--radix-popper-anchor-width",`${R0}px`),Y1.setProperty("--radix-popper-anchor-height",`${h0}px`)}}),a&&fV({element:a,padding:z}),tv({arrowWidth:c,arrowHeight:h}),O&&uV({strategy:"referenceHidden",...n})]}),[U0,T]=XP(H0),B0=u9(C);c4(()=>{if(G0)B0?.()},[G0,B0]);let r=e.arrow?.x,S=e.arrow?.y,L0=e.arrow?.centerOffset!==0,[A0,V0]=s4.useState();return c4(()=>{if(y)V0(window.getComputedStyle(y).zIndex)},[y]),w7.jsx("div",{ref:z0.setFloating,"data-radix-popper-content-wrapper":"",style:{...o,transform:G0?o.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:A0,["--radix-popper-transform-origin"]:[e.transformOrigin?.x,e.transformOrigin?.y].join(" "),...e.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:Q.dir,children:w7.jsx(av,{scope:Y,placedSide:U0,onArrowChange:s,arrowX:r,arrowY:S,shouldHideArrow:L0,children:w7.jsx(A5.div,{"data-side":U0,"data-align":T,...D,ref:f,style:{...D.style,animation:!G0?"none":void 0}})})})});tV.displayName=VU;var eV="PopperArrow",sv={top:"bottom",right:"left",bottom:"top",left:"right"},ZP=s4.forwardRef(function($,Y){let{__scopePopper:G,...K}=$,H=nv(eV,G),B=sv[H.placedSide];return w7.jsx("span",{ref:H.onArrowChange,style:{position:"absolute",left:H.arrowX,top:H.arrowY,[B]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[H.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[H.placedSide],visibility:H.shouldHideArrow?"hidden":void 0},children:w7.jsx(dV,{...K,ref:Y,style:{...K.style,display:"block"}})})});ZP.displayName=eV;function ov(Q){return Q!==null}var tv=(Q)=>({name:"transformOrigin",options:Q,fn($){let{placement:Y,rects:G,middlewareData:K}=$,B=K.arrow?.centerOffset!==0,z=B?0:Q.arrowWidth,F=B?0:Q.arrowHeight,[R,N]=XP(Y),L={start:"0%",center:"50%",end:"100%"}[N],O=(K.arrow?.x??0)+z/2,A=(K.arrow?.y??0)+F/2,C="",D="";if(R==="bottom")C=B?L:`${O}px`,D=`${-F}px`;else if(R==="top")C=B?L:`${O}px`,D=`${G.floating.height+F}px`;else if(R==="right")C=`${-F}px`,D=B?L:`${A}px`;else if(R==="left")C=`${G.floating.width+F}px`,D=B?L:`${A}px`;return{data:{x:C,y:D}}}});function XP(Q){let[$,Y="center"]=Q.split("-");return[$,Y]}var QP=nV,JP=oV,$P=tV,YP=ZP;var BJ=J0(k0(),1);var dq=J0(l5(),1);var Zx=Symbol("radix.slottable");function qP(Q){let $=({children:Y})=>{return dq.jsx(dq.Fragment,{children:Y})};return $.displayName=`${Q}.Slottable`,$.__radixId=Zx,$}var GP=J0(k0(),1);var KP=J0(l5(),1),Xx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Qx="VisuallyHidden",WP=GP.forwardRef((Q,$)=>{return KP.jsx(A5.span,{...Q,ref:$,style:{...Xx,...Q.style}})});WP.displayName=Qx;var HP=WP;var x5=J0(l5(),1),[iq,Uo]=_X("Tooltip",[TU]),cq=TU(),BP="TooltipProvider",$x=700,PU="tooltip.open",[Yx,CU]=iq(BP),UP=(Q)=>{let{__scopeTooltip:$,delayDuration:Y=$x,skipDelayDuration:G=300,disableHoverableContent:K=!1,children:H}=Q,B=O1.useRef(!0),z=O1.useRef(!1),F=O1.useRef(0);return O1.useEffect(()=>{let R=F.current;return()=>window.clearTimeout(R)},[]),x5.jsx(Yx,{scope:$,isOpenDelayedRef:B,delayDuration:Y,onOpen:O1.useCallback(()=>{window.clearTimeout(F.current),B.current=!1},[]),onClose:O1.useCallback(()=>{window.clearTimeout(F.current),F.current=window.setTimeout(()=>B.current=!0,G)},[G]),isPointerInTransitRef:z,onPointerInTransitChange:O1.useCallback((R)=>{z.current=R},[]),disableHoverableContent:K,children:H})};UP.displayName=BP;var UJ="Tooltip",[qx,zJ]=iq(UJ),zP=(Q)=>{let{__scopeTooltip:$,children:Y,open:G,defaultOpen:K,onOpenChange:H,disableHoverableContent:B,delayDuration:z}=Q,F=CU(UJ,Q.__scopeTooltip),R=cq($),[N,L]=O1.useState(null),O=N2(),A=O1.useRef(0),C=B??F.disableHoverableContent,D=z??F.delayDuration,b=O1.useRef(!1),[y,k]=Lq({prop:G,defaultProp:K??!1,onChange:(c)=>{if(c)F.onOpen(),document.dispatchEvent(new CustomEvent(PU));else F.onClose();H?.(c)},caller:UJ}),f=O1.useMemo(()=>{return y?b.current?"delayed-open":"instant-open":"closed"},[y]),a=O1.useCallback(()=>{window.clearTimeout(A.current),A.current=0,b.current=!1,k(!0)},[k]),s=O1.useCallback(()=>{window.clearTimeout(A.current),A.current=0,k(!1)},[k]),g=O1.useCallback(()=>{window.clearTimeout(A.current),A.current=window.setTimeout(()=>{b.current=!0,k(!0),A.current=0},D)},[D,k]);return O1.useEffect(()=>{return()=>{if(A.current)window.clearTimeout(A.current),A.current=0}},[]),x5.jsx(QP,{...R,children:x5.jsx(qx,{scope:$,contentId:O,open:y,stateAttribute:f,trigger:N,onTriggerChange:L,onTriggerEnter:O1.useCallback(()=>{if(F.isOpenDelayedRef.current)g();else a()},[F.isOpenDelayedRef,g,a]),onTriggerLeave:O1.useCallback(()=>{if(C)s();else window.clearTimeout(A.current),A.current=0},[s,C]),onOpen:a,onClose:s,disableHoverableContent:C,children:Y})})};zP.displayName=UJ;var wU="TooltipTrigger",FP=O1.forwardRef((Q,$)=>{let{__scopeTooltip:Y,...G}=Q,K=zJ(wU,Y),H=CU(wU,Y),B=cq(Y),z=O1.useRef(null),F=W4($,z,K.onTriggerChange),R=O1.useRef(!1),N=O1.useRef(!1),L=O1.useCallback(()=>R.current=!1,[]);return O1.useEffect(()=>{return()=>document.removeEventListener("pointerup",L)},[L]),x5.jsx(JP,{asChild:!0,...B,children:x5.jsx(A5.button,{"aria-describedby":K.open?K.contentId:void 0,"data-state":K.stateAttribute,...G,ref:F,onPointerMove:H4(Q.onPointerMove,(O)=>{if(O.pointerType==="touch")return;if(!N.current&&!H.isPointerInTransitRef.current)K.onTriggerEnter(),N.current=!0}),onPointerLeave:H4(Q.onPointerLeave,()=>{K.onTriggerLeave(),N.current=!1}),onPointerDown:H4(Q.onPointerDown,()=>{if(K.open)K.onClose();R.current=!0,document.addEventListener("pointerup",L,{once:!0})}),onFocus:H4(Q.onFocus,()=>{if(!R.current)K.onOpen()}),onBlur:H4(Q.onBlur,K.onClose),onClick:H4(Q.onClick,K.onClose)})})});FP.displayName=wU;var jU="TooltipPortal",[Gx,Kx]=iq(jU,{forceMount:void 0}),LP=(Q)=>{let{__scopeTooltip:$,forceMount:Y,children:G,container:K}=Q,H=zJ(jU,$);return x5.jsx(Gx,{scope:$,forceMount:Y,children:x5.jsx(T7,{present:Y||H.open,children:x5.jsx(QJ,{asChild:!0,container:K,children:G})})})};LP.displayName=jU;var yX="TooltipContent",MP=O1.forwardRef((Q,$)=>{let Y=Kx(yX,Q.__scopeTooltip),{forceMount:G=Y.forceMount,side:K="top",...H}=Q,B=zJ(yX,Q.__scopeTooltip);return x5.jsx(T7,{present:G||B.open,children:B.disableHoverableContent?x5.jsx(NP,{side:K,...H,ref:$}):x5.jsx(Wx,{side:K,...H,ref:$})})}),Wx=O1.forwardRef((Q,$)=>{let Y=zJ(yX,Q.__scopeTooltip),G=CU(yX,Q.__scopeTooltip),K=O1.useRef(null),H=W4($,K),[B,z]=O1.useState(null),{trigger:F,onClose:R}=Y,N=K.current,{onPointerInTransitChange:L}=G,O=O1.useCallback(()=>{z(null),L(!1)},[L]),A=O1.useCallback((C,D)=>{let b=C.currentTarget,y={x:C.clientX,y:C.clientY},k=Fx(y,b.getBoundingClientRect()),f=Lx(y,k),a=Mx(D.getBoundingClientRect()),s=Rx([...f,...a]);z(s),L(!0)},[L]);return O1.useEffect(()=>{return()=>O()},[O]),O1.useEffect(()=>{if(F&&N){let C=(b)=>A(b,N),D=(b)=>A(b,F);return F.addEventListener("pointerleave",C),N.addEventListener("pointerleave",D),()=>{F.removeEventListener("pointerleave",C),N.removeEventListener("pointerleave",D)}}},[F,N,A,O]),O1.useEffect(()=>{if(B){let C=(D)=>{let b=D.target,y={x:D.clientX,y:D.clientY},k=F?.contains(b)||N?.contains(b),f=!Nx(y,B);if(k)O();else if(f)O(),R()};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[F,N,B,R,O]),x5.jsx(NP,{...Q,ref:H})}),[Hx,Bx]=iq(UJ,{isInside:!1}),Ux=qP("TooltipContent"),NP=O1.forwardRef((Q,$)=>{let{__scopeTooltip:Y,children:G,"aria-label":K,onEscapeKeyDown:H,onPointerDownOutside:B,...z}=Q,F=zJ(yX,Y),R=cq(Y),{onClose:N}=F;return O1.useEffect(()=>{return document.addEventListener(PU,N),()=>document.removeEventListener(PU,N)},[N]),O1.useEffect(()=>{if(F.trigger){let L=(O)=>{if(O.target?.contains(F.trigger))N()};return window.addEventListener("scroll",L,{capture:!0}),()=>window.removeEventListener("scroll",L,{capture:!0})}},[F.trigger,N]),x5.jsx(XJ,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:H,onPointerDownOutside:B,onFocusOutside:(L)=>L.preventDefault(),onDismiss:N,children:x5.jsxs($P,{"data-state":F.stateAttribute,...R,...z,ref:$,style:{...z.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:[x5.jsx(Ux,{children:G}),x5.jsx(Hx,{scope:Y,isInside:!0,children:x5.jsx(HP,{id:F.contentId,role:"tooltip",children:K||G})})]})})});MP.displayName=yX;var RP="TooltipArrow",zx=O1.forwardRef((Q,$)=>{let{__scopeTooltip:Y,...G}=Q,K=cq(Y);return Bx(RP,Y).isInside?null:x5.jsx(YP,{...K,...G,ref:$})});zx.displayName=RP;function Fx(Q,$){let Y=Math.abs($.top-Q.y),G=Math.abs($.bottom-Q.y),K=Math.abs($.right-Q.x),H=Math.abs($.left-Q.x);switch(Math.min(Y,G,K,H)){case H:return"left";case K:return"right";case Y:return"top";case G:return"bottom";default:throw Error("unreachable")}}function Lx(Q,$,Y=5){let G=[];switch($){case"top":G.push({x:Q.x-Y,y:Q.y+Y},{x:Q.x+Y,y:Q.y+Y});break;case"bottom":G.push({x:Q.x-Y,y:Q.y-Y},{x:Q.x+Y,y:Q.y-Y});break;case"left":G.push({x:Q.x+Y,y:Q.y-Y},{x:Q.x+Y,y:Q.y+Y});break;case"right":G.push({x:Q.x-Y,y:Q.y-Y},{x:Q.x-Y,y:Q.y+Y});break}return G}function Mx(Q){let{top:$,right:Y,bottom:G,left:K}=Q;return[{x:K,y:$},{x:Y,y:$},{x:Y,y:G},{x:K,y:G}]}function Nx(Q,$){let{x:Y,y:G}=Q,K=!1;for(let H=0,B=$.length-1;H<$.length;B=H++){let z=$[H],F=$[B],R=z.x,N=z.y,L=F.x,O=F.y;if(N>G!==O>G&&Y<(L-R)*(G-N)/(O-N)+R)K=!K}return K}function Rx(Q){let $=Q.slice();return $.sort((Y,G)=>{if(Y.x<G.x)return-1;else if(Y.x>G.x)return 1;else if(Y.y<G.y)return-1;else if(Y.y>G.y)return 1;else return 0}),_x($)}function _x(Q){if(Q.length<=1)return Q.slice();let $=[];for(let G=0;G<Q.length;G++){let K=Q[G];while($.length>=2){let H=$[$.length-1],B=$[$.length-2];if((H.x-B.x)*(K.y-B.y)>=(H.y-B.y)*(K.x-B.x))$.pop();else break}$.push(K)}$.pop();let Y=[];for(let G=Q.length-1;G>=0;G--){let K=Q[G];while(Y.length>=2){let H=Y[Y.length-1],B=Y[Y.length-2];if((H.x-B.x)*(K.y-B.y)>=(H.y-B.y)*(K.x-B.x))Y.pop();else break}Y.push(K)}if(Y.pop(),$.length===1&&Y.length===1&&$[0].x===Y[0].x&&$[0].y===Y[0].y)return $;else return $.concat(Y)}var _P=UP,OP=zP,AP=FP,IP=LP,DU=MP;var SU=J0(Q1(),1),VP=_P,PP=OP,wP=AP,EU=TP.forwardRef(({className:Q,sideOffset:$=4,...Y},G)=>SU.jsxDEV(IP,{children:SU.jsxDEV(DU,{ref:G,sideOffset:$,className:a0("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground 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 origin-[--radix-tooltip-content-transform-origin]",Q),...Y},void 0,!1,void 0,this)},void 0,!1,void 0,this));EU.displayName=DU.displayName;var L1=J0(Q1(),1),Ax="sidebar_state",Ix=604800,Tx="16rem",Vx="18rem",Px="3rem",wx="b",CP=j1.createContext(null);function gX(){let Q=j1.useContext(CP);if(!Q)throw Error("useSidebar must be used within a SidebarProvider.");return Q}var bU=j1.forwardRef(({defaultOpen:Q=!0,open:$,onOpenChange:Y,className:G,style:K,children:H,...B},z)=>{let F=Uq(),[R,N]=j1.useState(!1),[L,O]=j1.useState(Q),A=$??L,C=j1.useCallback((k)=>{let f=typeof k==="function"?k(A):k;if(Y)Y(f);else O(f);document.cookie=`${Ax}=${f}; path=/; max-age=${Ix}`},[Y,A]),D=j1.useCallback(()=>{return F?N((k)=>!k):C((k)=>!k)},[F,C,N]);j1.useEffect(()=>{let k=(f)=>{if(f.key===wx&&(f.metaKey||f.ctrlKey))f.preventDefault(),D()};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[D]);let b=A?"expanded":"collapsed",y=j1.useMemo(()=>({state:b,open:A,setOpen:C,isMobile:F,openMobile:R,setOpenMobile:N,toggleSidebar:D}),[b,A,C,F,R,N,D]);return L1.jsxDEV(CP.Provider,{value:y,children:L1.jsxDEV(VP,{delayDuration:0,children:L1.jsxDEV("div",{style:{"--sidebar-width":Tx,"--sidebar-width-icon":Px,...K},className:a0("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",G),ref:z,...B,children:H},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)});bU.displayName="SidebarProvider";var yU=j1.forwardRef(({side:Q="left",variant:$="sidebar",collapsible:Y="offcanvas",className:G,children:K,...H},B)=>{let{isMobile:z,state:F,openMobile:R,setOpenMobile:N}=gX();if(Y==="none")return L1.jsxDEV("div",{className:a0("flex h-full w-[var(--sidebar-width)] flex-col bg-sidebar text-sidebar-foreground",G),ref:B,...H,children:K},void 0,!1,void 0,this);if(z)return L1.jsxDEV(pT,{open:R,onOpenChange:N,...H,children:L1.jsxDEV(WU,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[var(--sidebar-width)] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Vx},side:Q,children:[L1.jsxDEV(HU,{className:"sr-only",children:[L1.jsxDEV(BU,{children:"Sidebar"},void 0,!1,void 0,this),L1.jsxDEV(UU,{children:"Displays the mobile sidebar."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L1.jsxDEV("div",{className:"flex h-full w-full flex-col",children:K},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return L1.jsxDEV("div",{ref:B,className:"group peer hidden text-sidebar-foreground md:block","data-state":F,"data-collapsible":F==="collapsed"?Y:"","data-variant":$,"data-side":Q,children:[L1.jsxDEV("div",{className:a0("relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",$==="floating"||$==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")},void 0,!1,void 0,this),L1.jsxDEV("div",{className:a0("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",Q==="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)]",$==="floating"||$==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",G),...H,children:L1.jsxDEV("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:K},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)});yU.displayName="Sidebar";var gU=j1.forwardRef(({className:Q,onClick:$,...Y},G)=>{let{toggleSidebar:K}=gX();return L1.jsxDEV(yB,{ref:G,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:a0("h-7 w-7",Q),onClick:(H)=>{$?.(H),K()},...Y,children:[L1.jsxDEV(R7,{},void 0,!1,void 0,this),L1.jsxDEV("span",{className:"sr-only",children:"Toggle Sidebar"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)});gU.displayName="SidebarTrigger";var hU=j1.forwardRef(({className:Q,...$},Y)=>{let{toggleSidebar:G}=gX();return L1.jsxDEV("button",{ref:Y,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:G,title:"Toggle Sidebar",className:a0("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",Q),...$},void 0,!1,void 0,this)});hU.displayName="SidebarRail";var Cx=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV("main",{ref:Y,className:a0("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",Q),...$},void 0,!1,void 0,this)});Cx.displayName="SidebarInset";var jx=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV(gB,{ref:Y,"data-sidebar":"input",className:a0("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",Q),...$},void 0,!1,void 0,this)});jx.displayName="SidebarInput";var vU=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV("div",{ref:Y,"data-sidebar":"header",className:a0("flex flex-col gap-2 p-2",Q),...$},void 0,!1,void 0,this)});vU.displayName="SidebarHeader";var xU=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV("div",{ref:Y,"data-sidebar":"footer",className:a0("flex flex-col gap-2 p-2",Q),...$},void 0,!1,void 0,this)});xU.displayName="SidebarFooter";var Dx=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV(ZJ,{ref:Y,"data-sidebar":"separator",className:a0("mx-2 w-auto bg-sidebar-border",Q),...$},void 0,!1,void 0,this)});Dx.displayName="SidebarSeparator";var kU=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV("div",{ref:Y,"data-sidebar":"content",className:a0("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",Q),...$},void 0,!1,void 0,this)});kU.displayName="SidebarContent";var mU=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV("div",{ref:Y,"data-sidebar":"group",className:a0("relative flex w-full min-w-0 flex-col p-2",Q),...$},void 0,!1,void 0,this)});mU.displayName="SidebarGroup";var uU=j1.forwardRef(({className:Q,asChild:$=!1,...Y},G)=>{return L1.jsxDEV($?O7:"div",{ref:G,"data-sidebar":"group-label",className:a0("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",Q),...Y},void 0,!1,void 0,this)});uU.displayName="SidebarGroupLabel";var Sx=j1.forwardRef(({className:Q,asChild:$=!1,...Y},G)=>{return L1.jsxDEV($?O7:"button",{ref:G,"data-sidebar":"group-action",className:a0("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",Q),...Y},void 0,!1,void 0,this)});Sx.displayName="SidebarGroupAction";var fU=j1.forwardRef(({className:Q,...$},Y)=>L1.jsxDEV("div",{ref:Y,"data-sidebar":"group-content",className:a0("w-full text-sm",Q),...$},void 0,!1,void 0,this));fU.displayName="SidebarGroupContent";var FJ=j1.forwardRef(({className:Q,...$},Y)=>L1.jsxDEV("ul",{ref:Y,"data-sidebar":"menu",className:a0("flex w-full min-w-0 flex-col gap-1",Q),...$},void 0,!1,void 0,this));FJ.displayName="SidebarMenu";var hX=j1.forwardRef(({className:Q,...$},Y)=>L1.jsxDEV("li",{ref:Y,"data-sidebar":"menu-item",className:a0("group/menu-item relative",Q),...$},void 0,!1,void 0,this));hX.displayName="SidebarMenuItem";var Ex=LX("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"}}),vX=j1.forwardRef(({asChild:Q=!1,isActive:$=!1,variant:Y="default",size:G="default",tooltip:K,className:H,...B},z)=>{let F=Q?O7:"button",{isMobile:R,state:N}=gX(),L=L1.jsxDEV(F,{ref:z,"data-sidebar":"menu-button","data-size":G,"data-active":$,className:a0(Ex({variant:Y,size:G}),H),...B},void 0,!1,void 0,this);if(!K)return L;if(typeof K==="string")K={children:K};return L1.jsxDEV(PP,{children:[L1.jsxDEV(wP,{asChild:!0,children:L},void 0,!1,void 0,this),L1.jsxDEV(EU,{side:"right",align:"center",hidden:N!=="collapsed"||R,...K},void 0,!1,void 0,this)]},void 0,!0,void 0,this)});vX.displayName="SidebarMenuButton";var bx=j1.forwardRef(({className:Q,asChild:$=!1,showOnHover:Y=!1,...G},K)=>{return L1.jsxDEV($?O7:"button",{ref:K,"data-sidebar":"menu-action",className:a0("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",Y&&"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",Q),...G},void 0,!1,void 0,this)});bx.displayName="SidebarMenuAction";var yx=j1.forwardRef(({className:Q,...$},Y)=>L1.jsxDEV("div",{ref:Y,"data-sidebar":"menu-badge",className:a0("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","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",Q),...$},void 0,!1,void 0,this));yx.displayName="SidebarMenuBadge";var gx=j1.forwardRef(({className:Q,showIcon:$=!1,...Y},G)=>{let K=j1.useMemo(()=>{return`${Math.floor(Math.random()*40)+50}%`},[]);return L1.jsxDEV("div",{ref:G,"data-sidebar":"menu-skeleton",className:a0("flex h-8 items-center gap-2 rounded-md px-2",Q),...Y,children:[$&&L1.jsxDEV(zU,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"},void 0,!1,void 0,this),L1.jsxDEV(zU,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":K}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)});gx.displayName="SidebarMenuSkeleton";var hx=j1.forwardRef(({className:Q,...$},Y)=>L1.jsxDEV("ul",{ref:Y,"data-sidebar":"menu-sub",className:a0("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",Q),...$},void 0,!1,void 0,this));hx.displayName="SidebarMenuSub";var vx=j1.forwardRef(({...Q},$)=>L1.jsxDEV("li",{ref:$,...Q},void 0,!1,void 0,this));vx.displayName="SidebarMenuSubItem";var xx=j1.forwardRef(({asChild:Q=!1,size:$="md",isActive:Y,className:G,...K},H)=>{return L1.jsxDEV(Q?O7:"a",{ref:H,"data-sidebar":"menu-sub-button","data-size":$,"data-active":Y,className:a0("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",$==="sm"&&"text-xs",$==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",G),...K},void 0,!1,void 0,this)});xx.displayName="SidebarMenuSubButton";var U1=J0(Q1(),1),kx=[{id:"kanban",label:"Kanban",icon:rQ,href:"#/"},{id:"tasks",label:"Tasks",icon:j8,href:"#/tasks"},{id:"docs",label:"Docs",icon:O4,href:"#/docs"}];function jP({currentPage:Q,isDark:$,onToggleTheme:Y,onSearchClick:G}){let{state:K}=gX(),H=Uq(),B=K==="expanded";return U1.jsxDEV(yU,{collapsible:"icon",variant:H?"floating":"sidebar",children:[U1.jsxDEV(vU,{children:[U1.jsxDEV(FJ,{children:U1.jsxDEV(hX,{children:U1.jsxDEV(vX,{size:"lg",asChild:!0,children:U1.jsxDEV("a",{href:"#/",children:[U1.jsxDEV("div",{className:"flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground",children:U1.jsxDEV("span",{className:"text-lg font-bold",children:"◆"},void 0,!1,void 0,this)},void 0,!1,void 0,this),U1.jsxDEV("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[U1.jsxDEV("span",{className:"truncate font-semibold",children:"Knowns.dev"},void 0,!1,void 0,this),U1.jsxDEV("span",{className:"truncate text-xs",children:"Task Management"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),B&&U1.jsxDEV("div",{className:"px-2 pb-2",children:U1.jsxDEV("button",{type:"button",onClick:G,className:"flex w-full items-center gap-2 rounded-lg border bg-background px-3 py-2 text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",children:[U1.jsxDEV(S8,{className:"h-4 w-4"},void 0,!1,void 0,this),U1.jsxDEV("span",{children:"Search..."},void 0,!1,void 0,this),U1.jsxDEV("kbd",{className:"ml-auto pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[U1.jsxDEV("span",{className:"text-xs",children:"⌘"},void 0,!1,void 0,this),"K"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U1.jsxDEV(kU,{children:U1.jsxDEV(mU,{children:[U1.jsxDEV(uU,{children:"Navigation"},void 0,!1,void 0,this),U1.jsxDEV(fU,{children:U1.jsxDEV(FJ,{children:kx.map((z)=>{let F=Q===z.id;return U1.jsxDEV(hX,{children:U1.jsxDEV(vX,{asChild:!0,isActive:F,tooltip:z.label,children:U1.jsxDEV("a",{href:z.href,children:[U1.jsxDEV(z.icon,{},void 0,!1,void 0,this),U1.jsxDEV("span",{children:z.label},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},z.id,!1,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),U1.jsxDEV(xU,{children:[U1.jsxDEV(FJ,{children:[U1.jsxDEV(hX,{children:U1.jsxDEV(vX,{asChild:!0,isActive:Q==="config",tooltip:"Settings",children:U1.jsxDEV("a",{href:"#/config",children:[U1.jsxDEV(E8,{},void 0,!1,void 0,this),U1.jsxDEV("span",{children:"Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),U1.jsxDEV(hX,{children:U1.jsxDEV(vX,{onClick:Y,tooltip:$?"Light mode":"Dark mode",children:[$?U1.jsxDEV(oQ,{},void 0,!1,void 0,this):U1.jsxDEV(aQ,{},void 0,!1,void 0,this),U1.jsxDEV("span",{children:$?"Light mode":"Dark mode"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B&&U1.jsxDEV("div",{className:"px-3 py-2 text-xs text-sidebar-foreground/50",children:U1.jsxDEV("div",{className:"flex items-center justify-between",children:[U1.jsxDEV("a",{href:"https://github.com/knowns-dev/knowns",target:"_blank",rel:"noopener noreferrer",className:"hover:text-sidebar-foreground transition-colors",children:"Knowns"},void 0,!1,void 0,this),U1.jsxDEV("span",{className:"font-mono",children:"0.1.3"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U1.jsxDEV(hU,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Z5=J0(k0(),1);function lU(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var c8=lU();function hP(Q){c8=Q}var RJ={exec:()=>null};function m1(Q,$=""){let Y=typeof Q=="string"?Q:Q.source,G={replace:(K,H)=>{let B=typeof H=="string"?H:H.source;return B=B.replace(h4.caret,"$1"),Y=Y.replace(K,B),G},getRegex:()=>new RegExp(Y,$)};return G}var mx=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),h4={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(Q)=>new RegExp(`^( {0,3}${Q})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(Q)=>new RegExp(`^ {0,${Math.min(3,Q-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(Q)=>new RegExp(`^ {0,${Math.min(3,Q-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(Q)=>new RegExp(`^ {0,${Math.min(3,Q-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(Q)=>new RegExp(`^ {0,${Math.min(3,Q-1)}}#`),htmlBeginRegex:(Q)=>new RegExp(`^ {0,${Math.min(3,Q-1)}}<(?:[a-z].*>|!--)`,"i")},ux=/^(?:[ \t]*(?:\n|$))+/,fx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,px=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_J=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,lx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,dU=/(?:[*+-]|\d{1,9}[.)])/,vP=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,xP=m1(vP).replace(/bull/g,dU).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),dx=m1(vP).replace(/bull/g,dU).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),iU=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ix=/^[^\n]+/,cU=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,cx=m1(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",cU).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rx=m1(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,dU).getRegex(),oq="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",rU=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ax=m1("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",rU).replace("tag",oq).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),kP=m1(iU).replace("hr",_J).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oq).getRegex(),nx=m1(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",kP).getRegex(),aU={blockquote:nx,code:fx,def:cx,fences:px,heading:lx,hr:_J,html:ax,lheading:xP,list:rx,newline:ux,paragraph:kP,table:RJ,text:ix},DP=m1("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_J).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oq).getRegex(),sx={...aU,lheading:dx,table:DP,paragraph:m1(iU).replace("hr",_J).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",DP).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oq).getRegex()},ox={...aU,html:m1(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rU).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:RJ,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:m1(iU).replace("hr",_J).replace("heading",` *#{1,6} *[^
|
|
285
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${$.docsSlug}`;return q5.useEffect(()=>{if(Q){if(!document.getElementById(Q))console.error(Y)}},[Y,Q]),null},qv="DialogDescriptionWarning",Gv=({contentRef:Q,descriptionId:$})=>{let G=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fT(qv).contentName}}.`;return q5.useEffect(()=>{let K=Q.current?.getAttribute("aria-describedby");if($&&K){if(!document.getElementById($))console.warn(G)}},[G,Q,$]),null},wX=jT;var CX=ET,V7=bT,P7=yT,jX=hT,DX=xT,Eq=mT;var x2=J0(Q1(),1),pT=wX;var Wv=CX,lT=YJ.forwardRef(({className:Q,...$},Y)=>x2.jsxDEV(V7,{className:a0("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",Q),...$,ref:Y},void 0,!1,void 0,this));lT.displayName=V7.displayName;var Hv=LX("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{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"}}),WU=YJ.forwardRef(({side:Q="right",className:$,children:Y,...G},K)=>x2.jsxDEV(Wv,{children:[x2.jsxDEV(lT,{},void 0,!1,void 0,this),x2.jsxDEV(P7,{ref:K,className:a0(Hv({side:Q}),$),...G,children:[x2.jsxDEV(Eq,{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:[x2.jsxDEV(L2,{className:"h-4 w-4"},void 0,!1,void 0,this),x2.jsxDEV("span",{className:"sr-only",children:"Close"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y]},void 0,!0,void 0,this)]},void 0,!0,void 0,this));WU.displayName=P7.displayName;var HU=({className:Q,...$})=>x2.jsxDEV("div",{className:a0("flex flex-col space-y-2 text-center sm:text-left",Q),...$},void 0,!1,void 0,this);HU.displayName="SheetHeader";var Bv=({className:Q,...$})=>x2.jsxDEV("div",{className:a0("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",Q),...$},void 0,!1,void 0,this);Bv.displayName="SheetFooter";var BU=YJ.forwardRef(({className:Q,...$},Y)=>x2.jsxDEV(jX,{ref:Y,className:a0("text-lg font-semibold text-foreground",Q),...$},void 0,!1,void 0,this));BU.displayName=jX.displayName;var UU=YJ.forwardRef(({className:Q,...$},Y)=>x2.jsxDEV(DX,{ref:Y,className:a0("text-sm text-muted-foreground",Q),...$},void 0,!1,void 0,this));UU.displayName=DX.displayName;var dT=J0(Q1(),1);function zU({className:Q,...$}){return dT.jsxDEV("div",{className:a0("animate-pulse rounded-md bg-primary/10",Q),...$},void 0,!1,void 0,this)}var TP=J0(k0(),1);var O1=J0(k0(),1);var s4=J0(k0(),1);var rT=["top","right","bottom","left"];var{min:f9,max:g4,round:GJ,floor:KJ}=Math,Q9=(Q)=>({x:Q,y:Q}),Uv={left:"right",right:"left",bottom:"top",top:"bottom"},zv={start:"end",end:"start"};function yq(Q,$,Y){return g4(Q,f9($,Y))}function p9(Q,$){return typeof Q==="function"?Q($):Q}function l9(Q){return Q.split("-")[0]}function m8(Q){return Q.split("-")[1]}function gq(Q){return Q==="x"?"y":"x"}function hq(Q){return Q==="y"?"height":"width"}var Fv=new Set(["top","bottom"]);function J9(Q){return Fv.has(l9(Q))?"y":"x"}function vq(Q){return gq(J9(Q))}function aT(Q,$,Y){if(Y===void 0)Y=!1;let G=m8(Q),K=vq(Q),H=hq(K),B=K==="x"?G===(Y?"end":"start")?"right":"left":G==="start"?"bottom":"top";if($.reference[H]>$.floating[H])B=qJ(B);return[B,qJ(B)]}function nT(Q){let $=qJ(Q);return[bq(Q),$,bq($)]}function bq(Q){return Q.replace(/start|end/g,($)=>zv[$])}var iT=["left","right"],cT=["right","left"],Lv=["top","bottom"],Mv=["bottom","top"];function Nv(Q,$,Y){switch(Q){case"top":case"bottom":if(Y)return $?cT:iT;return $?iT:cT;case"left":case"right":return $?Lv:Mv;default:return[]}}function sT(Q,$,Y,G){let K=m8(Q),H=Nv(l9(Q),Y==="start",G);if(K){if(H=H.map((B)=>B+"-"+K),$)H=H.concat(H.map(bq))}return H}function qJ(Q){return Q.replace(/left|right|bottom|top/g,($)=>Uv[$])}function Rv(Q){return{top:0,right:0,bottom:0,left:0,...Q}}function FU(Q){return typeof Q!=="number"?Rv(Q):{top:Q,right:Q,bottom:Q,left:Q}}function u8(Q){let{x:$,y:Y,width:G,height:K}=Q;return{width:G,height:K,top:Y,left:$,right:$+G,bottom:Y+K,x:$,y:Y}}function oT(Q,$,Y){let{reference:G,floating:K}=Q,H=J9($),B=vq($),z=hq(B),F=l9($),R=H==="y",N=G.x+G.width/2-K.width/2,L=G.y+G.height/2-K.height/2,O=G[z]/2-K[z]/2,A;switch(F){case"top":A={x:N,y:G.y-K.height};break;case"bottom":A={x:N,y:G.y+G.height};break;case"right":A={x:G.x+G.width,y:L};break;case"left":A={x:G.x-K.width,y:L};break;default:A={x:G.x,y:G.y}}switch(m8($)){case"start":A[B]-=O*(Y&&R?-1:1);break;case"end":A[B]+=O*(Y&&R?-1:1);break}return A}var ZV=async(Q,$,Y)=>{let{placement:G="bottom",strategy:K="absolute",middleware:H=[],platform:B}=Y,z=H.filter(Boolean),F=await(B.isRTL==null?void 0:B.isRTL($)),R=await B.getElementRects({reference:Q,floating:$,strategy:K}),{x:N,y:L}=oT(R,G,F),O=G,A={},C=0;for(let D=0;D<z.length;D++){let{name:b,fn:y}=z[D],{x:k,y:f,data:a,reset:s}=await y({x:N,y:L,initialPlacement:G,placement:O,strategy:K,middlewareData:A,rects:R,platform:B,elements:{reference:Q,floating:$}});if(N=k!=null?k:N,L=f!=null?f:L,A={...A,[b]:{...A[b],...a}},s&&C<=50){if(C++,typeof s==="object"){if(s.placement)O=s.placement;if(s.rects)R=s.rects===!0?await B.getElementRects({reference:Q,floating:$,strategy:K}):s.rects;({x:N,y:L}=oT(R,O,F))}D=-1}}return{x:N,y:L,placement:O,strategy:K,middlewareData:A}};async function SX(Q,$){var Y;if($===void 0)$={};let{x:G,y:K,platform:H,rects:B,elements:z,strategy:F}=Q,{boundary:R="clippingAncestors",rootBoundary:N="viewport",elementContext:L="floating",altBoundary:O=!1,padding:A=0}=p9($,Q),C=FU(A),b=z[O?L==="floating"?"reference":"floating":L],y=u8(await H.getClippingRect({element:((Y=await(H.isElement==null?void 0:H.isElement(b)))!=null?Y:!0)?b:b.contextElement||await(H.getDocumentElement==null?void 0:H.getDocumentElement(z.floating)),boundary:R,rootBoundary:N,strategy:F})),k=L==="floating"?{x:G,y:K,width:B.floating.width,height:B.floating.height}:B.reference,f=await(H.getOffsetParent==null?void 0:H.getOffsetParent(z.floating)),a=await(H.isElement==null?void 0:H.isElement(f))?await(H.getScale==null?void 0:H.getScale(f))||{x:1,y:1}:{x:1,y:1},s=u8(H.convertOffsetParentRelativeRectToViewportRelativeRect?await H.convertOffsetParentRelativeRectToViewportRelativeRect({elements:z,rect:k,offsetParent:f,strategy:F}):k);return{top:(y.top-s.top+C.top)/a.y,bottom:(s.bottom-y.bottom+C.bottom)/a.y,left:(y.left-s.left+C.left)/a.x,right:(s.right-y.right+C.right)/a.x}}var XV=(Q)=>({name:"arrow",options:Q,async fn($){let{x:Y,y:G,placement:K,rects:H,platform:B,elements:z,middlewareData:F}=$,{element:R,padding:N=0}=p9(Q,$)||{};if(R==null)return{};let L=FU(N),O={x:Y,y:G},A=vq(K),C=hq(A),D=await B.getDimensions(R),b=A==="y",y=b?"top":"left",k=b?"bottom":"right",f=b?"clientHeight":"clientWidth",a=H.reference[C]+H.reference[A]-O[A]-H.floating[C],s=O[A]-H.reference[A],g=await(B.getOffsetParent==null?void 0:B.getOffsetParent(R)),c=g?g[f]:0;if(!c||!await(B.isElement==null?void 0:B.isElement(g)))c=z.floating[f]||H.floating[C];let h=a/2-s/2,Z0=c/2-D[C]/2-1,E=f9(L[y],Z0),_0=f9(L[k],Z0),t=E,n=c-D[C]-_0,z0=c/2-D[C]/2+h,o=yq(t,z0,n),H0=!F.arrow&&m8(K)!=null&&z0!==o&&H.reference[C]/2-(z0<t?E:_0)-D[C]/2<0,G0=H0?z0<t?z0-t:z0-n:0;return{[A]:O[A]+G0,data:{[A]:o,centerOffset:z0-o-G0,...H0&&{alignmentOffset:G0}},reset:H0}}});var QV=function(Q){if(Q===void 0)Q={};return{name:"flip",options:Q,async fn($){var Y,G;let{placement:K,middlewareData:H,rects:B,initialPlacement:z,platform:F,elements:R}=$,{mainAxis:N=!0,crossAxis:L=!0,fallbackPlacements:O,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:D=!0,...b}=p9(Q,$);if((Y=H.arrow)!=null&&Y.alignmentOffset)return{};let y=l9(K),k=J9(z),f=l9(z)===z,a=await(F.isRTL==null?void 0:F.isRTL(R.floating)),s=O||(f||!D?[qJ(z)]:nT(z)),g=C!=="none";if(!O&&g)s.push(...sT(z,D,C,a));let c=[z,...s],h=await SX($,b),Z0=[],E=((G=H.flip)==null?void 0:G.overflows)||[];if(N)Z0.push(h[y]);if(L){let z0=aT(K,B,a);Z0.push(h[z0[0]],h[z0[1]])}if(E=[...E,{placement:K,overflows:Z0}],!Z0.every((z0)=>z0<=0)){var _0,t;let z0=(((_0=H.flip)==null?void 0:_0.index)||0)+1,o=c[z0];if(o){if(!(L==="alignment"?k!==J9(o):!1)||E.every((e)=>J9(e.placement)===k?e.overflows[0]>0:!0))return{data:{index:z0,overflows:E},reset:{placement:o}}}let H0=(t=E.filter((G0)=>G0.overflows[0]<=0).sort((G0,e)=>G0.overflows[1]-e.overflows[1])[0])==null?void 0:t.placement;if(!H0)switch(A){case"bestFit":{var n;let G0=(n=E.filter((e)=>{if(g){let U0=J9(e.placement);return U0===k||U0==="y"}return!0}).map((e)=>[e.placement,e.overflows.filter((U0)=>U0>0).reduce((U0,T)=>U0+T,0)]).sort((e,U0)=>e[1]-U0[1])[0])==null?void 0:n[0];if(G0)H0=G0;break}case"initialPlacement":H0=z;break}if(K!==H0)return{reset:{placement:H0}}}return{}}}};function tT(Q,$){return{top:Q.top-$.height,right:Q.right-$.width,bottom:Q.bottom-$.height,left:Q.left-$.width}}function eT(Q){return rT.some(($)=>Q[$]>=0)}var JV=function(Q){if(Q===void 0)Q={};return{name:"hide",options:Q,async fn($){let{rects:Y}=$,{strategy:G="referenceHidden",...K}=p9(Q,$);switch(G){case"referenceHidden":{let H=await SX($,{...K,elementContext:"reference"}),B=tT(H,Y.reference);return{data:{referenceHiddenOffsets:B,referenceHidden:eT(B)}}}case"escaped":{let H=await SX($,{...K,altBoundary:!0}),B=tT(H,Y.floating);return{data:{escapedOffsets:B,escaped:eT(B)}}}default:return{}}}}};var $V=new Set(["left","top"]);async function _v(Q,$){let{placement:Y,platform:G,elements:K}=Q,H=await(G.isRTL==null?void 0:G.isRTL(K.floating)),B=l9(Y),z=m8(Y),F=J9(Y)==="y",R=$V.has(B)?-1:1,N=H&&F?-1:1,L=p9($,Q),{mainAxis:O,crossAxis:A,alignmentAxis:C}=typeof L==="number"?{mainAxis:L,crossAxis:0,alignmentAxis:null}:{mainAxis:L.mainAxis||0,crossAxis:L.crossAxis||0,alignmentAxis:L.alignmentAxis};if(z&&typeof C==="number")A=z==="end"?C*-1:C;return F?{x:A*N,y:O*R}:{x:O*R,y:A*N}}var YV=function(Q){if(Q===void 0)Q=0;return{name:"offset",options:Q,async fn($){var Y,G;let{x:K,y:H,placement:B,middlewareData:z}=$,F=await _v($,Q);if(B===((Y=z.offset)==null?void 0:Y.placement)&&(G=z.arrow)!=null&&G.alignmentOffset)return{};return{x:K+F.x,y:H+F.y,data:{...F,placement:B}}}}},qV=function(Q){if(Q===void 0)Q={};return{name:"shift",options:Q,async fn($){let{x:Y,y:G,placement:K}=$,{mainAxis:H=!0,crossAxis:B=!1,limiter:z={fn:(b)=>{let{x:y,y:k}=b;return{x:y,y:k}}},...F}=p9(Q,$),R={x:Y,y:G},N=await SX($,F),L=J9(l9(K)),O=gq(L),A=R[O],C=R[L];if(H){let b=O==="y"?"top":"left",y=O==="y"?"bottom":"right",k=A+N[b],f=A-N[y];A=yq(k,A,f)}if(B){let b=L==="y"?"top":"left",y=L==="y"?"bottom":"right",k=C+N[b],f=C-N[y];C=yq(k,C,f)}let D=z.fn({...$,[O]:A,[L]:C});return{...D,data:{x:D.x-Y,y:D.y-G,enabled:{[O]:H,[L]:B}}}}}},GV=function(Q){if(Q===void 0)Q={};return{options:Q,fn($){let{x:Y,y:G,placement:K,rects:H,middlewareData:B}=$,{offset:z=0,mainAxis:F=!0,crossAxis:R=!0}=p9(Q,$),N={x:Y,y:G},L=J9(K),O=gq(L),A=N[O],C=N[L],D=p9(z,$),b=typeof D==="number"?{mainAxis:D,crossAxis:0}:{mainAxis:0,crossAxis:0,...D};if(F){let f=O==="y"?"height":"width",a=H.reference[O]-H.floating[f]+b.mainAxis,s=H.reference[O]+H.reference[f]-b.mainAxis;if(A<a)A=a;else if(A>s)A=s}if(R){var y,k;let f=O==="y"?"width":"height",a=$V.has(l9(K)),s=H.reference[L]-H.floating[f]+(a?((y=B.offset)==null?void 0:y[L])||0:0)+(a?0:b.crossAxis),g=H.reference[L]+H.reference[f]+(a?0:((k=B.offset)==null?void 0:k[L])||0)-(a?b.crossAxis:0);if(C<s)C=s;else if(C>g)C=g}return{[O]:A,[L]:C}}}},KV=function(Q){if(Q===void 0)Q={};return{name:"size",options:Q,async fn($){var Y,G;let{placement:K,rects:H,platform:B,elements:z}=$,{apply:F=()=>{},...R}=p9(Q,$),N=await SX($,R),L=l9(K),O=m8(K),A=J9(K)==="y",{width:C,height:D}=H.floating,b,y;if(L==="top"||L==="bottom")b=L,y=O===(await(B.isRTL==null?void 0:B.isRTL(z.floating))?"start":"end")?"left":"right";else y=L,b=O==="end"?"top":"bottom";let k=D-N.top-N.bottom,f=C-N.left-N.right,a=f9(D-N[b],k),s=f9(C-N[y],f),g=!$.middlewareData.shift,c=a,h=s;if((Y=$.middlewareData.shift)!=null&&Y.enabled.x)h=f;if((G=$.middlewareData.shift)!=null&&G.enabled.y)c=k;if(g&&!O){let E=g4(N.left,0),_0=g4(N.right,0),t=g4(N.top,0),n=g4(N.bottom,0);if(A)h=C-2*(E!==0||_0!==0?E+_0:g4(N.left,N.right));else c=D-2*(t!==0||n!==0?t+n:g4(N.top,N.bottom))}await F({...$,availableWidth:h,availableHeight:c});let Z0=await B.getDimensions(z.floating);if(C!==Z0.width||D!==Z0.height)return{reset:{rects:!0}};return{}}}};function xq(){return typeof window<"u"}function p8(Q){if(HV(Q))return(Q.nodeName||"").toLowerCase();return"#document"}function n4(Q){var $;return(Q==null||($=Q.ownerDocument)==null?void 0:$.defaultView)||window}function $9(Q){var $;return($=(HV(Q)?Q.ownerDocument:Q.document)||window.document)==null?void 0:$.documentElement}function HV(Q){if(!xq())return!1;return Q instanceof Node||Q instanceof n4(Q).Node}function k2(Q){if(!xq())return!1;return Q instanceof Element||Q instanceof n4(Q).Element}function Y9(Q){if(!xq())return!1;return Q instanceof HTMLElement||Q instanceof n4(Q).HTMLElement}function WV(Q){if(!xq()||typeof ShadowRoot>"u")return!1;return Q instanceof ShadowRoot||Q instanceof n4(Q).ShadowRoot}var Ov=new Set(["inline","contents"]);function EX(Q){let{overflow:$,overflowX:Y,overflowY:G,display:K}=m2(Q);return/auto|scroll|overlay|hidden|clip/.test($+G+Y)&&!Ov.has(K)}var Av=new Set(["table","td","th"]);function BV(Q){return Av.has(p8(Q))}var Iv=[":popover-open",":modal"];function WJ(Q){return Iv.some(($)=>{try{return Q.matches($)}catch(Y){return!1}})}var Tv=["transform","translate","scale","rotate","perspective"],Vv=["transform","translate","scale","rotate","perspective","filter"],Pv=["paint","layout","strict","content"];function kq(Q){let $=mq(),Y=k2(Q)?m2(Q):Q;return Tv.some((G)=>Y[G]?Y[G]!=="none":!1)||(Y.containerType?Y.containerType!=="normal":!1)||!$&&(Y.backdropFilter?Y.backdropFilter!=="none":!1)||!$&&(Y.filter?Y.filter!=="none":!1)||Vv.some((G)=>(Y.willChange||"").includes(G))||Pv.some((G)=>(Y.contain||"").includes(G))}function UV(Q){let $=I6(Q);while(Y9($)&&!l8($)){if(kq($))return $;else if(WJ($))return null;$=I6($)}return null}function mq(){if(typeof CSS>"u"||!CSS.supports)return!1;return CSS.supports("-webkit-backdrop-filter","none")}var wv=new Set(["html","body","#document"]);function l8(Q){return wv.has(p8(Q))}function m2(Q){return n4(Q).getComputedStyle(Q)}function HJ(Q){if(k2(Q))return{scrollLeft:Q.scrollLeft,scrollTop:Q.scrollTop};return{scrollLeft:Q.scrollX,scrollTop:Q.scrollY}}function I6(Q){if(p8(Q)==="html")return Q;let $=Q.assignedSlot||Q.parentNode||WV(Q)&&Q.host||$9(Q);return WV($)?$.host:$}function zV(Q){let $=I6(Q);if(l8($))return Q.ownerDocument?Q.ownerDocument.body:Q.body;if(Y9($)&&EX($))return $;return zV($)}function f8(Q,$,Y){var G;if($===void 0)$=[];if(Y===void 0)Y=!0;let K=zV(Q),H=K===((G=Q.ownerDocument)==null?void 0:G.body),B=n4(K);if(H){let z=uq(B);return $.concat(B,B.visualViewport||[],EX(K)?K:[],z&&Y?f8(z):[])}return $.concat(K,f8(K,[],Y))}function uq(Q){return Q.parent&&Object.getPrototypeOf(Q.parent)?Q.frameElement:null}function NV(Q){let $=m2(Q),Y=parseFloat($.width)||0,G=parseFloat($.height)||0,K=Y9(Q),H=K?Q.offsetWidth:Y,B=K?Q.offsetHeight:G,z=GJ(Y)!==H||GJ(G)!==B;if(z)Y=H,G=B;return{width:Y,height:G,$:z}}function MU(Q){return!k2(Q)?Q.contextElement:Q}function bX(Q){let $=MU(Q);if(!Y9($))return Q9(1);let Y=$.getBoundingClientRect(),{width:G,height:K,$:H}=NV($),B=(H?GJ(Y.width):Y.width)/G,z=(H?GJ(Y.height):Y.height)/K;if(!B||!Number.isFinite(B))B=1;if(!z||!Number.isFinite(z))z=1;return{x:B,y:z}}var Cv=Q9(0);function RV(Q){let $=n4(Q);if(!mq()||!$.visualViewport)return Cv;return{x:$.visualViewport.offsetLeft,y:$.visualViewport.offsetTop}}function jv(Q,$,Y){if($===void 0)$=!1;if(!Y||$&&Y!==n4(Q))return!1;return $}function d8(Q,$,Y,G){if($===void 0)$=!1;if(Y===void 0)Y=!1;let K=Q.getBoundingClientRect(),H=MU(Q),B=Q9(1);if($)if(G){if(k2(G))B=bX(G)}else B=bX(Q);let z=jv(H,Y,G)?RV(H):Q9(0),F=(K.left+z.x)/B.x,R=(K.top+z.y)/B.y,N=K.width/B.x,L=K.height/B.y;if(H){let O=n4(H),A=G&&k2(G)?n4(G):G,C=O,D=uq(C);while(D&&G&&A!==C){let b=bX(D),y=D.getBoundingClientRect(),k=m2(D),f=y.left+(D.clientLeft+parseFloat(k.paddingLeft))*b.x,a=y.top+(D.clientTop+parseFloat(k.paddingTop))*b.y;F*=b.x,R*=b.y,N*=b.x,L*=b.y,F+=f,R+=a,C=n4(D),D=uq(C)}}return u8({width:N,height:L,x:F,y:R})}function fq(Q,$){let Y=HJ(Q).scrollLeft;if(!$)return d8($9(Q)).left+Y;return $.left+Y}function _V(Q,$){let Y=Q.getBoundingClientRect(),G=Y.left+$.scrollLeft-fq(Q,Y),K=Y.top+$.scrollTop;return{x:G,y:K}}function Dv(Q){let{elements:$,rect:Y,offsetParent:G,strategy:K}=Q,H=K==="fixed",B=$9(G),z=$?WJ($.floating):!1;if(G===B||z&&H)return Y;let F={scrollLeft:0,scrollTop:0},R=Q9(1),N=Q9(0),L=Y9(G);if(L||!L&&!H){if(p8(G)!=="body"||EX(B))F=HJ(G);if(Y9(G)){let A=d8(G);R=bX(G),N.x=A.x+G.clientLeft,N.y=A.y+G.clientTop}}let O=B&&!L&&!H?_V(B,F):Q9(0);return{width:Y.width*R.x,height:Y.height*R.y,x:Y.x*R.x-F.scrollLeft*R.x+N.x+O.x,y:Y.y*R.y-F.scrollTop*R.y+N.y+O.y}}function Sv(Q){return Array.from(Q.getClientRects())}function Ev(Q){let $=$9(Q),Y=HJ(Q),G=Q.ownerDocument.body,K=g4($.scrollWidth,$.clientWidth,G.scrollWidth,G.clientWidth),H=g4($.scrollHeight,$.clientHeight,G.scrollHeight,G.clientHeight),B=-Y.scrollLeft+fq(Q),z=-Y.scrollTop;if(m2(G).direction==="rtl")B+=g4($.clientWidth,G.clientWidth)-K;return{width:K,height:H,x:B,y:z}}var FV=25;function bv(Q,$){let Y=n4(Q),G=$9(Q),K=Y.visualViewport,H=G.clientWidth,B=G.clientHeight,z=0,F=0;if(K){H=K.width,B=K.height;let N=mq();if(!N||N&&$==="fixed")z=K.offsetLeft,F=K.offsetTop}let R=fq(G);if(R<=0){let N=G.ownerDocument,L=N.body,O=getComputedStyle(L),A=N.compatMode==="CSS1Compat"?parseFloat(O.marginLeft)+parseFloat(O.marginRight)||0:0,C=Math.abs(G.clientWidth-L.clientWidth-A);if(C<=FV)H-=C}else if(R<=FV)H+=R;return{width:H,height:B,x:z,y:F}}var yv=new Set(["absolute","fixed"]);function gv(Q,$){let Y=d8(Q,!0,$==="fixed"),G=Y.top+Q.clientTop,K=Y.left+Q.clientLeft,H=Y9(Q)?bX(Q):Q9(1),B=Q.clientWidth*H.x,z=Q.clientHeight*H.y,F=K*H.x,R=G*H.y;return{width:B,height:z,x:F,y:R}}function LV(Q,$,Y){let G;if($==="viewport")G=bv(Q,Y);else if($==="document")G=Ev($9(Q));else if(k2($))G=gv($,Y);else{let K=RV(Q);G={x:$.x-K.x,y:$.y-K.y,width:$.width,height:$.height}}return u8(G)}function OV(Q,$){let Y=I6(Q);if(Y===$||!k2(Y)||l8(Y))return!1;return m2(Y).position==="fixed"||OV(Y,$)}function hv(Q,$){let Y=$.get(Q);if(Y)return Y;let G=f8(Q,[],!1).filter((z)=>k2(z)&&p8(z)!=="body"),K=null,H=m2(Q).position==="fixed",B=H?I6(Q):Q;while(k2(B)&&!l8(B)){let z=m2(B),F=kq(B);if(!F&&z.position==="fixed")K=null;if(H?!F&&!K:!F&&z.position==="static"&&!!K&&yv.has(K.position)||EX(B)&&!F&&OV(Q,B))G=G.filter((N)=>N!==B);else K=z;B=I6(B)}return $.set(Q,G),G}function vv(Q){let{element:$,boundary:Y,rootBoundary:G,strategy:K}=Q,B=[...Y==="clippingAncestors"?WJ($)?[]:hv($,this._c):[].concat(Y),G],z=B[0],F=B.reduce((R,N)=>{let L=LV($,N,K);return R.top=g4(L.top,R.top),R.right=f9(L.right,R.right),R.bottom=f9(L.bottom,R.bottom),R.left=g4(L.left,R.left),R},LV($,z,K));return{width:F.right-F.left,height:F.bottom-F.top,x:F.left,y:F.top}}function xv(Q){let{width:$,height:Y}=NV(Q);return{width:$,height:Y}}function kv(Q,$,Y){let G=Y9($),K=$9($),H=Y==="fixed",B=d8(Q,!0,H,$),z={scrollLeft:0,scrollTop:0},F=Q9(0);function R(){F.x=fq(K)}if(G||!G&&!H){if(p8($)!=="body"||EX(K))z=HJ($);if(G){let A=d8($,!0,H,$);F.x=A.x+$.clientLeft,F.y=A.y+$.clientTop}else if(K)R()}if(H&&!G&&K)R();let N=K&&!G&&!H?_V(K,z):Q9(0),L=B.left+z.scrollLeft-F.x-N.x,O=B.top+z.scrollTop-F.y-N.y;return{x:L,y:O,width:B.width,height:B.height}}function LU(Q){return m2(Q).position==="static"}function MV(Q,$){if(!Y9(Q)||m2(Q).position==="fixed")return null;if($)return $(Q);let Y=Q.offsetParent;if($9(Q)===Y)Y=Y.ownerDocument.body;return Y}function AV(Q,$){let Y=n4(Q);if(WJ(Q))return Y;if(!Y9(Q)){let K=I6(Q);while(K&&!l8(K)){if(k2(K)&&!LU(K))return K;K=I6(K)}return Y}let G=MV(Q,$);while(G&&BV(G)&&LU(G))G=MV(G,$);if(G&&l8(G)&&LU(G)&&!kq(G))return Y;return G||UV(Q)||Y}var mv=async function(Q){let $=this.getOffsetParent||AV,Y=this.getDimensions,G=await Y(Q.floating);return{reference:kv(Q.reference,await $(Q.floating),Q.strategy),floating:{x:0,y:0,width:G.width,height:G.height}}};function uv(Q){return m2(Q).direction==="rtl"}var IV={convertOffsetParentRelativeRectToViewportRelativeRect:Dv,getDocumentElement:$9,getClippingRect:vv,getOffsetParent:AV,getElementRects:mv,getClientRects:Sv,getDimensions:xv,getScale:bX,isElement:k2,isRTL:uv};function TV(Q,$){return Q.x===$.x&&Q.y===$.y&&Q.width===$.width&&Q.height===$.height}function fv(Q,$){let Y=null,G,K=$9(Q);function H(){var z;clearTimeout(G),(z=Y)==null||z.disconnect(),Y=null}function B(z,F){if(z===void 0)z=!1;if(F===void 0)F=1;H();let R=Q.getBoundingClientRect(),{left:N,top:L,width:O,height:A}=R;if(!z)$();if(!O||!A)return;let C=KJ(L),D=KJ(K.clientWidth-(N+O)),b=KJ(K.clientHeight-(L+A)),y=KJ(N),f={rootMargin:-C+"px "+-D+"px "+-b+"px "+-y+"px",threshold:g4(0,f9(1,F))||1},a=!0;function s(g){let c=g[0].intersectionRatio;if(c!==F){if(!a)return B();if(!c)G=setTimeout(()=>{B(!1,0.0000001)},1000);else B(!1,c)}if(c===1&&!TV(R,Q.getBoundingClientRect()))B();a=!1}try{Y=new IntersectionObserver(s,{...f,root:K.ownerDocument})}catch(g){Y=new IntersectionObserver(s,f)}Y.observe(Q)}return B(!0),H}function NU(Q,$,Y,G){if(G===void 0)G={};let{ancestorScroll:K=!0,ancestorResize:H=!0,elementResize:B=typeof ResizeObserver==="function",layoutShift:z=typeof IntersectionObserver==="function",animationFrame:F=!1}=G,R=MU(Q),N=K||H?[...R?f8(R):[],...f8($)]:[];N.forEach((y)=>{K&&y.addEventListener("scroll",Y,{passive:!0}),H&&y.addEventListener("resize",Y)});let L=R&&z?fv(R,Y):null,O=-1,A=null;if(B){if(A=new ResizeObserver((y)=>{let[k]=y;if(k&&k.target===R&&A)A.unobserve($),cancelAnimationFrame(O),O=requestAnimationFrame(()=>{var f;(f=A)==null||f.observe($)});Y()}),R&&!F)A.observe(R);A.observe($)}let C,D=F?d8(Q):null;if(F)b();function b(){let y=d8(Q);if(D&&!TV(D,y))Y();D=y,C=requestAnimationFrame(b)}return Y(),()=>{var y;if(N.forEach((k)=>{K&&k.removeEventListener("scroll",Y),H&&k.removeEventListener("resize",Y)}),L==null||L(),(y=A)==null||y.disconnect(),A=null,F)cancelAnimationFrame(C)}}var VV=YV;var PV=qV,wV=QV,CV=KV,jV=JV,RU=XV;var DV=GV,_U=(Q,$,Y)=>{let G=new Map,K={platform:IV,...Y},H={...K.platform,_c:G};return ZV(Q,$,{...K,platform:H})};var v5=J0(k0(),1),EV=J0(k0(),1),bV=J0(V8(),1),pv=typeof document<"u",lv=function(){},pq=pv?EV.useLayoutEffect:lv;function lq(Q,$){if(Q===$)return!0;if(typeof Q!==typeof $)return!1;if(typeof Q==="function"&&Q.toString()===$.toString())return!0;let Y,G,K;if(Q&&$&&typeof Q==="object"){if(Array.isArray(Q)){if(Y=Q.length,Y!==$.length)return!1;for(G=Y;G--!==0;)if(!lq(Q[G],$[G]))return!1;return!0}if(K=Object.keys(Q),Y=K.length,Y!==Object.keys($).length)return!1;for(G=Y;G--!==0;)if(!{}.hasOwnProperty.call($,K[G]))return!1;for(G=Y;G--!==0;){let H=K[G];if(H==="_owner"&&Q.$$typeof)continue;if(!lq(Q[H],$[H]))return!1}return!0}return Q!==Q&&$!==$}function yV(Q){if(typeof window>"u")return 1;return(Q.ownerDocument.defaultView||window).devicePixelRatio||1}function SV(Q,$){let Y=yV(Q);return Math.round($*Y)/Y}function OU(Q){let $=v5.useRef(Q);return pq(()=>{$.current=Q}),$}function gV(Q){if(Q===void 0)Q={};let{placement:$="bottom",strategy:Y="absolute",middleware:G=[],platform:K,elements:{reference:H,floating:B}={},transform:z=!0,whileElementsMounted:F,open:R}=Q,[N,L]=v5.useState({x:0,y:0,strategy:Y,placement:$,middlewareData:{},isPositioned:!1}),[O,A]=v5.useState(G);if(!lq(O,G))A(G);let[C,D]=v5.useState(null),[b,y]=v5.useState(null),k=v5.useCallback((e)=>{if(e!==g.current)g.current=e,D(e)},[]),f=v5.useCallback((e)=>{if(e!==c.current)c.current=e,y(e)},[]),a=H||C,s=B||b,g=v5.useRef(null),c=v5.useRef(null),h=v5.useRef(N),Z0=F!=null,E=OU(F),_0=OU(K),t=OU(R),n=v5.useCallback(()=>{if(!g.current||!c.current)return;let e={placement:$,strategy:Y,middleware:O};if(_0.current)e.platform=_0.current;_U(g.current,c.current,e).then((U0)=>{let T={...U0,isPositioned:t.current!==!1};if(z0.current&&!lq(h.current,T))h.current=T,bV.flushSync(()=>{L(T)})})},[O,$,Y,_0,t]);pq(()=>{if(R===!1&&h.current.isPositioned)h.current.isPositioned=!1,L((e)=>({...e,isPositioned:!1}))},[R]);let z0=v5.useRef(!1);pq(()=>{return z0.current=!0,()=>{z0.current=!1}},[]),pq(()=>{if(a)g.current=a;if(s)c.current=s;if(a&&s){if(E.current)return E.current(a,s,n);n()}},[a,s,n,E,Z0]);let o=v5.useMemo(()=>({reference:g,floating:c,setReference:k,setFloating:f}),[k,f]),H0=v5.useMemo(()=>({reference:a,floating:s}),[a,s]),G0=v5.useMemo(()=>{let e={position:Y,left:0,top:0};if(!H0.floating)return e;let U0=SV(H0.floating,N.x),T=SV(H0.floating,N.y);if(z)return{...e,transform:"translate("+U0+"px, "+T+"px)",...yV(H0.floating)>=1.5&&{willChange:"transform"}};return{position:Y,left:U0,top:T}},[Y,z,H0.floating,N.x,N.y]);return v5.useMemo(()=>({...N,update:n,refs:o,elements:H0,floatingStyles:G0}),[N,n,o,H0,G0])}var dv=(Q)=>{function $(Y){return{}.hasOwnProperty.call(Y,"current")}return{name:"arrow",options:Q,fn(Y){let{element:G,padding:K}=typeof Q==="function"?Q(Y):Q;if(G&&$(G)){if(G.current!=null)return RU({element:G.current,padding:K}).fn(Y);return{}}if(G)return RU({element:G,padding:K}).fn(Y);return{}}}},hV=(Q,$)=>({...VV(Q),options:[Q,$]}),vV=(Q,$)=>({...PV(Q),options:[Q,$]}),xV=(Q,$)=>({...DV(Q),options:[Q,$]}),kV=(Q,$)=>({...wV(Q),options:[Q,$]}),mV=(Q,$)=>({...CV(Q),options:[Q,$]});var uV=(Q,$)=>({...jV(Q),options:[Q,$]});var fV=(Q,$)=>({...dv(Q),options:[Q,$]});var pV=J0(k0(),1);var AU=J0(l5(),1),iv="Arrow",lV=pV.forwardRef((Q,$)=>{let{children:Y,width:G=10,height:K=5,...H}=Q;return AU.jsx(A5.svg,{...H,ref:$,width:G,height:K,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:Q.asChild?Y:AU.jsx("polygon",{points:"0,0 30,0 15,10"})})});lV.displayName=iv;var dV=lV;var iV=J0(k0(),1);function cV(Q){let[$,Y]=iV.useState(void 0);return c4(()=>{if(Q){Y({width:Q.offsetWidth,height:Q.offsetHeight});let G=new ResizeObserver((K)=>{if(!Array.isArray(K))return;if(!K.length)return;let H=K[0],B,z;if("borderBoxSize"in H){let F=H.borderBoxSize,R=Array.isArray(F)?F[0]:F;B=R.inlineSize,z=R.blockSize}else B=Q.offsetWidth,z=Q.offsetHeight;Y({width:B,height:z})});return G.observe(Q,{box:"border-box"}),()=>G.unobserve(Q)}else Y(void 0)},[Q]),$}var w7=J0(l5(),1);var IU="Popper",[rV,TU]=_X(IU),[rv,aV]=rV(IU),nV=(Q)=>{let{__scopePopper:$,children:Y}=Q,[G,K]=s4.useState(null);return w7.jsx(rv,{scope:$,anchor:G,onAnchorChange:K,children:Y})};nV.displayName=IU;var sV="PopperAnchor",oV=s4.forwardRef((Q,$)=>{let{__scopePopper:Y,virtualRef:G,...K}=Q,H=aV(sV,Y),B=s4.useRef(null),z=W4($,B),F=s4.useRef(null);return s4.useEffect(()=>{let R=F.current;if(F.current=G?.current||B.current,R!==F.current)H.onAnchorChange(F.current)}),G?null:w7.jsx(A5.div,{...K,ref:z})});oV.displayName=sV;var VU="PopperContent",[av,nv]=rV(VU),tV=s4.forwardRef((Q,$)=>{let{__scopePopper:Y,side:G="bottom",sideOffset:K=0,align:H="center",alignOffset:B=0,arrowPadding:z=0,avoidCollisions:F=!0,collisionBoundary:R=[],collisionPadding:N=0,sticky:L="partial",hideWhenDetached:O=!1,updatePositionStrategy:A="optimized",onPlaced:C,...D}=Q,b=aV(VU,Y),[y,k]=s4.useState(null),f=W4($,(C0)=>k(C0)),[a,s]=s4.useState(null),g=cV(a),c=g?.width??0,h=g?.height??0,Z0=G+(H!=="center"?"-"+H:""),E=typeof N==="number"?N:{top:0,right:0,bottom:0,left:0,...N},_0=Array.isArray(R)?R:[R],t=_0.length>0,n={padding:E,boundary:_0.filter(ov),altBoundary:t},{refs:z0,floatingStyles:o,placement:H0,isPositioned:G0,middlewareData:e}=gV({strategy:"fixed",placement:Z0,whileElementsMounted:(...C0)=>{return NU(...C0,{animationFrame:A==="always"})},elements:{reference:b.anchor},middleware:[hV({mainAxis:K+h,alignmentAxis:B}),F&&vV({mainAxis:!0,crossAxis:!1,limiter:L==="partial"?xV():void 0,...n}),F&&kV({...n}),mV({...n,apply:({elements:C0,rects:u0,availableWidth:$1,availableHeight:v1})=>{let{width:R0,height:h0}=u0.reference,Y1=C0.floating.style;Y1.setProperty("--radix-popper-available-width",`${$1}px`),Y1.setProperty("--radix-popper-available-height",`${v1}px`),Y1.setProperty("--radix-popper-anchor-width",`${R0}px`),Y1.setProperty("--radix-popper-anchor-height",`${h0}px`)}}),a&&fV({element:a,padding:z}),tv({arrowWidth:c,arrowHeight:h}),O&&uV({strategy:"referenceHidden",...n})]}),[U0,T]=XP(H0),B0=u9(C);c4(()=>{if(G0)B0?.()},[G0,B0]);let r=e.arrow?.x,S=e.arrow?.y,L0=e.arrow?.centerOffset!==0,[A0,V0]=s4.useState();return c4(()=>{if(y)V0(window.getComputedStyle(y).zIndex)},[y]),w7.jsx("div",{ref:z0.setFloating,"data-radix-popper-content-wrapper":"",style:{...o,transform:G0?o.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:A0,["--radix-popper-transform-origin"]:[e.transformOrigin?.x,e.transformOrigin?.y].join(" "),...e.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:Q.dir,children:w7.jsx(av,{scope:Y,placedSide:U0,onArrowChange:s,arrowX:r,arrowY:S,shouldHideArrow:L0,children:w7.jsx(A5.div,{"data-side":U0,"data-align":T,...D,ref:f,style:{...D.style,animation:!G0?"none":void 0}})})})});tV.displayName=VU;var eV="PopperArrow",sv={top:"bottom",right:"left",bottom:"top",left:"right"},ZP=s4.forwardRef(function($,Y){let{__scopePopper:G,...K}=$,H=nv(eV,G),B=sv[H.placedSide];return w7.jsx("span",{ref:H.onArrowChange,style:{position:"absolute",left:H.arrowX,top:H.arrowY,[B]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[H.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[H.placedSide],visibility:H.shouldHideArrow?"hidden":void 0},children:w7.jsx(dV,{...K,ref:Y,style:{...K.style,display:"block"}})})});ZP.displayName=eV;function ov(Q){return Q!==null}var tv=(Q)=>({name:"transformOrigin",options:Q,fn($){let{placement:Y,rects:G,middlewareData:K}=$,B=K.arrow?.centerOffset!==0,z=B?0:Q.arrowWidth,F=B?0:Q.arrowHeight,[R,N]=XP(Y),L={start:"0%",center:"50%",end:"100%"}[N],O=(K.arrow?.x??0)+z/2,A=(K.arrow?.y??0)+F/2,C="",D="";if(R==="bottom")C=B?L:`${O}px`,D=`${-F}px`;else if(R==="top")C=B?L:`${O}px`,D=`${G.floating.height+F}px`;else if(R==="right")C=`${-F}px`,D=B?L:`${A}px`;else if(R==="left")C=`${G.floating.width+F}px`,D=B?L:`${A}px`;return{data:{x:C,y:D}}}});function XP(Q){let[$,Y="center"]=Q.split("-");return[$,Y]}var QP=nV,JP=oV,$P=tV,YP=ZP;var BJ=J0(k0(),1);var dq=J0(l5(),1);var Zx=Symbol("radix.slottable");function qP(Q){let $=({children:Y})=>{return dq.jsx(dq.Fragment,{children:Y})};return $.displayName=`${Q}.Slottable`,$.__radixId=Zx,$}var GP=J0(k0(),1);var KP=J0(l5(),1),Xx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Qx="VisuallyHidden",WP=GP.forwardRef((Q,$)=>{return KP.jsx(A5.span,{...Q,ref:$,style:{...Xx,...Q.style}})});WP.displayName=Qx;var HP=WP;var x5=J0(l5(),1),[iq,Uo]=_X("Tooltip",[TU]),cq=TU(),BP="TooltipProvider",$x=700,PU="tooltip.open",[Yx,CU]=iq(BP),UP=(Q)=>{let{__scopeTooltip:$,delayDuration:Y=$x,skipDelayDuration:G=300,disableHoverableContent:K=!1,children:H}=Q,B=O1.useRef(!0),z=O1.useRef(!1),F=O1.useRef(0);return O1.useEffect(()=>{let R=F.current;return()=>window.clearTimeout(R)},[]),x5.jsx(Yx,{scope:$,isOpenDelayedRef:B,delayDuration:Y,onOpen:O1.useCallback(()=>{window.clearTimeout(F.current),B.current=!1},[]),onClose:O1.useCallback(()=>{window.clearTimeout(F.current),F.current=window.setTimeout(()=>B.current=!0,G)},[G]),isPointerInTransitRef:z,onPointerInTransitChange:O1.useCallback((R)=>{z.current=R},[]),disableHoverableContent:K,children:H})};UP.displayName=BP;var UJ="Tooltip",[qx,zJ]=iq(UJ),zP=(Q)=>{let{__scopeTooltip:$,children:Y,open:G,defaultOpen:K,onOpenChange:H,disableHoverableContent:B,delayDuration:z}=Q,F=CU(UJ,Q.__scopeTooltip),R=cq($),[N,L]=O1.useState(null),O=N2(),A=O1.useRef(0),C=B??F.disableHoverableContent,D=z??F.delayDuration,b=O1.useRef(!1),[y,k]=Lq({prop:G,defaultProp:K??!1,onChange:(c)=>{if(c)F.onOpen(),document.dispatchEvent(new CustomEvent(PU));else F.onClose();H?.(c)},caller:UJ}),f=O1.useMemo(()=>{return y?b.current?"delayed-open":"instant-open":"closed"},[y]),a=O1.useCallback(()=>{window.clearTimeout(A.current),A.current=0,b.current=!1,k(!0)},[k]),s=O1.useCallback(()=>{window.clearTimeout(A.current),A.current=0,k(!1)},[k]),g=O1.useCallback(()=>{window.clearTimeout(A.current),A.current=window.setTimeout(()=>{b.current=!0,k(!0),A.current=0},D)},[D,k]);return O1.useEffect(()=>{return()=>{if(A.current)window.clearTimeout(A.current),A.current=0}},[]),x5.jsx(QP,{...R,children:x5.jsx(qx,{scope:$,contentId:O,open:y,stateAttribute:f,trigger:N,onTriggerChange:L,onTriggerEnter:O1.useCallback(()=>{if(F.isOpenDelayedRef.current)g();else a()},[F.isOpenDelayedRef,g,a]),onTriggerLeave:O1.useCallback(()=>{if(C)s();else window.clearTimeout(A.current),A.current=0},[s,C]),onOpen:a,onClose:s,disableHoverableContent:C,children:Y})})};zP.displayName=UJ;var wU="TooltipTrigger",FP=O1.forwardRef((Q,$)=>{let{__scopeTooltip:Y,...G}=Q,K=zJ(wU,Y),H=CU(wU,Y),B=cq(Y),z=O1.useRef(null),F=W4($,z,K.onTriggerChange),R=O1.useRef(!1),N=O1.useRef(!1),L=O1.useCallback(()=>R.current=!1,[]);return O1.useEffect(()=>{return()=>document.removeEventListener("pointerup",L)},[L]),x5.jsx(JP,{asChild:!0,...B,children:x5.jsx(A5.button,{"aria-describedby":K.open?K.contentId:void 0,"data-state":K.stateAttribute,...G,ref:F,onPointerMove:H4(Q.onPointerMove,(O)=>{if(O.pointerType==="touch")return;if(!N.current&&!H.isPointerInTransitRef.current)K.onTriggerEnter(),N.current=!0}),onPointerLeave:H4(Q.onPointerLeave,()=>{K.onTriggerLeave(),N.current=!1}),onPointerDown:H4(Q.onPointerDown,()=>{if(K.open)K.onClose();R.current=!0,document.addEventListener("pointerup",L,{once:!0})}),onFocus:H4(Q.onFocus,()=>{if(!R.current)K.onOpen()}),onBlur:H4(Q.onBlur,K.onClose),onClick:H4(Q.onClick,K.onClose)})})});FP.displayName=wU;var jU="TooltipPortal",[Gx,Kx]=iq(jU,{forceMount:void 0}),LP=(Q)=>{let{__scopeTooltip:$,forceMount:Y,children:G,container:K}=Q,H=zJ(jU,$);return x5.jsx(Gx,{scope:$,forceMount:Y,children:x5.jsx(T7,{present:Y||H.open,children:x5.jsx(QJ,{asChild:!0,container:K,children:G})})})};LP.displayName=jU;var yX="TooltipContent",MP=O1.forwardRef((Q,$)=>{let Y=Kx(yX,Q.__scopeTooltip),{forceMount:G=Y.forceMount,side:K="top",...H}=Q,B=zJ(yX,Q.__scopeTooltip);return x5.jsx(T7,{present:G||B.open,children:B.disableHoverableContent?x5.jsx(NP,{side:K,...H,ref:$}):x5.jsx(Wx,{side:K,...H,ref:$})})}),Wx=O1.forwardRef((Q,$)=>{let Y=zJ(yX,Q.__scopeTooltip),G=CU(yX,Q.__scopeTooltip),K=O1.useRef(null),H=W4($,K),[B,z]=O1.useState(null),{trigger:F,onClose:R}=Y,N=K.current,{onPointerInTransitChange:L}=G,O=O1.useCallback(()=>{z(null),L(!1)},[L]),A=O1.useCallback((C,D)=>{let b=C.currentTarget,y={x:C.clientX,y:C.clientY},k=Fx(y,b.getBoundingClientRect()),f=Lx(y,k),a=Mx(D.getBoundingClientRect()),s=Rx([...f,...a]);z(s),L(!0)},[L]);return O1.useEffect(()=>{return()=>O()},[O]),O1.useEffect(()=>{if(F&&N){let C=(b)=>A(b,N),D=(b)=>A(b,F);return F.addEventListener("pointerleave",C),N.addEventListener("pointerleave",D),()=>{F.removeEventListener("pointerleave",C),N.removeEventListener("pointerleave",D)}}},[F,N,A,O]),O1.useEffect(()=>{if(B){let C=(D)=>{let b=D.target,y={x:D.clientX,y:D.clientY},k=F?.contains(b)||N?.contains(b),f=!Nx(y,B);if(k)O();else if(f)O(),R()};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[F,N,B,R,O]),x5.jsx(NP,{...Q,ref:H})}),[Hx,Bx]=iq(UJ,{isInside:!1}),Ux=qP("TooltipContent"),NP=O1.forwardRef((Q,$)=>{let{__scopeTooltip:Y,children:G,"aria-label":K,onEscapeKeyDown:H,onPointerDownOutside:B,...z}=Q,F=zJ(yX,Y),R=cq(Y),{onClose:N}=F;return O1.useEffect(()=>{return document.addEventListener(PU,N),()=>document.removeEventListener(PU,N)},[N]),O1.useEffect(()=>{if(F.trigger){let L=(O)=>{if(O.target?.contains(F.trigger))N()};return window.addEventListener("scroll",L,{capture:!0}),()=>window.removeEventListener("scroll",L,{capture:!0})}},[F.trigger,N]),x5.jsx(XJ,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:H,onPointerDownOutside:B,onFocusOutside:(L)=>L.preventDefault(),onDismiss:N,children:x5.jsxs($P,{"data-state":F.stateAttribute,...R,...z,ref:$,style:{...z.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:[x5.jsx(Ux,{children:G}),x5.jsx(Hx,{scope:Y,isInside:!0,children:x5.jsx(HP,{id:F.contentId,role:"tooltip",children:K||G})})]})})});MP.displayName=yX;var RP="TooltipArrow",zx=O1.forwardRef((Q,$)=>{let{__scopeTooltip:Y,...G}=Q,K=cq(Y);return Bx(RP,Y).isInside?null:x5.jsx(YP,{...K,...G,ref:$})});zx.displayName=RP;function Fx(Q,$){let Y=Math.abs($.top-Q.y),G=Math.abs($.bottom-Q.y),K=Math.abs($.right-Q.x),H=Math.abs($.left-Q.x);switch(Math.min(Y,G,K,H)){case H:return"left";case K:return"right";case Y:return"top";case G:return"bottom";default:throw Error("unreachable")}}function Lx(Q,$,Y=5){let G=[];switch($){case"top":G.push({x:Q.x-Y,y:Q.y+Y},{x:Q.x+Y,y:Q.y+Y});break;case"bottom":G.push({x:Q.x-Y,y:Q.y-Y},{x:Q.x+Y,y:Q.y-Y});break;case"left":G.push({x:Q.x+Y,y:Q.y-Y},{x:Q.x+Y,y:Q.y+Y});break;case"right":G.push({x:Q.x-Y,y:Q.y-Y},{x:Q.x-Y,y:Q.y+Y});break}return G}function Mx(Q){let{top:$,right:Y,bottom:G,left:K}=Q;return[{x:K,y:$},{x:Y,y:$},{x:Y,y:G},{x:K,y:G}]}function Nx(Q,$){let{x:Y,y:G}=Q,K=!1;for(let H=0,B=$.length-1;H<$.length;B=H++){let z=$[H],F=$[B],R=z.x,N=z.y,L=F.x,O=F.y;if(N>G!==O>G&&Y<(L-R)*(G-N)/(O-N)+R)K=!K}return K}function Rx(Q){let $=Q.slice();return $.sort((Y,G)=>{if(Y.x<G.x)return-1;else if(Y.x>G.x)return 1;else if(Y.y<G.y)return-1;else if(Y.y>G.y)return 1;else return 0}),_x($)}function _x(Q){if(Q.length<=1)return Q.slice();let $=[];for(let G=0;G<Q.length;G++){let K=Q[G];while($.length>=2){let H=$[$.length-1],B=$[$.length-2];if((H.x-B.x)*(K.y-B.y)>=(H.y-B.y)*(K.x-B.x))$.pop();else break}$.push(K)}$.pop();let Y=[];for(let G=Q.length-1;G>=0;G--){let K=Q[G];while(Y.length>=2){let H=Y[Y.length-1],B=Y[Y.length-2];if((H.x-B.x)*(K.y-B.y)>=(H.y-B.y)*(K.x-B.x))Y.pop();else break}Y.push(K)}if(Y.pop(),$.length===1&&Y.length===1&&$[0].x===Y[0].x&&$[0].y===Y[0].y)return $;else return $.concat(Y)}var _P=UP,OP=zP,AP=FP,IP=LP,DU=MP;var SU=J0(Q1(),1),VP=_P,PP=OP,wP=AP,EU=TP.forwardRef(({className:Q,sideOffset:$=4,...Y},G)=>SU.jsxDEV(IP,{children:SU.jsxDEV(DU,{ref:G,sideOffset:$,className:a0("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground 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 origin-[--radix-tooltip-content-transform-origin]",Q),...Y},void 0,!1,void 0,this)},void 0,!1,void 0,this));EU.displayName=DU.displayName;var L1=J0(Q1(),1),Ax="sidebar_state",Ix=604800,Tx="16rem",Vx="18rem",Px="3rem",wx="b",CP=j1.createContext(null);function gX(){let Q=j1.useContext(CP);if(!Q)throw Error("useSidebar must be used within a SidebarProvider.");return Q}var bU=j1.forwardRef(({defaultOpen:Q=!0,open:$,onOpenChange:Y,className:G,style:K,children:H,...B},z)=>{let F=Uq(),[R,N]=j1.useState(!1),[L,O]=j1.useState(Q),A=$??L,C=j1.useCallback((k)=>{let f=typeof k==="function"?k(A):k;if(Y)Y(f);else O(f);document.cookie=`${Ax}=${f}; path=/; max-age=${Ix}`},[Y,A]),D=j1.useCallback(()=>{return F?N((k)=>!k):C((k)=>!k)},[F,C,N]);j1.useEffect(()=>{let k=(f)=>{if(f.key===wx&&(f.metaKey||f.ctrlKey))f.preventDefault(),D()};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[D]);let b=A?"expanded":"collapsed",y=j1.useMemo(()=>({state:b,open:A,setOpen:C,isMobile:F,openMobile:R,setOpenMobile:N,toggleSidebar:D}),[b,A,C,F,R,N,D]);return L1.jsxDEV(CP.Provider,{value:y,children:L1.jsxDEV(VP,{delayDuration:0,children:L1.jsxDEV("div",{style:{"--sidebar-width":Tx,"--sidebar-width-icon":Px,...K},className:a0("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",G),ref:z,...B,children:H},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)});bU.displayName="SidebarProvider";var yU=j1.forwardRef(({side:Q="left",variant:$="sidebar",collapsible:Y="offcanvas",className:G,children:K,...H},B)=>{let{isMobile:z,state:F,openMobile:R,setOpenMobile:N}=gX();if(Y==="none")return L1.jsxDEV("div",{className:a0("flex h-full w-[var(--sidebar-width)] flex-col bg-sidebar text-sidebar-foreground",G),ref:B,...H,children:K},void 0,!1,void 0,this);if(z)return L1.jsxDEV(pT,{open:R,onOpenChange:N,...H,children:L1.jsxDEV(WU,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[var(--sidebar-width)] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Vx},side:Q,children:[L1.jsxDEV(HU,{className:"sr-only",children:[L1.jsxDEV(BU,{children:"Sidebar"},void 0,!1,void 0,this),L1.jsxDEV(UU,{children:"Displays the mobile sidebar."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L1.jsxDEV("div",{className:"flex h-full w-full flex-col",children:K},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return L1.jsxDEV("div",{ref:B,className:"group peer hidden text-sidebar-foreground md:block","data-state":F,"data-collapsible":F==="collapsed"?Y:"","data-variant":$,"data-side":Q,children:[L1.jsxDEV("div",{className:a0("relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",$==="floating"||$==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")},void 0,!1,void 0,this),L1.jsxDEV("div",{className:a0("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",Q==="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)]",$==="floating"||$==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",G),...H,children:L1.jsxDEV("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:K},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)});yU.displayName="Sidebar";var gU=j1.forwardRef(({className:Q,onClick:$,...Y},G)=>{let{toggleSidebar:K}=gX();return L1.jsxDEV(yB,{ref:G,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:a0("h-7 w-7",Q),onClick:(H)=>{$?.(H),K()},...Y,children:[L1.jsxDEV(R7,{},void 0,!1,void 0,this),L1.jsxDEV("span",{className:"sr-only",children:"Toggle Sidebar"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)});gU.displayName="SidebarTrigger";var hU=j1.forwardRef(({className:Q,...$},Y)=>{let{toggleSidebar:G}=gX();return L1.jsxDEV("button",{ref:Y,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:G,title:"Toggle Sidebar",className:a0("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",Q),...$},void 0,!1,void 0,this)});hU.displayName="SidebarRail";var Cx=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV("main",{ref:Y,className:a0("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",Q),...$},void 0,!1,void 0,this)});Cx.displayName="SidebarInset";var jx=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV(gB,{ref:Y,"data-sidebar":"input",className:a0("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",Q),...$},void 0,!1,void 0,this)});jx.displayName="SidebarInput";var vU=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV("div",{ref:Y,"data-sidebar":"header",className:a0("flex flex-col gap-2 p-2",Q),...$},void 0,!1,void 0,this)});vU.displayName="SidebarHeader";var xU=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV("div",{ref:Y,"data-sidebar":"footer",className:a0("flex flex-col gap-2 p-2",Q),...$},void 0,!1,void 0,this)});xU.displayName="SidebarFooter";var Dx=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV(ZJ,{ref:Y,"data-sidebar":"separator",className:a0("mx-2 w-auto bg-sidebar-border",Q),...$},void 0,!1,void 0,this)});Dx.displayName="SidebarSeparator";var kU=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV("div",{ref:Y,"data-sidebar":"content",className:a0("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",Q),...$},void 0,!1,void 0,this)});kU.displayName="SidebarContent";var mU=j1.forwardRef(({className:Q,...$},Y)=>{return L1.jsxDEV("div",{ref:Y,"data-sidebar":"group",className:a0("relative flex w-full min-w-0 flex-col p-2",Q),...$},void 0,!1,void 0,this)});mU.displayName="SidebarGroup";var uU=j1.forwardRef(({className:Q,asChild:$=!1,...Y},G)=>{return L1.jsxDEV($?O7:"div",{ref:G,"data-sidebar":"group-label",className:a0("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",Q),...Y},void 0,!1,void 0,this)});uU.displayName="SidebarGroupLabel";var Sx=j1.forwardRef(({className:Q,asChild:$=!1,...Y},G)=>{return L1.jsxDEV($?O7:"button",{ref:G,"data-sidebar":"group-action",className:a0("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",Q),...Y},void 0,!1,void 0,this)});Sx.displayName="SidebarGroupAction";var fU=j1.forwardRef(({className:Q,...$},Y)=>L1.jsxDEV("div",{ref:Y,"data-sidebar":"group-content",className:a0("w-full text-sm",Q),...$},void 0,!1,void 0,this));fU.displayName="SidebarGroupContent";var FJ=j1.forwardRef(({className:Q,...$},Y)=>L1.jsxDEV("ul",{ref:Y,"data-sidebar":"menu",className:a0("flex w-full min-w-0 flex-col gap-1",Q),...$},void 0,!1,void 0,this));FJ.displayName="SidebarMenu";var hX=j1.forwardRef(({className:Q,...$},Y)=>L1.jsxDEV("li",{ref:Y,"data-sidebar":"menu-item",className:a0("group/menu-item relative",Q),...$},void 0,!1,void 0,this));hX.displayName="SidebarMenuItem";var Ex=LX("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"}}),vX=j1.forwardRef(({asChild:Q=!1,isActive:$=!1,variant:Y="default",size:G="default",tooltip:K,className:H,...B},z)=>{let F=Q?O7:"button",{isMobile:R,state:N}=gX(),L=L1.jsxDEV(F,{ref:z,"data-sidebar":"menu-button","data-size":G,"data-active":$,className:a0(Ex({variant:Y,size:G}),H),...B},void 0,!1,void 0,this);if(!K)return L;if(typeof K==="string")K={children:K};return L1.jsxDEV(PP,{children:[L1.jsxDEV(wP,{asChild:!0,children:L},void 0,!1,void 0,this),L1.jsxDEV(EU,{side:"right",align:"center",hidden:N!=="collapsed"||R,...K},void 0,!1,void 0,this)]},void 0,!0,void 0,this)});vX.displayName="SidebarMenuButton";var bx=j1.forwardRef(({className:Q,asChild:$=!1,showOnHover:Y=!1,...G},K)=>{return L1.jsxDEV($?O7:"button",{ref:K,"data-sidebar":"menu-action",className:a0("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",Y&&"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",Q),...G},void 0,!1,void 0,this)});bx.displayName="SidebarMenuAction";var yx=j1.forwardRef(({className:Q,...$},Y)=>L1.jsxDEV("div",{ref:Y,"data-sidebar":"menu-badge",className:a0("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","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",Q),...$},void 0,!1,void 0,this));yx.displayName="SidebarMenuBadge";var gx=j1.forwardRef(({className:Q,showIcon:$=!1,...Y},G)=>{let K=j1.useMemo(()=>{return`${Math.floor(Math.random()*40)+50}%`},[]);return L1.jsxDEV("div",{ref:G,"data-sidebar":"menu-skeleton",className:a0("flex h-8 items-center gap-2 rounded-md px-2",Q),...Y,children:[$&&L1.jsxDEV(zU,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"},void 0,!1,void 0,this),L1.jsxDEV(zU,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":K}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)});gx.displayName="SidebarMenuSkeleton";var hx=j1.forwardRef(({className:Q,...$},Y)=>L1.jsxDEV("ul",{ref:Y,"data-sidebar":"menu-sub",className:a0("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",Q),...$},void 0,!1,void 0,this));hx.displayName="SidebarMenuSub";var vx=j1.forwardRef(({...Q},$)=>L1.jsxDEV("li",{ref:$,...Q},void 0,!1,void 0,this));vx.displayName="SidebarMenuSubItem";var xx=j1.forwardRef(({asChild:Q=!1,size:$="md",isActive:Y,className:G,...K},H)=>{return L1.jsxDEV(Q?O7:"a",{ref:H,"data-sidebar":"menu-sub-button","data-size":$,"data-active":Y,className:a0("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",$==="sm"&&"text-xs",$==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",G),...K},void 0,!1,void 0,this)});xx.displayName="SidebarMenuSubButton";var U1=J0(Q1(),1),kx=[{id:"kanban",label:"Kanban",icon:rQ,href:"#/"},{id:"tasks",label:"Tasks",icon:j8,href:"#/tasks"},{id:"docs",label:"Docs",icon:O4,href:"#/docs"}];function jP({currentPage:Q,isDark:$,onToggleTheme:Y,onSearchClick:G}){let{state:K}=gX(),H=Uq(),B=K==="expanded";return U1.jsxDEV(yU,{collapsible:"icon",variant:H?"floating":"sidebar",children:[U1.jsxDEV(vU,{children:[U1.jsxDEV(FJ,{children:U1.jsxDEV(hX,{children:U1.jsxDEV(vX,{size:"lg",asChild:!0,children:U1.jsxDEV("a",{href:"#/",children:[U1.jsxDEV("div",{className:"flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground",children:U1.jsxDEV("span",{className:"text-lg font-bold",children:"◆"},void 0,!1,void 0,this)},void 0,!1,void 0,this),U1.jsxDEV("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[U1.jsxDEV("span",{className:"truncate font-semibold",children:"Knowns.dev"},void 0,!1,void 0,this),U1.jsxDEV("span",{className:"truncate text-xs",children:"Task Management"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),B&&U1.jsxDEV("div",{className:"px-2 pb-2",children:U1.jsxDEV("button",{type:"button",onClick:G,className:"flex w-full items-center gap-2 rounded-lg border bg-background px-3 py-2 text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",children:[U1.jsxDEV(S8,{className:"h-4 w-4"},void 0,!1,void 0,this),U1.jsxDEV("span",{children:"Search..."},void 0,!1,void 0,this),U1.jsxDEV("kbd",{className:"ml-auto pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[U1.jsxDEV("span",{className:"text-xs",children:"⌘"},void 0,!1,void 0,this),"K"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U1.jsxDEV(kU,{children:U1.jsxDEV(mU,{children:[U1.jsxDEV(uU,{children:"Navigation"},void 0,!1,void 0,this),U1.jsxDEV(fU,{children:U1.jsxDEV(FJ,{children:kx.map((z)=>{let F=Q===z.id;return U1.jsxDEV(hX,{children:U1.jsxDEV(vX,{asChild:!0,isActive:F,tooltip:z.label,children:U1.jsxDEV("a",{href:z.href,children:[U1.jsxDEV(z.icon,{},void 0,!1,void 0,this),U1.jsxDEV("span",{children:z.label},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},z.id,!1,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),U1.jsxDEV(xU,{children:[U1.jsxDEV(FJ,{children:[U1.jsxDEV(hX,{children:U1.jsxDEV(vX,{asChild:!0,isActive:Q==="config",tooltip:"Settings",children:U1.jsxDEV("a",{href:"#/config",children:[U1.jsxDEV(E8,{},void 0,!1,void 0,this),U1.jsxDEV("span",{children:"Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),U1.jsxDEV(hX,{children:U1.jsxDEV(vX,{onClick:Y,tooltip:$?"Light mode":"Dark mode",children:[$?U1.jsxDEV(oQ,{},void 0,!1,void 0,this):U1.jsxDEV(aQ,{},void 0,!1,void 0,this),U1.jsxDEV("span",{children:$?"Light mode":"Dark mode"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B&&U1.jsxDEV("div",{className:"px-3 py-2 text-xs text-sidebar-foreground/50",children:U1.jsxDEV("div",{className:"flex items-center justify-between",children:[U1.jsxDEV("a",{href:"https://github.com/knowns-dev/knowns",target:"_blank",rel:"noopener noreferrer",className:"hover:text-sidebar-foreground transition-colors",children:"Knowns"},void 0,!1,void 0,this),U1.jsxDEV("span",{className:"font-mono",children:"0.1.5"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U1.jsxDEV(hU,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Z5=J0(k0(),1);function lU(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var c8=lU();function hP(Q){c8=Q}var RJ={exec:()=>null};function m1(Q,$=""){let Y=typeof Q=="string"?Q:Q.source,G={replace:(K,H)=>{let B=typeof H=="string"?H:H.source;return B=B.replace(h4.caret,"$1"),Y=Y.replace(K,B),G},getRegex:()=>new RegExp(Y,$)};return G}var mx=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),h4={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(Q)=>new RegExp(`^( {0,3}${Q})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(Q)=>new RegExp(`^ {0,${Math.min(3,Q-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(Q)=>new RegExp(`^ {0,${Math.min(3,Q-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(Q)=>new RegExp(`^ {0,${Math.min(3,Q-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(Q)=>new RegExp(`^ {0,${Math.min(3,Q-1)}}#`),htmlBeginRegex:(Q)=>new RegExp(`^ {0,${Math.min(3,Q-1)}}<(?:[a-z].*>|!--)`,"i")},ux=/^(?:[ \t]*(?:\n|$))+/,fx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,px=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_J=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,lx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,dU=/(?:[*+-]|\d{1,9}[.)])/,vP=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,xP=m1(vP).replace(/bull/g,dU).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),dx=m1(vP).replace(/bull/g,dU).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),iU=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ix=/^[^\n]+/,cU=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,cx=m1(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",cU).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rx=m1(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,dU).getRegex(),oq="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",rU=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ax=m1("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",rU).replace("tag",oq).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),kP=m1(iU).replace("hr",_J).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oq).getRegex(),nx=m1(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",kP).getRegex(),aU={blockquote:nx,code:fx,def:cx,fences:px,heading:lx,hr:_J,html:ax,lheading:xP,list:rx,newline:ux,paragraph:kP,table:RJ,text:ix},DP=m1("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_J).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oq).getRegex(),sx={...aU,lheading:dx,table:DP,paragraph:m1(iU).replace("hr",_J).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",DP).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oq).getRegex()},ox={...aU,html:m1(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rU).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:RJ,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:m1(iU).replace("hr",_J).replace("heading",` *#{1,6} *[^
|
|
286
286
|
]`).replace("lheading",xP).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ex=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,mP=/^( {2,}|\\)\n(?!\s*$)/,Zk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tq=/[\p{P}\p{S}]/u,nU=/[\s\p{P}\p{S}]/u,uP=/[^\s\p{P}\p{S}]/u,Xk=m1(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,nU).getRegex(),fP=/(?!~)[\p{P}\p{S}]/u,Qk=/(?!~)[\s\p{P}\p{S}]/u,Jk=/(?:[^\s\p{P}\p{S}]|~)/u,$k=m1(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",mx?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pP=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Yk=m1(pP,"u").replace(/punct/g,tq).getRegex(),qk=m1(pP,"u").replace(/punct/g,fP).getRegex(),lP="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Gk=m1(lP,"gu").replace(/notPunctSpace/g,uP).replace(/punctSpace/g,nU).replace(/punct/g,tq).getRegex(),Kk=m1(lP,"gu").replace(/notPunctSpace/g,Jk).replace(/punctSpace/g,Qk).replace(/punct/g,fP).getRegex(),Wk=m1("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,uP).replace(/punctSpace/g,nU).replace(/punct/g,tq).getRegex(),Hk=m1(/\\(punct)/,"gu").replace(/punct/g,tq).getRegex(),Bk=m1(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Uk=m1(rU).replace("(?:-->|$)","-->").getRegex(),zk=m1("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Uk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),aq=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Fk=m1(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",aq).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),dP=m1(/^!?\[(label)\]\[(ref)\]/).replace("label",aq).replace("ref",cU).getRegex(),iP=m1(/^!?\[(ref)\](?:\[\])?/).replace("ref",cU).getRegex(),Lk=m1("reflink|nolink(?!\\()","g").replace("reflink",dP).replace("nolink",iP).getRegex(),SP=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,sU={_backpedal:RJ,anyPunctuation:Hk,autolink:Bk,blockSkip:$k,br:mP,code:ex,del:RJ,emStrongLDelim:Yk,emStrongRDelimAst:Gk,emStrongRDelimUnd:Wk,escape:tx,link:Fk,nolink:iP,punctuation:Xk,reflink:dP,reflinkSearch:Lk,tag:zk,text:Zk,url:RJ},Mk={...sU,link:m1(/^!?\[(label)\]\((.*?)\)/).replace("label",aq).getRegex(),reflink:m1(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",aq).getRegex()},pU={...sU,emStrongRDelimAst:Kk,emStrongLDelim:qk,url:m1(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",SP).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:m1(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",SP).getRegex()},Nk={...pU,br:m1(mP).replace("{2,}","*").getRegex(),text:m1(pU.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},rq={normal:aU,gfm:sx,pedantic:ox},LJ={normal:sU,gfm:pU,breaks:Nk,pedantic:Mk},Rk={"&":"&","<":"<",">":">",'"':""","'":"'"},EP=(Q)=>Rk[Q];function T6(Q,$){if($){if(h4.escapeTest.test(Q))return Q.replace(h4.escapeReplace,EP)}else if(h4.escapeTestNoEncode.test(Q))return Q.replace(h4.escapeReplaceNoEncode,EP);return Q}function bP(Q){try{Q=encodeURI(Q).replace(h4.percentDecode,"%")}catch{return null}return Q}function yP(Q,$){let Y=Q.replace(h4.findPipe,(H,B,z)=>{let F=!1,R=B;for(;--R>=0&&z[R]==="\\";)F=!F;return F?"|":" |"}),G=Y.split(h4.splitPipe),K=0;if(G[0].trim()||G.shift(),G.length>0&&!G.at(-1)?.trim()&&G.pop(),$)if(G.length>$)G.splice($);else for(;G.length<$;)G.push("");for(;K<G.length;K++)G[K]=G[K].trim().replace(h4.slashPipe,"|");return G}function MJ(Q,$,Y){let G=Q.length;if(G===0)return"";let K=0;for(;K<G;){let H=Q.charAt(G-K-1);if(H===$&&!Y)K++;else if(H!==$&&Y)K++;else break}return Q.slice(0,G-K)}function _k(Q,$){if(Q.indexOf($[1])===-1)return-1;let Y=0;for(let G=0;G<Q.length;G++)if(Q[G]==="\\")G++;else if(Q[G]===$[0])Y++;else if(Q[G]===$[1]&&(Y--,Y<0))return G;return Y>0?-2:-1}function gP(Q,$,Y,G,K){let H=$.href,B=$.title||null,z=Q[1].replace(K.other.outputLinkReplace,"$1");G.state.inLink=!0;let F={type:Q[0].charAt(0)==="!"?"image":"link",raw:Y,href:H,title:B,text:z,tokens:G.inlineTokens(z)};return G.state.inLink=!1,F}function Ok(Q,$,Y){let G=Q.match(Y.other.indentCodeCompensation);if(G===null)return $;let K=G[1];return $.split(`
|
|
287
287
|
`).map((H)=>{let B=H.match(Y.other.beginningSpace);if(B===null)return H;let[z]=B;return z.length>=K.length?H.slice(K.length):H}).join(`
|
|
288
288
|
`)}var nq=class{options;rules;lexer;constructor(Q){this.options=Q||c8}space(Q){let $=this.rules.block.newline.exec(Q);if($&&$[0].length>0)return{type:"space",raw:$[0]}}code(Q){let $=this.rules.block.code.exec(Q);if($){let Y=$[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:$[0],codeBlockStyle:"indented",text:this.options.pedantic?Y:MJ(Y,`
|
|
@@ -449,4 +449,4 @@ ${Y.end}`}function cP(Q,$){let Y=tU[$];if(!Y)return!1;return Q.includes(Y.begin)
|
|
|
449
449
|
`))}function F(A,C,D,b){let y=D.enter("tableCell"),k=D.enter("phrasing"),f=D.containerPhrasing(A,{...b,before:H,after:H});return k(),y(),f}function R(A,C){return Cj(A,{align:C,alignDelimiters:G,padding:Y,stringLength:K})}function N(A,C,D){let b=A.children,y=-1,k=[],f=C.enter("table");while(++y<b.length)k[y]=L(b[y],C,D);return f(),k}function L(A,C,D){let b=A.children,y=-1,k=[],f=C.enter("tableRow");while(++y<b.length)k[y]=F(b[y],A,C,D);return f(),k}function O(A,C,D){let b=pJ.inlineCode(A,C,D);if(D.stack.includes("tableCell"))b=b.replace(/\|/g,"\\$&");return b}}function vF(){return{exit:{taskListCheckValueChecked:oj,taskListCheckValueUnchecked:oj,paragraph:Al}}}function xF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Il}}}function oj(Q){let $=this.stack[this.stack.length-2];v($.type==="listItem"),$.checked=Q.type==="taskListCheckValueChecked"}function Al(Q){let $=this.stack[this.stack.length-2];if($&&$.type==="listItem"&&typeof $.checked==="boolean"){let Y=this.stack[this.stack.length-1];v(Y.type==="paragraph");let G=Y.children[0];if(G&&G.type==="text"){let K=$.children,H=-1,B;while(++H<K.length){let z=K[H];if(z.type==="paragraph"){B=z;break}}if(B===Y){if(G.value=G.value.slice(1),G.value.length===0)Y.children.shift();else if(Y.position&&G.position&&typeof G.position.start.offset==="number")G.position.start.column++,G.position.start.offset++,Y.position.start=Object.assign({},G.position.start)}}}this.exit(Q)}function Il(Q,$,Y,G){let K=Q.children[0],H=typeof Q.checked==="boolean"&&K&&K.type==="paragraph",B="["+(Q.checked?"x":" ")+"] ",z=Y.createTracker(G);if(H)z.move(B);let F=pJ.listItem(Q,$,Y,{...G,...z.current()});if(H)F=F.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,R);return F;function R(N){return N+B}}function kF(){return[MF(),RF(),OF(),gF(),vF()]}function mF(Q){return{extensions:[NF(),_F(Q),AF(),hF(Q),xF()]}}var Tl={tokenize:jl,partial:!0},tj={tokenize:Dl,partial:!0},ej={tokenize:Sl,partial:!0},ZD={tokenize:El,partial:!0},Vl={tokenize:bl,partial:!0},XD={name:"wwwAutolink",tokenize:wl,previous:JD},QD={name:"protocolAutolink",tokenize:Cl,previous:$D},C6={name:"emailAutolink",tokenize:Pl,previous:YD},c9={};function fF(){return{text:c9}}var GZ=I.digit0;while(GZ<I.leftCurlyBrace)if(c9[GZ]=C6,GZ++,GZ===I.colon)GZ=I.uppercaseA;else if(GZ===I.leftSquareBracket)GZ=I.lowercaseA;c9[I.plusSign]=C6;c9[I.dash]=C6;c9[I.dot]=C6;c9[I.underscore]=C6;c9[I.uppercaseH]=[C6,QD];c9[I.lowercaseH]=[C6,QD];c9[I.uppercaseW]=[C6,XD];c9[I.lowercaseW]=[C6,XD];function Pl(Q,$,Y){let G=this,K,H;return B;function B(L){if(!uF(L)||!YD.call(G,G.previous)||pF(G.events))return Y(L);return Q.enter("literalAutolink"),Q.enter("literalAutolinkEmail"),z(L)}function z(L){if(uF(L))return Q.consume(L),z;if(L===I.atSign)return Q.consume(L),F;return Y(L)}function F(L){if(L===I.dot)return Q.check(Vl,N,R)(L);if(L===I.dash||L===I.underscore||T5(L))return H=!0,Q.consume(L),F;return N(L)}function R(L){return Q.consume(L),K=!0,F}function N(L){if(H&&K&&r5(G.previous))return Q.exit("literalAutolinkEmail"),Q.exit("literalAutolink"),$(L);return Y(L)}}function wl(Q,$,Y){let G=this;return K;function K(B){if(B!==I.uppercaseW&&B!==I.lowercaseW||!JD.call(G,G.previous)||pF(G.events))return Y(B);return Q.enter("literalAutolink"),Q.enter("literalAutolinkWww"),Q.check(Tl,Q.attempt(tj,Q.attempt(ej,H),Y),Y)(B)}function H(B){return Q.exit("literalAutolinkWww"),Q.exit("literalAutolink"),$(B)}}function Cl(Q,$,Y){let G=this,K="",H=!1;return B;function B(L){if((L===I.uppercaseH||L===I.lowercaseH)&&$D.call(G,G.previous)&&!pF(G.events))return Q.enter("literalAutolink"),Q.enter("literalAutolinkHttp"),K+=String.fromCodePoint(L),Q.consume(L),z;return Y(L)}function z(L){if(r5(L)&&K.length<5)return K+=String.fromCodePoint(L),Q.consume(L),z;if(L===I.colon){let O=K.toLowerCase();if(O==="http"||O==="https")return Q.consume(L),F}return Y(L)}function F(L){if(L===I.slash){if(Q.consume(L),H)return R;return H=!0,F}return Y(L)}function R(L){return L===I.eof||o8(L)||b1(L)||d9(L)||t8(L)?Y(L):Q.attempt(tj,Q.attempt(ej,N),Y)(L)}function N(L){return Q.exit("literalAutolinkHttp"),Q.exit("literalAutolink"),$(L)}}function jl(Q,$,Y){let G=0;return K;function K(B){if((B===I.uppercaseW||B===I.lowercaseW)&&G<3)return G++,Q.consume(B),K;if(B===I.dot&&G===3)return Q.consume(B),H;return Y(B)}function H(B){return B===I.eof?Y(B):$(B)}}function Dl(Q,$,Y){let G,K,H;return B;function B(R){if(R===I.dot||R===I.underscore)return Q.check(ZD,F,z)(R);if(R===I.eof||b1(R)||d9(R)||R!==I.dash&&t8(R))return F(R);return H=!0,Q.consume(R),B}function z(R){if(R===I.underscore)G=!0;else K=G,G=void 0;return Q.consume(R),B}function F(R){if(K||G||!H)return Y(R);return $(R)}}function Sl(Q,$){let Y=0,G=0;return K;function K(B){if(B===I.leftParenthesis)return Y++,Q.consume(B),K;if(B===I.rightParenthesis&&G<Y)return H(B);if(B===I.exclamationMark||B===I.quotationMark||B===I.ampersand||B===I.apostrophe||B===I.rightParenthesis||B===I.asterisk||B===I.comma||B===I.dot||B===I.colon||B===I.semicolon||B===I.lessThan||B===I.questionMark||B===I.rightSquareBracket||B===I.underscore||B===I.tilde)return Q.check(ZD,$,H)(B);if(B===I.eof||b1(B)||d9(B))return $(B);return Q.consume(B),K}function H(B){if(B===I.rightParenthesis)G++;return Q.consume(B),K}}function El(Q,$,Y){return G;function G(z){if(z===I.exclamationMark||z===I.quotationMark||z===I.apostrophe||z===I.rightParenthesis||z===I.asterisk||z===I.comma||z===I.dot||z===I.colon||z===I.semicolon||z===I.questionMark||z===I.underscore||z===I.tilde)return Q.consume(z),G;if(z===I.ampersand)return Q.consume(z),H;if(z===I.rightSquareBracket)return Q.consume(z),K;if(z===I.lessThan||z===I.eof||b1(z)||d9(z))return $(z);return Y(z)}function K(z){if(z===I.eof||z===I.leftParenthesis||z===I.leftSquareBracket||b1(z)||d9(z))return $(z);return G(z)}function H(z){return r5(z)?B(z):Y(z)}function B(z){if(z===I.semicolon)return Q.consume(z),G;if(r5(z))return Q.consume(z),B;return Y(z)}}function bl(Q,$,Y){return G;function G(H){return Q.consume(H),K}function K(H){return T5(H)?Y(H):$(H)}}function JD(Q){return Q===I.eof||Q===I.leftParenthesis||Q===I.asterisk||Q===I.underscore||Q===I.leftSquareBracket||Q===I.rightSquareBracket||Q===I.tilde||b1(Q)}function $D(Q){return!r5(Q)}function YD(Q){return!(Q===I.slash||uF(Q))}function uF(Q){return Q===I.plusSign||Q===I.dash||Q===I.dot||Q===I.underscore||T5(Q)}function pF(Q){let $=Q.length,Y=!1;while($--){let G=Q[$][1];if((G.type==="labelLink"||G.type==="labelImage")&&!G._balanced){Y=!0;break}if(G._gfmAutolinkLiteralWalkedInto){Y=!1;break}}if(Q.length>0&&!Y)Q[Q.length-1][1]._gfmAutolinkLiteralWalkedInto=!0;return Y}var yl={tokenize:ul,partial:!0};function lF(){return{document:{[I.leftSquareBracket]:{name:"gfmFootnoteDefinition",tokenize:xl,continuation:{tokenize:kl},exit:ml}},text:{[I.leftSquareBracket]:{name:"gfmFootnoteCall",tokenize:vl},[I.rightSquareBracket]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:gl,resolveTo:hl}}}}function gl(Q,$,Y){let G=this,K=G.events.length,H=G.parser.gfmFootnotes||(G.parser.gfmFootnotes=[]),B;while(K--){let F=G.events[K][1];if(F.type===P.labelImage){B=F;break}if(F.type==="gfmFootnoteCall"||F.type===P.labelLink||F.type===P.label||F.type===P.image||F.type===P.link)break}return z;function z(F){if(v(F===I.rightSquareBracket,"expected `]`"),!B||!B._balanced)return Y(F);let R=I4(G.sliceSerialize({start:B.end,end:G.now()}));if(R.codePointAt(0)!==I.caret||!H.includes(R.slice(1)))return Y(F);return Q.enter("gfmFootnoteCallLabelMarker"),Q.consume(F),Q.exit("gfmFootnoteCallLabelMarker"),$(F)}}function hl(Q,$){let Y=Q.length,G;while(Y--)if(Q[Y][1].type===P.labelImage&&Q[Y][0]==="enter"){G=Q[Y][1];break}v(G,"expected `labelStart` to resolve"),Q[Y+1][1].type=P.data,Q[Y+3][1].type="gfmFootnoteCallLabelMarker";let K={type:"gfmFootnoteCall",start:Object.assign({},Q[Y+3][1].start),end:Object.assign({},Q[Q.length-1][1].end)},H={type:"gfmFootnoteCallMarker",start:Object.assign({},Q[Y+3][1].end),end:Object.assign({},Q[Y+3][1].end)};H.end.column++,H.end.offset++,H.end._bufferIndex++;let B={type:"gfmFootnoteCallString",start:Object.assign({},H.end),end:Object.assign({},Q[Q.length-1][1].start)},z={type:P.chunkString,contentType:"string",start:Object.assign({},B.start),end:Object.assign({},B.end)},F=[Q[Y+1],Q[Y+2],["enter",K,$],Q[Y+3],Q[Y+4],["enter",H,$],["exit",H,$],["enter",B,$],["enter",z,$],["exit",z,$],["exit",B,$],Q[Q.length-2],Q[Q.length-1],["exit",K,$]];return Q.splice(Y,Q.length-Y+1,...F),Q}function vl(Q,$,Y){let G=this,K=G.parser.gfmFootnotes||(G.parser.gfmFootnotes=[]),H=0,B;return z;function z(L){return v(L===I.leftSquareBracket,"expected `[`"),Q.enter("gfmFootnoteCall"),Q.enter("gfmFootnoteCallLabelMarker"),Q.consume(L),Q.exit("gfmFootnoteCallLabelMarker"),F}function F(L){if(L!==I.caret)return Y(L);return Q.enter("gfmFootnoteCallMarker"),Q.consume(L),Q.exit("gfmFootnoteCallMarker"),Q.enter("gfmFootnoteCallString"),Q.enter("chunkString").contentType="string",R}function R(L){if(H>N0.linkReferenceSizeMax||L===I.rightSquareBracket&&!B||L===I.eof||L===I.leftSquareBracket||b1(L))return Y(L);if(L===I.rightSquareBracket){Q.exit("chunkString");let O=Q.exit("gfmFootnoteCallString");if(!K.includes(I4(G.sliceSerialize(O))))return Y(L);return Q.enter("gfmFootnoteCallLabelMarker"),Q.consume(L),Q.exit("gfmFootnoteCallLabelMarker"),Q.exit("gfmFootnoteCall"),$}if(!b1(L))B=!0;return H++,Q.consume(L),L===I.backslash?N:R}function N(L){if(L===I.leftSquareBracket||L===I.backslash||L===I.rightSquareBracket)return Q.consume(L),H++,R;return R(L)}}function xl(Q,$,Y){let G=this,K=G.parser.gfmFootnotes||(G.parser.gfmFootnotes=[]),H,B=0,z;return F;function F(C){return v(C===I.leftSquareBracket,"expected `[`"),Q.enter("gfmFootnoteDefinition")._container=!0,Q.enter("gfmFootnoteDefinitionLabel"),Q.enter("gfmFootnoteDefinitionLabelMarker"),Q.consume(C),Q.exit("gfmFootnoteDefinitionLabelMarker"),R}function R(C){if(C===I.caret)return Q.enter("gfmFootnoteDefinitionMarker"),Q.consume(C),Q.exit("gfmFootnoteDefinitionMarker"),Q.enter("gfmFootnoteDefinitionLabelString"),Q.enter("chunkString").contentType="string",N;return Y(C)}function N(C){if(B>N0.linkReferenceSizeMax||C===I.rightSquareBracket&&!z||C===I.eof||C===I.leftSquareBracket||b1(C))return Y(C);if(C===I.rightSquareBracket){Q.exit("chunkString");let D=Q.exit("gfmFootnoteDefinitionLabelString");return H=I4(G.sliceSerialize(D)),Q.enter("gfmFootnoteDefinitionLabelMarker"),Q.consume(C),Q.exit("gfmFootnoteDefinitionLabelMarker"),Q.exit("gfmFootnoteDefinitionLabel"),O}if(!b1(C))z=!0;return B++,Q.consume(C),C===I.backslash?L:N}function L(C){if(C===I.leftSquareBracket||C===I.backslash||C===I.rightSquareBracket)return Q.consume(C),B++,N;return N(C)}function O(C){if(C===I.colon){if(Q.enter("definitionMarker"),Q.consume(C),Q.exit("definitionMarker"),!K.includes(H))K.push(H);return t0(Q,A,"gfmFootnoteDefinitionWhitespace")}return Y(C)}function A(C){return $(C)}}function kl(Q,$,Y){return Q.check(i9,$,Q.attempt(yl,$,Y))}function ml(Q){Q.exit("gfmFootnoteDefinition")}function ul(Q,$,Y){let G=this;return t0(Q,K,"gfmFootnoteDefinitionIndent",N0.tabSize+1);function K(H){let B=G.events[G.events.length-1];return B&&B[1].type==="gfmFootnoteDefinitionIndent"&&B[2].sliceSerialize(B[1],!0).length===N0.tabSize?$(H):Y(H)}}function dF(Q){let Y=(Q||{}).singleTilde,G={name:"strikethrough",tokenize:H,resolveAll:K};if(Y===null||Y===void 0)Y=!0;return{text:{[I.tilde]:G},insideSpan:{null:[G]},attentionMarkers:{null:[I.tilde]}};function K(B,z){let F=-1;while(++F<B.length)if(B[F][0]==="enter"&&B[F][1].type==="strikethroughSequenceTemporary"&&B[F][1]._close){let R=F;while(R--)if(B[R][0]==="exit"&&B[R][1].type==="strikethroughSequenceTemporary"&&B[R][1]._open&&B[F][1].end.offset-B[F][1].start.offset===B[R][1].end.offset-B[R][1].start.offset){B[F][1].type="strikethroughSequence",B[R][1].type="strikethroughSequence";let N={type:"strikethrough",start:Object.assign({},B[R][1].start),end:Object.assign({},B[F][1].end)},L={type:"strikethroughText",start:Object.assign({},B[R][1].end),end:Object.assign({},B[F][1].start)},O=[["enter",N,z],["enter",B[R][1],z],["exit",B[R][1],z],["enter",L,z]],A=z.parser.constructs.insideSpan.null;if(A)C5(O,O.length,0,g7(A,B.slice(R+1,F),z));C5(O,O.length,0,[["exit",L,z],["enter",B[F][1],z],["exit",B[F][1],z],["exit",N,z]]),C5(B,R-1,F-R+3,O),F=R+O.length-2;break}}F=-1;while(++F<B.length)if(B[F][1].type==="strikethroughSequenceTemporary")B[F][1].type=P.data;return B}function H(B,z,F){let R=this.previous,N=this.events,L=0;return O;function O(C){if(v(C===I.tilde,"expected `~`"),R===I.tilde&&N[N.length-1][1].type!==P.characterEscape)return F(C);return B.enter("strikethroughSequenceTemporary"),A(C)}function A(C){let D=w6(R);if(C===I.tilde){if(L>1)return F(C);return B.consume(C),L++,A}if(L<2&&!Y)return F(C);let b=B.exit("strikethroughSequenceTemporary"),y=w6(C);return b._open=!y||y===N0.attentionSideAfter&&Boolean(D),b._close=!D||D===N0.attentionSideAfter&&Boolean(y),z(C)}}}class iF{constructor(){this.map=[]}add(Q,$,Y){fl(this,Q,$,Y)}consume(Q){if(this.map.sort(function(K,H){return K[0]-H[0]}),this.map.length===0)return;let $=this.map.length,Y=[];while($>0)$-=1,Y.push(Q.slice(this.map[$][0]+this.map[$][1]),this.map[$][2]),Q.length=this.map[$][0];Y.push(Q.slice()),Q.length=0;let G=Y.pop();while(G){for(let K of G)Q.push(K);G=Y.pop()}this.map.length=0}}function fl(Q,$,Y,G){let K=0;if(Y===0&&G.length===0)return;while(K<Q.map.length){if(Q.map[K][0]===$){Q.map[K][1]+=Y,Q.map[K][2].push(...G);return}K+=1}Q.map.push([$,Y,G])}function qD(Q,$){v(Q[$][1].type==="table","expected table");let Y=!1,G=[];while($<Q.length){let K=Q[$];if(Y){if(K[0]==="enter"){if(K[1].type==="tableContent")G.push(Q[$+1][1].type==="tableDelimiterMarker"?"left":"none")}else if(K[1].type==="tableContent"){if(Q[$-1][1].type==="tableDelimiterMarker"){let H=G.length-1;G[H]=G[H]==="left"?"center":"right"}}else if(K[1].type==="tableDelimiterRow")break}else if(K[0]==="enter"&&K[1].type==="tableDelimiterRow")Y=!0;$+=1}return G}function cF(){return{flow:{null:{name:"table",tokenize:pl,resolveAll:ll}}}}function pl(Q,$,Y){let G=this,K=0,H=0,B;return z;function z(E){let _0=G.events.length-1;while(_0>-1){let z0=G.events[_0][1].type;if(z0===P.lineEnding||z0===P.linePrefix)_0--;else break}let t=_0>-1?G.events[_0][1].type:null,n=t==="tableHead"||t==="tableRow"?g:F;if(n===g&&G.parser.lazy[G.now().line])return Y(E);return n(E)}function F(E){return Q.enter("tableHead"),Q.enter("tableRow"),R(E)}function R(E){if(E===I.verticalBar)return N(E);return B=!0,H+=1,N(E)}function N(E){if(E===I.eof)return Y(E);if(w0(E)){if(H>1)return H=0,G.interrupt=!0,Q.exit("tableRow"),Q.enter(P.lineEnding),Q.consume(E),Q.exit(P.lineEnding),A;return Y(E)}if(o0(E))return t0(Q,N,P.whitespace)(E);if(H+=1,B)B=!1,K+=1;if(E===I.verticalBar)return Q.enter("tableCellDivider"),Q.consume(E),Q.exit("tableCellDivider"),B=!0,N;return Q.enter(P.data),L(E)}function L(E){if(E===I.eof||E===I.verticalBar||b1(E))return Q.exit(P.data),N(E);return Q.consume(E),E===I.backslash?O:L}function O(E){if(E===I.backslash||E===I.verticalBar)return Q.consume(E),L;return L(E)}function A(E){if(G.interrupt=!1,G.parser.lazy[G.now().line])return Y(E);if(Q.enter("tableDelimiterRow"),B=!1,o0(E))return v(G.parser.constructs.disable.null,"expected `disabled.null`"),t0(Q,C,P.linePrefix,G.parser.constructs.disable.null.includes("codeIndented")?void 0:N0.tabSize)(E);return C(E)}function C(E){if(E===I.dash||E===I.colon)return b(E);if(E===I.verticalBar)return B=!0,Q.enter("tableCellDivider"),Q.consume(E),Q.exit("tableCellDivider"),D;return s(E)}function D(E){if(o0(E))return t0(Q,b,P.whitespace)(E);return b(E)}function b(E){if(E===I.colon)return H+=1,B=!0,Q.enter("tableDelimiterMarker"),Q.consume(E),Q.exit("tableDelimiterMarker"),y;if(E===I.dash)return H+=1,y(E);if(E===I.eof||w0(E))return a(E);return s(E)}function y(E){if(E===I.dash)return Q.enter("tableDelimiterFiller"),k(E);return s(E)}function k(E){if(E===I.dash)return Q.consume(E),k;if(E===I.colon)return B=!0,Q.exit("tableDelimiterFiller"),Q.enter("tableDelimiterMarker"),Q.consume(E),Q.exit("tableDelimiterMarker"),f;return Q.exit("tableDelimiterFiller"),f(E)}function f(E){if(o0(E))return t0(Q,a,P.whitespace)(E);return a(E)}function a(E){if(E===I.verticalBar)return C(E);if(E===I.eof||w0(E)){if(!B||K!==H)return s(E);return Q.exit("tableDelimiterRow"),Q.exit("tableHead"),$(E)}return s(E)}function s(E){return Y(E)}function g(E){return Q.enter("tableRow"),c(E)}function c(E){if(E===I.verticalBar)return Q.enter("tableCellDivider"),Q.consume(E),Q.exit("tableCellDivider"),c;if(E===I.eof||w0(E))return Q.exit("tableRow"),$(E);if(o0(E))return t0(Q,c,P.whitespace)(E);return Q.enter(P.data),h(E)}function h(E){if(E===I.eof||E===I.verticalBar||b1(E))return Q.exit(P.data),c(E);return Q.consume(E),E===I.backslash?Z0:h}function Z0(E){if(E===I.backslash||E===I.verticalBar)return Q.consume(E),h;return h(E)}}function ll(Q,$){let Y=-1,G=!0,K=0,H=[0,0,0,0],B=[0,0,0,0],z=!1,F=0,R,N,L,O=new iF;while(++Y<Q.length){let A=Q[Y],C=A[1];if(A[0]==="enter"){if(C.type==="tableHead"){if(z=!1,F!==0)v(R,"there should be a table opening"),GD(O,$,F,R,N),N=void 0,F=0;R={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},O.add(Y,0,[["enter",R,$]])}else if(C.type==="tableRow"||C.type==="tableDelimiterRow"){if(G=!0,L=void 0,H=[0,0,0,0],B=[0,Y+1,0,0],z)z=!1,N={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},O.add(Y,0,[["enter",N,$]]);K=C.type==="tableDelimiterRow"?2:N?3:1}else if(K&&(C.type===P.data||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")){if(G=!1,B[2]===0){if(H[1]!==0)B[0]=B[1],L=mG(O,$,H,K,void 0,L),H=[0,0,0,0];B[2]=Y}}else if(C.type==="tableCellDivider")if(G)G=!1;else{if(H[1]!==0)B[0]=B[1],L=mG(O,$,H,K,void 0,L);H=B,B=[H[1],Y,0,0]}}else if(C.type==="tableHead")z=!0,F=Y;else if(C.type==="tableRow"||C.type==="tableDelimiterRow"){if(F=Y,H[1]!==0)B[0]=B[1],L=mG(O,$,H,K,Y,L);else if(B[1]!==0)L=mG(O,$,B,K,Y,L);K=0}else if(K&&(C.type===P.data||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller"))B[3]=Y}if(F!==0)v(R,"expected table opening"),GD(O,$,F,R,N);O.consume($.events),Y=-1;while(++Y<$.events.length){let A=$.events[Y];if(A[0]==="enter"&&A[1].type==="table")A[1]._align=qD($.events,Y)}return Q}function mG(Q,$,Y,G,K,H){let B=G===1?"tableHeader":G===2?"tableDelimiter":"tableData",z="tableContent";if(Y[0]!==0)v(H,"expected previous cell enter"),H.end=Object.assign({},J3($.events,Y[0])),Q.add(Y[0],0,[["exit",H,$]]);let F=J3($.events,Y[1]);if(H={type:B,start:Object.assign({},F),end:Object.assign({},F)},Q.add(Y[1],0,[["enter",H,$]]),Y[2]!==0){let R=J3($.events,Y[2]),N=J3($.events,Y[3]),L={type:"tableContent",start:Object.assign({},R),end:Object.assign({},N)};if(Q.add(Y[2],0,[["enter",L,$]]),v(Y[3]!==0),G!==2){let O=$.events[Y[2]],A=$.events[Y[3]];if(O[1].end=Object.assign({},A[1].end),O[1].type=P.chunkText,O[1].contentType=N0.contentTypeText,Y[3]>Y[2]+1){let C=Y[2]+1,D=Y[3]-Y[2]-1;Q.add(C,D,[])}}Q.add(Y[3]+1,0,[["exit",L,$]])}if(K!==void 0)H.end=Object.assign({},J3($.events,K)),Q.add(K,0,[["exit",H,$]]),H=void 0;return H}function GD(Q,$,Y,G,K){let H=[],B=J3($.events,Y);if(K)K.end=Object.assign({},B),H.push(["exit",K,$]);G.end=Object.assign({},B),H.push(["exit",G,$]),Q.add(Y+1,0,H)}function J3(Q,$){let Y=Q[$],G=Y[0]==="enter"?"start":"end";return Y[1][G]}var dl={name:"tasklistCheck",tokenize:il};function rF(){return{text:{[I.leftSquareBracket]:dl}}}function il(Q,$,Y){let G=this;return K;function K(F){if(v(F===I.leftSquareBracket,"expected `[`"),G.previous!==I.eof||!G._gfmTasklistFirstContentOfListItem)return Y(F);return Q.enter("taskListCheck"),Q.enter("taskListCheckMarker"),Q.consume(F),Q.exit("taskListCheckMarker"),H}function H(F){if(b1(F))return Q.enter("taskListCheckValueUnchecked"),Q.consume(F),Q.exit("taskListCheckValueUnchecked"),B;if(F===I.uppercaseX||F===I.lowercaseX)return Q.enter("taskListCheckValueChecked"),Q.consume(F),Q.exit("taskListCheckValueChecked"),B;return Y(F)}function B(F){if(F===I.rightSquareBracket)return Q.enter("taskListCheckMarker"),Q.consume(F),Q.exit("taskListCheckMarker"),Q.exit("taskListCheck"),z;return Y(F)}function z(F){if(w0(F))return $(F);if(o0(F))return Q.check({tokenize:cl},$,Y)(F);return Y(F)}}function cl(Q,$,Y){return t0(Q,G,P.whitespace);function G(K){return K===I.eof?Y(K):$(K)}}function KD(Q){return HG([fF(),lF(),dF(Q),cF(),rF()])}var rl={};function uG(Q){let $=this,Y=Q||rl,G=$.data(),K=G.micromarkExtensions||(G.micromarkExtensions=[]),H=G.fromMarkdownExtensions||(G.fromMarkdownExtensions=[]),B=G.toMarkdownExtensions||(G.toMarkdownExtensions=[]);K.push(KD(Y)),H.push(kF()),B.push(mF(Y))}var U4=J0(Q1(),1),HD=WD.forwardRef(({markdown:Q,className:$="",sectionType:Y,enableGFM:G=!0,onDocLinkClick:K},H)=>{let{isDark:B}=F5();if(!Q)return null;let z=rP(xX(Q,Y)),F=B?"inline-flex items-center gap-1 px-1 py-1 rounded-md text-sm font-medium transition-all hover:scale-105 bg-green-900/20 border border-green-500/30 text-green-300 hover:bg-green-900/30 hover:border-green-500/50":"inline-flex items-center gap-1 px-1 py-1 rounded-md text-sm font-medium transition-all hover:scale-105 bg-green-100/50 border border-green-500/30 text-green-700 hover:bg-green-100 hover:border-green-500/50",R=B?"inline-flex items-center gap-1 px-1 py-1 rounded-md text-sm font-medium transition-all hover:scale-105 bg-blue-900/20 border border-blue-500/30 text-blue-300 hover:bg-blue-900/30 hover:border-blue-500/50":"inline-flex items-center gap-1 px-1 py-1 rounded-md text-sm font-medium transition-all hover:scale-105 bg-blue-100/50 border border-blue-500/30 text-blue-700 hover:bg-blue-100 hover:border-blue-500/50",N=({href:L,children:O})=>{if(L&&/^(task-)?\d+(\.md)?$/.test(L)){let A=L.replace(/^task-/,"").replace(/\.md$/,""),C=`#/tasks/${A}`;return U4.jsxDEV("a",{href:C,className:F,"data-task-id":A,children:[U4.jsxDEV(_6,{className:"w-4 h-4 shrink-0"},void 0,!1,void 0,this),O]},void 0,!0,void 0,this)}if(L&&(L.endsWith(".md")||L.includes(".md#"))){let A=L.replace(/^\.\//,""),C=`#/docs/${A}`;return U4.jsxDEV("a",{href:C,className:R,"data-doc-path":A,onClick:(D)=>{if(K)D.preventDefault(),K(A)},children:[U4.jsxDEV(O4,{className:"w-4 h-4 shrink-0"},void 0,!1,void 0,this),O]},void 0,!0,void 0,this)}return U4.jsxDEV("a",{href:L,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-600 underline",children:O},void 0,!1,void 0,this)};return U4.jsxDEV("div",{ref:H,className:`prose prose-sm max-w-none ${B?"prose-invert":""} ${$}`,children:U4.jsxDEV(WF,{remarkPlugins:G?[uG]:[],components:{a:N,code:({className:L,children:O,...A})=>{if(!L)return U4.jsxDEV("code",{className:`px-1.5 py-0.5 rounded text-sm ${B?"bg-gray-700 text-gray-200":"bg-gray-100 text-gray-800"}`,...A,children:O},void 0,!1,void 0,this);return U4.jsxDEV("code",{className:L,...A,children:O},void 0,!1,void 0,this)},pre:({children:L})=>U4.jsxDEV("pre",{className:`overflow-x-auto rounded-lg p-4 text-sm ${B?"bg-gray-900":"bg-gray-100"}`,children:L},void 0,!1,void 0,this),table:({children:L})=>U4.jsxDEV("div",{className:"overflow-x-auto my-4",children:U4.jsxDEV("table",{className:"min-w-full border-collapse",children:L},void 0,!1,void 0,this)},void 0,!1,void 0,this),th:({children:L})=>U4.jsxDEV("th",{className:`px-4 py-2 text-left font-semibold border ${B?"bg-gray-700 text-gray-100 border-gray-600":"bg-gray-100 text-gray-900 border-gray-200"}`,children:L},void 0,!1,void 0,this),td:({children:L})=>U4.jsxDEV("td",{className:`px-4 py-2 border ${B?"border-gray-600 text-gray-200":"border-gray-200 text-gray-700"}`,children:L},void 0,!1,void 0,this),input:({type:L,checked:O,...A})=>{if(L==="checkbox")return U4.jsxDEV("input",{type:"checkbox",checked:O,readOnly:!0,className:"mr-2 accent-blue-600",...A},void 0,!1,void 0,this);return U4.jsxDEV("input",{type:L,...A},void 0,!1,void 0,this)}},children:z},void 0,!1,void 0,this)},void 0,!1,void 0,this)});HD.displayName="MarkdownRenderer";var $3=HD;var S0=J0(Q1(),1);function aF(){let{isDark:Q}=F5(),[$,Y]=G5.useState([]),[G,K]=G5.useState(!0),[H,B]=G5.useState(null),[z,F]=G5.useState(!1),[R,N]=G5.useState(""),[L,O]=G5.useState(!1),[A,C]=G5.useState(!1),[D,b]=G5.useState(""),[y,k]=G5.useState(""),[f,a]=G5.useState(""),[s,g]=G5.useState(""),[c,h]=G5.useState(""),[Z0,E]=G5.useState(!1),[_0,t]=G5.useState(new Set(["(root)"])),[n,z0]=G5.useState(!1),o=G5.useRef(null),H0=Q?"bg-gray-800":"bg-white",G0=Q?"text-gray-200":"text-gray-900",e=Q?"text-gray-400":"text-gray-600",U0=Q?"border-gray-700":"border-gray-200",T=Q?"hover:bg-gray-700":"hover:bg-gray-50";G5.useEffect(()=>{r()},[]);let B0=G5.useCallback(()=>{if($.length===0)return;let Y1=window.location.hash.match(/^#\/docs\/(.+)$/);if(Y1){let e0=decodeURIComponent(Y1[1]).replace(/^\.\//,"").replace(/^\//,""),s0=$.find((h1)=>{return h1.path===e0||h1.path.endsWith(`/${e0}`)||h1.filename===e0});if(s0&&s0!==H)B(s0),F(!1)}},[$,H]);G5.useEffect(()=>{B0()},[B0]),G5.useEffect(()=>{if(!H||!H.folder)return;let h0=H.folder.split("/"),Y1=[],H1="";for(let e0 of h0)H1=H1?`${H1}/${e0}`:e0,Y1.push(H1);t((e0)=>{let s0=new Set(e0);for(let h1 of Y1)s0.add(h1);return s0})},[H]),G5.useEffect(()=>{return window.addEventListener("hashchange",B0),()=>window.removeEventListener("hashchange",B0)},[B0]),G5.useEffect(()=>{let h0=(H1)=>{let e0=H1.target;while(e0&&e0.tagName!=="A"&&e0!==o.current)e0=e0.parentElement;if(e0&&e0.tagName==="A"){let h1=e0.getAttribute("href");if(h1&&/^task-\d+(.md)?$/.test(h1)){H1.preventDefault();let c0=h1.replace(".md","");window.location.hash=`/tasks?task=${c0}`;return}if(h1&&(h1.endsWith(".md")||h1.includes(".md#"))){H1.preventDefault();let c0=h1.replace(/^\.\//,"").replace(/^\//,"");c0=c0.split("#")[0],window.location.hash=`/docs/${c0}`}}},Y1=o.current;if(Y1)return Y1.addEventListener("click",h0),()=>Y1.removeEventListener("click",h0)},[$,H]);let r=()=>{fetch("/api/docs").then((h0)=>h0.json()).then((h0)=>{Y(h0.docs||[]),K(!1)}).catch((h0)=>{console.error("Failed to load docs:",h0),K(!1)})},S=async()=>{if(!D.trim()){alert("Please enter a title");return}E(!0);try{let h0=f.split(",").map((H1)=>H1.trim()).filter((H1)=>H1);if(!(await fetch("/api/docs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:D,description:y,tags:h0,folder:s,content:c})})).ok)throw Error("Failed to create document");b(""),k(""),a(""),g(""),h(""),C(!1),r()}catch(h0){console.error("Failed to create doc:",h0),alert("Failed to create document. Please try again.")}finally{E(!1)}},L0=()=>{if(H)N(H.content),F(!0)},A0=()=>{if(H){let h0=`${window.location.origin}${window.location.pathname}#/docs/${H.path}`;navigator.clipboard.writeText(h0).then(()=>{z0(!0),setTimeout(()=>z0(!1),2000)})}},V0=async()=>{if(!H)return;O(!0);try{console.log("Saving doc:",H.filename,R),F(!1),r()}catch(h0){console.error("Failed to save doc:",h0)}finally{O(!1)}},C0=()=>{F(!1),N("")},u0=(h0)=>{t((Y1)=>{let H1=new Set(Y1);if(H1.has(h0))H1.delete(h0);else H1.add(h0);return H1})},$1=()=>{let h0={name:"(root)",path:"",docs:[],children:new Map};for(let Y1 of $)if(!Y1.folder)h0.docs.push(Y1);else{let H1=Y1.folder.split("/"),e0=h0;for(let s0=0;s0<H1.length;s0++){let h1=H1[s0],c0=H1.slice(0,s0+1).join("/");if(!e0.children.has(h1))e0.children.set(h1,{name:h1,path:c0,docs:[],children:new Map});e0=e0.children.get(h1)}e0.docs.push(Y1)}return h0},v1=(h0)=>{let Y1=h0.docs.length;for(let H1 of h0.children.values())Y1+=v1(H1);return Y1},R0=(h0,Y1=0)=>{let H1=[],e0=Y1===0||_0.has(h0.path),s0=`${Y1*16}px`;if(Y1>0){let h1=v1(h0);H1.push(S0.jsxDEV("button",{type:"button",onClick:()=>u0(h0.path),className:`w-full flex items-center gap-2 px-3 py-2 ${T} ${G0} transition-colors`,style:{paddingLeft:s0},children:[e0?S0.jsxDEV(mQ,{className:"w-4 h-4"},void 0,!1,void 0,this):S0.jsxDEV(uQ,{className:"w-4 h-4"},void 0,!1,void 0,this),e0?S0.jsxDEV(cQ,{className:"w-4 h-4"},void 0,!1,void 0,this):S0.jsxDEV(zX,{className:"w-4 h-4"},void 0,!1,void 0,this),S0.jsxDEV("span",{className:"text-sm font-medium",children:h0.name},void 0,!1,void 0,this),S0.jsxDEV("span",{className:`text-xs ${e}`,children:["(",h1,")"]},void 0,!0,void 0,this)]},`folder-${h0.path}`,!0,void 0,this))}if(e0||Y1===0){let h1=Array.from(h0.children.values()).sort((D1,X1)=>D1.name.localeCompare(X1.name));for(let D1 of h1)H1.push(...R0(D1,Y1+1));let c0=[...h0.docs].sort((D1,X1)=>D1.metadata.title.localeCompare(X1.metadata.title));for(let D1 of c0)H1.push(S0.jsxDEV("button",{type:"button",onClick:()=>{window.location.hash=`/docs/${D1.path}`},className:`w-full text-left px-3 py-2 flex items-center gap-2 ${T} ${G0} transition-colors ${H?.path===D1.path?Q?"bg-gray-700":"bg-gray-100":""}`,style:{paddingLeft:`${(Y1+1)*16}px`},children:[S0.jsxDEV(O4,{className:"w-5 h-5"},void 0,!1,void 0,this),S0.jsxDEV("div",{className:"flex-1 min-w-0",children:[S0.jsxDEV("div",{className:"text-sm font-medium truncate",children:D1.metadata.title},void 0,!1,void 0,this),D1.metadata.description&&S0.jsxDEV("div",{className:`text-xs ${e} truncate`,children:D1.metadata.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},`doc-${D1.path}`,!0,void 0,this))}return H1};if(G)return S0.jsxDEV("div",{className:"p-6 flex items-center justify-center h-64",children:S0.jsxDEV("div",{className:`text-lg ${e}`,children:"Loading documentation..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);return S0.jsxDEV("div",{className:"p-6",children:[S0.jsxDEV("div",{className:"mb-6 flex items-center justify-between",children:[S0.jsxDEV("h1",{className:`text-2xl font-bold ${G0}`,children:"Documentation"},void 0,!1,void 0,this),S0.jsxDEV("button",{type:"button",onClick:()=>C(!0),className:"px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 flex items-center gap-2 transition-colors",children:[S0.jsxDEV(X4,{className:"w-4 h-4"},void 0,!1,void 0,this),"New Document"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S0.jsxDEV("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[S0.jsxDEV("div",{className:"lg:col-span-1",children:[S0.jsxDEV("div",{className:`${H0} rounded-lg border ${U0} overflow-hidden`,children:[S0.jsxDEV("div",{className:`p-4 border-b ${U0}`,children:S0.jsxDEV("h2",{className:`font-semibold ${G0}`,children:["All Documents (",$.length,")"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),S0.jsxDEV("div",{className:"max-h-[600px] overflow-y-auto",children:R0($1())},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.length===0&&S0.jsxDEV("div",{className:`${H0} rounded-lg border ${U0} p-8 text-center`,children:[S0.jsxDEV(O4,{className:"w-5 h-5"},void 0,!1,void 0,this),S0.jsxDEV("p",{className:`mt-2 ${e}`,children:"No documentation found"},void 0,!1,void 0,this),S0.jsxDEV("p",{className:`text-sm ${e} mt-1`,children:["Create a doc with: ",S0.jsxDEV("code",{className:"font-mono",children:'knowns doc create "Title"'},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S0.jsxDEV("div",{className:"lg:col-span-2",children:H?S0.jsxDEV("div",{className:`${H0} rounded-lg border ${U0} overflow-hidden`,children:[S0.jsxDEV("div",{className:"p-6 border-b border-gray-700 flex items-start justify-between",children:[S0.jsxDEV("div",{className:"flex-1",children:[S0.jsxDEV("h2",{className:`text-2xl font-bold ${G0} mb-2`,children:H.metadata.title},void 0,!1,void 0,this),H.metadata.description&&S0.jsxDEV("p",{className:`${e} mb-2`,children:H.metadata.description},void 0,!1,void 0,this),S0.jsxDEV("button",{type:"button",onClick:A0,className:`flex items-center gap-2 px-2 py-1 rounded text-xs ${e} ${T} transition-colors group`,title:"Click to copy URL",children:[S0.jsxDEV(zX,{className:"w-4 h-4"},void 0,!1,void 0,this),S0.jsxDEV("span",{className:"font-mono",children:["/docs/",H.path]},void 0,!0,void 0,this),S0.jsxDEV("span",{className:"opacity-0 group-hover:opacity-100 transition-opacity",children:n?"✓":S0.jsxDEV(lQ,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S0.jsxDEV("div",{className:`text-sm ${e} mt-2`,children:["Last updated: ",new Date(H.metadata.updatedAt).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S0.jsxDEV("div",{className:"flex gap-2 ml-4",children:!z?S0.jsxDEV("button",{type:"button",onClick:L0,className:"px-3 py-2 bg-blue-600 text-white text-sm font-medium rounded-lg hover:bg-blue-700 flex items-center gap-2 transition-colors",children:[S0.jsxDEV(D8,{className:"w-4 h-4"},void 0,!1,void 0,this),"Edit"]},void 0,!0,void 0,this):S0.jsxDEV(S0.Fragment,{children:[S0.jsxDEV("button",{type:"button",onClick:V0,disabled:L,className:"px-3 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 disabled:opacity-50 flex items-center gap-2 transition-colors",children:[S0.jsxDEV(M7,{className:"w-4 h-4"},void 0,!1,void 0,this),L?"Saving...":"Save"]},void 0,!0,void 0,this),S0.jsxDEV("button",{type:"button",onClick:C0,disabled:L,className:`px-3 py-2 ${Q?"bg-gray-700 hover:bg-gray-600":"bg-gray-200 hover:bg-gray-300"} ${G0} text-sm font-medium rounded-lg disabled:opacity-50 flex items-center gap-2 transition-colors`,children:[S0.jsxDEV(L2,{className:"w-4 h-4"},void 0,!1,void 0,this),"Cancel"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S0.jsxDEV("div",{className:"p-6",children:z?S0.jsxDEV(V6,{markdown:R,onChange:N,placeholder:"Write your documentation here..."},void 0,!1,void 0,this):S0.jsxDEV($3,{ref:o,markdown:H.content||"",className:G0,enableGFM:!0},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):S0.jsxDEV("div",{className:`${H0} rounded-lg border ${U0} p-12 text-center`,children:[S0.jsxDEV(O4,{className:"w-5 h-5"},void 0,!1,void 0,this),S0.jsxDEV("p",{className:`mt-4 ${e}`,children:"Select a document to view its content"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),A&&S0.jsxDEV("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:S0.jsxDEV("div",{className:`${H0} rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto`,children:[S0.jsxDEV("div",{className:`p-6 border-b ${U0}`,children:S0.jsxDEV("h2",{className:`text-xl font-bold ${G0}`,children:"Create New Document"},void 0,!1,void 0,this)},void 0,!1,void 0,this),S0.jsxDEV("div",{className:"p-6 space-y-4",children:[S0.jsxDEV("div",{children:[S0.jsxDEV("label",{className:`block text-sm font-medium ${G0} mb-2`,children:"Title *"},void 0,!1,void 0,this),S0.jsxDEV("input",{type:"text",value:D,onChange:(h0)=>b(h0.target.value),placeholder:"Document title",className:`w-full px-3 py-2 rounded-lg border ${U0} ${Q?"bg-gray-700 text-gray-200":"bg-white text-gray-900"} focus:outline-none focus:ring-2 focus:ring-blue-500`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S0.jsxDEV("div",{children:[S0.jsxDEV("label",{className:`block text-sm font-medium ${G0} mb-2`,children:"Description"},void 0,!1,void 0,this),S0.jsxDEV("input",{type:"text",value:y,onChange:(h0)=>k(h0.target.value),placeholder:"Brief description",className:`w-full px-3 py-2 rounded-lg border ${U0} ${Q?"bg-gray-700 text-gray-200":"bg-white text-gray-900"} focus:outline-none focus:ring-2 focus:ring-blue-500`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S0.jsxDEV("div",{children:[S0.jsxDEV("label",{className:`block text-sm font-medium ${G0} mb-2`,children:"Folder (optional)"},void 0,!1,void 0,this),S0.jsxDEV("input",{type:"text",value:s,onChange:(h0)=>g(h0.target.value),placeholder:"api/auth, guides, etc. (leave empty for root)",className:`w-full px-3 py-2 rounded-lg border ${U0} ${Q?"bg-gray-700 text-gray-200":"bg-white text-gray-900"} focus:outline-none focus:ring-2 focus:ring-blue-500`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S0.jsxDEV("div",{children:[S0.jsxDEV("label",{className:`block text-sm font-medium ${G0} mb-2`,children:"Tags (comma-separated)"},void 0,!1,void 0,this),S0.jsxDEV("input",{type:"text",value:f,onChange:(h0)=>a(h0.target.value),placeholder:"guide, tutorial, api",className:`w-full px-3 py-2 rounded-lg border ${U0} ${Q?"bg-gray-700 text-gray-200":"bg-white text-gray-900"} focus:outline-none focus:ring-2 focus:ring-blue-500`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S0.jsxDEV("div",{children:[S0.jsxDEV("label",{className:`block text-sm font-medium ${G0} mb-2`,children:"Content"},void 0,!1,void 0,this),S0.jsxDEV(V6,{markdown:c,onChange:h,placeholder:"Write your documentation here..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S0.jsxDEV("div",{className:`p-6 border-t ${U0} flex justify-end gap-3`,children:[S0.jsxDEV("button",{type:"button",onClick:()=>{C(!1),b(""),k(""),a(""),g(""),h("")},disabled:Z0,className:`px-4 py-2 ${Q?"bg-gray-700 hover:bg-gray-600":"bg-gray-200 hover:bg-gray-300"} ${G0} text-sm font-medium rounded-lg disabled:opacity-50 transition-colors`,children:"Cancel"},void 0,!1,void 0,this),S0.jsxDEV("button",{type:"button",onClick:S,disabled:Z0||!D.trim(),className:"px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 disabled:opacity-50 transition-colors",children:Z0?"Creating...":"Create Document"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var KZ=J0(k0(),1);var lJ=J0(k0(),1);var dG=J0(k0(),1);function fG(Q){let $=Q;return{bg:`bg-${$}-100`,darkBg:`bg-${$}-900/50`,text:`text-${$}-700`,darkText:`text-${$}-300`,columnBg:`bg-${$}-50`,columnBorder:`border-${$}-200`,columnBgDark:`bg-${$}-900/30`,columnBorderDark:`border-${$}-800`}}var pG={bg:"bg-gray-100",darkBg:"bg-gray-700",text:"text-gray-700",darkText:"text-gray-300",columnBg:"bg-gray-50",columnBorder:"border-gray-200",columnBgDark:"bg-gray-800",columnBorderDark:"border-gray-700"},lG={todo:"gray","in-progress":"blue","in-review":"purple",done:"green",blocked:"red","on-hold":"yellow",urgent:"orange"};var z4=J0(Q1(),1),BD={todo:"To Do","in-progress":"In Progress","in-review":"In Review",done:"Done",blocked:"Blocked","on-hold":"On Hold",urgent:"Urgent"};function al(Q){if(BD[Q])return BD[Q];return Q.split("-").map(($)=>$.charAt(0).toUpperCase()+$.slice(1)).join(" ")}function nF({task:Q,onClick:$}){let{isDark:Y}=F5(),[G,K]=dG.useState(lG);dG.useEffect(()=>{fetch("/api/config").then((L)=>L.json()).then((L)=>{if(L.config?.statusColors)K(L.config.statusColors)}).catch((L)=>console.error("Failed to load status colors:",L))},[]);let H=G[Q.status]?fG(G[Q.status]):pG,B=(L)=>{L.dataTransfer.setData("taskId",Q.id),L.dataTransfer.effectAllowed="move"},z=(L)=>{if(L.defaultPrevented)return;$?.()},F=Q.acceptanceCriteria.filter((L)=>L.completed).length,R=Q.acceptanceCriteria.length,N=Y?`${H.darkBg} ${H.darkText}`:`${H.bg} ${H.text}`;return z4.jsxDEV("button",{type:"button",className:`rounded-lg shadow hover:shadow-md transition-all p-3 cursor-pointer active:cursor-grabbing select-none w-full text-left ${Y?"bg-gray-700 hover:bg-gray-650":"bg-white"}`,draggable:!0,onDragStart:B,onClick:z,"aria-label":`Task ${Q.id}: ${Q.title}`,children:[z4.jsxDEV("div",{className:"flex items-center justify-between gap-2 mb-1",children:[z4.jsxDEV("span",{className:`text-xs font-mono shrink-0 ${Y?"text-gray-500":"text-gray-400"}`,children:["#",Q.id]},void 0,!0,void 0,this),z4.jsxDEV("div",{className:"flex items-center gap-1 flex-wrap justify-end",children:[z4.jsxDEV("span",{className:`text-xs px-1.5 py-0.5 rounded font-medium ${N}`,children:al(Q.status)},void 0,!1,void 0,this),Q.priority==="high"&&z4.jsxDEV("span",{className:`text-xs px-1.5 py-0.5 rounded font-medium ${Y?"bg-red-900/50 text-red-300":"bg-red-100 text-red-700"}`,children:"HIGH"},void 0,!1,void 0,this),Q.priority==="medium"&&z4.jsxDEV("span",{className:`text-xs px-1.5 py-0.5 rounded font-medium ${Y?"bg-yellow-900/50 text-yellow-300":"bg-yellow-100 text-yellow-700"}`,children:"MED"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z4.jsxDEV("h3",{className:`font-medium text-sm mb-2 line-clamp-2 ${Y?"text-gray-100":"text-gray-900"}`,children:Q.title},void 0,!1,void 0,this),R>0&&z4.jsxDEV("div",{className:`flex items-center gap-2 text-xs mb-2 ${Y?"text-gray-400":"text-gray-500"}`,children:[z4.jsxDEV(C8,{className:"w-3 h-3","aria-hidden":"true"},void 0,!1,void 0,this),z4.jsxDEV("span",{children:[F,"/",R]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Q.labels.length>0&&z4.jsxDEV("div",{className:"flex flex-wrap gap-1 mb-2",children:Q.labels.map((L)=>z4.jsxDEV("span",{className:`text-xs px-1.5 py-0.5 rounded ${Y?"bg-blue-900/50 text-blue-300":"bg-blue-100 text-blue-700"}`,children:L},L,!1,void 0,this))},void 0,!1,void 0,this),Q.assignee&&z4.jsxDEV("div",{className:`flex items-center gap-1 text-xs mt-2 ${Y?"text-gray-400":"text-gray-600"}`,children:[z4.jsxDEV(O6,{className:"w-3 h-3","aria-hidden":"true"},void 0,!1,void 0,this),z4.jsxDEV("span",{children:Q.assignee},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var k7=J0(Q1(),1),UD={todo:"To Do","in-progress":"In Progress","in-review":"In Review",done:"Done",blocked:"Blocked","on-hold":"On Hold",urgent:"Urgent"};function nl(Q){if(UD[Q])return UD[Q];return Q.split("-").map(($)=>$.charAt(0).toUpperCase()+$.slice(1)).join(" ")}function sF({status:Q,tasks:$,onDrop:Y,onTaskClick:G}){let{isDark:K}=F5(),[H,B]=lJ.useState(!1),[z,F]=lJ.useState(lG);lJ.useEffect(()=>{fetch("/api/config").then((C)=>C.json()).then((C)=>{if(C.config?.statusColors)F(C.config.statusColors)}).catch((C)=>console.error("Failed to load status colors:",C))},[]);let R=z[Q]?fG(z[Q]):pG,N=K?`${R.columnBgDark} ${R.columnBorderDark}`:`${R.columnBg} ${R.columnBorder}`,L=(C)=>{C.preventDefault(),C.dataTransfer.dropEffect="move",B(!0)},O=()=>{B(!1)},A=(C)=>{C.preventDefault(),B(!1);let D=C.dataTransfer.getData("taskId");if(D)Y(D,Q)};return k7.jsxDEV("div",{className:`rounded-lg border-2 p-4 min-w-[380px] max-w-[420px] flex-shrink-0 transition-colors overflow-visible ${N} ${H?"ring-2 ring-blue-400 border-blue-400":""}`,onDragOver:L,onDragLeave:O,onDrop:A,children:[k7.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[k7.jsxDEV("h2",{className:`font-bold text-sm uppercase tracking-wide ${K?"text-gray-300":"text-gray-700"}`,children:nl(Q)},void 0,!1,void 0,this),k7.jsxDEV("span",{className:`text-xs rounded-full px-2 py-1 font-medium ${K?"text-gray-400 bg-gray-700":"text-gray-500 bg-white"}`,children:$.length},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k7.jsxDEV("div",{className:"space-y-2 overflow-visible",children:$.length===0?k7.jsxDEV("div",{className:`text-center py-8 text-sm ${K?"text-gray-500":"text-gray-400"}`,children:"No tasks"},void 0,!1,void 0,this):$.map((C)=>k7.jsxDEV(nF,{task:C,onClick:()=>G(C)},C.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var i1=J0(k0(),1);var V4=J0(k0(),1);var z1=J0(Q1(),1);function oF({task:Q,onUpdate:$}){let{isDark:Y}=F5(),[G,K]=V4.useState(!1),[H,B]=V4.useState(!1),[z,F]=V4.useState(0),[R,N]=V4.useState(null),[L,O]=V4.useState(!1),[A,C]=V4.useState(""),[D,b]=V4.useState(""),[y,k]=V4.useState(""),[f,a]=V4.useState(!1),s=Y?"bg-gray-700":"bg-gray-50",g=Y?"text-gray-100":"text-gray-900",c=Y?"text-gray-300":"text-gray-700",h=Y?"text-gray-400":"text-gray-500",Z0=Y?"border-gray-600":"border-gray-300",E=Y?"bg-gray-600 border-gray-500 text-gray-100":"bg-white border-gray-300 text-gray-900";V4.useEffect(()=>{let U0=Q.timeEntries.find((T)=>!T.endedAt);if(U0)K(!0),N(U0.startedAt),F(Date.now()-U0.startedAt.getTime());else K(!1),N(null),F(0)},[Q.timeEntries]),V4.useEffect(()=>{let U0;if(G&&!H&&R)U0=window.setInterval(()=>{F(Date.now()-R.getTime())},1000);return()=>{if(U0)clearInterval(U0)}},[G,H,R]);let _0=async()=>{a(!0);try{let U0={id:crypto.randomUUID(),startedAt:new Date,duration:0},T=await UX(Q.id,{timeEntries:[...Q.timeEntries,U0]});$(T)}catch(U0){console.error("Failed to start timer:",U0)}finally{a(!1)}},t=async()=>{let U0=Q.timeEntries.find((T)=>!T.endedAt);if(!U0)return;a(!0);try{let T=new Date,B0=T.getTime()-U0.startedAt.getTime(),r=Q.timeEntries.map((A0)=>A0.id===U0.id?{...A0,endedAt:T,duration:B0}:A0),S=r.reduce((A0,V0)=>A0+V0.duration,0),L0=await UX(Q.id,{timeEntries:r,timeSpent:S});$(L0),B(!1)}catch(T){console.error("Failed to stop timer:",T)}finally{a(!1)}},n=()=>{B(!0)},z0=()=>{B(!1)},o=async(U0)=>{U0.preventDefault();let T=Number.parseInt(A,10)||0,B0=Number.parseInt(D,10)||0,r=(T*60+B0)*60*1000;if(r<=0)return;a(!0);try{let S=new Date,L0=new Date(S.getTime()-r),A0={id:crypto.randomUUID(),startedAt:L0,endedAt:S,duration:r,note:y.trim()||void 0},V0=[...Q.timeEntries,A0],C0=V0.reduce(($1,v1)=>$1+v1.duration,0),u0=await UX(Q.id,{timeEntries:V0,timeSpent:C0});$(u0),C(""),b(""),k(""),O(!1)}catch(S){console.error("Failed to add manual time:",S)}finally{a(!1)}},H0=V4.useCallback((U0)=>{let T=Math.floor(U0/1000),B0=Math.floor(T/3600),r=Math.floor(T%3600/60),S=T%60;return`${B0.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${S.toString().padStart(2,"0")}`},[]),G0=V4.useCallback((U0)=>{let T=Math.floor(U0/3600000),B0=Math.floor(U0%3600000/60000);if(T>0)return`${T}h ${B0}m`;return`${B0}m`},[]),e=Q.timeEntries.filter((U0)=>U0.endedAt);return z1.jsxDEV("div",{className:"space-y-4",children:[z1.jsxDEV("div",{className:`flex items-center justify-between ${s} rounded-lg p-4`,children:z1.jsxDEV("div",{className:"text-center flex-1",children:[z1.jsxDEV("div",{className:`text-3xl font-mono font-bold ${g}`,children:H0(z)},void 0,!1,void 0,this),z1.jsxDEV("div",{className:`text-xs ${h} mt-1`,children:G?H?"Paused":"Running":"Ready"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),z1.jsxDEV("div",{className:"flex justify-center gap-2",children:[!G?z1.jsxDEV("button",{type:"button",onClick:_0,disabled:f,className:"px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 disabled:opacity-50 flex items-center gap-2",children:[z1.jsxDEV(FX,{className:"w-4 h-4","aria-hidden":"true"},void 0,!1,void 0,this),"Start"]},void 0,!0,void 0,this):z1.jsxDEV(z1.Fragment,{children:[H?z1.jsxDEV("button",{type:"button",onClick:z0,disabled:f,className:"px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 disabled:opacity-50 flex items-center gap-2",children:[z1.jsxDEV(FX,{className:"w-4 h-4","aria-hidden":"true"},void 0,!1,void 0,this),"Resume"]},void 0,!0,void 0,this):z1.jsxDEV("button",{type:"button",onClick:n,disabled:f,className:"px-4 py-2 bg-yellow-600 text-white rounded hover:bg-yellow-700 disabled:opacity-50 flex items-center gap-2",children:[z1.jsxDEV(nQ,{className:"w-4 h-4","aria-hidden":"true"},void 0,!1,void 0,this),"Pause"]},void 0,!0,void 0,this),z1.jsxDEV("button",{type:"button",onClick:t,disabled:f,className:"px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 disabled:opacity-50 flex items-center gap-2",children:[z1.jsxDEV(sQ,{className:"w-4 h-4","aria-hidden":"true"},void 0,!1,void 0,this),"Stop"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z1.jsxDEV("button",{type:"button",onClick:()=>O(!L),className:`px-4 py-2 border ${Z0} rounded ${Y?"hover:bg-gray-600 text-gray-300":"hover:bg-gray-50 text-gray-700"} text-sm`,disabled:f,children:"+ Manual Entry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L&&z1.jsxDEV("form",{onSubmit:o,className:`${s} rounded-lg p-4 space-y-3`,children:[z1.jsxDEV("div",{className:"flex gap-4",children:[z1.jsxDEV("div",{children:[z1.jsxDEV("label",{htmlFor:"manual-hours",className:`block text-xs ${h} mb-1`,children:"Hours"},void 0,!1,void 0,this),z1.jsxDEV("input",{id:"manual-hours",type:"number",min:"0",value:A,onChange:(U0)=>C(U0.target.value),className:`w-20 border rounded px-2 py-1 text-sm ${E}`,placeholder:"0",disabled:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z1.jsxDEV("div",{children:[z1.jsxDEV("label",{htmlFor:"manual-minutes",className:`block text-xs ${h} mb-1`,children:"Minutes"},void 0,!1,void 0,this),z1.jsxDEV("input",{id:"manual-minutes",type:"number",min:"0",max:"59",value:D,onChange:(U0)=>b(U0.target.value),className:`w-20 border rounded px-2 py-1 text-sm ${E}`,placeholder:"0",disabled:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z1.jsxDEV("div",{children:[z1.jsxDEV("label",{htmlFor:"manual-note",className:`block text-xs ${h} mb-1`,children:"Note (optional)"},void 0,!1,void 0,this),z1.jsxDEV("input",{id:"manual-note",type:"text",value:y,onChange:(U0)=>k(U0.target.value),className:`w-full border rounded px-2 py-1 text-sm ${E}`,placeholder:"What did you work on?",disabled:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z1.jsxDEV("div",{className:"flex gap-2",children:[z1.jsxDEV("button",{type:"submit",className:"px-3 py-1 bg-blue-600 text-white rounded text-sm hover:bg-blue-700 disabled:opacity-50",disabled:f,children:"Add Time"},void 0,!1,void 0,this),z1.jsxDEV("button",{type:"button",onClick:()=>O(!1),className:`px-3 py-1 border ${Z0} rounded text-sm ${Y?"hover:bg-gray-600 text-gray-300":"hover:bg-gray-100 text-gray-700"}`,disabled:f,children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z1.jsxDEV("div",{className:`flex justify-between items-center py-2 border-t ${Z0}`,children:[z1.jsxDEV("span",{className:`text-sm font-medium ${c}`,children:"Total Time Spent"},void 0,!1,void 0,this),z1.jsxDEV("span",{className:`text-lg font-bold ${g}`,children:G0(Q.timeSpent)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.length>0&&z1.jsxDEV("div",{children:[z1.jsxDEV("h4",{className:`text-sm font-medium ${c} mb-2`,children:"Time Log"},void 0,!1,void 0,this),z1.jsxDEV("div",{className:"space-y-1 max-h-40 overflow-y-auto",children:e.slice().reverse().map((U0)=>z1.jsxDEV("div",{className:"flex justify-between items-center text-sm py-1",children:[z1.jsxDEV("div",{className:"flex-1",children:[z1.jsxDEV("span",{className:h,children:[U0.startedAt.toLocaleDateString()," ",U0.startedAt.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]},void 0,!0,void 0,this),U0.note&&z1.jsxDEV("span",{className:`${Y?"text-gray-500":"text-gray-400"} ml-2`,children:["- ",U0.note]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z1.jsxDEV("span",{className:`font-medium ${g}`,children:G0(U0.duration)},void 0,!1,void 0,this)]},U0.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var Y0=J0(Q1(),1),zD=[{value:"todo",label:"To Do",lightColor:"bg-gray-100 text-gray-700",darkColor:"bg-gray-700 text-gray-300"},{value:"in-progress",label:"In Progress",lightColor:"bg-blue-100 text-blue-700",darkColor:"bg-blue-900/50 text-blue-300"},{value:"in-review",label:"In Review",lightColor:"bg-purple-100 text-purple-700",darkColor:"bg-purple-900/50 text-purple-300"},{value:"done",label:"Done",lightColor:"bg-green-100 text-green-700",darkColor:"bg-green-900/50 text-green-300"},{value:"blocked",label:"Blocked",lightColor:"bg-red-100 text-red-700",darkColor:"bg-red-900/50 text-red-300"}],FD=[{value:"low",label:"Low",lightColor:"bg-gray-100 text-gray-600",darkColor:"bg-gray-700 text-gray-300"},{value:"medium",label:"Medium",lightColor:"bg-yellow-100 text-yellow-700",darkColor:"bg-yellow-900/50 text-yellow-300"},{value:"high",label:"High",lightColor:"bg-red-100 text-red-700",darkColor:"bg-red-900/50 text-red-300"}];function dJ({task:Q,allTasks:$,onClose:Y,onUpdate:G,onDelete:K,onNavigateToTask:H}){let{isDark:B}=F5(),z=i1.useRef(null),F=i1.useRef(null),[R,N]=i1.useState(!1),[L,O]=i1.useState(""),[A,C]=i1.useState(!1),[D,b]=i1.useState(""),[y,k]=i1.useState(!1),[f,a]=i1.useState(""),[s,g]=i1.useState(!1),[c,h]=i1.useState(""),[Z0,E]=i1.useState(!1),[_0,t]=i1.useState(""),[n,z0]=i1.useState(!1),[o,H0]=i1.useState(null),[G0,e]=i1.useState(""),[U0,T]=i1.useState(""),[B0,r]=i1.useState(!1),[S,L0]=i1.useState(!1),[A0,V0]=i1.useState(""),C0=i1.useRef(null),u0=i1.useRef(null);i1.useEffect(()=>{if(Q)O(Q.title),b(Q.description||""),a(Q.implementationPlan||""),h(Q.implementationNotes||""),V0(Q.assignee||""),z.current?.showModal();else z.current?.close(),N(!1),C(!1),k(!1),g(!1),z0(!1),H0(null),r(!1),L0(!1)},[Q]),i1.useEffect(()=>{let Q0=(m0)=>{let q1=m0.target;while(q1&&q1.tagName!=="A"&&q1!==F.current)q1=q1.parentElement;if(q1&&q1.tagName==="A"){let S1=q1.getAttribute("href");if(S1&&S1.startsWith("#/")){Y();return}if(S1&&/^(task-)?\d+(\.md)?$/.test(S1)){m0.preventDefault();let Q5=S1.replace(/^task-/,"").replace(/\.md$/,"");window.location.hash=`/tasks/${Q5}`,Y();return}if(S1&&(S1.endsWith(".md")||S1.includes(".md#"))){m0.preventDefault();let Q5=S1.replace(/^\.\//,"").replace(/^\//,"");window.location.hash=`/docs/${Q5}`,Y()}}},D0=F.current;if(D0)return D0.addEventListener("click",Q0),()=>D0.removeEventListener("click",Q0)},[$,H,Y]),i1.useEffect(()=>{if(R&&C0.current)C0.current.focus()},[R]),i1.useEffect(()=>{if(n&&u0.current)u0.current.focus()},[n]);let $1=(Q0)=>{if(F.current&&!F.current.contains(Q0.target))Y()},v1=i1.useCallback((Q0)=>{if(Q0.key==="Escape"&&!R&&!A&&!y&&!s&&!n&&!B0)Y()},[Y,R,A,y,s,n,B0]),R0=async(Q0)=>{if(!Q)return;E(!0);try{let D0=await UX(Q.id,Q0);G(D0)}catch(D0){console.error("Failed to update task:",D0)}finally{E(!1)}},h0=()=>{if(L.trim()&&L!==Q?.title)R0({title:L.trim()});N(!1)},Y1=()=>{if(D!==Q?.description)R0({description:D||void 0});C(!1)},H1=()=>{if(f!==Q?.implementationPlan)R0({implementationPlan:f||void 0});k(!1)},e0=()=>{if(c!==Q?.implementationNotes)R0({implementationNotes:c||void 0});g(!1)},s0=(Q0)=>R0({status:Q0}),h1=(Q0)=>R0({priority:Q0}),c0=()=>{let Q0=A0.trim();if(Q0!==Q?.assignee)R0({assignee:Q0||void 0});L0(!1)},D1=(Q0)=>{if(!Q)return;let D0=Q.acceptanceCriteria.map((m0,q1)=>q1===Q0?{...m0,completed:!m0.completed}:m0);R0({acceptanceCriteria:D0})},X1=()=>{if(!Q||!_0.trim())return;R0({acceptanceCriteria:[...Q.acceptanceCriteria,{text:_0.trim(),completed:!1}]}),t(""),z0(!1)},F4=(Q0)=>{if(!Q)return;R0({acceptanceCriteria:Q.acceptanceCriteria.filter((D0,m0)=>m0!==Q0)})},a5=(Q0)=>{if(!Q)return;let D0=Q.acceptanceCriteria[Q0];if(!D0)return;H0(Q0),e(D0.text)},V5=()=>{if(!Q||o===null)return;let Q0=Q.acceptanceCriteria[o];if(!Q0)return;if(G0.trim()&&G0!==Q0.text)R0({acceptanceCriteria:Q.acceptanceCriteria.map((D0,m0)=>m0===o?{...D0,text:G0.trim()}:D0)});H0(null),e("")},v0=()=>{if(!Q||!U0.trim())return;if(!Q.labels.includes(U0.trim()))R0({labels:[...Q.labels,U0.trim()]});T(""),r(!1)},L4=(Q0)=>{if(!Q)return;R0({labels:Q.labels.filter((D0)=>D0!==Q0)})};if(!Q)return null;let K0=Q.acceptanceCriteria.filter((Q0)=>Q0.completed).length,W0=Q.acceptanceCriteria.length,b0=W0>0?K0/W0*100:0,B1=zD.find((Q0)=>Q0.value===Q.status),I1=FD.find((Q0)=>Q0.value===Q.priority),B5=B?"bg-gray-800":"bg-gray-100",X5=B?"bg-gray-700":"bg-white",n5=B?"bg-gray-750":"bg-gray-50",R2=B?"text-gray-100":"text-gray-900",c1=B?"text-gray-300":"text-gray-700",w=B?"text-gray-400":"text-gray-500",i=B?"border-gray-600":"border-gray-200",M0=B?"bg-gray-600 border-gray-500 text-gray-100":"bg-white border-gray-300 text-gray-900",I0=B?"hover:bg-gray-600":"hover:bg-gray-50";return Y0.jsxDEV("dialog",{ref:z,className:"fixed inset-0 bg-transparent p-0 m-0 max-w-none w-full h-full backdrop:bg-black backdrop:bg-opacity-60",onKeyDown:v1,"aria-labelledby":"modal-title",children:Y0.jsxDEV("div",{className:"flex justify-center pt-12 pb-8 px-4 min-h-full",onClick:$1,children:Y0.jsxDEV("div",{ref:F,className:`${B5} rounded-xl shadow-2xl w-full max-w-4xl max-h-[calc(100vh-80px)] overflow-hidden flex flex-col`,onClick:(Q0)=>Q0.stopPropagation(),children:[Y0.jsxDEV("div",{className:"bg-gradient-to-r from-blue-500 to-blue-600 px-6 py-4 flex items-start justify-between",children:[Y0.jsxDEV("div",{className:"flex-1 min-w-0",children:[Y0.jsxDEV("span",{className:"text-blue-100 text-sm font-mono",children:["#",Q.id]},void 0,!0,void 0,this),R?Y0.jsxDEV("input",{ref:C0,type:"text",value:L,onChange:(Q0)=>O(Q0.target.value),onBlur:h0,onKeyDown:(Q0)=>{if(Q0.key==="Enter")h0();if(Q0.key==="Escape")O(Q.title),N(!1)},className:"w-full text-xl font-bold bg-white/20 text-white placeholder-white/60 border-0 rounded px-2 py-1 mt-1 focus:outline-none focus:ring-2 focus:ring-white/50"},void 0,!1,void 0,this):Y0.jsxDEV("h2",{id:"modal-title",className:"text-xl font-bold text-white mt-1 cursor-pointer hover:bg-white/10 rounded px-2 py-1 -mx-2 truncate",onClick:()=>N(!0),onKeyDown:(Q0)=>Q0.key==="Enter"&&N(!0),children:Q.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("button",{type:"button",onClick:Y,className:"text-white/80 hover:text-white hover:bg-white/20 rounded-full p-2 ml-4 transition-colors","aria-label":"Close modal",children:Y0.jsxDEV(L2,{className:"w-5 h-5"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{className:"flex-1 overflow-y-auto",children:Y0.jsxDEV("div",{className:"flex flex-col md:flex-row",children:[Y0.jsxDEV("div",{className:"flex-1 p-6 space-y-6",children:[Y0.jsxDEV("section",{children:[Y0.jsxDEV("div",{className:`flex items-center gap-2 mb-3 ${c1}`,children:[Y0.jsxDEV(F2,{className:"w-5 h-5"},void 0,!1,void 0,this),Y0.jsxDEV("h3",{className:"font-semibold",children:"Description"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),A?Y0.jsxDEV("div",{children:[Y0.jsxDEV(V6,{markdown:D,onChange:b,placeholder:"Add a more detailed description...",readOnly:Z0,sectionType:"description"},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex gap-2 mt-2",children:[Y0.jsxDEV("button",{type:"button",onClick:Y1,className:"px-4 py-1.5 bg-blue-600 text-white text-sm rounded hover:bg-blue-700",disabled:Z0,children:"Save"},void 0,!1,void 0,this),Y0.jsxDEV("button",{type:"button",onClick:()=>{b(Q.description||""),C(!1)},className:`px-4 py-1.5 ${w} text-sm ${I0} rounded`,children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y0.jsxDEV("div",{className:`${X5} rounded-lg px-3 py-2 min-h-20 cursor-pointer ${I0} transition-colors border ${i}`,onClick:()=>C(!0),tabIndex:0,role:"button",children:Q.description?Y0.jsxDEV($3,{markdown:Q.description,className:`text-sm ${c1}`,sectionType:"description"},void 0,!1,void 0,this):Y0.jsxDEV("span",{className:`${w} italic text-sm`,children:"Add description..."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("section",{children:[Y0.jsxDEV("div",{className:`flex items-center gap-2 mb-3 ${c1}`,children:[Y0.jsxDEV(_6,{className:"w-5 h-5"},void 0,!1,void 0,this),Y0.jsxDEV("h3",{className:"font-semibold",children:"Acceptance Criteria"},void 0,!1,void 0,this),W0>0&&Y0.jsxDEV("span",{className:`text-sm ${w}`,children:["(",K0,"/",W0,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),W0>0&&Y0.jsxDEV("div",{className:"mb-3 flex items-center gap-2",children:[Y0.jsxDEV("span",{className:`text-xs ${w} w-8`,children:[Math.round(b0),"%"]},void 0,!0,void 0,this),Y0.jsxDEV("div",{className:`flex-1 h-2 ${B?"bg-gray-600":"bg-gray-200"} rounded-full overflow-hidden`,children:Y0.jsxDEV("div",{className:`h-full transition-all ${b0===100?"bg-green-500":"bg-blue-500"}`,style:{width:`${b0}%`}},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{className:"space-y-2",children:Q.acceptanceCriteria.map((Q0,D0)=>Y0.jsxDEV("div",{className:`flex items-start gap-2 ${X5} rounded-lg px-3 py-2 group ${I0}`,children:[Y0.jsxDEV("input",{type:"checkbox",checked:Q0.completed,onChange:()=>D1(D0),className:"mt-1 w-4 h-4 rounded cursor-pointer accent-blue-600",disabled:Z0},void 0,!1,void 0,this),o===D0?Y0.jsxDEV("input",{type:"text",value:G0,onChange:(m0)=>e(m0.target.value),onBlur:V5,onKeyDown:(m0)=>{if(m0.key==="Enter")V5();if(m0.key==="Escape")H0(null),e("")},className:`flex-1 ${M0} rounded px-2 py-0.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`},void 0,!1,void 0,this):Y0.jsxDEV("span",{className:`flex-1 text-sm cursor-pointer ${Q0.completed?`${w} line-through`:c1}`,onClick:()=>a5(D0),tabIndex:0,role:"button",children:Q0.text},void 0,!1,void 0,this),Y0.jsxDEV("button",{type:"button",onClick:()=>F4(D0),className:`opacity-0 group-hover:opacity-100 ${w} hover:text-red-500 p-1 transition-all`,children:Y0.jsxDEV(m9,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},`ac-${D0}`,!0,void 0,this))},void 0,!1,void 0,this),n?Y0.jsxDEV("div",{className:`mt-2 ${X5} rounded-lg px-3 py-2`,children:[Y0.jsxDEV("input",{ref:u0,type:"text",value:_0,onChange:(Q0)=>t(Q0.target.value),onKeyDown:(Q0)=>{if(Q0.key==="Enter"&&_0.trim())X1();if(Q0.key==="Escape")t(""),z0(!1)},placeholder:"Add an item...",className:`w-full ${M0} rounded px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex gap-2 mt-2",children:[Y0.jsxDEV("button",{type:"button",onClick:X1,className:"px-3 py-1 bg-blue-600 text-white text-sm rounded hover:bg-blue-700",disabled:!_0.trim(),children:"Add"},void 0,!1,void 0,this),Y0.jsxDEV("button",{type:"button",onClick:()=>{t(""),z0(!1)},className:`px-3 py-1 ${w} text-sm ${I0} rounded`,children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y0.jsxDEV("button",{type:"button",onClick:()=>z0(!0),className:`mt-2 flex items-center gap-1 text-sm ${w} ${I0} px-3 py-2 rounded-lg w-full`,children:[Y0.jsxDEV(X4,{className:"w-4 h-4"},void 0,!1,void 0,this),Y0.jsxDEV("span",{children:"Add an item"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("section",{children:[Y0.jsxDEV("div",{className:`flex items-center gap-2 mb-3 ${c1}`,children:[Y0.jsxDEV(O4,{className:"w-5 h-5"},void 0,!1,void 0,this),Y0.jsxDEV("h3",{className:"font-semibold",children:"Implementation Plan"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y?Y0.jsxDEV("div",{children:[Y0.jsxDEV(V6,{markdown:f,onChange:a,placeholder:`1. First step
|
|
450
450
|
2. Second step
|
|
451
451
|
3. Third step...`,readOnly:Z0,sectionType:"plan"},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex gap-2 mt-2",children:[Y0.jsxDEV("button",{type:"button",onClick:H1,className:"px-4 py-1.5 bg-blue-600 text-white text-sm rounded hover:bg-blue-700",disabled:Z0,children:"Save"},void 0,!1,void 0,this),Y0.jsxDEV("button",{type:"button",onClick:()=>{a(Q.implementationPlan||""),k(!1)},className:`px-4 py-1.5 ${w} text-sm ${I0} rounded`,children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y0.jsxDEV("div",{className:`${X5} rounded-lg px-3 py-2 min-h-16 cursor-pointer ${I0} border ${i}`,onClick:()=>k(!0),tabIndex:0,role:"button",children:Q.implementationPlan?Y0.jsxDEV($3,{markdown:Q.implementationPlan,className:`text-sm ${c1}`,sectionType:"plan"},void 0,!1,void 0,this):Y0.jsxDEV("span",{className:`${w} italic text-sm`,children:"Add implementation plan..."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("section",{children:[Y0.jsxDEV("div",{className:`flex items-center gap-2 mb-3 ${c1}`,children:[Y0.jsxDEV(D8,{className:"w-5 h-5"},void 0,!1,void 0,this),Y0.jsxDEV("h3",{className:"font-semibold",children:"Implementation Notes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),s?Y0.jsxDEV("div",{children:[Y0.jsxDEV(V6,{markdown:c,onChange:h,placeholder:"Add implementation notes...",readOnly:Z0,sectionType:"notes"},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex gap-2 mt-2",children:[Y0.jsxDEV("button",{type:"button",onClick:e0,className:"px-4 py-1.5 bg-blue-600 text-white text-sm rounded hover:bg-blue-700",disabled:Z0,children:"Save"},void 0,!1,void 0,this),Y0.jsxDEV("button",{type:"button",onClick:()=>{h(Q.implementationNotes||""),g(!1)},className:`px-4 py-1.5 ${w} text-sm ${I0} rounded`,children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y0.jsxDEV("div",{className:`${X5} rounded-lg px-3 py-2 min-h-16 cursor-pointer ${I0} border ${i}`,onClick:()=>g(!0),tabIndex:0,role:"button",children:Q.implementationNotes?Y0.jsxDEV($3,{markdown:Q.implementationNotes,className:`text-sm ${c1}`,sectionType:"notes"},void 0,!1,void 0,this):Y0.jsxDEV("span",{className:`${w} italic text-sm`,children:"Add notes..."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),(()=>{let Q0=/\[([^\]]+)\]\(([^)]+)\)/g,D0=[],m0=[Q.description||"",Q.implementationPlan||"",Q.implementationNotes||""].join(`
|
|
452
|
-
`),q1;while((q1=Q0.exec(m0))!==null){let S1=q1[2];if(S1.startsWith("http://")||S1.startsWith("https://"))continue;if(S1.startsWith("../"))continue;if(/^(task-)?\d+(\.md)?$/.test(S1))continue;let Q5=S1;if(Q5=Q5.replace(/^\.\//,""),!Q5.endsWith(".md"))Q5=`${Q5}.md`;D0.push({text:q1[1],filename:Q5})}if(D0.length===0)return null;let i0=Array.from(new Map(D0.map((S1)=>[S1.filename,S1])).values());return Y0.jsxDEV("section",{children:[Y0.jsxDEV("div",{className:`flex items-center gap-2 mb-3 ${c1}`,children:[Y0.jsxDEV(O4,{className:"w-5 h-5"},void 0,!1,void 0,this),Y0.jsxDEV("h3",{className:"font-semibold",children:"Related Documentation"},void 0,!1,void 0,this),Y0.jsxDEV("span",{className:`text-sm ${w}`,children:["(",i0.length,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{className:"space-y-2",children:i0.map((S1,Q5)=>Y0.jsxDEV("div",{className:`${X5} rounded-lg px-3 py-2 flex items-center gap-2 ${i} border`,children:[Y0.jsxDEV("span",{className:"text-blue-500",children:"\uD83D\uDCC4"},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex-1 min-w-0",children:[Y0.jsxDEV("p",{className:`text-sm font-medium ${c1} truncate`,children:S1.text},void 0,!1,void 0,this),Y0.jsxDEV("p",{className:`text-xs ${w} font-mono truncate`,children:["@.knowns/docs/",S1.filename]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},Q5,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)})(),Y0.jsxDEV("section",{children:[Y0.jsxDEV("div",{className:`flex items-center gap-2 mb-3 ${c1}`,children:[Y0.jsxDEV(fQ,{className:"w-5 h-5"},void 0,!1,void 0,this),Y0.jsxDEV("h3",{className:"font-semibold",children:"Time Tracking"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{className:`${X5} rounded-lg p-3`,children:Y0.jsxDEV(oF,{task:Q,onUpdate:G},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{className:`w-full md:w-64 ${B?"bg-gray-750":"bg-gray-50"} p-4 border-t md:border-t-0 md:border-l ${i} space-y-4`,children:[Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Status"},void 0,!1,void 0,this),Y0.jsxDEV("select",{value:Q.status,onChange:(Q0)=>s0(Q0.target.value),className:`w-full rounded-lg px-3 py-2 text-sm font-medium border-0 cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500 ${B?B1?.darkColor:B1?.lightColor}`,disabled:Z0,children:zD.map((Q0)=>Y0.jsxDEV("option",{value:Q0.value,children:Q0.label},Q0.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Priority"},void 0,!1,void 0,this),Y0.jsxDEV("select",{value:Q.priority,onChange:(Q0)=>h1(Q0.target.value),className:`w-full rounded-lg px-3 py-2 text-sm font-medium border-0 cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500 ${B?I1?.darkColor:I1?.lightColor}`,disabled:Z0,children:FD.map((Q0)=>Y0.jsxDEV("option",{value:Q0.value,children:Q0.label},Q0.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Assignee"},void 0,!1,void 0,this),S?Y0.jsxDEV("input",{type:"text",value:A0,onChange:(Q0)=>V0(Q0.target.value),onBlur:c0,onKeyDown:(Q0)=>{if(Q0.key==="Enter")c0();if(Q0.key==="Escape")V0(Q.assignee||""),L0(!1)},placeholder:"@username",className:`w-full ${M0} rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`},void 0,!1,void 0,this):Y0.jsxDEV("button",{type:"button",onClick:()=>L0(!0),className:`w-full flex items-center gap-2 ${X5} rounded-lg px-3 py-2 text-sm text-left ${I0} border ${i}`,children:[Y0.jsxDEV(O6,{className:"w-5 h-5"},void 0,!1,void 0,this),Y0.jsxDEV("span",{className:Q.assignee?c1:w,children:Q.assignee||"Unassigned"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Labels"},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex flex-wrap gap-1 mb-2",children:Q.labels.map((Q0)=>Y0.jsxDEV("span",{className:`inline-flex items-center gap-1 text-xs ${B?"bg-blue-900/50 text-blue-300":"bg-blue-100 text-blue-700"} px-2 py-1 rounded-full group`,children:[Q0,Y0.jsxDEV("button",{type:"button",onClick:()=>L4(Q0),className:"opacity-0 group-hover:opacity-100 hover:text-red-500",children:"×"},void 0,!1,void 0,this)]},Q0,!0,void 0,this))},void 0,!1,void 0,this),B0?Y0.jsxDEV("div",{children:[Y0.jsxDEV("input",{type:"text",value:U0,onChange:(Q0)=>T(Q0.target.value),onKeyDown:(Q0)=>{if(Q0.key==="Enter"&&U0.trim())v0();if(Q0.key==="Escape")T(""),r(!1)},placeholder:"Label name",className:`w-full ${M0} rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex gap-2 mt-2",children:[Y0.jsxDEV("button",{type:"button",onClick:v0,className:"px-3 py-1 bg-blue-600 text-white text-sm rounded hover:bg-blue-700",disabled:!U0.trim(),children:"Add"},void 0,!1,void 0,this),Y0.jsxDEV("button",{type:"button",onClick:()=>{T(""),r(!1)},className:`px-3 py-1 ${w} text-sm ${I0} rounded`,children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y0.jsxDEV("button",{type:"button",onClick:()=>r(!0),className:`flex items-center gap-1 text-sm ${w} ${I0} px-2 py-1.5 rounded`,children:[Y0.jsxDEV(X4,{className:"w-4 h-4"},void 0,!1,void 0,this),Y0.jsxDEV("span",{children:"Add label"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Q.parent&&(()=>{let Q0=$.find((D0)=>D0.id===Q.parent);if(!Q0)return null;return Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Parent Task"},void 0,!1,void 0,this),Y0.jsxDEV("button",{type:"button",onClick:()=>H?.(Q0.id),className:`w-full flex items-center gap-2 ${X5} rounded-lg px-3 py-2 text-sm text-left ${I0} border ${i}`,children:[Y0.jsxDEV(w8,{className:"w-4 h-4"},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex-1 min-w-0",children:[Y0.jsxDEV("span",{className:`text-xs ${w} font-mono`,children:["#",Q0.id]},void 0,!0,void 0,this),Y0.jsxDEV("p",{className:`${c1} truncate`,children:Q0.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)})(),Q.subtasks.length>0&&Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:["Subtasks (",Q.subtasks.length,")"]},void 0,!0,void 0,this),Y0.jsxDEV("div",{className:"space-y-1 max-h-48 overflow-y-auto",children:Q.subtasks.map((Q0)=>{let D0=$.find((m0)=>m0.id===Q0);if(!D0)return null;return Y0.jsxDEV("button",{type:"button",onClick:()=>H?.(Q0),className:`w-full flex items-center gap-2 ${X5} rounded-lg px-3 py-2 text-sm text-left ${I0} border ${i}`,children:[Y0.jsxDEV("span",{className:`w-2 h-2 rounded-full ${D0.status==="done"?"bg-green-500":"bg-gray-400"}`},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex-1 min-w-0",children:[Y0.jsxDEV("span",{className:`text-xs ${w} font-mono`,children:["#",D0.id]},void 0,!0,void 0,this),Y0.jsxDEV("p",{className:`truncate ${D0.status==="done"?`${w} line-through`:c1}`,children:D0.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},Q0,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("hr",{className:i},void 0,!1,void 0,this),Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Actions"},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"space-y-1",children:[Y0.jsxDEV("button",{type:"button",onClick:()=>R0({status:"done"}),className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-left ${w} ${I0} rounded-lg`,disabled:Z0||Q.status==="done",children:[Y0.jsxDEV(kQ,{className:"w-4 h-4"},void 0,!1,void 0,this),Y0.jsxDEV("span",{children:"Mark as Done"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K&&Y0.jsxDEV("button",{type:"button",onClick:()=>{if(confirm("Delete this task?"))K(Q.id)},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-left text-red-500 ${B?"hover:bg-red-900/30":"hover:bg-red-50"} rounded-lg`,disabled:Z0,children:[Y0.jsxDEV(m9,{className:"w-4 h-4"},void 0,!1,void 0,this),Y0.jsxDEV("span",{children:"Delete Task"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:`border-t ${i} px-6 py-3 ${B?"bg-gray-750":"bg-gray-50"} text-xs ${w} flex justify-between`,children:[Y0.jsxDEV("span",{children:["Created: ",new Date(Q.createdAt).toLocaleString()]},void 0,!0,void 0,this),Y0.jsxDEV("span",{children:["Updated: ",new Date(Q.updatedAt).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var m5=J0(Q1(),1),LD={todo:"To Do","in-progress":"In Progress","in-review":"In Review",done:"Done",blocked:"Blocked","on-hold":"On Hold"};function sl(Q){if(LD[Q])return LD[Q];return Q.split("-").map(($)=>$.charAt(0).toUpperCase()+$.slice(1)).join(" ")}function tF({tasks:Q,loading:$,onTasksUpdate:Y}){let{isDark:G}=F5(),[K,H]=KZ.useState(["todo","in-progress","in-review","done","blocked"]),[B,z]=KZ.useState(new Set(["todo","in-progress","done"])),F=()=>{let c=window.location.hash.slice(1).match(/^\/kanban\/([^?]+)/);if(!c)return null;let h=c[1];return Q.find((Z0)=>Z0.id===h)||null},[R,N]=KZ.useState(F());KZ.useEffect(()=>{let g=()=>{N(F())};return N(F()),window.addEventListener("hashchange",g),()=>window.removeEventListener("hashchange",g)},[Q]),KZ.useEffect(()=>{fetch("/api/config").then((g)=>g.json()).then((g)=>{if(g.config?.statuses)H(g.config.statuses);if(g.config?.visibleColumns)z(new Set(g.config.visibleColumns))}).catch((g)=>console.error("Failed to load config:",g))},[]);let L=async(g)=>{try{let Z0=(await(await fetch("/api/config")).json()).config||{};Z0.visibleColumns=[...g],await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Z0)})}catch(c){console.error("Failed to save config:",c)}},O=(g)=>{z((c)=>{let h=new Set(c);if(h.has(g))h.delete(g);else h.add(g);return L(h),h})},A=async(g,c)=>{let h=Q.find((Z0)=>Z0.id===g);if(!h||h.status===c)return;Y(Q.map((Z0)=>Z0.id===g?{...Z0,status:c}:Z0));try{await P8.updateTask(g,{status:c})}catch(Z0){console.error("Failed to update task:",Z0),P8.getTasks().then(Y).catch(console.error)}};if($)return m5.jsxDEV("div",{className:"flex items-center justify-center h-64",children:m5.jsxDEV("div",{className:"text-center",children:[m5.jsxDEV("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900"},void 0,!1,void 0,this),m5.jsxDEV("p",{className:"mt-2 text-gray-600",children:"Loading tasks..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);let C=(g)=>{window.location.hash=`/kanban/${g.id}`},D=()=>{window.location.hash="/"},b=(g)=>{Y(Q.map((c)=>c.id===g.id?g:c))},y=(g)=>{window.location.hash=`/kanban/${g}`},k=G?"bg-gray-800":"bg-white",f=G?"text-gray-200":"text-gray-900",a=G?"text-gray-400":"text-gray-600";return m5.jsxDEV("div",{className:"flex flex-col h-full",children:[m5.jsxDEV("div",{className:`shrink-0 ${k} rounded-lg p-4 mb-4 border ${G?"border-gray-700":"border-gray-200"}`,children:m5.jsxDEV("div",{className:"flex items-center gap-4 flex-wrap",children:[m5.jsxDEV("span",{className:`text-sm font-medium ${a}`,children:"Show Columns:"},void 0,!1,void 0,this),K.map((g)=>{let c=B.has(g);return m5.jsxDEV("label",{className:"flex items-center gap-2 cursor-pointer hover:opacity-80 transition-opacity",children:m5.jsxDEV("button",{type:"button",onClick:()=>O(g),className:`flex items-center gap-2 px-3 py-1.5 rounded-lg transition-colors ${c?G?"bg-blue-900 text-blue-200":"bg-blue-100 text-blue-700":G?"bg-gray-700 text-gray-400":"bg-gray-100 text-gray-500"}`,children:[c?m5.jsxDEV(iQ,{className:"w-4 h-4"},void 0,!1,void 0,this):m5.jsxDEV(dQ,{className:"w-4 h-4"},void 0,!1,void 0,this),m5.jsxDEV("span",{className:"text-sm font-medium",children:sl(g)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},g,!1,void 0,this)})]},void 0,!0,void 0,this)},void 0,!1,void 0,this),m5.jsxDEV("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",children:[m5.jsxDEV("div",{className:"flex gap-4 pb-4 h-full",children:K.filter((g)=>B.has(g)).map((g)=>m5.jsxDEV(sF,{status:g,tasks:Q.filter((c)=>c.status===g),onDrop:A,onTaskClick:C},g,!1,void 0,this))},void 0,!1,void 0,this),B.size===0&&m5.jsxDEV("div",{className:"text-center py-12",children:m5.jsxDEV("p",{className:`text-lg ${a}`,children:"No columns visible. Please select at least one column to display."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m5.jsxDEV(dJ,{task:R,allTasks:Q,onClose:D,onUpdate:b,onNavigateToTask:y},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var j6=J0(Q1(),1);function iG({tasks:Q,loading:$,onTasksUpdate:Y,onNewTask:G}){let{isDark:K}=F5();return j6.jsxDEV("div",{className:"flex flex-col h-full overflow-hidden",children:[j6.jsxDEV("div",{className:"shrink-0 p-6 pb-0",children:j6.jsxDEV("div",{className:"mb-4 flex items-center justify-between gap-4",children:[j6.jsxDEV("h1",{className:`text-2xl font-bold ${K?"text-gray-200":"text-gray-900"}`,children:"Kanban Board"},void 0,!1,void 0,this),j6.jsxDEV("button",{type:"button",onClick:G,className:"shrink-0 px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 flex items-center gap-2 transition-colors",children:[j6.jsxDEV(X4,{className:"w-4 h-4"},void 0,!1,void 0,this),"New Task"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),j6.jsxDEV("div",{className:"flex-1 overflow-hidden px-6 pb-6",children:j6.jsxDEV(tF,{tasks:Q,loading:$,onTasksUpdate:Y},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var WZ=J0(k0(),1);var G1=J0(Q1(),1),ol={todo:"○","in-progress":"◒","in-review":"◎",done:"◉",blocked:"⊗","on-hold":"⊙",urgent:"⚡"},MD={todo:"To Do","in-progress":"In Progress","in-review":"In Review",done:"Done",blocked:"Blocked","on-hold":"On Hold",urgent:"Urgent"};function tl(Q){return ol[Q]||"●"}function el(Q){if(MD[Q])return MD[Q];return Q.split("-").map(($)=>$.charAt(0).toUpperCase()+$.slice(1)).join(" ")}function eF({tasks:Q,loading:$,onTasksUpdate:Y,selectedTask:G,onTaskClose:K,onNewTask:H}){let{isDark:B}=F5(),[z,F]=WZ.useState("all"),[R,N]=WZ.useState("all"),[L,O]=WZ.useState(null),[A,C]=WZ.useState(new Set);WZ.useEffect(()=>{if(G)O(G)},[G]);let D=B?"bg-gray-800":"bg-white",b=B?"text-gray-200":"text-gray-900",y=B?"text-gray-400":"text-gray-600",k=B?"border-gray-700":"border-gray-200",f=B?"hover:bg-gray-700":"hover:bg-gray-50",a=Q.filter((h)=>h.subtasks&&h.subtasks.length>0),s=z==="all"?Q:Q.filter((h)=>h.status===z);if(R==="root")s=s.filter((h)=>!h.parent);else if(R!=="all")s=s.filter((h)=>h.parent===R);let g={todo:[],"in-progress":[],"in-review":[],blocked:[],done:[]};for(let h of s)if(g[h.status])g[h.status].push(h);let c={high:0,medium:1,low:2};for(let h in g)g[h].sort((Z0,E)=>{let _0=c[Z0.priority]-c[E.priority];if(_0!==0)return _0;return Z0.id.localeCompare(E.id,void 0,{numeric:!0})});if($)return G1.jsxDEV("div",{className:"p-6 flex items-center justify-center h-64",children:G1.jsxDEV("div",{className:`text-lg ${y}`,children:"Loading tasks..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);return G1.jsxDEV("div",{className:"p-6",children:[G1.jsxDEV("div",{className:"mb-6 flex items-center justify-between gap-4",children:[G1.jsxDEV("div",{className:"flex-1",children:[G1.jsxDEV("h1",{className:`text-2xl font-bold ${b} mb-4`,children:"All Tasks"},void 0,!1,void 0,this),G1.jsxDEV("div",{className:"flex items-center gap-3 flex-wrap",children:[G1.jsxDEV(N7,{className:"w-4 h-4"},void 0,!1,void 0,this),G1.jsxDEV("select",{value:z,onChange:(h)=>F(h.target.value),className:`px-3 py-2 rounded-lg border ${k} ${D} ${b} focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[G1.jsxDEV("option",{value:"all",children:"All Status"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"todo",children:"To Do"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"in-progress",children:"In Progress"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"in-review",children:"In Review"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"blocked",children:"Blocked"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"done",children:"Done"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G1.jsxDEV("select",{value:R,onChange:(h)=>N(h.target.value),className:`px-3 py-2 rounded-lg border ${k} ${D} ${b} focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[G1.jsxDEV("option",{value:"all",children:"All Tasks"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"root",children:"Root Tasks Only"},void 0,!1,void 0,this),a.map((h)=>G1.jsxDEV("option",{value:h.id,children:["Subtasks of #",h.id,": ",h.title]},h.id,!0,void 0,this))]},void 0,!0,void 0,this),G1.jsxDEV("span",{className:y,children:[s.length," ",s.length===1?"task":"tasks"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G1.jsxDEV("button",{type:"button",onClick:H,className:"shrink-0 px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 flex items-center gap-2 transition-colors ml-4",children:[G1.jsxDEV(X4,{className:"w-4 h-4"},void 0,!1,void 0,this),"New Task"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G1.jsxDEV("div",{className:"space-y-6",children:Object.entries(g).map(([h,Z0])=>{if(Z0.length===0)return null;return G1.jsxDEV("div",{children:[G1.jsxDEV("h2",{className:`text-lg font-semibold ${b} mb-3`,children:[el(h)," (",Z0.length,")"]},void 0,!0,void 0,this),G1.jsxDEV("div",{className:"space-y-2",children:Z0.map((E)=>{let _0=A.has(E.id),t=E.parent?Q.find((n)=>n.id===E.parent):null;return G1.jsxDEV("div",{className:`${D} rounded-lg p-4 border ${k} transition-colors`,children:G1.jsxDEV("div",{className:"flex items-start gap-3",children:[G1.jsxDEV("span",{className:"text-xl mt-0.5",children:tl(E.status)},void 0,!1,void 0,this),G1.jsxDEV("div",{className:"flex-1 min-w-0",children:[G1.jsxDEV("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[G1.jsxDEV("span",{className:`text-xs ${y} font-mono`,children:E.id},void 0,!1,void 0,this),G1.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${E.priority==="high"?"bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-200":E.priority==="medium"?"bg-yellow-100 text-yellow-700 dark:bg-yellow-900 dark:text-yellow-200":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300"}`,children:E.priority.toUpperCase()},void 0,!1,void 0,this),t&&G1.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${B?"bg-purple-900 text-purple-200":"bg-purple-100 text-purple-700"}`,children:["Subtask of #",t.id]},void 0,!0,void 0,this),E.subtasks&&E.subtasks.length>0&&G1.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${B?"bg-green-900 text-green-200":"bg-green-100 text-green-700"}`,children:[E.subtasks.length," subtask",E.subtasks.length>1?"s":""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G1.jsxDEV("button",{type:"button",onClick:()=>{window.location.hash=`/tasks/${E.id}`},className:`font-medium ${b} mb-1 hover:underline text-left w-full`,children:E.title},void 0,!1,void 0,this),E.description&&G1.jsxDEV("div",{className:`text-sm ${y} mt-2`,children:[G1.jsxDEV("p",{className:_0?"":"line-clamp-2",children:E.description},void 0,!1,void 0,this),E.description.length>100&&G1.jsxDEV("button",{type:"button",onClick:(n)=>{n.stopPropagation();let z0=new Set(A);if(_0)z0.delete(E.id);else z0.add(E.id);C(z0)},className:`text-xs ${B?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-700"} mt-1 font-medium`,children:_0?"Show less":"Show more"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E.acceptanceCriteria.length>0&&G1.jsxDEV("div",{className:`flex items-center gap-2 mt-2 text-xs ${y}`,children:[G1.jsxDEV(C8,{className:"w-3 h-3"},void 0,!1,void 0,this),G1.jsxDEV("span",{children:[E.acceptanceCriteria.filter((n)=>n.completed).length,"/",E.acceptanceCriteria.length," criteria"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),E.labels.length>0&&G1.jsxDEV("div",{className:"flex gap-1 mt-2 flex-wrap",children:E.labels.map((n)=>G1.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${B?"bg-blue-900 text-blue-200":"bg-blue-100 text-blue-700"}`,children:n},n,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E.assignee&&G1.jsxDEV("span",{className:`text-sm ${y} font-mono shrink-0`,children:E.assignee},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},E.id,!1,void 0,this)})},void 0,!1,void 0,this)]},h,!0,void 0,this)})},void 0,!1,void 0,this),s.length===0&&G1.jsxDEV("div",{className:"text-center py-12",children:G1.jsxDEV("p",{className:`text-lg ${y}`,children:"No tasks found"},void 0,!1,void 0,this)},void 0,!1,void 0,this),L&&G1.jsxDEV(dJ,{task:L,allTasks:Q,onClose:()=>{if(O(null),K)K()},onUpdate:Y},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Q4=J0(Q1(),1),ND=J4.createContext({isDark:!1,toggle:()=>{}}),F5=()=>J4.useContext(ND);function ZL(){let[Q,$]=J4.useState([]),[Y,G]=J4.useState(!0),[K,H]=J4.useState(!1),[B,z]=J4.useState(!1),[F,R]=J4.useState("Knowns"),[N,L]=J4.useState(()=>{if(typeof window<"u"){let h=localStorage.getItem("theme");if(h)return h==="dark";return window.matchMedia("(prefers-color-scheme: dark)").matches}return!1}),O=()=>{let h=window.location.hash.slice(1);if(h.startsWith("/tasks"))return"tasks";if(h.startsWith("/docs"))return"docs";if(h.startsWith("/config"))return"config";if(h.startsWith("/kanban"))return"kanban";if(h==="/"||h==="")return"kanban";return"kanban"},A=(h)=>{let Z0=window.location.hash.slice(1),E=h||"(?:tasks|kanban)",_0=Z0.match(new RegExp(`^/${E}/([^?]+)`))||Z0.match(/[?&]id=([^&]+)/);return _0?_0[1]:null},[C,D]=J4.useState(O()),[b,y]=J4.useState(window.location.hash);J4.useEffect(()=>{let h=()=>{D(O()),y(window.location.hash)};return window.addEventListener("hashchange",h),()=>window.removeEventListener("hashchange",h)},[O]),J4.useEffect(()=>{if(N)document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark");else document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light")},[N]),J4.useEffect(()=>{let h=(Z0)=>{if((Z0.metaKey||Z0.ctrlKey)&&Z0.key==="k")Z0.preventDefault(),z((E)=>!E)};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[]),J4.useEffect(()=>{fetch("/api/config").then((Z0)=>Z0.json()).then((Z0)=>{if(Z0.config?.name)R(Z0.config.name)}).catch((Z0)=>console.error("Failed to load config:",Z0)),P8.getTasks().then((Z0)=>{$(Z0),G(!1)}).catch((Z0)=>{console.error("Failed to load tasks:",Z0),G(!1)});let h=rA((Z0)=>{if(Z0.type==="tasks:updated"&&Z0.task)$((E)=>{let _0=E.findIndex((t)=>t.id===Z0.task?.id);if(_0>=0){let t=[...E];return t[_0]=Z0.task,t}return[...E,Z0.task]})});return()=>{if(h)h.close()}},[]);let k=()=>{P8.getTasks().then($).catch(console.error)},f=(h)=>{$(h)},a=()=>L((h)=>!h),s=(h)=>{window.location.hash=`/tasks/${h.id}`},g=(h)=>{if(h?.path)window.location.hash=`/docs/${h.path}`;else if(h?.filename)window.location.hash=`/docs/${h.filename}`;else window.location.hash="/docs"},c=()=>{switch(C){case"kanban":return Q4.jsxDEV(iG,{tasks:Q,loading:Y,onTasksUpdate:f,onNewTask:()=>H(!0)},void 0,!1,void 0,this);case"tasks":{let h=A(),Z0=h?Q.find((E)=>E.id===h):null;return Q4.jsxDEV(eF,{tasks:Q,loading:Y,onTasksUpdate:k,selectedTask:Z0,onTaskClose:()=>{window.location.hash="/tasks"},onNewTask:()=>H(!0)},void 0,!1,void 0,this)}case"docs":return Q4.jsxDEV(aF,{},void 0,!1,void 0,this);case"config":return Q4.jsxDEV(Lz,{},void 0,!1,void 0,this);default:return Q4.jsxDEV(iG,{tasks:Q,loading:Y,onTasksUpdate:f,onNewTask:()=>H(!0)},void 0,!1,void 0,this)}};return Q4.jsxDEV(ND.Provider,{value:{isDark:N,toggle:a},children:Q4.jsxDEV(bU,{children:[Q4.jsxDEV(jP,{currentPage:C,isDark:N,onToggleTheme:a,onSearchClick:()=>z(!0)},void 0,!1,void 0,this),Q4.jsxDEV("main",{className:"flex flex-1 flex-col bg-background overflow-hidden",children:[Q4.jsxDEV("header",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[Q4.jsxDEV(gU,{className:"-ml-1"},void 0,!1,void 0,this),Q4.jsxDEV(ZJ,{orientation:"vertical",className:"mr-2 h-4"},void 0,!1,void 0,this),Q4.jsxDEV("div",{className:"flex flex-1 items-center gap-2 text-sm",children:Q4.jsxDEV("span",{className:`font-semibold ${N?"text-gray-100":"text-gray-900"}`,children:[F," - Task Management"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q4.jsxDEV("div",{className:"flex-1 w-full overflow-y-auto overflow-x-hidden",children:c()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q4.jsxDEV(Zz,{isOpen:K,allTasks:Q,onClose:()=>H(!1),onCreated:k},void 0,!1,void 0,this),Q4.jsxDEV(zz,{open:B,onOpenChange:z,onTaskSelect:s,onDocSelect:g},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var OD=J0(Q1(),1),_D=document.getElementById("root");if(!_D)throw Error("Root element not found");RD.createRoot(_D).render(OD.jsxDEV(ZL,{},void 0,!1,void 0,this));
|
|
452
|
+
`),q1;while((q1=Q0.exec(m0))!==null){let S1=q1[2];if(S1.startsWith("http://")||S1.startsWith("https://"))continue;if(S1.startsWith("../"))continue;if(/^(task-)?\d+(\.md)?$/.test(S1))continue;let Q5=S1;if(Q5=Q5.replace(/^\.\//,""),!Q5.endsWith(".md"))Q5=`${Q5}.md`;D0.push({text:q1[1],filename:Q5})}if(D0.length===0)return null;let i0=Array.from(new Map(D0.map((S1)=>[S1.filename,S1])).values());return Y0.jsxDEV("section",{children:[Y0.jsxDEV("div",{className:`flex items-center gap-2 mb-3 ${c1}`,children:[Y0.jsxDEV(O4,{className:"w-5 h-5"},void 0,!1,void 0,this),Y0.jsxDEV("h3",{className:"font-semibold",children:"Related Documentation"},void 0,!1,void 0,this),Y0.jsxDEV("span",{className:`text-sm ${w}`,children:["(",i0.length,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{className:"space-y-2",children:i0.map((S1,Q5)=>Y0.jsxDEV("div",{className:`${X5} rounded-lg px-3 py-2 flex items-center gap-2 ${i} border`,children:[Y0.jsxDEV("span",{className:"text-blue-500",children:"\uD83D\uDCC4"},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex-1 min-w-0",children:[Y0.jsxDEV("p",{className:`text-sm font-medium ${c1} truncate`,children:S1.text},void 0,!1,void 0,this),Y0.jsxDEV("p",{className:`text-xs ${w} font-mono truncate`,children:["@.knowns/docs/",S1.filename]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},Q5,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)})(),Y0.jsxDEV("section",{children:[Y0.jsxDEV("div",{className:`flex items-center gap-2 mb-3 ${c1}`,children:[Y0.jsxDEV(fQ,{className:"w-5 h-5"},void 0,!1,void 0,this),Y0.jsxDEV("h3",{className:"font-semibold",children:"Time Tracking"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{className:`${X5} rounded-lg p-3`,children:Y0.jsxDEV(oF,{task:Q,onUpdate:G},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{className:`w-full md:w-64 ${B?"bg-gray-750":"bg-gray-50"} p-4 border-t md:border-t-0 md:border-l ${i} space-y-4`,children:[Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Status"},void 0,!1,void 0,this),Y0.jsxDEV("select",{value:Q.status,onChange:(Q0)=>s0(Q0.target.value),className:`w-full rounded-lg px-3 py-2 text-sm font-medium border-0 cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500 ${B?B1?.darkColor:B1?.lightColor}`,disabled:Z0,children:zD.map((Q0)=>Y0.jsxDEV("option",{value:Q0.value,children:Q0.label},Q0.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Priority"},void 0,!1,void 0,this),Y0.jsxDEV("select",{value:Q.priority,onChange:(Q0)=>h1(Q0.target.value),className:`w-full rounded-lg px-3 py-2 text-sm font-medium border-0 cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500 ${B?I1?.darkColor:I1?.lightColor}`,disabled:Z0,children:FD.map((Q0)=>Y0.jsxDEV("option",{value:Q0.value,children:Q0.label},Q0.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Assignee"},void 0,!1,void 0,this),S?Y0.jsxDEV("input",{type:"text",value:A0,onChange:(Q0)=>V0(Q0.target.value),onBlur:c0,onKeyDown:(Q0)=>{if(Q0.key==="Enter")c0();if(Q0.key==="Escape")V0(Q.assignee||""),L0(!1)},placeholder:"@username",className:`w-full ${M0} rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`},void 0,!1,void 0,this):Y0.jsxDEV("button",{type:"button",onClick:()=>L0(!0),className:`w-full flex items-center gap-2 ${X5} rounded-lg px-3 py-2 text-sm text-left ${I0} border ${i}`,children:[Y0.jsxDEV(O6,{className:"w-5 h-5"},void 0,!1,void 0,this),Y0.jsxDEV("span",{className:Q.assignee?c1:w,children:Q.assignee||"Unassigned"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Labels"},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex flex-wrap gap-1 mb-2",children:Q.labels.map((Q0)=>Y0.jsxDEV("span",{className:`inline-flex items-center gap-1 text-xs ${B?"bg-blue-900/50 text-blue-300":"bg-blue-100 text-blue-700"} px-2 py-1 rounded-full group`,children:[Q0,Y0.jsxDEV("button",{type:"button",onClick:()=>L4(Q0),className:"opacity-0 group-hover:opacity-100 hover:text-red-500",children:"×"},void 0,!1,void 0,this)]},Q0,!0,void 0,this))},void 0,!1,void 0,this),B0?Y0.jsxDEV("div",{children:[Y0.jsxDEV("input",{type:"text",value:U0,onChange:(Q0)=>T(Q0.target.value),onKeyDown:(Q0)=>{if(Q0.key==="Enter"&&U0.trim())v0();if(Q0.key==="Escape")T(""),r(!1)},placeholder:"Label name",className:`w-full ${M0} rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex gap-2 mt-2",children:[Y0.jsxDEV("button",{type:"button",onClick:v0,className:"px-3 py-1 bg-blue-600 text-white text-sm rounded hover:bg-blue-700",disabled:!U0.trim(),children:"Add"},void 0,!1,void 0,this),Y0.jsxDEV("button",{type:"button",onClick:()=>{T(""),r(!1)},className:`px-3 py-1 ${w} text-sm ${I0} rounded`,children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y0.jsxDEV("button",{type:"button",onClick:()=>r(!0),className:`flex items-center gap-1 text-sm ${w} ${I0} px-2 py-1.5 rounded`,children:[Y0.jsxDEV(X4,{className:"w-4 h-4"},void 0,!1,void 0,this),Y0.jsxDEV("span",{children:"Add label"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Q.parent&&(()=>{let Q0=$.find((D0)=>D0.id===Q.parent);if(!Q0)return null;return Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Parent Task"},void 0,!1,void 0,this),Y0.jsxDEV("button",{type:"button",onClick:()=>H?.(Q0.id),className:`w-full flex items-center gap-2 ${X5} rounded-lg px-3 py-2 text-sm text-left ${I0} border ${i}`,children:[Y0.jsxDEV(w8,{className:"w-4 h-4"},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex-1 min-w-0",children:[Y0.jsxDEV("span",{className:`text-xs ${w} font-mono`,children:["#",Q0.id]},void 0,!0,void 0,this),Y0.jsxDEV("p",{className:`${c1} truncate`,children:Q0.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)})(),Q.subtasks.length>0&&Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:["Subtasks (",Q.subtasks.length,")"]},void 0,!0,void 0,this),Y0.jsxDEV("div",{className:"space-y-1 max-h-48 overflow-y-auto",children:Q.subtasks.map((Q0)=>{let D0=$.find((m0)=>m0.id===Q0);if(!D0)return null;return Y0.jsxDEV("button",{type:"button",onClick:()=>H?.(Q0),className:`w-full flex items-center gap-2 ${X5} rounded-lg px-3 py-2 text-sm text-left ${I0} border ${i}`,children:[Y0.jsxDEV("span",{className:`w-2 h-2 rounded-full ${D0.status==="done"?"bg-green-500":"bg-gray-400"}`},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"flex-1 min-w-0",children:[Y0.jsxDEV("span",{className:`text-xs ${w} font-mono`,children:["#",D0.id]},void 0,!0,void 0,this),Y0.jsxDEV("p",{className:`truncate ${D0.status==="done"?`${w} line-through`:c1}`,children:D0.title},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},Q0,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y0.jsxDEV("hr",{className:i},void 0,!1,void 0,this),Y0.jsxDEV("div",{children:[Y0.jsxDEV("label",{className:`block text-xs font-semibold ${w} uppercase tracking-wide mb-2`,children:"Actions"},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:"space-y-1",children:[Y0.jsxDEV("button",{type:"button",onClick:()=>R0({status:"done"}),className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-left ${w} ${I0} rounded-lg`,disabled:Z0||Q.status==="done",children:[Y0.jsxDEV(kQ,{className:"w-4 h-4"},void 0,!1,void 0,this),Y0.jsxDEV("span",{children:"Mark as Done"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K&&Y0.jsxDEV("button",{type:"button",onClick:()=>{if(confirm("Delete this task?"))K(Q.id)},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-left text-red-500 ${B?"hover:bg-red-900/30":"hover:bg-red-50"} rounded-lg`,disabled:Z0,children:[Y0.jsxDEV(m9,{className:"w-4 h-4"},void 0,!1,void 0,this),Y0.jsxDEV("span",{children:"Delete Task"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Y0.jsxDEV("div",{className:`border-t ${i} px-6 py-3 ${B?"bg-gray-750":"bg-gray-50"} text-xs ${w} flex justify-between`,children:[Y0.jsxDEV("span",{children:["Created: ",new Date(Q.createdAt).toLocaleString()]},void 0,!0,void 0,this),Y0.jsxDEV("span",{children:["Updated: ",new Date(Q.updatedAt).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var m5=J0(Q1(),1),LD={todo:"To Do","in-progress":"In Progress","in-review":"In Review",done:"Done",blocked:"Blocked","on-hold":"On Hold"};function sl(Q){if(LD[Q])return LD[Q];return Q.split("-").map(($)=>$.charAt(0).toUpperCase()+$.slice(1)).join(" ")}function tF({tasks:Q,loading:$,onTasksUpdate:Y}){let{isDark:G}=F5(),[K,H]=KZ.useState([]),[B,z]=KZ.useState(new Set),F=()=>{let c=window.location.hash.slice(1).match(/^\/kanban\/([^?]+)/);if(!c)return null;let h=c[1];return Q.find((Z0)=>Z0.id===h)||null},[R,N]=KZ.useState(F());KZ.useEffect(()=>{let g=()=>{N(F())};return N(F()),window.addEventListener("hashchange",g),()=>window.removeEventListener("hashchange",g)},[Q]),KZ.useEffect(()=>{fetch("/api/config").then((g)=>g.json()).then((g)=>{let c=g.config?.statuses||["todo","in-progress","in-review","done","blocked"];H(c);let h=new Set(c);if(g.config?.visibleColumns)z(new Set(g.config.visibleColumns));else z(h)}).catch((g)=>console.error("Failed to load config:",g))},[]);let L=async(g)=>{try{let Z0=(await(await fetch("/api/config")).json()).config||{};Z0.visibleColumns=[...g],await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Z0)})}catch(c){console.error("Failed to save config:",c)}},O=(g)=>{z((c)=>{let h=new Set(c);if(h.has(g))h.delete(g);else h.add(g);return L(h),h})},A=async(g,c)=>{let h=Q.find((Z0)=>Z0.id===g);if(!h||h.status===c)return;Y(Q.map((Z0)=>Z0.id===g?{...Z0,status:c}:Z0));try{await P8.updateTask(g,{status:c})}catch(Z0){console.error("Failed to update task:",Z0),P8.getTasks().then(Y).catch(console.error)}};if($)return m5.jsxDEV("div",{className:"flex items-center justify-center h-64",children:m5.jsxDEV("div",{className:"text-center",children:[m5.jsxDEV("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900"},void 0,!1,void 0,this),m5.jsxDEV("p",{className:"mt-2 text-gray-600",children:"Loading tasks..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);let C=(g)=>{window.location.hash=`/kanban/${g.id}`},D=()=>{window.location.hash="/"},b=(g)=>{Y(Q.map((c)=>c.id===g.id?g:c))},y=(g)=>{window.location.hash=`/kanban/${g}`},k=G?"bg-gray-800":"bg-white",f=G?"text-gray-200":"text-gray-900",a=G?"text-gray-400":"text-gray-600";return m5.jsxDEV("div",{className:"flex flex-col h-full",children:[m5.jsxDEV("div",{className:`shrink-0 ${k} rounded-lg p-4 mb-4 border ${G?"border-gray-700":"border-gray-200"}`,children:m5.jsxDEV("div",{className:"flex items-center gap-4 flex-wrap",children:[m5.jsxDEV("span",{className:`text-sm font-medium ${a}`,children:"Show Columns:"},void 0,!1,void 0,this),K.map((g)=>{let c=B.has(g);return m5.jsxDEV("label",{className:"flex items-center gap-2 cursor-pointer hover:opacity-80 transition-opacity",children:m5.jsxDEV("button",{type:"button",onClick:()=>O(g),className:`flex items-center gap-2 px-3 py-1.5 rounded-lg transition-colors ${c?G?"bg-blue-900 text-blue-200":"bg-blue-100 text-blue-700":G?"bg-gray-700 text-gray-400":"bg-gray-100 text-gray-500"}`,children:[c?m5.jsxDEV(iQ,{className:"w-4 h-4"},void 0,!1,void 0,this):m5.jsxDEV(dQ,{className:"w-4 h-4"},void 0,!1,void 0,this),m5.jsxDEV("span",{className:"text-sm font-medium",children:sl(g)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},g,!1,void 0,this)})]},void 0,!0,void 0,this)},void 0,!1,void 0,this),m5.jsxDEV("div",{className:"flex-1 overflow-auto",children:[m5.jsxDEV("div",{className:"flex gap-4 pb-4",children:K.filter((g)=>B.has(g)).map((g)=>m5.jsxDEV(sF,{status:g,tasks:Q.filter((c)=>c.status===g),onDrop:A,onTaskClick:C},g,!1,void 0,this))},void 0,!1,void 0,this),B.size===0&&m5.jsxDEV("div",{className:"text-center py-12",children:m5.jsxDEV("p",{className:`text-lg ${a}`,children:"No columns visible. Please select at least one column to display."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m5.jsxDEV(dJ,{task:R,allTasks:Q,onClose:D,onUpdate:b,onNavigateToTask:y},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var j6=J0(Q1(),1);function iG({tasks:Q,loading:$,onTasksUpdate:Y,onNewTask:G}){let{isDark:K}=F5();return j6.jsxDEV("div",{className:"flex flex-col h-full overflow-hidden",children:[j6.jsxDEV("div",{className:"shrink-0 p-6 pb-0",children:j6.jsxDEV("div",{className:"mb-4 flex items-center justify-between gap-4",children:[j6.jsxDEV("h1",{className:`text-2xl font-bold ${K?"text-gray-200":"text-gray-900"}`,children:"Kanban Board"},void 0,!1,void 0,this),j6.jsxDEV("button",{type:"button",onClick:G,className:"shrink-0 px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 flex items-center gap-2 transition-colors",children:[j6.jsxDEV(X4,{className:"w-4 h-4"},void 0,!1,void 0,this),"New Task"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),j6.jsxDEV("div",{className:"flex-1 overflow-hidden px-6 pb-6",children:j6.jsxDEV(tF,{tasks:Q,loading:$,onTasksUpdate:Y},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var WZ=J0(k0(),1);var G1=J0(Q1(),1),ol={todo:"○","in-progress":"◒","in-review":"◎",done:"◉",blocked:"⊗","on-hold":"⊙",urgent:"⚡"},MD={todo:"To Do","in-progress":"In Progress","in-review":"In Review",done:"Done",blocked:"Blocked","on-hold":"On Hold",urgent:"Urgent"};function tl(Q){return ol[Q]||"●"}function el(Q){if(MD[Q])return MD[Q];return Q.split("-").map(($)=>$.charAt(0).toUpperCase()+$.slice(1)).join(" ")}function eF({tasks:Q,loading:$,onTasksUpdate:Y,selectedTask:G,onTaskClose:K,onNewTask:H}){let{isDark:B}=F5(),[z,F]=WZ.useState("all"),[R,N]=WZ.useState("all"),[L,O]=WZ.useState(null),[A,C]=WZ.useState(new Set);WZ.useEffect(()=>{if(G)O(G)},[G]);let D=B?"bg-gray-800":"bg-white",b=B?"text-gray-200":"text-gray-900",y=B?"text-gray-400":"text-gray-600",k=B?"border-gray-700":"border-gray-200",f=B?"hover:bg-gray-700":"hover:bg-gray-50",a=Q.filter((h)=>h.subtasks&&h.subtasks.length>0),s=z==="all"?Q:Q.filter((h)=>h.status===z);if(R==="root")s=s.filter((h)=>!h.parent);else if(R!=="all")s=s.filter((h)=>h.parent===R);let g={todo:[],"in-progress":[],"in-review":[],blocked:[],done:[]};for(let h of s)if(g[h.status])g[h.status].push(h);let c={high:0,medium:1,low:2};for(let h in g)g[h].sort((Z0,E)=>{let _0=c[Z0.priority]-c[E.priority];if(_0!==0)return _0;return Z0.id.localeCompare(E.id,void 0,{numeric:!0})});if($)return G1.jsxDEV("div",{className:"p-6 flex items-center justify-center h-64",children:G1.jsxDEV("div",{className:`text-lg ${y}`,children:"Loading tasks..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);return G1.jsxDEV("div",{className:"p-6",children:[G1.jsxDEV("div",{className:"mb-6 flex items-center justify-between gap-4",children:[G1.jsxDEV("div",{className:"flex-1",children:[G1.jsxDEV("h1",{className:`text-2xl font-bold ${b} mb-4`,children:"All Tasks"},void 0,!1,void 0,this),G1.jsxDEV("div",{className:"flex items-center gap-3 flex-wrap",children:[G1.jsxDEV(N7,{className:"w-4 h-4"},void 0,!1,void 0,this),G1.jsxDEV("select",{value:z,onChange:(h)=>F(h.target.value),className:`px-3 py-2 rounded-lg border ${k} ${D} ${b} focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[G1.jsxDEV("option",{value:"all",children:"All Status"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"todo",children:"To Do"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"in-progress",children:"In Progress"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"in-review",children:"In Review"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"blocked",children:"Blocked"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"done",children:"Done"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G1.jsxDEV("select",{value:R,onChange:(h)=>N(h.target.value),className:`px-3 py-2 rounded-lg border ${k} ${D} ${b} focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[G1.jsxDEV("option",{value:"all",children:"All Tasks"},void 0,!1,void 0,this),G1.jsxDEV("option",{value:"root",children:"Root Tasks Only"},void 0,!1,void 0,this),a.map((h)=>G1.jsxDEV("option",{value:h.id,children:["Subtasks of #",h.id,": ",h.title]},h.id,!0,void 0,this))]},void 0,!0,void 0,this),G1.jsxDEV("span",{className:y,children:[s.length," ",s.length===1?"task":"tasks"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G1.jsxDEV("button",{type:"button",onClick:H,className:"shrink-0 px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 flex items-center gap-2 transition-colors ml-4",children:[G1.jsxDEV(X4,{className:"w-4 h-4"},void 0,!1,void 0,this),"New Task"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G1.jsxDEV("div",{className:"space-y-6",children:Object.entries(g).map(([h,Z0])=>{if(Z0.length===0)return null;return G1.jsxDEV("div",{children:[G1.jsxDEV("h2",{className:`text-lg font-semibold ${b} mb-3`,children:[el(h)," (",Z0.length,")"]},void 0,!0,void 0,this),G1.jsxDEV("div",{className:"space-y-2",children:Z0.map((E)=>{let _0=A.has(E.id),t=E.parent?Q.find((n)=>n.id===E.parent):null;return G1.jsxDEV("div",{className:`${D} rounded-lg p-4 border ${k} transition-colors`,children:G1.jsxDEV("div",{className:"flex items-start gap-3",children:[G1.jsxDEV("span",{className:"text-xl mt-0.5",children:tl(E.status)},void 0,!1,void 0,this),G1.jsxDEV("div",{className:"flex-1 min-w-0",children:[G1.jsxDEV("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[G1.jsxDEV("span",{className:`text-xs ${y} font-mono`,children:E.id},void 0,!1,void 0,this),G1.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${E.priority==="high"?"bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-200":E.priority==="medium"?"bg-yellow-100 text-yellow-700 dark:bg-yellow-900 dark:text-yellow-200":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300"}`,children:E.priority.toUpperCase()},void 0,!1,void 0,this),t&&G1.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${B?"bg-purple-900 text-purple-200":"bg-purple-100 text-purple-700"}`,children:["Subtask of #",t.id]},void 0,!0,void 0,this),E.subtasks&&E.subtasks.length>0&&G1.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${B?"bg-green-900 text-green-200":"bg-green-100 text-green-700"}`,children:[E.subtasks.length," subtask",E.subtasks.length>1?"s":""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G1.jsxDEV("button",{type:"button",onClick:()=>{window.location.hash=`/tasks/${E.id}`},className:`font-medium ${b} mb-1 hover:underline text-left w-full`,children:E.title},void 0,!1,void 0,this),E.description&&G1.jsxDEV("div",{className:`text-sm ${y} mt-2`,children:[G1.jsxDEV("p",{className:_0?"":"line-clamp-2",children:E.description},void 0,!1,void 0,this),E.description.length>100&&G1.jsxDEV("button",{type:"button",onClick:(n)=>{n.stopPropagation();let z0=new Set(A);if(_0)z0.delete(E.id);else z0.add(E.id);C(z0)},className:`text-xs ${B?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-700"} mt-1 font-medium`,children:_0?"Show less":"Show more"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E.acceptanceCriteria.length>0&&G1.jsxDEV("div",{className:`flex items-center gap-2 mt-2 text-xs ${y}`,children:[G1.jsxDEV(C8,{className:"w-3 h-3"},void 0,!1,void 0,this),G1.jsxDEV("span",{children:[E.acceptanceCriteria.filter((n)=>n.completed).length,"/",E.acceptanceCriteria.length," criteria"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),E.labels.length>0&&G1.jsxDEV("div",{className:"flex gap-1 mt-2 flex-wrap",children:E.labels.map((n)=>G1.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${B?"bg-blue-900 text-blue-200":"bg-blue-100 text-blue-700"}`,children:n},n,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E.assignee&&G1.jsxDEV("span",{className:`text-sm ${y} font-mono shrink-0`,children:E.assignee},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},E.id,!1,void 0,this)})},void 0,!1,void 0,this)]},h,!0,void 0,this)})},void 0,!1,void 0,this),s.length===0&&G1.jsxDEV("div",{className:"text-center py-12",children:G1.jsxDEV("p",{className:`text-lg ${y}`,children:"No tasks found"},void 0,!1,void 0,this)},void 0,!1,void 0,this),L&&G1.jsxDEV(dJ,{task:L,allTasks:Q,onClose:()=>{if(O(null),K)K()},onUpdate:Y},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Q4=J0(Q1(),1),ND=J4.createContext({isDark:!1,toggle:()=>{}}),F5=()=>J4.useContext(ND);function ZL(){let[Q,$]=J4.useState([]),[Y,G]=J4.useState(!0),[K,H]=J4.useState(!1),[B,z]=J4.useState(!1),[F,R]=J4.useState("Knowns"),[N,L]=J4.useState(()=>{if(typeof window<"u"){let h=localStorage.getItem("theme");if(h)return h==="dark";return window.matchMedia("(prefers-color-scheme: dark)").matches}return!1}),O=()=>{let h=window.location.hash.slice(1);if(h.startsWith("/tasks"))return"tasks";if(h.startsWith("/docs"))return"docs";if(h.startsWith("/config"))return"config";if(h.startsWith("/kanban"))return"kanban";if(h==="/"||h==="")return"kanban";return"kanban"},A=(h)=>{let Z0=window.location.hash.slice(1),E=h||"(?:tasks|kanban)",_0=Z0.match(new RegExp(`^/${E}/([^?]+)`))||Z0.match(/[?&]id=([^&]+)/);return _0?_0[1]:null},[C,D]=J4.useState(O()),[b,y]=J4.useState(window.location.hash);J4.useEffect(()=>{let h=()=>{D(O()),y(window.location.hash)};return window.addEventListener("hashchange",h),()=>window.removeEventListener("hashchange",h)},[O]),J4.useEffect(()=>{if(N)document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark");else document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light")},[N]),J4.useEffect(()=>{let h=(Z0)=>{if((Z0.metaKey||Z0.ctrlKey)&&Z0.key==="k")Z0.preventDefault(),z((E)=>!E)};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[]),J4.useEffect(()=>{fetch("/api/config").then((Z0)=>Z0.json()).then((Z0)=>{if(Z0.config?.name)R(Z0.config.name)}).catch((Z0)=>console.error("Failed to load config:",Z0)),P8.getTasks().then((Z0)=>{$(Z0),G(!1)}).catch((Z0)=>{console.error("Failed to load tasks:",Z0),G(!1)});let h=rA((Z0)=>{if(Z0.type==="tasks:updated"&&Z0.task)$((E)=>{let _0=E.findIndex((t)=>t.id===Z0.task?.id);if(_0>=0){let t=[...E];return t[_0]=Z0.task,t}return[...E,Z0.task]})});return()=>{if(h)h.close()}},[]);let k=()=>{P8.getTasks().then($).catch(console.error)},f=(h)=>{$(h)},a=()=>L((h)=>!h),s=(h)=>{window.location.hash=`/tasks/${h.id}`},g=(h)=>{if(h?.path)window.location.hash=`/docs/${h.path}`;else if(h?.filename)window.location.hash=`/docs/${h.filename}`;else window.location.hash="/docs"},c=()=>{switch(C){case"kanban":return Q4.jsxDEV(iG,{tasks:Q,loading:Y,onTasksUpdate:f,onNewTask:()=>H(!0)},void 0,!1,void 0,this);case"tasks":{let h=A(),Z0=h?Q.find((E)=>E.id===h):null;return Q4.jsxDEV(eF,{tasks:Q,loading:Y,onTasksUpdate:k,selectedTask:Z0,onTaskClose:()=>{window.location.hash="/tasks"},onNewTask:()=>H(!0)},void 0,!1,void 0,this)}case"docs":return Q4.jsxDEV(aF,{},void 0,!1,void 0,this);case"config":return Q4.jsxDEV(Lz,{},void 0,!1,void 0,this);default:return Q4.jsxDEV(iG,{tasks:Q,loading:Y,onTasksUpdate:f,onNewTask:()=>H(!0)},void 0,!1,void 0,this)}};return Q4.jsxDEV(ND.Provider,{value:{isDark:N,toggle:a},children:Q4.jsxDEV(bU,{children:[Q4.jsxDEV(jP,{currentPage:C,isDark:N,onToggleTheme:a,onSearchClick:()=>z(!0)},void 0,!1,void 0,this),Q4.jsxDEV("main",{className:"flex flex-1 flex-col bg-background overflow-hidden",children:[Q4.jsxDEV("header",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[Q4.jsxDEV(gU,{className:"-ml-1"},void 0,!1,void 0,this),Q4.jsxDEV(ZJ,{orientation:"vertical",className:"mr-2 h-4"},void 0,!1,void 0,this),Q4.jsxDEV("div",{className:"flex flex-1 items-center gap-2 text-sm",children:Q4.jsxDEV("span",{className:`font-semibold ${N?"text-gray-100":"text-gray-900"}`,children:[F," - Task Management"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q4.jsxDEV("div",{className:"flex-1 w-full overflow-y-auto overflow-x-hidden",children:c()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q4.jsxDEV(Zz,{isOpen:K,allTasks:Q,onClose:()=>H(!1),onCreated:k},void 0,!1,void 0,this),Q4.jsxDEV(zz,{open:B,onOpenChange:z,onTaskSelect:s,onDocSelect:g},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var OD=J0(Q1(),1),_D=document.getElementById("root");if(!_D)throw Error("Root element not found");RD.createRoot(_D).render(OD.jsxDEV(ZL,{},void 0,!1,void 0,this));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knowns",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "CLI tool for dev teams to manage tasks and documentation",
|
|
5
5
|
"module": "index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"watch:ui": "nodemon --watch src/ui --ext tsx,ts,css --exec 'bun run build:ui && bun run build:copy-html'",
|
|
28
28
|
"build": "bun run build:cli && bun run build:ui && bun run build:copy-html",
|
|
29
29
|
"build:cli": "bun build src/index.ts --outdir dist --target bun && bun build src/mcp/server.ts --outdir dist/mcp --target bun",
|
|
30
|
-
"build:ui": "bun
|
|
30
|
+
"build:ui": "bun run ./scripts/build-ui.js",
|
|
31
31
|
"build:copy-html": "cp src/ui/index.html dist/ui/index.html",
|
|
32
32
|
"start": "bun run src/index.ts",
|
|
33
33
|
"mcp": "bun run src/mcp/server.ts",
|