@spencerboucher/switchyard 0.17.0 → 0.18.1

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 (129) hide show
  1. package/README.md +37 -23
  2. package/dist/policies/worker.js +884 -784
  3. package/dist/switchyard.mjs +27791 -26698
  4. package/package.json +1 -1
  5. package/web-dist/assets/AutomationView-DU4GvjqD.js +2 -0
  6. package/web-dist/assets/{AutomationView-BMQuTl3j.js.map → AutomationView-DU4GvjqD.js.map} +1 -1
  7. package/web-dist/assets/Checkbox-BmiLcC-z.js +2 -0
  8. package/web-dist/assets/Checkbox-BmiLcC-z.js.map +1 -0
  9. package/web-dist/assets/Copy-CdlOSzns.js +2 -0
  10. package/web-dist/assets/Copy-CdlOSzns.js.map +1 -0
  11. package/web-dist/assets/InteractionCard-C3H45DAY.js +4 -0
  12. package/web-dist/assets/{InteractionCard-CdBv3Sm7.js.map → InteractionCard-C3H45DAY.js.map} +1 -1
  13. package/web-dist/assets/Markdown-Bo-ScAiV.js +184 -0
  14. package/web-dist/assets/Markdown-Bo-ScAiV.js.map +1 -0
  15. package/web-dist/assets/Priority-f7KceEZQ.js +2 -0
  16. package/web-dist/assets/{Priority-aNWh1i4H.js.map → Priority-f7KceEZQ.js.map} +1 -1
  17. package/web-dist/assets/{SegmentedControl-D2kj3j7u.js → SegmentedControl-Ca8Fsw-g.js} +2 -2
  18. package/web-dist/assets/SegmentedControl-Ca8Fsw-g.js.map +1 -0
  19. package/web-dist/assets/Select-B04kPhBs.js +2 -0
  20. package/web-dist/assets/{Select-Dv-F-HZR.js.map → Select-B04kPhBs.js.map} +1 -1
  21. package/web-dist/assets/Tabs-BgpFIjqW.js +2 -0
  22. package/web-dist/assets/Tabs-BgpFIjqW.js.map +1 -0
  23. package/web-dist/assets/{UINodeRenderer-GbSP56mL.js → UINodeRenderer-CHlMHtMT.js} +3 -3
  24. package/web-dist/assets/{UINodeRenderer-GbSP56mL.js.map → UINodeRenderer-CHlMHtMT.js.map} +1 -1
  25. package/web-dist/assets/UnfilteredNote-DzKbzrjZ.js +2 -0
  26. package/web-dist/assets/UnfilteredNote-DzKbzrjZ.js.map +1 -0
  27. package/web-dist/assets/ViewSelect-Dz7vh4fq.js +2 -0
  28. package/web-dist/assets/ViewSelect-Dz7vh4fq.js.map +1 -0
  29. package/web-dist/assets/api-C9NJpI9q.js +2 -0
  30. package/web-dist/assets/api-C9NJpI9q.js.map +1 -0
  31. package/web-dist/assets/attention-BMxYQaCW.js +2 -0
  32. package/web-dist/assets/attention-BMxYQaCW.js.map +1 -0
  33. package/web-dist/assets/automations-DTTGHyoo.js +2 -0
  34. package/web-dist/assets/{automations-DQMWPvqT.js.map → automations-DTTGHyoo.js.map} +1 -1
  35. package/web-dist/assets/board-Blv0pC_z.js +6 -0
  36. package/web-dist/assets/board-Blv0pC_z.js.map +1 -0
  37. package/web-dist/assets/check-DTN2VHtE.js +2 -0
  38. package/web-dist/assets/check-DTN2VHtE.js.map +1 -0
  39. package/web-dist/assets/code-BsVbn6T3.js +25 -0
  40. package/web-dist/assets/code-BsVbn6T3.js.map +1 -0
  41. package/web-dist/assets/core.esm-DZMOHGS9.js +6 -0
  42. package/web-dist/assets/core.esm-DZMOHGS9.js.map +1 -0
  43. package/web-dist/assets/{describe-ype6dIHS.js → describe-Q2nvYHjg.js} +2 -2
  44. package/web-dist/assets/{describe-ype6dIHS.js.map → describe-Q2nvYHjg.js.map} +1 -1
  45. package/web-dist/assets/enroll-wAPt550I.js +2 -0
  46. package/web-dist/assets/{enroll-BTNVVoWB.js.map → enroll-wAPt550I.js.map} +1 -1
  47. package/web-dist/assets/index-9TW72kVM.css +2 -0
  48. package/web-dist/assets/index-Du1kfnPp.js +17 -0
  49. package/web-dist/assets/index-Du1kfnPp.js.map +1 -0
  50. package/web-dist/assets/keyboardLayers-CpCxpJ43.js +2 -0
  51. package/web-dist/assets/keyboardLayers-CpCxpJ43.js.map +1 -0
  52. package/web-dist/assets/more-D1YpQrbP.js +2 -0
  53. package/web-dist/assets/more-D1YpQrbP.js.map +1 -0
  54. package/web-dist/assets/pencil-BtK08_f_.js +2 -0
  55. package/web-dist/assets/pencil-BtK08_f_.js.map +1 -0
  56. package/web-dist/assets/{policyLogic-AZSVROoe.js → policyLogic-Dk_rwjQS.js} +2 -2
  57. package/web-dist/assets/{policyLogic-AZSVROoe.js.map → policyLogic-Dk_rwjQS.js.map} +1 -1
  58. package/web-dist/assets/queue-CdBAajey.js +2 -0
  59. package/web-dist/assets/queue-CdBAajey.js.map +1 -0
  60. package/web-dist/assets/{repo-CRmEGTNk.js → repo-CTLrFN0k.js} +2 -2
  61. package/web-dist/assets/{repo-CRmEGTNk.js.map → repo-CTLrFN0k.js.map} +1 -1
  62. package/web-dist/assets/rotate-ccw-mfO3Crkq.js +2 -0
  63. package/web-dist/assets/rotate-ccw-mfO3Crkq.js.map +1 -0
  64. package/web-dist/assets/search-DdgUAUi7.js +2 -0
  65. package/web-dist/assets/search-DdgUAUi7.js.map +1 -0
  66. package/web-dist/assets/selection-DDKGpSXL.js +7 -0
  67. package/web-dist/assets/selection-DDKGpSXL.js.map +1 -0
  68. package/web-dist/assets/settings-C3rhTyqj.js +12 -0
  69. package/web-dist/assets/settings-C3rhTyqj.js.map +1 -0
  70. package/web-dist/assets/states-f_A68-u-.js +58 -0
  71. package/web-dist/assets/states-f_A68-u-.js.map +1 -0
  72. package/web-dist/assets/terminal-login-eMNouLWh.js +2 -0
  73. package/web-dist/assets/{terminal-login-B20sSCfk.js.map → terminal-login-eMNouLWh.js.map} +1 -1
  74. package/web-dist/assets/timer-CDGYPIoD.js +2 -0
  75. package/web-dist/assets/timer-CDGYPIoD.js.map +1 -0
  76. package/web-dist/assets/trackers-BKCB5pxU.js +2 -0
  77. package/web-dist/assets/trackers-BKCB5pxU.js.map +1 -0
  78. package/web-dist/assets/useNow-CjCVyQra.js +2 -0
  79. package/web-dist/assets/useNow-CjCVyQra.js.map +1 -0
  80. package/web-dist/assets/{useResource-CFaJYaSY.js → useResource-BvhL-G6a.js} +2 -2
  81. package/web-dist/assets/{useResource-CFaJYaSY.js.map → useResource-BvhL-G6a.js.map} +1 -1
  82. package/web-dist/assets/workboard-Btp-KIzn.js +3 -0
  83. package/web-dist/assets/workboard-Btp-KIzn.js.map +1 -0
  84. package/web-dist/index.html +6 -6
  85. package/web-dist/sw.js +1 -1
  86. package/web-dist/sw.js.map +1 -1
  87. package/web-dist/assets/AutomationView-BMQuTl3j.js +0 -2
  88. package/web-dist/assets/Checkbox-D18Ch0n4.js +0 -2
  89. package/web-dist/assets/Checkbox-D18Ch0n4.js.map +0 -1
  90. package/web-dist/assets/Copy-D6U5ewFc.js +0 -2
  91. package/web-dist/assets/Copy-D6U5ewFc.js.map +0 -1
  92. package/web-dist/assets/InteractionCard-CdBv3Sm7.js +0 -4
  93. package/web-dist/assets/Overlay-Cv0SIpoa.js +0 -2
  94. package/web-dist/assets/Overlay-Cv0SIpoa.js.map +0 -1
  95. package/web-dist/assets/Priority-aNWh1i4H.js +0 -2
  96. package/web-dist/assets/SegmentedControl-D2kj3j7u.js.map +0 -1
  97. package/web-dist/assets/Select-Dv-F-HZR.js +0 -2
  98. package/web-dist/assets/Tabs-DPj-rKor.js +0 -184
  99. package/web-dist/assets/Tabs-DPj-rKor.js.map +0 -1
  100. package/web-dist/assets/ViewSelect-DTXqcHvg.js +0 -2
  101. package/web-dist/assets/ViewSelect-DTXqcHvg.js.map +0 -1
  102. package/web-dist/assets/attention-eEYmUIPZ.js +0 -2
  103. package/web-dist/assets/attention-eEYmUIPZ.js.map +0 -1
  104. package/web-dist/assets/auth-e3n8h2VO.js +0 -2
  105. package/web-dist/assets/auth-e3n8h2VO.js.map +0 -1
  106. package/web-dist/assets/automations-DQMWPvqT.js +0 -2
  107. package/web-dist/assets/board-CxPUJBjR.js +0 -10
  108. package/web-dist/assets/board-CxPUJBjR.js.map +0 -1
  109. package/web-dist/assets/code-BfD33VCt.js +0 -25
  110. package/web-dist/assets/code-BfD33VCt.js.map +0 -1
  111. package/web-dist/assets/enroll-BTNVVoWB.js +0 -2
  112. package/web-dist/assets/index-BE-Sxt6h.css +0 -2
  113. package/web-dist/assets/index-xw7YOYjs.js +0 -23
  114. package/web-dist/assets/index-xw7YOYjs.js.map +0 -1
  115. package/web-dist/assets/more-AZ4rHFG5.js +0 -2
  116. package/web-dist/assets/more-AZ4rHFG5.js.map +0 -1
  117. package/web-dist/assets/queue-LyV9HFK4.js +0 -2
  118. package/web-dist/assets/queue-LyV9HFK4.js.map +0 -1
  119. package/web-dist/assets/selection-BgO3-HZn.js +0 -2
  120. package/web-dist/assets/selection-BgO3-HZn.js.map +0 -1
  121. package/web-dist/assets/settings-CK-9B48D.js +0 -12
  122. package/web-dist/assets/settings-CK-9B48D.js.map +0 -1
  123. package/web-dist/assets/states-D7g0-4EY.js +0 -58
  124. package/web-dist/assets/states-D7g0-4EY.js.map +0 -1
  125. package/web-dist/assets/terminal-login-B20sSCfk.js +0 -2
  126. package/web-dist/assets/timer-CyFp7DQs.js +0 -2
  127. package/web-dist/assets/timer-CyFp7DQs.js.map +0 -1
  128. package/web-dist/assets/useNow-DvXAU3dJ.js +0 -2
  129. package/web-dist/assets/useNow-DvXAU3dJ.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{S as e,_ as t,a as n,h as r,i,l as a,o,t as s,v as c,y as l}from"./Button-BKQW9doW.js";import{A as u,T as d,h as f,j as ee,k as p,l as m,t as te,w as h}from"./Overlay-Cv0SIpoa.js";import{At as ne,Ft as g,It as _,L as v,M as re,Mt as ie,Nt as y,O as ae,at as b,c as x,f as S,i as oe,jt as C,m as w,n as T,r as E,s as se,t as D,tt as O,u as k}from"./states-D7g0-4EY.js";import{t as A}from"./calendar-clock-CwOgyN2z.js";import{n as ce,r as j}from"./Copy-D6U5ewFc.js";import{n as le,r as ue,t as de}from"./Priority-aNWh1i4H.js";import{a as fe,c as pe,i as me,p as M,s as N,t as he}from"./useBreakpoint-kT0J1Dnk.js";import{t as ge}from"./play-j138GLHB.js";import{t as _e}from"./plus-D935l0Os.js";import{n as ve,t as ye}from"./DangerZone-Ch2KNmob.js";import{c as be,s as P,t as xe,u as Se}from"./policyLogic-AZSVROoe.js";import{Kt as F,Yt as Ce,qt as I,tn as L}from"./index-xw7YOYjs.js";import{t as R}from"./TextLink-CCc3WEdm.js";import{t as z}from"./SegmentedControl-D2kj3j7u.js";import{t as B}from"./Card-WONLvqGM.js";import{t as V}from"./Select-Dv-F-HZR.js";import{t as H}from"./Switch-DHX-YYPr.js";import{E as U,O as we,S as Te,T as W,a as G,b as Ee,d as De,f as K,g as q,h as Oe,i as ke,l as Ae,m as je,n as Me,o as Ne,p as J,r as Pe,s as Fe,t as Ie,u as Le,v as Re,w as Y,x as ze,y as Be}from"./describe-ype6dIHS.js";var Ve={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};Ve.node;var He=o(Ve),X=e(l(),1),Z=i(),Ue=e=>`/tasks/${encodeURIComponent(e)}`;function Q(e){return _(e)&&(e.status===404||e.status===405||e.status===501)}function We({summary:e,errorCount:t}){return(0,Z.jsxs)(B,{stack:!0,title:`Summary`,testId:`automation-summary`,children:[(0,Z.jsx)(`p`,{className:`text-sm break-words`,children:e}),t>0&&(0,Z.jsxs)(`p`,{className:`flex items-center gap-1.5 text-sm text-danger`,children:[(0,Z.jsx)(w,{"aria-hidden":!0,className:`size-4 shrink-0`}),t===1?`1 field needs attention`:`${t} fields need attention`]})]})}async function Ge(e,t,n){return e&&!n?C(Y(e,`/preview`)):y(`/api/automations/preview`,t)}function Ke({automationId:e,dirty:t,getInput:n,currentKey:r}){let[i,a]=(0,X.useState)({status:`idle`}),o=async()=>{let r=n();if(!r)N.error(`Fix the highlighted fields to preview the task`);else{a({status:`loading`});try{let n=await Ge(e,r,t);a({status:`done`,preview:n,key:JSON.stringify(r)})}catch(e){a(Q(e)?{status:`unsupported`}:{status:`error`,error:e})}}};return(0,Z.jsxs)(B,{stack:!0,title:`Preview`,description:`See the task an occurrence would create, and when it would run next.`,testId:`automation-preview`,children:[(0,Z.jsx)(`div`,{children:(0,Z.jsx)(s,{icon:(0,Z.jsx)(d,{className:`size-4`}),busy:i.status===`loading`,onClick:()=>void o(),children:`Preview resulting task`})}),i.status===`unsupported`&&(0,Z.jsx)(k,{capability:`Task preview`,reason:`This coordinator does not offer automation previews.`,fallback:`Read the summary above, or save and use Run now to see a real task.`}),i.status===`error`&&(0,Z.jsx)(T,{compact:!0,title:`Could not preview`,error:i.error,onRetry:()=>void o()}),i.status===`done`&&(0,Z.jsx)(qe,{preview:i.preview,stale:i.key!==r})]})}function qe({preview:e,stale:t}){let{task:n}=e;return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[t&&(0,Z.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs text-warning`,role:`status`,children:[(0,Z.jsx)(w,{"aria-hidden":!0,className:`size-3.5 shrink-0`}),`The form changed since this preview. Preview again to refresh it.`]}),(0,Z.jsx)(`p`,{className:`text-sm break-words text-muted`,children:e.summary}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2 rounded-md border border-border bg-surface-2 p-3`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-2`,children:[(0,Z.jsx)(`h3`,{className:`min-w-0 font-medium break-words`,children:n.title}),(0,Z.jsx)(le,{priority:n.priority,muted:!0,className:`shrink-0 text-xs`})]}),n.objective?(0,Z.jsx)(`p`,{className:`text-sm break-words whitespace-pre-wrap`,children:n.objective}):(0,Z.jsx)(`p`,{className:`text-sm text-muted`,children:`No objective.`}),n.acceptanceCriteria.length>0&&(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`h4`,{className:`flex items-center gap-1 text-xs font-medium text-muted`,children:[(0,Z.jsx)(h,{"aria-hidden":!0,className:`size-3.5`}),`Acceptance criteria`]}),(0,Z.jsx)(`ul`,{className:`mt-1 list-disc pl-5 text-sm`,children:n.acceptanceCriteria.map((e,t)=>(0,Z.jsx)(`li`,{className:`break-words`,children:e},t))})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h3`,{className:`text-sm font-medium`,children:`Next occurrences`}),e.next.length===0?(0,Z.jsx)(`p`,{className:`text-sm text-muted`,children:`No scheduled times: this trigger fires on demand, on a webhook, or when a task is done.`}):(0,Z.jsx)(`ol`,{className:`mt-1 flex flex-col gap-0.5 text-sm`,children:e.next.slice(0,5).map(e=>(0,Z.jsxs)(`li`,{className:`flex flex-wrap gap-x-2`,children:[(0,Z.jsx)(`time`,{dateTime:e,children:J(e)}),(0,Z.jsx)(`span`,{className:`text-muted`,children:S(e)})]},e))})]})]})}function Je({label:e,value:t,mono:n=!0}){return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:e}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2`,children:[(0,Z.jsx)(`code`,{className:`min-w-0 flex-1 rounded border border-border bg-surface px-2 py-1.5 text-xs break-all select-all ${n?`font-mono`:``}`,children:t}),(0,Z.jsx)(s,{size:`sm`,icon:(0,Z.jsx)(j,{className:`size-3.5`}),onClick:()=>void ce(t,`${e} copied`),"aria-label":`Copy ${e.toLowerCase()}`,children:`Copy`})]})]})}function Ye({automation:e}){let[t,n]=(0,X.useState)(!1),[r,i]=(0,X.useState)(!1),[a,o]=(0,X.useState)(null),[c,l]=(0,X.useState)(!1),d=e.webhookTokenSet||a!==null,f=async()=>{i(!1),n(!0);try{let t=await y(Y(e.id,`/webhook-token`)),n=O.safeParse(t);if(!n.success)throw Error(`The coordinator returned an unexpected token response`);let r=new URL(n.data.url,window.location.origin).toString();o({token:n.data.token,url:r}),N.success(d?`Webhook token rotated`:`Webhook token created`)}catch(e){Q(e)?l(!0):N.error(`Could not issue a webhook token: ${g(e)}`)}finally{n(!1)}};return(0,Z.jsxs)(B,{stack:!0,title:`Webhook`,description:`POST JSON to the URL with the token as a Bearer header. Filters decide which payloads fire.`,testId:`webhook-token`,children:[(0,Z.jsx)(`p`,{className:`flex items-center gap-1.5 text-sm`,children:d?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(M,{"aria-hidden":!0,className:`size-4 shrink-0 text-success`}),`A token is set`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(u,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted`}),`No token yet: webhook calls are rejected until you create one`]})}),c?(0,Z.jsx)(k,{capability:`Webhook tokens`,reason:`This coordinator does not issue webhook tokens.`}):(0,Z.jsx)(`div`,{children:(0,Z.jsx)(s,{icon:(0,Z.jsx)(L,{className:`size-4`}),busy:t,onClick:()=>d?i(!0):void f(),children:d?`Rotate token`:`Create token`})}),a&&(0,Z.jsxs)(`div`,{role:`alert`,className:`flex min-w-0 flex-col gap-3 rounded-md border border-warning bg-warning-soft p-3`,children:[(0,Z.jsxs)(`p`,{className:`flex items-center gap-1.5 text-sm font-medium`,children:[(0,Z.jsx)(w,{"aria-hidden":!0,className:`size-4 shrink-0 text-warning`}),`This token is shown once. Copy it now.`]}),(0,Z.jsx)(Je,{label:`Token`,value:a.token}),(0,Z.jsx)(Je,{label:`URL`,value:a.url}),(0,Z.jsx)(Je,{label:`Example`,value:Ne(a.token,a.url)}),(0,Z.jsx)(`div`,{children:(0,Z.jsx)(s,{size:`sm`,onClick:()=>o(null),children:`I have copied it`})})]}),(0,Z.jsx)(te,{open:r,onClose:()=>i(!1),title:`Rotate webhook token?`,description:`The current token stops working immediately. Update every sender with the new token.`,confirmLabel:`Rotate token`,busy:t,onConfirm:()=>void f()})]})}var Xe=[];function Ze({automationId:e,refreshKey:t,onRun:n}){let r=v(t=>t.occurrences[e]??Xe),i=v(e=>e.tasks),[a,o]=(0,X.useState)({status:`loading`}),s=(0,X.useCallback)(async t=>{o(e=>e.status===`done`?e:{status:`loading`});try{let n=await C(Y(e,`/history`),{},t);o({status:`done`,items:Re(n)})}catch(e){if(t?.aborted)return;o(Q(e)?{status:`unsupported`}:{status:`error`,error:e})}},[e]);(0,X.useEffect)(()=>{let e=new AbortController;return s(e.signal),()=>e.abort()},[s,t]);let c=q(a.status===`done`?a.items:[],r);return(0,Z.jsxs)(B,{stack:!0,title:`History`,description:`Occurrences of this automation. Routine successes are hidden from the board and appear only here.`,testId:`automation-history`,children:[a.status===`unsupported`&&(0,Z.jsx)(k,{capability:`Automation history`,reason:`This coordinator does not serve stored history; only occurrences seen live in this session are shown.`}),a.status===`error`&&(0,Z.jsx)(T,{compact:!0,title:`Could not load history`,error:a.error,onRetry:()=>void s()}),a.status===`loading`&&c.length===0?(0,Z.jsx)(x,{label:`Loading history…`,className:`py-4`}):c.length===0&&a.status!==`error`?(0,Z.jsx)(D,{className:`py-4`,icon:(0,Z.jsx)(He,{className:`size-6`}),title:`No occurrences yet`,description:`Occurrences appear here when the trigger fires or you run it.`,action:{label:`Run now`,onClick:n,icon:(0,Z.jsx)(ge,{className:`size-4`})}}):(0,Z.jsx)(`ol`,{className:`flex flex-col divide-y divide-border`,children:c.map(e=>{let t=Be(e),n=e.taskId?i[e.taskId]:void 0,r=[e.reason,e.outcome].filter(Boolean).join(` · `);return(0,Z.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-1 py-2 first:pt-0 last:pb-0`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,Z.jsx)(f,{kind:`occurrence`,value:e.state,size:`sm`}),(0,Z.jsx)(`time`,{dateTime:t,className:`text-sm`,children:J(t)}),(0,Z.jsx)(`span`,{className:`text-xs text-muted`,children:S(t)})]}),r&&(0,Z.jsx)(`p`,{className:`text-sm break-words text-muted`,children:r}),e.taskId&&(0,Z.jsxs)(R,{to:Ue(e.taskId),variant:`action`,size:`sm`,className:`self-start`,children:[(0,Z.jsx)(`span`,{className:`min-w-0 truncate`,children:n?`Task: ${n.title}`:`Open task`}),n?.hiddenFromBoard&&(0,Z.jsx)(`span`,{className:`shrink-0 text-xs text-muted`,children:`(hidden from board)`})]})]},e.id)})})]})}var Qe=`/automations`,$e=e=>`/automations/${encodeURIComponent(e)}`,et=`sy:automation-draft`;function tt(){let{automationId:e=`new`}=c();return(0,Z.jsx)(nt,{automationId:e},e)}function nt({automationId:e}){let t=e===`new`,n=v(e=>e.hydrated),r=U(t?void 0:e),[i,a]=(0,X.useState)({status:`idle`}),o=(0,X.useCallback)(async()=>{a({status:`loading`});try{let t=await C(Y(e)),n=b.safeParse(t);if(!n.success){a({status:`fatal`,error:Error(`The coordinator returned this automation in an unexpected format.`)});return}W.getState().put(n.data),a({status:`idle`})}catch(e){_(e)&&e.status===404?a({status:`notfound`}):a({status:`error`,error:e})}},[e]),s=!t&&!r;return(0,X.useEffect)(()=>{s&&i.status===`idle`&&o()},[s,i.status,o]),t?(0,Z.jsx)(ot,{automation:null}):r?(0,Z.jsx)(ot,{automation:r}):i.status===`notfound`?(0,Z.jsx)(D,{icon:(0,Z.jsx)(Ce,{className:`size-8`}),title:`Automation not found`,description:`It may have been deleted, or the link is wrong.`,action:{label:`Back to automations`,to:Qe}}):i.status===`error`?(0,Z.jsx)(T,{title:`Could not load this automation`,error:i.error,onRetry:()=>void o()}):i.status===`fatal`?(0,Z.jsx)(E,{error:i.error}):(0,Z.jsx)(x,{label:n?`Loading automation…`:`Loading…`})}function rt(e){let t=De({projectId:e,timezone:Oe()});try{let e=sessionStorage.getItem(et);if(!e)return t;let n=JSON.parse(e);return!n||typeof n!=`object`?t:{...t,...n,filters:Array.isArray(n.filters)?n.filters:[]}}catch{return t}}function it(e){try{e?sessionStorage.setItem(et,JSON.stringify(e)):sessionStorage.removeItem(et)}catch{}}var $=e=>JSON.stringify(Le(e));function at(e){if(!_(e))return{};let t=e.details,n=Array.isArray(t)?t:t&&typeof t==`object`&&Array.isArray(t.issues)?t.issues:[],r={};for(let e of n){if(!e||typeof e!=`object`)continue;let{path:t,message:n}=e;if(!Array.isArray(t)||typeof n!=`string`)continue;let i=K(t);i!==`form`&&!r[i]&&(r[i]=n)}return r}function ot({automation:e}){let i=t(),o=r(),c=fe(Qe),l=he(),u=l===`desktop`,d=re(),f=ae(),m=v(e=>e.hosts),h=v(e=>e.profiles),_=v(e=>e.tasks),b=v(e=>e.projects),x=e===null,S=(0,X.useId)(),C=(0,X.useRef)(null),[T,E]=(0,X.useState)(()=>e?Ae(e):rt(d[0]?.id)),[D,O]=(0,X.useState)(()=>$(T)),[k,A]=(0,X.useState)(!1),[ce,j]=(0,X.useState)({}),[le,ue]=(0,X.useState)(!1),[de,M]=(0,X.useState)(!1),[_e,P]=(0,X.useState)(!1),[xe,F]=(0,X.useState)(!1),[Ce,I]=(0,X.useState)(0),L=(0,X.useRef)(e?.updatedAt),R=$(T),z=R!==D;(0,X.useEffect)(()=>{if(!e||e.updatedAt===L.current)return;L.current=e.updatedAt;let t=Ae(e),n=$(t);R===D?(E(t),F(!1)):n!==R&&F(!0),O(n)},[e,R,D]),(0,X.useEffect)(()=>{x&&it(T)},[x,T]),(0,X.useEffect)(()=>{x&&!T.projectId&&d[0]&&E(e=>e.projectId?e:{...e,projectId:d[0].id})},[x,T.projectId,d]);let B=(0,X.useCallback)((e,t)=>{E(n=>({...n,[e]:t})),j(e=>Object.keys(e).length?{}:e)},[]),V=(0,X.useMemo)(()=>Te(T),[T]),H={...ce,...k?V.errors:{}},U=e=>H[e],G=b[T.projectId],K=T.hostId||G?.defaultHostId||null,q=K?m[K]:void 0,ke=T.profileId||G?.defaultProfileId||null,je=(0,X.useCallback)(e=>_[e]?.title,[_]),Me=(0,X.useMemo)(()=>Ee(Le(T),{projectName:G?.name,hostName:T.hostId?m[T.hostId]?.name??null:null,profileName:T.profileId?h[T.profileId]?.name??null:null,taskTitle:je}),[T,G?.name,m,h,je]),Ne=()=>{requestAnimationFrame(()=>{C.current?.querySelector(`[aria-invalid="true"]`)?.focus()})},J=()=>(A(!0),V.input||Ne(),V.input),Pe=async()=>{let t=J();if(!t)N.error(`Fix the highlighted fields before saving`);else{ue(!0);try{if(x){let e=await y(`/api/automations`,t);if(!e||typeof e!=`object`||!e.id)throw Error(`The coordinator did not return the new automation`);W.getState().put(e),it(null),N.success(`Created ${e.name}`),i($e(e.id),{replace:!0,state:o.state});return}let n=await ie(Y(e.id),t);if(n&&typeof n==`object`&&n.id){W.getState().put(n),L.current=n.updatedAt;let e=Ae(n);E(e),O($(e))}else O(R);F(!1),A(!1),N.success(`Saved ${t.name}`)}catch(e){let t=at(e);j(t),Object.keys(t).length&&Ne(),N.error(`Could not save: ${g(e)}. Your changes are kept.`)}finally{ue(!1)}}},Fe=async()=>{if(e){M(!0);try{await ne(Y(e.id)),P(!1),N.success(`Deleted ${e.name}`),c(),W.getState().remove(e.id)}catch(e){N.error(`Could not delete: ${g(e)}`)}finally{M(!1)}}},{busy:Ie,run:Re}=we(()=>I(e=>e+1)),ze=e?!!Ie[e.id]:!1,Be=()=>e&&void Re(e),Ve=()=>{let e=De({projectId:d[0]?.id,timezone:Oe()});E(e),A(!1),it(null)},He=x?`New automation`:e.name,Ue=(0,Z.jsxs)(Z.Fragment,{children:[!x&&(0,Z.jsx)(s,{icon:(0,Z.jsx)(ge,{className:`size-4`}),busy:ze,onClick:Be,title:z?`Runs the saved version`:void 0,children:`Run now`}),x&&z&&(0,Z.jsx)(s,{variant:`ghost`,icon:(0,Z.jsx)(pe,{className:`size-4`}),onClick:Ve,children:`Discard draft`})]}),Q=e=>(0,Z.jsx)(s,{type:`submit`,form:S,variant:`primary`,busy:le,block:e,icon:(0,Z.jsx)(ve,{className:`size-4`}),children:x?`Create automation`:`Save`}),Ge=(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(We,{summary:Me,errorCount:k?Object.keys(V.errors).length:0}),(0,Z.jsx)(Ke,{automationId:e?.id??null,dirty:z,getInput:J,currentKey:JSON.stringify(V.input)}),e&&e.trigger.kind===`webhook`&&(0,Z.jsx)(Ye,{automation:e}),e&&(0,Z.jsx)(Ze,{automationId:e.id,refreshKey:Ce,onRun:Be})]});return(0,Z.jsxs)(`div`,{"data-testid":`automation-editor`,className:`flex w-full min-w-0 flex-col gap-4 px-4 pt-4 md:px-6`,children:[(0,Z.jsxs)(`header`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsxs)(a,{to:Qe,onClick:me(c),className:`tap inline-flex items-center gap-1 self-start rounded text-sm text-muted hover:text-text`,children:[(0,Z.jsx)(ee,{"aria-hidden":!0,className:`size-4`}),`Automations`]}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center justify-between gap-2`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,Z.jsx)(`h1`,{className:`min-w-0 text-lg font-semibold break-words`,children:He}),z&&(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-muted`,children:[(0,Z.jsx)(p,{"aria-hidden":!0,className:`size-3.5`}),`Unsaved changes`]})]}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[Ue,u&&Q()]})]})]}),(0,Z.jsx)(se,{subject:`automations`,consequence:`Changes are sent once the coordinator is reachable again.`}),q&&q.connectivity!==`connected`&&(0,Z.jsx)(oe,{compact:!0,hostName:q.name,connectivity:q.connectivity,lastSeenAt:q.lastSeenAt,detail:`Occurrences are still recorded; their tasks wait until the host is reachable.`}),xe&&(0,Z.jsxs)(`p`,{role:`status`,className:`flex items-start gap-1.5 rounded-md border border-border bg-warning-soft px-3 py-2 text-sm`,children:[(0,Z.jsx)(w,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 text-warning`}),`This automation changed elsewhere. Saving overwrites those changes with yours.`]}),(0,Z.jsxs)(`div`,{className:n(`grid min-w-0 gap-4`,u?`grid-cols-[minmax(0,1fr)_minmax(320px,400px)] items-start`:`grid-cols-1`),children:[(0,Z.jsxs)(`form`,{id:S,ref:C,noValidate:!0,"aria-label":He,onSubmit:e=>{e.preventDefault(),Pe()},className:`flex min-w-0 flex-col gap-4`,children:[(0,Z.jsx)(st,{draft:T,update:B,err:U,projects:d}),(0,Z.jsx)(ut,{draft:T,update:B,err:U,tasks:_,projectsById:b,savedAutomation:e,segmented:l!==`mobile`}),(0,Z.jsx)(dt,{draft:T,setDraft:E,err:U}),(0,Z.jsx)(ft,{draft:T,update:B,err:U}),(0,Z.jsx)(mt,{draft:T,update:B,err:U,hosts:f,profiles:Object.values(h).sort((e,t)=>e.name.localeCompare(t.name)),defaultHostName:G?.defaultHostId?m[G.defaultHostId]?.name:void 0,defaultProfileName:G?.defaultProfileId?h[G.defaultProfileId]?.name:void 0,selectedProfileMissing:!!ke&&!h[ke]}),(0,Z.jsx)(ht,{draft:T,update:B}),(0,Z.jsx)(gt,{draft:T,update:B,err:U}),(0,Z.jsx)(_t,{draft:T,update:B,err:U,projectChecks:G?.checks}),H.form&&(0,Z.jsx)(be,{children:H.form})]}),(0,Z.jsx)(`aside`,{"aria-label":`Summary, preview and history`,className:`flex min-w-0 flex-col gap-4`,children:Ge})]}),!x&&e&&(0,Z.jsx)(ye,{description:`Future occurrences stop. Tasks it already created stay on the board; its history is removed.`,children:(0,Z.jsx)(s,{variant:`danger`,icon:(0,Z.jsx)(Se,{className:`size-4`}),onClick:()=>P(!0),children:`Delete automation`})}),u?(0,Z.jsx)(`div`,{className:`h-4`}):(0,Z.jsxs)(`div`,{className:`sticky bottom-0 z-10 -mx-4 flex items-center gap-3 border-t border-border bg-surface px-4 py-2 md:-mx-6 md:px-6`,children:[(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-muted`,children:z?`Unsaved changes`:x?`Not saved yet`:`All changes saved`}),Q()]}),(0,Z.jsx)(te,{open:_e,onClose:()=>P(!1),title:`Delete ${e?.name??`automation`}?`,description:`Future occurrences stop. Tasks it already created stay on the board; its history is removed.`,confirmLabel:`Delete automation`,confirmIcon:(0,Z.jsx)(Se,{className:`size-4`}),busy:de,onConfirm:()=>void Fe()})]})}function st({draft:e,update:t,err:n,projects:r}){return(0,Z.jsxs)(B,{stack:!0,title:`Basics`,children:[(0,Z.jsx)(P,{label:`Name`,error:n(`name`),children:n=>(0,Z.jsx)(I,{...n,value:e.name,onChange:e=>t(`name`,e.target.value),placeholder:`Daily dependency check`,autoComplete:`off`})}),(0,Z.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,Z.jsx)(P,{label:`Project`,error:n(`projectId`),hint:r.length===0?(0,Z.jsxs)(Z.Fragment,{children:[`No projects yet.`,` `,(0,Z.jsx)(R,{to:`/settings/projects`,children:`Add a project in Settings`}),`.`]}):void 0,children:n=>(0,Z.jsxs)(V,{...n,value:e.projectId,onChange:e=>t(`projectId`,e.target.value),children:[(0,Z.jsx)(`option`,{value:``,children:`Choose a project`}),r.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.name},e.id))]})}),(0,Z.jsx)(P,{label:`Status`,hint:`Disabled automations keep their history and can still run manually.`,children:n=>(0,Z.jsx)(H,{...n,checked:e.enabled,onChange:e=>t(`enabled`,e),label:`Enabled`,onText:`Enabled`,offText:`Disabled`,className:`self-start`})})]})]})}var ct=[`manual`,`once`,`cron`,`webhook`,`dependency`],lt={manual:`Runs only when you press Run now (or from the CLI).`,once:`Runs a single time at the chosen moment.`,cron:`Runs on a timezone-aware cron schedule.`,webhook:`Runs when an authenticated JSON POST arrives at this automation's webhook URL.`,dependency:`Runs when the chosen task is done.`};function ut({draft:e,update:t,err:n,tasks:r,projectsById:i,savedAutomation:a,segmented:o}){let s=v(e=>e.hydrated),c=e.triggerKind===`cron`?ze(e.cronExpr):null,l=e.triggerKind===`cron`&&!c?Fe(e.cronExpr,e.cronTimezone.trim()||void 0)??`Valid expression (no plain-language description available)`:null,u=(0,X.useMemo)(()=>{try{return Intl.supportedValuesOf?.(`timeZone`)}catch{return}},[]),d=(0,X.useId)(),f=Oe(),ee=(0,X.useMemo)(()=>Object.values(r).filter(t=>t.state!==`canceled`||t.id===e.dependencyTaskId).sort((e,t)=>e.title.localeCompare(t.title)),[r,e.dependencyTaskId]),p=e.triggerKind===`once`?je(e.onceAt):``;return(0,Z.jsxs)(B,{stack:!0,title:`Trigger`,description:lt[e.triggerKind],children:[o?(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{"aria-hidden":!0,className:`text-sm font-medium`,children:`Trigger kind`}),(0,Z.jsx)(`div`,{className:`overflow-x-auto`,children:(0,Z.jsx)(z,{label:`Trigger kind`,value:e.triggerKind,onChange:e=>t(`triggerKind`,e),options:ct.map(e=>({value:e,label:G[e]}))})})]}):(0,Z.jsx)(P,{label:`Trigger kind`,children:n=>(0,Z.jsx)(V,{...n,value:e.triggerKind,onChange:e=>t(`triggerKind`,e.target.value),children:ct.map(e=>(0,Z.jsx)(`option`,{value:e,children:G[e]},e))})}),e.triggerKind===`once`&&(0,Z.jsx)(P,{label:`Run at`,error:n(`onceAt`),hint:`Local time (${f})${p?`; saved as ${p}`:``}.`,children:n=>(0,Z.jsx)(I,{...n,type:`datetime-local`,value:e.onceAt,onChange:e=>t(`onceAt`,e.target.value)})}),e.triggerKind===`cron`&&(0,Z.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,Z.jsx)(P,{label:`Cron expression`,error:n(`cronExpr`)??c??void 0,hint:`minute hour day-of-month month day-of-week, e.g. 0 9 * * 1-5`,children:n=>(0,Z.jsx)(I,{...n,"aria-invalid":c?!0:n[`aria-invalid`],value:e.cronExpr,onChange:e=>t(`cronExpr`,e.target.value),className:`font-mono`,autoComplete:`off`,spellCheck:!1,autoCapitalize:`off`})}),(0,Z.jsx)(P,{label:`Timezone`,error:n(`cronTimezone`),hint:e.cronTimezone.trim()===f?`IANA timezone name; daylight saving is handled.`:(0,Z.jsxs)(R,{onClick:()=>t(`cronTimezone`,f),children:[`Use this device's timezone (`,f,`)`]}),children:n=>(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(I,{...n,list:u?d:void 0,value:e.cronTimezone,onChange:e=>t(`cronTimezone`,e.target.value),autoComplete:`off`,spellCheck:!1,autoCapitalize:`off`}),u&&(0,Z.jsx)(`datalist`,{id:d,children:u.map(e=>(0,Z.jsx)(`option`,{value:e},e))})]})}),l&&(0,Z.jsxs)(`p`,{className:`flex items-start gap-1.5 text-sm sm:col-span-2`,"aria-live":`polite`,"data-testid":`cron-description`,children:[(0,Z.jsx)(A,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 text-muted`}),(0,Z.jsx)(`span`,{className:`min-w-0 break-words`,children:l})]})]}),e.triggerKind===`webhook`&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1 text-sm text-muted`,children:[(0,Z.jsxs)(`p`,{children:[`Senders POST a JSON body (up to 256 KB) with`,` `,(0,Z.jsx)(`code`,{children:`Authorization: Bearer <token>`}),`. Use the filters below to fire only for matching payloads, and `,(0,Z.jsx)(`code`,{children:`{{payload.<path>}}`}),` to copy payload values into the task.`]}),a?a.trigger.kind===`webhook`?(0,Z.jsxs)(`p`,{children:[`Token:`,` `,a.webhookTokenSet?`set (see Webhook below to rotate)`:`not created yet`]}):(0,Z.jsx)(`p`,{children:`Save to switch this automation to a webhook trigger, then create a token.`}):(0,Z.jsx)(`p`,{children:`Save the automation to create its webhook token and URL.`})]}),e.triggerKind===`dependency`&&(0,Z.jsx)(P,{label:`When this task is done`,error:n(`dependencyTaskId`),hint:`Fires once each time the task enters Done.`,children:n=>(0,Z.jsxs)(V,{...n,value:e.dependencyTaskId,onChange:e=>t(`dependencyTaskId`,e.target.value),children:[(0,Z.jsx)(`option`,{value:``,children:`Choose a task`}),e.dependencyTaskId&&!r[e.dependencyTaskId]&&(0,Z.jsx)(`option`,{value:e.dependencyTaskId,children:s?`Deleted task`:`Loading task…`}),ee.map(e=>(0,Z.jsxs)(`option`,{value:e.id,children:[e.title,i[e.projectId]?` (${i[e.projectId].name})`:``,e.state===`done`?` - done`:``]},e.id))]})})]})}function dt({draft:e,setDraft:t,err:n}){let r=(e,n)=>t(t=>({...t,filters:t.filters.map((t,r)=>r===e?{...t,...n}:t)})),i=e.triggerKind===`webhook`;return(0,Z.jsxs)(B,{stack:!0,title:`Filters`,description:`Filters apply to webhook payloads. Each row compares a dot path (for example pull_request.base.ref) with an exact value; all rows must match. Payloads that do not match are recorded as Filtered out.`,children:[!i&&(0,Z.jsx)(`p`,{className:`text-sm text-muted`,children:`Filters are ignored unless the trigger is Webhook.`}),e.filters.length===0&&(0,Z.jsx)(`p`,{className:`text-sm text-muted`,children:`No filters: every payload fires.`}),e.filters.map((e,i)=>(0,Z.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-end gap-2 sm:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]`,children:[(0,Z.jsx)(P,{label:`Path ${i+1}`,error:n(`filters.${i}.path`),children:t=>(0,Z.jsx)(I,{...t,value:e.path,onChange:e=>r(i,{path:e.target.value}),placeholder:`action`,className:`font-mono`,autoCapitalize:`off`,spellCheck:!1})}),(0,Z.jsx)(P,{label:`Equals ${i+1}`,error:n(`filters.${i}.equals`),className:`col-start-1 row-start-2 sm:col-start-auto sm:row-start-auto`,children:t=>(0,Z.jsx)(I,{...t,value:e.equals,onChange:e=>r(i,{equals:e.target.value}),placeholder:`opened`})}),(0,Z.jsx)(m,{label:`Remove filter ${i+1}`,icon:(0,Z.jsx)(pe,{className:`size-4`}),onClick:()=>t(e=>({...e,filters:e.filters.filter((e,t)=>t!==i)}))})]},i)),(0,Z.jsx)(`div`,{children:(0,Z.jsx)(s,{size:`sm`,icon:(0,Z.jsx)(_e,{className:`size-3.5`}),onClick:()=>t(e=>({...e,filters:[...e.filters,{path:``,equals:``}]})),children:`Add filter`})})]})}function ft({draft:e,update:t,err:n}){return(0,Z.jsxs)(B,{stack:!0,title:`Task template`,description:`Use ${ke.join(`, `)} in the title, objective, criteria and grouping key.`,children:[(0,Z.jsx)(P,{label:`Task title`,error:n(`title`),children:n=>(0,Z.jsx)(I,{...n,value:e.title,onChange:e=>t(`title`,e.target.value),placeholder:`Triage new issues for {{date}}`})}),(0,Z.jsx)(P,{label:`Objective`,error:n(`objective`),children:n=>(0,Z.jsx)(F,{...n,minRows:4,value:e.objective,onChange:e=>t(`objective`,e.target.value)})}),(0,Z.jsx)(P,{label:`Acceptance criteria`,error:n(`criteria`),hint:`One criterion per line.`,optional:!0,children:n=>(0,Z.jsx)(F,{...n,minRows:3,value:e.criteria,onChange:e=>t(`criteria`,e.target.value)})}),(0,Z.jsx)(P,{label:`Priority`,error:n(`priority`),children:n=>(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(de,{priority:e.priority}),(0,Z.jsx)(ue,{...n,value:e.priority,onChange:e=>t(`priority`,e),className:`sm:max-w-48`})]})})]})}function pt({legend:e,value:t,options:r,onChange:i,hint:a}){let o=(0,X.useId)();return(0,Z.jsxs)(`fieldset`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`legend`,{className:`mb-1 text-sm font-medium`,children:e}),(0,Z.jsx)(`div`,{className:`grid min-w-0 gap-2 sm:grid-cols-3`,children:r.map(e=>(0,Z.jsxs)(`label`,{className:n(`tap flex min-w-0 cursor-pointer items-start gap-2 rounded-md border p-2.5 text-sm`,`has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-1`,t===e.value?`border-accent bg-accent-soft`:`border-border hover:bg-surface-2`),children:[(0,Z.jsx)(`input`,{type:`radio`,name:o,value:e.value,checked:t===e.value,onChange:()=>i(e.value),className:`mt-0.5 size-4 shrink-0 accent-[var(--color-accent)]`}),(0,Z.jsxs)(`span`,{className:`min-w-0`,children:[(0,Z.jsx)(`span`,{className:`block font-medium`,children:e.label}),(0,Z.jsx)(`span`,{className:`block text-xs text-muted`,children:e.explanation})]})]},e.value))}),a&&(0,Z.jsx)(`p`,{className:`text-xs text-muted`,children:a})]})}function mt({draft:e,update:t,err:n,hosts:r,profiles:i,defaultHostName:a,defaultProfileName:o,selectedProfileMissing:s}){return(0,Z.jsxs)(B,{stack:!0,title:`Where and how it runs`,children:[(0,Z.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,Z.jsx)(P,{label:`Host`,error:n(`hostId`),children:n=>(0,Z.jsxs)(V,{...n,value:e.hostId,onChange:e=>t(`hostId`,e.target.value),children:[(0,Z.jsxs)(`option`,{value:``,children:[`Project default`,a?` (${a})`:``]}),e.hostId&&!r.some(t=>t.id===e.hostId)&&(0,Z.jsx)(`option`,{value:e.hostId,children:`Unknown host`}),r.map(e=>(0,Z.jsxs)(`option`,{value:e.id,children:[e.name,e.connectivity===`connected`?``:` (${e.connectivity})`]},e.id))]})}),(0,Z.jsx)(P,{label:`Profile`,error:n(`profileId`),hint:s?`The selected profile is no longer available.`:void 0,children:n=>(0,Z.jsxs)(V,{...n,value:e.profileId,onChange:e=>t(`profileId`,e.target.value),children:[(0,Z.jsxs)(`option`,{value:``,children:[`Project default`,o?` (${o})`:``]}),e.profileId&&!i.some(t=>t.id===e.profileId)&&(0,Z.jsx)(`option`,{value:e.profileId,children:`Unknown profile`}),i.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.name},e.id))]})})]}),(0,Z.jsx)(pt,{legend:`Mode`,value:e.mode,options:Me,onChange:e=>t(`mode`,e)}),(0,Z.jsx)(P,{label:`Grouping key`,optional:e.mode!==`continue`,error:n(`groupingKey`),hint:`Occurrences with the same rendered key are the same work: Continue reuses that task and overlap checks compare it. Supports template variables, e.g. pr-{{payload.number}}.`,children:n=>(0,Z.jsx)(I,{...n,value:e.groupingKey,onChange:e=>t(`groupingKey`,e.target.value),className:`font-mono`,autoCapitalize:`off`,spellCheck:!1})})]})}function ht({draft:e,update:t}){let n=e.triggerKind===`cron`||e.triggerKind===`once`;return(0,Z.jsxs)(B,{stack:!0,title:`Overlap and missed runs`,children:[(0,Z.jsx)(pt,{legend:`When previous work is still open`,value:e.overlap,options:Pe,onChange:e=>t(`overlap`,e)}),(0,Z.jsx)(pt,{legend:`Missed runs`,value:e.missed,options:Ie,onChange:e=>t(`missed`,e),hint:n?`A run is missed when the coordinator was down at its scheduled time.`:`Only applies to Schedule and Once triggers.`})]})}function gt({draft:e,update:t,err:n}){return(0,Z.jsxs)(B,{stack:!0,title:`Limits`,description:`Continuation prompts the agent to keep going after a turn ends without finishing. It is off by default.`,children:[(0,Z.jsx)(P,{label:`Automatic continuation`,children:n=>(0,Z.jsx)(H,{...n,checked:e.continuationEnabled,onChange:e=>t(`continuationEnabled`,e),label:`Automatic continuation`,className:`self-start`})}),e.continuationEnabled&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(P,{label:`Continuation objective`,error:n(`continuationObjective`),hint:`What the agent must achieve before it reports done.`,children:n=>(0,Z.jsx)(F,{...n,minRows:2,value:e.continuationObjective,onChange:e=>t(`continuationObjective`,e.target.value)})}),(0,Z.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,Z.jsx)(P,{label:`Max continuations`,error:n(`maxContinuations`),hint:`1–50`,children:n=>(0,Z.jsx)(I,{...n,type:`number`,inputMode:`numeric`,min:1,max:50,step:1,value:e.maxContinuations,onChange:e=>t(`maxContinuations`,e.target.value)})}),(0,Z.jsx)(P,{label:`Max elapsed minutes`,error:n(`maxElapsedMinutes`),hint:`1–1440`,children:n=>(0,Z.jsx)(I,{...n,type:`number`,inputMode:`numeric`,min:1,max:1440,step:1,value:e.maxElapsedMinutes,onChange:e=>t(`maxElapsedMinutes`,e.target.value)})}),(0,Z.jsx)(P,{label:`Continuation budget: tokens`,optional:!0,error:n(`maxTokens`),children:n=>(0,Z.jsx)(I,{...n,type:`number`,inputMode:`numeric`,min:1,step:1,value:e.maxTokens,onChange:e=>t(`maxTokens`,e.target.value)})}),(0,Z.jsx)(P,{label:`Continuation budget: cost (USD)`,optional:!0,error:n(`maxCostUsd`),children:n=>(0,Z.jsx)(I,{...n,type:`number`,inputMode:`decimal`,min:.01,step:.01,value:e.maxCostUsd,onChange:e=>t(`maxCostUsd`,e.target.value)})})]}),(0,Z.jsx)(`p`,{className:`text-xs text-muted`,children:xe})]})]})}function _t({draft:e,update:t,err:n,projectChecks:r}){let i=r&&r.length>0?`the project's checks (${r.join(`, `)})`:`the project's checks`;return(0,Z.jsxs)(B,{stack:!0,title:`Review`,children:[(0,Z.jsx)(P,{label:`Checks`,optional:!0,error:n(`checks`),hint:`One command per line. Leave empty to use ${i}.`,children:n=>(0,Z.jsx)(F,{...n,minRows:2,value:e.checks,onChange:e=>t(`checks`,e.target.value),className:`font-mono`,spellCheck:!1,autoCapitalize:`off`})}),(0,Z.jsx)(P,{label:`Human review`,hint:`When on, finished work waits in Review for you instead of completing on passing checks.`,children:n=>(0,Z.jsx)(H,{...n,checked:e.requireHumanReview,onChange:e=>t(`requireHumanReview`,e),label:`Require human review`,onText:`Required`,offText:`Not required`,className:`self-start`})})]})}export{tt as default};
