blade-code 0.10.146 → 0.10.148

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.
Files changed (73) hide show
  1. package/dist/blade.js +2 -2
  2. package/dist/chunk-0bsdwenb.js +1 -0
  3. package/dist/{chunk-wz325egj.js → chunk-1apnz70d.js} +1 -1
  4. package/dist/{chunk-ewbdz582.js → chunk-1q1dq54w.js} +1 -1
  5. package/dist/{chunk-b099f5sg.js → chunk-2jx0drfw.js} +2 -2
  6. package/dist/{chunk-y4zg7d01.js → chunk-4132qtve.js} +3 -3
  7. package/dist/{chunk-nrwvk6nj.js → chunk-4af014dz.js} +1 -1
  8. package/dist/{chunk-h217y9nr.js → chunk-5wree2jj.js} +1 -1
  9. package/dist/{chunk-78w4nf32.js → chunk-6b235jg2.js} +1 -1
  10. package/dist/{chunk-qdsx35xh.js → chunk-6rnne052.js} +1 -1
  11. package/dist/{chunk-y11p2hkn.js → chunk-87x4fq6h.js} +1 -1
  12. package/dist/{chunk-neqyry9c.js → chunk-8rkcx7ga.js} +1 -1
  13. package/dist/{chunk-a4npzvvr.js → chunk-98bbsgq1.js} +1 -1
  14. package/dist/{chunk-0h3gj7rd.js → chunk-c738ej4c.js} +1 -1
  15. package/dist/{chunk-f3naz6qs.js → chunk-d0gn7wa2.js} +1 -1
  16. package/dist/{chunk-pb4cx5ht.js → chunk-d5k93y0j.js} +1 -1
  17. package/dist/chunk-dstcmhzb.js +1 -0
  18. package/dist/{chunk-whwkpq86.js → chunk-e17xwnga.js} +1 -1
  19. package/dist/{chunk-kshztpba.js → chunk-hdz9bg7e.js} +1 -1
  20. package/dist/{chunk-m7h23r1t.js → chunk-jea21v7c.js} +1 -1
  21. package/dist/{chunk-grzwra4b.js → chunk-k47zd5za.js} +1 -1
  22. package/dist/{chunk-295aejt2.js → chunk-mb3x1d61.js} +1 -1
  23. package/dist/{chunk-acdznbay.js → chunk-n7fb464q.js} +1 -1
  24. package/dist/{chunk-qjtnbc6f.js → chunk-nrm76z16.js} +1 -1
  25. package/dist/{chunk-yq5tpa0a.js → chunk-qbby8w8b.js} +1 -1
  26. package/dist/{chunk-182ef3yh.js → chunk-sa96vzds.js} +1 -1
  27. package/dist/{chunk-6wa054ea.js → chunk-sedvapwx.js} +1 -1
  28. package/dist/{chunk-b63mpen4.js → chunk-tc6r0y59.js} +1 -1
  29. package/dist/{chunk-ch29x278.js → chunk-vbjrq4fy.js} +1 -1
  30. package/dist/{chunk-5y5smy9s.js → chunk-vev6rw5y.js} +1 -1
  31. package/dist/{chunk-h5tkywm0.js → chunk-wc6mqf0a.js} +1 -1
  32. package/dist/{chunk-zy5g7k16.js → chunk-wjh181x1.js} +1 -1
  33. package/dist/{chunk-wyma4wc7.js → chunk-wzx53qsq.js} +1 -1
  34. package/dist/{chunk-5wvkcx8j.js → chunk-yd99p4dk.js} +2 -2
  35. package/dist/{chunk-ehsyyg6w.js → chunk-z8523xr8.js} +1 -1
  36. package/dist/{chunk-rj14y6h7.js → chunk-zfmqftw9.js} +1 -1
  37. package/dist/{chunk-gtyras9d.js → chunk-zm1ppb3t.js} +1 -1
  38. package/dist/{chunk-p5cbtf5b.js → chunk-zqea7tw1.js} +1 -1
  39. package/dist/{chunk-1ekp201h.js → chunk-zt4jpb5h.js} +1 -1
  40. package/dist/web/assets/{ChatView-B6YVeOpl.js → ChatView-BG50NCML.js} +4 -4
  41. package/dist/web/assets/{CodeBlockHighlighter-p-CwwjLJ.js → CodeBlockHighlighter-BvVwhf5a.js} +1 -1
  42. package/dist/web/assets/{FilePreview-C0zjFfLF.js → FilePreview-BtIVcR0F.js} +1 -1
  43. package/dist/web/assets/{KanbanBoard-BTjc3GTe.js → KanbanBoard-q43tsrHI.js} +1 -1
  44. package/dist/web/assets/{MarkdownRenderer-BQUL4vI_.js → MarkdownRenderer-SmFUuERM.js} +3 -3
  45. package/dist/web/assets/{ScrollArea-UfoiaWDB.js → ScrollArea-Hynncv8Z.js} +1 -1
  46. package/dist/web/assets/{SessionHistorySurface-B0WHnLst.js → SessionHistorySurface-Cm_p5HNt.js} +1 -1
  47. package/dist/web/assets/{SettingsModal-CkF6k9qu.js → SettingsModal-BCr6eHa7.js} +1 -1
  48. package/dist/web/assets/{Sidebar-DmVMsipF.js → Sidebar-DqrX6W8C.js} +2 -2
  49. package/dist/web/assets/{TaskSwitcher-DZELXs23.js → TaskSwitcher-IKy99xxv.js} +1 -1
  50. package/dist/web/assets/{TerminalPanel-kmWnkCMc.js → TerminalPanel-BKXU8wN9.js} +1 -1
  51. package/dist/web/assets/{archive-WXotGSXW.js → archive-B7JRGB39.js} +1 -1
  52. package/dist/web/assets/{arrow-left-Cb-SEc-l.js → arrow-left-DBD7MFJm.js} +1 -1
  53. package/dist/web/assets/{calendar-clock-BRidlYhb.js → calendar-clock-CWuzyTO_.js} +1 -1
  54. package/dist/web/assets/{chevron-right-CoRRZROd.js → chevron-right-DvNXYXi1.js} +1 -1
  55. package/dist/web/assets/{chevrons-up-down-Cv_JOz8A.js → chevrons-up-down-BLF_tprt.js} +1 -1
  56. package/dist/web/assets/{clock-3-CMvLtvtl.js → clock-3-Drk3JgZo.js} +1 -1
  57. package/dist/web/assets/{copy-DQqX0OQP.js → copy-DmPK2xKY.js} +1 -1
  58. package/dist/web/assets/{download-FP4WtwG3.js → download-Cic4550v.js} +1 -1
  59. package/dist/web/assets/{external-link-BTBZEQYA.js → external-link-BE207ycq.js} +1 -1
  60. package/dist/web/assets/{folder-Dd0PwX-t.js → folder-jmSOAps0.js} +1 -1
  61. package/dist/web/assets/{index-CXHca5Sw.js → index-E3Br6_JT.js} +14 -14
  62. package/dist/web/assets/{pause-C4azsEtU.js → pause-C5TUg_hD.js} +1 -1
  63. package/dist/web/assets/{pencil-BWrfxaIe.js → pencil-Cd2Iz31W.js} +1 -1
  64. package/dist/web/assets/{play-DgOFsd17.js → play-CWdIxxWS.js} +1 -1
  65. package/dist/web/assets/{plus-KK_f8iC4.js → plus-CFE558mS.js} +1 -1
  66. package/dist/web/assets/{settings-hrYiD_4G.js → settings-CbRw313K.js} +1 -1
  67. package/dist/web/assets/{team-Yr9DBygX.js → team-CDhOSyV0.js} +1 -1
  68. package/dist/web/assets/{teamService-CPSMTxV-.js → teamService-CTWoTNVQ.js} +1 -1
  69. package/dist/web/assets/{terminal-CHxuQT2f.js → terminal-BLRsjz3P.js} +1 -1
  70. package/dist/web/index.html +1 -1
  71. package/package.json +1 -1
  72. package/dist/chunk-9ybxmr9s.js +0 -1
  73. package/dist/chunk-nbrywc86.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as D,j as e}from"./vendor-react-DofNRwfy.js";import{S as ze}from"./ScrollArea-UfoiaWDB.js";import{c as pe,l as mt,u as se,a as d,a0 as He,a1 as Qe,a2 as Ve,p as Xe,j as w,L as te,b as K,d as $,E as Se,r as kt,al as bt,C as vt,X as gt,A as Je,w as jt,R as yt,T as wt,m as Ye,ab as Re,U as We,M as Nt,a7 as Ze,a9 as et,am as St,aa as tt,s as be,an as st,V as Tt,ao as Ct,ad as Et,Y as At,I as Dt}from"./index-CXHca5Sw.js";import{M as at,Z as G,_ as Pt}from"./session-events-CGQa6VXb.js";import{A as nt}from"./archive-WXotGSXW.js";import{D as rt}from"./download-FP4WtwG3.js";import{P as It}from"./pencil-BWrfxaIe.js";import{S as it}from"./settings-hrYiD_4G.js";import{P as Oe}from"./plus-KK_f8iC4.js";import{T as ct}from"./terminal-CHxuQT2f.js";import{C as Rt}from"./chevron-right-CoRRZROd.js";import"./vendor-radix-D6QrtXqd.js";/**
1
+ import{r as D,j as e}from"./vendor-react-DofNRwfy.js";import{S as ze}from"./ScrollArea-Hynncv8Z.js";import{c as pe,l as mt,u as se,a as d,a0 as He,a1 as Qe,a2 as Ve,p as Xe,j as w,L as te,b as K,d as $,E as Se,r as kt,al as bt,C as vt,X as gt,A as Je,w as jt,R as yt,T as wt,m as Ye,ab as Oe,U as We,M as Nt,a7 as Ze,a9 as et,am as St,aa as tt,s as be,an as st,V as Tt,ao as Ct,ad as Et,Y as At,I as Dt}from"./index-E3Br6_JT.js";import{M as at,Z as G,_ as Pt}from"./session-events-CGQa6VXb.js";import{A as nt}from"./archive-B7JRGB39.js";import{D as rt}from"./download-Cic4550v.js";import{P as It}from"./pencil-Cd2Iz31W.js";import{S as it}from"./settings-CbRw313K.js";import{P as _e}from"./plus-CFE558mS.js";import{T as ct}from"./terminal-BLRsjz3P.js";import{C as Rt}from"./chevron-right-DvNXYXi1.js";import"./vendor-radix-D6QrtXqd.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -28,4 +28,4 @@ import{r as D,j as e}from"./vendor-react-DofNRwfy.js";import{S as ze}from"./Scro
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const Lt=pe("MoreHorizontal",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);async function lt(t,a=!1){const r=await mt.exportSessionMarkdown(t,a),c=new Blob([r.markdown],{type:"text/markdown;charset=utf-8"}),o=URL.createObjectURL(c),l=document.createElement("a");l.href=o,l.download=r.filename,l.hidden=!0,document.body.appendChild(l);try{l.click()}finally{l.remove(),await new Promise(C=>{window.setTimeout(()=>{URL.revokeObjectURL(o),C()},0)})}return r}function Ut(){const t=se(),a=d(h=>h.archivedSessions),r=d(h=>h.archivedCatalogLoadState),c=d(h=>h.archivedCatalogError),o=d(h=>h.loadArchivedSessions),l=d(h=>h.unarchiveSession),C=d(h=>h.setError),b=d(h=>at(h.historySurfaceSelection)),[v,m]=D.useState(!1),[g,P]=D.useState(null),[R,j]=D.useState(null),T=h=>{h&&G(d.getState())||(m(h),h&&o())},B=()=>{G(d.getState())||o()};return b?null:e.jsxs(He,{open:v,onOpenChange:T,children:[e.jsx(Qe,{asChild:!0,children:e.jsxs("button",{type:"button",className:"flex h-8 w-full items-center justify-between rounded-md px-2.5 font-mono text-[12.5px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]","aria-label":t("archive.open"),children:[e.jsxs("span",{className:"flex items-center gap-2.5",children:[e.jsx(nt,{className:"h-3.5 w-3.5 text-[hsl(var(--deck-ink-faint))]"}),t("archive.title")]}),a.length>0&&e.jsx("span",{className:"rounded-sm bg-[hsl(var(--deck-surface))] px-1.5 py-0.5 text-[9px] text-[hsl(var(--deck-ink-faint))]",children:a.length})]})}),e.jsxs(Ve,{role:"dialog","aria-label":t("archive.title"),side:"right",align:"end",sideOffset:8,className:"w-[340px] overflow-hidden p-0",children:[e.jsxs("div",{className:"flex h-10 items-center justify-between border-b border-[hsl(var(--deck-hairline))] px-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-mono text-[11px] font-medium uppercase tracking-[0.08em] text-[hsl(var(--deck-ink))]",children:t("archive.title")}),e.jsx("div",{className:"text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:t("archive.subtitle")})]}),e.jsx("button",{type:"button",onClick:B,"aria-label":t("archive.refresh"),className:"flex h-6 w-6 items-center justify-center rounded text-[hsl(var(--deck-ink-faint))] hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]",children:e.jsx(Xe,{className:w("h-3 w-3",(r==="loading"||r==="hydrating")&&"animate-spin")})})]}),c?e.jsxs("div",{className:"px-3 py-4 text-[11px] text-red-600 dark:text-red-400",children:[e.jsx("div",{children:c}),e.jsx("button",{type:"button",onClick:B,className:"mt-2 font-mono text-[10px] text-[hsl(var(--deck-accent))] focus-visible:outline-none focus-visible:underline",children:t("archive.retry")})]}):a.length===0&&(r==="loading"||r==="hydrating")?e.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 font-mono text-[10px] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx(te,{className:"h-3 w-3 animate-spin"}),t("archive.loading")]}):a.length===0?e.jsx("div",{className:"flex h-24 items-center justify-center px-6 text-center text-[10.5px] text-[hsl(var(--deck-ink-faint))]",children:t("archive.empty")}):e.jsx(ze,{className:"max-h-[340px]",children:e.jsx("div",{className:"divide-y divide-[hsl(var(--deck-hairline))]",children:a.map(h=>{var A;const E=K(h),M=$(E),_=g===M,Y=h.projectPath.split("/").filter(Boolean).at(-1)??h.projectPath;return e.jsxs("div",{className:"flex min-h-[58px] items-center gap-2 px-3 py-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"truncate font-mono text-[11.5px] text-[hsl(var(--deck-ink))]",children:Se(h,t)}),e.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5 truncate font-mono text-[9px] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx("span",{className:"truncate",children:Y}),h.archivedAt&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":!0,children:"·"}),e.jsx("span",{children:new Date(h.archivedAt).toLocaleString()})]})]}),h.archivedBySessionId!==h.sessionId&&e.jsx("div",{className:"mt-0.5 truncate text-[9px] text-[hsl(var(--deck-accent))]",children:t("archive.inherited",{id:((A=h.archivedBySessionId)==null?void 0:A.slice(0,8))??""})})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[e.jsx("button",{type:"button",disabled:R!==null,onClick:async()=>{if(!G(d.getState())){j(M);try{await lt(E)}catch(U){C(U instanceof Error?U.message:"Session export failed")}finally{j(null)}}},"aria-label":t("session.action.export",{title:Se(h,t)}),title:t("session.action.exportShort"),className:"flex h-7 w-7 items-center justify-center rounded text-[hsl(var(--deck-ink-faint))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] disabled:cursor-wait disabled:opacity-35",children:R===M?e.jsx(te,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(rt,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",disabled:_||h.archivedBySessionId!==h.sessionId,onClick:async()=>{if(!G(d.getState())){P(M);try{await l(E)}finally{P(null)}}},"aria-label":t("archive.restore",{title:Se(h,t)}),title:h.archivedBySessionId!==h.sessionId?t("archive.restoreAncestor"):t("archive.restoreShort"),className:"flex h-7 w-7 items-center justify-center rounded text-[hsl(var(--deck-accent))] transition-colors hover:bg-[hsl(var(--deck-accent-soft))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] disabled:cursor-not-allowed disabled:opacity-35",children:_?e.jsx(te,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Ot,{className:"h-3.5 w-3.5"})})]})]},M)})})})]})]})}const _e={en:"sidebar.language.en",zh:"sidebar.language.zh"};function dt({className:t,variant:a="pill"}){const{locale:r,setLocale:c}=kt(),o=se();if(a==="compact"){const l=r==="en"?"zh":"en";return e.jsx("button",{type:"button",onClick:()=>c(l),"aria-label":o("sidebar.language.aria"),title:o("sidebar.language.label"),className:w("flex justify-center items-center w-10 h-10 font-mono font-medium rounded-md transition-colors text-[11px] text-[hsl(var(--deck-ink-faint))] hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]",t),children:o(_e[r])})}return e.jsx("div",{role:"group","aria-label":o("sidebar.language.aria"),className:w("inline-flex h-8 items-center rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] p-[2px] font-mono text-[11px]",t),children:bt.map(l=>{const C=l===r;return e.jsx("button",{type:"button",onClick:()=>c(l),"aria-pressed":C,className:w("flex justify-center items-center px-2 h-full transition-colors min-w-[28px] rounded-[4px]",C?"bg-[hsl(var(--deck-ink))] text-[hsl(var(--deck-canvas))]":"text-[hsl(var(--deck-ink-muted))] hover:text-[hsl(var(--deck-ink))]"),children:o(_e[l])},l)})})}function Ft({summary:t,isActive:a,onSelect:r}){const c=se(),o=t.title??t.locator.sessionId,l=c(t.capabilities.connection==="offline"?"history.connection.offline":t.capabilities.connection==="local"?"history.connection.local":"history.connection.online");return e.jsxs("div",{className:w("flex relative items-center w-full transition-colors min-h-[54px]",a?"bg-[hsl(var(--deck-surface))]":"hover:bg-[hsl(var(--deck-surface))]/60"),children:[a&&e.jsx("span",{className:"absolute left-0 top-1/2 h-6 w-[2px] -translate-y-1/2 rounded-r bg-[hsl(var(--deck-accent))]"}),e.jsxs("button",{type:"button","aria-label":c("session.action.select",{title:o}),"aria-current":a?"true":void 0,onClick:r,className:"flex min-h-[54px] min-w-0 flex-1 cursor-pointer items-center gap-2 py-1.5 pl-4 pr-2 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-[hsl(var(--deck-accent))]",children:[e.jsx("span",{className:w("h-1.5 w-1.5 shrink-0 rounded-full",t.capabilities.connection==="offline"?"bg-amber-500":"bg-blue-500 shadow-[0_0_5px_rgba(59,130,246,0.7)]"),title:l}),e.jsxs("span",{className:"flex-1 min-w-0 font-mono",children:[e.jsxs("span",{className:w("flex gap-2 items-center text-left truncate text-[12px]",a?"text-[hsl(var(--deck-ink))]":"text-[hsl(var(--deck-ink-muted))]"),children:[e.jsx("span",{className:"truncate",children:o}),e.jsx("span",{className:"inline-flex shrink-0 items-center rounded border border-[hsl(var(--deck-border))] px-1.5 py-0.5 text-[8.5px] text-[hsl(var(--deck-ink-faint))]",children:c("history.badge.remote")}),e.jsx("span",{className:"inline-flex shrink-0 items-center rounded border border-[hsl(var(--deck-border))] px-1.5 py-0.5 text-[8.5px] text-[hsl(var(--deck-ink-faint))]",children:l}),e.jsx("span",{className:"inline-flex shrink-0 items-center rounded bg-[hsl(var(--deck-accent-soft))] px-1.5 py-0.5 text-[8.5px] text-[hsl(var(--deck-accent))]",children:c("history.badge.historyOnly")})]}),e.jsx("span",{className:"mt-0.5 block truncate text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:t.displayCwd})]})]})]})}const qt={running:"bg-blue-500 dark:bg-blue-400 shadow-[0_0_5px_rgba(59,130,246,0.7)] animate-pulse",queued:"bg-amber-400 dark:bg-amber-300",interrupted:"bg-orange-500 dark:bg-orange-400",failed:"bg-red-500 dark:bg-red-400",cancelled:"bg-zinc-400 dark:bg-zinc-500",completed:"bg-[hsl(var(--deck-accent))]"};function Gt({session:t,isActive:a,isForking:r,isUnread:c,anyForking:o,isEditing:l,editingTitle:C,title:b,context:v,isCancelling:m,isRetrying:g,isExporting:P,onSelect:R,onCancelTask:j,onRetryTask:T,onFork:B,onArchive:h,onExport:E,onStartRename:M,onDelete:_,onEditingTitleChange:Y,onSaveRename:A,onCancelRename:U}){const y=se(),[F,z]=D.useState(!1),ae=D.useRef(null),q=D.useRef(null);return l?e.jsxs("div",{className:"flex h-9 w-full items-center gap-2 bg-[hsl(var(--deck-surface))] px-3",children:[e.jsx("input",{type:"text",value:C,onChange:S=>Y(S.target.value),onKeyDown:S=>{S.key==="Enter"&&A(),S.key==="Escape"&&U()},autoFocus:!0,className:"flex-1 rounded bg-[hsl(var(--deck-canvas))] px-2 py-1 font-mono text-[13px] text-[hsl(var(--deck-ink))] outline-none focus:ring-1 focus:ring-[hsl(var(--deck-accent))]"}),e.jsx("button",{"aria-label":y("session.action.save",{title:b}),onClick:A,className:"flex h-6 w-6 items-center justify-center rounded text-[hsl(var(--deck-accent))] hover:bg-[hsl(var(--deck-canvas))]",children:e.jsx(vt,{className:"w-3 h-3"})}),e.jsx("button",{"aria-label":y("session.action.cancel",{title:b}),onClick:U,className:"flex h-6 w-6 items-center justify-center rounded text-[hsl(var(--deck-ink-faint))] hover:bg-[hsl(var(--deck-canvas))]",children:e.jsx(gt,{className:"w-3 h-3"})})]}):e.jsxs("div",{className:w("flex relative items-center w-full transition-colors group min-h-[54px]",a?"bg-[hsl(var(--deck-surface))]":"hover:bg-[hsl(var(--deck-surface))]/60"),children:[a&&e.jsx("span",{className:"absolute left-0 top-1/2 h-6 w-[2px] -translate-y-1/2 rounded-r bg-[hsl(var(--deck-accent))]"}),e.jsxs("button",{type:"button","aria-label":y("session.action.select",{title:b}),"aria-current":a?"true":void 0,"aria-busy":r?"true":void 0,onClick:R,className:"flex min-h-[54px] min-w-0 flex-1 cursor-pointer items-center gap-2 py-1.5 pl-4 pr-2 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-[hsl(var(--deck-accent))]",children:[e.jsx("span",{className:w("h-1.5 w-1.5 shrink-0 rounded-full",t.pendingInteraction?"animate-pulse bg-amber-500 shadow-[0_0_5px_rgba(245,158,11,0.75)]":qt[t.taskStatus]),title:t.pendingInteraction?y(t.pendingInteraction.type==="question"?"interaction.badge.question":t.pendingInteraction.type==="elicitation"?"interaction.badge.elicitation":"interaction.badge.permission"):t.taskStatus}),e.jsxs("span",{className:"flex-1 min-w-0 font-mono",children:[e.jsxs("span",{className:w("flex gap-2 items-center text-left truncate text-[12px]",a?"text-[hsl(var(--deck-ink))]":"text-[hsl(var(--deck-ink-muted))]"),children:[e.jsx("span",{className:"truncate",children:b}),c&&e.jsx("span",{title:y("taskSwitcher.new"),className:"h-1.5 w-1.5 shrink-0 rounded-full bg-[hsl(var(--deck-accent))] shadow-[0_0_5px_hsl(var(--deck-accent-glow)/0.75)]"}),t.pendingInteraction&&e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-amber-100 px-1.5 py-0.5 text-[8.5px] text-amber-800 dark:bg-amber-950/60 dark:text-amber-300",title:y(t.pendingInteraction.type==="question"?"interaction.badge.question":t.pendingInteraction.type==="elicitation"?"interaction.badge.elicitation":"interaction.badge.permission"),children:[e.jsx(Je,{className:"h-2.5 w-2.5"}),y(t.pendingInteraction.type==="question"?"interaction.badge.question":t.pendingInteraction.type==="elicitation"?"interaction.badge.elicitation":"interaction.badge.permission")]}),t.relationType==="fork"&&t.parentId&&e.jsxs("span",{title:`${y("session.forkedFrom")} ${t.parentId.slice(0,6)}`,"aria-label":`${y("session.forkedFrom")} ${t.parentId.slice(0,6)}`,className:"shrink-0 text-[9px] text-[hsl(var(--deck-accent))]",children:[y("session.forkedFrom")," ",t.parentId.slice(0,6)]}),t.taskRetriedFrom&&e.jsx("span",{title:`${y("session.retriedFrom")} ${t.taskRetriedFrom.sessionId.slice(0,6)}`,className:"shrink-0 text-[9px] text-[hsl(var(--deck-accent))]",children:y("session.retryShort")})]}),e.jsxs("span",{className:"mt-0.5 flex min-w-0 items-center gap-1.5 truncate text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx("span",{className:"truncate",children:v.project}),e.jsx("span",{className:"opacity-50",children:"·"}),e.jsx("span",{className:"truncate",children:v.environment}),v.queue&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"opacity-50",children:"·"}),e.jsx("span",{className:"text-amber-700 truncate dark:text-amber-400",children:v.queue})]}),v.diff&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"opacity-50",children:"·"}),e.jsx("span",{className:"truncate text-[hsl(var(--deck-accent))]",children:v.diff})]})]}),v.reason&&e.jsx("span",{title:v.reason,className:"mt-0.5 block truncate text-[9.5px] text-red-600 dark:text-red-400",children:v.reason})]}),r&&e.jsx(te,{className:"h-3 w-3 shrink-0 animate-spin text-[hsl(var(--deck-accent))]"})]}),e.jsxs("div",{className:w("flex items-center gap-0.5 pr-2 transition-opacity group-focus-within:opacity-100",t.taskStatus==="running"||t.taskStatus==="queued"||t.taskRetryAvailable&&(t.taskStatus==="failed"||t.taskStatus==="interrupted"||t.taskStatus==="cancelled")?"opacity-100":"opacity-50 group-hover:opacity-100"),children:[(t.taskStatus==="running"||t.taskStatus==="queued")&&e.jsx("button",{type:"button","aria-label":y(m?"session.action.stopping":"session.action.stop",{title:b}),disabled:m,onClick:S=>{S.stopPropagation(),j()},className:"flex h-6 w-6 items-center justify-center rounded text-red-500 transition-colors hover:bg-red-500/10 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-red-500 disabled:cursor-wait disabled:opacity-60",children:m?e.jsx(te,{className:"h-3 w-3 animate-spin"}):e.jsx(jt,{className:"h-3 w-3"})}),t.taskRetryAvailable&&(t.taskStatus==="failed"||t.taskStatus==="interrupted"||t.taskStatus==="cancelled")&&e.jsx("button",{ref:ae,type:"button","aria-label":y(g?"session.action.retrying":"session.action.retry",{title:b}),disabled:g,onClick:S=>{S.stopPropagation(),T()},className:"flex h-6 w-6 items-center justify-center rounded text-[hsl(var(--deck-accent))] transition-colors hover:bg-[hsl(var(--deck-accent-soft))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] disabled:cursor-wait disabled:opacity-60",children:g?e.jsx(te,{className:"h-3 w-3 animate-spin"}):e.jsx(yt,{className:"h-3 w-3"})}),e.jsxs(He,{open:F,onOpenChange:z,children:[e.jsx(Qe,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":y("session.action.more",{title:b}),"aria-expanded":F,className:"flex h-6 w-6 items-center justify-center rounded text-[hsl(var(--deck-ink-faint))] transition-colors hover:bg-[hsl(var(--deck-canvas))] hover:text-[hsl(var(--deck-ink))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]",children:e.jsx(Lt,{className:"h-3.5 w-3.5"})})}),e.jsxs(Ve,{ref:q,role:"menu","aria-label":y("session.action.more",{title:b}),side:"right",align:"start",sideOffset:6,className:"w-40 p-1",onOpenAutoFocus:S=>{var H,ie;S.preventDefault(),(ie=(H=q.current)==null?void 0:H.querySelector('[role="menuitem"]:not([disabled])'))==null||ie.focus()},onKeyDown:S=>{S.key==="Escape"&&(S.preventDefault(),S.stopPropagation(),z(!1),window.setTimeout(()=>{var H;return(H=ae.current)==null?void 0:H.focus()},0))},children:[e.jsxs("button",{type:"button",role:"menuitem","aria-label":y("session.action.fork",{title:b}),disabled:o,onClick:S=>{S.stopPropagation(),B(),z(!1)},className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left font-mono text-[11px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:bg-[hsl(var(--deck-surface))] focus-visible:text-[hsl(var(--deck-ink))] focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-45",children:[e.jsx(Mt,{className:"h-3 w-3","aria-hidden":!0}),y("session.action.forkShort")]}),e.jsxs("button",{type:"button",role:"menuitem","aria-label":y("session.action.rename",{title:b}),onClick:S=>{M(S),z(!1)},className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left font-mono text-[11px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:bg-[hsl(var(--deck-surface))] focus-visible:text-[hsl(var(--deck-ink))] focus-visible:outline-none",children:[e.jsx(It,{className:"h-3 w-3","aria-hidden":!0}),y("session.action.renameShort")]}),e.jsxs("button",{type:"button",role:"menuitem","aria-label":y("session.action.archive",{title:b}),disabled:t.taskStatus==="running"||t.taskStatus==="queued",onClick:S=>{S.stopPropagation(),h(),z(!1)},className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left font-mono text-[11px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:bg-[hsl(var(--deck-surface))] focus-visible:text-[hsl(var(--deck-ink))] focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-35",children:[e.jsx(nt,{className:"h-3 w-3","aria-hidden":!0}),y("session.action.archiveShort")]}),e.jsxs("button",{type:"button",role:"menuitem","aria-label":y("session.action.export",{title:b}),disabled:P,onClick:S=>{S.stopPropagation(),E(),z(!1)},className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left font-mono text-[11px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:bg-[hsl(var(--deck-surface))] focus-visible:text-[hsl(var(--deck-ink))] focus-visible:outline-none disabled:cursor-wait disabled:opacity-45",children:[P?e.jsx(te,{className:"h-3 w-3 animate-spin","aria-hidden":!0}):e.jsx(rt,{className:"h-3 w-3","aria-hidden":!0}),y(P?"session.action.exportingShort":"session.action.exportShort")]}),e.jsxs("button",{type:"button",role:"menuitem","aria-label":y("session.action.delete",{title:b}),onClick:S=>{_(S),z(!1)},className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left font-mono text-[11px] text-red-600 transition-colors hover:bg-red-500/10 focus-visible:bg-red-500/10 focus-visible:outline-none dark:text-red-400",children:[e.jsx(wt,{className:"h-3 w-3","aria-hidden":!0}),y("session.action.deleteShort")]})]})]})]})]})}function Kt({onExpand:t,onNewChat:a,onOpenBoard:r,onOpenTaskSwitcher:c,onToggleTerminal:o,onToggleSettings:l,isTerminalOpen:C,taskEventsConnected:b,unreadCount:v,boardActive:m,terminalDisabled:g=!1,taskSwitcherDisabled:P=!1,className:R}){const j=se(),T=[{icon:it,action:l,labelKey:"sidebar.section.settings"}];return e.jsxs("div",{className:w("flex flex-col gap-2 items-center py-5 h-screen border-r w-[64px] border-[hsl(var(--deck-hairline))] bg-[hsl(var(--deck-canvas-veil))]",R),children:[e.jsx("button",{onClick:t,className:"rounded-md p-1 transition-colors hover:bg-[hsl(var(--deck-surface))]","aria-label":j("sidebar.action.expand"),children:e.jsx(Ye,{size:28})}),e.jsx("button",{onClick:a,"aria-label":j("sidebar.action.newTaskShort"),title:j("sidebar.action.newTaskShort"),className:"mt-6 flex h-10 w-10 items-center justify-center rounded-md bg-[hsl(var(--deck-ink))] text-[hsl(var(--deck-canvas))] transition-colors hover:bg-[hsl(var(--deck-ink))]/85",children:e.jsx(Oe,{className:"h-4 w-4 stroke-[2.5]"})}),e.jsx("button",{type:"button",onClick:r,"aria-label":j("sidebar.action.taskBoard"),"aria-current":m?"page":void 0,title:j("sidebar.action.taskBoard"),className:w("flex h-10 w-10 items-center justify-center rounded-md border transition-colors",m?"border-[hsl(var(--deck-accent)/0.55)] bg-[hsl(var(--deck-accent-soft))] text-[hsl(var(--deck-accent))]":"border-transparent text-[hsl(var(--deck-ink-muted))] hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]"),children:e.jsx(ot,{className:"h-4 w-4"})}),e.jsx("button",{onClick:o,disabled:g,"aria-label":j("sidebar.action.terminalToggle"),title:j("sidebar.action.terminal"),className:w("flex h-10 w-10 items-center justify-center rounded-md border transition-colors",g&&"cursor-not-allowed opacity-35",C?"border-[hsl(var(--deck-accent)/0.55)] bg-[hsl(var(--deck-accent-soft))] text-[hsl(var(--deck-accent))]":"border-transparent text-[hsl(var(--deck-ink-muted))] hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]"),children:e.jsx(ct,{className:"w-4 h-4"})}),e.jsxs("button",{onClick:c,disabled:P,"aria-label":j("sidebar.action.searchTasks"),title:`${j("sidebar.action.searchTasks")} (${Re("searchTasks")})`,className:w("relative flex h-10 w-10 items-center justify-center rounded-md border border-transparent text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]",P&&"cursor-not-allowed opacity-35"),children:[e.jsx(We,{className:"h-4 w-4"}),v>0&&e.jsx("span",{"aria-label":j("sidebar.unreadTasks",{count:v}),className:"absolute right-0.5 top-0.5 flex min-h-4 min-w-4 items-center justify-center rounded-full bg-[hsl(var(--deck-accent))] px-1 font-mono text-[8px] font-semibold text-white",children:v>99?"99+":v})]}),e.jsx("div",{className:"flex-1"}),e.jsx("div",{className:"my-2 h-px w-6 bg-[hsl(var(--deck-hairline))]"}),T.map(({icon:B,action:h,labelKey:E})=>e.jsx("button",{"data-settings-trigger":!0,onClick:h,"aria-label":j(E),title:j(E),className:"flex h-10 w-10 items-center justify-center rounded-md text-[hsl(var(--deck-ink-faint))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]",children:e.jsx(B,{className:"w-4 h-4"})},E)),e.jsx(dt,{variant:"compact"}),e.jsx("div",{className:"mt-1",children:e.jsx("div",{role:"status","aria-label":j(b?"sidebar.status.feedLive":"sidebar.status.feedOffline"),className:w("h-2 w-2 rounded-full",b?"bg-[hsl(var(--deck-accent))] shadow-[0_0_6px_hsl(var(--deck-accent-glow)/0.9)]":"bg-[hsl(var(--deck-ink-faint))]/60"),title:j(b?"sidebar.status.feedLive":"sidebar.status.feedOffline")})})]})}const ht="blade.sidebar.project-order.v1";function ve(t){const a=new Set,r=[];for(const c of t)typeof c!="string"||!c||a.has(c)||(a.add(c),r.push(c));return r}function $t(){if(typeof window>"u")return[];try{const t=JSON.parse(window.localStorage.getItem(ht)??"[]");return Array.isArray(t)?ve(t):[]}catch{return[]}}function Me(t){if(!(typeof window>"u"))try{window.localStorage.setItem(ht,JSON.stringify(ve(t)))}catch{}}function Be(t,a){const r=new Map(ve(a).map((o,l)=>[o,l])),c=r.size;return t.map((o,l)=>({project:o,rank:r.get(o.path)??c+l})).sort((o,l)=>o.rank-l.rank).map(({project:o})=>o)}function Le(t,a,r){const c=ve(t),o=c.indexOf(a),l=c.indexOf(r);if(o<0||l<0||o===l)return c;const[C]=c.splice(o,1);return c.splice(l,0,C),c}function Ue(t,a,r){const c=ve(t),o=c.indexOf(a),l=o+r;return o<0||l<0||l>=c.length||([c[o],c[l]]=[c[l],c[o]]),c}function Fe({name:t,path:a,count:r,countIsPartial:c=!1,isActive:o,hasRunning:l,unreadCount:C,collapsed:b,onToggle:v,onSelect:m,onCreateTask:g,reorderPosition:P,reorderCount:R,isDragging:j=!1,onDragStart:T,onDragEnd:B,onReorderKeyDown:h}){const E=se();return e.jsxs("div",{className:w("group/proj flex w-full items-center gap-2 px-5 pb-1.5 pt-3 text-left transition-colors","hover:bg-[hsl(var(--deck-surface))]/40"),children:[e.jsx("button",{type:"button",draggable:!0,"data-project-drag-handle":a,onDragStart:T,onDragEnd:B,onKeyDown:h,"aria-label":E("sidebar.project.reorder",{name:t,position:P,count:R}),title:E("sidebar.project.reorderHint"),className:w("-ml-2 flex h-6 w-4 shrink-0 cursor-grab items-center justify-center rounded-sm text-[hsl(var(--deck-ink-faint))] opacity-45 transition-[opacity,color,background-color] hover:bg-[hsl(var(--deck-surface-2))] hover:text-[hsl(var(--deck-ink-muted))] hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] active:cursor-grabbing group-hover/proj:opacity-100",j&&"cursor-grabbing opacity-100 text-[hsl(var(--deck-accent))]"),children:e.jsx(Bt,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",onClick:v,"aria-expanded":!b,"aria-label":E(b?"sidebar.project.expand":"sidebar.project.collapse",{name:t}),className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]",children:e.jsx(Rt,{className:w("h-3 w-3 text-[hsl(var(--deck-ink-faint))] transition-transform duration-150",!b&&"rotate-90")})}),e.jsxs("button",{type:"button",onClick:m??v,title:a,"aria-current":o?"true":void 0,className:"flex min-h-6 min-w-0 flex-1 items-center gap-2 rounded-sm text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]",children:[e.jsx(Nt,{className:w("h-3.5 w-3.5 shrink-0",o?"text-[hsl(var(--deck-accent))]":"text-[hsl(var(--deck-ink-faint))]")}),e.jsx("span",{className:w("flex-1 truncate font-mono text-[11.5px] font-medium tracking-[-0.01em]",o?"text-[hsl(var(--deck-ink))]":"text-[hsl(var(--deck-ink-muted))]"),children:t}),l&&e.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-blue-500 shadow-[0_0_5px_rgba(59,130,246,0.7)] animate-pulse dark:bg-blue-400","aria-hidden":!0}),C>0&&e.jsx("span",{"aria-label":E("sidebar.unreadTasks",{count:C}),className:"shrink-0 rounded-full bg-[hsl(var(--deck-accent))] px-1.5 py-0.5 font-mono text-[8px] font-semibold text-white",children:C}),e.jsxs("span",{className:"shrink-0 font-mono text-[10px] text-[hsl(var(--deck-ink-faint))]",children:[r.toString().padStart(2,"0"),c?"+":""]})]}),g&&e.jsx("button",{type:"button",onClick:g,title:E("sidebar.project.newTask",{name:t}),"aria-label":E("sidebar.project.newTask",{name:t}),className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-sm text-[hsl(var(--deck-ink-faint))] opacity-0 transition-[opacity,color,background-color] hover:bg-[hsl(var(--deck-surface-2))] hover:text-[hsl(var(--deck-accent))] focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] group-hover/proj:opacity-100",children:e.jsx(Oe,{className:"h-3.5 w-3.5"})})]})}const zt=["running","queued","interrupted","failed","cancelled","completed"],Ht={running:"RUNNING",queued:"QUEUED",interrupted:"INTERRUPTED",failed:"FAILED",cancelled:"CANCELLED",completed:"DONE"},ue=t=>t.length>1?t.replace(/\/+$/,""):t;function ut(t){const a=new Map;for(const r of t){if(!r)continue;const c=$(K(r));a.has(c)||a.set(c,r)}return Array.from(a.values())}function Qt(t){const a=ut(t),r=[];for(const c of zt){const o=a.filter(l=>l.taskStatus===c).sort(Ze);o.length>0&&r.push({code:Ht[c],status:c,sessions:o})}return r}function Vt(t,a,r=[]){const c=ut(t),o=new Map,l=r.map(ue),C=new Map(l.map((m,g)=>[m,g]));for(const m of l)o.set(m,[]);for(const m of c){const g=et(m,a),P=o.get(g);P?P.push(m):o.set(g,[m])}const b=a?ue(a):null,v=Array.from(o.entries()).map(([m,g])=>{const P=[...g].sort(Ze),R=g.reduce((j,T)=>Math.max(j,St(T)),0);return{path:m,name:tt(m),isActive:b?ue(m)===b:!1,isBound:C.has(ue(m)),hasRunning:g.some(j=>j.taskStatus==="running"),lastActivity:R,sessions:P}});return v.sort((m,g)=>m.isBound!==g.isBound?m.isBound?-1:1:m.isBound&&g.isBound?(C.get(ue(m.path))??Number.MAX_SAFE_INTEGER)-(C.get(ue(g.path))??Number.MAX_SAFE_INTEGER):g.lastActivity-m.lastActivity),v}const Ne=12,Xt=["running","queued","interrupted","failed","cancelled","completed"],qe={RUNNING:"sidebar.group.running",QUEUED:"sidebar.group.queued",INTERRUPTED:"sidebar.group.interrupted",FAILED:"sidebar.group.failed",CANCELLED:"sidebar.group.cancelled",DONE:"sidebar.group.done"},Ge={RUNNING:"text-blue-700 dark:text-blue-400",QUEUED:"text-amber-700 dark:text-amber-400",INTERRUPTED:"text-orange-700 dark:text-orange-400",FAILED:"text-red-700 dark:text-red-400",CANCELLED:"text-[hsl(var(--deck-ink-faint))]",DONE:"text-[hsl(var(--deck-accent))]"},Jt={running:"RUNNING",queued:"QUEUED",interrupted:"INTERRUPTED",failed:"FAILED",cancelled:"CANCELLED",completed:"DONE"};function xe(t){return t.length>1?t.replace(/\/+$/,""):t}function Ke(t){const a=t.lastMessageTime||t.firstMessageTime;if(!a)return 0;const r=new Date(a).getTime();return Number.isNaN(r)?0:r}function Yt(t,a){if(t.locator.workspace.kind!=="local")throw new Error("Expected a local Session surface summary");return{...a??{sessionId:t.locator.sessionId,projectPath:t.locator.workspace.projectPath,rootId:t.rootId,taskStatus:t.taskStatus,messageCount:t.messageCount,firstMessageTime:t.firstMessageTime,lastMessageTime:t.lastMessageTime,hasErrors:t.hasErrors},sessionId:t.locator.sessionId,projectPath:t.locator.workspace.projectPath,title:t.title,rootId:t.rootId,parentId:t.parentId,relationType:t.relationType,taskStatus:t.taskStatus,messageCount:t.messageCount,firstMessageTime:t.firstMessageTime,lastMessageTime:t.lastMessageTime,hasErrors:t.hasErrors,archivedAt:t.archivedAt,selectedModelId:t.selectedModelId}}function $e(t){return t.kind==="local"?t.session.taskStatus:t.summary.taskStatus}function Wt(t,a){return a.activityTime-t.activityTime}function Ie(t){return[...t].sort(Wt)}function Zt({view:t,sessions:a,surfaceCatalog:r,activeProjectPath:c,boundProjects:o,currentSessionRef:l,historySurfaceSelection:C,unreadTaskKeys:b,catalogLoadState:v,onSelectProject:m,onCreateTask:g,onRetryCatalog:P,renderLocalRow:R,renderRemoteRow:j}){const T=se(),[B,h]=D.useState({}),[E,M]=D.useState({}),[_,Y]=D.useState($t),[A,U]=D.useState(null),[y,F]=D.useState(null),[z,ae]=D.useState(""),q=v==="ready"||r.length>0,S=v==="loading"||v==="hydrating",H=S||v==="error",ie=q?r.length:a.length,Te=D.useMemo(()=>t==="status"?Qt(a):[],[a,t]),ne=D.useMemo(()=>t==="project"?Vt(a,c,o.map(n=>n.path)):[],[c,o,a,t]),Q=D.useMemo(()=>Be(ne,_),[ne,_]),V=D.useMemo(()=>{if(!q)return[];const n=new Map(a.map(x=>[$(K(x)),x])),k=[];for(const x of r){if(x.locator.workspace.kind==="local"){const I={sessionId:x.locator.sessionId,projectPath:x.locator.workspace.projectPath},i=n.get($(I)),p=Yt(x,i);k.push({kind:"local",path:i?et(p,c):x.locator.workspace.projectPath,activityTime:Ke(x),session:p});continue}k.push({kind:"remote",activityTime:Ke(x),summary:x})}return k},[c,a,r,q]),Ce=D.useMemo(()=>!q||t!=="status"?[]:Xt.flatMap(n=>{const k=Ie(V.filter(x=>$e(x)===n));return k.length===0?[]:[{code:Jt[n],entries:k}]}),[V,q,t]),X=D.useMemo(()=>{if(!q||t!=="project")return[];const n=o.map(p=>xe(p.path)),k=new Map(n.map((p,u)=>[p,u])),x=new Map;for(const p of n)x.set(p,[]);for(const p of V){if(p.kind!=="local")continue;const u=x.get(p.path);u?u.push(p):x.set(p.path,[p])}const I=c?xe(c):null,i=Array.from(x.entries()).map(([p,u])=>({path:p,name:tt(p),isActive:I?xe(p)===I:!1,isBound:k.has(xe(p)),hasRunning:u.some(f=>$e(f)==="running"),lastActivity:u.reduce((f,L)=>Math.max(f,L.activityTime),0),entries:Ie(u)}));return i.sort((p,u)=>p.isBound!==u.isBound?p.isBound?-1:1:p.isBound&&u.isBound?(k.get(xe(p.path))??Number.MAX_SAFE_INTEGER)-(k.get(xe(u.path))??Number.MAX_SAFE_INTEGER):u.lastActivity-p.lastActivity),Be(i,_)},[c,o,V,_,q,t]),ce=D.useMemo(()=>t==="project"?Ie(V.filter(n=>n.kind==="remote")):[],[V,t]),ge=n=>n.kind==="local"&&!!n.session.pendingInteraction,je=n=>n.kind==="local"&&b.includes($(K(n.session))),fe=n=>n.kind==="local"?!!(l&&be(K(n.session),l)):!!(C&&st(n.summary.locator,C.locator)),ye=(n,k)=>{const x=E[n]??!1,I=x?k:k.filter((u,f)=>{if(f<Ne)return!0;const L=K(u);return!!u.pendingInteraction||b.includes($(L))||!!(l&&be(L,l))}),i=k.length-I.length,p=x?k.length>Ne:i>0;return e.jsxs(e.Fragment,{children:[I.map(R),p&&e.jsx("button",{type:"button",onClick:()=>M(u=>({...u,[n]:!x})),className:"mx-4 my-1 rounded-md px-3 py-1.5 text-left font-mono text-[10.5px] text-[hsl(var(--deck-ink-faint))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink-muted))]",children:x?T("sidebar.group.showLess"):T("sidebar.group.showMore",{count:i})})]})},W=(n,k)=>{const x=E[n]??!1,I=x?k:k.filter((u,f)=>f<Ne?!0:ge(u)||je(u)||fe(u)),i=k.length-I.length,p=x?k.length>Ne:i>0;return e.jsxs(e.Fragment,{children:[I.map(u=>u.kind==="local"?R(u.session):j(u.summary)),p&&e.jsx("button",{type:"button",onClick:()=>M(u=>({...u,[n]:!x})),className:"mx-4 my-1 rounded-md px-3 py-1.5 text-left font-mono text-[10.5px] text-[hsl(var(--deck-ink-faint))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink-muted))]",children:x?T("sidebar.group.showLess"):T("sidebar.group.showMore",{count:i})})]})},oe=S?e.jsxs("div",{role:"status","aria-live":"polite",className:"mx-4 mt-2 flex items-center gap-2 rounded-md bg-[hsl(var(--deck-surface))]/55 px-3 py-2 font-mono text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx(te,{className:"h-3 w-3 shrink-0 animate-spin text-[hsl(var(--deck-accent))]"}),e.jsx("span",{className:"flex-1 min-w-0",children:T("sidebar.catalog.syncing")}),e.jsx("span",{className:"tabular-nums shrink-0",children:T("sidebar.catalog.loaded",{count:ie})})]}):v==="error"?e.jsxs("div",{role:"alert",className:"mx-4 mt-2 flex items-center gap-2 rounded-md bg-amber-50/80 px-3 py-2 font-mono text-[9.5px] text-amber-800 dark:bg-amber-950/35 dark:text-amber-300",children:[e.jsx(Je,{className:"w-3 h-3 shrink-0"}),e.jsx("span",{className:"flex-1 min-w-0",children:T("sidebar.catalog.incomplete")}),e.jsxs("button",{type:"button",onClick:P,className:"inline-flex min-h-6 shrink-0 items-center gap-1 rounded px-1.5 font-medium hover:bg-amber-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-amber-500 dark:hover:bg-amber-900/50",children:[e.jsx(Xe,{className:"h-2.5 w-2.5"}),T("sidebar.catalog.retry")]})]}):null;if(q){if(t==="status")return e.jsxs("div",{className:"flex flex-col",children:[oe,Ce.map((i,p)=>e.jsxs("div",{children:[e.jsxs("div",{className:w("flex items-center justify-between px-5 pb-2 pt-3 font-mono text-[10px] tracking-[0.16em]",Ge[i.code]??"text-[hsl(var(--deck-ink-faint))]",p===0&&"pt-2"),children:[e.jsx("span",{children:T(qe[i.code])}),e.jsxs("span",{className:"text-[hsl(var(--deck-ink-faint))]",children:[i.entries.length.toString().padStart(2,"0"),H?"+":""]})]}),W(`status:${i.code}`,i.entries)]},i.code))]});const n=X.some(i=>i.isActive||i.entries.some(fe)),k=i=>i.entries.some(fe),x=(i,p)=>{if(i.join("\0")===X.map(f=>f.path).join("\0"))return;Y(i),Me(i);const u=X.find(f=>f.path===p);ae(T("sidebar.project.reordered",{name:(u==null?void 0:u.name)??p,position:i.indexOf(p)+1}))},I=(i,p)=>{const u=i.entries.filter(je).length,f=k(i),L=u>0,re=i.entries.some(ge),Z=B[i.path]??(n&&!i.isActive&&!(f||i.hasRunning||L||re));return e.jsxs("div",{"data-project-group":i.path,onDragEnter:O=>{!A||A===i.path||(O.preventDefault(),F(i.path))},onDragOver:O=>{!A||A===i.path||(O.preventDefault(),O.dataTransfer.dropEffect="move")},onDrop:O=>{O.preventDefault();const ee=A||O.dataTransfer.getData("text/plain");ee&&ee!==i.path&&x(Le(X.map(ke=>ke.path),ee,i.path),ee),U(null),F(null)},className:w("relative transition-colors",y===i.path&&A!==i.path&&"bg-[hsl(var(--deck-accent-soft))]/55 before:absolute before:inset-y-1 before:left-0 before:w-0.5 before:rounded-full before:bg-[hsl(var(--deck-accent))]"),children:[e.jsx(Fe,{name:i.name,path:i.path,count:i.entries.length,countIsPartial:H,isActive:i.isActive,hasRunning:i.hasRunning,unreadCount:u,collapsed:Z,onSelect:()=>m(i.path),onCreateTask:()=>g(i.path),reorderPosition:p+1,reorderCount:X.length,isDragging:A===i.path,onDragStart:O=>{O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",i.path),U(i.path)},onDragEnd:()=>{U(null),F(null)},onReorderKeyDown:O=>{if(O.key!=="ArrowUp"&&O.key!=="ArrowDown")return;O.preventDefault();const ee=Ue(X.map(ke=>ke.path),i.path,O.key==="ArrowUp"?-1:1);x(ee,i.path)},onToggle:()=>h(O=>({...O,[i.path]:!Z}))}),!Z&&W(`project:${i.path}`,i.entries)]},i.path)};return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"sr-only","aria-live":"polite",children:z}),oe,ce.length>0&&e.jsxs("section",{"data-remote-session-group":!0,children:[e.jsxs("div",{className:"flex items-center justify-between px-5 pb-2 pt-3 font-mono text-[10px] tracking-[0.16em] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx("span",{children:T("sidebar.project.remoteSessions")}),e.jsx("span",{children:ce.length.toString().padStart(2,"0")})]}),W("remote-sessions",ce)]}),X.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-5 pb-0.5 pt-2 font-mono text-[9px] uppercase tracking-[0.16em] text-[hsl(var(--deck-ink-faint))]",children:T("sidebar.project.projects")}),X.map(I)]})]})}if(t==="status")return e.jsxs("div",{className:"flex flex-col",children:[oe,Te.map((n,k)=>e.jsxs("div",{children:[e.jsxs("div",{className:w("flex items-center justify-between px-5 pb-2 pt-3 font-mono text-[10px] tracking-[0.16em]",Ge[n.code]??"text-[hsl(var(--deck-ink-faint))]",k===0&&"pt-2"),children:[e.jsx("span",{children:T(qe[n.code])}),e.jsxs("span",{className:"text-[hsl(var(--deck-ink-faint))]",children:[n.sessions.length.toString().padStart(2,"0"),H?"+":""]})]}),ye(`status:${n.code}`,n.sessions)]},n.code))]});const le=Q.some(n=>n.isActive),me=n=>!!(l&&n.sessions.some(k=>be(K(k),l))),de=(n,k)=>{if(n.join("\0")===Q.map(I=>I.path).join("\0"))return;Y(n),Me(n);const x=Q.find(I=>I.path===k);ae(T("sidebar.project.reordered",{name:(x==null?void 0:x.name)??k,position:n.indexOf(k)+1}))},we=(n,k)=>{const x=n.sessions.filter(f=>b.includes($(K(f)))).length,I=me(n),i=x>0,p=n.sessions.some(f=>!!f.pendingInteraction),u=B[n.path]??(le&&!n.isActive&&!(I||n.hasRunning||i||p));return e.jsxs("div",{"data-project-group":n.path,onDragEnter:f=>{!A||A===n.path||(f.preventDefault(),F(n.path))},onDragOver:f=>{!A||A===n.path||(f.preventDefault(),f.dataTransfer.dropEffect="move")},onDrop:f=>{f.preventDefault();const L=A||f.dataTransfer.getData("text/plain");L&&L!==n.path&&de(Le(Q.map(re=>re.path),L,n.path),L),U(null),F(null)},className:w("relative transition-colors",y===n.path&&A!==n.path&&"bg-[hsl(var(--deck-accent-soft))]/55 before:absolute before:inset-y-1 before:left-0 before:w-0.5 before:rounded-full before:bg-[hsl(var(--deck-accent))]"),children:[e.jsx(Fe,{name:n.name,path:n.path,count:n.sessions.length,countIsPartial:H,isActive:n.isActive,hasRunning:n.hasRunning,unreadCount:x,collapsed:u,onSelect:()=>m(n.path),onCreateTask:()=>g(n.path),reorderPosition:k+1,reorderCount:Q.length,isDragging:A===n.path,onDragStart:f=>{f.dataTransfer.effectAllowed="move",f.dataTransfer.setData("text/plain",n.path),U(n.path)},onDragEnd:()=>{U(null),F(null)},onReorderKeyDown:f=>{if(f.key!=="ArrowUp"&&f.key!=="ArrowDown")return;f.preventDefault();const L=Ue(Q.map(re=>re.path),n.path,f.key==="ArrowUp"?-1:1);de(L,n.path)},onToggle:()=>h(f=>({...f,[n.path]:!u}))}),!u&&ye(`project:${n.path}`,n.sessions)]},n.path)};return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"sr-only","aria-live":"polite",children:z}),oe,Q.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-5 pb-0.5 pt-2 font-mono text-[9px] uppercase tracking-[0.16em] text-[hsl(var(--deck-ink-faint))]",children:T("sidebar.project.projects")}),Q.map(we)]})]})}function us({className:t,onNavigate:a}){const r=se(),{toggleSettings:c,toggleSidebar:o,isSidebarOpen:l,isTerminalOpen:C,toggleTerminal:b,sidebarView:v,setSidebarView:m,setTaskSwitcherOpen:g,mainView:P,setMainView:R,setBoardProjectPath:j,setFilePreviewOpen:T}=Pt(),B=d(s=>s.sessions),h=d(s=>s.surfaceCatalog),E=d(s=>s.surfaceCatalogLoadState),M=d(s=>s.historySurfaceSelection),_=at(M),Y=d(s=>s.currentSessionRef),A=d(s=>s.forkingSessionRef),U=d(s=>s.selectSession),y=d(s=>s.openHistorySurface),F=d(s=>s.startTemporarySession),z=d(s=>s.deleteSession),ae=d(s=>s.archiveSession),q=d(s=>s.forkSession),S=d(s=>s.updateSession),H=d(s=>s.loadSessions),ie=d(s=>s.loadSurfaceCatalog),Te=d(s=>s.setError),ne=d(s=>s.taskEventsConnected),Q=d(s=>s.taskWorkspaceInfo),V=d(s=>s.boundProjects),Ce=d(s=>s.selectedProjectPath),X=d(s=>s.bindProject),ce=d(s=>s.selectProject),ge=d(s=>s.cancelTask),je=d(s=>s.cancellingTaskKeys),fe=d(s=>s.retryTask),ye=d(s=>s.retryingTaskKeys),W=d(s=>s.unreadTaskKeys),[oe,le]=D.useState(null),[me,de]=D.useState(""),[we,n]=D.useState(null),[k,x]=D.useState(!1),I=Ce??(Q==null?void 0:Q.cwd)??null,i=s=>Se(s,r),p=s=>{const N=s.taskSourceProjectPath||s.projectPath,J=N.split("/").filter(Boolean).at(-1)||N,he=s.taskIsolation==="worktree"?s.taskWorktreeBranch||r("session.env.worktree"):r("session.env.local"),Ee=s.taskDiffStat?`+${s.taskDiffStat.additions} −${s.taskDiffStat.deletions}`:void 0,Ae=s.taskStatus==="queued"&&s.taskQueuePosition?r("session.queued",{position:s.taskQueuePosition,depth:s.taskQueueDepth??s.taskQueuePosition}):void 0,De=Dt(s,r);return{project:J,environment:he,diff:Ee,queue:Ae,reason:De}},u=()=>{R("workspace"),F(I??void 0),a==null||a()},f=()=>{d.getState().closeHistorySurface(),T(!1),j(I),R("board"),a==null||a()},L=async s=>{V.some(N=>N.path===s)?ce(s):await X(s),R("workspace"),F(s),a==null||a()},re=async s=>{V.some(N=>N.path===s)?ce(s):await X(s),R("workspace"),F(s),a==null||a()},Z=s=>{s(),a==null||a()},O=()=>{G(d.getState())||Z(b)},ee=async(s,N)=>{s.stopPropagation(),!G(d.getState())&&await z(K(N))},ke=async s=>{if(G(d.getState()))return;const N=K(s),J=$(N);if(!we){n(J);try{await lt(N)}catch(he){Te(he instanceof Error?he.message:"Session export failed")}finally{n(null)}}},xt=(s,N)=>{s.stopPropagation(),!G(d.getState())&&(le($(K(N))),de(i(N)))},pt=async s=>{if(!G(d.getState())){if(!me.trim()){le(null);return}try{await S(K(s),me.trim()),le(null),await H()}catch(N){console.error("Failed to rename session:",N)}}},ft=()=>{le(null),de("")};return l?e.jsxs("div",{className:w("flex flex-col h-screen border-r w-[260px] border-[hsl(var(--deck-hairline))] bg-[hsl(var(--deck-canvas-veil))]",t),children:[e.jsxs("div",{className:"flex flex-col gap-6 px-5 pt-5 pb-5",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(Ye,{size:26}),e.jsx("span",{className:"font-mono text-[15px] font-semibold tracking-[-0.01em] text-[hsl(var(--deck-ink))]",children:"Blade"}),e.jsx("span",{className:"ml-1 rounded-sm border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] px-1 py-[1px] font-mono text-[9px] text-[hsl(var(--deck-ink-faint))]",children:r("sidebar.brand.badge")})]}),e.jsx("button",{onClick:o,"aria-label":r("sidebar.action.collapse"),className:"flex h-8 w-8 items-center justify-center rounded transition-colors hover:bg-[hsl(var(--deck-surface))]",children:e.jsx(_t,{className:"h-3 w-3 text-[hsl(var(--deck-ink-muted))]"})})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("button",{onClick:u,className:"flex h-9 w-full items-center justify-between rounded-md bg-[hsl(var(--deck-ink))] px-3 font-mono text-[13px] font-medium text-[hsl(var(--deck-canvas))] transition-colors hover:bg-[hsl(var(--deck-ink))]/88",children:[e.jsxs("span",{className:"flex gap-2 items-center",children:[e.jsx(Oe,{className:"h-3.5 w-3.5 stroke-[2.5]"}),r("sidebar.action.newTask")]}),e.jsx("span",{className:"rounded-sm bg-white/10 px-1.5 py-[1px] font-mono text-[10px] text-white/80",children:Re("newTask")})]}),e.jsxs("button",{type:"button",onClick:f,"aria-current":P==="board"?"page":void 0,className:w("flex h-9 w-full items-center gap-2 rounded-md border px-3 font-mono text-[12.5px] transition-colors",P==="board"?"border-[hsl(var(--deck-accent)/0.45)] bg-[hsl(var(--deck-accent-soft))] text-[hsl(var(--deck-accent))]":"border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] text-[hsl(var(--deck-ink-muted))] hover:border-[hsl(var(--deck-border-strong))] hover:text-[hsl(var(--deck-ink))]"),children:[e.jsx(ot,{className:"h-3.5 w-3.5"}),r("sidebar.action.taskBoard")]}),e.jsxs("button",{onClick:O,disabled:_,className:w("flex h-9 w-full items-center gap-2 rounded-md border px-3 font-mono text-[12.5px] transition-colors",C?"border-[hsl(var(--deck-accent)/0.55)] bg-[hsl(var(--deck-accent-soft))] text-[hsl(var(--deck-accent))]":"border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] text-[hsl(var(--deck-ink-muted))] hover:border-[hsl(var(--deck-border-strong))] hover:text-[hsl(var(--deck-ink))]"),children:[e.jsx(ct,{className:"h-3.5 w-3.5"}),r("sidebar.action.terminal")]}),!_&&e.jsxs("button",{type:"button",onClick:()=>Z(()=>g(!0)),className:"flex h-9 w-full items-center justify-between rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] px-3 font-mono text-[12.5px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:border-[hsl(var(--deck-border-strong))] hover:text-[hsl(var(--deck-ink))]",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(We,{className:"h-3.5 w-3.5"}),r("sidebar.action.searchTasks")]}),e.jsx("span",{className:"rounded-sm border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-canvas))] px-1.5 py-[1px] font-mono text-[9px] text-[hsl(var(--deck-ink-faint))]",children:W.length>0?W.length:Re("searchTasks")})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"flex flex-1 items-center gap-0.5 rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] p-0.5",children:["project","status"].map(s=>e.jsx("button",{type:"button",onClick:()=>m(s),"aria-pressed":v===s,"aria-label":r(s==="project"?"sidebar.view.projectAria":"sidebar.view.statusAria"),className:w("flex-1 rounded-[5px] py-1 font-mono text-[11px] tracking-[0.02em] transition-colors",v===s?"bg-[hsl(var(--deck-canvas))] text-[hsl(var(--deck-ink))] shadow-sm":"text-[hsl(var(--deck-ink-faint))] hover:text-[hsl(var(--deck-ink-muted))]"),children:r(s==="project"?"sidebar.view.project":"sidebar.view.status")},s))}),e.jsx("button",{type:"button",onClick:()=>x(!0),disabled:_,title:r("projects.bind.action"),"aria-label":r("projects.bind.action"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] text-[hsl(var(--deck-ink-faint))] transition-colors hover:border-[hsl(var(--deck-border-strong))] hover:text-[hsl(var(--deck-accent))]",children:e.jsx(Tt,{className:"h-3.5 w-3.5"})})]})]}),e.jsx(ze,{className:"flex-1 px-0",children:e.jsxs("div",{className:"flex flex-col",children:[(B.length>0||h.length>0||V.length>0||E==="loading"||E==="hydrating"||E==="error")&&e.jsx(Zt,{view:v,sessions:B,surfaceCatalog:h,activeProjectPath:I,boundProjects:V,currentSessionRef:Y,historySurfaceSelection:M,unreadTaskKeys:W,catalogLoadState:E,onRetryCatalog:()=>{ie()},onSelectProject:s=>void L(s).catch(()=>{}),onCreateTask:s=>void re(s).catch(()=>{}),renderLocalRow:s=>{const N=K(s),J=$(N),he=be(N,Y),Ee=oe===J,Ae=be(N,A),De=!!A;return e.jsx(Gt,{session:s,sessionRef:N,isActive:he,isForking:Ae,isUnread:W.includes($(N)),anyForking:De,isEditing:Ee,editingTitle:me,title:i(s),context:p(s),isCancelling:je.includes($(N)),isRetrying:ye.includes($(N)),isExporting:we===J,onSelect:()=>(a==null||a(),R("workspace"),U(N)),onCancelTask:()=>{G(d.getState())||ge(N).catch(()=>{})},onRetryTask:()=>{G(d.getState())||fe(N).catch(()=>{})},onFork:()=>{G(d.getState())||q(s)},onArchive:()=>{G(d.getState())||ae(N)},onExport:()=>void ke(s),onStartRename:Pe=>xt(Pe,s),onDelete:Pe=>ee(Pe,s),onEditingTitleChange:de,onSaveRename:()=>pt(s),onCancelRename:ft},J)},renderRemoteRow:s=>e.jsx(Ft,{summary:s,isActive:st(s.locator,M==null?void 0:M.locator),onSelect:()=>(a==null||a(),R("workspace"),y(s.locator))},Ct(s.locator))}),h.length===0&&B.length===0&&e.jsx("div",{className:"px-5 mt-6",children:e.jsxs("div",{className:"rounded-md border border-dashed border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))]/60 px-4 py-6 text-center",children:[e.jsx("div",{className:"mx-auto mb-2 inline-flex h-8 w-8 items-center justify-center rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-canvas))]",children:e.jsx(Et,{className:"h-3.5 w-3.5 text-[hsl(var(--deck-ink-faint))]"})}),e.jsx("div",{className:"font-mono text-[12px] text-[hsl(var(--deck-ink-muted))]",children:r("sidebar.empty.title")}),e.jsx("div",{className:"mt-1 text-[10.5px] text-[hsl(var(--deck-ink-faint))]",children:r("sidebar.empty.hint")})]})})]})}),e.jsxs("div",{className:"flex flex-col gap-3 px-5 pt-3 pb-5",children:[e.jsxs("div",{className:"flex flex-col gap-0.5 border-t border-[hsl(var(--deck-hairline))] pt-3",children:[!_&&e.jsx(Ut,{}),[{icon:it,action:()=>Z(c),labelKey:"sidebar.section.settings"}].map(({icon:s,action:N,labelKey:J})=>e.jsxs("button",{"data-settings-trigger":!0,onClick:N,className:"flex h-8 w-full items-center gap-2.5 rounded-md px-2.5 font-mono text-[12.5px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]",children:[e.jsx(s,{className:"h-3.5 w-3.5 text-[hsl(var(--deck-ink-faint))]"}),r(J)]},J))]}),e.jsxs("div",{className:"flex gap-2 justify-between items-center",children:[e.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.14em] text-[hsl(var(--deck-ink-faint))]",children:r("sidebar.language.label")}),e.jsx(dt,{})]}),e.jsxs("div",{className:"flex items-center gap-2.5 rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] px-3 py-2",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-md bg-[hsl(var(--deck-canvas-veil))]",children:e.jsx("div",{className:"h-2 w-2 rounded-full bg-[hsl(var(--deck-ink))]"})}),e.jsxs("div",{className:"flex flex-1 flex-col gap-[1px]",children:[e.jsx("span",{className:"font-mono text-[12px] text-[hsl(var(--deck-ink))]",children:r("sidebar.status.user")}),e.jsxs("span",{className:w("flex gap-1 items-center font-mono text-[10px]",ne?"text-[hsl(var(--deck-accent))]":"text-[hsl(var(--deck-ink-faint))]"),children:[e.jsx("span",{className:w("h-1 w-1 rounded-full",ne?"bg-[hsl(var(--deck-accent))] shadow-[0_0_5px_hsl(var(--deck-accent-glow)/0.9)]":"bg-[hsl(var(--deck-ink-faint))]/60")}),r(ne?"sidebar.status.feedLive":"sidebar.status.feedOffline")]})]})]})]}),!_&&e.jsx(At,{open:k,onOpenChange:x})]}):e.jsx(Kt,{className:t,onExpand:o,onNewChat:u,onOpenBoard:f,onOpenTaskSwitcher:()=>Z(()=>g(!0)),onToggleTerminal:O,onToggleSettings:()=>Z(c),isTerminalOpen:C,taskEventsConnected:ne,unreadCount:W.length,boardActive:P==="board",terminalDisabled:_,taskSwitcherDisabled:_})}export{us as Sidebar};
31
+ */const Lt=pe("MoreHorizontal",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);async function lt(t,a=!1){const r=await mt.exportSessionMarkdown(t,a),c=new Blob([r.markdown],{type:"text/markdown;charset=utf-8"}),o=URL.createObjectURL(c),l=document.createElement("a");l.href=o,l.download=r.filename,l.hidden=!0,document.body.appendChild(l);try{l.click()}finally{l.remove(),await new Promise(C=>{window.setTimeout(()=>{URL.revokeObjectURL(o),C()},0)})}return r}function Ut(){const t=se(),a=d(h=>h.archivedSessions),r=d(h=>h.archivedCatalogLoadState),c=d(h=>h.archivedCatalogError),o=d(h=>h.loadArchivedSessions),l=d(h=>h.unarchiveSession),C=d(h=>h.setError),b=d(h=>at(h.historySurfaceSelection)),[v,m]=D.useState(!1),[g,P]=D.useState(null),[R,j]=D.useState(null),T=h=>{h&&G(d.getState())||(m(h),h&&o())},B=()=>{G(d.getState())||o()};return b?null:e.jsxs(He,{open:v,onOpenChange:T,children:[e.jsx(Qe,{asChild:!0,children:e.jsxs("button",{type:"button",className:"flex h-8 w-full items-center justify-between rounded-md px-2.5 font-mono text-[12.5px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]","aria-label":t("archive.open"),children:[e.jsxs("span",{className:"flex items-center gap-2.5",children:[e.jsx(nt,{className:"h-3.5 w-3.5 text-[hsl(var(--deck-ink-faint))]"}),t("archive.title")]}),a.length>0&&e.jsx("span",{className:"rounded-sm bg-[hsl(var(--deck-surface))] px-1.5 py-0.5 text-[9px] text-[hsl(var(--deck-ink-faint))]",children:a.length})]})}),e.jsxs(Ve,{role:"dialog","aria-label":t("archive.title"),side:"right",align:"end",sideOffset:8,className:"w-[340px] overflow-hidden p-0",children:[e.jsxs("div",{className:"flex h-10 items-center justify-between border-b border-[hsl(var(--deck-hairline))] px-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-mono text-[11px] font-medium uppercase tracking-[0.08em] text-[hsl(var(--deck-ink))]",children:t("archive.title")}),e.jsx("div",{className:"text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:t("archive.subtitle")})]}),e.jsx("button",{type:"button",onClick:B,"aria-label":t("archive.refresh"),className:"flex h-6 w-6 items-center justify-center rounded text-[hsl(var(--deck-ink-faint))] hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]",children:e.jsx(Xe,{className:w("h-3 w-3",(r==="loading"||r==="hydrating")&&"animate-spin")})})]}),c?e.jsxs("div",{className:"px-3 py-4 text-[11px] text-red-600 dark:text-red-400",children:[e.jsx("div",{children:c}),e.jsx("button",{type:"button",onClick:B,className:"mt-2 font-mono text-[10px] text-[hsl(var(--deck-accent))] focus-visible:outline-none focus-visible:underline",children:t("archive.retry")})]}):a.length===0&&(r==="loading"||r==="hydrating")?e.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 font-mono text-[10px] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx(te,{className:"h-3 w-3 animate-spin"}),t("archive.loading")]}):a.length===0?e.jsx("div",{className:"flex h-24 items-center justify-center px-6 text-center text-[10.5px] text-[hsl(var(--deck-ink-faint))]",children:t("archive.empty")}):e.jsx(ze,{className:"max-h-[340px]",children:e.jsx("div",{className:"divide-y divide-[hsl(var(--deck-hairline))]",children:a.map(h=>{var A;const E=K(h),M=$(E),_=g===M,Y=h.projectPath.split("/").filter(Boolean).at(-1)??h.projectPath;return e.jsxs("div",{className:"flex min-h-[58px] items-center gap-2 px-3 py-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"truncate font-mono text-[11.5px] text-[hsl(var(--deck-ink))]",children:Se(h,t)}),e.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5 truncate font-mono text-[9px] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx("span",{className:"truncate",children:Y}),h.archivedAt&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":!0,children:"·"}),e.jsx("span",{children:new Date(h.archivedAt).toLocaleString()})]})]}),h.archivedBySessionId!==h.sessionId&&e.jsx("div",{className:"mt-0.5 truncate text-[9px] text-[hsl(var(--deck-accent))]",children:t("archive.inherited",{id:((A=h.archivedBySessionId)==null?void 0:A.slice(0,8))??""})})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[e.jsx("button",{type:"button",disabled:R!==null,onClick:async()=>{if(!G(d.getState())){j(M);try{await lt(E)}catch(U){C(U instanceof Error?U.message:"Session export failed")}finally{j(null)}}},"aria-label":t("session.action.export",{title:Se(h,t)}),title:t("session.action.exportShort"),className:"flex h-7 w-7 items-center justify-center rounded text-[hsl(var(--deck-ink-faint))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] disabled:cursor-wait disabled:opacity-35",children:R===M?e.jsx(te,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(rt,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",disabled:_||h.archivedBySessionId!==h.sessionId,onClick:async()=>{if(!G(d.getState())){P(M);try{await l(E)}finally{P(null)}}},"aria-label":t("archive.restore",{title:Se(h,t)}),title:h.archivedBySessionId!==h.sessionId?t("archive.restoreAncestor"):t("archive.restoreShort"),className:"flex h-7 w-7 items-center justify-center rounded text-[hsl(var(--deck-accent))] transition-colors hover:bg-[hsl(var(--deck-accent-soft))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] disabled:cursor-not-allowed disabled:opacity-35",children:_?e.jsx(te,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Ot,{className:"h-3.5 w-3.5"})})]})]},M)})})})]})]})}const Me={en:"sidebar.language.en",zh:"sidebar.language.zh"};function dt({className:t,variant:a="pill"}){const{locale:r,setLocale:c}=kt(),o=se();if(a==="compact"){const l=r==="en"?"zh":"en";return e.jsx("button",{type:"button",onClick:()=>c(l),"aria-label":o("sidebar.language.aria"),title:o("sidebar.language.label"),className:w("flex justify-center items-center w-10 h-10 font-mono font-medium rounded-md transition-colors text-[11px] text-[hsl(var(--deck-ink-faint))] hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]",t),children:o(Me[r])})}return e.jsx("div",{role:"group","aria-label":o("sidebar.language.aria"),className:w("inline-flex h-8 items-center rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] p-[2px] font-mono text-[11px]",t),children:bt.map(l=>{const C=l===r;return e.jsx("button",{type:"button",onClick:()=>c(l),"aria-pressed":C,className:w("flex justify-center items-center px-2 h-full transition-colors min-w-[28px] rounded-[4px]",C?"bg-[hsl(var(--deck-ink))] text-[hsl(var(--deck-canvas))]":"text-[hsl(var(--deck-ink-muted))] hover:text-[hsl(var(--deck-ink))]"),children:o(Me[l])},l)})})}function Ft({summary:t,isActive:a,onSelect:r}){const c=se(),o=t.title??t.locator.sessionId,l=c(t.capabilities.connection==="offline"?"history.connection.offline":t.capabilities.connection==="local"?"history.connection.local":"history.connection.online");return e.jsxs("div",{className:w("flex relative items-center w-full transition-colors min-h-[54px]",a?"bg-[hsl(var(--deck-surface))]":"hover:bg-[hsl(var(--deck-surface))]/60"),children:[a&&e.jsx("span",{className:"absolute left-0 top-1/2 h-6 w-[2px] -translate-y-1/2 rounded-r bg-[hsl(var(--deck-accent))]"}),e.jsxs("button",{type:"button","aria-label":c("session.action.select",{title:o}),"aria-current":a?"true":void 0,onClick:r,className:"flex min-h-[54px] min-w-0 flex-1 cursor-pointer items-center gap-2 py-1.5 pl-4 pr-2 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-[hsl(var(--deck-accent))]",children:[e.jsx("span",{className:w("h-1.5 w-1.5 shrink-0 rounded-full",t.capabilities.connection==="offline"?"bg-amber-500":"bg-blue-500 shadow-[0_0_5px_rgba(59,130,246,0.7)]"),title:l}),e.jsxs("span",{className:"flex-1 min-w-0 font-mono",children:[e.jsxs("span",{className:w("flex gap-2 items-center text-left truncate text-[12px]",a?"text-[hsl(var(--deck-ink))]":"text-[hsl(var(--deck-ink-muted))]"),children:[e.jsx("span",{className:"truncate",children:o}),e.jsx("span",{className:"inline-flex shrink-0 items-center rounded border border-[hsl(var(--deck-border))] px-1.5 py-0.5 text-[8.5px] text-[hsl(var(--deck-ink-faint))]",children:c("history.badge.remote")}),e.jsx("span",{className:"inline-flex shrink-0 items-center rounded border border-[hsl(var(--deck-border))] px-1.5 py-0.5 text-[8.5px] text-[hsl(var(--deck-ink-faint))]",children:l}),e.jsx("span",{className:"inline-flex shrink-0 items-center rounded bg-[hsl(var(--deck-accent-soft))] px-1.5 py-0.5 text-[8.5px] text-[hsl(var(--deck-accent))]",children:c("history.badge.historyOnly")})]}),e.jsx("span",{className:"mt-0.5 block truncate text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:t.displayCwd})]})]})]})}const qt={running:"bg-blue-500 dark:bg-blue-400 shadow-[0_0_5px_rgba(59,130,246,0.7)] animate-pulse",queued:"bg-amber-400 dark:bg-amber-300",interrupted:"bg-orange-500 dark:bg-orange-400",failed:"bg-red-500 dark:bg-red-400",cancelled:"bg-zinc-400 dark:bg-zinc-500",completed:"bg-[hsl(var(--deck-accent))]"};function Gt({session:t,isActive:a,isForking:r,isUnread:c,anyForking:o,isEditing:l,editingTitle:C,title:b,context:v,isCancelling:m,isRetrying:g,isExporting:P,onSelect:R,onCancelTask:j,onRetryTask:T,onFork:B,onArchive:h,onExport:E,onStartRename:M,onDelete:_,onEditingTitleChange:Y,onSaveRename:A,onCancelRename:U}){const y=se(),[F,z]=D.useState(!1),ae=D.useRef(null),q=D.useRef(null);return l?e.jsxs("div",{className:"flex h-9 w-full items-center gap-2 bg-[hsl(var(--deck-surface))] px-3",children:[e.jsx("input",{type:"text",value:C,onChange:S=>Y(S.target.value),onKeyDown:S=>{S.key==="Enter"&&A(),S.key==="Escape"&&U()},autoFocus:!0,className:"flex-1 rounded bg-[hsl(var(--deck-canvas))] px-2 py-1 font-mono text-[13px] text-[hsl(var(--deck-ink))] outline-none focus:ring-1 focus:ring-[hsl(var(--deck-accent))]"}),e.jsx("button",{"aria-label":y("session.action.save",{title:b}),onClick:A,className:"flex h-6 w-6 items-center justify-center rounded text-[hsl(var(--deck-accent))] hover:bg-[hsl(var(--deck-canvas))]",children:e.jsx(vt,{className:"w-3 h-3"})}),e.jsx("button",{"aria-label":y("session.action.cancel",{title:b}),onClick:U,className:"flex h-6 w-6 items-center justify-center rounded text-[hsl(var(--deck-ink-faint))] hover:bg-[hsl(var(--deck-canvas))]",children:e.jsx(gt,{className:"w-3 h-3"})})]}):e.jsxs("div",{className:w("flex relative items-center w-full transition-colors group min-h-[54px]",a?"bg-[hsl(var(--deck-surface))]":"hover:bg-[hsl(var(--deck-surface))]/60"),children:[a&&e.jsx("span",{className:"absolute left-0 top-1/2 h-6 w-[2px] -translate-y-1/2 rounded-r bg-[hsl(var(--deck-accent))]"}),e.jsxs("button",{type:"button","aria-label":y("session.action.select",{title:b}),"aria-current":a?"true":void 0,"aria-busy":r?"true":void 0,onClick:R,className:"flex min-h-[54px] min-w-0 flex-1 cursor-pointer items-center gap-2 py-1.5 pl-4 pr-2 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-[hsl(var(--deck-accent))]",children:[e.jsx("span",{className:w("h-1.5 w-1.5 shrink-0 rounded-full",t.pendingInteraction?"animate-pulse bg-amber-500 shadow-[0_0_5px_rgba(245,158,11,0.75)]":qt[t.taskStatus]),title:t.pendingInteraction?y(t.pendingInteraction.type==="question"?"interaction.badge.question":t.pendingInteraction.type==="elicitation"?"interaction.badge.elicitation":"interaction.badge.permission"):t.taskStatus}),e.jsxs("span",{className:"flex-1 min-w-0 font-mono",children:[e.jsxs("span",{className:w("flex gap-2 items-center text-left truncate text-[12px]",a?"text-[hsl(var(--deck-ink))]":"text-[hsl(var(--deck-ink-muted))]"),children:[e.jsx("span",{className:"truncate",children:b}),c&&e.jsx("span",{title:y("taskSwitcher.new"),className:"h-1.5 w-1.5 shrink-0 rounded-full bg-[hsl(var(--deck-accent))] shadow-[0_0_5px_hsl(var(--deck-accent-glow)/0.75)]"}),t.pendingInteraction&&e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-amber-100 px-1.5 py-0.5 text-[8.5px] text-amber-800 dark:bg-amber-950/60 dark:text-amber-300",title:y(t.pendingInteraction.type==="question"?"interaction.badge.question":t.pendingInteraction.type==="elicitation"?"interaction.badge.elicitation":"interaction.badge.permission"),children:[e.jsx(Je,{className:"h-2.5 w-2.5"}),y(t.pendingInteraction.type==="question"?"interaction.badge.question":t.pendingInteraction.type==="elicitation"?"interaction.badge.elicitation":"interaction.badge.permission")]}),t.relationType==="fork"&&t.parentId&&e.jsxs("span",{title:`${y("session.forkedFrom")} ${t.parentId.slice(0,6)}`,"aria-label":`${y("session.forkedFrom")} ${t.parentId.slice(0,6)}`,className:"shrink-0 text-[9px] text-[hsl(var(--deck-accent))]",children:[y("session.forkedFrom")," ",t.parentId.slice(0,6)]}),t.taskRetriedFrom&&e.jsx("span",{title:`${y("session.retriedFrom")} ${t.taskRetriedFrom.sessionId.slice(0,6)}`,className:"shrink-0 text-[9px] text-[hsl(var(--deck-accent))]",children:y("session.retryShort")})]}),e.jsxs("span",{className:"mt-0.5 flex min-w-0 items-center gap-1.5 truncate text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx("span",{className:"truncate",children:v.project}),e.jsx("span",{className:"opacity-50",children:"·"}),e.jsx("span",{className:"truncate",children:v.environment}),v.queue&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"opacity-50",children:"·"}),e.jsx("span",{className:"text-amber-700 truncate dark:text-amber-400",children:v.queue})]}),v.diff&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"opacity-50",children:"·"}),e.jsx("span",{className:"truncate text-[hsl(var(--deck-accent))]",children:v.diff})]})]}),v.reason&&e.jsx("span",{title:v.reason,className:"mt-0.5 block truncate text-[9.5px] text-red-600 dark:text-red-400",children:v.reason})]}),r&&e.jsx(te,{className:"h-3 w-3 shrink-0 animate-spin text-[hsl(var(--deck-accent))]"})]}),e.jsxs("div",{className:w("flex items-center gap-0.5 pr-2 transition-opacity group-focus-within:opacity-100",t.taskStatus==="running"||t.taskStatus==="queued"||t.taskRetryAvailable&&(t.taskStatus==="failed"||t.taskStatus==="interrupted"||t.taskStatus==="cancelled")?"opacity-100":"opacity-50 group-hover:opacity-100"),children:[(t.taskStatus==="running"||t.taskStatus==="queued")&&e.jsx("button",{type:"button","aria-label":y(m?"session.action.stopping":"session.action.stop",{title:b}),disabled:m,onClick:S=>{S.stopPropagation(),j()},className:"flex h-6 w-6 items-center justify-center rounded text-red-500 transition-colors hover:bg-red-500/10 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-red-500 disabled:cursor-wait disabled:opacity-60",children:m?e.jsx(te,{className:"h-3 w-3 animate-spin"}):e.jsx(jt,{className:"h-3 w-3"})}),t.taskRetryAvailable&&(t.taskStatus==="failed"||t.taskStatus==="interrupted"||t.taskStatus==="cancelled")&&e.jsx("button",{ref:ae,type:"button","aria-label":y(g?"session.action.retrying":"session.action.retry",{title:b}),disabled:g,onClick:S=>{S.stopPropagation(),T()},className:"flex h-6 w-6 items-center justify-center rounded text-[hsl(var(--deck-accent))] transition-colors hover:bg-[hsl(var(--deck-accent-soft))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] disabled:cursor-wait disabled:opacity-60",children:g?e.jsx(te,{className:"h-3 w-3 animate-spin"}):e.jsx(yt,{className:"h-3 w-3"})}),e.jsxs(He,{open:F,onOpenChange:z,children:[e.jsx(Qe,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":y("session.action.more",{title:b}),"aria-expanded":F,className:"flex h-6 w-6 items-center justify-center rounded text-[hsl(var(--deck-ink-faint))] transition-colors hover:bg-[hsl(var(--deck-canvas))] hover:text-[hsl(var(--deck-ink))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]",children:e.jsx(Lt,{className:"h-3.5 w-3.5"})})}),e.jsxs(Ve,{ref:q,role:"menu","aria-label":y("session.action.more",{title:b}),side:"right",align:"start",sideOffset:6,className:"w-40 p-1",onOpenAutoFocus:S=>{var H,ie;S.preventDefault(),(ie=(H=q.current)==null?void 0:H.querySelector('[role="menuitem"]:not([disabled])'))==null||ie.focus()},onKeyDown:S=>{S.key==="Escape"&&(S.preventDefault(),S.stopPropagation(),z(!1),window.setTimeout(()=>{var H;return(H=ae.current)==null?void 0:H.focus()},0))},children:[e.jsxs("button",{type:"button",role:"menuitem","aria-label":y("session.action.fork",{title:b}),disabled:o,onClick:S=>{S.stopPropagation(),B(),z(!1)},className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left font-mono text-[11px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:bg-[hsl(var(--deck-surface))] focus-visible:text-[hsl(var(--deck-ink))] focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-45",children:[e.jsx(Mt,{className:"h-3 w-3","aria-hidden":!0}),y("session.action.forkShort")]}),e.jsxs("button",{type:"button",role:"menuitem","aria-label":y("session.action.rename",{title:b}),onClick:S=>{M(S),z(!1)},className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left font-mono text-[11px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:bg-[hsl(var(--deck-surface))] focus-visible:text-[hsl(var(--deck-ink))] focus-visible:outline-none",children:[e.jsx(It,{className:"h-3 w-3","aria-hidden":!0}),y("session.action.renameShort")]}),e.jsxs("button",{type:"button",role:"menuitem","aria-label":y("session.action.archive",{title:b}),disabled:t.taskStatus==="running"||t.taskStatus==="queued",onClick:S=>{S.stopPropagation(),h(),z(!1)},className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left font-mono text-[11px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:bg-[hsl(var(--deck-surface))] focus-visible:text-[hsl(var(--deck-ink))] focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-35",children:[e.jsx(nt,{className:"h-3 w-3","aria-hidden":!0}),y("session.action.archiveShort")]}),e.jsxs("button",{type:"button",role:"menuitem","aria-label":y("session.action.export",{title:b}),disabled:P,onClick:S=>{S.stopPropagation(),E(),z(!1)},className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left font-mono text-[11px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))] focus-visible:bg-[hsl(var(--deck-surface))] focus-visible:text-[hsl(var(--deck-ink))] focus-visible:outline-none disabled:cursor-wait disabled:opacity-45",children:[P?e.jsx(te,{className:"h-3 w-3 animate-spin","aria-hidden":!0}):e.jsx(rt,{className:"h-3 w-3","aria-hidden":!0}),y(P?"session.action.exportingShort":"session.action.exportShort")]}),e.jsxs("button",{type:"button",role:"menuitem","aria-label":y("session.action.delete",{title:b}),onClick:S=>{_(S),z(!1)},className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left font-mono text-[11px] text-red-600 transition-colors hover:bg-red-500/10 focus-visible:bg-red-500/10 focus-visible:outline-none dark:text-red-400",children:[e.jsx(wt,{className:"h-3 w-3","aria-hidden":!0}),y("session.action.deleteShort")]})]})]})]})]})}function Kt({onExpand:t,onNewChat:a,onOpenBoard:r,onOpenTaskSwitcher:c,onToggleTerminal:o,onToggleSettings:l,isTerminalOpen:C,taskEventsConnected:b,unreadCount:v,boardActive:m,terminalDisabled:g=!1,taskSwitcherDisabled:P=!1,className:R}){const j=se(),T=[{icon:it,action:l,labelKey:"sidebar.section.settings"}];return e.jsxs("div",{className:w("flex flex-col gap-2 items-center py-5 h-screen border-r w-[64px] border-[hsl(var(--deck-hairline))] bg-[hsl(var(--deck-canvas-veil))]",R),children:[e.jsx("button",{onClick:t,className:"rounded-md p-1 transition-colors hover:bg-[hsl(var(--deck-surface))]","aria-label":j("sidebar.action.expand"),children:e.jsx(Ye,{size:28})}),e.jsx("button",{onClick:a,"aria-label":j("sidebar.action.newTaskShort"),title:j("sidebar.action.newTaskShort"),className:"mt-6 flex h-10 w-10 items-center justify-center rounded-md bg-[hsl(var(--deck-ink))] text-[hsl(var(--deck-canvas))] transition-colors hover:bg-[hsl(var(--deck-ink))]/85",children:e.jsx(_e,{className:"h-4 w-4 stroke-[2.5]"})}),e.jsx("button",{type:"button",onClick:r,"aria-label":j("sidebar.action.taskBoard"),"aria-current":m?"page":void 0,title:j("sidebar.action.taskBoard"),className:w("flex h-10 w-10 items-center justify-center rounded-md border transition-colors",m?"border-[hsl(var(--deck-accent)/0.55)] bg-[hsl(var(--deck-accent-soft))] text-[hsl(var(--deck-accent))]":"border-transparent text-[hsl(var(--deck-ink-muted))] hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]"),children:e.jsx(ot,{className:"h-4 w-4"})}),e.jsx("button",{onClick:o,disabled:g,"aria-label":j("sidebar.action.terminalToggle"),title:j("sidebar.action.terminal"),className:w("flex h-10 w-10 items-center justify-center rounded-md border transition-colors",g&&"cursor-not-allowed opacity-35",C?"border-[hsl(var(--deck-accent)/0.55)] bg-[hsl(var(--deck-accent-soft))] text-[hsl(var(--deck-accent))]":"border-transparent text-[hsl(var(--deck-ink-muted))] hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]"),children:e.jsx(ct,{className:"w-4 h-4"})}),e.jsxs("button",{onClick:c,disabled:P,"aria-label":j("sidebar.action.searchTasks"),title:`${j("sidebar.action.searchTasks")} (${Oe("searchTasks")})`,className:w("relative flex h-10 w-10 items-center justify-center rounded-md border border-transparent text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]",P&&"cursor-not-allowed opacity-35"),children:[e.jsx(We,{className:"h-4 w-4"}),v>0&&e.jsx("span",{"aria-label":j("sidebar.unreadTasks",{count:v}),className:"absolute right-0.5 top-0.5 flex min-h-4 min-w-4 items-center justify-center rounded-full bg-[hsl(var(--deck-accent))] px-1 font-mono text-[8px] font-semibold text-white",children:v>99?"99+":v})]}),e.jsx("div",{className:"flex-1"}),e.jsx("div",{className:"my-2 h-px w-6 bg-[hsl(var(--deck-hairline))]"}),T.map(({icon:B,action:h,labelKey:E})=>e.jsx("button",{"data-settings-trigger":!0,onClick:h,"aria-label":j(E),title:j(E),className:"flex h-10 w-10 items-center justify-center rounded-md text-[hsl(var(--deck-ink-faint))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]",children:e.jsx(B,{className:"w-4 h-4"})},E)),e.jsx(dt,{variant:"compact"}),e.jsx("div",{className:"mt-1",children:e.jsx("div",{role:"status","aria-label":j(b?"sidebar.status.feedLive":"sidebar.status.feedOffline"),className:w("h-2 w-2 rounded-full",b?"bg-[hsl(var(--deck-accent))] shadow-[0_0_6px_hsl(var(--deck-accent-glow)/0.9)]":"bg-[hsl(var(--deck-ink-faint))]/60"),title:j(b?"sidebar.status.feedLive":"sidebar.status.feedOffline")})})]})}const ht="blade.sidebar.project-order.v1";function ve(t){const a=new Set,r=[];for(const c of t)typeof c!="string"||!c||a.has(c)||(a.add(c),r.push(c));return r}function $t(){if(typeof window>"u")return[];try{const t=JSON.parse(window.localStorage.getItem(ht)??"[]");return Array.isArray(t)?ve(t):[]}catch{return[]}}function Be(t){if(!(typeof window>"u"))try{window.localStorage.setItem(ht,JSON.stringify(ve(t)))}catch{}}function Le(t,a){const r=new Map(ve(a).map((o,l)=>[o,l])),c=r.size;return t.map((o,l)=>({project:o,rank:r.get(o.path)??c+l})).sort((o,l)=>o.rank-l.rank).map(({project:o})=>o)}function Ue(t,a,r){const c=ve(t),o=c.indexOf(a),l=c.indexOf(r);if(o<0||l<0||o===l)return c;const[C]=c.splice(o,1);return c.splice(l,0,C),c}function Fe(t,a,r){const c=ve(t),o=c.indexOf(a),l=o+r;return o<0||l<0||l>=c.length||([c[o],c[l]]=[c[l],c[o]]),c}function qe({name:t,path:a,count:r,countIsPartial:c=!1,isActive:o,hasRunning:l,unreadCount:C,collapsed:b,onToggle:v,onSelect:m,onCreateTask:g,reorderPosition:P,reorderCount:R,isDragging:j=!1,onDragStart:T,onDragEnd:B,onReorderKeyDown:h}){const E=se();return e.jsxs("div",{className:w("group/proj flex w-full items-center gap-2 px-5 pb-1.5 pt-3 text-left transition-colors","hover:bg-[hsl(var(--deck-surface))]/40"),children:[e.jsx("button",{type:"button",draggable:!0,"data-project-drag-handle":a,onDragStart:T,onDragEnd:B,onKeyDown:h,"aria-label":E("sidebar.project.reorder",{name:t,position:P,count:R}),title:E("sidebar.project.reorderHint"),className:w("-ml-2 flex h-6 w-4 shrink-0 cursor-grab items-center justify-center rounded-sm text-[hsl(var(--deck-ink-faint))] opacity-45 transition-[opacity,color,background-color] hover:bg-[hsl(var(--deck-surface-2))] hover:text-[hsl(var(--deck-ink-muted))] hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] active:cursor-grabbing group-hover/proj:opacity-100",j&&"cursor-grabbing opacity-100 text-[hsl(var(--deck-accent))]"),children:e.jsx(Bt,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",onClick:v,"aria-expanded":!b,"aria-label":E(b?"sidebar.project.expand":"sidebar.project.collapse",{name:t}),className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]",children:e.jsx(Rt,{className:w("h-3 w-3 text-[hsl(var(--deck-ink-faint))] transition-transform duration-150",!b&&"rotate-90")})}),e.jsxs("button",{type:"button",onClick:m??v,title:a,"aria-current":o?"true":void 0,className:"flex min-h-6 min-w-0 flex-1 items-center gap-2 rounded-sm text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))]",children:[e.jsx(Nt,{className:w("h-3.5 w-3.5 shrink-0",o?"text-[hsl(var(--deck-accent))]":"text-[hsl(var(--deck-ink-faint))]")}),e.jsx("span",{className:w("flex-1 truncate font-mono text-[11.5px] font-medium tracking-[-0.01em]",o?"text-[hsl(var(--deck-ink))]":"text-[hsl(var(--deck-ink-muted))]"),children:t}),l&&e.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-blue-500 shadow-[0_0_5px_rgba(59,130,246,0.7)] animate-pulse dark:bg-blue-400","aria-hidden":!0}),C>0&&e.jsx("span",{"aria-label":E("sidebar.unreadTasks",{count:C}),className:"shrink-0 rounded-full bg-[hsl(var(--deck-accent))] px-1.5 py-0.5 font-mono text-[8px] font-semibold text-white",children:C}),e.jsxs("span",{className:"shrink-0 font-mono text-[10px] text-[hsl(var(--deck-ink-faint))]",children:[r.toString().padStart(2,"0"),c?"+":""]})]}),g&&e.jsx("button",{type:"button",onClick:g,title:E("sidebar.project.newTask",{name:t}),"aria-label":E("sidebar.project.newTask",{name:t}),className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-sm text-[hsl(var(--deck-ink-faint))] opacity-0 transition-[opacity,color,background-color] hover:bg-[hsl(var(--deck-surface-2))] hover:text-[hsl(var(--deck-accent))] focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[hsl(var(--deck-accent))] group-hover/proj:opacity-100",children:e.jsx(_e,{className:"h-3.5 w-3.5"})})]})}const zt=["running","queued","interrupted","failed","cancelled","completed"],Ht={running:"RUNNING",queued:"QUEUED",interrupted:"INTERRUPTED",failed:"FAILED",cancelled:"CANCELLED",completed:"DONE"},ue=t=>t.length>1?t.replace(/\/+$/,""):t;function ut(t){const a=new Map;for(const r of t){if(!r)continue;const c=$(K(r));a.has(c)||a.set(c,r)}return Array.from(a.values())}function Qt(t){const a=ut(t),r=[];for(const c of zt){const o=a.filter(l=>l.taskStatus===c).sort(Ze);o.length>0&&r.push({code:Ht[c],status:c,sessions:o})}return r}function Vt(t,a,r=[]){const c=ut(t),o=new Map,l=r.map(ue),C=new Map(l.map((m,g)=>[m,g]));for(const m of l)o.set(m,[]);for(const m of c){const g=et(m,a),P=o.get(g);P?P.push(m):o.set(g,[m])}const b=a?ue(a):null,v=Array.from(o.entries()).map(([m,g])=>{const P=[...g].sort(Ze),R=g.reduce((j,T)=>Math.max(j,St(T)),0);return{path:m,name:tt(m),isActive:b?ue(m)===b:!1,isBound:C.has(ue(m)),hasRunning:g.some(j=>j.taskStatus==="running"),lastActivity:R,sessions:P}});return v.sort((m,g)=>m.isBound!==g.isBound?m.isBound?-1:1:m.isBound&&g.isBound?(C.get(ue(m.path))??Number.MAX_SAFE_INTEGER)-(C.get(ue(g.path))??Number.MAX_SAFE_INTEGER):g.lastActivity-m.lastActivity),v}const Ne=12,Xt=["running","queued","interrupted","failed","cancelled","completed"],Ge={RUNNING:"sidebar.group.running",QUEUED:"sidebar.group.queued",INTERRUPTED:"sidebar.group.interrupted",FAILED:"sidebar.group.failed",CANCELLED:"sidebar.group.cancelled",DONE:"sidebar.group.done"},Ke={RUNNING:"text-blue-700 dark:text-blue-400",QUEUED:"text-amber-700 dark:text-amber-400",INTERRUPTED:"text-orange-700 dark:text-orange-400",FAILED:"text-red-700 dark:text-red-400",CANCELLED:"text-[hsl(var(--deck-ink-faint))]",DONE:"text-[hsl(var(--deck-accent))]"},Jt={running:"RUNNING",queued:"QUEUED",interrupted:"INTERRUPTED",failed:"FAILED",cancelled:"CANCELLED",completed:"DONE"};function xe(t){return t.length>1?t.replace(/\/+$/,""):t}function Te(t){const a=t.lastMessageTime||t.firstMessageTime;if(!a)return 0;const r=new Date(a).getTime();return Number.isNaN(r)?0:r}function Yt(t,a){if(t.locator.workspace.kind!=="local")throw new Error("Expected a local Session surface summary");return a&&Te(a)>=Te(t)?a:{...a??{sessionId:t.locator.sessionId,projectPath:t.locator.workspace.projectPath,rootId:t.rootId,taskStatus:t.taskStatus,messageCount:t.messageCount,firstMessageTime:t.firstMessageTime,lastMessageTime:t.lastMessageTime,hasErrors:t.hasErrors},sessionId:t.locator.sessionId,projectPath:t.locator.workspace.projectPath,title:t.title,rootId:t.rootId,parentId:t.parentId,relationType:t.relationType,taskStatus:t.taskStatus,messageCount:t.messageCount,firstMessageTime:t.firstMessageTime,lastMessageTime:t.lastMessageTime,hasErrors:t.hasErrors,archivedAt:t.archivedAt,selectedModelId:t.selectedModelId}}function $e(t){return t.kind==="local"?t.session.taskStatus:t.summary.taskStatus}function Wt(t,a){return a.activityTime-t.activityTime}function Re(t){return[...t].sort(Wt)}function Zt({view:t,sessions:a,surfaceCatalog:r,activeProjectPath:c,boundProjects:o,currentSessionRef:l,historySurfaceSelection:C,unreadTaskKeys:b,catalogLoadState:v,onSelectProject:m,onCreateTask:g,onRetryCatalog:P,renderLocalRow:R,renderRemoteRow:j}){const T=se(),[B,h]=D.useState({}),[E,M]=D.useState({}),[_,Y]=D.useState($t),[A,U]=D.useState(null),[y,F]=D.useState(null),[z,ae]=D.useState(""),q=v==="ready"||r.length>0,S=v==="loading"||v==="hydrating",H=S||v==="error",ie=q?r.length:a.length,Ce=D.useMemo(()=>t==="status"?Qt(a):[],[a,t]),ne=D.useMemo(()=>t==="project"?Vt(a,c,o.map(n=>n.path)):[],[c,o,a,t]),Q=D.useMemo(()=>Le(ne,_),[ne,_]),V=D.useMemo(()=>{if(!q)return[];const n=new Map(a.map(p=>[$(K(p)),p])),k=[];for(const p of r){if(p.locator.workspace.kind==="local"){const I={sessionId:p.locator.sessionId,projectPath:p.locator.workspace.projectPath},i=n.get($(I)),u=Yt(p,i);k.push({kind:"local",path:i?et(u,c):p.locator.workspace.projectPath,activityTime:Te(u),session:u});continue}k.push({kind:"remote",activityTime:Te(p),summary:p})}return k},[c,a,r,q]),Ee=D.useMemo(()=>!q||t!=="status"?[]:Xt.flatMap(n=>{const k=Re(V.filter(p=>$e(p)===n));return k.length===0?[]:[{code:Jt[n],entries:k}]}),[V,q,t]),X=D.useMemo(()=>{if(!q||t!=="project")return[];const n=o.map(u=>xe(u.path)),k=new Map(n.map((u,x)=>[u,x])),p=new Map;for(const u of n)p.set(u,[]);for(const u of V){if(u.kind!=="local")continue;const x=p.get(u.path);x?x.push(u):p.set(u.path,[u])}const I=c?xe(c):null,i=Array.from(p.entries()).map(([u,x])=>({path:u,name:tt(u),isActive:I?xe(u)===I:!1,isBound:k.has(xe(u)),hasRunning:x.some(f=>$e(f)==="running"),lastActivity:x.reduce((f,L)=>Math.max(f,L.activityTime),0),entries:Re(x)}));return i.sort((u,x)=>u.isBound!==x.isBound?u.isBound?-1:1:u.isBound&&x.isBound?(k.get(xe(u.path))??Number.MAX_SAFE_INTEGER)-(k.get(xe(x.path))??Number.MAX_SAFE_INTEGER):x.lastActivity-u.lastActivity),Le(i,_)},[c,o,V,_,q,t]),ce=D.useMemo(()=>t==="project"?Re(V.filter(n=>n.kind==="remote")):[],[V,t]),ge=n=>n.kind==="local"&&!!n.session.pendingInteraction,je=n=>n.kind==="local"&&b.includes($(K(n.session))),fe=n=>n.kind==="local"?!!(l&&be(K(n.session),l)):!!(C&&st(n.summary.locator,C.locator)),ye=(n,k)=>{const p=E[n]??!1,I=p?k:k.filter((x,f)=>{if(f<Ne)return!0;const L=K(x);return!!x.pendingInteraction||b.includes($(L))||!!(l&&be(L,l))}),i=k.length-I.length,u=p?k.length>Ne:i>0;return e.jsxs(e.Fragment,{children:[I.map(R),u&&e.jsx("button",{type:"button",onClick:()=>M(x=>({...x,[n]:!p})),className:"mx-4 my-1 rounded-md px-3 py-1.5 text-left font-mono text-[10.5px] text-[hsl(var(--deck-ink-faint))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink-muted))]",children:p?T("sidebar.group.showLess"):T("sidebar.group.showMore",{count:i})})]})},W=(n,k)=>{const p=E[n]??!1,I=p?k:k.filter((x,f)=>f<Ne?!0:ge(x)||je(x)||fe(x)),i=k.length-I.length,u=p?k.length>Ne:i>0;return e.jsxs(e.Fragment,{children:[I.map(x=>x.kind==="local"?R(x.session):j(x.summary)),u&&e.jsx("button",{type:"button",onClick:()=>M(x=>({...x,[n]:!p})),className:"mx-4 my-1 rounded-md px-3 py-1.5 text-left font-mono text-[10.5px] text-[hsl(var(--deck-ink-faint))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink-muted))]",children:p?T("sidebar.group.showLess"):T("sidebar.group.showMore",{count:i})})]})},oe=S?e.jsxs("div",{role:"status","aria-live":"polite",className:"mx-4 mt-2 flex items-center gap-2 rounded-md bg-[hsl(var(--deck-surface))]/55 px-3 py-2 font-mono text-[9.5px] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx(te,{className:"h-3 w-3 shrink-0 animate-spin text-[hsl(var(--deck-accent))]"}),e.jsx("span",{className:"flex-1 min-w-0",children:T("sidebar.catalog.syncing")}),e.jsx("span",{className:"tabular-nums shrink-0",children:T("sidebar.catalog.loaded",{count:ie})})]}):v==="error"?e.jsxs("div",{role:"alert",className:"mx-4 mt-2 flex items-center gap-2 rounded-md bg-amber-50/80 px-3 py-2 font-mono text-[9.5px] text-amber-800 dark:bg-amber-950/35 dark:text-amber-300",children:[e.jsx(Je,{className:"w-3 h-3 shrink-0"}),e.jsx("span",{className:"flex-1 min-w-0",children:T("sidebar.catalog.incomplete")}),e.jsxs("button",{type:"button",onClick:P,className:"inline-flex min-h-6 shrink-0 items-center gap-1 rounded px-1.5 font-medium hover:bg-amber-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-amber-500 dark:hover:bg-amber-900/50",children:[e.jsx(Xe,{className:"h-2.5 w-2.5"}),T("sidebar.catalog.retry")]})]}):null;if(q){if(t==="status")return e.jsxs("div",{className:"flex flex-col",children:[oe,Ee.map((i,u)=>e.jsxs("div",{children:[e.jsxs("div",{className:w("flex items-center justify-between px-5 pb-2 pt-3 font-mono text-[10px] tracking-[0.16em]",Ke[i.code]??"text-[hsl(var(--deck-ink-faint))]",u===0&&"pt-2"),children:[e.jsx("span",{children:T(Ge[i.code])}),e.jsxs("span",{className:"text-[hsl(var(--deck-ink-faint))]",children:[i.entries.length.toString().padStart(2,"0"),H?"+":""]})]}),W(`status:${i.code}`,i.entries)]},i.code))]});const n=X.some(i=>i.isActive||i.entries.some(fe)),k=i=>i.entries.some(fe),p=(i,u)=>{if(i.join("\0")===X.map(f=>f.path).join("\0"))return;Y(i),Be(i);const x=X.find(f=>f.path===u);ae(T("sidebar.project.reordered",{name:(x==null?void 0:x.name)??u,position:i.indexOf(u)+1}))},I=(i,u)=>{const x=i.entries.filter(je).length,f=k(i),L=x>0,re=i.entries.some(ge),Z=B[i.path]??(n&&!i.isActive&&!(f||i.hasRunning||L||re));return e.jsxs("div",{"data-project-group":i.path,onDragEnter:O=>{!A||A===i.path||(O.preventDefault(),F(i.path))},onDragOver:O=>{!A||A===i.path||(O.preventDefault(),O.dataTransfer.dropEffect="move")},onDrop:O=>{O.preventDefault();const ee=A||O.dataTransfer.getData("text/plain");ee&&ee!==i.path&&p(Ue(X.map(ke=>ke.path),ee,i.path),ee),U(null),F(null)},className:w("relative transition-colors",y===i.path&&A!==i.path&&"bg-[hsl(var(--deck-accent-soft))]/55 before:absolute before:inset-y-1 before:left-0 before:w-0.5 before:rounded-full before:bg-[hsl(var(--deck-accent))]"),children:[e.jsx(qe,{name:i.name,path:i.path,count:i.entries.length,countIsPartial:H,isActive:i.isActive,hasRunning:i.hasRunning,unreadCount:x,collapsed:Z,onSelect:()=>m(i.path),onCreateTask:()=>g(i.path),reorderPosition:u+1,reorderCount:X.length,isDragging:A===i.path,onDragStart:O=>{O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",i.path),U(i.path)},onDragEnd:()=>{U(null),F(null)},onReorderKeyDown:O=>{if(O.key!=="ArrowUp"&&O.key!=="ArrowDown")return;O.preventDefault();const ee=Fe(X.map(ke=>ke.path),i.path,O.key==="ArrowUp"?-1:1);p(ee,i.path)},onToggle:()=>h(O=>({...O,[i.path]:!Z}))}),!Z&&W(`project:${i.path}`,i.entries)]},i.path)};return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"sr-only","aria-live":"polite",children:z}),oe,ce.length>0&&e.jsxs("section",{"data-remote-session-group":!0,children:[e.jsxs("div",{className:"flex items-center justify-between px-5 pb-2 pt-3 font-mono text-[10px] tracking-[0.16em] text-[hsl(var(--deck-ink-faint))]",children:[e.jsx("span",{children:T("sidebar.project.remoteSessions")}),e.jsx("span",{children:ce.length.toString().padStart(2,"0")})]}),W("remote-sessions",ce)]}),X.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-5 pb-0.5 pt-2 font-mono text-[9px] uppercase tracking-[0.16em] text-[hsl(var(--deck-ink-faint))]",children:T("sidebar.project.projects")}),X.map(I)]})]})}if(t==="status")return e.jsxs("div",{className:"flex flex-col",children:[oe,Ce.map((n,k)=>e.jsxs("div",{children:[e.jsxs("div",{className:w("flex items-center justify-between px-5 pb-2 pt-3 font-mono text-[10px] tracking-[0.16em]",Ke[n.code]??"text-[hsl(var(--deck-ink-faint))]",k===0&&"pt-2"),children:[e.jsx("span",{children:T(Ge[n.code])}),e.jsxs("span",{className:"text-[hsl(var(--deck-ink-faint))]",children:[n.sessions.length.toString().padStart(2,"0"),H?"+":""]})]}),ye(`status:${n.code}`,n.sessions)]},n.code))]});const le=Q.some(n=>n.isActive),me=n=>!!(l&&n.sessions.some(k=>be(K(k),l))),de=(n,k)=>{if(n.join("\0")===Q.map(I=>I.path).join("\0"))return;Y(n),Be(n);const p=Q.find(I=>I.path===k);ae(T("sidebar.project.reordered",{name:(p==null?void 0:p.name)??k,position:n.indexOf(k)+1}))},we=(n,k)=>{const p=n.sessions.filter(f=>b.includes($(K(f)))).length,I=me(n),i=p>0,u=n.sessions.some(f=>!!f.pendingInteraction),x=B[n.path]??(le&&!n.isActive&&!(I||n.hasRunning||i||u));return e.jsxs("div",{"data-project-group":n.path,onDragEnter:f=>{!A||A===n.path||(f.preventDefault(),F(n.path))},onDragOver:f=>{!A||A===n.path||(f.preventDefault(),f.dataTransfer.dropEffect="move")},onDrop:f=>{f.preventDefault();const L=A||f.dataTransfer.getData("text/plain");L&&L!==n.path&&de(Ue(Q.map(re=>re.path),L,n.path),L),U(null),F(null)},className:w("relative transition-colors",y===n.path&&A!==n.path&&"bg-[hsl(var(--deck-accent-soft))]/55 before:absolute before:inset-y-1 before:left-0 before:w-0.5 before:rounded-full before:bg-[hsl(var(--deck-accent))]"),children:[e.jsx(qe,{name:n.name,path:n.path,count:n.sessions.length,countIsPartial:H,isActive:n.isActive,hasRunning:n.hasRunning,unreadCount:p,collapsed:x,onSelect:()=>m(n.path),onCreateTask:()=>g(n.path),reorderPosition:k+1,reorderCount:Q.length,isDragging:A===n.path,onDragStart:f=>{f.dataTransfer.effectAllowed="move",f.dataTransfer.setData("text/plain",n.path),U(n.path)},onDragEnd:()=>{U(null),F(null)},onReorderKeyDown:f=>{if(f.key!=="ArrowUp"&&f.key!=="ArrowDown")return;f.preventDefault();const L=Fe(Q.map(re=>re.path),n.path,f.key==="ArrowUp"?-1:1);de(L,n.path)},onToggle:()=>h(f=>({...f,[n.path]:!x}))}),!x&&ye(`project:${n.path}`,n.sessions)]},n.path)};return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"sr-only","aria-live":"polite",children:z}),oe,Q.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-5 pb-0.5 pt-2 font-mono text-[9px] uppercase tracking-[0.16em] text-[hsl(var(--deck-ink-faint))]",children:T("sidebar.project.projects")}),Q.map(we)]})]})}function us({className:t,onNavigate:a}){const r=se(),{toggleSettings:c,toggleSidebar:o,isSidebarOpen:l,isTerminalOpen:C,toggleTerminal:b,sidebarView:v,setSidebarView:m,setTaskSwitcherOpen:g,mainView:P,setMainView:R,setBoardProjectPath:j,setFilePreviewOpen:T}=Pt(),B=d(s=>s.sessions),h=d(s=>s.surfaceCatalog),E=d(s=>s.surfaceCatalogLoadState),M=d(s=>s.historySurfaceSelection),_=at(M),Y=d(s=>s.currentSessionRef),A=d(s=>s.forkingSessionRef),U=d(s=>s.selectSession),y=d(s=>s.openHistorySurface),F=d(s=>s.startTemporarySession),z=d(s=>s.deleteSession),ae=d(s=>s.archiveSession),q=d(s=>s.forkSession),S=d(s=>s.updateSession),H=d(s=>s.loadSessions),ie=d(s=>s.loadSurfaceCatalog),Ce=d(s=>s.setError),ne=d(s=>s.taskEventsConnected),Q=d(s=>s.taskWorkspaceInfo),V=d(s=>s.boundProjects),Ee=d(s=>s.selectedProjectPath),X=d(s=>s.bindProject),ce=d(s=>s.selectProject),ge=d(s=>s.cancelTask),je=d(s=>s.cancellingTaskKeys),fe=d(s=>s.retryTask),ye=d(s=>s.retryingTaskKeys),W=d(s=>s.unreadTaskKeys),[oe,le]=D.useState(null),[me,de]=D.useState(""),[we,n]=D.useState(null),[k,p]=D.useState(!1),I=Ee??(Q==null?void 0:Q.cwd)??null,i=s=>Se(s,r),u=s=>{const N=s.taskSourceProjectPath||s.projectPath,J=N.split("/").filter(Boolean).at(-1)||N,he=s.taskIsolation==="worktree"?s.taskWorktreeBranch||r("session.env.worktree"):r("session.env.local"),Ae=s.taskDiffStat?`+${s.taskDiffStat.additions} −${s.taskDiffStat.deletions}`:void 0,De=s.taskStatus==="queued"&&s.taskQueuePosition?r("session.queued",{position:s.taskQueuePosition,depth:s.taskQueueDepth??s.taskQueuePosition}):void 0,Pe=Dt(s,r);return{project:J,environment:he,diff:Ae,queue:De,reason:Pe}},x=()=>{R("workspace"),F(I??void 0),a==null||a()},f=()=>{d.getState().closeHistorySurface(),T(!1),j(I),R("board"),a==null||a()},L=async s=>{V.some(N=>N.path===s)?ce(s):await X(s),R("workspace"),F(s),a==null||a()},re=async s=>{V.some(N=>N.path===s)?ce(s):await X(s),R("workspace"),F(s),a==null||a()},Z=s=>{s(),a==null||a()},O=()=>{G(d.getState())||Z(b)},ee=async(s,N)=>{s.stopPropagation(),!G(d.getState())&&await z(K(N))},ke=async s=>{if(G(d.getState()))return;const N=K(s),J=$(N);if(!we){n(J);try{await lt(N)}catch(he){Ce(he instanceof Error?he.message:"Session export failed")}finally{n(null)}}},xt=(s,N)=>{s.stopPropagation(),!G(d.getState())&&(le($(K(N))),de(i(N)))},pt=async s=>{if(!G(d.getState())){if(!me.trim()){le(null);return}try{await S(K(s),me.trim()),le(null),await H()}catch(N){console.error("Failed to rename session:",N)}}},ft=()=>{le(null),de("")};return l?e.jsxs("div",{className:w("flex flex-col h-screen border-r w-[260px] border-[hsl(var(--deck-hairline))] bg-[hsl(var(--deck-canvas-veil))]",t),children:[e.jsxs("div",{className:"flex flex-col gap-6 px-5 pt-5 pb-5",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(Ye,{size:26}),e.jsx("span",{className:"font-mono text-[15px] font-semibold tracking-[-0.01em] text-[hsl(var(--deck-ink))]",children:"Blade"}),e.jsx("span",{className:"ml-1 rounded-sm border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] px-1 py-[1px] font-mono text-[9px] text-[hsl(var(--deck-ink-faint))]",children:r("sidebar.brand.badge")})]}),e.jsx("button",{onClick:o,"aria-label":r("sidebar.action.collapse"),className:"flex h-8 w-8 items-center justify-center rounded transition-colors hover:bg-[hsl(var(--deck-surface))]",children:e.jsx(_t,{className:"h-3 w-3 text-[hsl(var(--deck-ink-muted))]"})})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("button",{onClick:x,className:"flex h-9 w-full items-center justify-between rounded-md bg-[hsl(var(--deck-ink))] px-3 font-mono text-[13px] font-medium text-[hsl(var(--deck-canvas))] transition-colors hover:bg-[hsl(var(--deck-ink))]/88",children:[e.jsxs("span",{className:"flex gap-2 items-center",children:[e.jsx(_e,{className:"h-3.5 w-3.5 stroke-[2.5]"}),r("sidebar.action.newTask")]}),e.jsx("span",{className:"rounded-sm bg-white/10 px-1.5 py-[1px] font-mono text-[10px] text-white/80",children:Oe("newTask")})]}),e.jsxs("button",{type:"button",onClick:f,"aria-current":P==="board"?"page":void 0,className:w("flex h-9 w-full items-center gap-2 rounded-md border px-3 font-mono text-[12.5px] transition-colors",P==="board"?"border-[hsl(var(--deck-accent)/0.45)] bg-[hsl(var(--deck-accent-soft))] text-[hsl(var(--deck-accent))]":"border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] text-[hsl(var(--deck-ink-muted))] hover:border-[hsl(var(--deck-border-strong))] hover:text-[hsl(var(--deck-ink))]"),children:[e.jsx(ot,{className:"h-3.5 w-3.5"}),r("sidebar.action.taskBoard")]}),e.jsxs("button",{onClick:O,disabled:_,className:w("flex h-9 w-full items-center gap-2 rounded-md border px-3 font-mono text-[12.5px] transition-colors",C?"border-[hsl(var(--deck-accent)/0.55)] bg-[hsl(var(--deck-accent-soft))] text-[hsl(var(--deck-accent))]":"border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] text-[hsl(var(--deck-ink-muted))] hover:border-[hsl(var(--deck-border-strong))] hover:text-[hsl(var(--deck-ink))]"),children:[e.jsx(ct,{className:"h-3.5 w-3.5"}),r("sidebar.action.terminal")]}),!_&&e.jsxs("button",{type:"button",onClick:()=>Z(()=>g(!0)),className:"flex h-9 w-full items-center justify-between rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] px-3 font-mono text-[12.5px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:border-[hsl(var(--deck-border-strong))] hover:text-[hsl(var(--deck-ink))]",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(We,{className:"h-3.5 w-3.5"}),r("sidebar.action.searchTasks")]}),e.jsx("span",{className:"rounded-sm border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-canvas))] px-1.5 py-[1px] font-mono text-[9px] text-[hsl(var(--deck-ink-faint))]",children:W.length>0?W.length:Oe("searchTasks")})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"flex flex-1 items-center gap-0.5 rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] p-0.5",children:["project","status"].map(s=>e.jsx("button",{type:"button",onClick:()=>m(s),"aria-pressed":v===s,"aria-label":r(s==="project"?"sidebar.view.projectAria":"sidebar.view.statusAria"),className:w("flex-1 rounded-[5px] py-1 font-mono text-[11px] tracking-[0.02em] transition-colors",v===s?"bg-[hsl(var(--deck-canvas))] text-[hsl(var(--deck-ink))] shadow-sm":"text-[hsl(var(--deck-ink-faint))] hover:text-[hsl(var(--deck-ink-muted))]"),children:r(s==="project"?"sidebar.view.project":"sidebar.view.status")},s))}),e.jsx("button",{type:"button",onClick:()=>p(!0),disabled:_,title:r("projects.bind.action"),"aria-label":r("projects.bind.action"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] text-[hsl(var(--deck-ink-faint))] transition-colors hover:border-[hsl(var(--deck-border-strong))] hover:text-[hsl(var(--deck-accent))]",children:e.jsx(Tt,{className:"h-3.5 w-3.5"})})]})]}),e.jsx(ze,{className:"flex-1 px-0",children:e.jsxs("div",{className:"flex flex-col",children:[(B.length>0||h.length>0||V.length>0||E==="loading"||E==="hydrating"||E==="error")&&e.jsx(Zt,{view:v,sessions:B,surfaceCatalog:h,activeProjectPath:I,boundProjects:V,currentSessionRef:Y,historySurfaceSelection:M,unreadTaskKeys:W,catalogLoadState:E,onRetryCatalog:()=>{ie()},onSelectProject:s=>void L(s).catch(()=>{}),onCreateTask:s=>void re(s).catch(()=>{}),renderLocalRow:s=>{const N=K(s),J=$(N),he=be(N,Y),Ae=oe===J,De=be(N,A),Pe=!!A;return e.jsx(Gt,{session:s,sessionRef:N,isActive:he,isForking:De,isUnread:W.includes($(N)),anyForking:Pe,isEditing:Ae,editingTitle:me,title:i(s),context:u(s),isCancelling:je.includes($(N)),isRetrying:ye.includes($(N)),isExporting:we===J,onSelect:()=>(a==null||a(),R("workspace"),U(N)),onCancelTask:()=>{G(d.getState())||ge(N).catch(()=>{})},onRetryTask:()=>{G(d.getState())||fe(N).catch(()=>{})},onFork:()=>{G(d.getState())||q(s)},onArchive:()=>{G(d.getState())||ae(N)},onExport:()=>void ke(s),onStartRename:Ie=>xt(Ie,s),onDelete:Ie=>ee(Ie,s),onEditingTitleChange:de,onSaveRename:()=>pt(s),onCancelRename:ft},J)},renderRemoteRow:s=>e.jsx(Ft,{summary:s,isActive:st(s.locator,M==null?void 0:M.locator),onSelect:()=>(a==null||a(),R("workspace"),y(s.locator))},Ct(s.locator))}),h.length===0&&B.length===0&&e.jsx("div",{className:"px-5 mt-6",children:e.jsxs("div",{className:"rounded-md border border-dashed border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))]/60 px-4 py-6 text-center",children:[e.jsx("div",{className:"mx-auto mb-2 inline-flex h-8 w-8 items-center justify-center rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-canvas))]",children:e.jsx(Et,{className:"h-3.5 w-3.5 text-[hsl(var(--deck-ink-faint))]"})}),e.jsx("div",{className:"font-mono text-[12px] text-[hsl(var(--deck-ink-muted))]",children:r("sidebar.empty.title")}),e.jsx("div",{className:"mt-1 text-[10.5px] text-[hsl(var(--deck-ink-faint))]",children:r("sidebar.empty.hint")})]})})]})}),e.jsxs("div",{className:"flex flex-col gap-3 px-5 pt-3 pb-5",children:[e.jsxs("div",{className:"flex flex-col gap-0.5 border-t border-[hsl(var(--deck-hairline))] pt-3",children:[!_&&e.jsx(Ut,{}),[{icon:it,action:()=>Z(c),labelKey:"sidebar.section.settings"}].map(({icon:s,action:N,labelKey:J})=>e.jsxs("button",{"data-settings-trigger":!0,onClick:N,className:"flex h-8 w-full items-center gap-2.5 rounded-md px-2.5 font-mono text-[12.5px] text-[hsl(var(--deck-ink-muted))] transition-colors hover:bg-[hsl(var(--deck-surface))] hover:text-[hsl(var(--deck-ink))]",children:[e.jsx(s,{className:"h-3.5 w-3.5 text-[hsl(var(--deck-ink-faint))]"}),r(J)]},J))]}),e.jsxs("div",{className:"flex gap-2 justify-between items-center",children:[e.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.14em] text-[hsl(var(--deck-ink-faint))]",children:r("sidebar.language.label")}),e.jsx(dt,{})]}),e.jsxs("div",{className:"flex items-center gap-2.5 rounded-md border border-[hsl(var(--deck-border))] bg-[hsl(var(--deck-surface))] px-3 py-2",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-md bg-[hsl(var(--deck-canvas-veil))]",children:e.jsx("div",{className:"h-2 w-2 rounded-full bg-[hsl(var(--deck-ink))]"})}),e.jsxs("div",{className:"flex flex-1 flex-col gap-[1px]",children:[e.jsx("span",{className:"font-mono text-[12px] text-[hsl(var(--deck-ink))]",children:r("sidebar.status.user")}),e.jsxs("span",{className:w("flex gap-1 items-center font-mono text-[10px]",ne?"text-[hsl(var(--deck-accent))]":"text-[hsl(var(--deck-ink-faint))]"),children:[e.jsx("span",{className:w("h-1 w-1 rounded-full",ne?"bg-[hsl(var(--deck-accent))] shadow-[0_0_5px_hsl(var(--deck-accent-glow)/0.9)]":"bg-[hsl(var(--deck-ink-faint))]/60")}),r(ne?"sidebar.status.feedLive":"sidebar.status.feedOffline")]})]})]})]}),!_&&e.jsx(At,{open:k,onOpenChange:p})]}):e.jsx(Kt,{className:t,onExpand:o,onNewChat:x,onOpenBoard:f,onOpenTaskSwitcher:()=>Z(()=>g(!0)),onToggleTerminal:O,onToggleSettings:()=>Z(c),isTerminalOpen:C,taskEventsConnected:ne,unreadCount:W.length,boardActive:P==="board",terminalDisabled:_,taskSwitcherDisabled:_})}export{us as Sidebar};
@@ -1,4 +1,4 @@
1
- import{j as n,r as l}from"./vendor-react-DofNRwfy.js";import{c as A,j as N,a7 as Ie,d as J,b as R,E as Pe,a8 as Le,a9 as q,aa as X,u as Fe,a as c,ab as L,ac as Re,ad as qe,z as Ee,D as Be,e as Ke,ae as Oe,g as $e,h as ze,U as G,s as He,A as ke,t as We,G as Qe,L as F,w as Ue,R as Ve}from"./index-CXHca5Sw.js";import{_ as h,M as _e,Z}from"./session-events-CGQa6VXb.js";import{A as fe,F as Ge}from"./folder-Dd0PwX-t.js";import{P as Ze}from"./plus-KK_f8iC4.js";import{T as Je}from"./terminal-CHxuQT2f.js";import{S as Xe}from"./settings-hrYiD_4G.js";import{C as Ye}from"./clock-3-CMvLtvtl.js";import"./vendor-radix-D6QrtXqd.js";/**
1
+ import{j as n,r as l}from"./vendor-react-DofNRwfy.js";import{c as A,j as N,a7 as Ie,d as J,b as R,E as Pe,a8 as Le,a9 as q,aa as X,u as Fe,a as c,ab as L,ac as Re,ad as qe,z as Ee,D as Be,e as Ke,ae as Oe,g as $e,h as ze,U as G,s as He,A as ke,t as We,G as Qe,L as F,w as Ue,R as Ve}from"./index-E3Br6_JT.js";import{_ as h,M as _e,Z}from"./session-events-CGQa6VXb.js";import{A as fe,F as Ge}from"./folder-jmSOAps0.js";import{P as Ze}from"./plus-CFE558mS.js";import{T as Je}from"./terminal-BLRsjz3P.js";import{S as Xe}from"./settings-CbRw313K.js";import{C as Ye}from"./clock-3-Drk3JgZo.js";import"./vendor-radix-D6QrtXqd.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{r,j as a}from"./vendor-react-DofNRwfy.js";import{D as R,o as C,L as M}from"./vendor-xterm-DuYZoU4T.js";import{c as N,u as F,a as x,ak as T,j as p,X as W}from"./index-CXHca5Sw.js";import{_ as I,Z as L,M as A}from"./session-events-CGQa6VXb.js";import{T as D}from"./terminal-CHxuQT2f.js";import"./vendor-radix-D6QrtXqd.js";/**
1
+ import{r,j as a}from"./vendor-react-DofNRwfy.js";import{D as R,o as C,L as M}from"./vendor-xterm-DuYZoU4T.js";import{c as N,u as F,a as x,ak as T,j as p,X as W}from"./index-E3Br6_JT.js";import{_ as I,Z as L,M as A}from"./session-events-CGQa6VXb.js";import{T as D}from"./terminal-BLRsjz3P.js";import"./vendor-radix-D6QrtXqd.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-CXHca5Sw.js";/**
1
+ import{c as e}from"./index-E3Br6_JT.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-CXHca5Sw.js";/**
1
+ import{c as e}from"./index-E3Br6_JT.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-CXHca5Sw.js";/**
1
+ import{c as a}from"./index-E3Br6_JT.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as t}from"./index-CXHca5Sw.js";/**
1
+ import{c as t}from"./index-E3Br6_JT.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-CXHca5Sw.js";/**
1
+ import{c as o}from"./index-E3Br6_JT.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-CXHca5Sw.js";/**
1
+ import{c}from"./index-E3Br6_JT.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-CXHca5Sw.js";/**
1
+ import{c}from"./index-E3Br6_JT.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-CXHca5Sw.js";/**
1
+ import{c as o}from"./index-E3Br6_JT.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-CXHca5Sw.js";/**
1
+ import{c as a}from"./index-E3Br6_JT.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-CXHca5Sw.js";/**
1
+ import{c as a}from"./index-E3Br6_JT.js";/**
2
2
  * @license lucide-react v0.300.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.