@jiggai/kitchen 0.5.10 → 0.5.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 (112) 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 +3 -3
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  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/channels/page_client-reference-manifest.js +1 -1
  22. package/.next/server/app/channels.html +2 -2
  23. package/.next/server/app/channels.rsc +3 -3
  24. package/.next/server/app/channels.segments/_full.segment.rsc +3 -3
  25. package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
  26. package/.next/server/app/channels.segments/_index.segment.rsc +2 -2
  27. package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
  28. package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +1 -1
  29. package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
  30. package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
  31. package/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  32. package/.next/server/app/goals/new/page_client-reference-manifest.js +1 -1
  33. package/.next/server/app/goals/new.html +2 -2
  34. package/.next/server/app/goals/new.rsc +3 -3
  35. package/.next/server/app/goals/new.segments/_full.segment.rsc +3 -3
  36. package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
  37. package/.next/server/app/goals/new.segments/_index.segment.rsc +2 -2
  38. package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
  39. package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +1 -1
  40. package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
  41. package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
  42. package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  43. package/.next/server/app/goals.html +1 -1
  44. package/.next/server/app/goals.rsc +3 -3
  45. package/.next/server/app/goals.segments/_full.segment.rsc +3 -3
  46. package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
  47. package/.next/server/app/goals.segments/_index.segment.rsc +2 -2
  48. package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
  49. package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +1 -1
  50. package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
  51. package/.next/server/app/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/recipes/[id]/page_client-reference-manifest.js +1 -1
  53. package/.next/server/app/recipes/page_client-reference-manifest.js +1 -1
  54. package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  56. package/.next/server/app/settings.html +1 -1
  57. package/.next/server/app/settings.rsc +3 -3
  58. package/.next/server/app/settings.segments/_full.segment.rsc +3 -3
  59. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  60. package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  61. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  62. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  63. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  64. package/.next/server/app/teams/[teamId]/deliverables/page_client-reference-manifest.js +1 -1
  65. package/.next/server/app/teams/[teamId]/page.js.nft.json +1 -1
  66. package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
  67. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page_client-reference-manifest.js +1 -1
  68. package/.next/server/app/teams/[teamId]/runs/page_client-reference-manifest.js +1 -1
  69. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  70. package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +1 -1
  71. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -1
  72. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -1
  74. package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +1 -1
  75. package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  76. package/.next/server/app/tickets/page_client-reference-manifest.js +1 -1
  77. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js +1 -1
  78. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js.map +1 -1
  79. package/.next/server/chunks/ssr/[root-of-the-server]__7af8e528._.js +9 -0
  80. package/.next/server/chunks/ssr/[root-of-the-server]__7af8e528._.js.map +1 -0
  81. package/.next/server/chunks/ssr/_15bc566e._.js +9 -0
  82. package/.next/server/chunks/ssr/_15bc566e._.js.map +1 -0
  83. package/.next/server/chunks/ssr/{_835573ec._.js → _3d6d3f59._.js} +8 -2
  84. package/.next/server/chunks/ssr/_3d6d3f59._.js.map +1 -0
  85. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +1 -7
  86. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -1
  87. package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js +1 -1
  88. package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js.map +1 -1
  89. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js +1 -1
  90. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js.map +1 -1
  91. package/.next/server/pages/404.html +1 -1
  92. package/.next/server/pages/500.html +2 -2
  93. package/.next/server/server-reference-manifest.js +1 -1
  94. package/.next/server/server-reference-manifest.json +1 -1
  95. package/.next/static/chunks/2a86fa0c3d9177c5.js +7 -0
  96. package/.next/static/chunks/4a57b795d958b061.js +1 -0
  97. package/.next/static/chunks/67a9a9a3c6dd4aa4.js +7 -0
  98. package/.next/static/chunks/a683f58aaf4f41e9.css +3 -0
  99. package/.next/static/chunks/{212477db59154fa7.js → b641409c1c9d8c3e.js} +3 -3
  100. package/.next/static/chunks/{fac5526bd312cf6e.js → b8722104d0ceb74d.js} +9 -3
  101. package/openclaw.plugin.json +1 -1
  102. package/package.json +1 -1
  103. package/.next/server/chunks/ssr/[root-of-the-server]__cb91405c._.js +0 -3
  104. package/.next/server/chunks/ssr/[root-of-the-server]__cb91405c._.js.map +0 -1
  105. package/.next/server/chunks/ssr/_835573ec._.js.map +0 -1
  106. package/.next/static/chunks/24ac17715eb2614d.js +0 -1
  107. package/.next/static/chunks/8b99ae14a606b607.css +0 -3
  108. package/.next/static/chunks/d593ea5e91e81b45.js +0 -1
  109. package/.next/static/chunks/ff661b5e599f8d74.js +0 -7
  110. /package/.next/static/{3JkH3_7LqC0wr-k7JoZl9 → LRt6kweldrLHTF1HgLgu2}/_buildManifest.js +0 -0
  111. /package/.next/static/{3JkH3_7LqC0wr-k7JoZl9 → LRt6kweldrLHTF1HgLgu2}/_clientMiddlewareManifest.json +0 -0
  112. /package/.next/static/{3JkH3_7LqC0wr-k7JoZl9 → LRt6kweldrLHTF1HgLgu2}/_ssgManifest.js +0 -0
