@jiggai/kitchen 0.3.10 → 0.3.11

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 (192) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error.html +2 -2
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +2 -2
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  15. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  20. package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/goals/[id]/promote/route.js.nft.json +1 -1
  22. package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  23. package/.next/server/app/api/goals/route.js.nft.json +1 -1
  24. package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
  25. package/.next/server/app/api/recipes/clone/route.js.nft.json +1 -1
  26. package/.next/server/app/api/recipes/custom-team/route.js.nft.json +1 -1
  27. package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
  28. package/.next/server/app/api/recipes/team-agents/route.js.nft.json +1 -1
  29. package/.next/server/app/api/scaffold/route.js.nft.json +1 -1
  30. package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -1
  31. package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js.nft.json +1 -1
  32. package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -1
  33. package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -1
  34. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -1
  35. package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -1
  36. package/.next/server/app/api/teams/remove-team/route.js.nft.json +1 -1
  37. package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -1
  38. package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -1
  39. package/.next/server/app/api/tickets/move/route.js.nft.json +1 -1
  40. package/.next/server/app/channels/page_client-reference-manifest.js +1 -1
  41. package/.next/server/app/channels.html +2 -2
  42. package/.next/server/app/channels.rsc +2 -2
  43. package/.next/server/app/channels.segments/_full.segment.rsc +2 -2
  44. package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
  45. package/.next/server/app/channels.segments/_index.segment.rsc +2 -2
  46. package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
  47. package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +1 -1
  48. package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
  49. package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
  50. package/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  51. package/.next/server/app/goals/new/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/goals/new.html +2 -2
  53. package/.next/server/app/goals/new.rsc +2 -2
  54. package/.next/server/app/goals/new.segments/_full.segment.rsc +2 -2
  55. package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
  56. package/.next/server/app/goals/new.segments/_index.segment.rsc +2 -2
  57. package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
  58. package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +1 -1
  59. package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
  60. package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
  61. package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  62. package/.next/server/app/goals.html +1 -1
  63. package/.next/server/app/goals.rsc +2 -2
  64. package/.next/server/app/goals.segments/_full.segment.rsc +2 -2
  65. package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
  66. package/.next/server/app/goals.segments/_index.segment.rsc +2 -2
  67. package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
  68. package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +1 -1
  69. package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
  70. package/.next/server/app/page.js +2 -2
  71. package/.next/server/app/page.js.nft.json +1 -1
  72. package/.next/server/app/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/recipes/[id]/page.js +3 -3
  74. package/.next/server/app/recipes/[id]/page.js.nft.json +1 -1
  75. package/.next/server/app/recipes/[id]/page_client-reference-manifest.js +1 -1
  76. package/.next/server/app/recipes/page.js +2 -2
  77. package/.next/server/app/recipes/page.js.nft.json +1 -1
  78. package/.next/server/app/recipes/page_client-reference-manifest.js +1 -1
  79. package/.next/server/app/runs/page.js +3 -3
  80. package/.next/server/app/runs/page.js.nft.json +1 -1
  81. package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  82. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  83. package/.next/server/app/settings.html +1 -1
  84. package/.next/server/app/settings.rsc +2 -2
  85. package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  86. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  87. package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  88. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  89. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  90. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  91. package/.next/server/app/teams/[teamId]/page.js +3 -3
  92. package/.next/server/app/teams/[teamId]/page.js.nft.json +1 -1
  93. package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js +2 -2
  95. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js.nft.json +1 -1
  96. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page_client-reference-manifest.js +1 -1
  97. package/.next/server/app/teams/[teamId]/runs/page_client-reference-manifest.js +1 -1
  98. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -1
  99. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  100. package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -1
  101. package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +1 -1
  102. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +3 -3
  103. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -1
  104. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
  105. package/.next/server/app/teams/[teamId]/workflows/page.js +3 -3
  106. package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -1
  107. package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +1 -1
  108. package/.next/server/app/tickets/[ticket]/page.js.nft.json +1 -1
  109. package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  110. package/.next/server/app/tickets/page.js.nft.json +1 -1
  111. package/.next/server/app/tickets/page_client-reference-manifest.js +1 -1
  112. package/.next/server/chunks/[root-of-the-server]__ff69832c._.js.map +1 -1
  113. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js +1 -1
  114. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js.map +1 -1
  115. package/.next/server/chunks/ssr/[root-of-the-server]__24c20736._.js +3 -0
  116. package/.next/server/chunks/ssr/[root-of-the-server]__24c20736._.js.map +1 -0
  117. package/.next/server/chunks/ssr/[root-of-the-server]__30619465._.js +3 -0
  118. package/.next/server/chunks/ssr/[root-of-the-server]__30619465._.js.map +1 -0
  119. package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js +1 -1
  120. package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js.map +1 -1
  121. package/.next/server/chunks/ssr/[root-of-the-server]__4981f370._.js +3 -0
  122. package/.next/server/chunks/ssr/[root-of-the-server]__4981f370._.js.map +1 -0
  123. package/.next/server/chunks/ssr/[root-of-the-server]__4c66998a._.js +3 -0
  124. package/.next/server/chunks/ssr/[root-of-the-server]__4c66998a._.js.map +1 -0
  125. package/.next/server/chunks/ssr/[root-of-the-server]__7fcc6175._.js +3 -0
  126. package/.next/server/chunks/ssr/[root-of-the-server]__7fcc6175._.js.map +1 -0
  127. package/.next/server/chunks/ssr/[root-of-the-server]__8e001110._.js +3 -0
  128. package/.next/server/chunks/ssr/[root-of-the-server]__8e001110._.js.map +1 -0
  129. package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js +1 -1
  130. package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js.map +1 -1
  131. package/.next/server/chunks/ssr/[root-of-the-server]__ad4e8478._.js +3 -0
  132. package/.next/server/chunks/ssr/[root-of-the-server]__ad4e8478._.js.map +1 -0
  133. package/.next/server/chunks/ssr/[root-of-the-server]__bd20cf10._.js +3 -0
  134. package/.next/server/chunks/ssr/[root-of-the-server]__bd20cf10._.js.map +1 -0
  135. package/.next/server/chunks/ssr/[root-of-the-server]__cefae8c8._.js +3 -0
  136. package/.next/server/chunks/ssr/[root-of-the-server]__cefae8c8._.js.map +1 -0
  137. package/.next/server/chunks/ssr/{node_modules_next_10fb6ad9._.js → _7f9e89d2._.js} +2 -2
  138. package/.next/server/chunks/ssr/_7f9e89d2._.js.map +1 -0
  139. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +1 -1
  140. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -1
  141. package/.next/server/chunks/ssr/src_59477309._.js +1 -1
  142. package/.next/server/chunks/ssr/src_59477309._.js.map +1 -1
  143. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js +3 -0
  144. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js.map +1 -0
  145. package/.next/server/chunks/ssr/src_lib_errors_ts_f440efeb._.js +3 -0
  146. package/.next/server/chunks/ssr/src_lib_errors_ts_f440efeb._.js.map +1 -0
  147. package/.next/server/pages/404.html +1 -1
  148. package/.next/server/pages/500.html +2 -2
  149. package/.next/server/server-reference-manifest.js +1 -1
  150. package/.next/server/server-reference-manifest.json +1 -1
  151. package/.next/static/chunks/3e0d3a43014c0ad2.css +3 -0
  152. package/.next/static/chunks/43d0024279c6160e.js +1 -0
  153. package/.next/static/chunks/4f5e02a609758a0b.js +1 -0
  154. package/.next/static/chunks/5e3b1d0f61a651bf.js +1 -0
  155. package/.next/static/chunks/be12a66bd736fad8.js +1 -0
  156. package/openclaw.plugin.json +1 -1
  157. package/package.json +1 -1
  158. package/public/images/clawkitchen/home.png +0 -0
  159. package/public/images/clawkitchen/recipes.png +0 -0
  160. package/public/images/clawkitchen/runs.png +0 -0
  161. package/public/images/clawkitchen/team.png +0 -0
  162. package/public/images/clawkitchen/tickets.png +0 -0
  163. package/public/images/clawkitchen/workflows.png +0 -0
  164. package/.next/server/chunks/ssr/[root-of-the-server]__1d65fddf._.js +0 -3
  165. package/.next/server/chunks/ssr/[root-of-the-server]__1d65fddf._.js.map +0 -1
  166. package/.next/server/chunks/ssr/[root-of-the-server]__450d6006._.js +0 -3
  167. package/.next/server/chunks/ssr/[root-of-the-server]__450d6006._.js.map +0 -1
  168. package/.next/server/chunks/ssr/[root-of-the-server]__76f9757d._.js +0 -3
  169. package/.next/server/chunks/ssr/[root-of-the-server]__76f9757d._.js.map +0 -1
  170. package/.next/server/chunks/ssr/[root-of-the-server]__9ffebe91._.js +0 -3
  171. package/.next/server/chunks/ssr/[root-of-the-server]__9ffebe91._.js.map +0 -1
  172. package/.next/server/chunks/ssr/[root-of-the-server]__a26db919._.js +0 -3
  173. package/.next/server/chunks/ssr/[root-of-the-server]__a26db919._.js.map +0 -1
  174. package/.next/server/chunks/ssr/[root-of-the-server]__afaa71fe._.js +0 -3
  175. package/.next/server/chunks/ssr/[root-of-the-server]__afaa71fe._.js.map +0 -1
  176. package/.next/server/chunks/ssr/[root-of-the-server]__b577b475._.js +0 -3
  177. package/.next/server/chunks/ssr/[root-of-the-server]__b577b475._.js.map +0 -1
  178. package/.next/server/chunks/ssr/[root-of-the-server]__e94ab521._.js +0 -3
  179. package/.next/server/chunks/ssr/[root-of-the-server]__e94ab521._.js.map +0 -1
  180. package/.next/server/chunks/ssr/[root-of-the-server]__fb6781d4._.js +0 -3
  181. package/.next/server/chunks/ssr/[root-of-the-server]__fb6781d4._.js.map +0 -1
  182. package/.next/server/chunks/ssr/node_modules_next_10fb6ad9._.js.map +0 -1
  183. package/.next/server/chunks/ssr/src_e54f24fb._.js +0 -3
  184. package/.next/server/chunks/ssr/src_e54f24fb._.js.map +0 -1
  185. package/.next/static/chunks/42b3230688d0834c.js +0 -1
  186. package/.next/static/chunks/7495459fdf300bf9.js +0 -1
  187. package/.next/static/chunks/be874907adf946fd.js +0 -1
  188. package/.next/static/chunks/e397a21bf5f13650.js +0 -1
  189. package/.next/static/chunks/f5d0d403c0fecb7f.css +0 -3
  190. /package/.next/static/{0PWp2TzSmiSf_Pf9YHES- → pW5SAQ1dzPcsq_66yy5po}/_buildManifest.js +0 -0
  191. /package/.next/static/{0PWp2TzSmiSf_Pf9YHES- → pW5SAQ1dzPcsq_66yy5po}/_clientMiddlewareManifest.json +0 -0
  192. /package/.next/static/{0PWp2TzSmiSf_Pf9YHES- → pW5SAQ1dzPcsq_66yy5po}/_ssgManifest.js +0 -0