2
- //# sourceMappingURL=AutomationView-BMQuTl3j.js.map
@@ -1,2 +0,0 @@
1
- import{S as e,a as t,i as n,o as r,y as i}from"./Button-BKQW9doW.js";var a={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};a.node;var o=r(a),s=e(i(),1),c=n();function l({label:e,description:n,checked:r,onChange:i,className:a,id:o,...l}){let u=(0,s.useId)(),d=n?`${o??u}-desc`:void 0;return(0,c.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,c.jsxs)(`label`,{className:t(`tap inline-flex min-w-0 cursor-pointer items-center gap-2 text-sm`,a),children:[(0,c.jsx)(`input`,{...l,id:o,type:`checkbox`,checked:r,onChange:e=>i(e.target.checked),"aria-describedby":d??l[`aria-describedby`],className:`size-4 shrink-0 accent-[var(--sy-accent)]`}),(0,c.jsx)(`span`,{className:t(`min-w-0`,!!n&&`font-medium`),children:e})]}),n&&(0,c.jsx)(`p`,{id:d,className:`pl-6 text-sm text-muted`,children:n})]})}export{o as n,l as t};
2
- //# sourceMappingURL=Checkbox-D18Ch0n4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Checkbox-D18Ch0n4.js","names":["useId","__toESM","cn","require_jsx_runtime","createLucideIcon","require_react","__iconData","Search","import_react","import_jsx_runtime","Checkbox","rest","generated","descId","description","id","className","onChange","label"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/search.mjs","../../src/components/ui/Checkbox.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"search\",\n size: 24,\n node: [\n [\"path\", { d: \"m21 21-4.34-4.34\", key: \"14j7rj\" }],\n [\"circle\", { cx: \"11\", cy: \"11\", r: \"8\", key: \"4ej97u\" }]\n ]\n};\n__iconData.node;\nconst Search = createLucideIcon(__iconData);\n\nexport { __iconData, Search as default };\n//# sourceMappingURL=search.mjs.map\n","import { type InputHTMLAttributes, type ReactNode, useId } from \"react\";\nimport { cn } from \"../../lib/cn\";\n\nexport interface CheckboxProps\n extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\" | \"checked\" | \"onChange\" | \"className\"\n > {\n label: ReactNode;\n /** Shown under the label; kept outside the label so it is not part of the accessible name. */\n description?: ReactNode;\n checked: boolean;\n onChange(checked: boolean): void;\n /** Classes for the clickable label row. */\n className?: string;\n}\n\n/** Native checkbox with its label; the whole row is the touch target. */\nexport function Checkbox({\n label,\n description,\n checked,\n onChange,\n className,\n id,\n ...rest\n}: CheckboxProps) {\n const generated = useId();\n const descId = description ? `${id ?? generated}-desc` : undefined;\n return (\n <div className=\"flex min-w-0 flex-col\">\n <label\n className={cn(\n \"tap inline-flex min-w-0 cursor-pointer items-center gap-2 text-sm\",\n className,\n )}\n >\n <input\n {...rest}\n id={id}\n type=\"checkbox\"\n checked={checked}\n onChange={(e) => onChange(e.target.checked)}\n aria-describedby={descId ?? rest[\"aria-describedby\"]}\n className=\"size-4 shrink-0 accent-[var(--sy-accent)]\"\n />\n <span className={cn(\"min-w-0\", !!description && \"font-medium\")}>{label}</span>\n </label>\n {description && (\n <p id={descId} className=\"pl-6 text-sm text-muted\">\n {description}\n </p>\n )}\n </div>\n );\n}\n"],"ignoreList":[0],"mappings":"A,qEASA,IAAMM,EAAa,CACjB,KAAM,SACN,KAAM,GACN,KAAM,CACJ,CAAC,OAAQ,CAAE,EAAG,mBAAoB,IAAK,QAAS,CAAC,EACjD,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,IAAK,IAAK,QAAS,CAAC,CAC1D,CACF,EACAA,EAAW,KACX,IAAMC,EAASH,EAAiBE,CAAU,E,iBCA1C,SAAgBI,EAAS,CACvB,QACA,cACA,UACA,WACA,YACA,KACA,GAAGC,GACa,CAChB,IAAMC,GAAA,EAAYZ,EAAAA,MAAAA,CAAM,EAClBa,EAASC,EAAc,GAAGC,GAAMH,EAAU,OAAS,IAAA,GACzD,OACE,EAAAH,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,wBAAf,SAAA,EACE,EAAAA,EAAA,KAAA,CAAC,QAAD,CACE,UAAWP,EACT,oEACAc,CACF,EAJF,SAAA,EAME,EAAAP,EAAA,IAAA,CAAC,QAAD,CACE,GAAIE,EACA,KACJ,KAAK,WACI,UACT,SAAW,GAAMM,EAAS,EAAE,OAAO,OAAO,EAC1C,mBAAkBJ,GAAUF,EAAK,oBACjC,UAAU,2CACX,CAAA,GACD,EAAAF,EAAA,IAAA,CAAC,OAAD,CAAM,UAAWP,EAAG,UAAW,CAAC,CAACY,GAAe,aAAa,EAAI,SAAAI,CAAY,CAAA,CACxE,CACN,CAAA,EAAAJ,IACC,EAAAL,EAAA,IAAA,CAAC,IAAD,CAAG,GAAII,EAAQ,UAAU,0BACtB,SAAAC,CACA,CAAA,CAEF,C,EAET,C"}
@@ -1,2 +0,0 @@
1
- import{S as e,i as t,o as n,t as r,y as i}from"./Button-BKQW9doW.js";import{s as a}from"./useBreakpoint-kT0J1Dnk.js";var o={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};o.node;var s=n(o),c={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};c.node;var l=n(c),u=e(i(),1),d=t();async function f(e,t=`Copied to clipboard`){try{return await navigator.clipboard.writeText(e),t&&a.success(t),!0}catch{return a.error(`Could not copy. Select the text and copy it manually.`),!1}}function p({text:e,label:t=`Copy`,toastMessage:n,size:i=`sm`}){let[a,o]=(0,u.useState)(!1),c=(0,u.useRef)(null);return(0,u.useEffect)(()=>()=>void(c.current&&clearTimeout(c.current)),[]),(0,d.jsx)(r,{size:i,icon:a?(0,d.jsx)(s,{className:`size-4`}):(0,d.jsx)(l,{className:`size-4`}),onClick:async()=>{await f(e,n)&&(o(!0),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>o(!1),2e3))},children:a?`Copied`:t})}function m({text:e,label:t,copyLabel:n=`Copy`}){return(0,d.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col gap-2 sm:flex-row sm:items-start`,children:[(0,d.jsx)(`figcaption`,{className:`sr-only`,children:t}),(0,d.jsx)(`pre`,{className:`min-w-0 flex-1 whitespace-pre-wrap break-all rounded-md border border-border bg-surface-2 px-3 py-2 font-mono text-sm`,children:e}),(0,d.jsx)(p,{text:e,label:n})]})}export{s as i,f as n,l as r,m as t};
2
- //# sourceMappingURL=Copy-D6U5ewFc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Copy-D6U5ewFc.js","names":["__iconData","useState","useRef","__toESM","require_jsx_runtime","createLucideIcon","Button","require_react","toast","__iconData$1","Check","__iconData","Copy","import_react","import_jsx_runtime","copyText","text","success","CopyButton","copied","setCopied","timer","toastMessage","label","CopyBlock","copyLabel"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/check.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/copy.mjs","../../src/components/ui/Copy.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"check\",\n size: 24,\n node: [[\"path\", { d: \"M20 6 9 17l-5-5\", key: \"1gmf2c\" }]]\n};\n__iconData.node;\nconst Check = createLucideIcon(__iconData);\n\nexport { __iconData, Check as default };\n//# sourceMappingURL=check.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"copy\",\n size: 24,\n node: [\n [\"rect\", { width: \"14\", height: \"14\", x: \"8\", y: \"8\", rx: \"2\", ry: \"2\", key: \"17jyea\" }],\n [\"path\", { d: \"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\", key: \"zix9uf\" }]\n ]\n};\n__iconData.node;\nconst Copy = createLucideIcon(__iconData);\n\nexport { __iconData, Copy as default };\n//# sourceMappingURL=copy.mjs.map\n","import { Check, Copy } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { Button } from \"./Button\";\nimport { toast } from \"./Toast\";\n\n/** Copy text to the clipboard with a toast; pass `false` to stay silent on success. */\nexport async function copyText(\n text: string,\n success: string | false = \"Copied to clipboard\",\n): Promise<boolean> {\n try {\n await navigator.clipboard.writeText(text);\n if (success) toast.success(success);\n return true;\n } catch {\n toast.error(\"Could not copy. Select the text and copy it manually.\");\n return false;\n }\n}\n\nexport function CopyButton({\n text,\n label = \"Copy\",\n toastMessage,\n size = \"sm\",\n}: {\n text: string;\n label?: string;\n toastMessage?: string;\n size?: \"sm\" | \"md\";\n}) {\n const [copied, setCopied] = useState(false);\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(() => () => void (timer.current && clearTimeout(timer.current)), []);\n return (\n <Button\n size={size}\n icon={copied ? <Check className=\"size-4\" /> : <Copy className=\"size-4\" />}\n onClick={async () => {\n if (await copyText(text, toastMessage)) {\n setCopied(true);\n if (timer.current) clearTimeout(timer.current);\n timer.current = setTimeout(() => setCopied(false), 2000);\n }\n }}\n >\n {copied ? \"Copied\" : label}\n </Button>\n );\n}\n\n/** A monospace command or URL with a copy button; wraps instead of overflowing. */\nexport function CopyBlock({\n text,\n label,\n copyLabel = \"Copy\",\n}: {\n text: string;\n /** Accessible name of the code block. */\n label: string;\n copyLabel?: string;\n}) {\n return (\n <figure className=\"m-0 flex min-w-0 flex-col gap-2 sm:flex-row sm:items-start\">\n <figcaption className=\"sr-only\">{label}</figcaption>\n <pre className=\"min-w-0 flex-1 whitespace-pre-wrap break-all rounded-md border border-border bg-surface-2 px-3 py-2 font-mono text-sm\">\n {text}\n </pre>\n <CopyButton text={text} label={copyLabel} />\n </figure>\n );\n}\n"],"ignoreList":[0,1],"mappings":"A,qHASA,IAAMA,EAAa,CACjB,KAAM,QACN,KAAM,GACN,KAAM,CAAC,CAAC,OAAQ,CAAE,EAAG,kBAA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BC,EAAU,CACxB,OACA,QACA,YAAY,QAMX,CACD,OACE,EAAAV,EAAA,KAAA,CAAC,SAAD,CAAQ,UAAU,6DAAlB,SAAA,EACE,EAAAA,EAAA,IAAA,CAAC,aAAD,CAAY,UAAU,UAAW,SAAAS,CAAkB,CAAA,GACnD,EAAAT,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,wHACZ,SAAAE,CACE,CAAA,GACL,EAAAF,EAAA,IAAA,CAACI,EAAD,CAAkB,OAAM,MAAOO,CAAY,CAAA,CACrC,C,EAEZ,C"}
@@ -1,4 +0,0 @@
1
- import{S as e,a as t,i as n,t as r,y as i}from"./Button-BKQW9doW.js";import{h as a,i as o,l as s}from"./Overlay-Cv0SIpoa.js";import{Ft as c,It as l,L as u,Nt as d,f,n as p}from"./states-D7g0-4EY.js";import{t as m}from"./arrow-up-Bzh112dp.js";import{t as h}from"./useBreakpoint-kT0J1Dnk.js";import{t as g}from"./UINodeRenderer-GbSP56mL.js";import{Kt as _}from"./index-xw7YOYjs.js";import{t as v}from"./TextLink-CCc3WEdm.js";import{i as y,r as b}from"./Tabs-DPj-rKor.js";var x=e(i(),1),S=`An extension opened a terminal-only dialog. In RPC mode Pi gave it no answer, so the extension continued without one.`,C=[{id:`abort`,label:`Stop the run`,tone:`danger`},{id:`message`,label:`Send a message to Pi`,tone:`primary`}];function w(e){if(e.t===`actions`)return e;if(e.t===`section`)for(let t of e.children){let e=w(t);if(e)return e}return null}function T(e){return e.state===`unsupported`||e.source.kind===`unsupported_custom`}function E(e){let t=(w(e.presentation)?.actions??[]).filter(e=>e.id===`abort`||e.id===`message`).map(e=>({id:e.id,label:e.label,tone:e.tone==="default"?`secondary`:e.tone??(e.id===`abort`?`danger`:`primary`)}));return{answerable:e.state===`unsupported`&&e.resolution===null,actions:t.length>0?t:C,copy:S}}function D(e){return e===`running`||e===`waiting_input`?`followUp`:`prompt`}var O=n();function k(e){switch(e.t){case`form`:case`confirm`:case`actions`:return!0;case`list`:return e.items.some(k);case`section`:return e.children.some(k);case`tabs`:return e.tabs.some(e=>e.children.some(k));default:return!1}}function A(e){return e===`host`?`the host`:e===`pi`?`Pi`:`a device`}function j({interaction:e,readOnlyReason:n,className:i,onAnswered:o,id:s,sticky:m,flush:_}){let v=u(e=>e.upsertInteraction),[y,b]=(0,x.useState)(!1),[S,C]=(0,x.useState)(null),[w,E]=(0,x.useState)(null),[j,N]=(0,x.useState)(null),[P,F]=(0,x.useState)(null),I=P&&P.id===e.id&&P.revision>e.revision?P:e,R=I.state===`pending`,z=T(I),B=u(e=>e.sessions[I.sessionId]?.runtime),[H,U]=(0,x.useState)(!1),[W,G]=(0,x.useState)(``),K=async e=>{b(!0),C(null),N(e);try{let t=await d(`/api/interactions/${encodeURIComponent(I.id)}/answer`,{revision:I.revision,response:e});return t?.interaction&&(v(t.interaction),F(t.interaction),o?.(t.interaction)),!0}catch(e){if(l(e,`already_answered`)){let t=e.details?.interaction;t&&(v(t),F(t)),E(t?.resolution?.summary??`answered on another device`)}else C(e);return!1}finally{b(!1)}},q=async()=>{let e=W.trim();if(e){b(!0),C(null);try{await d(`/api/sessions/${encodeURIComponent(I.sessionId)}/prompt`,{text:e,mode:D(B)})}catch(e){C(e),b(!1);return}b(!1),await K({kind:`action`,actionId:`message`})&&(U(!1),G(``))}},J=h();return R&&!w&&!z&&L(I.presentation)?(0,O.jsx)(V,{id:s,interaction:I,node:I.presentation,onRespond:e=>void K(e),busy:y,disabled:!!n,mobile:J===`mobile`,sticky:m??!0,flush:_??!1,className:i}):(0,O.jsxs)(`article`,{id:s,"aria-label":`Question: ${I.title}`,className:t(`flex min-w-0 flex-col gap-3 border-l-2 py-1 pl-3`,R?`border-warning`:`border-border`,i),children:[(0,O.jsxs)(`header`,{className:`flex min-w-0 flex-wrap items-start gap-2`,children:[(0,O.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold break-words`,children:I.title}),(0,O.jsx)(a,{kind:`interaction`,value:I.state,size:`sm`})]}),w&&(0,O.jsxs)(`p`,{role:`status`,className:`rounded-md bg-surface-2 px-3 py-2 text-sm`,children:[`Already answered: `,w]}),z?(0,O.jsx)(M,{interaction:I,readOnlyReason:n??null,busy:y,answered:w!==null,composing:H,message:W,setMessage:G,onAction:e=>{e===`message`?U(!0):K({kind:`action`,actionId:e})},onSend:()=>void q(),onCancelMessage:()=>U(!1)}):R&&!w?(0,O.jsxs)(O.Fragment,{children:[n&&(0,O.jsx)(`p`,{className:`text-sm text-muted`,children:n}),(0,O.jsx)(g,{node:I.presentation,onRespond:e=>void K(e),busy:y,disabled:!!n}),!n&&!k(I.presentation)&&(0,O.jsx)(`div`,{children:(0,O.jsx)(r,{busy:y,onClick:()=>void K({kind:`cancel`}),children:`Dismiss`})}),y&&(0,O.jsx)(`p`,{role:`status`,className:`text-sm text-muted`,children:`Sending answer… waiting for the host to confirm.`})]}):w?null:I.resolution?(0,O.jsxs)(`p`,{className:`text-sm text-muted`,children:[I.state===`resolved`?`Answered`:`Closed`,` by`,` `,A(I.resolution.by),` `,f(I.resolution.at),`:`,` `,(0,O.jsx)(`span`,{className:`text-text`,children:I.resolution.summary})]}):(0,O.jsx)(`p`,{className:`text-sm text-muted`,children:I.state===`expired`?`This question expired before it was answered (Pi closed the dialog).`:`This question was canceled.`}),S!==null&&(0,O.jsx)(p,{compact:!0,title:`Answer not delivered`,error:c(S),onRetry:j?()=>void K(j):void 0})]})}function M({interaction:e,readOnlyReason:t,busy:n,answered:i,composing:a,message:o,setMessage:s,onAction:c,onSend:l,onCancelMessage:u}){let d=E(e);return(0,O.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,O.jsx)(`p`,{className:`text-sm text-muted`,children:d.copy}),e.resolution?(0,O.jsxs)(`p`,{className:`text-sm text-muted`,children:[`Chosen by `,A(e.resolution.by),` `,f(e.resolution.at),`: `,(0,O.jsx)(`span`,{className:`text-text`,children:e.resolution.summary})]}):!d.answerable||i?null:t?(0,O.jsx)(`p`,{className:`text-sm text-muted`,children:t}):a?(0,O.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,O.jsx)(_,{"aria-label":`Message for Pi`,value:o,onChange:e=>s(e.target.value),rows:3,autoFocus:!0,placeholder:`Tell Pi what to do instead`}),(0,O.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,O.jsx)(r,{variant:`primary`,busy:n,disabled:!o.trim(),onClick:l,children:`Send message`}),(0,O.jsx)(r,{disabled:n,onClick:u,children:`Cancel`})]})]}):(0,O.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:d.actions.map(e=>(0,O.jsx)(r,{variant:e.tone,busy:n&&e.id===`abort`,disabled:n,onClick:()=>c(e.id),children:e.label},e.id))})]})}function N(e){if(e.t!==`section`||e.children.length<2)return null;let t=e.children[e.children.length-1];if(t?.t!==`actions`)return null;let n=e.children.slice(0,-1);return n.some(k)?null:{body:{...e,children:n},actions:t}}function P(e,t){let n=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;e?.scrollIntoView({behavior:n?`auto`:`smooth`,block:t})}function F(e){let[t,n]=(0,x.useState)(!0);return(0,x.useEffect)(()=>{let t=e.current;if(!t||typeof IntersectionObserver>`u`)return;let r=new IntersectionObserver(([e])=>n(!!e?.isIntersecting));return r.observe(t),()=>r.disconnect()},[e]),t}function I(e){if(e.t===`markdown`)return e.text;if(e.t===`section`)for(let t of e.children){let e=I(t);if(e!==null)return e}return null}function L(e){if(!N(e))return!1;let t=I(e);return t!==null&&(t.length>=400||t.split(`
2
- `).length>=12)}function R(e){let t=/^\s*#{1,6}\s+(.+?)\s*(?:\n+|$)/.exec(e);return t?.[1]?{title:t[1],rest:e.slice(t[0].length)}:{title:null,rest:e}}function z(e){let t=[],n=!1;for(let r of e.split(`
3
- `)){/^\s*```/.test(r)&&(n=!n);let e=n?null:/^##\s+(.+?)\s*$/.exec(r);e?.[1]&&t.push({text:e[1],id:y(e[1])})}return t}function B(e,t){let[n,r]=(0,x.useState)(null),[i,a]=(0,x.useState)(null),o=e.join(`|`);(0,x.useEffect)(()=>{if(typeof IntersectionObserver>`u`||!e.length)return;let n=e.map(e=>t.current?.querySelector(`#${CSS.escape(e)}`)).filter(e=>!!e),i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&r(t.target.id)},{rootMargin:`-56px 0px -70% 0px`});for(let e of n)i.observe(e);let o=()=>a(null);return window.addEventListener(`wheel`,o,{passive:!0}),window.addEventListener(`touchmove`,o,{passive:!0}),window.addEventListener(`keydown`,o),()=>{i.disconnect(),window.removeEventListener(`wheel`,o),window.removeEventListener(`touchmove`,o),window.removeEventListener(`keydown`,o)}},[o,t]);let s=i??n;return(0,x.useEffect)(()=>{let e=t.current;if(e){for(let t of e.querySelectorAll(`h2[data-active]`))delete t.dataset.active;if(s){let t=e.querySelector(`#${CSS.escape(s)}`);t&&(t.dataset.active=`true`)}}},[s,o,t]),[s,a]}function V({id:e,interaction:n,node:i,onRespond:c,busy:l,disabled:u,mobile:d,sticky:f,flush:p,className:h}){let _=(0,x.useRef)(null),y=(0,x.useRef)(null),S=(0,x.useRef)(null),C=F(S),[w,T]=(0,x.useState)(!1),E=N(i),{title:D,rest:k}=R((E?.body.t===`section`?E.body.children.find(e=>e.t===`markdown`):void 0)?.text??``),A=z(k),[j,M]=B(A.map(e=>e.id),_);if(E?.body.t!==`section`)return null;let I=E.actions.actions,L=E.body.children.find(e=>e.t===`section`),V=n.title,H=D??V,U=e=>{T(!1),c({kind:`action`,actionId:e})},W=(e,t)=>e===0||t===`primary`?`primary`:t===`danger`?`danger`:`secondary`,G=!u&&!C,K=`h-auto! min-h-9 min-w-0 py-1.5 text-left leading-tight whitespace-normal!`,q=e=>P(e,`start`);return(0,O.jsxs)(`article`,{id:e,"data-testid":`document-interaction`,"aria-label":`Question: ${V}`,className:t(`w-full min-w-0 self-stretch border-t border-border`,h),children:[(0,O.jsxs)(`header`,{className:t(`z-10 flex min-w-0 items-center gap-2 border-b border-border bg-bg px-4 py-2 md:px-6`,f&&(p?`md:sticky md:top-0`:`max-md:static md:sticky md:-top-3`)),children:[(0,O.jsx)(`h3`,{className:`min-w-0 flex-1 truncate text-[15px] leading-snug font-semibold md:text-sm`,children:H}),d&&(0,O.jsx)(a,{kind:`interaction`,value:n.state,size:`sm`,className:`[&>span]:sr-only`}),!u&&!C&&(0,O.jsx)(v,{size:`xs`,className:`shrink-0`,onClick:()=>P(S.current,`center`),children:`Jump to options ↓`})]}),L&&(0,O.jsx)(`aside`,{className:`mx-4 mt-3 rounded-md bg-warning-soft px-3 py-2 text-sm md:mx-6`,children:(0,O.jsx)(g,{node:L})}),(0,O.jsxs)(`div`,{className:`px-4 py-4 md:grid md:grid-cols-[13rem_minmax(0,1fr)] 2xl:grid-cols-[15rem_minmax(0,1fr)] md:gap-8 md:px-6`,children:[A.length>0&&(0,O.jsx)(`nav`,{"aria-label":`Plan sections`,className:`hidden md:block`,children:(0,O.jsxs)(`ol`,{className:`sticky top-16 flex flex-col gap-0.5 border-l border-border text-sm`,children:[(0,O.jsx)(`li`,{children:(0,O.jsx)(`button`,{type:`button`,className:`-ml-px block w-full truncate border-l-2 border-transparent py-1 pl-3 text-left text-muted hover:text-text`,onClick:()=>q(y.current),children:`Start`})}),A.map(e=>(0,O.jsx)(`li`,{children:(0,O.jsx)(`button`,{type:`button`,"aria-current":j===e.id,className:`-ml-px block w-full truncate border-l-2 border-transparent py-1 pl-3 text-left text-muted hover:text-text aria-[current=true]:border-accent aria-[current=true]:text-text`,onClick:()=>{M(e.id),q(_.current?.querySelector(`#${CSS.escape(e.id)}`)??null)},children:e.text})},e.id))]})}),(0,O.jsx)(`div`,{ref:y,className:`min-w-0 scroll-mt-14`,children:(0,O.jsx)(`div`,{ref:_,className:`sy-prose-compact max-w-[80ch] min-w-0 2xl:max-w-[100ch] min-[1800px]:text-base [&_h2]:scroll-mt-14`,children:(0,O.jsx)(b,{text:k,headingIds:!0,className:`text-inherit`})})})]}),(0,O.jsxs)(`section`,{ref:S,"data-testid":`plan-options`,"aria-label":V,className:`border-t border-border px-4 py-3 md:px-6`,children:[(0,O.jsx)(`p`,{className:`mb-2 text-sm font-medium`,children:V}),!u&&(0,O.jsx)(`div`,{className:`flex min-w-0 flex-col gap-2 md:flex-row md:flex-wrap`,children:I.map((e,n)=>(0,O.jsx)(r,{variant:W(n,e.tone),size:`md`,disabled:l,className:t(K,`md:text-center`),onClick:()=>U(e.id),children:e.label},e.id))}),(0,O.jsx)(v,{size:`xs`,className:`mt-2`,icon:(0,O.jsx)(m,{"aria-hidden":!0,className:`size-3.5`}),onClick:()=>q(y.current),children:`Back to the plan start`})]}),G&&(0,O.jsx)(`div`,{"data-testid":`answer-bar`,className:t(`z-10 flex min-w-0 items-center gap-2 border-t border-border bg-bg px-4 py-2 md:gap-3 md:px-6`,f&&!p?`sticky -bottom-3`:`sticky bottom-0`),children:d?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(s,{label:`Plan start`,icon:(0,O.jsx)(m,{className:`size-4`}),variant:`secondary`,onClick:()=>q(y.current)}),I.length>2?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(r,{variant:`primary`,disabled:l,className:t(K,`flex-1`),onClick:()=>U(I[0].id),children:I[0].label}),(0,O.jsxs)(r,{variant:`secondary`,onClick:()=>T(!0),children:[`More (`,I.length-1,`)`]})]}):I.map((e,n)=>(0,O.jsx)(r,{variant:W(n,e.tone),disabled:l,className:t(K,`flex-1`),onClick:()=>U(e.id),children:e.label},e.id))]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`max-w-[16rem] min-w-0 shrink truncate text-sm font-medium`,title:V,children:V}),(0,O.jsx)(`div`,{className:`grid min-w-0 flex-1 grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-2`,children:I.map((e,n)=>(0,O.jsx)(r,{variant:W(n,e.tone),disabled:l,className:t(K,`w-full md:text-center`),onClick:()=>U(e.id),children:e.label},e.id))}),(0,O.jsx)(s,{label:`Plan start`,icon:(0,O.jsx)(m,{className:`size-4`}),variant:`secondary`,size:`sm`,onClick:()=>q(y.current)})]})}),(0,O.jsx)(o,{open:w,onClose:()=>T(!1),title:V,children:(0,O.jsx)(`div`,{className:`flex flex-col gap-2`,children:I.map((e,t)=>(0,O.jsx)(r,{block:!0,variant:W(t,e.tone),disabled:l,className:K,onClick:()=>U(e.id),children:e.label},e.id))})})]})}export{L as n,j as t};
4
- //# sourceMappingURL=InteractionCard-CdBv3Sm7.js.map
@@ -1,2 +0,0 @@
1
- import{S as e,a as t,b as n,i as r,o as i,r as a,t as o,y as s}from"./Button-BKQW9doW.js";import{Ft as c,_ as l,a as u,b as d,m as f,n as p,ut as m,x as h,y as g}from"./states-D7g0-4EY.js";import{c as _,d as v,f as y,l as b,p as x}from"./useBreakpoint-kT0J1Dnk.js";import{t as ee}from"./timer-CyFp7DQs.js";var te=n((e=>{var t=s();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=i.p;try{if(u.T=null,i.p=2,e)return e()}finally{u.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),S=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=te()})),ne={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};ne.node;var re=i(ne),ie={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};ie.node;var ae=i(ie),oe={name:`ban`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]};oe.node;var se=i(oe),ce={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};ce.node;var le=i(ce),ue={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};ue.node;var C=i(ue),w={name:`circle-pause`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`10`,x2:`10`,y1:`15`,y2:`9`,key:`c1nkhi`}],[`line`,{x1:`14`,x2:`14`,y1:`15`,y2:`9`,key:`h65svq`}]],aliases:[`pause-circle`]};w.node;var T=i(w),E={name:`circle-play`,size:24,node:[[`path`,{d:`M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z`,key:`kmsa83`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]],aliases:[`play-circle`]};E.node;var D=i(E),O={name:`circle-slash`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]};O.node;var k=i(O),A={name:`cloud-off`,size:24,node:[[`path`,{d:`M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057`,key:`1uxyv8`}],[`path`,{d:`M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78`,key:`99tcn7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};A.node;var de=i(A),j={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};j.node;var M=i(j),N={name:`hourglass`,size:24,node:[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M5 2h14`,key:`pdyrp9`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`,key:`1d314k`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`,key:`1vvvr6`}]]};N.node;var P=i(N),F={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};F.node;var I=i(F),L={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};L.node;var R=i(L),z={name:`repeat`,size:24,node:[[`path`,{d:`m17 2 4 4-4 4`,key:`nntrym`}],[`path`,{d:`M3 11v-1a4 4 0 0 1 4-4h14`,key:`84bu3i`}],[`path`,{d:`m7 22-4-4 4-4`,key:`1wqhfi`}],[`path`,{d:`M21 13v1a4 4 0 0 1-4 4H3`,key:`1rx37r`}]]};z.node;var fe=i(z),B={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};B.node;var V=i(B),H={name:`wifi`,size:24,node:[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]};H.node;var U=i(H),W=r(),G={neutral:`bg-surface-2 text-muted border-border`,info:`bg-info-soft text-info border-transparent`,success:`bg-success-soft text-success border-transparent`,warning:`bg-warning-soft text-warning border-transparent`,danger:`bg-danger-soft text-danger border-transparent`,accent:`bg-accent text-accent-fg border-transparent`},pe={neutral:`text-muted`,info:`text-info`,success:`text-success`,warning:`text-warning`,danger:`text-danger`,accent:`text-accent`};function K({children:e,tone:n=`neutral`,label:r,className:i}){return(0,W.jsxs)(`span`,{className:t(`inline-flex min-w-5 items-center justify-center rounded-full border px-1.5 text-xs leading-5 font-medium tabular-nums`,G[n],i),title:r,children:[(0,W.jsx)(`span`,{"aria-hidden":r?!0:void 0,children:e}),r&&(0,W.jsx)(`span`,{className:`sr-only`,children:r})]})}function me({count:e,label:t,tone:n=`danger`,className:r}){return e<=0?null:(0,W.jsx)(K,{tone:n,label:`${e} ${t}`,className:r,children:e>99?`99+`:e})}var he={starting:{label:`Starting…`,icon:R,tone:`info`,spin:!0},idle:{label:`Idle`,icon:C,tone:`neutral`},running:{label:`Running`,icon:re,tone:`info`,pulse:!0},waiting_input:{label:`Needs input`,icon:g,tone:`warning`},interrupted:{label:`Interrupted`,icon:T,tone:`warning`},failed:{label:`Failed`,icon:y,tone:`danger`},stopped:{label:`Stopped`,icon:V,tone:`neutral`}},ge={label:`Ready to review`,icon:M,tone:`success`},_e={backlog:{label:`Backlog`,icon:d,tone:`neutral`},ready:{label:`Ready`,icon:D,tone:`info`},in_progress:{label:`In progress`,icon:R,tone:`info`},review:{label:`Review`,icon:M,tone:`warning`},done:{label:`Done`,icon:x,tone:`success`},canceled:{label:`Canceled`,icon:se,tone:`neutral`}},ve={queued:{label:`Queued`,icon:v,tone:`neutral`},dispatching:{label:`Dispatching…`,icon:R,tone:`info`,spin:!0},uncertain:{label:`Awaiting host confirmation`,icon:P,tone:`warning`},running:{label:`Running`,icon:re,tone:`info`,pulse:!0},waiting_input:{label:`Needs input`,icon:g,tone:`warning`},checking:{label:`Running checks`,icon:I,tone:`info`,spin:!1},succeeded:{label:`Succeeded`,icon:x,tone:`success`},failed:{label:`Failed`,icon:y,tone:`danger`},interrupted:{label:`Interrupted`,icon:T,tone:`warning`},canceled:{label:`Canceled`,icon:se,tone:`neutral`}},ye={connected:{label:`Connected`,icon:U,tone:`success`},reconnecting:{label:`Reconnecting…`,icon:l,tone:`warning`,spin:!0},unreachable:{label:`Unreachable`,icon:b,tone:`danger`}},be={connecting:{label:`Connecting…`,icon:R,tone:`info`,spin:!0},live:{label:`Live`,icon:U,tone:`success`},reconnecting:{label:`Reconnecting…`,icon:l,tone:`warning`,spin:!0},offline:{label:`Offline`,icon:de,tone:`danger`}},xe={pending:{label:`Needs input`,icon:g,tone:`warning`},resolved:{label:`Answered`,icon:x,tone:`success`},expired:{label:`Expired`,icon:P,tone:`neutral`},canceled:{label:`Canceled`,icon:k,tone:`neutral`},unsupported:{label:`Unsupported here`,icon:f,tone:`warning`}},Se={needs_input:{label:`Needs input`,icon:g,tone:`warning`},failed:{label:`Failed`,icon:y,tone:`danger`},ready_for_review:{label:`Ready for review`,icon:M,tone:`info`},unsupported_interaction:{label:`Unsupported interaction`,icon:f,tone:`warning`},host_unreachable:{label:`Host unreachable`,icon:b,tone:`danger`},cache_expiring:{label:`Cache expiring`,icon:ee,tone:`warning`}},Ce={fired:{label:`Fired`,icon:D,tone:`info`},skipped_overlap:{label:`Skipped (overlap)`,icon:k,tone:`neutral`},skipped_missed:{label:`Skipped (missed)`,icon:k,tone:`neutral`},queued:{label:`Queued`,icon:v,tone:`neutral`},appended:{label:`Appended`,icon:fe,tone:`info`},failed:{label:`Failed`,icon:y,tone:`danger`},filtered:{label:`Filtered out`,icon:le,tone:`neutral`}},q={label:`Unknown`,icon:h,tone:`neutral`};function we(e){switch(e.kind){case`runtime`:return he[e.value]??q;case`task`:return _e[e.value]??q;case`run`:return ve[e.value]??q;case`host`:return ye[e.value]??q;case`connection`:return be[e.value]??q;case`interaction`:{let t=m.safeParse(e.value);return t.success?xe[t.data]:q}case`attention`:return Se[e.value]??q;case`occurrence`:return Ce[e.value]??q;case`custom`:return e.status}}function Te(e){let n=we(e),r=n.icon,i=e.size===`sm`;return(0,W.jsxs)(`span`,{"data-status-chip":e.kind,className:t(`inline-flex max-w-full items-center gap-1 rounded-full border font-medium whitespace-nowrap`,i?`px-1.5 text-xs leading-5`:`px-2 text-xs leading-6`,G[n.tone],e.className),children:[n.spin?(0,W.jsx)(a,{className:i?`size-3`:`size-3.5`}):(0,W.jsx)(r,{"aria-hidden":!0,className:t(i?`size-3`:`size-3.5`,`shrink-0`,n.pulse&&`animate-pulse`)}),(0,W.jsx)(`span`,{className:`truncate`,children:e.label??n.label})]})}function Ee({icon:e,label:n,tone:r=`neutral`,spin:i,className:o}){return(0,W.jsxs)(`span`,{className:t(`inline-flex max-w-full items-center gap-1 rounded-full border px-2 text-xs leading-6 font-medium`,G[r],o),children:[i?(0,W.jsx)(a,{className:`size-3.5`}):(0,W.jsx)(e,{"aria-hidden":!0,className:`size-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`min-w-0 truncate`,children:n})]})}var De=S(),J=e(s(),1),Y=(0,J.forwardRef)(function({label:e,icon:n,variant:r=`ghost`,size:i=`md`,className:a,type:o,...s},c){return(0,W.jsx)(`button`,{ref:c,type:o??`button`,"aria-label":e,title:e,className:t(`tap inline-flex shrink-0 items-center justify-center rounded-md border transition-colors`,`disabled:opacity-55 disabled:pointer-events-none`,i===`sm`?`size-8`:`size-9`,r===`ghost`&&`border-transparent text-muted hover:bg-surface-2 hover:text-text`,r===`secondary`&&`border-border bg-surface text-text hover:bg-surface-2`,r===`danger`&&`border-transparent text-danger hover:bg-danger-soft`,a),...s,children:n})}),X=[];function Oe(e){if(e.key!==`Escape`||e.isComposing||e.defaultPrevented)return;let t=Z();t&&(e.preventDefault(),e.stopPropagation(),t.onEscape())}function ke(e){let t={layer:e};return X.push(t),X.length===1&&document.addEventListener(`keydown`,Oe),()=>{let e=X.indexOf(t);e!==-1&&(X.splice(e,1),X.length===0&&document.removeEventListener(`keydown`,Oe))}}function Z(){return X[X.length-1]?.layer}function Ae(){return X.findLast(({layer:e})=>e.trapsFocus)?.layer}function je(){return X.length>0}var Me=`a[href], area[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), iframe, [tabindex]:not([tabindex="-1"]), [contenteditable="true"]`;function Q(e){return[...e.querySelectorAll(Me)].filter(e=>!e.closest(`[hidden], [inert], [aria-hidden="true"], :disabled, [aria-disabled="true"]`)&&getComputedStyle(e).visibility!==`hidden`&&e.getClientRects().length>0)}function Ne(e,t,n,r){let i=(0,J.useRef)(n);i.current=n;let a=(0,J.useRef)(null),o=(0,J.useRef)(!1);t&&!o.current&&typeof document<`u`&&(a.current=document.activeElement),o.current=t,(0,J.useEffect)(()=>{if(!t)return;let n=e.current;if(!n)return;let o=a.current,s=o&&!n.contains(o)?o:document.activeElement,c=ke({root:e,onEscape:()=>i.current?.(),trapsFocus:!0}),l=Z(),u=r?.current??Q(n)[0]??n,d=requestAnimationFrame(()=>{(r?.current||!n.contains(document.activeElement))&&u.focus({preventScroll:!0})}),f=e=>{if(e.key!==`Tab`||e.defaultPrevented||e.isComposing||Ae()!==l)return;let t=Q(n);if(t.length===0){e.preventDefault(),n.focus();return}let r=t[0],i=t[t.length-1],a=document.activeElement;e.shiftKey&&(a===r||!n.contains(a))?(e.preventDefault(),i.focus()):e.shiftKey||a!==i&&n.contains(a)||(e.preventDefault(),r.focus())};return document.addEventListener(`keydown`,f),()=>{cancelAnimationFrame(d),document.removeEventListener(`keydown`,f);let e=Z()===l;if(c(),!e)return;let t=Z(),n=t?.root.current;t?(s?.isConnected&&n?.contains(s)?s:n&&(Q(n)[0]??n))?.focus({preventScroll:!0}):(s?.isConnected?s:document.querySelector(`main`)??document.body).focus({preventScroll:!0})}},[t,e,r])}var Pe=0,Fe=``;function Ie(e){(0,J.useEffect)(()=>{if(e)return Pe++===0&&(Fe=document.body.style.overflow,document.body.style.overflow=`hidden`),()=>{--Pe===0&&(document.body.style.overflow=Fe)}},[e])}function $({placement:e,open:n,onClose:r,title:i,description:a,children:o,footer:s,initialFocus:c,dismissOnBackdrop:l=!0,headerActions:u,className:d,flush:f,bodyClassName:p,fullHeight:m,style:h}){let g=(0,J.useRef)(null),v=(0,J.useId)(),y=(0,J.useId)();return Ne(g,n,r,c),Ie(n),n?(0,De.createPortal)((0,W.jsxs)(`div`,{className:t(`fixed inset-0 z-50 flex`,e===`right`&&`justify-end`,e===`bottom`&&`items-end`,e===`center`&&`items-center justify-center p-4`),children:[(0,W.jsx)(`div`,{className:`absolute inset-0 bg-overlay`,"aria-hidden":!0,onClick:l?r:void 0}),(0,W.jsxs)(`div`,{ref:g,role:`dialog`,"aria-modal":`true`,"aria-labelledby":v,"aria-describedby":a?y:void 0,tabIndex:-1,style:h,className:t(`relative flex flex-col bg-surface text-text shadow-pop outline-none`,e===`right`&&`h-full max-w-full border-l border-border safe-pt safe-pb`,e===`bottom`&&(m?`h-dvh w-full safe-pt safe-pb`:`max-h-[90dvh] w-full rounded-t-xl border-t border-border safe-pb`),e===`center`&&`max-h-[min(90dvh,720px)] w-full max-w-lg rounded-xl border border-border`,d),children:[e===`bottom`&&!m&&(0,W.jsx)(`div`,{className:`flex justify-center pt-2`,"aria-hidden":!0,children:(0,W.jsx)(`div`,{className:`h-1 w-10 rounded-full bg-border-strong`})}),(0,W.jsxs)(`div`,{className:`flex items-start gap-2 border-b border-border px-4 py-3`,children:[(0,W.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,W.jsx)(`h2`,{id:v,className:`text-base font-semibold leading-6`,children:i}),a&&(0,W.jsx)(`p`,{id:y,className:`text-sm text-muted`,children:a})]}),u,(0,W.jsx)(Y,{label:`Close`,icon:(0,W.jsx)(_,{className:`size-4`}),onClick:r})]}),(0,W.jsx)(`div`,{className:t(`min-h-0 flex-1 overflow-y-auto overscroll-contain`,!f&&`px-4 py-3`,p),children:o}),s&&(0,W.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 border-t border-border px-4 py-3`,children:s})]})]}),document.body):null}function Le({width:e=520,...t}){return(0,W.jsx)($,{...t,placement:`right`,style:{width:`min(${e}px, 100vw)`}})}function Re(e){return(0,W.jsx)($,{...e,placement:`bottom`})}function ze(e){return(0,W.jsx)($,{...e,placement:`center`})}function Be({open:e,onClose:t,title:n,description:r,confirmLabel:i,onConfirm:a,busy:s,error:l,errorTitle:d,danger:f=!0,confirmIcon:m,confirmDisabled:h,disabledReason:g,children:_}){return(0,W.jsx)(ze,{open:e,onClose:s?()=>void 0:t,dismissOnBackdrop:!s,title:n,description:r,footer:(0,W.jsxs)(W.Fragment,{children:[h&&g&&(0,W.jsx)(`p`,{className:`mr-auto min-w-0 flex-1 basis-full text-xs text-muted sm:basis-auto`,children:g}),(0,W.jsx)(o,{onClick:t,disabled:s,children:`Cancel`}),(0,W.jsx)(o,{variant:f?`danger`:`primary`,icon:m,busy:s,disabled:h,onClick:a,children:i})]}),children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[_,d?!!l&&(0,W.jsx)(p,{compact:!0,title:d,error:c(l)}):(0,W.jsx)(u,{error:l})]})})}export{le as A,R as C,D,k as E,S as M,T as O,V as S,M as T,we as _,Ne as a,G as b,Z as c,Ee as d,ge as f,_e as g,Te as h,Re as i,ae as j,C as k,Y as l,ve as m,ze as n,je as o,he as p,Le as r,ke as s,Be as t,Se as u,K as v,I as w,pe as x,me as y};
2
- //# sourceMappingURL=Overlay-Cv0SIpoa.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Overlay-Cv0SIpoa.js","names":["__iconData","__iconData","__iconData","__iconData","__iconData","__iconData","__iconData","__iconData","__iconData","__iconData","__iconData","__iconData","__iconData","__iconData","__iconData","MessageCircleQuestion","forwardRef","useRef","useRef","useId","createPortal","_Fragment","__toESM","cn","__commonJSMin","require_jsx_runtime","createLucideIcon","Spinner","Button","require_react","errorMessage","RefreshCw","InlineError","Inbox","TriangleAlert","ErrorState","InteractionState","CircleAlert","MessageCircleQuestionMark","X","Clock","CircleX","WifiOff","CircleCheck","Timer","require_react_dom_production","React","formatProdErrorMessage","url","code","i","noop","Internals","REACT_PORTAL_TYPE","REACT_RECOVERABLE_TYPE","REACT_OPTIMISTIC_KEY","createPortal$1","key","ReactSharedInternals","getCrossOriginStringAs","as","input","reason","container","children","previousTransition","previousUpdatePriority","fn","href","options","crossOrigin","integrity","fetchPriority","form","a","action","initialState","permalink","require_react_dom","checkDCE","err","__iconData$15","Activity","__iconData$14","ArrowLeft","__iconData$13","Ban","__iconData$12","CircleDashed","__iconData$11","CircleDot","__iconData$10","CirclePause","__iconData$9","CirclePlay","__iconData$8","CircleSlash","__iconData$7","CloudOff","__iconData$6","Eye","__iconData$5","Hourglass","__iconData$4","ListChecks","__iconData$3","LoaderCircle","__iconData$2","Repeat","__iconData$1","Square","__iconData","Wifi","import_jsx_runtime","TONE_CLASSES","TONE_TEXT","Badge","tone","className","label","CountBadge","count","RUNTIME_STATUS","REVIEW_STATUS","TASK_STATUS","RUN_STATUS","HOST_STATUS","CONNECTION_STATUS","INTERACTION_STATUS","ATTENTION_STATUS","OCCURRENCE_STATUS","FALLBACK","statusInfo","props","s","StatusChip","info","Icon","sm","InlineStatus","spin","import_react_dom","import_react","IconButton","rest","type","size","variant","icon","layers","onDocumentKeyDown","event","top","topKeyboardLayer","registerKeyboardLayer","entry","index","topTrappingKeyboardLayer","layer","hasKeyboardLayer","FOCUSABLE","focusableWithin","root","el","useFocusTrap","escRef","onEscape","triggerRef","wasActive","active","ref","captured","previous","unregister","target","initialFocus","raf","onTab","items","first","last","activeEl","wasTop","remaining","remainingRoot","scrollLocks","previousOverflow","useScrollLock","Surface","titleId","descId","open","onClose","placement","dismissOnBackdrop","description","fullHeight","title","headerActions","flush","bodyClassName","footer","Drawer","width","Sheet","Dialog","ConfirmDialog","busy","confirmDisabled","disabledReason","danger","confirmIcon","onConfirm","confirmLabel","errorTitle","error"],"sources":["../../../../node_modules/.pnpm/react-dom@19.3.1_react@19.3.1/node_modules/react-dom/cjs/react-dom.production.js","../../../../node_modules/.pnpm/react-dom@19.3.1_react@19.3.1/node_modules/react-dom/index.js","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/activity.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/ban.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/circle-dashed.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/circle-dot.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/circle-pause.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/circle-play.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/circle-slash.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/cloud-off.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/eye.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/hourglass.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/list-checks.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/loader-circle.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/repeat.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/square.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/wifi.mjs","../../src/components/ui/Badge.tsx","../../src/components/ui/StatusChip.tsx","../../src/components/ui/IconButton.tsx","../../src/components/ui/keyboardLayers.ts","../../src/components/ui/useFocusTrap.ts","../../src/components/ui/Overlay.tsx"],"sourcesContent":["/**\n * @license React\n * react-dom.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nfunction noop() {}\nvar Internals = {\n d: {\n f: noop,\n r: function () {\n throw Error(formatProdErrorMessage(522));\n },\n D: noop,\n C: noop,\n L: noop,\n m: noop,\n X: noop,\n S: noop,\n M: noop\n },\n p: 0,\n findDOMNode: null\n },\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_RECOVERABLE_TYPE = Symbol.for(\"react.recoverable\"),\n REACT_OPTIMISTIC_KEY = Symbol.for(\"react.optimistic_key\");\nfunction createPortal$1(children, containerInfo, implementation) {\n var key =\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n return {\n $$typeof: REACT_PORTAL_TYPE,\n key:\n null == key\n ? null\n : key === REACT_OPTIMISTIC_KEY\n ? REACT_OPTIMISTIC_KEY\n : \"\" + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\nvar ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\nfunction getCrossOriginStringAs(as, input) {\n if (\"font\" === as) return \"\";\n if (\"string\" === typeof input)\n return \"use-credentials\" === input ? input : \"\";\n}\nexports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n Internals;\nexports.browser = function (reason) {\n return { $$typeof: REACT_RECOVERABLE_TYPE, _reason: reason };\n};\nexports.createPortal = function (children, container) {\n var key =\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n if (\n !container ||\n (1 !== container.nodeType &&\n 9 !== container.nodeType &&\n 11 !== container.nodeType)\n )\n throw Error(formatProdErrorMessage(299));\n return createPortal$1(children, container, null, key);\n};\nexports.flushSync = function (fn) {\n var previousTransition = ReactSharedInternals.T,\n previousUpdatePriority = Internals.p;\n try {\n if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();\n } finally {\n (ReactSharedInternals.T = previousTransition),\n (Internals.p = previousUpdatePriority),\n Internals.d.f();\n }\n};\nexports.preconnect = function (href, options) {\n \"string\" === typeof href &&\n (options\n ? ((options = options.crossOrigin),\n (options =\n \"string\" === typeof options\n ? \"use-credentials\" === options\n ? options\n : \"\"\n : void 0))\n : (options = null),\n Internals.d.C(href, options));\n};\nexports.prefetchDNS = function (href) {\n \"string\" === typeof href && Internals.d.D(href);\n};\nexports.preinit = function (href, options) {\n if (\"string\" === typeof href && options && \"string\" === typeof options.as) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n integrity =\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n fetchPriority =\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0;\n \"style\" === as\n ? Internals.d.S(\n href,\n \"string\" === typeof options.precedence ? options.precedence : void 0,\n {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority\n }\n )\n : \"script\" === as &&\n Internals.d.X(href, {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n};\nexports.preinitModule = function (href, options) {\n if (\"string\" === typeof href)\n if (\"object\" === typeof options && null !== options) {\n if (null == options.as || \"script\" === options.as) {\n var crossOrigin = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n );\n Internals.d.M(href, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0\n });\n }\n } else null == options && Internals.d.M(href);\n};\nexports.preload = function (href, options) {\n if (\n \"string\" === typeof href &&\n \"object\" === typeof options &&\n null !== options &&\n \"string\" === typeof options.as\n ) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);\n Internals.d.L(href, as, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n type: \"string\" === typeof options.type ? options.type : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0,\n referrerPolicy:\n \"string\" === typeof options.referrerPolicy\n ? options.referrerPolicy\n : void 0,\n imageSrcSet:\n \"string\" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,\n imageSizes:\n \"string\" === typeof options.imageSizes ? options.imageSizes : void 0,\n media: \"string\" === typeof options.media ? options.media : void 0\n });\n }\n};\nexports.preloadModule = function (href, options) {\n if (\"string\" === typeof href)\n if (options) {\n var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);\n Internals.d.m(href, {\n as:\n \"string\" === typeof options.as && \"script\" !== options.as\n ? options.as\n : void 0,\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0\n });\n } else Internals.d.m(href);\n};\nexports.requestFormReset = function (form) {\n Internals.d.r(form);\n};\nexports.unstable_batchedUpdates = function (fn, a) {\n return fn(a);\n};\nexports.useFormState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useFormState(action, initialState, permalink);\n};\nexports.useFormStatus = function () {\n return ReactSharedInternals.H.useHostTransitionStatus();\n};\nexports.version = \"19.3.1\";\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"activity\",\n size: 24,\n node: [\n [\n \"path\",\n {\n d: \"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2\",\n key: \"169zse\"\n }\n ]\n ]\n};\n__iconData.node;\nconst Activity = createLucideIcon(__iconData);\n\nexport { __iconData, Activity as default };\n//# sourceMappingURL=activity.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"arrow-left\",\n size: 24,\n node: [\n [\"path\", { d: \"m12 19-7-7 7-7\", key: \"1l729n\" }],\n [\"path\", { d: \"M19 12H5\", key: \"x3x0zl\" }]\n ]\n};\n__iconData.node;\nconst ArrowLeft = createLucideIcon(__iconData);\n\nexport { __iconData, ArrowLeft as default };\n//# sourceMappingURL=arrow-left.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"ban\",\n size: 24,\n node: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M4.929 4.929 19.07 19.071\", key: \"196cmz\" }]\n ]\n};\n__iconData.node;\nconst Ban = createLucideIcon(__iconData);\n\nexport { __iconData, Ban as default };\n//# sourceMappingURL=ban.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"circle-dashed\",\n size: 24,\n node: [\n [\"path\", { d: \"M10.1 2.182a10 10 0 0 1 3.8 0\", key: \"5ilxe3\" }],\n [\"path\", { d: \"M13.9 21.818a10 10 0 0 1-3.8 0\", key: \"11zvb9\" }],\n [\"path\", { d: \"M17.609 3.721a10 10 0 0 1 2.69 2.7\", key: \"1iw5b2\" }],\n [\"path\", { d: \"M2.182 13.9a10 10 0 0 1 0-3.8\", key: \"c0bmvh\" }],\n [\"path\", { d: \"M20.279 17.609a10 10 0 0 1-2.7 2.69\", key: \"1ruxm7\" }],\n [\"path\", { d: \"M21.818 10.1a10 10 0 0 1 0 3.8\", key: \"qkgqxc\" }],\n [\"path\", { d: \"M3.721 6.391a10 10 0 0 1 2.7-2.69\", key: \"1mcia2\" }],\n [\"path\", { d: \"M6.391 20.279a10 10 0 0 1-2.69-2.7\", key: \"1fvljs\" }]\n ]\n};\n__iconData.node;\nconst CircleDashed = createLucideIcon(__iconData);\n\nexport { __iconData, CircleDashed as default };\n//# sourceMappingURL=circle-dashed.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"circle-dot\",\n size: 24,\n node: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }]\n ]\n};\n__iconData.node;\nconst CircleDot = createLucideIcon(__iconData);\n\nexport { __iconData, CircleDot as default };\n//# sourceMappingURL=circle-dot.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"circle-pause\",\n size: 24,\n node: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"line\", { x1: \"10\", x2: \"10\", y1: \"15\", y2: \"9\", key: \"c1nkhi\" }],\n [\"line\", { x1: \"14\", x2: \"14\", y1: \"15\", y2: \"9\", key: \"h65svq\" }]\n ],\n aliases: [\"pause-circle\"]\n};\n__iconData.node;\nconst CirclePause = createLucideIcon(__iconData);\n\nexport { __iconData, CirclePause as default };\n//# sourceMappingURL=circle-pause.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"circle-play\",\n size: 24,\n node: [\n [\n \"path\",\n {\n d: \"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z\",\n key: \"kmsa83\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }]\n ],\n aliases: [\"play-circle\"]\n};\n__iconData.node;\nconst CirclePlay = createLucideIcon(__iconData);\n\nexport { __iconData, CirclePlay as default };\n//# sourceMappingURL=circle-play.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"circle-slash\",\n size: 24,\n node: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"line\", { x1: \"9\", x2: \"15\", y1: \"15\", y2: \"9\", key: \"1dfufj\" }]\n ]\n};\n__iconData.node;\nconst CircleSlash = createLucideIcon(__iconData);\n\nexport { __iconData, CircleSlash as default };\n//# sourceMappingURL=circle-slash.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"cloud-off\",\n size: 24,\n node: [\n [\n \"path\",\n { d: \"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057\", key: \"1uxyv8\" }\n ],\n [\"path\", { d: \"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78\", key: \"99tcn7\" }],\n [\"path\", { d: \"m2 2 20 20\", key: \"1ooewy\" }]\n ]\n};\n__iconData.node;\nconst CloudOff = createLucideIcon(__iconData);\n\nexport { __iconData, CloudOff as default };\n//# sourceMappingURL=cloud-off.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"eye\",\n size: 24,\n node: [\n [\n \"path\",\n {\n d: \"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\",\n key: \"1nclc0\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }]\n ]\n};\n__iconData.node;\nconst Eye = createLucideIcon(__iconData);\n\nexport { __iconData, Eye as default };\n//# sourceMappingURL=eye.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"hourglass\",\n size: 24,\n node: [\n [\"path\", { d: \"M5 22h14\", key: \"ehvnwv\" }],\n [\"path\", { d: \"M5 2h14\", key: \"pdyrp9\" }],\n [\n \"path\",\n {\n d: \"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22\",\n key: \"1d314k\"\n }\n ],\n [\n \"path\",\n {\n d: \"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2\",\n key: \"1vvvr6\"\n }\n ]\n ]\n};\n__iconData.node;\nconst Hourglass = createLucideIcon(__iconData);\n\nexport { __iconData, Hourglass as default };\n//# sourceMappingURL=hourglass.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"list-checks\",\n size: 24,\n node: [\n [\"path\", { d: \"M13 5h8\", key: \"a7qcls\" }],\n [\"path\", { d: \"M13 12h8\", key: \"h98zly\" }],\n [\"path\", { d: \"M13 19h8\", key: \"c3s6r1\" }],\n [\"path\", { d: \"m3 17 2 2 4-4\", key: \"1jhpwq\" }],\n [\"path\", { d: \"m3 7 2 2 4-4\", key: \"1obspn\" }]\n ]\n};\n__iconData.node;\nconst ListChecks = createLucideIcon(__iconData);\n\nexport { __iconData, ListChecks as default };\n//# sourceMappingURL=list-checks.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"loader-circle\",\n size: 24,\n node: [[\"path\", { d: \"M21 12a9 9 0 1 1-6.219-8.56\", key: \"13zald\" }]],\n aliases: [\"loader-2\"]\n};\n__iconData.node;\nconst LoaderCircle = createLucideIcon(__iconData);\n\nexport { __iconData, LoaderCircle as default };\n//# sourceMappingURL=loader-circle.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"repeat\",\n size: 24,\n node: [\n [\"path\", { d: \"m17 2 4 4-4 4\", key: \"nntrym\" }],\n [\"path\", { d: \"M3 11v-1a4 4 0 0 1 4-4h14\", key: \"84bu3i\" }],\n [\"path\", { d: \"m7 22-4-4 4-4\", key: \"1wqhfi\" }],\n [\"path\", { d: \"M21 13v1a4 4 0 0 1-4 4H3\", key: \"1rx37r\" }]\n ]\n};\n__iconData.node;\nconst Repeat = createLucideIcon(__iconData);\n\nexport { __iconData, Repeat as default };\n//# sourceMappingURL=repeat.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"square\",\n size: 24,\n node: [[\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }]]\n};\n__iconData.node;\nconst Square = createLucideIcon(__iconData);\n\nexport { __iconData, Square as default };\n//# sourceMappingURL=square.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"wifi\",\n size: 24,\n node: [\n [\"path\", { d: \"M12 20h.01\", key: \"zekei9\" }],\n [\"path\", { d: \"M2 8.82a15 15 0 0 1 20 0\", key: \"dnpr2z\" }],\n [\"path\", { d: \"M5 12.859a10 10 0 0 1 14 0\", key: \"1x1e6c\" }],\n [\"path\", { d: \"M8.5 16.429a5 5 0 0 1 7 0\", key: \"1bycff\" }]\n ]\n};\n__iconData.node;\nconst Wifi = createLucideIcon(__iconData);\n\nexport { __iconData, Wifi as default };\n//# sourceMappingURL=wifi.mjs.map\n","import type { ReactNode } from \"react\";\nimport { cn } from \"../../lib/cn\";\n\nexport type Tone = \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"accent\";\n\nexport const TONE_CLASSES: Record<Tone, string> = {\n neutral: \"bg-surface-2 text-muted border-border\",\n info: \"bg-info-soft text-info border-transparent\",\n success: \"bg-success-soft text-success border-transparent\",\n warning: \"bg-warning-soft text-warning border-transparent\",\n danger: \"bg-danger-soft text-danger border-transparent\",\n accent: \"bg-accent text-accent-fg border-transparent\",\n};\n\n/** Text colour for each tone (the Badge classes colour the background too). */\nexport const TONE_TEXT: Record<Tone, string> = {\n neutral: \"text-muted\",\n info: \"text-info\",\n success: \"text-success\",\n warning: \"text-warning\",\n danger: \"text-danger\",\n accent: \"text-accent\",\n};\n\nexport interface BadgeProps {\n children: ReactNode;\n tone?: Tone;\n /** Accessible text when the visible content is terse (e.g. a count). */\n label?: string;\n className?: string;\n}\n\n/** Small pill for counts and tags. */\nexport function Badge({ children, tone = \"neutral\", label, className }: BadgeProps) {\n return (\n <span\n className={cn(\n \"inline-flex min-w-5 items-center justify-center rounded-full border px-1.5 text-xs leading-5 font-medium tabular-nums\",\n TONE_CLASSES[tone],\n className,\n )}\n title={label}\n >\n <span aria-hidden={label ? true : undefined}>{children}</span>\n {label && <span className=\"sr-only\">{label}</span>}\n </span>\n );\n}\n\n/** Count badge; renders nothing at zero. Caps at 99+. */\nexport function CountBadge({\n count,\n label,\n tone = \"danger\",\n className,\n}: {\n count: number;\n label: string;\n tone?: Tone;\n className?: string;\n}) {\n if (count <= 0) return null;\n return (\n <Badge tone={tone} label={`${count} ${label}`} className={className}>\n {count > 99 ? \"99+\" : count}\n </Badge>\n );\n}\n","import type {\n AttentionReason,\n Connectivity,\n OccurrenceState,\n RunState,\n RuntimeState,\n TaskState,\n} from \"@switchyard/protocol\";\nimport { InteractionState } from \"@switchyard/protocol\";\nimport {\n Activity,\n Ban,\n CircleAlert,\n CircleCheck,\n CircleDashed,\n CircleDot,\n CirclePause,\n CirclePlay,\n CircleSlash,\n CircleX,\n Clock,\n CloudOff,\n Eye,\n Hourglass,\n Inbox,\n ListChecks,\n LoaderCircle,\n type LucideIcon,\n MessageCircleQuestion,\n RefreshCw,\n Repeat,\n Square,\n Timer,\n TriangleAlert,\n Wifi,\n WifiOff,\n} from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport type { ConnectionState } from \"../../sync/store\";\nimport { TONE_CLASSES, type Tone } from \"./Badge\";\nimport { Spinner } from \"./Spinner\";\n\n/** A status presentation: always an icon plus a text label (never color alone). */\nexport interface StatusInfo {\n label: string;\n icon: LucideIcon;\n tone: Tone;\n /** Spin the icon (in-flight states). */\n spin?: boolean;\n /** Pulse the icon (ongoing, not transitional). */\n pulse?: boolean;\n}\n\nexport const RUNTIME_STATUS: Record<RuntimeState, StatusInfo> = {\n starting: { label: \"Starting…\", icon: LoaderCircle, tone: \"info\", spin: true },\n idle: { label: \"Idle\", icon: CircleDot, tone: \"neutral\" },\n running: { label: \"Running\", icon: Activity, tone: \"info\", pulse: true },\n waiting_input: { label: \"Needs input\", icon: MessageCircleQuestion, tone: \"warning\" },\n interrupted: { label: \"Interrupted\", icon: CirclePause, tone: \"warning\" },\n failed: { label: \"Failed\", icon: CircleX, tone: \"danger\" },\n stopped: { label: \"Stopped\", icon: Square, tone: \"neutral\" },\n};\n\n/** A finished session nobody has looked at yet. */\nexport const REVIEW_STATUS: StatusInfo = { label: \"Ready to review\", icon: Eye, tone: \"success\" };\n\nexport const TASK_STATUS: Record<TaskState, StatusInfo> = {\n backlog: { label: \"Backlog\", icon: Inbox, tone: \"neutral\" },\n ready: { label: \"Ready\", icon: CirclePlay, tone: \"info\" },\n in_progress: { label: \"In progress\", icon: LoaderCircle, tone: \"info\" },\n review: { label: \"Review\", icon: Eye, tone: \"warning\" },\n done: { label: \"Done\", icon: CircleCheck, tone: \"success\" },\n canceled: { label: \"Canceled\", icon: Ban, tone: \"neutral\" },\n};\n\nexport const RUN_STATUS: Record<RunState, StatusInfo> = {\n queued: { label: \"Queued\", icon: Clock, tone: \"neutral\" },\n dispatching: { label: \"Dispatching…\", icon: LoaderCircle, tone: \"info\", spin: true },\n uncertain: { label: \"Awaiting host confirmation\", icon: Hourglass, tone: \"warning\" },\n running: { label: \"Running\", icon: Activity, tone: \"info\", pulse: true },\n waiting_input: { label: \"Needs input\", icon: MessageCircleQuestion, tone: \"warning\" },\n checking: { label: \"Running checks\", icon: ListChecks, tone: \"info\", spin: false },\n succeeded: { label: \"Succeeded\", icon: CircleCheck, tone: \"success\" },\n failed: { label: \"Failed\", icon: CircleX, tone: \"danger\" },\n interrupted: { label: \"Interrupted\", icon: CirclePause, tone: \"warning\" },\n canceled: { label: \"Canceled\", icon: Ban, tone: \"neutral\" },\n};\n\n/** Host connectivity. */\nexport const HOST_STATUS: Record<Connectivity, StatusInfo> = {\n connected: { label: \"Connected\", icon: Wifi, tone: \"success\" },\n reconnecting: { label: \"Reconnecting…\", icon: RefreshCw, tone: \"warning\", spin: true },\n unreachable: { label: \"Unreachable\", icon: WifiOff, tone: \"danger\" },\n};\n\n/** This client's link to the coordinator. */\nexport const CONNECTION_STATUS: Record<ConnectionState, StatusInfo> = {\n connecting: { label: \"Connecting…\", icon: LoaderCircle, tone: \"info\", spin: true },\n live: { label: \"Live\", icon: Wifi, tone: \"success\" },\n reconnecting: { label: \"Reconnecting…\", icon: RefreshCw, tone: \"warning\", spin: true },\n offline: { label: \"Offline\", icon: CloudOff, tone: \"danger\" },\n};\n\nexport const INTERACTION_STATUS: Record<InteractionState, StatusInfo> = {\n pending: { label: \"Needs input\", icon: MessageCircleQuestion, tone: \"warning\" },\n resolved: { label: \"Answered\", icon: CircleCheck, tone: \"success\" },\n expired: { label: \"Expired\", icon: Hourglass, tone: \"neutral\" },\n canceled: { label: \"Canceled\", icon: CircleSlash, tone: \"neutral\" },\n unsupported: { label: \"Unsupported here\", icon: TriangleAlert, tone: \"warning\" },\n};\n\nexport const ATTENTION_STATUS: Record<AttentionReason, StatusInfo> = {\n needs_input: { label: \"Needs input\", icon: MessageCircleQuestion, tone: \"warning\" },\n failed: { label: \"Failed\", icon: CircleX, tone: \"danger\" },\n ready_for_review: { label: \"Ready for review\", icon: Eye, tone: \"info\" },\n unsupported_interaction: {\n label: \"Unsupported interaction\",\n icon: TriangleAlert,\n tone: \"warning\",\n },\n host_unreachable: { label: \"Host unreachable\", icon: WifiOff, tone: \"danger\" },\n cache_expiring: { label: \"Cache expiring\", icon: Timer, tone: \"warning\" },\n};\n\nexport const OCCURRENCE_STATUS: Record<OccurrenceState, StatusInfo> = {\n fired: { label: \"Fired\", icon: CirclePlay, tone: \"info\" },\n skipped_overlap: { label: \"Skipped (overlap)\", icon: CircleSlash, tone: \"neutral\" },\n skipped_missed: { label: \"Skipped (missed)\", icon: CircleSlash, tone: \"neutral\" },\n queued: { label: \"Queued\", icon: Clock, tone: \"neutral\" },\n appended: { label: \"Appended\", icon: Repeat, tone: \"info\" },\n failed: { label: \"Failed\", icon: CircleX, tone: \"danger\" },\n filtered: { label: \"Filtered out\", icon: CircleDashed, tone: \"neutral\" },\n};\n\nexport type StatusChipProps =\n | { kind: \"runtime\"; value: RuntimeState; label?: string; className?: string; size?: \"sm\" | \"md\" }\n | { kind: \"task\"; value: TaskState; label?: string; className?: string; size?: \"sm\" | \"md\" }\n | { kind: \"run\"; value: RunState; label?: string; className?: string; size?: \"sm\" | \"md\" }\n | { kind: \"host\"; value: Connectivity; label?: string; className?: string; size?: \"sm\" | \"md\" }\n | {\n kind: \"connection\";\n value: ConnectionState;\n label?: string;\n className?: string;\n size?: \"sm\" | \"md\";\n }\n | {\n kind: \"interaction\";\n value: InteractionState;\n label?: string;\n className?: string;\n size?: \"sm\" | \"md\";\n }\n | {\n kind: \"attention\";\n value: AttentionReason;\n label?: string;\n className?: string;\n size?: \"sm\" | \"md\";\n }\n | {\n kind: \"occurrence\";\n value: OccurrenceState;\n label?: string;\n className?: string;\n size?: \"sm\" | \"md\";\n }\n | { kind: \"custom\"; status: StatusInfo; label?: string; className?: string; size?: \"sm\" | \"md\" };\n\nconst FALLBACK: StatusInfo = { label: \"Unknown\", icon: CircleAlert, tone: \"neutral\" };\n\nexport function statusInfo(props: StatusChipProps): StatusInfo {\n switch (props.kind) {\n case \"runtime\":\n return RUNTIME_STATUS[props.value] ?? FALLBACK;\n case \"task\":\n return TASK_STATUS[props.value] ?? FALLBACK;\n case \"run\":\n return RUN_STATUS[props.value] ?? FALLBACK;\n case \"host\":\n return HOST_STATUS[props.value] ?? FALLBACK;\n case \"connection\":\n return CONNECTION_STATUS[props.value] ?? FALLBACK;\n case \"interaction\": {\n // Offline-cache values may still carry the pre-0.9 spelling.\n const s = InteractionState.safeParse(props.value);\n return s.success ? INTERACTION_STATUS[s.data] : FALLBACK;\n }\n case \"attention\":\n return ATTENTION_STATUS[props.value] ?? FALLBACK;\n case \"occurrence\":\n return OCCURRENCE_STATUS[props.value] ?? FALLBACK;\n case \"custom\":\n return props.status;\n }\n}\n\n/** Status pill: icon + text label, tone only reinforces. `label` overrides the text. */\nexport function StatusChip(props: StatusChipProps) {\n const info = statusInfo(props);\n const Icon = info.icon;\n const sm = props.size === \"sm\";\n return (\n <span\n data-status-chip={props.kind}\n className={cn(\n \"inline-flex max-w-full items-center gap-1 rounded-full border font-medium whitespace-nowrap\",\n sm ? \"px-1.5 text-xs leading-5\" : \"px-2 text-xs leading-6\",\n TONE_CLASSES[info.tone],\n props.className,\n )}\n >\n {info.spin ? (\n <Spinner className={sm ? \"size-3\" : \"size-3.5\"} />\n ) : (\n <Icon\n aria-hidden\n className={cn(sm ? \"size-3\" : \"size-3.5\", \"shrink-0\", info.pulse && \"animate-pulse\")}\n />\n )}\n <span className=\"truncate\">{props.label ?? info.label}</span>\n </span>\n );\n}\n\n/** Icon plus text status, the tone only reinforces. */\nexport function InlineStatus({\n icon: Icon,\n label,\n tone = \"neutral\",\n spin,\n className,\n}: {\n icon: LucideIcon;\n label: ReactNode;\n tone?: Tone;\n spin?: boolean;\n className?: string;\n}) {\n return (\n <span\n className={cn(\n \"inline-flex max-w-full items-center gap-1 rounded-full border px-2 text-xs leading-6 font-medium\",\n TONE_CLASSES[tone],\n className,\n )}\n >\n {spin ? <Spinner className=\"size-3.5\" /> : <Icon aria-hidden className=\"size-3.5 shrink-0\" />}\n <span className=\"min-w-0 truncate\">{label}</span>\n </span>\n );\n}\n","import { type ButtonHTMLAttributes, forwardRef, type ReactNode } from \"react\";\nimport { cn } from \"../../lib/cn\";\n\nexport interface IconButtonProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"aria-label\"> {\n /** Accessible name (also the tooltip). Required: icon-only controls need a label. */\n label: string;\n icon: ReactNode;\n variant?: \"ghost\" | \"secondary\" | \"danger\";\n size?: \"sm\" | \"md\";\n}\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n { label, icon, variant = \"ghost\", size = \"md\", className, type, ...rest },\n ref,\n) {\n return (\n <button\n ref={ref}\n type={type ?? \"button\"}\n aria-label={label}\n title={label}\n className={cn(\n \"tap inline-flex shrink-0 items-center justify-center rounded-md border transition-colors\",\n \"disabled:opacity-55 disabled:pointer-events-none\",\n size === \"sm\" ? \"size-8\" : \"size-9\",\n variant === \"ghost\" && \"border-transparent text-muted hover:bg-surface-2 hover:text-text\",\n variant === \"secondary\" && \"border-border bg-surface text-text hover:bg-surface-2\",\n variant === \"danger\" && \"border-transparent text-danger hover:bg-danger-soft\",\n className,\n )}\n {...rest}\n >\n {icon}\n </button>\n );\n});\n","import type { RefObject } from \"react\";\n\nexport interface KeyboardLayer {\n root: RefObject<HTMLElement | null>;\n onEscape: () => void;\n trapsFocus: boolean;\n}\n\nconst layers: { layer: KeyboardLayer }[] = [];\n\nfunction onDocumentKeyDown(event: KeyboardEvent): void {\n if (event.key !== \"Escape\" || event.isComposing || event.defaultPrevented) return;\n const top = topKeyboardLayer();\n if (!top) return;\n event.preventDefault();\n event.stopPropagation();\n top.onEscape();\n}\n\n/** Register one open surface. The returned cleanup removes exactly this registration. */\nexport function registerKeyboardLayer(layer: KeyboardLayer): () => void {\n const entry = { layer };\n layers.push(entry);\n if (layers.length === 1) document.addEventListener(\"keydown\", onDocumentKeyDown);\n return () => {\n const index = layers.indexOf(entry);\n if (index === -1) return;\n layers.splice(index, 1);\n if (layers.length === 0) document.removeEventListener(\"keydown\", onDocumentKeyDown);\n };\n}\n\nexport function topKeyboardLayer(): KeyboardLayer | undefined {\n return layers[layers.length - 1]?.layer;\n}\n\nexport function topTrappingKeyboardLayer(): KeyboardLayer | undefined {\n return layers.findLast(({ layer }) => layer.trapsFocus)?.layer;\n}\n\nexport function hasKeyboardLayer(): boolean {\n return layers.length > 0;\n}\n","import { type RefObject, useEffect, useRef } from \"react\";\nimport {\n registerKeyboardLayer,\n topKeyboardLayer,\n topTrappingKeyboardLayer,\n} from \"./keyboardLayers\";\n\nconst FOCUSABLE =\n 'a[href], area[href], button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), iframe, [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]';\n\nexport function focusableWithin(root: HTMLElement): HTMLElement[] {\n return [...root.querySelectorAll<HTMLElement>(FOCUSABLE)].filter(\n (el) =>\n !el.closest('[hidden], [inert], [aria-hidden=\"true\"], :disabled, [aria-disabled=\"true\"]') &&\n getComputedStyle(el).visibility !== \"hidden\" &&\n el.getClientRects().length > 0,\n );\n}\n\n/**\n * Modal focus management: moves focus into `ref` when `active`, keeps Tab\n * inside it, closes on Escape, and returns focus to the element that had it\n * (the trigger) when deactivated.\n */\nexport function useFocusTrap(\n ref: RefObject<HTMLElement | null>,\n active: boolean,\n onEscape?: () => void,\n initialFocus?: RefObject<HTMLElement | null>,\n): void {\n const escRef = useRef(onEscape);\n escRef.current = onEscape;\n // Remember the trigger while rendering the opening frame: by the time effects run, an\n // `autoFocus` field inside the surface has already taken focus.\n const triggerRef = useRef<HTMLElement | null>(null);\n const wasActive = useRef(false);\n if (active && !wasActive.current && typeof document !== \"undefined\") {\n triggerRef.current = document.activeElement as HTMLElement | null;\n }\n wasActive.current = active;\n useEffect(() => {\n if (!active) return;\n const root = ref.current;\n if (!root) return;\n const captured = triggerRef.current;\n const previous =\n captured && !root.contains(captured)\n ? captured\n : (document.activeElement as HTMLElement | null);\n const unregister = registerKeyboardLayer({\n root: ref,\n onEscape: () => escRef.current?.(),\n trapsFocus: true,\n });\n const layer = topKeyboardLayer();\n const target = initialFocus?.current ?? focusableWithin(root)[0] ?? root;\n // Defer so the element is laid out (portals, transitions).\n // An `autoFocus` field inside keeps its focus unless an explicit initial focus was given.\n const raf = requestAnimationFrame(() => {\n if (!initialFocus?.current && root.contains(document.activeElement)) return;\n target.focus({ preventScroll: true });\n });\n const onTab = (e: KeyboardEvent) => {\n if (e.key !== \"Tab\" || e.defaultPrevented || e.isComposing) return;\n if (topTrappingKeyboardLayer() !== layer) return;\n const items = focusableWithin(root);\n if (items.length === 0) {\n e.preventDefault();\n root.focus();\n return;\n }\n const first = items[0]!;\n const last = items[items.length - 1]!;\n const activeEl = document.activeElement;\n if (e.shiftKey && (activeEl === first || !root.contains(activeEl))) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && (activeEl === last || !root.contains(activeEl))) {\n e.preventDefault();\n first.focus();\n }\n };\n document.addEventListener(\"keydown\", onTab);\n return () => {\n cancelAnimationFrame(raf);\n document.removeEventListener(\"keydown\", onTab);\n const wasTop = topKeyboardLayer() === layer;\n unregister();\n // Do not steal focus if this was an underlying layer. For a nested close, only\n // return to an opener that belongs to the still-open top layer.\n if (!wasTop) return;\n const remaining = topKeyboardLayer();\n const remainingRoot = remaining?.root.current;\n if (remaining) {\n const next =\n previous?.isConnected && remainingRoot?.contains(previous)\n ? previous\n : remainingRoot && (focusableWithin(remainingRoot)[0] ?? remainingRoot);\n next?.focus({ preventScroll: true });\n } else {\n const next = previous?.isConnected\n ? previous\n : (document.querySelector<HTMLElement>(\"main\") ?? document.body);\n next.focus({ preventScroll: true });\n }\n };\n }, [active, ref, initialFocus]);\n}\n\nlet scrollLocks = 0;\nlet previousOverflow = \"\";\n\n/** Lock body scroll while at least one modal surface is open. */\nexport function useScrollLock(active: boolean): void {\n useEffect(() => {\n if (!active) return;\n if (scrollLocks++ === 0) {\n previousOverflow = document.body.style.overflow;\n document.body.style.overflow = \"hidden\";\n }\n return () => {\n if (--scrollLocks === 0) document.body.style.overflow = previousOverflow;\n };\n }, [active]);\n}\n","import { X } from \"lucide-react\";\nimport { type ReactNode, type RefObject, useId, useRef } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { cn } from \"../../lib/cn\";\nimport { errorMessage } from \"../../sync/api\";\nimport { Button } from \"./Button\";\nimport { IconButton } from \"./IconButton\";\nimport { ErrorState, InlineError } from \"./states\";\nimport { useFocusTrap, useScrollLock } from \"./useFocusTrap\";\n\nexport interface OverlayProps {\n open: boolean;\n onClose: () => void;\n /** Visible heading; also the accessible name. */\n title: ReactNode;\n /** Accessible description shown under the title. */\n description?: ReactNode;\n children?: ReactNode;\n /** Sticky footer (actions). */\n footer?: ReactNode;\n /** Element to focus first (defaults to the first focusable). */\n initialFocus?: RefObject<HTMLElement | null>;\n /** Close when the backdrop is clicked (default true). */\n dismissOnBackdrop?: boolean;\n /** Extra header controls before the close button. */\n headerActions?: ReactNode;\n className?: string;\n /** No padding around the body (for content that draws its own edges). */\n flush?: boolean;\n /** Extra body classes. Additive only: it cannot override the padding, use `flush`. */\n bodyClassName?: string;\n /** Bottom sheet only: fill the viewport height. */\n fullHeight?: boolean;\n}\n\ntype Placement = \"right\" | \"bottom\" | \"center\";\n\nfunction Surface({\n placement,\n open,\n onClose,\n title,\n description,\n children,\n footer,\n initialFocus,\n dismissOnBackdrop = true,\n headerActions,\n className,\n flush,\n bodyClassName,\n fullHeight,\n style,\n}: OverlayProps & { placement: Placement; style?: React.CSSProperties }) {\n const ref = useRef<HTMLDivElement>(null);\n const titleId = useId();\n const descId = useId();\n useFocusTrap(ref, open, onClose, initialFocus);\n useScrollLock(open);\n if (!open) return null;\n return createPortal(\n <div\n className={cn(\n \"fixed inset-0 z-50 flex\",\n placement === \"right\" && \"justify-end\",\n placement === \"bottom\" && \"items-end\",\n placement === \"center\" && \"items-center justify-center p-4\",\n )}\n >\n <div\n className=\"absolute inset-0 bg-overlay\"\n aria-hidden\n onClick={dismissOnBackdrop ? onClose : undefined}\n />\n <div\n ref={ref}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId}\n aria-describedby={description ? descId : undefined}\n tabIndex={-1}\n style={style}\n className={cn(\n \"relative flex flex-col bg-surface text-text shadow-pop outline-none\",\n placement === \"right\" && \"h-full max-w-full border-l border-border safe-pt safe-pb\",\n placement === \"bottom\" &&\n (fullHeight\n ? \"h-dvh w-full safe-pt safe-pb\"\n : \"max-h-[90dvh] w-full rounded-t-xl border-t border-border safe-pb\"),\n placement === \"center\" &&\n \"max-h-[min(90dvh,720px)] w-full max-w-lg rounded-xl border border-border\",\n className,\n )}\n >\n {placement === \"bottom\" && !fullHeight && (\n <div className=\"flex justify-center pt-2\" aria-hidden>\n <div className=\"h-1 w-10 rounded-full bg-border-strong\" />\n </div>\n )}\n <div className=\"flex items-start gap-2 border-b border-border px-4 py-3\">\n <div className=\"min-w-0 flex-1\">\n <h2 id={titleId} className=\"text-base font-semibold leading-6\">\n {title}\n </h2>\n {description && (\n <p id={descId} className=\"text-sm text-muted\">\n {description}\n </p>\n )}\n </div>\n {headerActions}\n <IconButton label=\"Close\" icon={<X className=\"size-4\" />} onClick={onClose} />\n </div>\n <div\n className={cn(\n \"min-h-0 flex-1 overflow-y-auto overscroll-contain\",\n !flush && \"px-4 py-3\",\n bodyClassName,\n )}\n >\n {children}\n </div>\n {footer && (\n <div className=\"flex flex-wrap items-center justify-end gap-2 border-t border-border px-4 py-3\">\n {footer}\n </div>\n )}\n </div>\n </div>,\n document.body,\n );\n}\n\nexport interface DrawerProps extends OverlayProps {\n /** Width in px (default 520, the task drawer width). Never wider than the viewport. */\n width?: number;\n}\n\n/** Right-side drawer with focus trap, Escape to close, and focus returned to the trigger. */\nexport function Drawer({ width = 520, ...props }: DrawerProps) {\n return <Surface {...props} placement=\"right\" style={{ width: `min(${width}px, 100vw)` }} />;\n}\n\n/** Bottom sheet for mobile; same accessibility behavior as Drawer. */\nexport function Sheet(props: OverlayProps) {\n return <Surface {...props} placement=\"bottom\" />;\n}\n\n/** Centered modal dialog. */\nexport function Dialog(props: OverlayProps) {\n return <Surface {...props} placement=\"center\" />;\n}\n\nexport interface ConfirmDialogProps {\n open: boolean;\n onClose: () => void;\n title: ReactNode;\n description?: ReactNode;\n confirmLabel: string;\n onConfirm: () => void;\n busy?: boolean;\n error?: unknown;\n /** Heading for the error; renders a titled error panel instead of the plain message. */\n errorTitle?: string;\n danger?: boolean;\n /** Icon before the confirm label. */\n confirmIcon?: ReactNode;\n confirmDisabled?: boolean;\n /** Shown next to the actions when the confirm button is disabled. */\n disabledReason?: ReactNode;\n children?: ReactNode;\n}\n\n/**\n * Confirmation dialog. Never closes on its own: the caller closes it after the\n * server acknowledges (no optimistic success). It cannot be dismissed while busy.\n */\nexport function ConfirmDialog({\n open,\n onClose,\n title,\n description,\n confirmLabel,\n onConfirm,\n busy,\n error,\n errorTitle,\n danger = true,\n confirmIcon,\n confirmDisabled,\n disabledReason,\n children,\n}: ConfirmDialogProps) {\n return (\n <Dialog\n open={open}\n onClose={busy ? () => undefined : onClose}\n dismissOnBackdrop={!busy}\n title={title}\n description={description}\n footer={\n <>\n {confirmDisabled && disabledReason && (\n <p className=\"mr-auto min-w-0 flex-1 basis-full text-xs text-muted sm:basis-auto\">\n {disabledReason}\n </p>\n )}\n <Button onClick={onClose} disabled={busy}>\n Cancel\n </Button>\n <Button\n variant={danger ? \"danger\" : \"primary\"}\n icon={confirmIcon}\n busy={busy}\n disabled={confirmDisabled}\n onClick={onConfirm}\n >\n {confirmLabel}\n </Button>\n </>\n }\n >\n <div className=\"flex flex-col gap-3\">\n {children}\n {errorTitle ? (\n !!error && <ErrorState compact title={errorTitle} error={errorMessage(error)} />\n ) : (\n <InlineError error={error} />\n )}\n </div>\n </Dialog>\n );\n}\n"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],"mappings":"A,gUAWA,IAAI8C,EAAAjB,EAAA,EACJ,SAASkB,EAAuB,EAAM,CACpC,IAAIC,EAAM,4BAA8BC,EACxC,GAAI,EAAI,UAAU,OAAQ,CACxB,GAAO,WAAa,mBAAmB,UAAU,EAAE,EACnD,IAAK,IAAIC,EAAI,EAAGA,EAAI,UAAU,OAAQ,IACpC,GAAO,WAAa,mBAAmB,UAAUA,EAAE,CACvD,CACA,MACE,yBACAD,EACA,WACAD,EACA,gHAEJ,CACA,SAASG,GAAO,CAAC,CACjB,IAAIC,EAAY,CACZ,EAAG,CACD,EAAGD,EACH,EAAG,UAAY,CACb,MAAM,MAAMJ,EAAuB,GAAG,CAAC,CACzC,EACA,EAAGI,EACH,EAAGA,EACH,EAAGA,EACH,EAAGA,EACH,EAAGA,EACH,EAAGA,EACH,EAAGA,CACL,EACA,EAAG,EACH,YAAa,IACf,EACAE,EAAoB,OAAO,IAAI,cAAc,EAC7CC,EAAyB,OAAO,IAAI,mBAAmB,EACvDC,EAAuB,OAAO,IAAI,sBAAsB,EAC1D,SAASC,EAAe,EAAU,EAAe,EAAgB,CAC/D,IAAIC,EACF,EAAI,UAAU,QAAqB,UAAU,KAArB,IAAK,GAAqB,UAAU,GAAK,KACnE,MAAO,CACL,SAAUJ,EACV,IACUI,GAAR,KACI,KACAA,IAAQF,EACNA,EACA,GAAKE,EACH,WACK,gBACC,gBAClB,CACF,CACA,IAAIC,EACFZ,EAAM,gEACR,SAASa,EAAuB,EAAI,EAAO,CACzC,GAAeC,IAAX,OAAe,MAAO,GAC1B,GAAiB,OAAOC,GAApB,SACF,OAA6BA,IAAtB,kBAA8BA,EAAQ,EACjD,CACA,EAAQ,6DACNT,EACF,EAAQ,QAAU,SAAU,EAAQ,CAClC,MAAO,CAAE,SAAUE,EAAwB,QAASQ,CAAO,CAC7D,EACA,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GAAYf,EAClC,kBAAmB,CAACe,EACb,QACM,cACb,QACE,EAAA9F,EAAA,KAAA,CAAA5F,EAAAA,SAAA,CAAA,SAAA,CACG2L,GAAmBC,IAClB,EAAAhG,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,qEACV,SAAAgG,CACA,CAAA,GAEL,EAAAhG,EAAA,IAAA,CAACrF,EAAD,CAAQ,QAASoK,EAAS,SAAUe,EAAM,SAAA,QAElC,CAAA,GACR,EAAA9F,EAAA,IAAA,CAACrF,EAAD,CACE,QAASsL,EAAS,SAAW,UAC7B,KAAMC,EACA,OACN,SAAUH,EACV,QAASI,EAER,SAAAC,CACK,CAAA,CACR,CAAA,CAAA,EAGJ,UAAA,EAAApG,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,sBAAf,SAAA,CACGjD,EACAsJ,EACC,CAAC,CAACC,IAAS,EAAAtG,EAAA,IAAA,CAAC9E,EAAD,CAAY,QAAA,GAAQ,MAAOmL,EAAY,MAAOxL,EAAayL,CAAK,CAAI,CAAA,GAE/E,EAAAtG,EAAA,IAAA,CAACjF,EAAD,CAAoB,OAAQ,CAAA,CAE3B,C,EACC,CAAA,CAEZ,C"}
@@ -1,2 +0,0 @@
1
- import{a as e,i as t,o as n}from"./Button-BKQW9doW.js";import{x as r}from"./Overlay-Cv0SIpoa.js";import{dt as i}from"./states-D7g0-4EY.js";import{t as a}from"./arrow-down-YwTzxo-r.js";import{t as o}from"./arrow-up-Bzh112dp.js";import{t as s}from"./Select-Dv-F-HZR.js";var c={name:`chevrons-up`,size:24,node:[[`path`,{d:`m17 11-5-5-5 5`,key:`e8nh98`}],[`path`,{d:`m17 18-5-5-5 5`,key:`2avn1x`}]]};c.node;var l=n(c),u={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};u.node;var d=n(u),f=t(),p={0:{label:i[0],icon:l,tone:`danger`},1:{label:i[1],icon:o,tone:`warning`},2:{label:i[2],icon:d,tone:`neutral`},3:{label:i[3],icon:a,tone:`neutral`}};function m({priority:t,className:n,colored:i=!0}){let a=p[t]??p[2],o=a.icon;return(0,f.jsx)(o,{"aria-hidden":!0,className:e(`shrink-0`,i&&r[a.tone],n??`size-4`)})}function h({priority:t,className:n,suffix:i,muted:a}){let o=p[t]??p[2];return(0,f.jsxs)(`span`,{className:e(`inline-flex items-center gap-1`,a?`text-muted`:r[o.tone],n),children:[(0,f.jsx)(m,{priority:t,className:`size-3.5`}),o.label,i]})}function g({value:e,onChange:t,...n}){return(0,f.jsx)(s,{...n,value:e,onChange:e=>t(Number(e.target.value)),children:i.map((e,t)=>(0,f.jsx)(`option`,{value:t,children:e},e))})}export{h as n,g as r,m as t};
2
- //# sourceMappingURL=Priority-aNWh1i4H.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SegmentedControl-D2kj3j7u.js","names":["cn","require_jsx_runtime","import_jsx_runtime","SegmentedControl","idx","options","o","value","label","block","className","next","onChange","selected"],"sources":["../../src/components/ui/SegmentedControl.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"../../lib/cn\";\n\nexport interface SegmentOption<T extends string> {\n value: T;\n label: ReactNode;\n icon?: ReactNode;\n badge?: ReactNode;\n}\n\nexport interface SegmentedControlProps<T extends string> {\n options: SegmentOption<T>[];\n value: T;\n onChange: (value: T) => void;\n /** Accessible name. */\n label: string;\n className?: string;\n block?: boolean;\n}\n\n/** Radio-group style switcher (e.g. mobile Chat / Changes / Details). */\nexport function SegmentedControl<T extends string>({\n options,\n value,\n onChange,\n label,\n className,\n block,\n}: SegmentedControlProps<T>) {\n const idx = options.findIndex((o) => o.value === value);\n return (\n <div\n role=\"radiogroup\"\n aria-label={label}\n className={cn(\n \"inline-flex rounded-lg border border-border bg-surface-2 p-0.5\",\n block && \"flex w-full\",\n className,\n )}\n onKeyDown={(e) => {\n let next = -1;\n if (e.key === \"ArrowRight\" || e.key === \"ArrowDown\") next = (idx + 1) % options.length;\n else if (e.key === \"ArrowLeft\" || e.key === \"ArrowUp\")\n next = (idx - 1 + options.length) % options.length;\n if (next < 0) return;\n e.preventDefault();\n onChange(options[next]!.value);\n const btns = e.currentTarget.querySelectorAll<HTMLElement>('[role=\"radio\"]');\n btns[next]?.focus();\n }}\n >\n {options.map((o) => {\n const selected = o.value === value;\n return (\n // biome-ignore lint/a11y/useSemanticElements: button-based radio group (WAI-ARIA radio pattern)\n <button\n key={o.value}\n type=\"button\"\n role=\"radio\"\n aria-checked={selected}\n tabIndex={selected ? 0 : -1}\n onClick={() => onChange(o.value)}\n className={cn(\n \"tap inline-flex min-h-8 flex-1 items-center justify-center gap-1.5 rounded-md px-3 text-sm font-medium whitespace-nowrap\",\n selected\n ? \"bg-surface text-text shadow-sm border border-border\"\n : \"text-muted hover:text-text border border-transparent\",\n )}\n >\n {o.icon}\n {o.label}\n {o.badge}\n </button>\n );\n })}\n </div>\n );\n}\n"],"mappings":"A,0DAqBA,SAAgBG,EAAmC,CACjD,UACA,QACA,WACA,QACA,YACA,SAC2B,CAC3B,IAAMC,EAAMC,EAAQ,UAAW,GAAMC,EAAE,QAAUC,CAAK,EACtD,OACE,EAAAL,EAAA,IAAA,CAAC,MAAD,CACE,KAAK,aACL,aAAYM,EACZ,UAAWR,EACT,iEACAS,GAAS,cACTC,CACF,EACA,UAAY,GAAM,CAChB,IAAIC,EAAO,GACP,EAAE,MAAQ,cAAgB,EAAE,MAAQ,YAAa,GAAQP,EAAM,GAAKC,EAAQ,QACvE,EAAE,MAAQ,aAAe,EAAE,MAAQ,aAC1C,GAAQD,EAAM,EAAIC,EAAQ,QAAUA,EAAQ,QAC1C,IAAO,KACX,EAAE,eAAe,EACjBO,EAASP,EAAQM,EAAK,CAAE,KAAK,EAE7B,EADe,cAAc,iBAA8B,gBAC3D,CAAA,CAAKA,EAAK,EAAE,MAAM,EACpB,EAEC,SAAAN,EAAQ,IAAK,GAAM,CAClB,IAAMQ,EAAWP,EAAE,QAAUC,EAC7B,OAEE,EAAAL,EAAA,KAAA,CAAC,SAAD,CAEE,KAAK,SACL,KAAK,QACL,eAAcW,EACd,SAAUA,EAAW,EAAI,GACzB,YAAeD,EAASN,EAAE,KAAK,EAC/B,UAAWN,EACT,2HACAa,EACI,sDACA,sDACN,EAZF,SAAA,CAcGP,EAAE,KACFA,EAAE,MACFA,EAAE,KACG,CAhBD,EAAAA,EAAE,KAgBD,CAEZ,CAAC,CACE,CAAA,CAET,C"}
@@ -1,2 +0,0 @@
1
- import{S as e,a as t,i as n,y as r}from"./Button-BKQW9doW.js";import{Gt as i}from"./index-xw7YOYjs.js";var a=e(r(),1),o=n(),s=(0,a.forwardRef)(function({className:e,width:n=`full`,children:r,...a},s){return(0,o.jsx)(`select`,{ref:s,className:t(`tap block h-9 min-w-0 px-2.5`,n===`auto`?`w-auto`:`w-full`,i,e),...a,children:r})});export{s as t};
2
- //# sourceMappingURL=Select-Dv-F-HZR.js.map