@@ -1,3 +1,9 @@
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(18050),r=e.i(74080);function a({open:e,onClose:a,title:s,children:i,error:o,confirmLabel:l,confirmBusyLabel:n,onConfirm:d,confirmDisabled:c,busy:m,confirmButtonClassName:u}){if(!e)return null;let x=m??!1,h=x&&n?n:l,p="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:a,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":p,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-soft)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("h2",{id:p,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:s}),i,o?(0,t.jsx)("div",{className:"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:o}):null,(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:a,className:"rounded-lg 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:(c??!1)||x,onClick:d,className:u??"rounded-lg 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:h})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>a])},54510,e=>{"use strict";var t=e.i(18050),r=e.i(44355);function a({open:e,onClose:a,title:s,entityLabel:i,bodyText:o,onConfirm:l,busy:n,error:d}){return(0,t.jsx)(r.ConfirmationModal,{open:e,onClose:a,title:s,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:l,busy:n,error:d??void 0,children:(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[s," ",(0,t.jsx)("code",{className:"font-mono",children:i}),"? ",o]})})}function s(e){return function(r){let s=r[e.entityLabelKey];return(0,t.jsx)(a,{open:r.open,onClose:r.onClose,title:e.title,entityLabel:s,bodyText:e.bodyText,onConfirm:r.onConfirm,busy:r.busy,error:r.error})}}let i=s({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),o=s({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),l=s({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),n=s({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,i,"DeleteCronJobModal",0,n,"DeleteRecipeModal",0,l,"DeleteTeamModal",0,o],54510)},55613,e=>{"use strict";var t=e.i(18050),r=e.i(74080);function a({open:e,onClose:a,title:s,children:i,size:o="md",hideTitle:l=!1}){if(!e)return null;let n="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:a,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":n,children:(0,t.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,t.jsxs)("div",{className:`w-full ${{sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-6xl"}[o]} rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-6 shadow-[var(--ck-shadow-2)]`,children:[l?(0,t.jsx)("h2",{id:n,className:"sr-only",children:s}):(0,t.jsx)("h2",{id:n,className:"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4",children:s}),i]})})})]}),document.body)}e.s(["Modal",()=>a])},88810,72532,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(18566),s=e.i(82310),i=e.i(42771),o=e.i(54510);function l({title:e,files:r,loading:a,showOptionalFiles:s,onShowOptionalChange:i,selectedFileName:o,onSelectFile:l,renderItemExtra:n}){let d=s?r:r.filter(e=>e.required||!e.missing);return(0,t.jsxs)("div",{className:"ck-card 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:s,onChange:e=>i(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:[a?(0,t.jsx)("li",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"Loading…"}):null,d.map(e=>{var r;let a;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,a="w-full rounded-lg px-3 py-2 text-left text-sm",o===r?`${a} bg-white/10 text-[color:var(--ck-text-primary)]`:`${a} 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)})]})]})}function n({name:e,emoji:r,theme:a,avatar:s,saving:i,returnTo:o,onNameChange:l,onEmojiChange:n,onThemeChange:d,onAvatarChange:c,onSave:m,router:u}){return(0,t.jsxs)("div",{className:"ck-card p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Identity"}),(0,t.jsx)("label",{className:"mt-3 block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Name"}),(0,t.jsx)("input",{value:e,onChange:e=>l(e.target.value),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),(0,t.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Emoji"}),(0,t.jsx)("input",{value:r,onChange:e=>n(e.target.value),placeholder:"🦞",className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Theme"}),(0,t.jsx)("input",{value:a,onChange:e=>d(e.target.value),placeholder:"warm, sharp, calm",className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Avatar"}),(0,t.jsx)("input",{value:s,onChange:e=>c(e.target.value),placeholder:"avatars/openclaw.png",className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,t.jsxs)("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row",children:[(0,t.jsx)("button",{disabled:i,onClick:m,className:"rounded-lg 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)] active:bg-[var(--ck-accent-red-active)] disabled:opacity-50",children:i?"Saving…":"Save"}),o?(0,t.jsx)("button",{disabled:i,onClick:async()=>{await m(),u.push(o)},className:"rounded-lg 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)] transition-colors hover:bg-white/10 active:bg-white/15 disabled:opacity-50",children:"Save & return"}):null]})]})}function d({model:e,saving:r,onModelChange:a,onSave:s}){return(0,t.jsxs)("div",{className:"ck-card p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Config"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"Thin slice: edit the configured model id for this agent (writes to OpenClaw config)."}),(0,t.jsx)("label",{className:"mt-3 block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Model"}),(0,t.jsx)("input",{value:e,onChange:e=>a(e.target.value),placeholder:"openai/gpt-5.2",className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)("button",{disabled:r,onClick:s,className:"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:r?"Saving…":"Save config"})})]})}function c({agentId:e,skillsList:r,availableSkills:a,skillsLoading:s,selectedSkill:i,installingSkill:o,skillError:l,skillMsg:n,onSelectedSkillChange:d,onInstallSkill:c}){return(0,t.jsxs)("div",{className:"ck-card p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Skills"}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:["Skills installed in this ",(0,t.jsx)("strong",{children:"agent"})," workspace (",(0,t.jsx)("code",{children:"skills/"}),"). If you want a skill available to all agents, add it at the team level."]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Installed"}),(0,t.jsxs)("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-[color:var(--ck-text-secondary)]",children:[s&&(0,t.jsx)("li",{children:"Loading…"}),!s&&r.length>0&&r.map(e=>(0,t.jsx)("li",{children:e},e)),!s&&!r.length&&(0,t.jsx)("li",{children:"None installed."})]})]}),(0,t.jsxs)("div",{className:"mt-5 rounded-lg border border-white/10 bg-white/5 p-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Add a skill"}),(0,t.jsxs)("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,t.jsx)("select",{value:i,onChange:e=>d(e.target.value),className:"w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]",disabled:o||!a.length,children:a.length?a.map(e=>(0,t.jsx)("option",{value:e,children:e},e)):(0,t.jsx)("option",{value:"",children:"No skills found"})}),(0,t.jsx)("button",{type:"button",disabled:o||!i,onClick:()=>void c(),className:"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:o?"Adding…":"Add"})]}),l&&(0,t.jsx)("div",{className:"mt-3 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:l}),!l&&n&&(0,t.jsx)("div",{className:"mt-3 rounded-lg border border-emerald-400/30 bg-emerald-500/10 p-3 text-sm text-emerald-100",children:n}),(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["This uses ",(0,t.jsxs)("code",{children:["openclaw recipes install-skill <skill> --agent-id ",e," --yes"]}),"."]})]})]})}function m({agentFiles:e,agentFilesLoading:r,showOptionalFiles:a,fileName:s,fileContent:i,loadingFile:o,saving:n,fileError:d,onShowOptionalChange:c,onLoadFile:m,onFileContentChange:u,onSaveFile:x,onCreateMissingFile:h}){return(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,t.jsx)(l,{title:"Agent files",files:e,loading:r,showOptionalFiles:a,onShowOptionalChange:c,selectedFileName:s,onSelectFile:m,renderItemExtra:e=>e.missing?(0,t.jsx)("button",{type:"button",disabled:n,onClick:()=>void h(e.name),className:"shrink-0 rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-50",children:"Create"}):null}),(0,t.jsxs)("div",{className:"ck-card p-4 lg:col-span-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:["Edit: ",s]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("span",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Loading…"}):null,(0,t.jsx)("button",{disabled:n,onClick:x,className:"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:n?"Saving…":"Save file"})]})]}),d?(0,t.jsx)("div",{className:"mt-3 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:d}):null,(0,t.jsx)("textarea",{value:i,onChange:e=>u(e.target.value),className:"mt-3 h-[55vh] w-full resize-none rounded-lg border border-white/10 bg-white/5 p-3 font-mono text-xs text-[color:var(--ck-text-primary)]",spellCheck:!1})]})]})}async function u(e,t){t.setAgentFilesLoading(!0),t.setSkillsLoading(!0);try{let[r,a,s]=await (0,i.fetchAll)([`/api/agents/files?agentId=${encodeURIComponent(e)}`,`/api/agents/skills?agentId=${encodeURIComponent(e)}`,"/api/skills/available"]),o=[];try{let e=await r.json();if(r.ok&&e.ok){let r=Array.isArray(e.files)?e.files:[];t.setAgentFiles(r.map(e=>({name:String(e.name??""),missing:!!e.missing,required:!!e.required,rationale:"string"==typeof e.rationale?e.rationale:void 0})))}}catch{}try{let e=await a.json();a.ok&&e.ok&&(o=Array.isArray(e.skills)?e.skills:[],t.setSkillsList(o))}catch{}try{let e=await s.json();if(s.ok&&e.ok){let r=Array.isArray(e.skills)?e.skills:[];t.setAvailableSkills(r);let a=r.find(e=>!o.includes(e));t.setSelectedSkill(a??r[0]??"")}}catch{}}finally{t.setAgentFilesLoading(!1),t.setSkillsLoading(!1)}}function x({agentId:e,returnTo:l,onClose:x}){let h=(0,a.useRouter)(),[p,f]=(0,r.useState)(null),[g,v]=(0,r.useState)(!0),[b,w]=(0,r.useState)(!1),[y,j]=(0,r.useState)(!1),[k,N]=(0,r.useState)(""),[S,C]=(0,r.useState)(""),[I,E]=(0,r.useState)(""),[P,A]=(0,r.useState)(""),[_,R]=(0,r.useState)(!1),[O,M]=(0,r.useState)(!1),[$,T]=(0,r.useState)(null),[L,U]=(0,r.useState)("identity"),[D,F]=(0,r.useState)(""),[z,B]=(0,r.useState)(""),[q,J]=(0,r.useState)(""),[W,G]=(0,r.useState)(""),[K,H]=(0,r.useState)(""),[V,X]=(0,r.useState)([]),[Y,Q]=(0,r.useState)([]),[Z,ee]=(0,r.useState)(!1),[et,er]=(0,r.useState)(""),[ea,es]=(0,r.useState)(!1),[ei,eo]=(0,r.useState)([]),[el,en]=(0,r.useState)(!1),[ed,ec]=(0,r.useState)(!1),[em,eu]=(0,r.useState)("SOUL.md"),[ex,eh]=(0,r.useState)(""),ep=e.includes("-")?e.split("-").slice(0,-1).join("-"):"";async function ef(e){w(!0),N("");try{let t=await e();N(t)}catch(e){N((0,s.errorMessage)(e))}finally{w(!1)}}async function eg(){await ef(async()=>(await (0,i.fetchJson)("/api/agents/identity",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,name:D,emoji:z,theme:q,avatar:W})}),"Saved identity via openclaw agents set-identity"))}async function ev(){await ef(async()=>(await (0,i.fetchJson)("/api/agents/update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,patch:{model:K}})}),"Saved agent config (model) and restarted gateway"))}async function eb(t){eu(t),eh(""),j(!0),C("");try{let r=await (0,i.fetchJson)(`/api/agents/file?agentId=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`,{cache:"no-store"});if(!r.ok)throw Error("Failed to load file");eh(String(r.content??""))}catch(e){C((0,s.errorMessage)(e))}finally{j(!1)}}async function ew(){w(!0),C("");try{if(!(await (0,i.fetchJson)("/api/agents/file",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,name:em,content:ex})})).ok)throw Error("Failed to save file");try{let t=await (0,i.fetchJson)(`/api/agents/files?agentId=${encodeURIComponent(e)}`,{cache:"no-store"});t.ok&&Array.isArray(t.files)&&eo(t.files)}catch{}}catch(e){C((0,s.errorMessage)(e))}finally{w(!1)}}async function ey(e){eu(e),C(""),eh(function(e){switch(e){case"SOUL.md":return"# SOUL.md\n\n";case"AGENTS.md":return"# AGENTS.md\n\n";case"TOOLS.md":return"# TOOLS.md\n\n";case"STATUS.md":return"# STATUS.md\n\n- (empty)\n";case"NOTES.md":return"# NOTES.md\n\n- (empty)\n";case"IDENTITY.md":return"# IDENTITY.md\n\n- **Name:**\n- **Creature:**\n- **Vibe:**\n- **Emoji:**\n- **Avatar:**\n";case"USER.md":return"# USER.md\n\n";case"HEARTBEAT.md":return"# HEARTBEAT.md\n\n# Keep this file empty (or with only comments) to skip heartbeat API calls.\n";default:return""}}(e)),await ew()}async function ej(){M(!0),T(null),N("");try{await (0,i.fetchJson)(`/api/agents/${encodeURIComponent(e)}`,{method:"DELETE"}),window.location.href="/"}catch(e){T((0,s.errorMessage)(e)),M(!1)}}return(0,r.useEffect)(()=>{(async()=>{v(!0),N("");try{let t=await (0,i.fetchJson)("/api/agents",{cache:"no-store"}),r=(Array.isArray(t.agents)?t.agents:[]).find(t=>t.id===e)??null;f(r),F(r?.identityName??""),H(r?.model??""),v(!1),u(e,{setAgentFiles:eo,setSkillsList:X,setAvailableSkills:Q,setSelectedSkill:er,setAgentFilesLoading:en,setSkillsLoading:ee})}catch(e){N((0,s.errorMessage)(e))}finally{v(!1)}})()},[e]),(0,r.useEffect)(()=>{if("files"!==L||!ei.length)return;let e=ei.some(e=>e.name===em),t=ei[0]?.name,r=e?em:t;r&&(r!==em&&(eu(r),eh("")),ex||eb(r))},[L,e,ei.length]),g?(0,t.jsx)("div",{className:"w-full",children:"Loading…"}):p?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[x?(0,t.jsx)("button",{type:"button",onClick:x,className:"text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]",title:"Close",children:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-5 w-5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,t.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})})}):null,(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:p.identityName||p.id}),(0,t.jsxs)("p",{className:"mt-1 text-sm font-mono text-[color:var(--ck-text-tertiary)]",children:[p.id,p.isDefault?" · default":"",p.model?` \xb7 ${p.model}`:""]})]})]}),(0,t.jsx)("button",{type:"button",disabled:b,onClick:()=>{T(null),R(!0)},className:"rounded-lg border border-[color:rgba(255,59,48,0.45)] bg-[color:rgba(255,59,48,0.08)] px-3 py-2 text-sm font-medium text-[color:var(--ck-accent-red)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)] disabled:opacity-50",children:"Delete agent"})]}),p.workspace?(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:["Workspace: ",p.workspace]}):null,ep?(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:["Team: ",ep]}):null,k?(0,t.jsx)("div",{className:"mt-4 rounded-lg border border-white/10 bg-white/5 p-3 text-sm text-[color:var(--ck-text-primary)]",children:k}):null,(0,t.jsx)("div",{className:"mt-6 flex flex-wrap gap-2",children:[{id:"identity",label:"Identity"},{id:"config",label:"Config"},{id:"skills",label:"Skills"},{id:"files",label:"Files"}].map(e=>(0,t.jsx)("button",{onClick:()=>U(e.id),className:L===e.id?"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)]":"rounded-lg 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",children:e.label},e.id))}),(0,t.jsxs)("div",{className:"mt-6 grid grid-cols-1 gap-4",children:["identity"===L&&(0,t.jsx)(n,{name:D,emoji:z,theme:q,avatar:W,saving:b,returnTo:l,onNameChange:F,onEmojiChange:B,onThemeChange:J,onAvatarChange:G,onSave:eg,router:h}),"config"===L&&(0,t.jsx)(d,{model:K,saving:b,onModelChange:H,onSave:ev}),"skills"===L&&(0,t.jsx)(c,{agentId:e,skillsList:V,availableSkills:Y,skillsLoading:Z,selectedSkill:et,installingSkill:ea,skillError:P,skillMsg:I,onSelectedSkillChange:er,onInstallSkill:async()=>{es(!0),E(""),A("");try{await (0,i.fetchJson)("/api/agents/skills/install",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,skill:et})}),E(`Installed skill: ${et}`);try{let t=await (0,i.fetchJson)(`/api/agents/skills?agentId=${encodeURIComponent(e)}`,{cache:"no-store"});t.ok&&Array.isArray(t.skills)&&X(t.skills)}catch{}}catch(e){A((0,s.errorMessage)(e))}finally{es(!1)}}}),"files"===L&&(0,t.jsx)(m,{agentFiles:ei,agentFilesLoading:el,showOptionalFiles:ed,fileName:em,fileContent:ex,loadingFile:y,saving:b,fileError:S,onShowOptionalChange:ec,onLoadFile:eb,onFileContentChange:eh,onSaveFile:ew,onCreateMissingFile:ey})]}),(0,t.jsx)(o.DeleteAgentModal,{open:_,agentId:e,busy:O,error:$,onClose:()=>R(!1),onConfirm:()=>void ej()})]}):(0,t.jsxs)("div",{className:"w-full",children:["Agent not found: ",e]})}e.s(["FileListWithOptionalToggle",()=>l],72532),e.s(["default",()=>x],88810)},92140,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(22016),s=e.i(18566),i=e.i(42771),o=e.i(82310),l=e.i(44355);function n(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function d({teamId:e,llmTaskEnabled:d}){let c=(0,s.useRouter)(),[m,u]=(0,r.useState)([]),[x,h]=(0,r.useState)(!0),[p,f]=(0,r.useState)(!1),[g,v]=(0,r.useState)(""),[b,w]=(0,r.useState)(""),[y,j]=(0,r.useState)({}),[k,N]=(0,r.useState)({}),[S,C]=(0,r.useState)(""),[I,E]=(0,r.useState)(""),[P,A]=(0,r.useState)(null),[_,R]=(0,r.useState)(""),[O,M]=(0,r.useState)(""),[$,T]=(0,r.useState)(!1),[L,U]=(0,r.useState)(""),[D,F]=(0,r.useState)(""),[z,B]=(0,r.useState)([]),[q,J]=(0,r.useState)(""),W=(0,r.useCallback)(async t=>{U(t),J("");try{let r=await (0,i.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`,{cache:"no-store"});if(!r.ok||!r.workflow)throw Error(r.error||"Failed to load workflow");let a=r.workflow,s=n(a.meta)?a.meta:{};if(!0!==s.skipCronCheck){let e=Array.isArray(a.nodes)?a.nodes:[],r=Array.from(new Set(e.filter(e=>e.type&&!["start","end","human_approval"].includes(String(e.type))).map(e=>{let t=n(e.config)?e.config:{};return String(t.agentId??"").trim()}).filter(Boolean))),s=await (0,i.fetchJson)("/api/cron/jobs",{cache:"no-store"});if(!s.ok)throw Error(s.error||"Failed to load cron jobs");let o=Array.isArray(s.jobs)?s.jobs:[],l={};for(let e of o){if(!e||!e.enabled)continue;let t=String(e.name??""),r=String(e.payload?.message??"");if(!(t.startsWith("workflow-worker:")||r.includes("worker-tick")))continue;let a=t.match(/^workflow-worker:[^:]+:(.+)$/);if(a?.[1]){l[a[1]]=!0;continue}let s=r.match(/--agent-id\s+(\S+)/);s?.[1]&&(l[s[1]]=!0)}let d=r.filter(e=>!l[e]);if(d.length){B(d),F(t);return}}let o=await (0,i.fetchJson)("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:t,mode:"run_now"})});if(!o.ok)throw Error(o.error||"Failed to create run");let l=String(o.runId??"").trim();l?c.push(`/teams/${encodeURIComponent(e)}/runs/${encodeURIComponent(t)}/${encodeURIComponent(l)}`):w(t)}catch(e){B([]),F(""),J((0,o.errorMessage)(e))}finally{U("")}},[e,c]),G=(0,r.useCallback)(async t=>{let r=!!t?.quiet;v(""),r||h(!0);try{let t=await (0,i.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);u(r.map(e=>({id:e,name:e})))}catch(e){v((0,o.errorMessage)(e))}finally{r||h(!1)}},[e]);async function K(){f(!0);try{await G({quiet:!0})}finally{f(!1)}}async function H(t){if(confirm(`Delete workflow “${t}”? This removes the .workflow.json file from the team workspace.`)){v("");try{let r=await (0,i.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`,{method:"DELETE"});if(!r.ok)throw Error(r.error||"Failed to delete workflow");await G({quiet:!0}),b===t&&(w(""),C(""),A(null))}catch(e){v((0,o.errorMessage)(e))}}}async function V(t){N(e=>({...e,[t]:!0})),R("");try{let r=await (0,i.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 a=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):[];j(e=>({...e,[t]:a}))}catch(e){R((0,o.errorMessage)(e)),j(e=>({...e,[t]:[]}))}finally{N(e=>({...e,[t]:!1}))}}async function X(t,r){E(t),C(r),A(null),R(""),M("");try{let a=await (0,i.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}&runId=${encodeURIComponent(r)}`,{cache:"no-store"});if(!a.ok)throw Error(a.error||"Failed to load run");let s=n(a.run)?a.run:null;if(!s)throw Error("Invalid run format");A({id:String(s.id??r),status:"string"==typeof s.status?s.status:void 0,startedAt:"string"==typeof s.startedAt?s.startedAt:void 0,finishedAt:"string"==typeof s.finishedAt?String(s.finishedAt):void 0,meta:s.meta,memoryUsed:s.memoryUsed,approval:s.approval,raw:s})}catch(e){R((0,o.errorMessage)(e)),A(null)}}async function Y(t){if(confirm(`Add workflow from template “${t}”?`)){v("");try{let r=await (0,i.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 a=String(r.workflowId??"").trim();if(!a)throw Error("Template applied but workflowId missing");await G({quiet:!0}),c.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(a)}`)}catch(e){v((0,o.errorMessage)(e))}}}(0,r.useEffect)(()=>{G()},[G]);let Q=(0,r.useMemo)(()=>{if(!P)return[];let e=P.memoryUsed??(n(P.meta)?P.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):[]},[P]);if(x)return(0,t.jsx)("div",{className:"ck-card p-4",children:"Loading workflows…"});let Z=!1===d?(0,t.jsxs)("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/10 p-4 text-sm",children:[(0,t.jsx)("div",{className:"font-medium text-amber-200",children:"LLM support is not enabled"}),(0,t.jsxs)("div",{className:"mt-1 text-[color:var(--ck-text-secondary)]",children:["Workflow LLM nodes require the optional built-in ",(0,t.jsx)("code",{className:"px-1",children:"llm-task"})," plugin."]}),(0,t.jsxs)("div",{className:"mt-2 text-[color:var(--ck-text-secondary)]",children:["Enable it with: ",(0,t.jsx)("code",{className:"px-1",children:"openclaw plugins enable llm-task"})," then run"," ",(0,t.jsx)("code",{className:"px-1",children:"openclaw gateway restart"}),"."]}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"If you’re doing a non-interactive install, keep this command in your setup docs as a fallback."})]}):null;return(0,t.jsxs)("div",{className:"ck-card 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."]}),Z,(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()}`;c.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(t)}?draft=1`)},className:"rounded-lg 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 Y("marketing-cadence-v1"),className:"rounded-lg 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:K,disabled:p,className:"rounded-lg 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"})]})]}),g?(0,t.jsx)("div",{className:"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-4 text-sm text-red-100",children:g}):null,q?(0,t.jsx)("div",{className:"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-4 text-sm text-red-100",children:q}):null,(0,t.jsx)(l.ConfirmationModal,{open:!!D,title:"Worker crons not set up",confirmLabel:"Edit workflow",onClose:()=>{F(""),B([])},onConfirm:()=>{F(""),B([]),D&&c.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(D)}`)},children:(0,t.jsxs)("div",{className:"space-y-2 text-sm text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("p",{children:"This workflow can’t run because worker cron jobs aren’t installed for the required agents. Open the workflow editor to install them, or choose to skip the cron check (once or permanently) from the same screen."}),z.length?(0,t.jsxs)("div",{className:"rounded-lg border border-white/10 bg-white/5 p-2 font-mono text-[11px] text-[color:var(--ck-text-primary)]",children:["Missing for: ",z.join(", ")]}):null]})}),0===m.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-lg border border-white/10",children:m.map(r=>{let s=b===r.id,i=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=s?"":r.id;w(e),C(""),A(null),R(""),e&&await V(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 ",s?"collapse":"expand"," run details"]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)("button",{type:"button",disabled:L===r.id,onClick:()=>void W(r.id),className:"rounded-lg border border-emerald-400/30 bg-emerald-500/10 px-3 py-1.5 text-sm font-medium text-emerald-50 transition-colors hover:bg-emerald-500/15 disabled:opacity-60",title:"Enqueue a run for this workflow",children:L===r.id?"Starting…":"Run"}),(0,t.jsx)(a.default,{href:`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(r.id)}`,className:"rounded-lg 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 H(r.id),className:"rounded-lg 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"})]})]}),s?(0,t.jsxs)("div",{className:"border-t border-white/10 bg-white/5 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 V(r.id),className:"rounded-lg 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"})]}),_?(0,t.jsx)("div",{className:"mt-2 rounded-lg border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:_}):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-lg border border-white/10 bg-white/5 p-2",children:i.length?(0,t.jsx)("div",{className:"space-y-1",children:i.slice(0,8).map(e=>{let a=S===e;return(0,t.jsx)("button",{type:"button",onClick:()=>void X(r.id,e),className:a?"w-full rounded-lg bg-white/10 px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-primary)]":"w-full rounded-lg 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-lg border border-white/10 bg-white/5 p-3",children:P?(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:P.id}),P.status?(0,t.jsxs)("span",{children:[" • ",P.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=P.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 a=String(r.state??"").trim(),s="string"==typeof r.requestedAt?r.requestedAt:"",i="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"===a||"waiting_for_approval"===P.status;return(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-white/10 bg-white/5 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:a||"(unknown)"})]}),s?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"requestedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:s})]}):null,i?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"decidedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:i})]}):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-lg 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-lg border border-white/10 bg-white/5 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:O,onChange:e=>M(e.target.value),rows:3,className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 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:$,onClick:async()=>{if(I&&S&&confirm(`${r.label} run ${S}?`)){T(!0),R("");try{let t=await fetch("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:I,runId:S,action:r.action,note:O||void 0,decidedBy:"ClawKitchen UI"})}),a=await t.json();if(!t.ok||!a.ok)throw Error(a.error||"Failed to apply approval action");await X(I,S)}catch(e){R((0,o.errorMessage)(e))}finally{T(!1)}}},className:"rounded-lg 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"}),Q.length?(0,t.jsx)("div",{className:"mt-2 space-y-2",children:Q.slice(0,20).map((e,r)=>(0,t.jsxs)("div",{className:"rounded-lg border border-white/10 bg-white/5 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-lg 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."]})]})]})]}):S?(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",()=>d])},88143,(e,t,r)=>{"use strict";function a({widthInt:e,heightInt:t,blurWidth:r,blurHeight:a,blurDataURL:s,objectFit:i}){let o=r?40*r:e,l=a?40*a:t,n=o&&l?`viewBox='0 0 ${o} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${n}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${n?"none":"contain"===i?"xMidYMid":"cover"===i?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${s}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return a}})},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return o}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},8927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return d}}),e.r(33525);let a=e.r(43369),s=e.r(88143),i=e.r(87690),o=["-moz-initial","fill","none","scale-down",void 0];function l(e){return void 0!==e.default}function n(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function d({src:e,sizes:t,unoptimized:r=!1,priority:d=!1,preload:c=!1,loading:m,className:u,quality:x,width:h,height:p,fill:f=!1,style:g,overrideSrc:v,onLoad:b,onLoadingComplete:w,placeholder:y="empty",blurDataURL:j,fetchPriority:k,decoding:N="async",layout:S,objectFit:C,objectPosition:I,lazyBoundary:E,lazyRoot:P,...A},_){var R;let O,M,$,{imgConf:T,showAltText:L,blurComplete:U,defaultLoader:D}=_,F=T||i.imageConfigDefault;if("allSizes"in F)O=F;else{let e=[...F.deviceSizes,...F.imageSizes].sort((e,t)=>e-t),t=F.deviceSizes.sort((e,t)=>e-t),r=F.qualities?.sort((e,t)=>e-t);O={...F,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===D)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let z=A.loader||D;delete A.loader,delete A.srcSet;let B="__next_img_default"in z;if(B){if("custom"===O.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
2
- Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=z;z=t=>{let{config:r,...a}=t;return e(a)}}if(S){"fill"===S&&(f=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[S];e&&(g={...g,...e});let r={responsive:"100vw",fill:"100vw"}[S];r&&!t&&(t=r)}let q="",J=n(h),W=n(p);if((R=e)&&"object"==typeof R&&(l(R)||void 0!==R.src)){let t=l(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(M=t.blurWidth,$=t.blurHeight,j=j||t.blurDataURL,q=t.src,!f)if(J||W){if(J&&!W){let e=J/t.width;W=Math.round(t.height*e)}else if(!J&&W){let e=W/t.height;J=Math.round(t.width*e)}}else J=t.width,W=t.height}let G=!d&&!c&&("lazy"===m||void 0===m);(!(e="string"==typeof e?e:q)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,G=!1),O.unoptimized&&(r=!0),B&&!O.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let K=n(x),H=Object.assign(f?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:I}:{},L?{}:{color:"transparent"},g),V=U||"empty"===y?null:"blur"===y?`url("data:image/svg+xml;charset=utf-8,${(0,s.getImageBlurSvg)({widthInt:J,heightInt:W,blurWidth:M,blurHeight:$,blurDataURL:j||"",objectFit:H.objectFit})}")`:`url("${y}")`,X=o.includes(H.objectFit)?"fill"===H.objectFit?"100% 100%":"cover":H.objectFit,Y=V?{backgroundSize:X,backgroundPosition:H.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:V}:{},Q=function({config:e,src:t,unoptimized:r,width:s,quality:i,sizes:o,loader:l}){if(r){let e=(0,a.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")&&e){let r=t.includes("?")?"&":"?";t=`${t}${r}dpl=${e}`}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:n,kind:d}=function({deviceSizes:e,allSizes:t},r,a){if(a){let r=/(^|\s)(1?\d?\d)vw/g,s=[];for(let e;e=r.exec(a);)s.push(parseInt(e[2]));if(s.length){let r=.01*Math.min(...s);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,s,o),c=n.length-1;return{sizes:o||"w"!==d?o:"100vw",srcSet:n.map((r,a)=>`${l({config:e,src:t,quality:i,width:r})} ${"w"===d?r:a+1}${d}`).join(", "),src:l({config:e,src:t,quality:i,width:n[c]})}}({config:O,src:e,unoptimized:r,width:J,quality:K,sizes:t,loader:z}),Z=G?"lazy":m;return{props:{...A,loading:Z,fetchPriority:k,width:J,height:W,decoding:N,className:u,style:{...H,...Y},sizes:Q.sizes,srcSet:Q.srcSet,src:v||Q.src},meta:{unoptimized:r,preload:c||d,placeholder:y,fill:f}}}},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let a=e.r(71645),s="u"<typeof window,i=s?()=>{}:a.useLayoutEffect,o=s?()=>{}:a.useEffect;function l(e){let{headManager:t,reduceComponentsToState:r}=e;function l(){if(t&&t.mountedInstances){let e=a.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return s&&(t?.mountedInstances?.add(e.children),l()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=l),()=>{t&&(t._pendingUpdate=l)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},25633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return p},defaultHead:function(){return m}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=e.r(55682),o=e.r(90809),l=e.r(18050),n=o._(e.r(71645)),d=i._(e.r(98879)),c=e.r(42732);function m(){return[(0,l.jsx)("meta",{charSet:"utf-8"},"charset"),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function u(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===n.default.Fragment?e.concat(n.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let x=["name","httpEquiv","charSet","itemProp"];function h(e){let t,r,a,s;return e.reduce(u,[]).reverse().concat(m().reverse()).filter((t=new Set,r=new Set,a=new Set,s={},e=>{let i=!0,o=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){o=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?i=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?i=!1:r.add(e.type);break;case"meta":for(let t=0,r=x.length;t<r;t++){let r=x[t];if(e.props.hasOwnProperty(r))if("charSet"===r)a.has(r)?i=!1:a.add(r);else{let t=e.props[r],a=s[r]||new Set;("name"!==r||!o)&&a.has(t)?i=!1:(a.add(t),s[r]=a)}}}return i})).reverse().map((e,t)=>{let r=e.key||t;return n.default.cloneElement(e,{key:r})})}let p=function({children:e}){let t=(0,n.useContext)(c.HeadManagerContext);return(0,l.jsx)(d.default,{reduceComponentsToState:h,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18556,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let a=e.r(55682)._(e.r(71645)),s=e.r(87690),i=a.default.createContext(s.imageConfigDefault)},65856,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return a}});let a=e.r(55682)._(e.r(71645)).default.createContext(null)},70965,(e,t,r)=>{"use strict";function a(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,0):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return a}})},1948,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let a=e.r(70965),s=e.r(43369);function i({config:e,src:t,width:r,quality:i}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3
- Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let o=(0,a.findClosestQuality)(i,e),l=(0,s.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${o}${t.startsWith("/")&&l?`&dpl=${l}`:""}`}i.__next_img_default=!0;let o=i},5500,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return w}});let a=e.r(55682),s=e.r(90809),i=e.r(18050),o=s._(e.r(71645)),l=a._(e.r(74080)),n=a._(e.r(25633)),d=e.r(8927),c=e.r(87690),m=e.r(18556);e.r(33525);let u=e.r(65856),x=a._(e.r(1948)),h=e.r(18581),p={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function f(e,t,r,a,s,i,o){let l=e?.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&s(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let a=!1,s=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>a,isPropagationStopped:()=>s,persist:()=>{},preventDefault:()=>{a=!0,t.preventDefault()},stopPropagation:()=>{s=!0,t.stopPropagation()}})}a?.current&&a.current(e)}}))}function g(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let v=(0,o.forwardRef)(({src:e,srcSet:t,sizes:r,height:a,width:s,decoding:l,className:n,style:d,fetchPriority:c,placeholder:m,loading:u,unoptimized:x,fill:p,onLoadRef:v,onLoadingCompleteRef:b,setBlurComplete:w,setShowAltText:y,sizesInput:j,onLoad:k,onError:N,...S},C)=>{let I=(0,o.useCallback)(e=>{e&&(N&&(e.src=e.src),e.complete&&f(e,m,v,b,w,x,j))},[e,m,v,b,w,N,x,j]),E=(0,h.useMergedRef)(C,I);return(0,i.jsx)("img",{...S,...g(c),loading:u,width:s,height:a,decoding:l,"data-nimg":p?"fill":"1",className:n,style:d,sizes:r,srcSet:t,src:e,ref:E,onLoad:e=>{f(e.currentTarget,m,v,b,w,x,j)},onError:e=>{y(!0),"empty"!==m&&w(!0),N&&N(e)}})});function b({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...g(t.fetchPriority)};return e&&l.default.preload?(l.default.preload(t.src,r),null):(0,i.jsx)(n.default,{children:(0,i.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let w=(0,o.forwardRef)((e,t)=>{let r=(0,o.useContext)(u.RouterContext),a=(0,o.useContext)(m.ImageConfigContext),s=(0,o.useMemo)(()=>{let e=p||a||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),s=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:s,localPatterns:"u"<typeof window?a?.localPatterns:e.localPatterns}},[a]),{onLoad:l,onLoadingComplete:n}=e,h=(0,o.useRef)(l);(0,o.useEffect)(()=>{h.current=l},[l]);let f=(0,o.useRef)(n);(0,o.useEffect)(()=>{f.current=n},[n]);let[g,w]=(0,o.useState)(!1),[y,j]=(0,o.useState)(!1),{props:k,meta:N}=(0,d.getImgProps)(e,{defaultLoader:x.default,imgConf:s,blurComplete:g,showAltText:y});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v,{...k,unoptimized:N.unoptimized,placeholder:N.placeholder,fill:N.fill,onLoadRef:h,onLoadingCompleteRef:f,setBlurComplete:w,setShowAltText:j,sizesInput:e.sizes,ref:t}),N.preload?(0,i.jsx)(b,{isAppRouter:!r,imgAttributes:k}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},94909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return c},getImageProps:function(){return d}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=e.r(55682),o=e.r(8927),l=e.r(5500),n=i._(e.r(1948));function d(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:n.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let c=l.Image},57688,(e,t,r)=>{t.exports=e.r(94909)},37121,34011,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg"]),r=new Set(["mp4","webm","mov","avi","mkv","ogv"]),a=new Set(["mp3","wav","ogg","m4a","aac","flac","webm"]);function s(e){return e.toLowerCase().split(".").pop()??""}function i(e){return t.has(s(e))}function o(e){return r.has(s(e))}function l(e){return a.has(s(e))}let n={mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo",mkv:"video/x-matroska",ogv:"video/ogg",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",flac:"audio/flac"};function d(e){return n[s(e)]??""}e.s(["isAudioFile",()=>l,"isImageFile",()=>i,"isVideoFile",()=>o,"mimeForFile",()=>d],37121);var c=e.i(18050),m=e.i(57688);function u(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(1))+" "+["B","KB","MB","GB"][t]}function x(e){return({png:"🖼️",jpg:"🖼️",jpeg:"🖼️",gif:"🖼️",webp:"🖼️",svg:"🖼️",mp4:"🎬",webm:"🎬",mov:"🎬",avi:"🎬",mkv:"🎬",ogv:"🎬",mp3:"🎵",wav:"🎵",ogg:"🎵",m4a:"🎵",aac:"🎵",flac:"🎵",json:"📋",md:"📝",txt:"📄",html:"🌐",pdf:"📕"})[e.toLowerCase().split(".").pop()??""]??"📎"}function h({deliverable:e,fileUrl:t,maxMediaHeight:r="400px",onDownload:a}){return e?(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"mb-3 pb-3 border-b border-white/10",children:[(0,c.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,c.jsx)("span",{className:"text-lg",children:x(e.fileName)}),(0,c.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] text-sm break-all",children:e.fileName})]}),(0,c.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] space-y-1",children:[(0,c.jsxs)("div",{children:["Size: ",u(e.size)]}),(0,c.jsxs)("div",{children:["Modified: ",function(e){try{return new Date(e).toLocaleString()}catch{return e}}(e.mtime)]}),(0,c.jsxs)("div",{children:["Path: ",e.relativePath]})]})]}),i(e.fileName)?(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Image Preview:"}),(0,c.jsx)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-2 overflow-hidden",children:(0,c.jsx)(m.default,{src:t,alt:e.fileName,width:800,height:600,className:"w-full h-auto rounded-lg object-contain",style:{maxHeight:r},unoptimized:!0})}),(0,c.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,c.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Open full size ↗"}),(0,c.jsx)("button",{onClick:a,className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download"})]})]}):o(e.fileName)?(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Video Preview:"}),(0,c.jsx)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-2 overflow-hidden",children:(0,c.jsxs)("video",{src:t,controls:!0,className:"w-full rounded-lg",style:{maxHeight:r},preload:"metadata",children:[(0,c.jsx)("source",{src:t,type:d(e.fileName)}),"Your browser does not support video playback."]})}),(0,c.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,c.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Open full size ↗"}),(0,c.jsx)("button",{onClick:a,className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download"})]})]}):l(e.fileName)?(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Audio Preview:"}),(0,c.jsx)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-2",children:(0,c.jsxs)("audio",{src:t,controls:!0,className:"w-full",preload:"metadata",children:[(0,c.jsx)("source",{src:t,type:d(e.fileName)}),"Your browser does not support audio playback."]})}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)("button",{onClick:a,className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download"})})]}):e.isText&&e.contentPreview?(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Content Preview:"}),(0,c.jsx)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-3 overflow-auto",style:{maxHeight:r},children:(0,c.jsx)("pre",{className:"text-xs text-[color:var(--ck-text-primary)] whitespace-pre-wrap break-words",children:e.contentPreview})})]}):(0,c.jsxs)("div",{className:"text-center py-6",children:[(0,c.jsx)("div",{className:"text-3xl mb-2",children:x(e.fileName)}),(0,c.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-secondary)] mb-2",children:[u(e.size)," · ",e.fileName.split(".").pop()?.toUpperCase()," file"]}),(0,c.jsx)("button",{onClick:a,className:"text-xs px-3 py-1.5 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download file"})]})]}):(0,c.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)] italic",children:"Select a deliverable to preview"})}e.s(["DeliverablePreviewPanel",()=>h],34011)},529,e=>{"use strict";var t=e.i(18050),r=e.i(57688),a=e.i(22016),s=e.i(71645),i=e.i(18566),o=e.i(37121),l=e.i(34011);function n(e,t){return`/api/teams/workflow-deliverables/file?teamId=${encodeURIComponent(e)}&runId=${encodeURIComponent(t.runId)}&path=${encodeURIComponent(t.relativePath)}`}function d(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(1))+" "+["B","KB","MB","GB"][t]}function c(e){try{return new Date(e).toLocaleString()}catch{return e}}function m(e){switch(e.toLowerCase().split(".").pop()){case"md":return"📝";case"json":return"🔧";case"txt":default:return"📄";case"html":case"htm":return"🌐";case"css":return"🎨";case"js":case"ts":case"tsx":case"jsx":return"⚙️";case"png":case"jpg":case"jpeg":case"gif":case"webp":return"🖼️";case"pdf":return"📋";case"zip":case"tar":case"gz":return"📦"}}function u({teamId:e,deliverables:u,workflows:x}){let h=(0,i.useRouter)(),[p,f]=(0,s.useState)(""),[g,v]=(0,s.useState)(""),[b,w]=(0,s.useState)(""),[y,j]=(0,s.useState)(null),k=(0,s.useMemo)(()=>{let e=b.trim().toLowerCase();return u.filter(t=>{if(p&&t.workflowId!==p||g&&t.runId!==g)return!1;if(!e)return!0;let r=x[t.workflowId]?.name??"";return t.fileName.toLowerCase().includes(e)||t.workflowId.toLowerCase().includes(e)||t.runId.toLowerCase().includes(e)||r.toLowerCase().includes(e)||t.contentPreview&&t.contentPreview.toLowerCase().includes(e)})},[u,b,p,g,x]),N=(0,s.useMemo)(()=>Array.from(new Set(u.map(e=>e.workflowId).filter(Boolean))).sort(),[u]),S=(0,s.useMemo)(()=>Array.from(new Set((p?u.filter(e=>e.workflowId===p):u).map(e=>e.runId).filter(Boolean))).sort(),[u,p]),C=async t=>{try{if(t.isText&&t.contentPreview)await navigator.clipboard.writeText(t.contentPreview),alert("Content copied to clipboard!");else{let r=n(e,t),a=document.createElement("a");a.href=r,a.download=t.fileName,document.body.appendChild(a),a.click(),a.remove()}}catch{alert("Failed to download file")}};return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("div",{className:"rounded-3xl border border-white/10 bg-black/10 p-4",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-end gap-3",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:"workflow"}),(0,t.jsxs)("select",{value:p,onChange:e=>{f(e.target.value||""),v("")},className:"mt-1 w-64 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"All workflows"}),N.map(e=>(0,t.jsx)("option",{value:e,children:x[e]?.name?`${x[e]?.name} (${e})`:e},e))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"run"}),(0,t.jsxs)("select",{value:g,onChange:e=>v(e.target.value||""),className:"mt-1 w-56 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"All runs"}),S.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"search"}),(0,t.jsx)("input",{value:b,onChange:e=>w(e.target.value),placeholder:"filename / content",className:"mt-1 w-72 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("button",{type:"button",onClick:()=>h.refresh(),className:"rounded-lg 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:"Refresh"})})]})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,t.jsxs)("div",{className:"lg:col-span-2 rounded-3xl border border-white/10 bg-black/10 p-4",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4",children:"Workflow Deliverables"}),k.length>0?(0,t.jsx)("div",{className:"space-y-2",children:k.map((s,i)=>{let l=y?.absolutePath===s.absolutePath,u=x[s.workflowId]?.name||s.workflowId;return(0,t.jsx)("div",{className:`cursor-pointer rounded-lg border p-3 transition-colors ${l?"border-white/20 bg-white/10":"border-white/5 bg-black/5 hover:bg-white/5"}`,onClick:()=>j(s),children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,o.isImageFile)(s.fileName)&&(0,t.jsx)("div",{className:"flex-shrink-0 w-12 h-12 rounded overflow-hidden bg-white/5 border border-white/10",children:(0,t.jsx)(r.default,{src:n(e,s),alt:s.fileName,width:48,height:48,className:"w-full h-full object-cover",unoptimized:!0})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-lg",children:m(s.fileName)}),(0,t.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] truncate",children:s.fileName}),s.isText&&(0,t.jsx)("span",{className:"text-xs bg-green-500/20 text-green-400 px-1.5 py-0.5 rounded",children:"TEXT"})]}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:u})," · ",(0,t.jsx)("span",{className:"font-mono",children:s.runId})]}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[s.relativePath!==s.fileName&&(0,t.jsxs)("span",{children:[s.relativePath," · "]}),d(s.size)," · ",c(s.mtime)]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),C(s)},className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:s.isText?"Copy":"Download"}),(0,t.jsx)(a.default,{href:`/teams/${e}/runs/${s.workflowId}/${s.runId}`,onClick:e=>e.stopPropagation(),className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"View Run →"})]})]})},`${s.runId}-${s.relativePath}`)})}):(0,t.jsxs)("div",{className:"text-center py-8 text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("div",{className:"text-4xl mb-2",children:"📋"}),(0,t.jsx)("div",{className:"text-lg mb-1",children:"No deliverables found"}),(0,t.jsx)("div",{className:"text-sm",children:"Workflow runs will create deliverables that appear here when they complete."})]}),k.length>0&&(0,t.jsxs)("div",{className:"mt-4 text-xs text-[color:var(--ck-text-tertiary)]",children:["Showing ",k.length," of ",u.length," deliverables."]})]}),(0,t.jsxs)("div",{className:"lg:col-span-1 rounded-3xl border border-white/10 bg-black/10 p-4",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)] mb-3",children:"Preview"}),y?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-3 pb-3 border-b border-white/10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("span",{className:"text-lg",children:m(y.fileName)}),(0,t.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] text-sm break-all",children:y.fileName})]}),(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] space-y-1",children:[(0,t.jsxs)("div",{children:["Size: ",d(y.size)]}),(0,t.jsxs)("div",{children:["Modified: ",c(y.mtime)]}),(0,t.jsxs)("div",{children:["Path: ",y.relativePath]})]})]}),(0,t.jsx)(l.DeliverablePreviewPanel,{deliverable:y,fileUrl:n(e,y),maxMediaHeight:"500px",onDownload:()=>C(y)})]}):(0,t.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)] italic",children:"Select a deliverable to preview"})]})]})]})}e.s(["default",()=>u])},32246,e=>{e.v(e=>Promise.resolve().then(()=>e(74080)))}]);
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(18050),r=e.i(74080);function a({open:e,onClose:a,title:s,children:i,error:o,confirmLabel:l,confirmBusyLabel:n,onConfirm:d,confirmDisabled:c,busy:m,confirmButtonClassName:u}){if(!e)return null;let x=m??!1,h=x&&n?n:l,p="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:a,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":p,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-soft)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("h2",{id:p,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:s}),i,o?(0,t.jsx)("div",{className:"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:o}):null,(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:a,className:"rounded-lg 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:(c??!1)||x,onClick:d,className:u??"rounded-lg 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:h})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>a])},54510,e=>{"use strict";var t=e.i(18050),r=e.i(44355);function a({open:e,onClose:a,title:s,entityLabel:i,bodyText:o,onConfirm:l,busy:n,error:d}){return(0,t.jsx)(r.ConfirmationModal,{open:e,onClose:a,title:s,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:l,busy:n,error:d??void 0,children:(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[s," ",(0,t.jsx)("code",{className:"font-mono",children:i}),"? ",o]})})}function s(e){return function(r){let s=r[e.entityLabelKey];return(0,t.jsx)(a,{open:r.open,onClose:r.onClose,title:e.title,entityLabel:s,bodyText:e.bodyText,onConfirm:r.onConfirm,busy:r.busy,error:r.error})}}let i=s({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),o=s({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),l=s({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),n=s({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,i,"DeleteCronJobModal",0,n,"DeleteRecipeModal",0,l,"DeleteTeamModal",0,o],54510)},55613,e=>{"use strict";var t=e.i(18050),r=e.i(74080);function a({open:e,onClose:a,title:s,children:i,size:o="md",hideTitle:l=!1}){if(!e)return null;let n="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:a,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":n,children:(0,t.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,t.jsxs)("div",{className:`w-full ${{sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-6xl"}[o]} rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-6 shadow-[var(--ck-shadow-2)]`,children:[l?(0,t.jsx)("h2",{id:n,className:"sr-only",children:s}):(0,t.jsx)("h2",{id:n,className:"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4",children:s}),i]})})})]}),document.body)}e.s(["Modal",()=>a])},88810,72532,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(18566),s=e.i(82310),i=e.i(42771),o=e.i(54510);function l({title:e,files:r,loading:a,showOptionalFiles:s,onShowOptionalChange:i,selectedFileName:o,onSelectFile:l,renderItemExtra:n}){let d=s?r:r.filter(e=>e.required||!e.missing);return(0,t.jsxs)("div",{className:"ck-card 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:s,onChange:e=>i(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:[a?(0,t.jsx)("li",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"Loading…"}):null,d.map(e=>{var r;let a;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,a="w-full rounded-lg px-3 py-2 text-left text-sm",o===r?`${a} bg-white/10 text-[color:var(--ck-text-primary)]`:`${a} 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)})]})]})}function n({name:e,emoji:r,theme:a,avatar:s,saving:i,returnTo:o,onNameChange:l,onEmojiChange:n,onThemeChange:d,onAvatarChange:c,onSave:m,router:u}){return(0,t.jsxs)("div",{className:"ck-card p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Identity"}),(0,t.jsx)("label",{className:"mt-3 block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Name"}),(0,t.jsx)("input",{value:e,onChange:e=>l(e.target.value),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),(0,t.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Emoji"}),(0,t.jsx)("input",{value:r,onChange:e=>n(e.target.value),placeholder:"🦞",className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Theme"}),(0,t.jsx)("input",{value:a,onChange:e=>d(e.target.value),placeholder:"warm, sharp, calm",className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Avatar"}),(0,t.jsx)("input",{value:s,onChange:e=>c(e.target.value),placeholder:"avatars/openclaw.png",className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,t.jsxs)("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row",children:[(0,t.jsx)("button",{disabled:i,onClick:m,className:"rounded-lg 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)] active:bg-[var(--ck-accent-red-active)] disabled:opacity-50",children:i?"Saving…":"Save"}),o?(0,t.jsx)("button",{disabled:i,onClick:async()=>{await m(),u.push(o)},className:"rounded-lg 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)] transition-colors hover:bg-white/10 active:bg-white/15 disabled:opacity-50",children:"Save & return"}):null]})]})}function d({model:e,saving:r,onModelChange:a,onSave:s}){return(0,t.jsxs)("div",{className:"ck-card p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Config"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"Thin slice: edit the configured model id for this agent (writes to OpenClaw config)."}),(0,t.jsx)("label",{className:"mt-3 block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Model"}),(0,t.jsx)("input",{value:e,onChange:e=>a(e.target.value),placeholder:"openai/gpt-5.2",className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)("button",{disabled:r,onClick:s,className:"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:r?"Saving…":"Save config"})})]})}function c({agentId:e,skillsList:r,availableSkills:a,skillsLoading:s,selectedSkill:i,installingSkill:o,skillError:l,skillMsg:n,onSelectedSkillChange:d,onInstallSkill:c}){return(0,t.jsxs)("div",{className:"ck-card p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Skills"}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:["Skills installed in this ",(0,t.jsx)("strong",{children:"agent"})," workspace (",(0,t.jsx)("code",{children:"skills/"}),"). If you want a skill available to all agents, add it at the team level."]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Installed"}),(0,t.jsxs)("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-[color:var(--ck-text-secondary)]",children:[s&&(0,t.jsx)("li",{children:"Loading…"}),!s&&r.length>0&&r.map(e=>(0,t.jsx)("li",{children:e},e)),!s&&!r.length&&(0,t.jsx)("li",{children:"None installed."})]})]}),(0,t.jsxs)("div",{className:"mt-5 rounded-lg border border-white/10 bg-white/5 p-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Add a skill"}),(0,t.jsxs)("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,t.jsx)("select",{value:i,onChange:e=>d(e.target.value),className:"w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]",disabled:o||!a.length,children:a.length?a.map(e=>(0,t.jsx)("option",{value:e,children:e},e)):(0,t.jsx)("option",{value:"",children:"No skills found"})}),(0,t.jsx)("button",{type:"button",disabled:o||!i,onClick:()=>void c(),className:"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:o?"Adding…":"Add"})]}),l&&(0,t.jsx)("div",{className:"mt-3 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:l}),!l&&n&&(0,t.jsx)("div",{className:"mt-3 rounded-lg border border-emerald-400/30 bg-emerald-500/10 p-3 text-sm text-emerald-100",children:n}),(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["This uses ",(0,t.jsxs)("code",{children:["openclaw recipes install-skill <skill> --agent-id ",e," --yes"]}),"."]})]})]})}function m({agentFiles:e,agentFilesLoading:r,showOptionalFiles:a,fileName:s,fileContent:i,loadingFile:o,saving:n,fileError:d,onShowOptionalChange:c,onLoadFile:m,onFileContentChange:u,onSaveFile:x,onCreateMissingFile:h}){return(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,t.jsx)(l,{title:"Agent files",files:e,loading:r,showOptionalFiles:a,onShowOptionalChange:c,selectedFileName:s,onSelectFile:m,renderItemExtra:e=>e.missing?(0,t.jsx)("button",{type:"button",disabled:n,onClick:()=>void h(e.name),className:"shrink-0 rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-50",children:"Create"}):null}),(0,t.jsxs)("div",{className:"ck-card p-4 lg:col-span-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:["Edit: ",s]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("span",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Loading…"}):null,(0,t.jsx)("button",{disabled:n,onClick:x,className:"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:n?"Saving…":"Save file"})]})]}),d?(0,t.jsx)("div",{className:"mt-3 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:d}):null,(0,t.jsx)("textarea",{value:i,onChange:e=>u(e.target.value),className:"mt-3 h-[55vh] w-full resize-none rounded-lg border border-white/10 bg-white/5 p-3 font-mono text-xs text-[color:var(--ck-text-primary)]",spellCheck:!1})]})]})}async function u(e,t){t.setAgentFilesLoading(!0),t.setSkillsLoading(!0);try{let[r,a,s]=await (0,i.fetchAll)([`/api/agents/files?agentId=${encodeURIComponent(e)}`,`/api/agents/skills?agentId=${encodeURIComponent(e)}`,"/api/skills/available"]),o=[];try{let e=await r.json();if(r.ok&&e.ok){let r=Array.isArray(e.files)?e.files:[];t.setAgentFiles(r.map(e=>({name:String(e.name??""),missing:!!e.missing,required:!!e.required,rationale:"string"==typeof e.rationale?e.rationale:void 0})))}}catch{}try{let e=await a.json();a.ok&&e.ok&&(o=Array.isArray(e.skills)?e.skills:[],t.setSkillsList(o))}catch{}try{let e=await s.json();if(s.ok&&e.ok){let r=Array.isArray(e.skills)?e.skills:[];t.setAvailableSkills(r);let a=r.find(e=>!o.includes(e));t.setSelectedSkill(a??r[0]??"")}}catch{}}finally{t.setAgentFilesLoading(!1),t.setSkillsLoading(!1)}}function x({agentId:e,returnTo:l,onClose:x}){let h=(0,a.useRouter)(),[p,f]=(0,r.useState)(null),[g,v]=(0,r.useState)(!0),[b,w]=(0,r.useState)(!1),[y,j]=(0,r.useState)(!1),[k,N]=(0,r.useState)(""),[S,C]=(0,r.useState)(""),[I,P]=(0,r.useState)(""),[E,_]=(0,r.useState)(""),[A,R]=(0,r.useState)(!1),[O,M]=(0,r.useState)(!1),[$,T]=(0,r.useState)(null),[L,U]=(0,r.useState)("identity"),[D,F]=(0,r.useState)(""),[z,B]=(0,r.useState)(""),[q,J]=(0,r.useState)(""),[W,G]=(0,r.useState)(""),[K,H]=(0,r.useState)(""),[X,V]=(0,r.useState)([]),[Y,Q]=(0,r.useState)([]),[Z,ee]=(0,r.useState)(!1),[et,er]=(0,r.useState)(""),[ea,es]=(0,r.useState)(!1),[ei,eo]=(0,r.useState)([]),[el,en]=(0,r.useState)(!1),[ed,ec]=(0,r.useState)(!1),[em,eu]=(0,r.useState)("SOUL.md"),[ex,eh]=(0,r.useState)(""),ep=e.includes("-")?e.split("-").slice(0,-1).join("-"):"";async function ef(e){w(!0),N("");try{let t=await e();N(t)}catch(e){N((0,s.errorMessage)(e))}finally{w(!1)}}async function eg(){await ef(async()=>(await (0,i.fetchJson)("/api/agents/identity",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,name:D,emoji:z,theme:q,avatar:W})}),"Saved identity via openclaw agents set-identity"))}async function ev(){await ef(async()=>(await (0,i.fetchJson)("/api/agents/update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,patch:{model:K}})}),"Saved agent config (model) and restarted gateway"))}async function eb(t){eu(t),eh(""),j(!0),C("");try{let r=await (0,i.fetchJson)(`/api/agents/file?agentId=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`,{cache:"no-store"});if(!r.ok)throw Error("Failed to load file");eh(String(r.content??""))}catch(e){C((0,s.errorMessage)(e))}finally{j(!1)}}async function ew(){w(!0),C("");try{if(!(await (0,i.fetchJson)("/api/agents/file",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,name:em,content:ex})})).ok)throw Error("Failed to save file");try{let t=await (0,i.fetchJson)(`/api/agents/files?agentId=${encodeURIComponent(e)}`,{cache:"no-store"});t.ok&&Array.isArray(t.files)&&eo(t.files)}catch{}}catch(e){C((0,s.errorMessage)(e))}finally{w(!1)}}async function ey(e){eu(e),C(""),eh(function(e){switch(e){case"SOUL.md":return"# SOUL.md\n\n";case"AGENTS.md":return"# AGENTS.md\n\n";case"TOOLS.md":return"# TOOLS.md\n\n";case"STATUS.md":return"# STATUS.md\n\n- (empty)\n";case"NOTES.md":return"# NOTES.md\n\n- (empty)\n";case"IDENTITY.md":return"# IDENTITY.md\n\n- **Name:**\n- **Creature:**\n- **Vibe:**\n- **Emoji:**\n- **Avatar:**\n";case"USER.md":return"# USER.md\n\n";case"HEARTBEAT.md":return"# HEARTBEAT.md\n\n# Keep this file empty (or with only comments) to skip heartbeat API calls.\n";default:return""}}(e)),await ew()}async function ej(){M(!0),T(null),N("");try{await (0,i.fetchJson)(`/api/agents/${encodeURIComponent(e)}`,{method:"DELETE"}),window.location.href="/"}catch(e){T((0,s.errorMessage)(e)),M(!1)}}return(0,r.useEffect)(()=>{(async()=>{v(!0),N("");try{let t=await (0,i.fetchJson)("/api/agents",{cache:"no-store"}),r=(Array.isArray(t.agents)?t.agents:[]).find(t=>t.id===e)??null;f(r),F(r?.identityName??""),H(r?.model??""),v(!1),u(e,{setAgentFiles:eo,setSkillsList:V,setAvailableSkills:Q,setSelectedSkill:er,setAgentFilesLoading:en,setSkillsLoading:ee})}catch(e){N((0,s.errorMessage)(e))}finally{v(!1)}})()},[e]),(0,r.useEffect)(()=>{if("files"!==L||!ei.length)return;let e=ei.some(e=>e.name===em),t=ei[0]?.name,r=e?em:t;r&&(r!==em&&(eu(r),eh("")),ex||eb(r))},[L,e,ei.length]),g?(0,t.jsx)("div",{className:"w-full",children:"Loading…"}):p?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[x?(0,t.jsx)("button",{type:"button",onClick:x,className:"text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]",title:"Close",children:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-5 w-5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,t.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})})}):null,(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:p.identityName||p.id}),(0,t.jsxs)("p",{className:"mt-1 text-sm font-mono text-[color:var(--ck-text-tertiary)]",children:[p.id,p.isDefault?" · default":"",p.model?` \xb7 ${p.model}`:""]})]})]}),(0,t.jsx)("button",{type:"button",disabled:b,onClick:()=>{T(null),R(!0)},className:"rounded-lg border border-[color:rgba(255,59,48,0.45)] bg-[color:rgba(255,59,48,0.08)] px-3 py-2 text-sm font-medium text-[color:var(--ck-accent-red)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)] disabled:opacity-50",children:"Delete agent"})]}),p.workspace?(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:["Workspace: ",p.workspace]}):null,ep?(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:["Team: ",ep]}):null,k?(0,t.jsx)("div",{className:"mt-4 rounded-lg border border-white/10 bg-white/5 p-3 text-sm text-[color:var(--ck-text-primary)]",children:k}):null,(0,t.jsx)("div",{className:"mt-6 flex flex-wrap gap-2",children:[{id:"identity",label:"Identity"},{id:"config",label:"Config"},{id:"skills",label:"Skills"},{id:"files",label:"Files"}].map(e=>(0,t.jsx)("button",{onClick:()=>U(e.id),className:L===e.id?"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)]":"rounded-lg 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",children:e.label},e.id))}),(0,t.jsxs)("div",{className:"mt-6 grid grid-cols-1 gap-4",children:["identity"===L&&(0,t.jsx)(n,{name:D,emoji:z,theme:q,avatar:W,saving:b,returnTo:l,onNameChange:F,onEmojiChange:B,onThemeChange:J,onAvatarChange:G,onSave:eg,router:h}),"config"===L&&(0,t.jsx)(d,{model:K,saving:b,onModelChange:H,onSave:ev}),"skills"===L&&(0,t.jsx)(c,{agentId:e,skillsList:X,availableSkills:Y,skillsLoading:Z,selectedSkill:et,installingSkill:ea,skillError:E,skillMsg:I,onSelectedSkillChange:er,onInstallSkill:async()=>{es(!0),P(""),_("");try{await (0,i.fetchJson)("/api/agents/skills/install",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,skill:et})}),P(`Installed skill: ${et}`);try{let t=await (0,i.fetchJson)(`/api/agents/skills?agentId=${encodeURIComponent(e)}`,{cache:"no-store"});t.ok&&Array.isArray(t.skills)&&V(t.skills)}catch{}}catch(e){_((0,s.errorMessage)(e))}finally{es(!1)}}}),"files"===L&&(0,t.jsx)(m,{agentFiles:ei,agentFilesLoading:el,showOptionalFiles:ed,fileName:em,fileContent:ex,loadingFile:y,saving:b,fileError:S,onShowOptionalChange:ec,onLoadFile:eb,onFileContentChange:eh,onSaveFile:ew,onCreateMissingFile:ey})]}),(0,t.jsx)(o.DeleteAgentModal,{open:A,agentId:e,busy:O,error:$,onClose:()=>R(!1),onConfirm:()=>void ej()})]}):(0,t.jsxs)("div",{className:"w-full",children:["Agent not found: ",e]})}e.s(["FileListWithOptionalToggle",()=>l],72532),e.s(["default",()=>x],88810)},99252,e=>{"use strict";var t=e.i(18050),r=e.i(74080);function a({open:e}){return e?(0,r.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[9999]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-[color:var(--ck-bg-base)]/90 pointer-events-none"}),(0,t.jsx)("div",{className:"fixed inset-0 flex items-center justify-center p-6 sm:p-10",children:(0,t.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-8 sm:p-10 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("div",{className:"text-xl font-semibold text-[color:var(--ck-text-primary)]",children:"Gathering your ingredients.."}),(0,t.jsx)("div",{className:"mt-6 h-1.5 w-full overflow-hidden rounded-full bg-white/10",children:(0,t.jsx)("div",{className:"h-full w-1/3 animate-[loading-bar_1.5s_ease-in-out_infinite] rounded-full bg-[var(--ck-accent-red)]"})})]})}),(0,t.jsx)("style",{children:`
2
+ @keyframes loading-bar {
3
+ 0% { transform: translateX(-100%); }
4
+ 50% { transform: translateX(200%); }
5
+ 100% { transform: translateX(-100%); }
6
+ }
7
+ `})]}),document.body):null}e.s(["RunLoadingOverlay",()=>a])},92140,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(22016),s=e.i(18566),i=e.i(42771),o=e.i(82310),l=e.i(44355),n=e.i(99252);function d(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function c({teamId:e,llmTaskEnabled:c}){let m=(0,s.useRouter)(),[u,x]=(0,r.useState)([]),[h,p]=(0,r.useState)(!0),[f,g]=(0,r.useState)(!1),[v,b]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[j,k]=(0,r.useState)({}),[N,S]=(0,r.useState)({}),[C,I]=(0,r.useState)(""),[P,E]=(0,r.useState)(""),[_,A]=(0,r.useState)(null),[R,O]=(0,r.useState)(""),[M,$]=(0,r.useState)(""),[T,L]=(0,r.useState)(!1),[U,D]=(0,r.useState)(""),[F,z]=(0,r.useState)(""),[B,q]=(0,r.useState)([]),[J,W]=(0,r.useState)(""),[G,K]=(0,r.useState)(!1),H=(0,r.useCallback)(async t=>{D(t),K(!0),W("");let r=!1;try{let a=await (0,i.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`,{cache:"no-store"});if(!a.ok||!a.workflow)throw Error(a.error||"Failed to load workflow");let s=a.workflow,o=d(s.meta)?s.meta:{};if(!0!==o.skipCronCheck){let e=Array.isArray(s.nodes)?s.nodes:[],r=Array.from(new Set(e.filter(e=>e.type&&!["start","end","human_approval"].includes(String(e.type))).map(e=>{let t=d(e.config)?e.config:{};return String(t.agentId??"").trim()}).filter(Boolean))),a=await (0,i.fetchJson)("/api/cron/jobs",{cache:"no-store"});if(!a.ok)throw Error(a.error||"Failed to load cron jobs");let o=Array.isArray(a.jobs)?a.jobs:[],l={};for(let e of o){if(!e||!e.enabled)continue;let t=String(e.name??""),r=String(e.payload?.message??"");if(!(t.startsWith("workflow-worker:")||r.includes("worker-tick")))continue;let a=t.match(/^workflow-worker:[^:]+:(.+)$/);if(a?.[1]){l[a[1]]=!0;continue}let s=r.match(/--agent-id\s+(\S+)/);s?.[1]&&(l[s[1]]=!0)}let n=r.filter(e=>!l[e]);if(n.length){q(n),z(t);return}}let l=await (0,i.fetchJson)("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:t,mode:"run_now"})});if(!l.ok)throw Error(l.error||"Failed to create run");let n=String(l.runId??"").trim();n?(m.push(`/teams/${encodeURIComponent(e)}/runs/${encodeURIComponent(t)}/${encodeURIComponent(n)}`),r=!0):y(t)}catch(e){q([]),z(""),W((0,o.errorMessage)(e))}finally{D(""),r||K(!1)}},[e,m]),X=(0,r.useCallback)(async t=>{let r=!!t?.quiet;b(""),r||p(!0);try{let t=await (0,i.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);x(r.map(e=>({id:e,name:e})))}catch(e){b((0,o.errorMessage)(e))}finally{r||p(!1)}},[e]);async function V(){g(!0);try{await X({quiet:!0})}finally{g(!1)}}async function Y(t){if(confirm(`Delete workflow “${t}”? This removes the .workflow.json file from the team workspace.`)){b("");try{let r=await (0,i.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`,{method:"DELETE"});if(!r.ok)throw Error(r.error||"Failed to delete workflow");await X({quiet:!0}),w===t&&(y(""),I(""),A(null))}catch(e){b((0,o.errorMessage)(e))}}}async function Q(t){S(e=>({...e,[t]:!0})),O("");try{let r=await (0,i.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 a=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):[];k(e=>({...e,[t]:a}))}catch(e){O((0,o.errorMessage)(e)),k(e=>({...e,[t]:[]}))}finally{S(e=>({...e,[t]:!1}))}}async function Z(t,r){E(t),I(r),A(null),O(""),$("");try{let a=await (0,i.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}&runId=${encodeURIComponent(r)}`,{cache:"no-store"});if(!a.ok)throw Error(a.error||"Failed to load run");let s=d(a.run)?a.run:null;if(!s)throw Error("Invalid run format");A({id:String(s.id??r),status:"string"==typeof s.status?s.status:void 0,startedAt:"string"==typeof s.startedAt?s.startedAt:void 0,finishedAt:"string"==typeof s.finishedAt?String(s.finishedAt):void 0,meta:s.meta,memoryUsed:s.memoryUsed,approval:s.approval,raw:s})}catch(e){O((0,o.errorMessage)(e)),A(null)}}async function ee(t){if(confirm(`Add workflow from template “${t}”?`)){b("");try{let r=await (0,i.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 a=String(r.workflowId??"").trim();if(!a)throw Error("Template applied but workflowId missing");await X({quiet:!0}),m.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(a)}`)}catch(e){b((0,o.errorMessage)(e))}}}(0,r.useEffect)(()=>{X()},[X]);let et=(0,r.useMemo)(()=>{if(!_)return[];let e=_.memoryUsed??(d(_.meta)?_.meta.memoryUsed:void 0);return Array.isArray(e)?e.map(e=>d(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):[]},[_]);if(h)return(0,t.jsx)("div",{className:"ck-card p-4",children:"Loading workflows…"});let er=!1===c?(0,t.jsxs)("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/10 p-4 text-sm",children:[(0,t.jsx)("div",{className:"font-medium text-amber-200",children:"LLM support is not enabled"}),(0,t.jsxs)("div",{className:"mt-1 text-[color:var(--ck-text-secondary)]",children:["Workflow LLM nodes require the optional built-in ",(0,t.jsx)("code",{className:"px-1",children:"llm-task"})," plugin."]}),(0,t.jsxs)("div",{className:"mt-2 text-[color:var(--ck-text-secondary)]",children:["Enable it with: ",(0,t.jsx)("code",{className:"px-1",children:"openclaw plugins enable llm-task"})," then run"," ",(0,t.jsx)("code",{className:"px-1",children:"openclaw gateway restart"}),"."]}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"If you’re doing a non-interactive install, keep this command in your setup docs as a fallback."})]}):null;return(0,t.jsxs)("div",{className:"ck-card p-6",children:[(0,t.jsx)(n.RunLoadingOverlay,{open:G}),(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."]}),er,(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()}`;m.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(t)}?draft=1`)},className:"rounded-lg 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 ee("marketing-cadence-v1"),className:"rounded-lg 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:V,disabled:f,className:"rounded-lg 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:f?"Refreshing…":"Refresh"})]})]}),v?(0,t.jsx)("div",{className:"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-4 text-sm text-red-100",children:v}):null,J?(0,t.jsx)("div",{className:"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-4 text-sm text-red-100",children:J}):null,(0,t.jsx)(l.ConfirmationModal,{open:!!F,title:"Worker crons not set up",confirmLabel:"Edit workflow",onClose:()=>{z(""),q([])},onConfirm:()=>{z(""),q([]),F&&m.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(F)}`)},children:(0,t.jsxs)("div",{className:"space-y-2 text-sm text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("p",{children:"This workflow can’t run because worker cron jobs aren’t installed for the required agents. Open the workflow editor to install them, or choose to skip the cron check (once or permanently) from the same screen."}),B.length?(0,t.jsxs)("div",{className:"rounded-lg border border-white/10 bg-white/5 p-2 font-mono text-[11px] text-[color:var(--ck-text-primary)]",children:["Missing for: ",B.join(", ")]}):null]})}),0===u.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-lg border border-white/10",children:u.map(r=>{let s=w===r.id,i=j[r.id]??[],l=!!N[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=s?"":r.id;y(e),I(""),A(null),O(""),e&&await Q(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 ",s?"collapse":"expand"," run details"]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)("button",{type:"button",disabled:U===r.id,onClick:()=>void H(r.id),className:"rounded-lg border border-emerald-400/30 bg-emerald-500/10 px-3 py-1.5 text-sm font-medium text-emerald-50 transition-colors hover:bg-emerald-500/15 disabled:opacity-60",title:"Enqueue a run for this workflow",children:U===r.id?"Starting…":"Run"}),(0,t.jsx)(a.default,{href:`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(r.id)}`,className:"rounded-lg 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 Y(r.id),className:"rounded-lg 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"})]})]}),s?(0,t.jsxs)("div",{className:"border-t border-white/10 bg-white/5 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 Q(r.id),className:"rounded-lg 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-lg 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-lg border border-white/10 bg-white/5 p-2",children:i.length?(0,t.jsx)("div",{className:"space-y-1",children:i.slice(0,8).map(e=>{let a=C===e;return(0,t.jsx)("button",{type:"button",onClick:()=>void Z(r.id,e),className:a?"w-full rounded-lg bg-white/10 px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-primary)]":"w-full rounded-lg 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-lg border border-white/10 bg-white/5 p-3",children:_?(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:_.id}),_.status?(0,t.jsxs)("span",{children:[" • ",_.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=_.approval;if(!d(r))return(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"(No approval info recorded.)"});let a=String(r.state??"").trim(),s="string"==typeof r.requestedAt?r.requestedAt:"",i="string"==typeof r.decidedAt?r.decidedAt:"",l="string"==typeof r.decidedBy?r.decidedBy:"",n="string"==typeof r.note?r.note:"",c=d(r.outbound)?r.outbound:null,m="pending"===a||"waiting_for_approval"===_.status;return(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-white/10 bg-white/5 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:a||"(unknown)"})]}),s?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"requestedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:s})]}):null,i?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"decidedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:i})]}):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,n?(0,t.jsx)("div",{className:"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]",children:n}):null,c?(0,t.jsxs)("div",{className:"mt-2 rounded-lg 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-lg border border-white/10 bg-white/5 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:M,onChange:e=>$(e.target.value),rows:3,className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 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:T,onClick:async()=>{if(P&&C&&confirm(`${r.label} run ${C}?`)){L(!0),O("");try{let t=await fetch("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:P,runId:C,action:r.action,note:M||void 0,decidedBy:"ClawKitchen UI"})}),a=await t.json();if(!t.ok||!a.ok)throw Error(a.error||"Failed to apply approval action");await Z(P,C)}catch(e){O((0,o.errorMessage)(e))}finally{L(!1)}}},className:"rounded-lg 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"}),et.length?(0,t.jsx)("div",{className:"mt-2 space-y-2",children:et.slice(0,20).map((e,r)=>(0,t.jsxs)("div",{className:"rounded-lg border border-white/10 bg-white/5 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-lg 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."]})]})]})]}):C?(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",()=>c])},88143,(e,t,r)=>{"use strict";function a({widthInt:e,heightInt:t,blurWidth:r,blurHeight:a,blurDataURL:s,objectFit:i}){let o=r?40*r:e,l=a?40*a:t,n=o&&l?`viewBox='0 0 ${o} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${n}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${n?"none":"contain"===i?"xMidYMid":"cover"===i?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${s}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return a}})},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return o}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},8927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return d}}),e.r(33525);let a=e.r(43369),s=e.r(88143),i=e.r(87690),o=["-moz-initial","fill","none","scale-down",void 0];function l(e){return void 0!==e.default}function n(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function d({src:e,sizes:t,unoptimized:r=!1,priority:d=!1,preload:c=!1,loading:m,className:u,quality:x,width:h,height:p,fill:f=!1,style:g,overrideSrc:v,onLoad:b,onLoadingComplete:w,placeholder:y="empty",blurDataURL:j,fetchPriority:k,decoding:N="async",layout:S,objectFit:C,objectPosition:I,lazyBoundary:P,lazyRoot:E,..._},A){var R;let O,M,$,{imgConf:T,showAltText:L,blurComplete:U,defaultLoader:D}=A,F=T||i.imageConfigDefault;if("allSizes"in F)O=F;else{let e=[...F.deviceSizes,...F.imageSizes].sort((e,t)=>e-t),t=F.deviceSizes.sort((e,t)=>e-t),r=F.qualities?.sort((e,t)=>e-t);O={...F,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===D)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let z=_.loader||D;delete _.loader,delete _.srcSet;let B="__next_img_default"in z;if(B){if("custom"===O.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
8
+ Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=z;z=t=>{let{config:r,...a}=t;return e(a)}}if(S){"fill"===S&&(f=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[S];e&&(g={...g,...e});let r={responsive:"100vw",fill:"100vw"}[S];r&&!t&&(t=r)}let q="",J=n(h),W=n(p);if((R=e)&&"object"==typeof R&&(l(R)||void 0!==R.src)){let t=l(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(M=t.blurWidth,$=t.blurHeight,j=j||t.blurDataURL,q=t.src,!f)if(J||W){if(J&&!W){let e=J/t.width;W=Math.round(t.height*e)}else if(!J&&W){let e=W/t.height;J=Math.round(t.width*e)}}else J=t.width,W=t.height}let G=!d&&!c&&("lazy"===m||void 0===m);(!(e="string"==typeof e?e:q)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,G=!1),O.unoptimized&&(r=!0),B&&!O.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let K=n(x),H=Object.assign(f?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:I}:{},L?{}:{color:"transparent"},g),X=U||"empty"===y?null:"blur"===y?`url("data:image/svg+xml;charset=utf-8,${(0,s.getImageBlurSvg)({widthInt:J,heightInt:W,blurWidth:M,blurHeight:$,blurDataURL:j||"",objectFit:H.objectFit})}")`:`url("${y}")`,V=o.includes(H.objectFit)?"fill"===H.objectFit?"100% 100%":"cover":H.objectFit,Y=X?{backgroundSize:V,backgroundPosition:H.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:X}:{},Q=function({config:e,src:t,unoptimized:r,width:s,quality:i,sizes:o,loader:l}){if(r){let e=(0,a.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")&&e){let r=t.includes("?")?"&":"?";t=`${t}${r}dpl=${e}`}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:n,kind:d}=function({deviceSizes:e,allSizes:t},r,a){if(a){let r=/(^|\s)(1?\d?\d)vw/g,s=[];for(let e;e=r.exec(a);)s.push(parseInt(e[2]));if(s.length){let r=.01*Math.min(...s);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,s,o),c=n.length-1;return{sizes:o||"w"!==d?o:"100vw",srcSet:n.map((r,a)=>`${l({config:e,src:t,quality:i,width:r})} ${"w"===d?r:a+1}${d}`).join(", "),src:l({config:e,src:t,quality:i,width:n[c]})}}({config:O,src:e,unoptimized:r,width:J,quality:K,sizes:t,loader:z}),Z=G?"lazy":m;return{props:{..._,loading:Z,fetchPriority:k,width:J,height:W,decoding:N,className:u,style:{...H,...Y},sizes:Q.sizes,srcSet:Q.srcSet,src:v||Q.src},meta:{unoptimized:r,preload:c||d,placeholder:y,fill:f}}}},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let a=e.r(71645),s="u"<typeof window,i=s?()=>{}:a.useLayoutEffect,o=s?()=>{}:a.useEffect;function l(e){let{headManager:t,reduceComponentsToState:r}=e;function l(){if(t&&t.mountedInstances){let e=a.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return s&&(t?.mountedInstances?.add(e.children),l()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=l),()=>{t&&(t._pendingUpdate=l)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},25633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return p},defaultHead:function(){return m}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=e.r(55682),o=e.r(90809),l=e.r(18050),n=o._(e.r(71645)),d=i._(e.r(98879)),c=e.r(42732);function m(){return[(0,l.jsx)("meta",{charSet:"utf-8"},"charset"),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function u(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===n.default.Fragment?e.concat(n.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let x=["name","httpEquiv","charSet","itemProp"];function h(e){let t,r,a,s;return e.reduce(u,[]).reverse().concat(m().reverse()).filter((t=new Set,r=new Set,a=new Set,s={},e=>{let i=!0,o=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){o=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?i=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?i=!1:r.add(e.type);break;case"meta":for(let t=0,r=x.length;t<r;t++){let r=x[t];if(e.props.hasOwnProperty(r))if("charSet"===r)a.has(r)?i=!1:a.add(r);else{let t=e.props[r],a=s[r]||new Set;("name"!==r||!o)&&a.has(t)?i=!1:(a.add(t),s[r]=a)}}}return i})).reverse().map((e,t)=>{let r=e.key||t;return n.default.cloneElement(e,{key:r})})}let p=function({children:e}){let t=(0,n.useContext)(c.HeadManagerContext);return(0,l.jsx)(d.default,{reduceComponentsToState:h,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18556,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let a=e.r(55682)._(e.r(71645)),s=e.r(87690),i=a.default.createContext(s.imageConfigDefault)},65856,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return a}});let a=e.r(55682)._(e.r(71645)).default.createContext(null)},70965,(e,t,r)=>{"use strict";function a(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,0):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return a}})},1948,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let a=e.r(70965),s=e.r(43369);function i({config:e,src:t,width:r,quality:i}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
9
+ Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let o=(0,a.findClosestQuality)(i,e),l=(0,s.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${o}${t.startsWith("/")&&l?`&dpl=${l}`:""}`}i.__next_img_default=!0;let o=i},5500,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return w}});let a=e.r(55682),s=e.r(90809),i=e.r(18050),o=s._(e.r(71645)),l=a._(e.r(74080)),n=a._(e.r(25633)),d=e.r(8927),c=e.r(87690),m=e.r(18556);e.r(33525);let u=e.r(65856),x=a._(e.r(1948)),h=e.r(18581),p={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function f(e,t,r,a,s,i,o){let l=e?.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&s(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let a=!1,s=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>a,isPropagationStopped:()=>s,persist:()=>{},preventDefault:()=>{a=!0,t.preventDefault()},stopPropagation:()=>{s=!0,t.stopPropagation()}})}a?.current&&a.current(e)}}))}function g(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let v=(0,o.forwardRef)(({src:e,srcSet:t,sizes:r,height:a,width:s,decoding:l,className:n,style:d,fetchPriority:c,placeholder:m,loading:u,unoptimized:x,fill:p,onLoadRef:v,onLoadingCompleteRef:b,setBlurComplete:w,setShowAltText:y,sizesInput:j,onLoad:k,onError:N,...S},C)=>{let I=(0,o.useCallback)(e=>{e&&(N&&(e.src=e.src),e.complete&&f(e,m,v,b,w,x,j))},[e,m,v,b,w,N,x,j]),P=(0,h.useMergedRef)(C,I);return(0,i.jsx)("img",{...S,...g(c),loading:u,width:s,height:a,decoding:l,"data-nimg":p?"fill":"1",className:n,style:d,sizes:r,srcSet:t,src:e,ref:P,onLoad:e=>{f(e.currentTarget,m,v,b,w,x,j)},onError:e=>{y(!0),"empty"!==m&&w(!0),N&&N(e)}})});function b({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...g(t.fetchPriority)};return e&&l.default.preload?(l.default.preload(t.src,r),null):(0,i.jsx)(n.default,{children:(0,i.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let w=(0,o.forwardRef)((e,t)=>{let r=(0,o.useContext)(u.RouterContext),a=(0,o.useContext)(m.ImageConfigContext),s=(0,o.useMemo)(()=>{let e=p||a||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),s=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:s,localPatterns:"u"<typeof window?a?.localPatterns:e.localPatterns}},[a]),{onLoad:l,onLoadingComplete:n}=e,h=(0,o.useRef)(l);(0,o.useEffect)(()=>{h.current=l},[l]);let f=(0,o.useRef)(n);(0,o.useEffect)(()=>{f.current=n},[n]);let[g,w]=(0,o.useState)(!1),[y,j]=(0,o.useState)(!1),{props:k,meta:N}=(0,d.getImgProps)(e,{defaultLoader:x.default,imgConf:s,blurComplete:g,showAltText:y});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v,{...k,unoptimized:N.unoptimized,placeholder:N.placeholder,fill:N.fill,onLoadRef:h,onLoadingCompleteRef:f,setBlurComplete:w,setShowAltText:j,sizesInput:e.sizes,ref:t}),N.preload?(0,i.jsx)(b,{isAppRouter:!r,imgAttributes:k}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},94909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return c},getImageProps:function(){return d}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=e.r(55682),o=e.r(8927),l=e.r(5500),n=i._(e.r(1948));function d(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:n.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let c=l.Image},57688,(e,t,r)=>{t.exports=e.r(94909)},37121,34011,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg"]),r=new Set(["mp4","webm","mov","avi","mkv","ogv"]),a=new Set(["mp3","wav","ogg","m4a","aac","flac","webm"]);function s(e){return e.toLowerCase().split(".").pop()??""}function i(e){return t.has(s(e))}function o(e){return r.has(s(e))}function l(e){return a.has(s(e))}let n={mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo",mkv:"video/x-matroska",ogv:"video/ogg",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",flac:"audio/flac"};function d(e){return n[s(e)]??""}e.s(["isAudioFile",()=>l,"isImageFile",()=>i,"isVideoFile",()=>o,"mimeForFile",()=>d],37121);var c=e.i(18050),m=e.i(57688);function u(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(1))+" "+["B","KB","MB","GB"][t]}function x(e){return({png:"🖼️",jpg:"🖼️",jpeg:"🖼️",gif:"🖼️",webp:"🖼️",svg:"🖼️",mp4:"🎬",webm:"🎬",mov:"🎬",avi:"🎬",mkv:"🎬",ogv:"🎬",mp3:"🎵",wav:"🎵",ogg:"🎵",m4a:"🎵",aac:"🎵",flac:"🎵",json:"📋",md:"📝",txt:"📄",html:"🌐",pdf:"📕"})[e.toLowerCase().split(".").pop()??""]??"📎"}function h({deliverable:e,fileUrl:t,maxMediaHeight:r="400px",onDownload:a}){return e?(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"mb-3 pb-3 border-b border-white/10",children:[(0,c.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,c.jsx)("span",{className:"text-lg",children:x(e.fileName)}),(0,c.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] text-sm break-all",children:e.fileName})]}),(0,c.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] space-y-1",children:[(0,c.jsxs)("div",{children:["Size: ",u(e.size)]}),(0,c.jsxs)("div",{children:["Modified: ",function(e){try{return new Date(e).toLocaleString()}catch{return e}}(e.mtime)]}),(0,c.jsxs)("div",{children:["Path: ",e.relativePath]})]})]}),i(e.fileName)?(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Image Preview:"}),(0,c.jsx)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-2 overflow-hidden",children:(0,c.jsx)(m.default,{src:t,alt:e.fileName,width:800,height:600,className:"w-full h-auto rounded-lg object-contain",style:{maxHeight:r},unoptimized:!0})}),(0,c.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,c.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Open full size ↗"}),(0,c.jsx)("button",{onClick:a,className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download"})]})]}):o(e.fileName)?(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Video Preview:"}),(0,c.jsx)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-2 overflow-hidden",children:(0,c.jsxs)("video",{src:t,controls:!0,className:"w-full rounded-lg",style:{maxHeight:r},preload:"metadata",children:[(0,c.jsx)("source",{src:t,type:d(e.fileName)}),"Your browser does not support video playback."]})}),(0,c.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,c.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Open full size ↗"}),(0,c.jsx)("button",{onClick:a,className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download"})]})]}):l(e.fileName)?(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Audio Preview:"}),(0,c.jsx)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-2",children:(0,c.jsxs)("audio",{src:t,controls:!0,className:"w-full",preload:"metadata",children:[(0,c.jsx)("source",{src:t,type:d(e.fileName)}),"Your browser does not support audio playback."]})}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)("button",{onClick:a,className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download"})})]}):e.isText&&e.contentPreview?(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Content Preview:"}),(0,c.jsx)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-3 overflow-auto",style:{maxHeight:r},children:(0,c.jsx)("pre",{className:"text-xs text-[color:var(--ck-text-primary)] whitespace-pre-wrap break-words",children:e.contentPreview})})]}):(0,c.jsxs)("div",{className:"text-center py-6",children:[(0,c.jsx)("div",{className:"text-3xl mb-2",children:x(e.fileName)}),(0,c.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-secondary)] mb-2",children:[u(e.size)," · ",e.fileName.split(".").pop()?.toUpperCase()," file"]}),(0,c.jsx)("button",{onClick:a,className:"text-xs px-3 py-1.5 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download file"})]})]}):(0,c.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)] italic",children:"Select a deliverable to preview"})}e.s(["DeliverablePreviewPanel",()=>h],34011)},529,e=>{"use strict";var t=e.i(18050),r=e.i(57688),a=e.i(22016),s=e.i(71645),i=e.i(18566),o=e.i(37121),l=e.i(34011);function n(e,t){return`/api/teams/workflow-deliverables/file?teamId=${encodeURIComponent(e)}&runId=${encodeURIComponent(t.runId)}&path=${encodeURIComponent(t.relativePath)}`}function d(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(1))+" "+["B","KB","MB","GB"][t]}function c(e){try{return new Date(e).toLocaleString()}catch{return e}}function m(e){switch(e.toLowerCase().split(".").pop()){case"md":return"📝";case"json":return"🔧";case"txt":default:return"📄";case"html":case"htm":return"🌐";case"css":return"🎨";case"js":case"ts":case"tsx":case"jsx":return"⚙️";case"png":case"jpg":case"jpeg":case"gif":case"webp":return"🖼️";case"pdf":return"📋";case"zip":case"tar":case"gz":return"📦"}}function u({teamId:e,deliverables:u,workflows:x}){let h=(0,i.useRouter)(),[p,f]=(0,s.useState)(""),[g,v]=(0,s.useState)(""),[b,w]=(0,s.useState)(""),[y,j]=(0,s.useState)(null),k=(0,s.useMemo)(()=>{let e=b.trim().toLowerCase();return u.filter(t=>{if(p&&t.workflowId!==p||g&&t.runId!==g)return!1;if(!e)return!0;let r=x[t.workflowId]?.name??"";return t.fileName.toLowerCase().includes(e)||t.workflowId.toLowerCase().includes(e)||t.runId.toLowerCase().includes(e)||r.toLowerCase().includes(e)||t.contentPreview&&t.contentPreview.toLowerCase().includes(e)})},[u,b,p,g,x]),N=(0,s.useMemo)(()=>Array.from(new Set(u.map(e=>e.workflowId).filter(Boolean))).sort(),[u]),S=(0,s.useMemo)(()=>Array.from(new Set((p?u.filter(e=>e.workflowId===p):u).map(e=>e.runId).filter(Boolean))).sort(),[u,p]),C=async t=>{try{if(t.isText&&t.contentPreview)await navigator.clipboard.writeText(t.contentPreview),alert("Content copied to clipboard!");else{let r=n(e,t),a=document.createElement("a");a.href=r,a.download=t.fileName,document.body.appendChild(a),a.click(),a.remove()}}catch{alert("Failed to download file")}};return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("div",{className:"rounded-3xl border border-white/10 bg-black/10 p-4",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-end gap-3",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:"workflow"}),(0,t.jsxs)("select",{value:p,onChange:e=>{f(e.target.value||""),v("")},className:"mt-1 w-64 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"All workflows"}),N.map(e=>(0,t.jsx)("option",{value:e,children:x[e]?.name?`${x[e]?.name} (${e})`:e},e))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"run"}),(0,t.jsxs)("select",{value:g,onChange:e=>v(e.target.value||""),className:"mt-1 w-56 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"All runs"}),S.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"search"}),(0,t.jsx)("input",{value:b,onChange:e=>w(e.target.value),placeholder:"filename / content",className:"mt-1 w-72 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("button",{type:"button",onClick:()=>h.refresh(),className:"rounded-lg 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:"Refresh"})})]})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,t.jsxs)("div",{className:"lg:col-span-2 rounded-3xl border border-white/10 bg-black/10 p-4",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4",children:"Workflow Deliverables"}),k.length>0?(0,t.jsx)("div",{className:"space-y-2",children:k.map((s,i)=>{let l=y?.absolutePath===s.absolutePath,u=x[s.workflowId]?.name||s.workflowId;return(0,t.jsx)("div",{className:`cursor-pointer rounded-lg border p-3 transition-colors ${l?"border-white/20 bg-white/10":"border-white/5 bg-black/5 hover:bg-white/5"}`,onClick:()=>j(s),children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,o.isImageFile)(s.fileName)&&(0,t.jsx)("div",{className:"flex-shrink-0 w-12 h-12 rounded overflow-hidden bg-white/5 border border-white/10",children:(0,t.jsx)(r.default,{src:n(e,s),alt:s.fileName,width:48,height:48,className:"w-full h-full object-cover",unoptimized:!0})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-lg",children:m(s.fileName)}),(0,t.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] truncate",children:s.fileName}),s.isText&&(0,t.jsx)("span",{className:"text-xs bg-green-500/20 text-green-400 px-1.5 py-0.5 rounded",children:"TEXT"})]}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:u})," · ",(0,t.jsx)("span",{className:"font-mono",children:s.runId})]}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[s.relativePath!==s.fileName&&(0,t.jsxs)("span",{children:[s.relativePath," · "]}),d(s.size)," · ",c(s.mtime)]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),C(s)},className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:s.isText?"Copy":"Download"}),(0,t.jsx)(a.default,{href:`/teams/${e}/runs/${s.workflowId}/${s.runId}`,onClick:e=>e.stopPropagation(),className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"View Run →"})]})]})},`${s.runId}-${s.relativePath}`)})}):(0,t.jsxs)("div",{className:"text-center py-8 text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("div",{className:"text-4xl mb-2",children:"📋"}),(0,t.jsx)("div",{className:"text-lg mb-1",children:"No deliverables found"}),(0,t.jsx)("div",{className:"text-sm",children:"Workflow runs will create deliverables that appear here when they complete."})]}),k.length>0&&(0,t.jsxs)("div",{className:"mt-4 text-xs text-[color:var(--ck-text-tertiary)]",children:["Showing ",k.length," of ",u.length," deliverables."]})]}),(0,t.jsxs)("div",{className:"lg:col-span-1 rounded-3xl border border-white/10 bg-black/10 p-4",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)] mb-3",children:"Preview"}),y?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-3 pb-3 border-b border-white/10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("span",{className:"text-lg",children:m(y.fileName)}),(0,t.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] text-sm break-all",children:y.fileName})]}),(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] space-y-1",children:[(0,t.jsxs)("div",{children:["Size: ",d(y.size)]}),(0,t.jsxs)("div",{children:["Modified: ",c(y.mtime)]}),(0,t.jsxs)("div",{children:["Path: ",y.relativePath]})]})]}),(0,t.jsx)(l.DeliverablePreviewPanel,{deliverable:y,fileUrl:n(e,y),maxMediaHeight:"500px",onDownload:()=>C(y)})]}):(0,t.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)] italic",children:"Select a deliverable to preview"})]})]})]})}e.s(["default",()=>u])},32246,e=>{e.v(e=>Promise.resolve().then(()=>e(74080)))}]);
@@ -2,7 +2,7 @@
2
2
  "id": "kitchen",
3
3
  "name": "ClawKitchen",
4
4
  "description": "Local UI for managing OpenClaw recipes, teams, agents, cron jobs, and skills.",
5
- "version": "0.5.10",
5
+ "version": "0.5.11",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiggai/kitchen",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "main": "openclaw/index.ts",
5
5
  "description": "ClawKitchen - Web-based dashboard for OpenClaw agent teams, workflows, and automation",
6
6
  "author": "@rjdjohnston · rjdjohnston",
@@ -1,3 +0,0 @@
1
- module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},35112,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactDOM},5365,(a,b,c)=>{b.exports=a.x("process",()=>require("process"))},874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},74621,a=>{"use strict";function b(a){return a instanceof Error?a.message:String(a)}a.s(["errorMessage",()=>b])},66063,a=>{"use strict";var b=a.i(87924),c=a.i(35112);function d({open:a,onClose:d,title:e,children:f,error:g,confirmLabel:h,confirmBusyLabel:i,onConfirm:j,confirmDisabled:k,busy:l,confirmButtonClassName:m}){if(!a)return null;let n=l??!1,o=n&&i?i:h,p="confirmation-modal-title";return(0,c.createPortal)((0,b.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,b.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:d,"aria-hidden":"true"}),(0,b.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":p,children:(0,b.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,b.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,b.jsx)("h2",{id:p,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:e}),f,g?(0,b.jsx)("div",{className:"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:g}):null,(0,b.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,b.jsx)("button",{type:"button",onClick:d,className:"rounded-lg 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,b.jsx)("button",{type:"button",disabled:(k??!1)||n,onClick:j,className:m??"rounded-lg 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:o})]})]})})})]}),document.body)}a.s(["ConfirmationModal",()=>d])},88764,a=>{"use strict";var b=a.i(87924),c=a.i(66063);function d({open:a,onClose:d,title:e,entityLabel:f,bodyText:g,onConfirm:h,busy:i,error:j}){return(0,b.jsx)(c.ConfirmationModal,{open:a,onClose:d,title:e,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:h,busy:i,error:j??void 0,children:(0,b.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[e," ",(0,b.jsx)("code",{className:"font-mono",children:f}),"? ",g]})})}function e(a){return function(c){let e=c[a.entityLabelKey];return(0,b.jsx)(d,{open:c.open,onClose:c.onClose,title:a.title,entityLabel:e,bodyText:a.bodyText,onConfirm:c.onConfirm,busy:c.busy,error:c.error})}}let f=e({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),g=e({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),h=e({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),i=e({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});a.s(["DeleteAgentModal",0,f,"DeleteCronJobModal",0,i,"DeleteRecipeModal",0,h,"DeleteTeamModal",0,g],88764)},28268,a=>{"use strict";var b=a.i(87924),c=a.i(35112);function d({open:a,onClose:d,title:e,children:f,size:g="md",hideTitle:h=!1}){if(!a)return null;let i="modal-title";return(0,c.createPortal)((0,b.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,b.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:d,"aria-hidden":"true"}),(0,b.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":i,children:(0,b.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,b.jsxs)("div",{className:`w-full ${{sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-6xl"}[g]} rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-6 shadow-[var(--ck-shadow-2)]`,children:[h?(0,b.jsx)("h2",{id:i,className:"sr-only",children:e}):(0,b.jsx)("h2",{id:i,className:"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4",children:e}),f]})})})]}),document.body)}a.s(["Modal",()=>d])},83519,a=>{"use strict";var b=a.i(87924),c=a.i(71987),d=a.i(38246),e=a.i(72131),f=a.i(50944),g=a.i(9233),h=a.i(95625);function i(a,b){return`/api/teams/workflow-deliverables/file?teamId=${encodeURIComponent(a)}&runId=${encodeURIComponent(b.runId)}&path=${encodeURIComponent(b.relativePath)}`}function j(a){if(0===a)return"0 B";let b=Math.floor(Math.log(a)/Math.log(1024));return parseFloat((a/Math.pow(1024,b)).toFixed(1))+" "+["B","KB","MB","GB"][b]}function k(a){try{return new Date(a).toLocaleString()}catch{return a}}function l(a){switch(a.toLowerCase().split(".").pop()){case"md":return"📝";case"json":return"🔧";case"txt":default:return"📄";case"html":case"htm":return"🌐";case"css":return"🎨";case"js":case"ts":case"tsx":case"jsx":return"⚙️";case"png":case"jpg":case"jpeg":case"gif":case"webp":return"🖼️";case"pdf":return"📋";case"zip":case"tar":case"gz":return"📦"}}function m({teamId:a,deliverables:m,workflows:n}){let o=(0,f.useRouter)(),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(""),[v,w]=(0,e.useState)(null),x=(0,e.useMemo)(()=>{let a=t.trim().toLowerCase();return m.filter(b=>{if(p&&b.workflowId!==p||r&&b.runId!==r)return!1;if(!a)return!0;let c=n[b.workflowId]?.name??"";return b.fileName.toLowerCase().includes(a)||b.workflowId.toLowerCase().includes(a)||b.runId.toLowerCase().includes(a)||c.toLowerCase().includes(a)||b.contentPreview&&b.contentPreview.toLowerCase().includes(a)})},[m,t,p,r,n]),y=(0,e.useMemo)(()=>Array.from(new Set(m.map(a=>a.workflowId).filter(Boolean))).sort(),[m]),z=(0,e.useMemo)(()=>Array.from(new Set((p?m.filter(a=>a.workflowId===p):m).map(a=>a.runId).filter(Boolean))).sort(),[m,p]),A=async b=>{try{if(b.isText&&b.contentPreview)await navigator.clipboard.writeText(b.contentPreview),alert("Content copied to clipboard!");else{let c=i(a,b),d=document.createElement("a");d.href=c,d.download=b.fileName,document.body.appendChild(d),d.click(),d.remove()}}catch{alert("Failed to download file")}};return(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsx)("div",{className:"rounded-3xl border border-white/10 bg-black/10 p-4",children:(0,b.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,b.jsxs)("label",{className:"block",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"workflow"}),(0,b.jsxs)("select",{value:p,onChange:a=>{q(a.target.value||""),s("")},className:"mt-1 w-64 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,b.jsx)("option",{value:"",children:"All workflows"}),y.map(a=>(0,b.jsx)("option",{value:a,children:n[a]?.name?`${n[a]?.name} (${a})`:a},a))]})]}),(0,b.jsxs)("label",{className:"block",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"run"}),(0,b.jsxs)("select",{value:r,onChange:a=>s(a.target.value||""),className:"mt-1 w-56 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,b.jsx)("option",{value:"",children:"All runs"}),z.map(a=>(0,b.jsx)("option",{value:a,children:a},a))]})]}),(0,b.jsxs)("label",{className:"block",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"search"}),(0,b.jsx)("input",{value:t,onChange:a=>u(a.target.value),placeholder:"filename / content",className:"mt-1 w-72 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,b.jsx)("div",{className:"flex items-center gap-2",children:(0,b.jsx)("button",{type:"button",onClick:()=>o.refresh(),className:"rounded-lg 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:"Refresh"})})]})}),(0,b.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,b.jsxs)("div",{className:"lg:col-span-2 rounded-3xl border border-white/10 bg-black/10 p-4",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4",children:"Workflow Deliverables"}),x.length>0?(0,b.jsx)("div",{className:"space-y-2",children:x.map((e,f)=>{let h=v?.absolutePath===e.absolutePath,m=n[e.workflowId]?.name||e.workflowId;return(0,b.jsx)("div",{className:`cursor-pointer rounded-lg border p-3 transition-colors ${h?"border-white/20 bg-white/10":"border-white/5 bg-black/5 hover:bg-white/5"}`,onClick:()=>w(e),children:(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,g.isImageFile)(e.fileName)&&(0,b.jsx)("div",{className:"flex-shrink-0 w-12 h-12 rounded overflow-hidden bg-white/5 border border-white/10",children:(0,b.jsx)(c.default,{src:i(a,e),alt:e.fileName,width:48,height:48,className:"w-full h-full object-cover",unoptimized:!0})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-lg",children:l(e.fileName)}),(0,b.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] truncate",children:e.fileName}),e.isText&&(0,b.jsx)("span",{className:"text-xs bg-green-500/20 text-green-400 px-1.5 py-0.5 rounded",children:"TEXT"})]}),(0,b.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[(0,b.jsx)("span",{className:"font-mono",children:m})," · ",(0,b.jsx)("span",{className:"font-mono",children:e.runId})]}),(0,b.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[e.relativePath!==e.fileName&&(0,b.jsxs)("span",{children:[e.relativePath," · "]}),j(e.size)," · ",k(e.mtime)]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:a=>{a.stopPropagation(),A(e)},className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:e.isText?"Copy":"Download"}),(0,b.jsx)(d.default,{href:`/teams/${a}/runs/${e.workflowId}/${e.runId}`,onClick:a=>a.stopPropagation(),className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"View Run →"})]})]})},`${e.runId}-${e.relativePath}`)})}):(0,b.jsxs)("div",{className:"text-center py-8 text-[color:var(--ck-text-secondary)]",children:[(0,b.jsx)("div",{className:"text-4xl mb-2",children:"📋"}),(0,b.jsx)("div",{className:"text-lg mb-1",children:"No deliverables found"}),(0,b.jsx)("div",{className:"text-sm",children:"Workflow runs will create deliverables that appear here when they complete."})]}),x.length>0&&(0,b.jsxs)("div",{className:"mt-4 text-xs text-[color:var(--ck-text-tertiary)]",children:["Showing ",x.length," of ",m.length," deliverables."]})]}),(0,b.jsxs)("div",{className:"lg:col-span-1 rounded-3xl border border-white/10 bg-black/10 p-4",children:[(0,b.jsx)("h3",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)] mb-3",children:"Preview"}),v?(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"mb-3 pb-3 border-b border-white/10",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,b.jsx)("span",{className:"text-lg",children:l(v.fileName)}),(0,b.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] text-sm break-all",children:v.fileName})]}),(0,b.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] space-y-1",children:[(0,b.jsxs)("div",{children:["Size: ",j(v.size)]}),(0,b.jsxs)("div",{children:["Modified: ",k(v.mtime)]}),(0,b.jsxs)("div",{children:["Path: ",v.relativePath]})]})]}),(0,b.jsx)(h.DeliverablePreviewPanel,{deliverable:v,fileUrl:i(a,v),maxMediaHeight:"500px",onDownload:()=>A(v)})]}):(0,b.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)] italic",children:"Select a deliverable to preview"})]})]})]})}a.s(["default",()=>m])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__cb91405c._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-dom.ts","../../../../src/lib/errors.ts","../../../../src/components/ConfirmationModal.tsx","../../../../src/components/DeleteEntityModal.tsx","../../../../src/components/delete-modals.tsx","../../../../src/components/Modal.tsx","../../../../src/app/teams/%5BteamId%5D/deliverables/deliverables-client.tsx"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactDOM\n","/**\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 { createPortal } from \"react-dom\";\n\n/** Shared confirmation modal shell: overlay, title, body, optional error, Cancel + Confirm buttons. */\nexport function ConfirmationModal({\n open,\n onClose,\n title,\n children,\n error,\n confirmLabel,\n confirmBusyLabel,\n onConfirm,\n confirmDisabled,\n busy,\n confirmButtonClassName,\n}: {\n open: boolean;\n onClose: () => void;\n title: string;\n children: React.ReactNode;\n /** Optional error message to show above footer */\n error?: string | null;\n confirmLabel: string;\n confirmBusyLabel?: string;\n onConfirm: () => void;\n confirmDisabled?: boolean;\n busy?: boolean;\n /** Override confirm button styles (default: accent red) */\n confirmButtonClassName?: string;\n}) {\n if (!open) return null;\n\n const isDisabled = confirmDisabled ?? false;\n const isBusy = busy ?? false;\n const btnLabel = isBusy && confirmBusyLabel ? confirmBusyLabel : confirmLabel;\n const confirmClass =\n confirmButtonClassName ??\n \"rounded-lg 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\";\n\n const titleId = \"confirmation-modal-title\";\n return createPortal(\n <div className=\"fixed inset-0 z-[200]\">\n <div className=\"fixed inset-0 bg-black/60\" onClick={onClose} aria-hidden=\"true\" />\n <div className=\"fixed inset-0 overflow-y-auto\" role=\"dialog\" aria-modal=\"true\" aria-labelledby={titleId}>\n <div className=\"flex min-h-full items-center justify-center p-4\">\n <div className=\"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-5 shadow-[var(--ck-shadow-2)]\">\n <h2 id={titleId} className=\"text-lg font-semibold text-[color:var(--ck-text-primary)]\">{title}</h2>\n {children}\n\n {error ? (\n <div className=\"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100\">\n {error}\n </div>\n ) : null}\n\n <div className=\"mt-6 flex items-center justify-end gap-2\">\n <button\n type=\"button\"\n onClick={onClose}\n className=\"rounded-lg 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 Cancel\n </button>\n <button\n type=\"button\"\n disabled={isDisabled || isBusy}\n onClick={onConfirm}\n className={confirmClass}\n >\n {btnLabel}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>,\n document.body\n );\n}\n","\"use client\";\n\nimport { ConfirmationModal } from \"./ConfirmationModal\";\n\n/** Shared delete confirmation modal: title, entity label in code, body text. */\nexport function DeleteEntityModal({\n open,\n onClose,\n title,\n entityLabel,\n bodyText,\n onConfirm,\n busy,\n error,\n}: {\n open: boolean;\n onClose: () => void;\n title: string;\n entityLabel: string;\n bodyText: string;\n onConfirm: () => void;\n busy?: boolean;\n error?: string | null;\n}) {\n return (\n <ConfirmationModal\n open={open}\n onClose={onClose}\n title={title}\n confirmLabel=\"Delete\"\n confirmBusyLabel=\"Deleting…\"\n onConfirm={onConfirm}\n busy={busy}\n error={error ?? undefined}\n >\n <p className=\"mt-2 text-sm text-[color:var(--ck-text-secondary)]\">\n {title} <code className=\"font-mono\">{entityLabel}</code>? {bodyText}\n </p>\n </ConfirmationModal>\n );\n}\n","\"use client\";\n\nimport { DeleteEntityModal } from \"./DeleteEntityModal\";\n\ntype EntityLabelKey = \"agentId\" | \"teamId\" | \"recipeId\" | \"jobLabel\";\n\ntype BaseProps = {\n open: boolean;\n onClose: () => void;\n onConfirm: () => void;\n busy?: boolean;\n error?: string | null;\n};\n\nfunction createDeleteModal<K extends EntityLabelKey>(config: {\n title: string;\n bodyText: string;\n entityLabelKey: K;\n}) {\n return function DeleteModal(props: BaseProps & Record<K, string>) {\n const entityLabel = props[config.entityLabelKey];\n return (\n <DeleteEntityModal\n open={props.open}\n onClose={props.onClose}\n title={config.title}\n entityLabel={entityLabel}\n bodyText={config.bodyText}\n onConfirm={props.onConfirm}\n busy={props.busy}\n error={props.error}\n />\n );\n };\n}\n\nexport const DeleteAgentModal = createDeleteModal({\n title: \"Delete agent\",\n bodyText: \"This will remove its workspace/state.\",\n entityLabelKey: \"agentId\",\n});\n\nexport const DeleteTeamModal = createDeleteModal({\n title: \"Delete Team\",\n bodyText: \"This will remove the team workspace, agents, and stamped cron jobs.\",\n entityLabelKey: \"teamId\",\n});\n\nexport const DeleteRecipeModal = createDeleteModal({\n title: \"Delete recipe\",\n bodyText: \"This removes the markdown file from your workspace.\",\n entityLabelKey: \"recipeId\",\n});\n\nexport const DeleteCronJobModal = createDeleteModal({\n title: \"Delete cron job\",\n bodyText: \"This removes it from the Gateway scheduler. You can recreate it later.\",\n entityLabelKey: \"jobLabel\",\n});\n","\"use client\";\n\nimport { createPortal } from \"react-dom\";\n\nexport function Modal({\n open,\n onClose,\n title,\n children,\n size = \"md\",\n hideTitle = false,\n}: {\n open: boolean;\n onClose: () => void;\n title: string;\n children: React.ReactNode;\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n hideTitle?: boolean;\n}) {\n if (!open) return null;\n\n const sizeClasses = {\n sm: \"max-w-md\",\n md: \"max-w-lg\",\n lg: \"max-w-2xl\",\n xl: \"max-w-4xl\",\n full: \"max-w-6xl\"\n };\n\n const titleId = \"modal-title\";\n return createPortal(\n <div className=\"fixed inset-0 z-[200]\">\n <div className=\"fixed inset-0 bg-black/60\" onClick={onClose} aria-hidden=\"true\" />\n <div className=\"fixed inset-0 overflow-y-auto\" role=\"dialog\" aria-modal=\"true\" aria-labelledby={titleId}>\n <div className=\"flex min-h-full items-center justify-center p-4\">\n <div className={`w-full ${sizeClasses[size]} rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-6 shadow-[var(--ck-shadow-2)]`}>\n {hideTitle ? <h2 id={titleId} className=\"sr-only\">{title}</h2> : <h2 id={titleId} className=\"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4\">{title}</h2>}\n {children}\n </div>\n </div>\n </div>\n </div>,\n document.body\n );\n}","\"use client\";\n\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { useMemo, useState } from \"react\";\nimport { useRouter } from \"next/navigation\";\n\nimport type { WorkflowDeliverable } from \"@/app/api/teams/workflow-deliverables/route\";\nimport { isImageFile } from \"@/lib/media-file-utils\";\nimport { DeliverablePreviewPanel } from \"@/components/DeliverablePreviewPanel\";\n\nfunction deliverableFileUrl(teamId: string, d: WorkflowDeliverable): string {\n return `/api/teams/workflow-deliverables/file?teamId=${encodeURIComponent(teamId)}&runId=${encodeURIComponent(d.runId)}&path=${encodeURIComponent(d.relativePath)}`;\n}\n\nfunction formatBytes(bytes: number) {\n if (bytes === 0) return \"0 B\";\n const k = 1024;\n const sizes = [\"B\", \"KB\", \"MB\", \"GB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + \" \" + sizes[i];\n}\n\nfunction formatDate(dateString: string) {\n try {\n return new Date(dateString).toLocaleString();\n } catch {\n return dateString;\n }\n}\n\nfunction getFileIcon(fileName: string) {\n const ext = fileName.toLowerCase().split(\".\").pop();\n switch (ext) {\n case \"md\":\n return \"📝\";\n case \"json\":\n return \"🔧\";\n case \"txt\":\n return \"📄\";\n case \"html\":\n case \"htm\":\n return \"🌐\";\n case \"css\":\n return \"🎨\";\n case \"js\":\n case \"ts\":\n case \"tsx\":\n case \"jsx\":\n return \"⚙️\";\n case \"png\":\n case \"jpg\":\n case \"jpeg\":\n case \"gif\":\n case \"webp\":\n return \"🖼️\";\n case \"pdf\":\n return \"📋\";\n case \"zip\":\n case \"tar\":\n case \"gz\":\n return \"📦\";\n default:\n return \"📄\";\n }\n}\n\nexport default function DeliverablesClient({\n teamId,\n deliverables,\n workflows,\n}: {\n teamId: string;\n deliverables: WorkflowDeliverable[];\n workflows: Record<string, { id: string; name?: string }>;\n}) {\n const router = useRouter();\n const [workflowFilter, setWorkflowFilter] = useState<string>(\"\");\n const [runFilter, setRunFilter] = useState<string>(\"\");\n const [searchQuery, setSearchQuery] = useState<string>(\"\");\n const [selectedDeliverable, setSelectedDeliverable] = useState<WorkflowDeliverable | null>(null);\n\n const filteredDeliverables = useMemo(() => {\n const needle = searchQuery.trim().toLowerCase();\n return deliverables.filter((d) => {\n if (workflowFilter && d.workflowId !== workflowFilter) return false;\n if (runFilter && d.runId !== runFilter) return false;\n if (!needle) return true;\n \n const wfName = workflows[d.workflowId]?.name ?? \"\";\n return (\n d.fileName.toLowerCase().includes(needle) ||\n d.workflowId.toLowerCase().includes(needle) ||\n d.runId.toLowerCase().includes(needle) ||\n wfName.toLowerCase().includes(needle) ||\n (d.contentPreview && d.contentPreview.toLowerCase().includes(needle))\n );\n });\n }, [deliverables, searchQuery, workflowFilter, runFilter, workflows]);\n\n const workflowOptions = useMemo(() => {\n const ids = Array.from(new Set(deliverables.map((d) => d.workflowId).filter(Boolean))).sort();\n return ids;\n }, [deliverables]);\n\n const runOptions = useMemo(() => {\n const filtered = workflowFilter \n ? deliverables.filter(d => d.workflowId === workflowFilter)\n : deliverables;\n const ids = Array.from(new Set(filtered.map((d) => d.runId).filter(Boolean))).sort();\n return ids;\n }, [deliverables, workflowFilter]);\n\n const downloadDeliverable = async (deliverable: WorkflowDeliverable) => {\n try {\n if (deliverable.isText && deliverable.contentPreview) {\n await navigator.clipboard.writeText(deliverable.contentPreview);\n alert(\"Content copied to clipboard!\");\n } else {\n // Download binary files via the file API\n const url = deliverableFileUrl(teamId, deliverable);\n const a = document.createElement(\"a\");\n a.href = url;\n a.download = deliverable.fileName;\n document.body.appendChild(a);\n a.click();\n a.remove();\n }\n } catch {\n alert(\"Failed to download file\");\n }\n };\n\n return (\n <div className=\"flex flex-col gap-4\">\n <div className=\"rounded-3xl border border-white/10 bg-black/10 p-4\">\n <div className=\"flex flex-wrap items-end justify-between gap-3\">\n <div className=\"flex flex-wrap items-end gap-3\">\n <label className=\"block\">\n <div className=\"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]\">workflow</div>\n <select\n value={workflowFilter}\n onChange={(e) => {\n setWorkflowFilter(e.target.value || \"\");\n setRunFilter(\"\"); // Reset run filter when workflow changes\n }}\n className=\"mt-1 w-64 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]\"\n >\n <option value=\"\">All workflows</option>\n {workflowOptions.map((id) => (\n <option key={id} value={id}>\n {workflows[id]?.name ? `${workflows[id]?.name} (${id})` : id}\n </option>\n ))}\n </select>\n </label>\n\n <label className=\"block\">\n <div className=\"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]\">run</div>\n <select\n value={runFilter}\n onChange={(e) => setRunFilter(e.target.value || \"\")}\n className=\"mt-1 w-56 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]\"\n >\n <option value=\"\">All runs</option>\n {runOptions.map((id) => (\n <option key={id} value={id}>\n {id}\n </option>\n ))}\n </select>\n </label>\n\n <label className=\"block\">\n <div className=\"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]\">search</div>\n <input\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n placeholder=\"filename / content\"\n className=\"mt-1 w-72 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]\"\n />\n </label>\n </div>\n\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => router.refresh()}\n className=\"rounded-lg 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 Refresh\n </button>\n </div>\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-3\">\n {/* Deliverables List */}\n <div className=\"lg:col-span-2 rounded-3xl border border-white/10 bg-black/10 p-4\">\n <h2 className=\"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4\">\n Workflow Deliverables\n </h2>\n\n {filteredDeliverables.length > 0 ? (\n <div className=\"space-y-2\">\n {filteredDeliverables.map((deliverable, idx) => {\n const isSelected = selectedDeliverable?.absolutePath === deliverable.absolutePath;\n const wfName = workflows[deliverable.workflowId]?.name || deliverable.workflowId;\n \n return (\n <div\n key={`${deliverable.runId}-${deliverable.relativePath}`}\n className={`cursor-pointer rounded-lg border p-3 transition-colors ${\n isSelected\n ? \"border-white/20 bg-white/10\"\n : \"border-white/5 bg-black/5 hover:bg-white/5\"\n }`}\n onClick={() => setSelectedDeliverable(deliverable)}\n >\n <div className=\"flex items-start justify-between gap-3\">\n {isImageFile(deliverable.fileName) && (\n <div className=\"flex-shrink-0 w-12 h-12 rounded overflow-hidden bg-white/5 border border-white/10\">\n <Image\n src={deliverableFileUrl(teamId, deliverable)}\n alt={deliverable.fileName}\n width={48}\n height={48}\n className=\"w-full h-full object-cover\"\n unoptimized\n />\n </div>\n )}\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-lg\">{getFileIcon(deliverable.fileName)}</span>\n <span className=\"font-medium text-[color:var(--ck-text-primary)] truncate\">\n {deliverable.fileName}\n </span>\n {deliverable.isText && (\n <span className=\"text-xs bg-green-500/20 text-green-400 px-1.5 py-0.5 rounded\">\n TEXT\n </span>\n )}\n </div>\n \n <div className=\"mt-1 text-xs text-[color:var(--ck-text-tertiary)]\">\n <span className=\"font-mono\">{wfName}</span>\n {\" · \"}\n <span className=\"font-mono\">{deliverable.runId}</span>\n </div>\n \n <div className=\"mt-1 text-xs text-[color:var(--ck-text-tertiary)]\">\n {deliverable.relativePath !== deliverable.fileName && (\n <span>{deliverable.relativePath} · </span>\n )}\n {formatBytes(deliverable.size)} · {formatDate(deliverable.mtime)}\n </div>\n </div>\n\n <div className=\"flex items-center gap-2\">\n <button\n onClick={(e) => {\n e.stopPropagation();\n downloadDeliverable(deliverable);\n }}\n className=\"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]\"\n >\n {deliverable.isText ? \"Copy\" : \"Download\"}\n </button>\n <Link\n href={`/teams/${teamId}/runs/${deliverable.workflowId}/${deliverable.runId}`}\n onClick={(e) => e.stopPropagation()}\n className=\"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]\"\n >\n View Run →\n </Link>\n </div>\n </div>\n </div>\n );\n })}\n </div>\n ) : (\n <div className=\"text-center py-8 text-[color:var(--ck-text-secondary)]\">\n <div className=\"text-4xl mb-2\">📋</div>\n <div className=\"text-lg mb-1\">No deliverables found</div>\n <div className=\"text-sm\">\n Workflow runs will create deliverables that appear here when they complete.\n </div>\n </div>\n )}\n\n {filteredDeliverables.length > 0 && (\n <div className=\"mt-4 text-xs text-[color:var(--ck-text-tertiary)]\">\n Showing {filteredDeliverables.length} of {deliverables.length} deliverables.\n </div>\n )}\n </div>\n\n {/* Preview Panel */}\n <div className=\"lg:col-span-1 rounded-3xl border border-white/10 bg-black/10 p-4\">\n <h3 className=\"text-sm font-semibold text-[color:var(--ck-text-primary)] mb-3\">\n Preview\n </h3>\n\n {selectedDeliverable ? (\n <div>\n <div className=\"mb-3 pb-3 border-b border-white/10\">\n <div className=\"flex items-center gap-2 mb-2\">\n <span className=\"text-lg\">{getFileIcon(selectedDeliverable.fileName)}</span>\n <span className=\"font-medium text-[color:var(--ck-text-primary)] text-sm break-all\">\n {selectedDeliverable.fileName}\n </span>\n </div>\n <div className=\"text-xs text-[color:var(--ck-text-tertiary)] space-y-1\">\n <div>Size: {formatBytes(selectedDeliverable.size)}</div>\n <div>Modified: {formatDate(selectedDeliverable.mtime)}</div>\n <div>Path: {selectedDeliverable.relativePath}</div>\n </div>\n </div>\n\n <DeliverablePreviewPanel\n deliverable={selectedDeliverable}\n fileUrl={deliverableFileUrl(teamId, selectedDeliverable)}\n maxMediaHeight=\"500px\"\n onDownload={() => downloadDeliverable(selectedDeliverable)}\n />\n </div>\n ) : (\n <div className=\"text-sm text-[color:var(--ck-text-secondary)] italic\">\n Select a deliverable to preview\n </div>\n )}\n </div>\n </div>\n </div>\n );\n}"],"names":["module","exports","require","vendored","ReactDOM"],"mappings":"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","ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-dom.ts","../../../../src/lib/errors.ts","../../../../src/components/ConfirmationModal.tsx"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactDOM\n","/**\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 { createPortal } from \"react-dom\";\n\n/** Shared confirmation modal shell: overlay, title, body, optional error, Cancel + Confirm buttons. */\nexport function ConfirmationModal({\n open,\n onClose,\n title,\n children,\n error,\n confirmLabel,\n confirmBusyLabel,\n onConfirm,\n confirmDisabled,\n busy,\n confirmButtonClassName,\n}: {\n open: boolean;\n onClose: () => void;\n title: string;\n children: React.ReactNode;\n /** Optional error message to show above footer */\n error?: string | null;\n confirmLabel: string;\n confirmBusyLabel?: string;\n onConfirm: () => void;\n confirmDisabled?: boolean;\n busy?: boolean;\n /** Override confirm button styles (default: accent red) */\n confirmButtonClassName?: string;\n}) {\n if (!open) return null;\n\n const isDisabled = confirmDisabled ?? false;\n const isBusy = busy ?? false;\n const btnLabel = isBusy && confirmBusyLabel ? confirmBusyLabel : confirmLabel;\n const confirmClass =\n confirmButtonClassName ??\n \"rounded-lg 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\";\n\n const titleId = \"confirmation-modal-title\";\n return createPortal(\n <div className=\"fixed inset-0 z-[200]\">\n <div className=\"fixed inset-0 bg-black/60\" onClick={onClose} aria-hidden=\"true\" />\n <div className=\"fixed inset-0 overflow-y-auto\" role=\"dialog\" aria-modal=\"true\" aria-labelledby={titleId}>\n <div className=\"flex min-h-full items-center justify-center p-4\">\n <div className=\"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-5 shadow-[var(--ck-shadow-2)]\">\n <h2 id={titleId} className=\"text-lg font-semibold text-[color:var(--ck-text-primary)]\">{title}</h2>\n {children}\n\n {error ? (\n <div className=\"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100\">\n {error}\n </div>\n ) : null}\n\n <div className=\"mt-6 flex items-center justify-end gap-2\">\n <button\n type=\"button\"\n onClick={onClose}\n className=\"rounded-lg 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 Cancel\n </button>\n <button\n type=\"button\"\n disabled={isDisabled || isBusy}\n onClick={onConfirm}\n className={confirmClass}\n >\n {btnLabel}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>,\n document.body\n );\n}\n"],"names":["module","exports","require","vendored","ReactDOM"],"mappings":"6CAAAA,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEC,QAAQ,yBCE1B,SAAS,EAAa,CAAU,EACrC,OAAO,aAAa,MAAQ,EAAE,OAAO,CAAG,OAAO,EACjD,sECJA,EAAA,EAAA,CAAA,CAAA,OAGO,SAAS,EAAkB,MAChC,CAAI,SACJ,CAAO,OACP,CAAK,UACL,CAAQ,OACR,CAAK,cACL,CAAY,kBACZ,CAAgB,WAChB,CAAS,iBACT,CAAe,CACf,MAAI,wBACJ,CAAsB,CAevB,EACC,GAAI,CAAC,EAAM,OAAO,KAGlB,IAAM,EAAS,GAAQ,GACjB,EAAW,GAAU,EAAmB,EAAmB,EAK3D,EAAU,2BAChB,MAAO,CAAA,EAAA,EAAA,YAAA,AAAY,EACjB,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,kCACb,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,4BAA4B,QAAS,EAAS,cAAY,SACzE,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,gCAAgC,KAAK,SAAS,aAAW,OAAO,kBAAiB,WAC9F,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,2DACb,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,4HACb,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAG,GAAI,EAAS,UAAU,qEAA6D,IACvF,EAEA,EACC,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,2FACZ,IAED,KAEJ,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,qDACb,CAAA,EAAA,EAAA,GAAA,EAAC,SAAA,CACC,KAAK,SACL,QAAS,EACT,UAAU,4IACX,WAGD,CAAA,EAAA,EAAA,GAAA,EAAC,SAAA,CACC,KAAK,SACL,SAAU,CAjCL,IAAmB,CAAA,GAiCA,EACxB,QAAS,EACT,UA/BZ,CA+BuB,EA9BvB,iMAgCa,iBAOb,SAAS,IAAI,CAEjB","ignoreList":[0]}