@@ -1,3 +0,0 @@
1
- module.exports=[74621,a=>{"use strict";function b(a){return a instanceof Error?a.message:String(a)}a.s(["errorMessage",()=>b])},83856,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(50944),f=a.i(51200),g=a.i(74621);function h(a){return!!a&&"object"==typeof a&&!Array.isArray(a)}function i({teamId:a}){let i=(0,e.useRouter)(),[j,k]=(0,c.useState)([]),[l,m]=(0,c.useState)(!0),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(""),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)({}),[v,w]=(0,c.useState)({}),[x,y]=(0,c.useState)(""),[z,A]=(0,c.useState)(""),[B,C]=(0,c.useState)(null),[D,E]=(0,c.useState)(""),[F,G]=(0,c.useState)(""),[H,I]=(0,c.useState)(!1),J=(0,c.useCallback)(async b=>{let c=!!b?.quiet;q(""),c||m(!0);try{let b=await (0,f.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(a)}`,{cache:"no-store"});if(!b.ok)throw Error("Failed to load workflows");let c=(Array.isArray(b.files)?b.files:[]).map(a=>a.endsWith(".workflow.json")?a.slice(0,-14):null).filter(a=>!!a);k(c.map(a=>({id:a,name:a})))}catch(a){q((0,g.errorMessage)(a))}finally{c||m(!1)}},[a]);async function K(){o(!0);try{await J({quiet:!0})}finally{o(!1)}}async function L(b){if(confirm(`Delete workflow “${b}”? This removes the .workflow.json file from the team workspace.`)){q("");try{let c=await (0,f.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(a)}&id=${encodeURIComponent(b)}`,{method:"DELETE"});if(!c.ok)throw Error(c.error||"Failed to delete workflow");await J({quiet:!0}),r===b&&(s(""),y(""),C(null))}catch(a){q((0,g.errorMessage)(a))}}}async function M(b){w(a=>({...a,[b]:!0})),E("");try{let c=await (0,f.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(a)}&workflowId=${encodeURIComponent(b)}`,{cache:"no-store"});if(!c.ok)throw Error(c.error||"Failed to load runs");let d=Array.isArray(c.runIds)?c.runIds.map(a=>String(a||"").trim()).filter(Boolean):Array.isArray(c.files)?c.files.map(a=>"string"==typeof a&&a.endsWith(".run.json")?a.slice(0,-9):null).filter(a=>!!a):[];u(a=>({...a,[b]:d}))}catch(a){E((0,g.errorMessage)(a)),u(a=>({...a,[b]:[]}))}finally{w(a=>({...a,[b]:!1}))}}async function N(b,c){A(b),y(c),C(null),E(""),G("");try{let d=await (0,f.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(a)}&workflowId=${encodeURIComponent(b)}&runId=${encodeURIComponent(c)}`,{cache:"no-store"});if(!d.ok)throw Error(d.error||"Failed to load run");let e=h(d.run)?d.run:null;if(!e)throw Error("Invalid run format");C({id:String(e.id??c),status:"string"==typeof e.status?e.status:void 0,startedAt:"string"==typeof e.startedAt?e.startedAt:void 0,finishedAt:"string"==typeof e.finishedAt?String(e.finishedAt):void 0,meta:e.meta,memoryUsed:e.memoryUsed,approval:e.approval,raw:e})}catch(a){E((0,g.errorMessage)(a)),C(null)}}async function O(b){if(confirm(`Add workflow from template “${b}”?`)){q("");try{let c=await (0,f.fetchJson)("/api/teams/workflow-templates",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:a,templateId:b})});if(!c.ok)throw Error(c.error||"Failed to apply template");let d=String(c.workflowId??"").trim();if(!d)throw Error("Template applied but workflowId missing");await J({quiet:!0}),i.push(`/teams/${encodeURIComponent(a)}/workflows/${encodeURIComponent(d)}`)}catch(a){q((0,g.errorMessage)(a))}}}(0,c.useEffect)(()=>{J()},[J]);let P=(0,c.useMemo)(()=>{if(!B)return[];let a=B.memoryUsed??(h(B.meta)?B.meta.memoryUsed:void 0);return Array.isArray(a)?a.map(a=>h(a)?a:null).filter(Boolean).map(a=>({ts:String(a.ts??"").trim(),author:String(a.author??"").trim(),type:String(a.type??"").trim(),content:String(a.content??"").trim(),source:a.source})).filter(a=>a.ts&&a.author&&a.type&&a.content):[]},[B]);return l?(0,b.jsx)("div",{className:"ck-glass p-4",children:"Loading workflows…"}):(0,b.jsxs)("div",{className:"ck-glass p-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"text-lg font-semibold",children:"Workflows (file-first)"}),(0,b.jsxs)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:["Stored in ",(0,b.jsx)("code",{children:"shared-context/workflows/<id>.workflow.json"})," inside the team workspace."]}),(0,b.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-start gap-2",children:[(0,b.jsx)("button",{type:"button",onClick:()=>{let b=`new-${Date.now()}`;i.push(`/teams/${encodeURIComponent(a)}/workflows/${encodeURIComponent(b)}?draft=1`)},className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)]",children:"Add workflow"}),(0,b.jsx)("button",{type:"button",onClick:()=>void O("marketing-cadence-v1"),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Add example template"}),(0,b.jsx)("button",{type:"button",onClick:K,disabled:n,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:n?"Refreshing…":"Refresh"})]})]}),p?(0,b.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-4 text-sm text-red-100",children:p}):null,0===j.length?(0,b.jsx)("p",{className:"mt-4 text-sm text-[color:var(--ck-text-secondary)]",children:"No workflows yet."}):(0,b.jsx)("ul",{className:"mt-4 divide-y divide-white/10 overflow-hidden rounded-[var(--ck-radius-sm)] border border-white/10",children:j.map(c=>{let e=r===c.id,f=t[c.id]??[],i=!!v[c.id];return(0,b.jsxs)("li",{className:"bg-white/5",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[(0,b.jsxs)("button",{type:"button",onClick:async()=>{let a=e?"":c.id;s(a),y(""),C(null),E(""),a&&await M(a)},className:"min-w-0 flex-1 text-left",children:[(0,b.jsx)("div",{className:"truncate text-sm font-medium text-[color:var(--ck-text-primary)]",children:c.name||c.id}),(0,b.jsx)("div",{className:"truncate text-xs text-[color:var(--ck-text-tertiary)]",children:c.id}),(0,b.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["Click to ",e?"collapse":"expand"," run details"]})]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,b.jsx)(d.default,{href:`/teams/${encodeURIComponent(a)}/workflows/${encodeURIComponent(c.id)}`,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Edit"}),(0,b.jsx)("button",{type:"button",onClick:()=>void L(c.id),className:"rounded-[var(--ck-radius-sm)] border border-[color:rgba(255,59,48,0.45)] bg-[color:rgba(255,59,48,0.08)] px-3 py-1.5 text-sm font-medium text-[color:var(--ck-accent-red)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)]",children:"Delete"})]})]}),e?(0,b.jsxs)("div",{className:"border-t border-white/10 bg-black/20 px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,b.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Runs"}),(0,b.jsx)("button",{type:"button",disabled:i,onClick:()=>void M(c.id),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:i?"Loading…":"Refresh runs"})]}),D?(0,b.jsx)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:D}):null,(0,b.jsxs)("div",{className:"mt-2 grid grid-cols-1 gap-3 lg:grid-cols-2",children:[(0,b.jsx)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2",children:f.length?(0,b.jsx)("div",{className:"space-y-1",children:f.slice(0,8).map(a=>{let d=x===a;return(0,b.jsx)("button",{type:"button",onClick:()=>void N(c.id,a),className:d?"w-full rounded-[var(--ck-radius-sm)] bg-white/10 px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-primary)]":"w-full rounded-[var(--ck-radius-sm)] px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-secondary)] hover:bg-white/5",children:(0,b.jsx)("span",{className:"font-mono",children:a})},a)})}):(0,b.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"No runs yet."})}),(0,b.jsx)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-3",children:B?(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Run detail"}),(0,b.jsxs)("div",{className:"mt-1 text-[11px] text-[color:var(--ck-text-tertiary)]",children:[(0,b.jsx)("span",{className:"font-mono",children:B.id}),B.status?(0,b.jsxs)("span",{children:[" • ",B.status]}):null]})]}),(0,b.jsxs)("div",{className:"border-t border-white/10 pt-3",children:[(0,b.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Approval"}),(()=>{let c=B.approval;if(!h(c))return(0,b.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"(No approval info recorded.)"});let d=String(c.state??"").trim(),e="string"==typeof c.requestedAt?c.requestedAt:"",f="string"==typeof c.decidedAt?c.decidedAt:"",i="string"==typeof c.decidedBy?c.decidedBy:"",j="string"==typeof c.note?c.note:"",k=h(c.outbound)?c.outbound:null,l="pending"===d||"waiting_for_approval"===B.status;return(0,b.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,b.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2 text-[11px] text-[color:var(--ck-text-secondary)]",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"font-mono",children:"state"}),": ",(0,b.jsx)("span",{className:"font-mono text-[color:var(--ck-text-primary)]",children:d||"(unknown)"})]}),e?(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"font-mono",children:"requestedAt"}),": ",(0,b.jsx)("span",{className:"font-mono",children:e})]}):null,f?(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"font-mono",children:"decidedAt"}),": ",(0,b.jsx)("span",{className:"font-mono",children:f})]}):null,i?(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"font-mono",children:"decidedBy"}),": ",(0,b.jsx)("span",{className:"font-mono",children:i})]}):null,j?(0,b.jsx)("div",{className:"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]",children:j}):null,k?(0,b.jsxs)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px]",children:[(0,b.jsx)("div",{className:"text-[color:var(--ck-text-tertiary)]",children:"Outbound"}),(0,b.jsx)("pre",{className:"mt-1 overflow-auto whitespace-pre-wrap",children:JSON.stringify(k,null,2)})]}):null]}),l?(0,b.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"approval note (optional)"}),(0,b.jsx)("textarea",{value:F,onChange:a=>G(a.target.value),rows:3,className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"e.g. Ship it / please tweak hook"}),(0,b.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:[{action:"approve",label:"Approve"},{action:"request_changes",label:"Request changes"},{action:"cancel",label:"Cancel"}].map(c=>(0,b.jsx)("button",{type:"button",disabled:H,onClick:async()=>{if(z&&x&&confirm(`${c.label} run ${x}?`)){I(!0),E("");try{let b=await fetch("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:a,workflowId:z,runId:x,action:c.action,note:F||void 0,decidedBy:"ClawKitchen UI"})}),d=await b.json();if(!b.ok||!d.ok)throw Error(d.error||"Failed to apply approval action");await N(z,x)}catch(a){E((0,g.errorMessage)(a))}finally{I(!1)}}},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:c.label},c.action))})]}):null]})})()]}),(0,b.jsxs)("div",{className:"border-t border-white/10 pt-3",children:[(0,b.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Memory used in this run"}),P.length?(0,b.jsx)("div",{className:"mt-2 space-y-2",children:P.slice(0,20).map((a,c)=>(0,b.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2",children:[(0,b.jsxs)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:[(0,b.jsx)("span",{className:"font-mono",children:a.ts})," • ",(0,b.jsx)("span",{className:"font-mono",children:a.type})," • ",(0,b.jsx)("span",{className:"font-mono",children:a.author})]}),(0,b.jsx)("div",{className:"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]",children:a.content}),void 0!==a.source?(0,b.jsx)("pre",{className:"mt-2 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px] text-[color:var(--ck-text-secondary)]",children:JSON.stringify(a.source,null,2)}):null]},`${a.ts}-${c}`))}):(0,b.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["(None recorded yet.)",(0,b.jsxs)("div",{className:"mt-1",children:["Next step: have the workflow runner write an explicit ",(0,b.jsx)("span",{className:"font-mono",children:"memoryUsed[]"})," list into the run file."]})]})]})]}):x?(0,b.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"Loading run…"}):(0,b.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Select a run to see details."})})]})]}):null]},c.id)})})]})}a.s(["default",()=>i])}];
2
-
3
- //# sourceMappingURL=src_e54f24fb._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/lib/errors.ts","../../../../src/app/teams/%5BteamId%5D/workflows/workflows-client.tsx"],"sourcesContent":["/**\n * Extracts a string message from an unknown error value.\n * Used consistently across API routes and client components.\n */\nexport function errorMessage(e: unknown): string {\n return e instanceof Error ? e.message : String(e);\n}\n","\"use client\";\n\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\nimport Link from \"next/link\";\nimport { useRouter } from \"next/navigation\";\nimport { fetchJson } from \"@/lib/fetch-json\";\nimport { errorMessage } from \"@/lib/errors\";\n\ntype RunDetail = {\n id: string;\n status?: string;\n startedAt?: string;\n finishedAt?: string;\n meta?: unknown;\n memoryUsed?: unknown;\n approval?: unknown;\n raw?: Record<string, unknown>;\n};\n\nfunction isRecord(v: unknown): v is Record<string, unknown> {\n return Boolean(v) && typeof v === \"object\" && !Array.isArray(v);\n}\n\nexport default function WorkflowsClient({ teamId }: { teamId: string }) {\n const router = useRouter();\n const [workflows, setWorkflows] = useState<Array<{ id: string; name?: string }>>([]);\n const [loading, setLoading] = useState(true);\n const [refreshing, setRefreshing] = useState(false);\n const [error, setError] = useState<string>(\"\");\n\n const [expandedWorkflowId, setExpandedWorkflowId] = useState<string>(\"\");\n const [runsByWorkflow, setRunsByWorkflow] = useState<Record<string, string[]>>({});\n const [runsLoading, setRunsLoading] = useState<Record<string, boolean>>({});\n const [selectedRunId, setSelectedRunId] = useState<string>(\"\");\n const [selectedWorkflowId, setSelectedWorkflowId] = useState<string>(\"\");\n const [selectedRun, setSelectedRun] = useState<RunDetail | null>(null);\n const [runError, setRunError] = useState<string>(\"\");\n const [approvalNote, setApprovalNote] = useState<string>(\"\");\n const [approvalBusy, setApprovalBusy] = useState<boolean>(false);\n\n const load = useCallback(\n async (opts?: { quiet?: boolean }) => {\n const quiet = Boolean(opts?.quiet);\n setError(\"\");\n if (!quiet) setLoading(true);\n try {\n const json = await fetchJson<{ ok?: boolean; files?: string[] }>(\n `/api/teams/workflows?teamId=${encodeURIComponent(teamId)}`,\n { cache: \"no-store\" }\n );\n if (!json.ok) throw new Error(\"Failed to load workflows\");\n const files = Array.isArray(json.files) ? json.files : [];\n const ids = files\n .map((f) => (f.endsWith(\".workflow.json\") ? f.slice(0, -\".workflow.json\".length) : null))\n .filter((id): id is string => Boolean(id));\n setWorkflows(ids.map((id) => ({ id, name: id })));\n } catch (e: unknown) {\n setError(errorMessage(e));\n } finally {\n if (!quiet) setLoading(false);\n }\n },\n [teamId]\n );\n\n useEffect(() => {\n void load();\n }, [load]);\n\n async function onRefresh() {\n setRefreshing(true);\n try {\n await load({ quiet: true });\n } finally {\n setRefreshing(false);\n }\n }\n\n async function onDelete(id: string) {\n if (!confirm(`Delete workflow “${id}”? This removes the .workflow.json file from the team workspace.`)) return;\n setError(\"\");\n try {\n const json = await fetchJson<{ ok?: boolean; error?: string }>(\n `/api/teams/workflows?teamId=${encodeURIComponent(teamId)}&id=${encodeURIComponent(id)}`,\n { method: \"DELETE\" }\n );\n if (!json.ok) throw new Error(json.error || \"Failed to delete workflow\");\n await load({ quiet: true });\n if (expandedWorkflowId === id) {\n setExpandedWorkflowId(\"\");\n setSelectedRunId(\"\");\n setSelectedRun(null);\n }\n } catch (e: unknown) {\n setError(errorMessage(e));\n }\n }\n\n async function loadRunsForWorkflow(workflowId: string) {\n setRunsLoading((s) => ({ ...s, [workflowId]: true }));\n setRunError(\"\");\n try {\n const json = await fetchJson<{ ok?: boolean; runIds?: string[]; files?: string[]; error?: string }>(\n `/api/teams/workflow-runs?teamId=${encodeURIComponent(teamId)}&workflowId=${encodeURIComponent(workflowId)}`,\n { cache: \"no-store\" }\n );\n if (!json.ok) throw new Error(json.error || \"Failed to load runs\");\n\n // New API: runIds (directory-per-run layout). Back-compat: files[] of *.run.json.\n const runIds = Array.isArray(json.runIds)\n ? json.runIds.map((x) => String(x || \"\").trim()).filter(Boolean)\n : Array.isArray(json.files)\n ? json.files\n .map((f) => (typeof f === \"string\" && f.endsWith(\".run.json\") ? f.slice(0, -\".run.json\".length) : null))\n .filter((x): x is string => Boolean(x))\n : [];\n\n setRunsByWorkflow((s) => ({ ...s, [workflowId]: runIds }));\n } catch (e: unknown) {\n setRunError(errorMessage(e));\n setRunsByWorkflow((s) => ({ ...s, [workflowId]: [] }));\n } finally {\n setRunsLoading((s) => ({ ...s, [workflowId]: false }));\n }\n }\n\n async function loadRunDetail(workflowId: string, runId: string) {\n setSelectedWorkflowId(workflowId);\n setSelectedRunId(runId);\n setSelectedRun(null);\n setRunError(\"\");\n setApprovalNote(\"\");\n try {\n const json = await fetchJson<{ ok?: boolean; run?: unknown; error?: string }>(\n `/api/teams/workflow-runs?teamId=${encodeURIComponent(teamId)}&workflowId=${encodeURIComponent(workflowId)}&runId=${encodeURIComponent(runId)}`,\n { cache: \"no-store\" }\n );\n if (!json.ok) throw new Error(json.error || \"Failed to load run\");\n const run = isRecord(json.run) ? json.run : null;\n if (!run) throw new Error(\"Invalid run format\");\n setSelectedRun({\n id: String(run.id ?? runId),\n status: typeof run.status === \"string\" ? run.status : undefined,\n startedAt: typeof run.startedAt === \"string\" ? run.startedAt : undefined,\n finishedAt: typeof (run as Record<string, unknown>).finishedAt === \"string\" ? String((run as Record<string, unknown>).finishedAt) : undefined,\n meta: (run as Record<string, unknown>).meta,\n memoryUsed: (run as Record<string, unknown>).memoryUsed,\n approval: (run as Record<string, unknown>).approval,\n raw: run,\n });\n } catch (e: unknown) {\n setRunError(errorMessage(e));\n setSelectedRun(null);\n }\n }\n\n async function onAddTemplate(templateId: string) {\n if (!confirm(`Add workflow from template “${templateId}”?`)) return;\n setError(\"\");\n try {\n const json = await fetchJson<{ ok?: boolean; workflowId?: string; error?: string }>(\"/api/teams/workflow-templates\", {\n method: \"POST\",\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify({ teamId, templateId }),\n });\n if (!json.ok) throw new Error(json.error || \"Failed to apply template\");\n const workflowId = String(json.workflowId ?? \"\").trim();\n if (!workflowId) throw new Error(\"Template applied but workflowId missing\");\n await load({ quiet: true });\n router.push(`/teams/${encodeURIComponent(teamId)}/workflows/${encodeURIComponent(workflowId)}`);\n } catch (e: unknown) {\n setError(errorMessage(e));\n }\n }\n const memoryUsedItems = useMemo(() => {\n const run = selectedRun;\n if (!run) return [] as Array<{ ts: string; author: string; type: string; content: string; source?: unknown }>;\n\n const raw = run.memoryUsed ?? (isRecord(run.meta) ? (run.meta as Record<string, unknown>).memoryUsed : undefined);\n if (!Array.isArray(raw)) return [];\n\n return raw\n .map((x) => (isRecord(x) ? x : null))\n .filter(Boolean)\n .map((o) => ({\n ts: String((o as Record<string, unknown>).ts ?? \"\").trim(),\n author: String((o as Record<string, unknown>).author ?? \"\").trim(),\n type: String((o as Record<string, unknown>).type ?? \"\").trim(),\n content: String((o as Record<string, unknown>).content ?? \"\").trim(),\n source: (o as Record<string, unknown>).source,\n }))\n .filter((it) => it.ts && it.author && it.type && it.content);\n }, [selectedRun]);\n\n if (loading) {\n return <div className=\"ck-glass p-4\">Loading workflows…</div>;\n }\n\n return (\n <div className=\"ck-glass p-6\">\n <div>\n <h2 className=\"text-lg font-semibold\">Workflows (file-first)</h2>\n <p className=\"mt-1 text-sm text-[color:var(--ck-text-secondary)]\">\n Stored in <code>shared-context/workflows/&lt;id&gt;.workflow.json</code> inside the team workspace.\n </p>\n\n <div className=\"mt-3 flex flex-wrap items-center justify-start gap-2\">\n <button\n type=\"button\"\n onClick={() => {\n const id = `new-${Date.now()}`;\n router.push(`/teams/${encodeURIComponent(teamId)}/workflows/${encodeURIComponent(id)}?draft=1`);\n }}\n className=\"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)]\"\n >\n Add workflow\n </button>\n\n\n <button\n type=\"button\"\n onClick={() => void onAddTemplate(\"marketing-cadence-v1\")}\n className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10\"\n >\n Add example template\n </button>\n\n <button\n type=\"button\"\n onClick={onRefresh}\n disabled={refreshing}\n className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60\"\n >\n {refreshing ? \"Refreshing…\" : \"Refresh\"}\n </button>\n </div>\n </div>\n\n {error ? (\n <div className=\"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-4 text-sm text-red-100\">\n {error}\n </div>\n ) : null}\n\n {workflows.length === 0 ? (\n <p className=\"mt-4 text-sm text-[color:var(--ck-text-secondary)]\">No workflows yet.</p>\n ) : (\n <ul className=\"mt-4 divide-y divide-white/10 overflow-hidden rounded-[var(--ck-radius-sm)] border border-white/10\">\n {workflows.map((w) => {\n const expanded = expandedWorkflowId === w.id;\n const runs = runsByWorkflow[w.id] ?? [];\n const isLoadingRuns = Boolean(runsLoading[w.id]);\n\n return (\n <li key={w.id} className=\"bg-white/5\">\n <div className=\"flex items-center justify-between gap-3 px-4 py-3\">\n <button\n type=\"button\"\n onClick={async () => {\n const next = expanded ? \"\" : w.id;\n setExpandedWorkflowId(next);\n setSelectedRunId(\"\");\n setSelectedRun(null);\n setRunError(\"\");\n if (next) await loadRunsForWorkflow(next);\n }}\n className=\"min-w-0 flex-1 text-left\"\n >\n <div className=\"truncate text-sm font-medium text-[color:var(--ck-text-primary)]\">{w.name || w.id}</div>\n <div className=\"truncate text-xs text-[color:var(--ck-text-tertiary)]\">{w.id}</div>\n <div className=\"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]\">\n Click to {expanded ? \"collapse\" : \"expand\"} run details\n </div>\n </button>\n\n <div className=\"flex shrink-0 items-center gap-2\">\n <Link\n href={`/teams/${encodeURIComponent(teamId)}/workflows/${encodeURIComponent(w.id)}`}\n className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10\"\n >\n Edit\n </Link>\n <button\n type=\"button\"\n onClick={() => void onDelete(w.id)}\n className=\"rounded-[var(--ck-radius-sm)] border border-[color:rgba(255,59,48,0.45)] bg-[color:rgba(255,59,48,0.08)] px-3 py-1.5 text-sm font-medium text-[color:var(--ck-accent-red)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)]\"\n >\n Delete\n </button>\n </div>\n </div>\n\n {expanded ? (\n <div className=\"border-t border-white/10 bg-black/20 px-4 py-3\">\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <div className=\"text-xs font-medium text-[color:var(--ck-text-secondary)]\">Runs</div>\n <button\n type=\"button\"\n disabled={isLoadingRuns}\n onClick={() => void loadRunsForWorkflow(w.id)}\n className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60\"\n >\n {isLoadingRuns ? \"Loading…\" : \"Refresh runs\"}\n </button>\n </div>\n\n {runError ? (\n <div className=\"mt-2 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100\">{runError}</div>\n ) : null}\n\n <div className=\"mt-2 grid grid-cols-1 gap-3 lg:grid-cols-2\">\n <div className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2\">\n {runs.length ? (\n <div className=\"space-y-1\">\n {runs.slice(0, 8).map((runId) => {\n const selected = selectedRunId === runId;\n return (\n <button\n key={runId}\n type=\"button\"\n onClick={() => void loadRunDetail(w.id, runId)}\n className={\n selected\n ? \"w-full rounded-[var(--ck-radius-sm)] bg-white/10 px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-primary)]\"\n : \"w-full rounded-[var(--ck-radius-sm)] px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-secondary)] hover:bg-white/5\"\n }\n >\n <span className=\"font-mono\">{runId}</span>\n </button>\n );\n })}\n </div>\n ) : (\n <div className=\"text-xs text-[color:var(--ck-text-tertiary)]\">No runs yet.</div>\n )}\n </div>\n\n <div className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-3\">\n {selectedRun ? (\n <div className=\"space-y-3\">\n <div>\n <div className=\"text-xs font-medium text-[color:var(--ck-text-secondary)]\">Run detail</div>\n <div className=\"mt-1 text-[11px] text-[color:var(--ck-text-tertiary)]\">\n <span className=\"font-mono\">{selectedRun.id}</span>\n {selectedRun.status ? <span> • {selectedRun.status}</span> : null}\n </div>\n </div>\n\n <div className=\"border-t border-white/10 pt-3\">\n <div className=\"text-xs font-medium text-[color:var(--ck-text-secondary)]\">Approval</div>\n {(() => {\n const approval = selectedRun.approval;\n if (!isRecord(approval)) {\n return <div className=\"mt-2 text-xs text-[color:var(--ck-text-tertiary)]\">(No approval info recorded.)</div>;\n }\n\n const state = String(approval.state ?? \"\").trim();\n const requestedAt = typeof approval.requestedAt === \"string\" ? approval.requestedAt : \"\";\n const decidedAt = typeof approval.decidedAt === \"string\" ? approval.decidedAt : \"\";\n const decidedBy = typeof approval.decidedBy === \"string\" ? approval.decidedBy : \"\";\n const note = typeof approval.note === \"string\" ? approval.note : \"\";\n const outbound = isRecord(approval.outbound) ? approval.outbound : null;\n\n const canAct = state === \"pending\" || selectedRun.status === \"waiting_for_approval\";\n\n return (\n <div className=\"mt-2 space-y-2\">\n <div className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2 text-[11px] text-[color:var(--ck-text-secondary)]\">\n <div>\n <span className=\"font-mono\">state</span>: <span className=\"font-mono text-[color:var(--ck-text-primary)]\">{state || \"(unknown)\"}</span>\n </div>\n {requestedAt ? (\n <div>\n <span className=\"font-mono\">requestedAt</span>: <span className=\"font-mono\">{requestedAt}</span>\n </div>\n ) : null}\n {decidedAt ? (\n <div>\n <span className=\"font-mono\">decidedAt</span>: <span className=\"font-mono\">{decidedAt}</span>\n </div>\n ) : null}\n {decidedBy ? (\n <div>\n <span className=\"font-mono\">decidedBy</span>: <span className=\"font-mono\">{decidedBy}</span>\n </div>\n ) : null}\n {note ? (\n <div className=\"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]\">{note}</div>\n ) : null}\n {outbound ? (\n <div className=\"mt-2 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px]\">\n <div className=\"text-[color:var(--ck-text-tertiary)]\">Outbound</div>\n <pre className=\"mt-1 overflow-auto whitespace-pre-wrap\">{JSON.stringify(outbound, null, 2)}</pre>\n </div>\n ) : null}\n </div>\n\n {canAct ? (\n <div className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2\">\n <div className=\"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]\">approval note (optional)</div>\n <textarea\n value={approvalNote}\n onChange={(e) => setApprovalNote(e.target.value)}\n rows={3}\n className=\"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]\"\n placeholder=\"e.g. Ship it / please tweak hook\"\n />\n <div className=\"mt-2 flex flex-wrap gap-2\">\n {([\n { action: \"approve\", label: \"Approve\" },\n { action: \"request_changes\", label: \"Request changes\" },\n { action: \"cancel\", label: \"Cancel\" },\n ] as const).map((btn) => (\n <button\n key={btn.action}\n type=\"button\"\n disabled={approvalBusy}\n onClick={async () => {\n if (!selectedWorkflowId || !selectedRunId) return;\n if (!confirm(`${btn.label} run ${selectedRunId}?`)) return;\n setApprovalBusy(true);\n setRunError(\"\");\n try {\n const res = await fetch(\"/api/teams/workflow-runs\", {\n method: \"POST\",\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify({\n teamId,\n workflowId: selectedWorkflowId,\n runId: selectedRunId,\n action: btn.action,\n note: approvalNote || undefined,\n decidedBy: \"ClawKitchen UI\",\n }),\n });\n const json = await res.json();\n if (!res.ok || !json.ok) throw new Error(json.error || \"Failed to apply approval action\");\n await loadRunDetail(selectedWorkflowId, selectedRunId);\n } catch (e: unknown) {\n setRunError(errorMessage(e));\n } finally {\n setApprovalBusy(false);\n }\n }}\n className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60\"\n >\n {btn.label}\n </button>\n ))}\n </div>\n </div>\n ) : null}\n </div>\n );\n })()}\n </div>\n\n <div className=\"border-t border-white/10 pt-3\">\n <div className=\"text-xs font-medium text-[color:var(--ck-text-secondary)]\">Memory used in this run</div>\n {memoryUsedItems.length ? (\n <div className=\"mt-2 space-y-2\">\n {memoryUsedItems.slice(0, 20).map((m, idx) => (\n <div key={`${m.ts}-${idx}`} className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2\">\n <div className=\"text-[10px] text-[color:var(--ck-text-tertiary)]\">\n <span className=\"font-mono\">{m.ts}</span> • <span className=\"font-mono\">{m.type}</span> • <span className=\"font-mono\">{m.author}</span>\n </div>\n <div className=\"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]\">{m.content}</div>\n {m.source !== undefined ? (\n <pre className=\"mt-2 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px] text-[color:var(--ck-text-secondary)]\">\n {JSON.stringify(m.source, null, 2)}\n </pre>\n ) : null}\n </div>\n ))}\n </div>\n ) : (\n <div className=\"mt-2 text-xs text-[color:var(--ck-text-tertiary)]\">\n (None recorded yet.)\n <div className=\"mt-1\">Next step: have the workflow runner write an explicit <span className=\"font-mono\">memoryUsed[]</span> list into the run file.</div>\n </div>\n )}\n </div>\n </div>\n ) : selectedRunId ? (\n <div className=\"text-xs text-[color:var(--ck-text-secondary)]\">Loading run…</div>\n ) : (\n <div className=\"text-xs text-[color:var(--ck-text-tertiary)]\">Select a run to see details.</div>\n )}\n </div>\n </div>\n </div>\n ) : null}\n </li>\n );\n })}\n </ul>\n )}\n </div>\n );\n}\n"],"names":[],"mappings":"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"}
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87090,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(22016),s=e.i(44355);function o(e){let t=new Set;for(let r of e)t.add(r);return t.size}function i(e,t){return`ck-wf-draft:${e}:${t}`}function n({teamId:e,workflowId:n,draft:l}){let d,c,x,m,p,u,h,g,v,[b,k]=(0,r.useState)("canvas"),[y,f]=(0,r.useState)(!1),[w,j]=(0,r.useState)({kind:"loading"}),[N,S]=(0,r.useState)(""),C=(0,r.useRef)(null),[T,I]=(0,r.useState)(!1),[A,$]=(0,r.useState)(1),M=(0,r.useRef)(null),[O,L]=(0,r.useState)(""),[E,R]=(0,r.useState)(null),[B,z]=(0,r.useState)({kind:"select"}),[U,_]=(0,r.useState)(""),[W,P]=(0,r.useState)([]),[D,J]=(0,r.useState)(""),[F,q]=(0,r.useState)([]),[K,Z]=(0,r.useState)(""),Y=(0,r.useMemo)(()=>/Tool not available:\s*gateway/i.test(String(K||"")),[K]),[V,H]=(0,r.useState)([]),[X,Q]=(0,r.useState)(!1),[G,ee]=(0,r.useState)(""),[et,er]=(0,r.useState)(""),[ea,es]=(0,r.useState)(!1),[eo,ei]=(0,r.useState)(""),[en,el]=(0,r.useState)({}),[ed,ec]=(0,r.useState)(!1),[ex,em]=(0,r.useState)(!1),[ep,eu]=(0,r.useState)(""),[eh,eg]=(0,r.useState)(""),[ev,eb]=(0,r.useState)(""),[ek,ey]=(0,r.useState)("llm"),[ef,ew]=(0,r.useState)(""),[ej,eN]=(0,r.useState)(""),[eS,eC]=(0,r.useState)("");function eT(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function eI(e){if(!eT(e))return null;let t=eT(e.match)?e.match:null;if(!t)return null;let r=String(t.channel??"").trim();if(!r)return null;let a=String(t.accountId??"").trim();if(a)return{id:`${r}:account:${a}`,label:`${r} \xb7 account:${a}`,channel:r,target:a};let s=eT(t.peer)?t.peer:null,o=s?String(s.kind??"").trim():"",i=s?String(s.id??"").trim():"";return o&&i?{id:`${r}:${o}:${i}`,label:`${r} \xb7 ${o}:${i}`,channel:r,target:i}:null}(0,r.useEffect)(()=>{(async()=>{try{if(l){let t=sessionStorage.getItem(i(e,n));if(t)return void j({kind:"ready",jsonText:t});let r=JSON.stringify({schema:"clawkitchen.workflow.v1",id:n,name:"New workflow",timezone:"UTC",nodes:[{id:"start",type:"start",name:"start",x:80,y:80,config:{}},{id:"end",type:"end",name:"end",x:520,y:80,config:{}}],edges:[{id:"e1",from:"start",to:"end"}]},null,2)+"\n";j({kind:"ready",jsonText:r});try{sessionStorage.setItem(i(e,n),r)}catch{}return}let t=await fetch(`/api/teams/workflows?teamId=${encodeURIComponent(e)}&id=${encodeURIComponent(n)}`,{cache:"no-store"}),r=await t.json();if(!t.ok||!r.ok)throw Error(r.error||"Failed to load workflow");j({kind:"ready",jsonText:JSON.stringify(r.workflow,null,2)+"\n"})}catch(e){j({kind:"error",error:e instanceof Error?e.message:String(e)})}})()},[e,n,l]),(0,r.useEffect)(()=>{(async()=>{J("");try{let t=await fetch("/api/agents",{cache:"no-store"}),r=await t.json();if(!t.ok)throw Error(r.error||r.message||"Failed to load agents");let a=(Array.isArray(r.agents)?r.agents:[]).map(e=>({id:String(e.id??"").trim(),identityName:"string"==typeof e.identityName?e.identityName:void 0})).filter(t=>t.id&&t.id.startsWith(`${e}-`));P(a)}catch(e){J(e instanceof Error?e.message:String(e)),P([])}})()},[e]),(0,r.useEffect)(()=>{(async()=>{Z("");try{let e=await fetch("/api/channels/bindings",{cache:"no-store"}),t=await e.json();if(!e.ok||!1===t.ok)throw Error(t.error||"Failed to load bindings");let r=(Array.isArray(t.bindings)?t.bindings:[]).map(eI).filter(Boolean);q(r)}catch(e){Z(e instanceof Error?e.message:String(e)),q([])}})()},[]);let eA=(0,r.useCallback)(async()=>{ei(""),es(!0);try{let e=await fetch("/api/cron/jobs",{cache:"no-store"}),t=await e.json();if(!e.ok||!1===t.ok)throw Error(t.error||"Failed to load cron jobs");let r=Array.isArray(t.jobs)?t.jobs:[],a={};for(let e of r){if(!e||!e.enabled)continue;let t=String(e.agentId??"").trim();if(t){a[t]=!0;continue}if(e.scope&&"agent"===String(e.scope.kind)){let t=String(e.scope.id??"").trim();t&&(a[t]=!0)}}return el(a),a}catch(e){return ei(e instanceof Error?e.message:String(e)),el({}),{}}finally{es(!1)}},[]);(0,r.useEffect)(()=>{eA()},[eA]);let e$=(0,r.useMemo)(()=>{if("ready"!==w.kind)return{wf:null,err:""};try{return{wf:JSON.parse(w.jsonText),err:""}}catch(e){return{wf:null,err:e instanceof Error?e.message:String(e)}}},[w]),eM=(0,r.useMemo)(()=>e$.wf?function(e){let t=[],r=[];"clawkitchen.workflow.v1"!==e.schema&&t.push(`schema must be clawkitchen.workflow.v1 (got ${String(e.schema)})`),String(e.id||"").trim()||t.push("id is required"),String(e.name||"").trim()||t.push("name is required");let a=Array.isArray(e.nodes)?e.nodes:[],s=Array.isArray(e.edges)?e.edges:[],i=Array.isArray(e.triggers)?e.triggers:[],n=a.map(e=>String(e?.id??"").trim()).filter(Boolean);n.length!==a.length&&t.push("all nodes must have a non-empty id"),o(n)!==n.length&&t.push("node ids must be unique");let l=s.map(e=>String(e?.id??"").trim()).filter(Boolean);l.length!==s.length&&t.push("all edges must have a non-empty id"),o(l)!==l.length&&t.push("edge ids must be unique");let d=new Set(n);for(let e of s){let r=String(e?.from??"").trim(),a=String(e?.to??"").trim();if(!r||!a){t.push(`edge ${String(e?.id??"(missing id)")} must have from/to`);continue}d.has(r)||t.push(`edge ${String(e.id)} references missing from node: ${r}`),d.has(a)||t.push(`edge ${String(e.id)} references missing to node: ${a}`)}let c=a.filter(e=>"start"===e.type),x=a.filter(e=>"end"===e.type);for(let e of(c.length||r.push("no start node found"),c.length>1&&r.push("multiple start nodes found (MVP supports this, but execution semantics may be ambiguous)"),x.length||r.push("no end node found"),i))if("cron"===e.kind){(String(e.id||"").trim()||t.push("cron trigger missing id"),String(e.expr||"").trim())?5!==String(e.expr||"").trim().split(/\s+/).filter(Boolean).length&&r.push(`cron trigger ${String(e.id)} expr is not 5-field: ${String(e.expr)}`):t.push(`cron trigger ${String(e.id||"(missing id)")} missing expr`);let a=e.tz?String(e.tz).trim():"";a&&"UTC"!==a&&!a.includes("/")&&r.push(`cron trigger ${String(e.id)} tz doesn't look like an IANA timezone: ${String(e.tz)}`)}let m=e.meta&&"object"==typeof e.meta&&!Array.isArray(e.meta)?e.meta:{},p=String(m.approvalTarget??"").trim();for(let e of a){if("human_approval"!==e.type)continue;let t=e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{},a=String(t.target??t.chatId??"").trim(),s=String(t.provider??t.channel??"").trim();a||p||r.push(`human_approval node ${String(e.id)} has no target (set node.config.target or workflow.meta.approvalTarget)`),!a||s||String(m.approvalProvider??"").trim()||r.push(`human_approval node ${String(e.id)} has a target but no provider (set node.config.provider or workflow.meta.approvalProvider)`)}return{errors:t,warnings:r}}(e$.wf):{errors:[],warnings:[]},[e$.wf]),eO=(0,r.useMemo)(()=>{let e=e$.wf;if(!e)return{missingAgentOnNodeIds:[],requiredAgentIds:[],agentIdsMissingCron:[],ok:!0};let t=(e.nodes??[]).filter(e=>"start"!==e.type&&"end"!==e.type&&"human_approval"!==e.type),r=t.filter(e=>!String((e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{}).agentId??"").trim()).map(e=>e.id),a=Array.from(new Set(t.map(e=>String((e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{}).agentId??"").trim()).filter(Boolean))),s=a.filter(e=>!en[e]),o=0===r.length&&0===s.length;return{missingAgentOnNodeIds:r,requiredAgentIds:a,agentIdsMissingCron:s,ok:o}},[e$.wf,en]);function eL(t){let r=JSON.stringify(t,null,2)+"\n";if(j({kind:"ready",jsonText:r}),l)try{sessionStorage.setItem(i(e,n),r)}catch{}}async function eE(){if("ready"===w.kind&&e$.wf&&!e$.err&&!eM.errors.length){f(!0),S("");try{let t=await fetch("/api/teams/workflows",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflow:e$.wf})}),r=await t.json();if(!t.ok||!r.ok)throw Error(r.error||"Failed to save workflow");try{sessionStorage.removeItem(i(e,n))}catch{}}catch(e){S(e instanceof Error?e.message:String(e))}finally{f(!1)}}}return"loading"===w.kind?(0,t.jsx)("div",{className:"ck-glass w-full p-6",children:"Loading…"}):"error"===w.kind?(0,t.jsx)("div",{className:"ck-glass w-full p-6",children:w.error}):(0,t.jsxs)("div",{className:"flex h-full min-h-0 w-full flex-1 flex-col",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 px-3 py-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("a",{href:`/teams/${encodeURIComponent(e)}?tab=workflows`,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Back"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"truncate text-base font-medium text-[color:var(--ck-text-primary)]",children:[n,".workflow.json"]}),(0,t.jsxs)("div",{className:"mt-0.5 text-sm text-[color:var(--ck-text-tertiary)]",children:["Team: ",e]})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex overflow-hidden rounded-[var(--ck-radius-sm)] border border-white/10",children:[(0,t.jsx)("button",{type:"button",onClick:()=>k("canvas"),className:"canvas"===b?"bg-white/10 px-3 py-2 text-xs font-medium text-[color:var(--ck-text-primary)]":"bg-transparent px-3 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5",children:"Canvas"}),(0,t.jsx)("button",{type:"button",onClick:()=>k("json"),className:"json"===b?"bg-white/10 px-3 py-2 text-xs font-medium text-[color:var(--ck-text-primary)]":"bg-transparent px-3 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5",children:"JSON"})]}),(0,t.jsx)("input",{ref:C,type:"file",accept:"application/json,.json",className:"hidden",onChange:async t=>{let r=t.target.files?.[0];if(t.target.value="",r){S("");try{let t=await r.text(),a=JSON.parse(t);if(j({kind:"ready",jsonText:JSON.stringify(a,null,2)+"\n"}),l)try{sessionStorage.setItem(i(e,n),JSON.stringify(a,null,2)+"\n")}catch{}}catch(e){S(e instanceof Error?e.message:String(e))}}}}),(0,t.jsx)("button",{type:"button",disabled:y,onClick:()=>C.current?.click(),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10 disabled:opacity-50",children:"Import"}),(0,t.jsx)("button",{type:"button",disabled:!e$.wf||!!e$.err||eM.errors.length>0,onClick:function(){if(!e$.wf||e$.err||eM.errors.length)return;let e=`${e$.wf.id||n}.workflow.json`,t=new Blob([JSON.stringify(e$.wf,null,2)+"\n"],{type:"application/json"}),r=URL.createObjectURL(t),a=document.createElement("a");a.href=r,a.download=e,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(r)},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10 disabled:opacity-50",children:"Export"}),(0,t.jsx)("button",{type:"button",disabled:y||!e$.wf||!!e$.err||eM.errors.length>0,onClick:eE,className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:y?"Saving…":"Save"})]})]}),e$.err?(0,t.jsxs)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-yellow-400/30 bg-yellow-500/10 p-3 text-sm text-yellow-100",children:["JSON parse error: ",e$.err]}):null,!e$.err&&eM.errors.length?(0,t.jsxs)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:[(0,t.jsx)("div",{className:"font-medium",children:"Workflow validation errors"}),(0,t.jsx)("ul",{className:"mt-2 list-disc space-y-1 pl-5",children:eM.errors.map(e=>(0,t.jsx)("li",{children:e},e))})]}):null,e$.err||eM.errors.length||!eM.warnings.length?null:(0,t.jsxs)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-yellow-400/30 bg-yellow-500/10 p-3 text-sm text-yellow-100",children:[(0,t.jsx)("div",{className:"font-medium",children:"Workflow validation warnings"}),(0,t.jsx)("ul",{className:"mt-2 list-disc space-y-1 pl-5",children:eM.warnings.map(e=>(0,t.jsx)("li",{children:e},e))})]}),N?(0,t.jsx)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:N}):null,(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 gap-0",children:["json"===b?(0,t.jsx)("textarea",{value:w.jsonText,onChange:t=>{let r=t.target.value;if(j({kind:"ready",jsonText:r}),l)try{sessionStorage.setItem(i(e,n),r)}catch{}},className:"h-full min-h-0 w-full flex-1 resize-none rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-3 font-mono text-xs text-[color:var(--ck-text-primary)]"}):(0,t.jsx)("div",{ref:M,className:"relative h-full min-h-0 w-full flex-1 overflow-auto bg-black/20",onWheel:e=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let t=e.deltaY>0?-1:1;$(e=>Math.max(.5,Math.min(2.5,Math.round((e+.1*t)*10)/10)))},onClick:e=>{if("add-node"!==B.kind)return;let t=e$.wf;if(!t)return;let r=M.current;if(!r)return;let a=e.target;if(a&&a.closest("[data-wf-node='1']"))return;let s=r.getBoundingClientRect(),o=(e.clientX-s.left+r.scrollLeft)/A,i=(e.clientY-s.top+r.scrollTop)/A,n=B.nodeType.replace(/[^a-z0-9_\-]/gi,"_"),l=new Set(t.nodes.map(e=>e.id)),d=1,c=`${n}_${d}`;for(;l.has(c);)d++,c=`${n}_${d}`;let x=Math.max(0,o-90),m=Math.max(0,i-24),p={id:c,type:B.nodeType,name:c,x,y:m,config:{}};eL({...t,nodes:[...t.nodes,p]}),L(c),z({kind:"select"})},children:(0,t.jsxs)("div",{className:"relative",style:{width:2200*A,height:1200*A},children:[(0,t.jsxs)("div",{className:T?"absolute left-3 top-3 z-20 w-[44px] overflow-hidden rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/40 p-2 backdrop-blur":"absolute left-3 top-3 z-20 w-[260px] rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/40 p-2 backdrop-blur",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:T?"hidden":"text-[10px] font-medium uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Tools"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:T?"hidden":"flex items-center gap-1",children:[(0,t.jsx)("button",{type:"button",onClick:()=>$(e=>Math.max(.5,Math.round((e-.1)*10)/10)),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[10px] text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:"Zoom out (Ctrl/Cmd+wheel)",children:"-"}),(0,t.jsxs)("div",{className:"min-w-[42px] text-center text-[10px] text-[color:var(--ck-text-tertiary)]",children:[Math.round(100*A),"%"]}),(0,t.jsx)("button",{type:"button",onClick:()=>$(e=>Math.min(2.5,Math.round((e+.1)*10)/10)),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[10px] text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:"Zoom in (Ctrl/Cmd+wheel)",children:"+"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>I(e=>!e),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[10px] text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:T?"Expand":"Collapse",children:T?">":"<"})]})]}),T?(0,t.jsx)("div",{className:"mt-2 flex flex-col items-center gap-2",children:[{key:"select",label:"Select",active:"select"===B.kind,onClick:()=>{z({kind:"select"}),_("")},icon:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M5 4l7 16 2-7 7-2L5 4Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})})},{key:"connect",label:"Connect",active:"connect"===B.kind,onClick:()=>{z(e=>"connect"===e.kind?{kind:"select"}:{kind:"connect"}),_("")},icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M10 13a5 5 0 0 1 0-7l1.2-1.2a5 5 0 0 1 7 7L17 12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M14 11a5 5 0 0 1 0 7L12.8 19.2a5 5 0 1 1-7-7L7 12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})},{key:"llm",label:"LLM",active:"add-node"===B.kind&&"llm"===B.nodeType,onClick:()=>{z({kind:"add-node",nodeType:"llm"}),_("")},icon:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M12 2l1.5 6.5L20 10l-6.5 1.5L12 18l-1.5-6.5L4 10l6.5-1.5L12 2Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})})},{key:"tool",label:"Tool",active:"add-node"===B.kind&&"tool"===B.nodeType,onClick:()=>{z({kind:"add-node",nodeType:"tool"}),_("")},icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M14.5 7.5l2 2-8.5 8.5H6v-2l8.5-8.5Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M12 6a4 4 0 0 0-5 5l3-3 2 2 3-3A4 4 0 0 0 12 6Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})]})},{key:"condition",label:"If",active:"add-node"===B.kind&&"condition"===B.nodeType,onClick:()=>{z({kind:"add-node",nodeType:"condition"}),_("")},icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M7 4v7a3 3 0 0 0 3 3h7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M17 10l3 3-3 3",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]})},{key:"delay",label:"Delay",active:"add-node"===B.kind&&"delay"===B.nodeType,onClick:()=>{z({kind:"add-node",nodeType:"delay"}),_("")},icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12 7v5l3 2",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M21 12a9 9 0 1 1-9-9",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})},{key:"approval",label:"Approval",active:"add-node"===B.kind&&"human_approval"===B.nodeType,onClick:()=>{z({kind:"add-node",nodeType:"human_approval"}),_("")},icon:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})},{key:"end",label:"End",active:"add-node"===B.kind&&"end"===B.nodeType,onClick:()=>{z({kind:"add-node",nodeType:"end"}),_("")},icon:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M7 7h10v10H7V7Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})})}].map(e=>(0,t.jsx)("button",{type:"button",onClick:e.onClick,className:e.active?"flex h-8 w-8 items-center justify-center rounded-[var(--ck-radius-sm)] bg-white/10 text-[color:var(--ck-text-primary)]":"flex h-8 w-8 items-center justify-center rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:e.label,"aria-label":e.label,children:e.icon},e.key))}):(0,t.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{z({kind:"select"}),_("")},className:"select"===B.kind?"rounded-[var(--ck-radius-sm)] bg-white/10 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]":"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-secondary)] hover:bg-white/10",children:"Select"}),(0,t.jsx)("button",{type:"button",onClick:()=>{z({kind:"connect"}),_("")},className:"connect"===B.kind?"rounded-[var(--ck-radius-sm)] bg-white/10 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]":"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:"Click a node, then click another node to create an edge",children:"Connect"}),[{t:"llm",label:"LLM"},{t:"tool",label:"Tool"},{t:"condition",label:"If"},{t:"delay",label:"Delay"},{t:"human_approval",label:"Approve"},{t:"end",label:"End"}].map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{z({kind:"add-node",nodeType:e.t}),_("")},className:"add-node"===B.kind&&B.nodeType===e.t?"rounded-[var(--ck-radius-sm)] bg-white/10 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]":"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:"Select tool, then click on the canvas to place",children:["+ ",e.label]},e.t))]}),!T&&"connect"===B.kind&&U?(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-secondary)]",children:["Connecting from: ",(0,t.jsx)("span",{className:"font-mono",children:U})]}):null,T||"add-node"!==B.kind?null:(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-secondary)]",children:["Click on the canvas to place a ",(0,t.jsx)("span",{className:"font-mono",children:B.nodeType})," node."]}),(0,t.jsxs)("div",{className:"mt-3 border-t border-white/10 pt-3",children:[(0,t.jsxs)("div",{className:T?"hidden":"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-[10px] font-medium uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Agents"}),(0,t.jsx)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:"drag → node"})]}),T?(0,t.jsx)("button",{type:"button",onClick:()=>I(!1),className:"mt-2 flex h-8 w-8 items-center justify-center rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:"Expand to see agents","aria-label":"Expand to see agents",children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M16 11a4 4 0 1 0-8 0",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M4 20a8 8 0 0 1 16 0",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}):(0,t.jsxs)(t.Fragment,{children:[D?(0,t.jsx)("div",{className:"mt-1 text-[11px] text-red-200",children:D}):null,(0,t.jsx)("div",{className:"mt-2 max-h-[140px] space-y-1 overflow-auto",children:W.length?W.map(r=>(0,t.jsx)("div",{draggable:!0,onDragStart:e=>{e.dataTransfer.setData("text/plain",r.id),e.dataTransfer.effectAllowed="copy"},className:"cursor-grab rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:r.id,children:r.identityName?r.identityName:r.id.replace(`${e}-`,"")},r.id)):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"No team agents found."})})]})]})]}),(0,t.jsxs)("div",{className:"relative h-[1200px] w-[2200px]",style:{transform:`scale(${A})`,transformOrigin:"0 0"},children:[(0,t.jsx)("svg",{className:"pointer-events-none absolute inset-0 -z-10",width:2200,height:1200,style:{overflow:"visible"},children:(e$.wf?.edges??[]).map(e=>{let r=e$.wf;if(!r)return null;let a=r.nodes.find(t=>t.id===e.from),s=r.nodes.find(t=>t.id===e.to);if(!a||!s)return null;let o=("number"==typeof a.x?a.x:80)+90,i=("number"==typeof a.y?a.y:80)+24,n=("number"==typeof s.x?s.x:80)+90,l=("number"==typeof s.y?s.y:80)+24;return(0,t.jsx)("line",{x1:o,y1:i,x2:n,y2:l,stroke:"rgba(255,255,255,0.35)",strokeWidth:3},e.id)})}),(e$.wf?.nodes??[]).map((r,a)=>{let s="number"==typeof r.x?r.x:80+220*a,o="number"==typeof r.y?r.y:80,i=O===r.id;return(0,t.jsxs)("div",{role:"button",tabIndex:0,"data-wf-node":"1",draggable:"select"===B.kind||"connect"===B.kind,onDragStart:e=>{"select"===B.kind&&e.dataTransfer.setData("text/plain","")},onDragOver:e=>{e.dataTransfer.types.includes("text/plain")&&e.preventDefault()},onDrop:e=>{let t=e$.wf;if(!t)return;e.preventDefault(),e.stopPropagation();let a=String(e.dataTransfer.getData("text/plain")||"").trim();if(!a)return;let s=t.nodes.map(e=>{if(e.id!==r.id)return e;let t=e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{};return{...e,config:{...t,agentId:a}}});eL({...t,nodes:s}),L(r.id)},onClick:e=>{e.stopPropagation();let t=e$.wf;if("connect"===B.kind){if(!t)return;if(!U){_(r.id),L(r.id);return}let e=r.id;if(_(""),!U||!e||U===e||(t.edges??[]).some(t=>t.from===U&&t.to===e))return;let a=`e${Date.now()}`;eL({...t,edges:[...t.edges??[],{id:a,from:U,to:e}]}),z({kind:"select"});return}L(r.id)},onPointerDown:e=>{if("add-node"===B.kind||0!==e.button)return;let t=M.current;if(!t)return;let a=t.getBoundingClientRect();L(r.id);try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault();let i=(e.clientX-a.left+t.scrollLeft)/A,n=(e.clientY-a.top+t.scrollTop)/A;R({nodeId:r.id,dx:i-s,dy:n-o})},onPointerUp:e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}R(null)},onPointerMove:e=>{if(!E||E.nodeId!==r.id)return;let t=e$.wf;if(!t)return;let a=M.current;if(!a)return;let s=a.getBoundingClientRect(),o=(e.clientX-s.left+a.scrollLeft)/A,i=(e.clientY-s.top+a.scrollTop)/A,n=o-E.dx,l=i-E.dy,d=t.nodes.map(e=>e.id===r.id?{...e,x:n,y:l}:e);j({kind:"ready",jsonText:JSON.stringify({...t,nodes:d},null,2)+"\n"})},className:i?"absolute z-10 cursor-grab rounded-[var(--ck-radius-sm)] border border-white/25 bg-white/10 px-3 py-2 text-xs text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)]":"absolute z-10 cursor-grab rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-xs text-[color:var(--ck-text-secondary)] hover:bg-white/10",style:{left:s,top:o,width:180},children:[(0,t.jsx)("div",{className:"font-medium text-[color:var(--ck-text-primary)]",children:r.name||r.id}),(0,t.jsx)("div",{className:"mt-0.5 text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:r.type}),(()=>{let a=r.config&&"object"==typeof r.config&&!Array.isArray(r.config)?r.config:null,s=a?String(a.agentId??"").trim():"";if(!s)return null;let o=s.replace(`${e}-`,"");return(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-secondary)]",children:["Agent: ",o]})})()]},r.id)}),(()=>{let e=e$.wf;if(!e||!O)return null;let r=e.nodes.find(e=>e.id===O);if(!r)return null;let a="number"==typeof r.x?r.x:80,s="number"==typeof r.y?r.y:80,o=r.config&&"object"==typeof r.config&&!Array.isArray(r.config)?r.config:{},i=String(o.agentId??"").trim();return(0,t.jsxs)("div",{className:"absolute z-10 w-[320px] rounded-[var(--ck-radius-sm)] border border-white/15 bg-black/60 p-3 shadow-[var(--ck-shadow-1)] backdrop-blur",style:{left:a+200,top:s},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-primary)]",children:r.name||r.id}),(0,t.jsx)("button",{type:"button",onClick:()=>L(""),className:"text-[10px] text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]",children:"Close"})]}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"name"}),(0,t.jsx)("input",{value:String(r.name??""),onChange:t=>{let a=t.target.value;eL({...e,nodes:e.nodes.map(e=>e.id===r.id?{...e,name:a}:e)})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"Optional"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"type"}),(0,t.jsxs)("select",{value:r.type,onChange:t=>{let a=t.target.value;eL({...e,nodes:e.nodes.map(e=>e.id===r.id?{...e,type:a}:e)})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"start",children:"start"}),(0,t.jsx)("option",{value:"end",children:"end"}),(0,t.jsx)("option",{value:"llm",children:"llm"}),(0,t.jsx)("option",{value:"tool",children:"tool"}),(0,t.jsx)("option",{value:"condition",children:"condition"}),(0,t.jsx)("option",{value:"delay",children:"delay"}),(0,t.jsx)("option",{value:"human_approval",children:"human_approval"})]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"agentId"}),(0,t.jsx)("input",{value:i,onChange:t=>{let a=String(t.target.value||"").trim(),s={...o,...a?{agentId:a}:{}};a||delete s.agentId,eL({...e,nodes:e.nodes.map(e=>e.id===r.id?{...e,config:s}:e)})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"(drag an agent onto the node or type)"})]}),"human_approval"===r.type?(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"approval config"}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"provider"}),(0,t.jsx)("input",{value:String(o.provider??""),onChange:t=>{let a=String(t.target.value||"").trim(),s={...o,...a?{provider:a}:{}};a||delete s.provider,eL({...e,nodes:e.nodes.map(e=>e.id===r.id?{...e,config:s}:e)})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"telegram"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"target"}),(0,t.jsx)("input",{value:String(o.target??""),onChange:t=>{let a=String(t.target.value||"").trim(),s={...o,...a?{target:a}:{}};a||delete s.target,eL({...e,nodes:e.nodes.map(e=>e.id===r.id?{...e,config:s}:e)})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"(e.g. Telegram chat id)"}),(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:"Overrides workflow-level default when set."})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"messageTemplate (optional)"}),(0,t.jsx)("textarea",{value:String(o.messageTemplate??""),onChange:t=>{let a=String(t.target.value||""),s={...o,...a.trim()?{messageTemplate:a}:{}};a.trim()||delete s.messageTemplate,eL({...e,nodes:e.nodes.map(e=>e.id===r.id?{...e,config:s}:e)})},className:"mt-1 h-[70px] w-full resize-none rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2 font-mono text-[10px] text-[color:var(--ck-text-primary)]",placeholder:"Approval needed for {{workflowName}} (run {{runId}})",spellCheck:!1}),(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["Vars: ","{{workflowName}}",", ","{{workflowId}}",", ","{{runId}}",", ","{{nodeId}}"]})]})]})]}):null,(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"config (json)"}),(0,t.jsx)("textarea",{value:JSON.stringify(o,null,2),onChange:t=>{try{let a=JSON.parse(t.target.value);if(!a||"object"!=typeof a||Array.isArray(a))return;eL({...e,nodes:e.nodes.map(e=>e.id===r.id?{...e,config:a}:e)})}catch{}},className:"mt-1 h-[140px] w-full resize-none rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 font-mono text-[10px] text-[color:var(--ck-text-primary)]",spellCheck:!1}),(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:"(Edits apply when JSON is valid.)"})]})]})]})})()]})]})}),(0,t.jsx)("div",{className:"w-[380px] shrink-0 overflow-auto p-3 text-sm",children:(0,t.jsx)("div",{className:"space-y-3",children:e$.wf?(c=String((d=e$.wf).timezone??"").trim()||"UTC",x=d.triggers??[],p=String((m=d.meta&&"object"==typeof d.meta&&!Array.isArray(d.meta)?d.meta:{}).approvalBindingId??"").trim(),u=String(m.approvalProvider??"telegram").trim()||"telegram",h=String(m.approvalTarget??"").trim(),g=[{label:"(no preset)",expr:""},{label:"Weekdays 09:00 local",expr:"0 9 * * 1-5"},{label:"Mon/Wed/Fri 09:00 local",expr:"0 9 * * 1,3,5"},{label:"Daily 08:00 local",expr:"0 8 * * *"},{label:"Daily 12:00 local",expr:"0 12 * * *"},{label:"Mon 09:30 local",expr:"30 9 * * 1"}],(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("details",{open:!0,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/15",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Workflow"}),(0,t.jsx)("div",{className:"px-3 pb-3",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[11px] font-medium text-[color:var(--ck-text-tertiary)]",children:"Timezone"}),(0,t.jsx)("input",{value:c,onChange:e=>{let t=String(e.target.value||"").trim()||"UTC";eL({...d,timezone:t})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-sm text-[color:var(--ck-text-primary)]",placeholder:"America/New_York"})]})})]}),(0,t.jsxs)("details",{open:!0,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/15",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Approval Channel"}),(0,t.jsxs)("div",{className:"px-3 pb-3 space-y-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"binding (recommended)"}),(0,t.jsxs)("select",{value:p,onChange:e=>{let t=String(e.target.value||"").trim(),r=F.find(e=>e.id===t);r?eL({...d,meta:{...m,approvalBindingId:r.id,approvalProvider:r.channel,approvalTarget:r.target}}):eL({...d,meta:{...m,approvalBindingId:""}})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"(manual)"}),F.map(e=>(0,t.jsx)("option",{value:e.id,children:e.label},e.id))]}),Y?(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-yellow-200",children:["Kitchen looks out of date. Run ",(0,t.jsx)("code",{className:"font-mono",children:"openclaw plugins update"})," then",(0,t.jsx)("code",{className:"ml-1 font-mono",children:"openclaw gateway restart"}),"."]}):null,K?(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-red-200",children:["Failed to load bindings: ",K]}):null,(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:"Uses your existing OpenClaw bindings (recommended). Manual provider/target is an advanced override."})]}),(0,t.jsxs)("details",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/10",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-secondary)]",children:"Advanced: manual override"}),(0,t.jsxs)("div",{className:"px-2 pb-2 pt-1 space-y-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"provider"}),(0,t.jsx)("input",{value:u,onChange:e=>{let t=String(e.target.value||"").trim()||"telegram";eL({...d,meta:{...m,approvalBindingId:"",approvalProvider:t}})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"telegram"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"target"}),(0,t.jsx)("input",{value:h,onChange:e=>{let t=String(e.target.value||"").trim();eL({...d,meta:{...m,approvalBindingId:"",approvalTarget:t}})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"(e.g. Telegram chat id)"})]})]})]})]})]}),(0,t.jsxs)("details",{open:!0,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/15",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Triggers"}),(0,t.jsxs)("div",{className:"px-3 pb-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"triggers"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e=`t${Date.now()}`;eL({...d,triggers:[...x,{kind:"cron",id:e,name:"New trigger",enabled:!0,expr:"0 9 * * 1-5",tz:c}]})},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[10px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"+ Add"})]}),(0,t.jsx)("div",{className:"mt-2 space-y-2",children:x.length?x.map((e,r)=>{let a=e.kind,s=String(e.id??""),o=String(e.name??""),i=!!e.enabled,n=String(e.expr??""),l=String(e.tz??c),m=n.trim().split(/\s+/).filter(Boolean),p=!n.trim()||5===m.length;return(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-primary)]",children:o||s||`trigger-${r+1}`}),(0,t.jsx)("button",{type:"button",onClick:()=>eL({...d,triggers:x.filter((e,t)=>t!==r)}),className:"text-[10px] text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]",children:"Remove"})]}),"cron"===a?null:(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-secondary)]",children:["Unsupported trigger kind: ",String(a)]}),(0,t.jsxs)("div",{className:"mt-2 grid grid-cols-1 gap-2",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:i,onChange:e=>{let t=e.target.checked;eL({...d,triggers:x.map((e,a)=>a===r&&"cron"===e.kind?{...e,enabled:t}:e)})}}),"Enabled"]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"name"}),(0,t.jsx)("input",{value:o,onChange:e=>{let t=e.target.value;eL({...d,triggers:x.map((e,a)=>a===r&&"cron"===e.kind?{...e,name:t}:e)})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"Content cadence"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"schedule (cron)"}),(0,t.jsx)("input",{value:n,onChange:e=>{let t=e.target.value;eL({...d,triggers:x.map((e,a)=>a===r&&"cron"===e.kind?{...e,expr:t}:e)})},className:p?"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 font-mono text-[11px] text-[color:var(--ck-text-primary)]":"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-red-400/50 bg-black/25 px-2 py-1 font-mono text-[11px] text-[color:var(--ck-text-primary)]",placeholder:"0 9 * * 1,3,5"}),p?null:(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-red-200",children:["Cron should be 5 fields (min hour dom month dow). You entered ",m.length,"."]}),(0,t.jsxs)("div",{className:"mt-1 grid grid-cols-1 gap-1",children:[(0,t.jsx)("select",{value:g.some(e=>e.expr===n)?n:"",onChange:e=>{let t=e.target.value;eL({...d,triggers:x.map((e,a)=>a===r&&"cron"===e.kind?{...e,expr:t}:e)})},className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-[11px] text-[color:var(--ck-text-secondary)]",children:g.map(e=>(0,t.jsx)("option",{value:e.expr,children:e.label},e.label))}),(0,t.jsx)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:"Presets set the cron; edit freely for advanced schedules."})]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"timezone override"}),(0,t.jsx)("input",{value:l,onChange:e=>{let t=String(e.target.value||"").trim()||c;eL({...d,triggers:x.map((e,a)=>a===r&&"cron"===e.kind?{...e,tz:t}:e)})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:c})]})]})]},`${s}-${r}`)}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"No triggers yet."})})]})]}),(0,t.jsxs)("details",{open:!0,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/15",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Runs"}),(0,t.jsxs)("div",{className:"px-3 pb-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Runs (history)"}),(0,t.jsx)(a.default,{href:`/teams/${encodeURIComponent(e)}/runs`,className:"text-[10px] font-medium text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-secondary)] hover:underline",children:"View all →"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button",disabled:y,onClick:async()=>{let t=String(d.id??"").trim();if(t){ee(""),Q(!0);try{let r=await fetch("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:t,mode:"enqueue"})}),a=await r.json();if(!r.ok||!a.ok)throw Error(a.error||"Failed to enqueue run");let s=await fetch(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}`,{cache:"no-store"}),o=await s.json();if(!s.ok||!o.ok)throw Error(o.error||"Failed to refresh runs");let i=(Array.isArray(o.files)?o.files:[]).map(e=>String(e??"").trim()).filter(e=>!!e);H(i)}catch(e){ee(e instanceof Error?e.message:String(e))}finally{Q(!1)}}},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[10px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-50",children:"+ Queue run"}),(0,t.jsx)("button",{type:"button",disabled:y||ea||!eO.ok,onClick:async()=>{let t=String(d.id??"").trim();if(t){if(eO.missingAgentOnNodeIds.length)return void ee("All nodes must be assigned to an agent.");if(eO.agentIdsMissingCron.length){em(!0),eu("");try{let t=await fetch("/api/cron/worker",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"reconcile",teamId:e})}),r=await t.json();if(!t.ok||!1===r.ok)throw Error(r.error||"Failed to reconcile worker crons");let a=await eA(),s=eO.requiredAgentIds.filter(e=>!a[e]);if(s.length)return void ee(`Cron not set up for: ${s.join(", ")}`)}catch(e){ee(e instanceof Error?e.message:String(e));return}finally{em(!1)}}ee(""),Q(!0);try{let r=await fetch("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:t,mode:"run_now"})}),a=await r.json();if(!r.ok||!a.ok)throw Error(a.error||"Failed to create run");let s=await fetch(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}`,{cache:"no-store"}),o=await s.json();if(!s.ok||!o.ok)throw Error(o.error||"Failed to refresh runs");let i=(Array.isArray(o.files)?o.files:[]).map(e=>String(e??"").trim()).filter(e=>!!e);H(i)}catch(e){ee(e instanceof Error?e.message:String(e))}finally{Q(!1)}}},className:"rounded-[var(--ck-radius-sm)] border border-emerald-400/30 bg-emerald-500/10 px-2 py-1 text-[10px] font-medium text-emerald-50 hover:bg-emerald-500/15 disabled:opacity-50",title:"Enqueue a run for the workflow runner (Kitchen does not execute nodes)",children:"+ Run now"}),eo?(0,t.jsx)("div",{className:"ml-2 text-[10px] text-amber-100/90",title:eo,children:"Cron check unavailable"}):null]})]}),eO.missingAgentOnNodeIds.length?(0,t.jsxs)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:["All nodes must be assigned to an agent. Missing agentId on: ",eO.missingAgentOnNodeIds.join(", ")]}):eO.agentIdsMissingCron.length?(0,t.jsxs)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-amber-400/30 bg-amber-500/10 p-2 text-xs text-amber-50",children:[(0,t.jsxs)("div",{children:["Cron not set up for: ",eO.agentIdsMissingCron.join(", ")]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{eu(""),ec(!0)},className:"rounded-[var(--ck-radius-sm)] border border-amber-300/30 bg-amber-500/10 px-2 py-1 text-[10px] font-medium text-amber-50 hover:bg-amber-500/15",children:"Install worker cron(s)"}),(0,t.jsx)("button",{type:"button",onClick:()=>void eA(),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[10px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Re-check"})]})]}):null,(0,t.jsx)(s.ConfirmationModal,{open:ed,title:"Install worker cron jobs?",busy:ex,error:ep||void 0,confirmLabel:"Install",onClose:()=>{ex||ec(!1)},onConfirm:async()=>{em(!0),eu("");try{let t=await fetch("/api/cron/worker",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"reconcile",teamId:e})}),r=await t.json();if(!t.ok||!1===r.ok)throw Error(r.error||"Failed to install worker crons");await eA(),ec(!1)}catch(e){eu(e instanceof Error?e.message:String(e))}finally{em(!1)}},children:(0,t.jsxs)("div",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:["Kitchen will install (or enable) worker cron jobs for the following agents so this workflow can drain:",(0,t.jsx)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2 font-mono text-[11px] text-[color:var(--ck-text-primary)]",children:eO.agentIdsMissingCron.join(", ")}),(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["Cron cadence: 1 minute. The worker runs: ",(0,t.jsx)("span",{className:"font-mono",children:"openclaw recipes workflows worker-tick"}),"."]})]})}),G?(0,t.jsx)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:G}):null,(0,t.jsx)("div",{className:"mt-2 space-y-1",children:X?(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"Loading runs…"}):V.length?V.slice(0,8).map(r=>{let s=String(d.id??"").trim(),o=String(r).replace(/\.run\.json$/i,""),i=et===o,n=s?`/teams/${encodeURIComponent(e)}/runs/${encodeURIComponent(s)}/${encodeURIComponent(o)}`:"#";return(0,t.jsx)(a.default,{href:n,onClick:()=>er(o),className:i?"block w-full rounded-[var(--ck-radius-sm)] bg-white/10 px-2 py-1 text-left text-[11px] font-mono text-[color:var(--ck-text-primary)]":"block w-full rounded-[var(--ck-radius-sm)] px-2 py-1 text-left text-[11px] font-mono text-[color:var(--ck-text-secondary)] hover:bg-white/5",title:"Open run detail",children:o},r)}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"No runs yet."})}),(0,t.jsxs)("details",{open:!0,className:"mt-3 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/10",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Nodes"}),(0,t.jsxs)("div",{className:"px-3 pb-3",children:[(0,t.jsx)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"id"}),(0,t.jsx)("input",{value:eh,onChange:e=>eg(e.target.value),className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"e.g. draft_assets"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"name (optional)"}),(0,t.jsx)("input",{value:ev,onChange:e=>eb(e.target.value),className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"Human-friendly label"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"type"}),(0,t.jsxs)("select",{value:ek,onChange:e=>ey(e.target.value),className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"start",children:"start"}),(0,t.jsx)("option",{value:"end",children:"end"}),(0,t.jsx)("option",{value:"llm",children:"llm"}),(0,t.jsx)("option",{value:"tool",children:"tool"}),(0,t.jsx)("option",{value:"condition",children:"condition"}),(0,t.jsx)("option",{value:"delay",children:"delay"}),(0,t.jsx)("option",{value:"human_approval",children:"human_approval"})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e=String(eh||"").trim().replace(/[^a-z0-9_\-]/gi,"_");if(!e||d.nodes.some(t=>t.id===e))return;let t=d.nodes.reduce((e,t)=>"number"==typeof t.x?Math.max(e,t.x):e,80),r={id:e,type:ek,name:String(ev||"").trim()||e,x:t+220,y:80};eL({...d,nodes:[...d.nodes,r]}),L(e),eg(""),eb("")},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"+ Add node"})]})}),(0,t.jsx)("div",{className:"mt-2 space-y-1",children:d.nodes.map(e=>{let r=O===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>L(e.id),className:r?"w-full rounded-[var(--ck-radius-sm)] bg-white/10 px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-primary)]":"w-full rounded-[var(--ck-radius-sm)] px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-secondary)] hover:bg-white/5",children:[(0,t.jsx)("span",{className:"font-mono",children:e.id}),(0,t.jsx)("span",{className:"ml-2 text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:e.type})]},e.id)})})]})]}),(0,t.jsxs)("details",{open:!0,className:"mt-3 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/10",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Edges"}),(0,t.jsxs)("div",{className:"px-3 pb-3",children:[(0,t.jsx)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"from"}),(0,t.jsxs)("select",{value:ef,onChange:e=>ew(e.target.value),className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"(select)"}),d.nodes.map(e=>(0,t.jsx)("option",{value:e.id,children:e.id},e.id))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"to"}),(0,t.jsxs)("select",{value:ej,onChange:e=>eN(e.target.value),className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"(select)"}),d.nodes.map(e=>(0,t.jsx)("option",{value:e.id,children:e.id},e.id))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"label (optional)"}),(0,t.jsx)("input",{value:eS,onChange:e=>eC(e.target.value),className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"e.g. approve"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e=String(ef||"").trim(),t=String(ej||"").trim();if(!e||!t||e===t)return;let r={id:`e${Date.now()}`,from:e,to:t,...String(eS||"").trim()?{label:String(eS).trim()}:{}};eL({...d,edges:[...d.edges??[],r]}),eC("")},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"+ Add edge"})]})}),(0,t.jsx)("div",{className:"mt-2 space-y-2",children:(d.edges??[]).length?(d.edges??[]).map(e=>(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"text-[11px] text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:e.from})," → ",(0,t.jsx)("span",{className:"font-mono",children:e.to}),e.label?(0,t.jsxs)("span",{className:"ml-2 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["(",e.label,")"]}):null]}),(0,t.jsx)("button",{type:"button",onClick:()=>eL({...d,edges:(d.edges??[]).filter(t=>t.id!==e.id)}),className:"text-[10px] text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]",children:"Remove"})]})},e.id)):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"No edges yet."})})]})]}),(0,t.jsxs)("details",{open:!0,className:"mt-3 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/10",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Node inspector"}),(0,t.jsxs)("div",{className:"px-3 pb-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-between gap-2",children:O?(0,t.jsx)("button",{type:"button",onClick:()=>{let e=d.nodes.filter(e=>e.id!==O),t=(d.edges??[]).filter(e=>e.from!==O&&e.to!==O);eL({...d,nodes:e,edges:t}),L("")},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[10px] font-medium text-red-100 hover:bg-white/10",children:"Delete node"}):null}),O?(v=d.nodes.find(e=>e.id===O))?(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"id"}),(0,t.jsx)("div",{className:"mt-1 rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:v.id})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"name"}),(0,t.jsx)("input",{value:String(v.name??""),onChange:e=>{let t=e.target.value;eL({...d,nodes:d.nodes.map(e=>e.id===v.id?{...e,name:t}:e)})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"Optional"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"type"}),(0,t.jsxs)("select",{value:v.type,onChange:e=>{let t=e.target.value;eL({...d,nodes:d.nodes.map(e=>e.id===v.id?{...e,type:t}:e)})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"start",children:"start"}),(0,t.jsx)("option",{value:"end",children:"end"}),(0,t.jsx)("option",{value:"llm",children:"llm"}),(0,t.jsx)("option",{value:"tool",children:"tool"}),(0,t.jsx)("option",{value:"condition",children:"condition"}),(0,t.jsx)("option",{value:"delay",children:"delay"}),(0,t.jsx)("option",{value:"human_approval",children:"human_approval"})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"x"}),(0,t.jsx)("input",{type:"number",value:"number"==typeof v.x?v.x:0,onChange:e=>{let t=Number(e.target.value);eL({...d,nodes:d.nodes.map(e=>e.id===v.id?{...e,x:t}:e)})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"y"}),(0,t.jsx)("input",{type:"number",value:"number"==typeof v.y?v.y:0,onChange:e=>{let t=Number(e.target.value);eL({...d,nodes:d.nodes.map(e=>e.id===v.id?{...e,y:t}:e)})},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"config"}),(0,t.jsx)("pre",{className:"mt-1 max-h-[200px] overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2 text-[10px] text-[color:var(--ck-text-secondary)]",children:JSON.stringify(v.config??{},null,2)})]})]}):(0,t.jsx)("div",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"No node selected."}):(0,t.jsx)("div",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"Select a node."})]})]})]})]})]})):null})})]})]})}e.s(["default",()=>n],87090)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},36288,e=>{"use strict";var t=e.i(43476),s=e.i(22016),r=e.i(18566),a=e.i(71645),o=e.i(76972),c=e.i(82310),n=e.i(42771);function l({teamId:e,ticket:s,currentOwner:o}){let c=(0,r.useRouter)(),[n,l]=(0,a.useState)([]),[i,d]=(0,a.useState)(o??""),[m,x]=(0,a.useState)(!1),[u,b]=(0,a.useState)(null);(0,a.useEffect)(()=>{let t=!1;return(async()=>{try{let s=e?`/api/teams/${encodeURIComponent(e)}/tickets/assignees`:"/api/tickets/assignees",r=await fetch(s,{cache:"no-store"}),a=await r.json();if(t)return;l(Array.isArray(a.assignees)?a.assignees:[])}catch{if(t)return;l([])}})(),()=>{t=!0}},[]);let h=(0,a.useMemo)(()=>{let e=new Set(n);return o&&e.add(o),Array.from(e).sort()},[n,o]);async function k(){x(!0),b(null);try{let t=e?`/api/teams/${encodeURIComponent(e)}/tickets/assign`:"/api/tickets/assign",r=await fetch(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:s,assignee:i})}),a=await r.json();if(!r.ok)return void b(a.error||"Assign failed");c.refresh()}catch{b("Assign failed")}finally{x(!1)}}return(0,t.jsxs)("div",{className:"ck-glass p-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-tertiary)]",children:"Assignee"}),(0,t.jsxs)("select",{className:"rounded-md border border-white/10 bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]",value:i,onChange:e=>d(e.target.value),children:[(0,t.jsx)("option",{value:"",disabled:!0,children:"Select…"}),h.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),(0,t.jsx)("button",{type:"button",onClick:k,disabled:m||!i||i===(o??""),className:"rounded-md bg-emerald-600 px-3 py-2 text-sm font-semibold text-white hover:bg-emerald-500 disabled:cursor-not-allowed disabled:opacity-50",children:m?"Assigning…":"Assign"}),o?(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:["Currently: ",o]}):null]}),u?(0,t.jsx)("div",{className:"mt-2 text-xs text-red-300",children:u}):null]})}function i(e,t){return t||0==e.trim().length}function d(e){let d=(0,r.useRouter)(),m=(0,o.useToast)(),[x,u]=(0,a.useTransition)(),[b,h]=(0,a.useState)(null),[k,p]=(0,a.useState)(null),v=(0,a.useMemo)(()=>(function(e){let t=function(e){let t=/^## Comments\s*$/gim.exec(e);if(!t)return null;let s=t.index+t[0].length,r=e.slice(s).search(/^##\s+/m),a=-1===r?e.length:s+r;return{start:s,end:a}}(e);if(!t)return[];let s=e.slice(t.start,t.end).replace(/^\s+/,"").split("\n"),r=[],a=null,o=/^- \*\*(.+?)\*\*\s+—\s+(.*)$/;for(let e of s){let t=e.replace(/\r$/,""),s=t.match(o);if(s){a&&r.push({...a,body:a.body.trimEnd()});let e=s[1].trim(),t=s[2].trim(),o=t.indexOf(":"),c=(o>=0?t.slice(0,o):t).trim()||"unknown",n=o>=0?t.slice(o+1).trimStart():"";a={timestamp:e,author:c,body:n?n+"\n":""};continue}a&&(a.body+=t.replace(/^\s{0,2}/,"")+"\n")}return a&&r.push({...a,body:a.body.trimEnd()}),r})(e.markdown),[e.markdown]),[f,g]=(0,a.useState)(""),[y,j]=(0,a.useState)("");async function N(){h(null),await (0,n.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/move-to-goals`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId})})}async function w(){h(null),await (0,n.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/delete`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId})})}async function C(){h(null);let t=y.trim();if(!t)throw Error("Comment cannot be empty.");await (0,n.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/comment`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId,author:f.trim()||void 0,comment:t})}),j(""),m.push({kind:"success",message:"Comment added."}),d.refresh()}return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(s.default,{href:e.backHref??"/tickets",className:"text-sm font-medium hover:underline",children:"← Back"}),(0,t.jsx)("span",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:e.file})]}),b?(0,t.jsx)("div",{className:"ck-glass border border-[color:var(--ck-border-strong)] p-3 text-sm text-[color:var(--ck-text-primary)]",children:b}):null,void 0!==e.currentOwner?(0,t.jsx)(l,{teamId:e.teamId,ticket:e.ticketId,currentOwner:e.currentOwner??null}):null,(0,t.jsx)("div",{className:"ck-glass p-4",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-border-subtle)] px-3 py-1.5 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:border-[color:var(--ck-border-strong)]",onClick:()=>p({kind:"goals"}),disabled:x,children:"Move to Goals"}),(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-accent-red)] bg-[color:var(--ck-accent-red-soft)] px-3 py-1.5 text-xs font-medium text-[color:var(--ck-accent-red)] hover:bg-[color:var(--ck-accent-red-soft-strong)]",onClick:()=>p({kind:"delete"}),disabled:x,children:"Delete Ticket"})]})}),(0,t.jsxs)("div",{className:"ck-glass p-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"Comments"}),(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:v.length})]}),v.length?(0,t.jsx)("div",{className:"mt-3 space-y-3",children:v.map((e,s)=>(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] bg-black/10 p-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-primary)]",children:e.author}),(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:e.timestamp})]}),(0,t.jsx)("div",{className:"mt-2 whitespace-pre-wrap break-words text-sm leading-6 text-[color:var(--ck-text-secondary)]",children:e.body})]},`${e.timestamp}-${s}`))}):(0,t.jsx)("div",{className:"mt-3 text-sm text-[color:var(--ck-text-secondary)]",children:"No comments yet."}),(0,t.jsxs)("div",{className:"mt-4 border-t border-[color:var(--ck-border-subtle)] pt-4",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"Add comment"}),(0,t.jsxs)("div",{className:"mt-3 grid gap-3",children:[(0,t.jsxs)("div",{className:"grid gap-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",htmlFor:"ck-comment-author",children:"Author (optional)"}),(0,t.jsx)("input",{id:"ck-comment-author",value:f,onChange:e=>g(e.target.value),placeholder:"unknown",className:"w-full rounded border border-[color:var(--ck-border-subtle)] bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] outline-none focus:border-[color:var(--ck-border-strong)]",disabled:x})]}),(0,t.jsxs)("div",{className:"grid gap-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",htmlFor:"ck-comment-body",children:"Comment"}),(0,t.jsx)("textarea",{id:"ck-comment-body",value:y,onChange:e=>j(e.target.value),rows:4,className:"w-full rounded border border-[color:var(--ck-border-subtle)] bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] outline-none focus:border-[color:var(--ck-border-strong)]",disabled:x})]}),(0,t.jsx)("div",{className:"flex items-center justify-end",children:(0,t.jsx)("button",{type:"button","aria-busy":x,className:"rounded-[var(--ck-radius-sm)] bg-[color:var(--ck-accent)] px-3 py-2 text-xs font-semibold text-black transition hover:brightness-110 active:brightness-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--ck-border-strong)] focus-visible:ring-offset-2 focus-visible:ring-offset-black/30 disabled:cursor-not-allowed disabled:border disabled:border-[color:var(--ck-border-subtle)] disabled:bg-[color:var(--ck-bg-glass)] disabled:text-[color:var(--ck-text-tertiary)]",onClick:()=>{u(()=>{C().catch(e=>h((0,c.errorMessage)(e)))})},disabled:i(y,x),children:x?"Posting…":"Post comment"})})]})]})]}),(0,t.jsx)("div",{className:"ck-glass p-6",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words text-sm leading-6 text-[color:var(--ck-text-primary)]",children:e.markdown})}),k?(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,t.jsxs)("div",{className:"ck-glass w-full max-w-lg rounded-[var(--ck-radius-md)] border border-[color:var(--ck-border-strong)] p-4",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"goals"===k.kind?"Move to Goals":"Delete ticket"}),(0,t.jsx)("div",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"goals"===k.kind?(0,t.jsxs)(t.Fragment,{children:["This will move the ticket out of the work lanes into ",(0,t.jsx)("code",{children:"work/goals/"})," so it won’t be picked up by automation."]}):(0,t.jsx)(t.Fragment,{children:"This will permanently remove the ticket markdown file. Assignment stubs (if any) will be archived."})}),(0,t.jsxs)("div",{className:"mt-4 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-border-subtle)] px-3 py-1.5 text-xs text-[color:var(--ck-text-secondary)]",onClick:()=>p(null),disabled:x,children:"Cancel"}),(0,t.jsx)("button",{className:"delete"===k.kind?"rounded bg-[color:var(--ck-accent-red)] px-3 py-1.5 text-xs font-medium text-white":"rounded bg-[color:var(--ck-accent)] px-3 py-1.5 text-xs font-medium text-black",onClick:()=>{let t=k.kind;p(null),u(()=>{("goals"===t?N():w()).then(()=>{m.push({kind:"success",message:"delete"===t?"Ticket deleted.":"Moved to Goals."}),"delete"===t?d.push(e.backHref??"/tickets"):d.refresh()}).catch(e=>h((0,c.errorMessage)(e)))})},disabled:x,children:"Confirm"})]})]})}):null]})}e.s(["TicketDetailClient",()=>d,"isPostCommentDisabled",()=>i],36288)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},44355,e=>{"use strict";var t=e.i(43476),r=e.i(74080);function s({open:e,onClose:s,title:a,children:o,error:i,confirmLabel:l,confirmBusyLabel:n,onConfirm:c,confirmDisabled:d,busy:m,confirmButtonClassName:x}){if(!e)return null;let u=m??!1,p=u&&n?n:l,h="confirmation-modal-title";return(0,r.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:s,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":h,children:(0,t.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,t.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-glass-strong)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("h2",{id:h,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:a}),o,i?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:i}):null,(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:s,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Cancel"}),(0,t.jsx)("button",{type:"button",disabled:(d??!1)||u,onClick:c,className:x??"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] disabled:opacity-50",children:p})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>s])},54510,e=>{"use strict";var t=e.i(43476),r=e.i(44355);function s({open:e,onClose:s,title:a,entityLabel:o,bodyText:i,onConfirm:l,busy:n,error:c}){return(0,t.jsx)(r.ConfirmationModal,{open:e,onClose:s,title:a,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:l,busy:n,error:c??void 0,children:(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[a," ",(0,t.jsx)("code",{className:"font-mono",children:o}),"? ",i]})})}function a(e){return function(r){let a=r[e.entityLabelKey];return(0,t.jsx)(s,{open:r.open,onClose:r.onClose,title:e.title,entityLabel:a,bodyText:e.bodyText,onConfirm:r.onConfirm,busy:r.busy,error:r.error})}}let o=a({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),i=a({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),l=a({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),n=a({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,o,"DeleteCronJobModal",0,n,"DeleteRecipeModal",0,l,"DeleteTeamModal",0,i],54510)},72532,e=>{"use strict";var t=e.i(43476);function r({title:e,files:r,loading:s,showOptionalFiles:a,onShowOptionalChange:o,selectedFileName:i,onSelectFile:l,renderItemExtra:n}){let c=a?r:r.filter(e=>e.required||!e.missing);return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:e}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:e=>o(e.target.checked)}),"Show optional"]})]}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"Default view hides optional missing files to reduce noise."}),(0,t.jsxs)("ul",{className:"mt-3 space-y-1",children:[s?(0,t.jsx)("li",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"Loading…"}):null,c.map(e=>{var r;let s;return(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(e.name),className:(r=e.name,s="w-full rounded-[var(--ck-radius-sm)] px-3 py-2 text-left text-sm",i===r?`${s} bg-white/10 text-[color:var(--ck-text-primary)]`:`${s} text-[color:var(--ck-text-secondary)] hover:bg-white/5`),children:[(0,t.jsx)("span",{className:e.required?"text-[color:var(--ck-text-primary)]":"text-[color:var(--ck-text-secondary)]",children:e.name}),(0,t.jsx)("span",{className:"ml-2 text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:e.required?"required":"optional"}),e.missing?(0,t.jsx)("span",{className:"ml-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"missing"}):null]}),n?.(e)]})},e.name)})]})]})}e.s(["FileListWithOptionalToggle",()=>r])},92140,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(22016),a=e.i(18566),o=e.i(42771),i=e.i(82310);function l(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function n({teamId:e}){let n=(0,a.useRouter)(),[c,d]=(0,r.useState)([]),[m,x]=(0,r.useState)(!0),[u,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)(""),[v,y]=(0,r.useState)(""),[b,w]=(0,r.useState)({}),[k,g]=(0,r.useState)({}),[j,N]=(0,r.useState)(""),[C,S]=(0,r.useState)(""),[I,A]=(0,r.useState)(null),[R,$]=(0,r.useState)(""),[T,U]=(0,r.useState)(""),[D,L]=(0,r.useState)(!1),M=(0,r.useCallback)(async t=>{let r=!!t?.quiet;f(""),r||x(!0);try{let t=await (0,o.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}`,{cache:"no-store"});if(!t.ok)throw Error("Failed to load workflows");let r=(Array.isArray(t.files)?t.files:[]).map(e=>e.endsWith(".workflow.json")?e.slice(0,-14):null).filter(e=>!!e);d(r.map(e=>({id:e,name:e})))}catch(e){f((0,i.errorMessage)(e))}finally{r||x(!1)}},[e]);async function E(){p(!0);try{await M({quiet:!0})}finally{p(!1)}}async function q(t){if(confirm(`Delete workflow “${t}”? This removes the .workflow.json file from the team workspace.`)){f("");try{let r=await (0,o.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`,{method:"DELETE"});if(!r.ok)throw Error(r.error||"Failed to delete workflow");await M({quiet:!0}),v===t&&(y(""),N(""),A(null))}catch(e){f((0,i.errorMessage)(e))}}}async function J(t){g(e=>({...e,[t]:!0})),$("");try{let r=await (0,o.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}`,{cache:"no-store"});if(!r.ok)throw Error(r.error||"Failed to load runs");let s=Array.isArray(r.runIds)?r.runIds.map(e=>String(e||"").trim()).filter(Boolean):Array.isArray(r.files)?r.files.map(e=>"string"==typeof e&&e.endsWith(".run.json")?e.slice(0,-9):null).filter(e=>!!e):[];w(e=>({...e,[t]:s}))}catch(e){$((0,i.errorMessage)(e)),w(e=>({...e,[t]:[]}))}finally{g(e=>({...e,[t]:!1}))}}async function O(t,r){S(t),N(r),A(null),$(""),U("");try{let s=await (0,o.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}&runId=${encodeURIComponent(r)}`,{cache:"no-store"});if(!s.ok)throw Error(s.error||"Failed to load run");let a=l(s.run)?s.run:null;if(!a)throw Error("Invalid run format");A({id:String(a.id??r),status:"string"==typeof a.status?a.status:void 0,startedAt:"string"==typeof a.startedAt?a.startedAt:void 0,finishedAt:"string"==typeof a.finishedAt?String(a.finishedAt):void 0,meta:a.meta,memoryUsed:a.memoryUsed,approval:a.approval,raw:a})}catch(e){$((0,i.errorMessage)(e)),A(null)}}async function B(t){if(confirm(`Add workflow from template “${t}”?`)){f("");try{let r=await (0,o.fetchJson)("/api/teams/workflow-templates",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,templateId:t})});if(!r.ok)throw Error(r.error||"Failed to apply template");let s=String(r.workflowId??"").trim();if(!s)throw Error("Template applied but workflowId missing");await M({quiet:!0}),n.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(s)}`)}catch(e){f((0,i.errorMessage)(e))}}}(0,r.useEffect)(()=>{M()},[M]);let K=(0,r.useMemo)(()=>{if(!I)return[];let e=I.memoryUsed??(l(I.meta)?I.meta.memoryUsed:void 0);return Array.isArray(e)?e.map(e=>l(e)?e:null).filter(Boolean).map(e=>({ts:String(e.ts??"").trim(),author:String(e.author??"").trim(),type:String(e.type??"").trim(),content:String(e.content??"").trim(),source:e.source})).filter(e=>e.ts&&e.author&&e.type&&e.content):[]},[I]);return m?(0,t.jsx)("div",{className:"ck-glass p-4",children:"Loading workflows…"}):(0,t.jsxs)("div",{className:"ck-glass p-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:"Workflows (file-first)"}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:["Stored in ",(0,t.jsx)("code",{children:"shared-context/workflows/<id>.workflow.json"})," inside the team workspace."]}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-start gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let t=`new-${Date.now()}`;n.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(t)}?draft=1`)},className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)]",children:"Add workflow"}),(0,t.jsx)("button",{type:"button",onClick:()=>void B("marketing-cadence-v1"),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Add example template"}),(0,t.jsx)("button",{type:"button",onClick:E,disabled:u,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:u?"Refreshing…":"Refresh"})]})]}),h?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-4 text-sm text-red-100",children:h}):null,0===c.length?(0,t.jsx)("p",{className:"mt-4 text-sm text-[color:var(--ck-text-secondary)]",children:"No workflows yet."}):(0,t.jsx)("ul",{className:"mt-4 divide-y divide-white/10 overflow-hidden rounded-[var(--ck-radius-sm)] border border-white/10",children:c.map(r=>{let a=v===r.id,o=b[r.id]??[],n=!!k[r.id];return(0,t.jsxs)("li",{className:"bg-white/5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[(0,t.jsxs)("button",{type:"button",onClick:async()=>{let e=a?"":r.id;y(e),N(""),A(null),$(""),e&&await J(e)},className:"min-w-0 flex-1 text-left",children:[(0,t.jsx)("div",{className:"truncate text-sm font-medium text-[color:var(--ck-text-primary)]",children:r.name||r.id}),(0,t.jsx)("div",{className:"truncate text-xs text-[color:var(--ck-text-tertiary)]",children:r.id}),(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["Click to ",a?"collapse":"expand"," run details"]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)(s.default,{href:`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(r.id)}`,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Edit"}),(0,t.jsx)("button",{type:"button",onClick:()=>void q(r.id),className:"rounded-[var(--ck-radius-sm)] border border-[color:rgba(255,59,48,0.45)] bg-[color:rgba(255,59,48,0.08)] px-3 py-1.5 text-sm font-medium text-[color:var(--ck-accent-red)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)]",children:"Delete"})]})]}),a?(0,t.jsxs)("div",{className:"border-t border-white/10 bg-black/20 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Runs"}),(0,t.jsx)("button",{type:"button",disabled:n,onClick:()=>void J(r.id),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:n?"Loading…":"Refresh runs"})]}),R?(0,t.jsx)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:R}):null,(0,t.jsxs)("div",{className:"mt-2 grid grid-cols-1 gap-3 lg:grid-cols-2",children:[(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2",children:o.length?(0,t.jsx)("div",{className:"space-y-1",children:o.slice(0,8).map(e=>{let s=j===e;return(0,t.jsx)("button",{type:"button",onClick:()=>void O(r.id,e),className:s?"w-full rounded-[var(--ck-radius-sm)] bg-white/10 px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-primary)]":"w-full rounded-[var(--ck-radius-sm)] px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-secondary)] hover:bg-white/5",children:(0,t.jsx)("span",{className:"font-mono",children:e})},e)})}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"No runs yet."})}),(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-3",children:I?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Run detail"}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:I.id}),I.status?(0,t.jsxs)("span",{children:[" • ",I.status]}):null]})]}),(0,t.jsxs)("div",{className:"border-t border-white/10 pt-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Approval"}),(()=>{let r=I.approval;if(!l(r))return(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"(No approval info recorded.)"});let s=String(r.state??"").trim(),a="string"==typeof r.requestedAt?r.requestedAt:"",o="string"==typeof r.decidedAt?r.decidedAt:"",n="string"==typeof r.decidedBy?r.decidedBy:"",c="string"==typeof r.note?r.note:"",d=l(r.outbound)?r.outbound:null,m="pending"===s||"waiting_for_approval"===I.status;return(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2 text-[11px] text-[color:var(--ck-text-secondary)]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"state"}),": ",(0,t.jsx)("span",{className:"font-mono text-[color:var(--ck-text-primary)]",children:s||"(unknown)"})]}),a?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"requestedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:a})]}):null,o?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"decidedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:o})]}):null,n?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"decidedBy"}),": ",(0,t.jsx)("span",{className:"font-mono",children:n})]}):null,c?(0,t.jsx)("div",{className:"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]",children:c}):null,d?(0,t.jsxs)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px]",children:[(0,t.jsx)("div",{className:"text-[color:var(--ck-text-tertiary)]",children:"Outbound"}),(0,t.jsx)("pre",{className:"mt-1 overflow-auto whitespace-pre-wrap",children:JSON.stringify(d,null,2)})]}):null]}),m?(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"approval note (optional)"}),(0,t.jsx)("textarea",{value:T,onChange:e=>U(e.target.value),rows:3,className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"e.g. Ship it / please tweak hook"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:[{action:"approve",label:"Approve"},{action:"request_changes",label:"Request changes"},{action:"cancel",label:"Cancel"}].map(r=>(0,t.jsx)("button",{type:"button",disabled:D,onClick:async()=>{if(C&&j&&confirm(`${r.label} run ${j}?`)){L(!0),$("");try{let t=await fetch("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:C,runId:j,action:r.action,note:T||void 0,decidedBy:"ClawKitchen UI"})}),s=await t.json();if(!t.ok||!s.ok)throw Error(s.error||"Failed to apply approval action");await O(C,j)}catch(e){$((0,i.errorMessage)(e))}finally{L(!1)}}},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:r.label},r.action))})]}):null]})})()]}),(0,t.jsxs)("div",{className:"border-t border-white/10 pt-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Memory used in this run"}),K.length?(0,t.jsx)("div",{className:"mt-2 space-y-2",children:K.slice(0,20).map((e,r)=>(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2",children:[(0,t.jsxs)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:e.ts})," • ",(0,t.jsx)("span",{className:"font-mono",children:e.type})," • ",(0,t.jsx)("span",{className:"font-mono",children:e.author})]}),(0,t.jsx)("div",{className:"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]",children:e.content}),void 0!==e.source?(0,t.jsx)("pre",{className:"mt-2 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px] text-[color:var(--ck-text-secondary)]",children:JSON.stringify(e.source,null,2)}):null]},`${e.ts}-${r}`))}):(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["(None recorded yet.)",(0,t.jsxs)("div",{className:"mt-1",children:["Next step: have the workflow runner write an explicit ",(0,t.jsx)("span",{className:"font-mono",children:"memoryUsed[]"})," list into the run file."]})]})]})]}):j?(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"Loading run…"}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Select a run to see details."})})]})]}):null]},r.id)})})]})}e.s(["default",()=>n])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},92140,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(22016),a=e.i(18566),o=e.i(42771),i=e.i(82310);function n(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function l({teamId:e}){let l=(0,a.useRouter)(),[d,c]=(0,r.useState)([]),[m,x]=(0,r.useState)(!0),[p,u]=(0,r.useState)(!1),[h,f]=(0,r.useState)(""),[v,w]=(0,r.useState)(""),[y,b]=(0,r.useState)({}),[k,j]=(0,r.useState)({}),[g,N]=(0,r.useState)(""),[S,A]=(0,r.useState)(""),[C,I]=(0,r.useState)(null),[R,U]=(0,r.useState)(""),[$,E]=(0,r.useState)(""),[q,J]=(0,r.useState)(!1),M=(0,r.useCallback)(async t=>{let r=!!t?.quiet;f(""),r||x(!0);try{let t=await (0,o.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}`,{cache:"no-store"});if(!t.ok)throw Error("Failed to load workflows");let r=(Array.isArray(t.files)?t.files:[]).map(e=>e.endsWith(".workflow.json")?e.slice(0,-14):null).filter(e=>!!e);c(r.map(e=>({id:e,name:e})))}catch(e){f((0,i.errorMessage)(e))}finally{r||x(!1)}},[e]);async function O(){u(!0);try{await M({quiet:!0})}finally{u(!1)}}async function T(t){if(confirm(`Delete workflow “${t}”? This removes the .workflow.json file from the team workspace.`)){f("");try{let r=await (0,o.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`,{method:"DELETE"});if(!r.ok)throw Error(r.error||"Failed to delete workflow");await M({quiet:!0}),v===t&&(w(""),N(""),I(null))}catch(e){f((0,i.errorMessage)(e))}}}async function B(t){j(e=>({...e,[t]:!0})),U("");try{let r=await (0,o.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}`,{cache:"no-store"});if(!r.ok)throw Error(r.error||"Failed to load runs");let s=Array.isArray(r.runIds)?r.runIds.map(e=>String(e||"").trim()).filter(Boolean):Array.isArray(r.files)?r.files.map(e=>"string"==typeof e&&e.endsWith(".run.json")?e.slice(0,-9):null).filter(e=>!!e):[];b(e=>({...e,[t]:s}))}catch(e){U((0,i.errorMessage)(e)),b(e=>({...e,[t]:[]}))}finally{j(e=>({...e,[t]:!1}))}}async function F(t,r){A(t),N(r),I(null),U(""),E("");try{let s=await (0,o.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}&runId=${encodeURIComponent(r)}`,{cache:"no-store"});if(!s.ok)throw Error(s.error||"Failed to load run");let a=n(s.run)?s.run:null;if(!a)throw Error("Invalid run format");I({id:String(a.id??r),status:"string"==typeof a.status?a.status:void 0,startedAt:"string"==typeof a.startedAt?a.startedAt:void 0,finishedAt:"string"==typeof a.finishedAt?String(a.finishedAt):void 0,meta:a.meta,memoryUsed:a.memoryUsed,approval:a.approval,raw:a})}catch(e){U((0,i.errorMessage)(e)),I(null)}}async function D(t){if(confirm(`Add workflow from template “${t}”?`)){f("");try{let r=await (0,o.fetchJson)("/api/teams/workflow-templates",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,templateId:t})});if(!r.ok)throw Error(r.error||"Failed to apply template");let s=String(r.workflowId??"").trim();if(!s)throw Error("Template applied but workflowId missing");await M({quiet:!0}),l.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(s)}`)}catch(e){f((0,i.errorMessage)(e))}}}(0,r.useEffect)(()=>{M()},[M]);let L=(0,r.useMemo)(()=>{if(!C)return[];let e=C.memoryUsed??(n(C.meta)?C.meta.memoryUsed:void 0);return Array.isArray(e)?e.map(e=>n(e)?e:null).filter(Boolean).map(e=>({ts:String(e.ts??"").trim(),author:String(e.author??"").trim(),type:String(e.type??"").trim(),content:String(e.content??"").trim(),source:e.source})).filter(e=>e.ts&&e.author&&e.type&&e.content):[]},[C]);return m?(0,t.jsx)("div",{className:"ck-glass p-4",children:"Loading workflows…"}):(0,t.jsxs)("div",{className:"ck-glass p-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:"Workflows (file-first)"}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:["Stored in ",(0,t.jsx)("code",{children:"shared-context/workflows/<id>.workflow.json"})," inside the team workspace."]}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-start gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let t=`new-${Date.now()}`;l.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(t)}?draft=1`)},className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)]",children:"Add workflow"}),(0,t.jsx)("button",{type:"button",onClick:()=>void D("marketing-cadence-v1"),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Add example template"}),(0,t.jsx)("button",{type:"button",onClick:O,disabled:p,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:p?"Refreshing…":"Refresh"})]})]}),h?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-4 text-sm text-red-100",children:h}):null,0===d.length?(0,t.jsx)("p",{className:"mt-4 text-sm text-[color:var(--ck-text-secondary)]",children:"No workflows yet."}):(0,t.jsx)("ul",{className:"mt-4 divide-y divide-white/10 overflow-hidden rounded-[var(--ck-radius-sm)] border border-white/10",children:d.map(r=>{let a=v===r.id,o=y[r.id]??[],l=!!k[r.id];return(0,t.jsxs)("li",{className:"bg-white/5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[(0,t.jsxs)("button",{type:"button",onClick:async()=>{let e=a?"":r.id;w(e),N(""),I(null),U(""),e&&await B(e)},className:"min-w-0 flex-1 text-left",children:[(0,t.jsx)("div",{className:"truncate text-sm font-medium text-[color:var(--ck-text-primary)]",children:r.name||r.id}),(0,t.jsx)("div",{className:"truncate text-xs text-[color:var(--ck-text-tertiary)]",children:r.id}),(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["Click to ",a?"collapse":"expand"," run details"]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)(s.default,{href:`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(r.id)}`,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Edit"}),(0,t.jsx)("button",{type:"button",onClick:()=>void T(r.id),className:"rounded-[var(--ck-radius-sm)] border border-[color:rgba(255,59,48,0.45)] bg-[color:rgba(255,59,48,0.08)] px-3 py-1.5 text-sm font-medium text-[color:var(--ck-accent-red)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)]",children:"Delete"})]})]}),a?(0,t.jsxs)("div",{className:"border-t border-white/10 bg-black/20 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Runs"}),(0,t.jsx)("button",{type:"button",disabled:l,onClick:()=>void B(r.id),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:l?"Loading…":"Refresh runs"})]}),R?(0,t.jsx)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:R}):null,(0,t.jsxs)("div",{className:"mt-2 grid grid-cols-1 gap-3 lg:grid-cols-2",children:[(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2",children:o.length?(0,t.jsx)("div",{className:"space-y-1",children:o.slice(0,8).map(e=>{let s=g===e;return(0,t.jsx)("button",{type:"button",onClick:()=>void F(r.id,e),className:s?"w-full rounded-[var(--ck-radius-sm)] bg-white/10 px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-primary)]":"w-full rounded-[var(--ck-radius-sm)] px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-secondary)] hover:bg-white/5",children:(0,t.jsx)("span",{className:"font-mono",children:e})},e)})}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"No runs yet."})}),(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-3",children:C?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Run detail"}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:C.id}),C.status?(0,t.jsxs)("span",{children:[" • ",C.status]}):null]})]}),(0,t.jsxs)("div",{className:"border-t border-white/10 pt-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Approval"}),(()=>{let r=C.approval;if(!n(r))return(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"(No approval info recorded.)"});let s=String(r.state??"").trim(),a="string"==typeof r.requestedAt?r.requestedAt:"",o="string"==typeof r.decidedAt?r.decidedAt:"",l="string"==typeof r.decidedBy?r.decidedBy:"",d="string"==typeof r.note?r.note:"",c=n(r.outbound)?r.outbound:null,m="pending"===s||"waiting_for_approval"===C.status;return(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2 text-[11px] text-[color:var(--ck-text-secondary)]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"state"}),": ",(0,t.jsx)("span",{className:"font-mono text-[color:var(--ck-text-primary)]",children:s||"(unknown)"})]}),a?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"requestedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:a})]}):null,o?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"decidedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:o})]}):null,l?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"decidedBy"}),": ",(0,t.jsx)("span",{className:"font-mono",children:l})]}):null,d?(0,t.jsx)("div",{className:"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]",children:d}):null,c?(0,t.jsxs)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px]",children:[(0,t.jsx)("div",{className:"text-[color:var(--ck-text-tertiary)]",children:"Outbound"}),(0,t.jsx)("pre",{className:"mt-1 overflow-auto whitespace-pre-wrap",children:JSON.stringify(c,null,2)})]}):null]}),m?(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"approval note (optional)"}),(0,t.jsx)("textarea",{value:$,onChange:e=>E(e.target.value),rows:3,className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"e.g. Ship it / please tweak hook"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:[{action:"approve",label:"Approve"},{action:"request_changes",label:"Request changes"},{action:"cancel",label:"Cancel"}].map(r=>(0,t.jsx)("button",{type:"button",disabled:q,onClick:async()=>{if(S&&g&&confirm(`${r.label} run ${g}?`)){J(!0),U("");try{let t=await fetch("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:S,runId:g,action:r.action,note:$||void 0,decidedBy:"ClawKitchen UI"})}),s=await t.json();if(!t.ok||!s.ok)throw Error(s.error||"Failed to apply approval action");await F(S,g)}catch(e){U((0,i.errorMessage)(e))}finally{J(!1)}}},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:r.label},r.action))})]}):null]})})()]}),(0,t.jsxs)("div",{className:"border-t border-white/10 pt-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Memory used in this run"}),L.length?(0,t.jsx)("div",{className:"mt-2 space-y-2",children:L.slice(0,20).map((e,r)=>(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2",children:[(0,t.jsxs)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:e.ts})," • ",(0,t.jsx)("span",{className:"font-mono",children:e.type})," • ",(0,t.jsx)("span",{className:"font-mono",children:e.author})]}),(0,t.jsx)("div",{className:"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]",children:e.content}),void 0!==e.source?(0,t.jsx)("pre",{className:"mt-2 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px] text-[color:var(--ck-text-secondary)]",children:JSON.stringify(e.source,null,2)}):null]},`${e.ts}-${r}`))}):(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["(None recorded yet.)",(0,t.jsxs)("div",{className:"mt-1",children:["Next step: have the workflow runner write an explicit ",(0,t.jsx)("span",{className:"font-mono",children:"memoryUsed[]"})," list into the run file."]})]})]})]}):g?(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"Loading run…"}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Select a run to see details."})})]})]}):null]},r.id)})})]})}e.s(["default",()=>l])}]);
@@ -1,3 +0,0 @@
1
- @font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/8a480f0b521d4e75-s.8e0177b5.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/7178b3e590c64307-s.b97b3418.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/caa3a2e1cccd8315-s.p.853070df.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Geist Fallback;src:local(Arial);ascent-override:95.94%;descent-override:28.16%;line-gap-override:0.0%;size-adjust:104.76%}.geist_a71539c9-module__T19VSG__className{font-family:Geist,Geist Fallback;font-style:normal}.geist_a71539c9-module__T19VSG__variable{--font-geist-sans:"Geist","Geist Fallback"}
2
- @font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/4fa387ec64143e14-s.c1fdd6c2.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/bbc41e54d2fcbd21-s.799d8ef8.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/797e433ab948586e-s.p.dbea232f.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Geist Mono Fallback;src:local(Arial);ascent-override:74.67%;descent-override:21.92%;line-gap-override:0.0%;size-adjust:134.59%}.geist_mono_8d43a2aa-module__8Li5zG__className{font-family:Geist Mono,Geist Mono Fallback;font-style:normal}.geist_mono_8d43a2aa-module__8Li5zG__variable{--font-geist-mono:"Geist Mono","Geist Mono Fallback"}
3
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--color-red-50:#fef2f2;--color-red-100:#ffe2e2;--color-red-200:#ffcaca;--color-red-300:#ffa3a3;--color-red-400:#ff6568;--color-red-500:#fb2c36;--color-amber-50:#fffbeb;--color-amber-100:#fef3c6;--color-amber-300:#ffd236;--color-amber-400:#fcbb00;--color-amber-500:#f99c00;--color-yellow-100:#fef9c2;--color-yellow-200:#fff085;--color-yellow-400:#fac800;--color-yellow-500:#edb200;--color-emerald-50:#ecfdf5;--color-emerald-100:#d0fae5;--color-emerald-400:#00d294;--color-emerald-500:#00bb7f;--color-emerald-600:#009767;--color-sky-50:#f0f9ff;--color-sky-400:#00bcfe;--color-sky-500:#00a5ef;--color-slate-300:#cad5e2;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-4xl:56rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--radius-md:.375rem;--radius-lg:.5rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-geist-sans);--default-mono-font-family:var(--font-geist-mono)}@supports (color:lab(0% 0 0)){:root,:host{--color-red-50:lab(96.5005% 4.18508 1.52328);--color-red-100:lab(92.243% 10.2865 3.83865);--color-red-200:lab(86.017% 19.8815 7.75869);--color-red-300:lab(76.5514% 36.422 15.5335);--color-red-400:lab(63.7053% 60.745 31.3109);--color-red-500:lab(55.4814% 75.0732 48.8528);--color-amber-50:lab(98.6252% -.635922 8.42309);--color-amber-100:lab(95.916% -1.21653 23.111);--color-amber-300:lab(86.4156% 6.13147 78.3961);--color-amber-400:lab(80.1641% 16.6016 99.2089);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-yellow-100:lab(97.3564% -4.51407 27.344);--color-yellow-200:lab(94.3433% -5.00429 52.9663);--color-yellow-400:lab(83.2664% 8.65132 106.895);--color-yellow-500:lab(76.3898% 14.5258 98.4589);--color-emerald-50:lab(97.8462% -6.94966 1.85487);--color-emerald-100:lab(94.9004% -17.0769 5.63836);--color-emerald-400:lab(75.0771% -60.7313 19.4147);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-emerald-600:lab(55.0481% -49.9246 15.93);--color-sky-50:lab(97.3623% -2.33802 -4.13098);--color-sky-400:lab(70.687% -23.6078 -45.9483);--color-sky-500:lab(63.3038% -18.433 -51.0407);--color-slate-300:lab(84.7652% -1.94535 -7.93337)}}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.top-3{top:calc(var(--spacing)*3)}.top-4{top:calc(var(--spacing)*4)}.right-4{right:calc(var(--spacing)*4)}.left-3{left:calc(var(--spacing)*3)}.-z-10{z-index:calc(10*-1)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[200\]{z-index:200}.z-\[210\]{z-index:210}.z-\[9999\]{z-index:9999}.z-\[10000\]{z-index:10000}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-10{margin-top:calc(var(--spacing)*10)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.size-7{width:calc(var(--spacing)*7);height:calc(var(--spacing)*7)}.h-4{height:calc(var(--spacing)*4)}.h-4\.5{height:calc(var(--spacing)*4.5)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-14{height:calc(var(--spacing)*14)}.h-\[55vh\]{height:55vh}.h-\[70px\]{height:70px}.h-\[70vh\]{height:70vh}.h-\[110px\]{height:110px}.h-\[140px\]{height:140px}.h-\[260px\]{height:260px}.h-\[320px\]{height:320px}.h-\[420px\]{height:420px}.h-\[1200px\]{height:1200px}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-\[60vh\]{max-height:60vh}.max-h-\[140px\]{max-height:140px}.max-h-\[200px\]{max-height:200px}.max-h-\[220px\]{max-height:220px}.max-h-\[260px\]{max-height:260px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-4{width:calc(var(--spacing)*4)}.w-4\.5{width:calc(var(--spacing)*4.5)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-16{width:calc(var(--spacing)*16)}.w-56{width:calc(var(--spacing)*56)}.w-64{width:calc(var(--spacing)*64)}.w-72{width:calc(var(--spacing)*72)}.w-\[44px\]{width:44px}.w-\[260px\]{width:260px}.w-\[320px\]{width:320px}.w-\[380px\]{width:380px}.w-\[2200px\]{width:2200px}.w-dvw{width:100dvw}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-prose{max-width:65ch}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[42px\]{min-width:42px}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x:calc(var(--spacing)*0);--tw-border-spacing-y:calc(var(--spacing)*0);border-spacing:var(--tw-border-spacing-x)var(--tw-border-spacing-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-16px\]{--tw-translate-x:-16px;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*10)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*10)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-3{column-gap:calc(var(--spacing)*3)}.gap-y-1{row-gap:calc(var(--spacing)*1)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-white\/10>:not(:last-child)){border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){:where(.divide-white\/10>:not(:last-child)){border-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[var\(--ck-radius-lg\)\]{border-radius:var(--ck-radius-lg)}.rounded-\[var\(--ck-radius-md\)\]{border-radius:var(--ck-radius-md)}.rounded-\[var\(--ck-radius-sm\)\]{border-radius:var(--ck-radius-sm)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[color\:rgba\(255\,59\,48\,0\.45\)\]{border-color:#ff3b3073}.border-\[color\:var\(--ck-accent-red\)\]{border-color:var(--ck-accent-red)}.border-\[color\:var\(--ck-border-strong\)\]{border-color:var(--ck-border-strong)}.border-\[color\:var\(--ck-border-subtle\)\]{border-color:var(--ck-border-subtle)}.border-\[color\:var\(--ck-toast-border\)\]{border-color:var(--ck-toast-border)}.border-\[var\(--ck-accent-red\)\]{border-color:var(--ck-accent-red)}.border-amber-300\/30{border-color:#ffd2364d}@supports (color:color-mix(in lab, red, red)){.border-amber-300\/30{border-color:color-mix(in oklab,var(--color-amber-300)30%,transparent)}}.border-amber-400\/30{border-color:#fcbb004d}@supports (color:color-mix(in lab, red, red)){.border-amber-400\/30{border-color:color-mix(in oklab,var(--color-amber-400)30%,transparent)}}.border-emerald-400\/30{border-color:#00d2944d}@supports (color:color-mix(in lab, red, red)){.border-emerald-400\/30{border-color:color-mix(in oklab,var(--color-emerald-400)30%,transparent)}}.border-emerald-400\/50{border-color:#00d29480}@supports (color:color-mix(in lab, red, red)){.border-emerald-400\/50{border-color:color-mix(in oklab,var(--color-emerald-400)50%,transparent)}}.border-red-400\/30{border-color:#ff65684d}@supports (color:color-mix(in lab, red, red)){.border-red-400\/30{border-color:color-mix(in oklab,var(--color-red-400)30%,transparent)}}.border-red-400\/50{border-color:#ff656880}@supports (color:color-mix(in lab, red, red)){.border-red-400\/50{border-color:color-mix(in oklab,var(--color-red-400)50%,transparent)}}.border-red-400\/60{border-color:#ff656899}@supports (color:color-mix(in lab, red, red)){.border-red-400\/60{border-color:color-mix(in oklab,var(--color-red-400)60%,transparent)}}.border-sky-400\/30{border-color:#00bcfe4d}@supports (color:color-mix(in lab, red, red)){.border-sky-400\/30{border-color:color-mix(in oklab,var(--color-sky-400)30%,transparent)}}.border-white\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.border-white\/5{border-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.border-white\/15{border-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.border-white\/15{border-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.border-white\/25{border-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.border-white\/25{border-color:color-mix(in oklab,var(--color-white)25%,transparent)}}.border-yellow-400\/30{border-color:#fac8004d}@supports (color:color-mix(in lab, red, red)){.border-yellow-400\/30{border-color:color-mix(in oklab,var(--color-yellow-400)30%,transparent)}}.bg-\[color\:rgba\(255\,59\,48\,0\.08\)\]{background-color:#ff3b3014}.bg-\[color\:var\(--ck-accent\)\]{background-color:var(--ck-accent)}.bg-\[color\:var\(--ck-accent-red\)\]{background-color:var(--ck-accent-red)}.bg-\[color\:var\(--ck-accent-red-soft\)\]{background-color:var(--ck-accent-red-soft)}.bg-\[color\:var\(--ck-bg\)\]{background-color:var(--ck-bg)}.bg-\[color\:var\(--ck-bg-glass\)\]{background-color:var(--ck-bg-glass)}.bg-\[color\:var\(--ck-bg-glass-strong\)\]{background-color:var(--ck-bg-glass-strong)}.bg-\[color\:var\(--ck-toast-bg\)\]{background-color:var(--ck-toast-bg)}.bg-\[var\(--ck-accent-red\)\]{background-color:var(--ck-accent-red)}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.bg-black\/15{background-color:#00000026}@supports (color:color-mix(in lab, red, red)){.bg-black\/15{background-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab, red, red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\/25{background-color:#00000040}@supports (color:color-mix(in lab, red, red)){.bg-black\/25{background-color:color-mix(in oklab,var(--color-black)25%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-sky-500\/10{background-color:#00a5ef1a}@supports (color:color-mix(in lab, red, red)){.bg-sky-500\/10{background-color:color-mix(in oklab,var(--color-sky-500)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.bg-white\/5{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.bg-yellow-500\/10{background-color:#edb2001a}@supports (color:color-mix(in lab, red, red)){.bg-yellow-500\/10{background-color:color-mix(in oklab,var(--color-yellow-500)10%,transparent)}}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-6{padding-block:calc(var(--spacing)*6)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pl-5{padding-left:calc(var(--spacing)*5)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-geist-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.whitespace-normal{white-space:normal}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[color\:var\(--ck-accent-red\)\]{color:var(--ck-accent-red)}.text-\[color\:var\(--ck-text-primary\)\]{color:var(--ck-text-primary)}.text-\[color\:var\(--ck-text-secondary\)\]{color:var(--ck-text-secondary)}.text-\[color\:var\(--ck-text-tertiary\)\]{color:var(--ck-text-tertiary)}.text-\[var\(--ck-accent-red\)\]{color:var(--ck-accent-red)}.text-amber-50{color:var(--color-amber-50)}.text-amber-100{color:var(--color-amber-100)}.text-amber-100\/90{color:#fef3c6e6}@supports (color:color-mix(in lab, red, red)){.text-amber-100\/90{color:color-mix(in oklab,var(--color-amber-100)90%,transparent)}}.text-black{color:var(--color-black)}.text-emerald-50{color:var(--color-emerald-50)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-400{color:var(--color-emerald-400)}.text-red-50{color:var(--color-red-50)}.text-red-100{color:var(--color-red-100)}.text-red-200{color:var(--color-red-200)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-sky-50{color:var(--color-sky-50)}.text-slate-300{color:var(--color-slate-300)}.text-white{color:var(--color-white)}.text-yellow-100{color:var(--color-yellow-100)}.text-yellow-200{color:var(--color-yellow-200)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-white\/20{text-decoration-color:#fff3}@supports (color:color-mix(in lab, red, red)){.decoration-white\/20{-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)20%,transparent);-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)20%,transparent);-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)20%,transparent);text-decoration-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow-\[var\(--ck-shadow-1\)\]{--tw-shadow:var(--ck-shadow-1);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[var\(--ck-shadow-2\)\]{--tw-shadow:var(--ck-shadow-2);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\[var\(--ck-glass-blur\)\]{--tw-backdrop-blur:blur(var(--ck-glass-blur));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.placeholder\:text-\[color\:var\(--ck-text-tertiary\)\]::placeholder{color:var(--ck-text-tertiary)}@media (hover:hover){.hover\:border-\[color\:var\(--ck-border-strong\)\]:hover{border-color:var(--ck-border-strong)}.hover\:bg-\[color\:rgba\(255\,59\,48\,0\.12\)\]:hover{background-color:#ff3b301f}.hover\:bg-\[color\:var\(--ck-accent-red-soft-strong\)\]:hover{background-color:var(--ck-accent-red-soft-strong)}.hover\:bg-\[color\:var\(--ck-bg-glass\)\]:hover{background-color:var(--ck-bg-glass)}.hover\:bg-\[color\:var\(--ck-bg-glass-strong\)\]:hover{background-color:var(--ck-bg-glass-strong)}.hover\:bg-\[var\(--ck-accent-red\)\]\/90:hover{background-color:var(--ck-accent-red)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-\[var\(--ck-accent-red\)\]\/90:hover{background-color:color-mix(in oklab,var(--ck-accent-red)90%,transparent)}}.hover\:bg-\[var\(--ck-accent-red-hover\)\]:hover{background-color:var(--ck-accent-red-hover)}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500)15%,transparent)}}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500)15%,transparent)}}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\:text-\[color\:var\(--ck-accent-red-hover\)\]:hover{color:var(--ck-accent-red-hover)}.hover\:text-\[color\:var\(--ck-text-primary\)\]:hover{color:var(--ck-text-primary)}.hover\:text-\[color\:var\(--ck-text-secondary\)\]:hover{color:var(--ck-text-secondary)}.hover\:no-underline:hover{text-decoration-line:none}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-white\/40:hover{text-decoration-color:#fff6}@supports (color:color-mix(in lab, red, red)){.hover\:decoration-white\/40:hover{-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)40%,transparent);-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)40%,transparent);-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)40%,transparent);text-decoration-color:color-mix(in oklab,var(--color-white)40%,transparent)}}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.focus\:border-\[color\:var\(--ck-border-strong\)\]:focus{border-color:var(--ck-border-strong)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[color\:var\(--ck-border-strong\)\]:focus-visible{--tw-ring-color:var(--ck-border-strong)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-black\/30:focus-visible{--tw-ring-offset-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-offset-black\/30:focus-visible{--tw-ring-offset-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:bg-\[var\(--ck-accent-red-active\)\]:active{background-color:var(--ck-accent-red-active)}.active\:bg-white\/15:active{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.active\:bg-white\/15:active{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.active\:brightness-95:active{--tw-brightness:brightness(95%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:border:disabled{border-style:var(--tw-border-style);border-width:1px}.disabled\:border-\[color\:var\(--ck-border-subtle\)\]:disabled{border-color:var(--ck-border-subtle)}.disabled\:bg-\[color\:var\(--ck-bg-glass\)\]:disabled{background-color:var(--ck-bg-glass)}.disabled\:text-\[color\:var\(--ck-text-tertiary\)\]:disabled{color:var(--ck-text-tertiary)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:opacity-70:disabled{opacity:.7}@media (min-width:40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:items-end{align-items:flex-end}.sm\:items-start{align-items:flex-start}.sm\:justify-between{justify-content:space-between}.sm\:gap-6{gap:calc(var(--spacing)*6)}.sm\:p-6{padding:calc(var(--spacing)*6)}.sm\:p-8{padding:calc(var(--spacing)*8)}.sm\:p-10{padding:calc(var(--spacing)*10)}}@media (min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:p-6{padding:calc(var(--spacing)*6)}}@media (min-width:64rem){.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.dark\:bg-black\/90{background-color:#000000e6}@supports (color:color-mix(in lab, red, red)){.dark\:bg-black\/90{background-color:color-mix(in oklab,var(--color-black)90%,transparent)}}}}:root{--ck-bg-base:#f6f7fb;--ck-bg-glass:#ffffffb3;--ck-bg-glass-strong:#ffffffdb;--ck-toast-bg:#fffffff0;--ck-toast-border:#0a0c1029;--ck-border-subtle:#0a0c101a;--ck-border-strong:#0a0c1029;--ck-text-primary:#0a0c10eb;--ck-text-secondary:#0a0c10a3;--ck-text-tertiary:#0a0c107a;--ck-accent-red:#ff3b30;--ck-accent-red-hover:#ff5a52;--ck-accent-red-active:#e6372d;--ck-focus-ring:#ff3b308c;--ck-radius-sm:10px;--ck-radius-md:14px;--ck-radius-lg:18px;--ck-shadow-1:0 10px 30px #0a0c101f;--ck-shadow-2:0 18px 50px #0a0c102e;--ck-glass-blur:18px;--ck-glass-saturation:1.15;--background:var(--ck-bg-base);--foreground:var(--ck-text-primary)}[data-theme=dark]{--ck-bg-base:#0b0c10;--ck-bg-glass:#18191fb8;--ck-bg-glass-strong:#18191fe0;--ck-toast-bg:#18191feb;--ck-toast-border:#ffffff2e;--ck-border-subtle:#ffffff1a;--ck-border-strong:#ffffff29;--ck-text-primary:#ffffffeb;--ck-text-secondary:#ffffffa8;--ck-text-tertiary:#ffffff80;--ck-focus-ring:#ff3b30b3;--ck-shadow-1:0 10px 30px #00000059;--ck-shadow-2:0 18px 50px #00000073;--ck-glass-saturation:1.25}html,body{height:100%}body{background:var(--ck-bg-base);color:var(--ck-text-primary);font-family:var(--font-geist-sans),system-ui,-apple-system,Segoe UI,Roboto,Arial,Helvetica,sans-serif}body:before{content:"";z-index:-1;background:radial-gradient(1200px 700px at 20% 15%,#ff3b301a,#0000 60%),radial-gradient(900px 600px at 75% 25%,#0a0c100d,#0000 55%),radial-gradient(1100px 700px at 55% 80%,#788cff1a,#0000 60%),linear-gradient(#ffffff8c,#fff0);position:fixed;inset:0}[data-theme=dark] body:before{background:radial-gradient(1200px 700px at 20% 15%,#ff3b3024,#0000 60%),radial-gradient(900px 600px at 75% 25%,#ffffff14,#0000 55%),radial-gradient(1100px 700px at 55% 80%,#788cff1a,#0000 60%),linear-gradient(#ffffff05,#0000)}:where(a,button,input,textarea,select,summary,[role=button],[tabindex]):focus-visible{outline:2px solid var(--ck-focus-ring);outline-offset:2px}.ck-glass{background:var(--ck-bg-glass);border:1px solid var(--ck-border-subtle);border-radius:var(--ck-radius-md);box-shadow:var(--ck-shadow-1);transition:background-color .16s ease-out,box-shadow .18s ease-out,border-color .16s ease-out}@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.ck-glass{-webkit-backdrop-filter:blur(var(--ck-glass-blur))saturate(var(--ck-glass-saturation));backdrop-filter:blur(var(--ck-glass-blur))saturate(var(--ck-glass-saturation))}}.ck-glass-strong{background:var(--ck-bg-glass-strong);border:1px solid var(--ck-border-strong);border-radius:var(--ck-radius-md);box-shadow:var(--ck-shadow-2);transition:background-color .16s ease-out,box-shadow .18s ease-out,border-color .16s ease-out}@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.ck-glass-strong{-webkit-backdrop-filter:blur(calc(var(--ck-glass-blur) + 4px))saturate(var(--ck-glass-saturation));backdrop-filter:blur(calc(var(--ck-glass-blur) + 4px))saturate(var(--ck-glass-saturation))}}@property --tw-border-spacing-x{syntax:"<length>";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"<length>";inherits:false;initial-value:0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}