hive-am 1.2.2 → 1.4.0

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 (148) hide show
  1. package/CHANGELOG.md +34 -1
  2. package/README.md +19 -0
  3. package/package.json +1 -1
  4. package/server/dist/context.js +62 -0
  5. package/server/dist/db/migrations.js +7 -0
  6. package/server/dist/db.js +4 -4
  7. package/server/dist/history/claude.js +8 -2
  8. package/server/dist/http/routes/agents.js +1 -1
  9. package/server/dist/http/validate.js +2 -0
  10. package/server/dist/instructions.js +4 -0
  11. package/server/dist/models.js +2 -0
  12. package/server/dist/objects/index.js +4 -6
  13. package/server/dist/objects/runner.js +20 -0
  14. package/server/dist/objects/supervisor.js +2 -2
  15. package/server/dist/providers/claude.js +13 -1
  16. package/server/dist/providers/opencode-server.js +59 -0
  17. package/server/dist/providers/opencode.js +4 -1
  18. package/server/dist/stats.js +15 -3
  19. package/web/.next/BUILD_ID +1 -1
  20. package/web/.next/app-build-manifest.json +80 -71
  21. package/web/.next/app-path-routes-manifest.json +6 -5
  22. package/web/.next/build-manifest.json +2 -2
  23. package/web/.next/prerender-manifest.json +73 -49
  24. package/web/.next/routes-manifest.json +6 -0
  25. package/web/.next/server/app/_not-found/page.js +1 -1
  26. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  27. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/_not-found.html +1 -1
  29. package/web/.next/server/app/_not-found.rsc +3 -3
  30. package/web/.next/server/app/agents/[id]/page.js +4 -4
  31. package/web/.next/server/app/agents/[id]/page.js.nft.json +1 -1
  32. package/web/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
  33. package/web/.next/server/app/agents/page.js +1 -1
  34. package/web/.next/server/app/agents/page.js.nft.json +1 -1
  35. package/web/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  36. package/web/.next/server/app/agents.html +1 -1
  37. package/web/.next/server/app/agents.rsc +4 -4
  38. package/web/.next/server/app/chat/page.js +2 -0
  39. package/web/.next/server/app/chat/page.js.nft.json +1 -0
  40. package/web/.next/server/app/chat/page_client-reference-manifest.js +1 -0
  41. package/web/.next/server/app/chat.html +1 -0
  42. package/web/.next/server/app/chat.meta +15 -0
  43. package/web/.next/server/app/chat.rsc +25 -0
  44. package/web/.next/server/app/connections/page.js +1 -1
  45. package/web/.next/server/app/connections/page.js.nft.json +1 -1
  46. package/web/.next/server/app/connections/page_client-reference-manifest.js +1 -1
  47. package/web/.next/server/app/connections.html +1 -1
  48. package/web/.next/server/app/connections.rsc +4 -4
  49. package/web/.next/server/app/index.html +1 -1
  50. package/web/.next/server/app/index.rsc +4 -4
  51. package/web/.next/server/app/page.js +1 -1
  52. package/web/.next/server/app/page.js.nft.json +1 -1
  53. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  54. package/web/.next/server/app/relations/page.js +2 -2
  55. package/web/.next/server/app/relations/page.js.nft.json +1 -1
  56. package/web/.next/server/app/relations/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/relations.html +1 -1
  58. package/web/.next/server/app/relations.rsc +4 -4
  59. package/web/.next/server/app/resources/[id]/page.js +2 -2
  60. package/web/.next/server/app/resources/[id]/page.js.nft.json +1 -1
  61. package/web/.next/server/app/resources/[id]/page_client-reference-manifest.js +1 -1
  62. package/web/.next/server/app/resources/page.js +2 -2
  63. package/web/.next/server/app/resources/page.js.nft.json +1 -1
  64. package/web/.next/server/app/resources/page_client-reference-manifest.js +1 -1
  65. package/web/.next/server/app/resources.html +1 -1
  66. package/web/.next/server/app/resources.rsc +4 -4
  67. package/web/.next/server/app/schedules/page.js +1 -1
  68. package/web/.next/server/app/schedules/page.js.nft.json +1 -1
  69. package/web/.next/server/app/schedules/page_client-reference-manifest.js +1 -1
  70. package/web/.next/server/app/schedules.html +1 -1
  71. package/web/.next/server/app/schedules.rsc +4 -4
  72. package/web/.next/server/app/sessions/page.js +2 -2
  73. package/web/.next/server/app/sessions/page.js.nft.json +1 -1
  74. package/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  75. package/web/.next/server/app/sessions.html +1 -1
  76. package/web/.next/server/app/sessions.rsc +4 -4
  77. package/web/.next/server/app/skills/page.js +1 -1
  78. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  79. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/skills.html +1 -1
  81. package/web/.next/server/app/skills.rsc +4 -4
  82. package/web/.next/server/app/types/page.js +1 -1
  83. package/web/.next/server/app/types/page.js.nft.json +1 -1
  84. package/web/.next/server/app/types/page_client-reference-manifest.js +1 -1
  85. package/web/.next/server/app/types.html +1 -1
  86. package/web/.next/server/app/types.rsc +4 -4
  87. package/web/.next/server/app-paths-manifest.json +6 -5
  88. package/web/.next/server/chunks/143.js +1 -1
  89. package/web/.next/server/chunks/148.js +1 -0
  90. package/web/.next/server/chunks/213.js +6 -0
  91. package/web/.next/server/chunks/274.js +1 -1
  92. package/web/.next/server/chunks/368.js +1 -0
  93. package/web/.next/server/chunks/403.js +1 -0
  94. package/web/.next/server/chunks/{790.js → 435.js} +2 -2
  95. package/web/.next/server/chunks/505.js +1 -6
  96. package/web/.next/server/chunks/612.js +1 -1
  97. package/web/.next/server/chunks/716.js +2 -2
  98. package/web/.next/server/pages/404.html +1 -1
  99. package/web/.next/server/pages/500.html +1 -1
  100. package/web/.next/server/server-reference-manifest.json +1 -1
  101. package/web/.next/static/YT6HM6qmegMJaBMX5QvuP/_buildManifest.js +1 -0
  102. package/web/.next/static/chunks/281-113274e705940a55.js +1 -0
  103. package/web/.next/static/chunks/350-0fe82e622e7a670f.js +1 -0
  104. package/web/.next/static/chunks/391-18768499e741112e.js +1 -0
  105. package/web/.next/static/chunks/517-373a80c8ba432bdc.js +1 -0
  106. package/web/.next/static/chunks/587-8e4d2be01ba7d48f.js +1 -0
  107. package/web/.next/static/chunks/606-c9a19918b02a98d0.js +1 -0
  108. package/web/.next/static/chunks/654-92a63b3c4b412666.js +1 -0
  109. package/web/.next/static/chunks/656-f537149fe28f79aa.js +1 -0
  110. package/web/.next/static/chunks/705-f81face97b1bb1af.js +1 -0
  111. package/web/.next/static/chunks/app/agents/[id]/page-6ed6edb3e74b0ebe.js +1 -0
  112. package/web/.next/static/chunks/app/agents/{page-f4c4c80f955f3967.js → page-9bb8cba69776c719.js} +1 -1
  113. package/web/.next/static/chunks/app/chat/page-5261b12b7d50f5d1.js +1 -0
  114. package/web/.next/static/chunks/app/connections/{page-0936beaf02d863c6.js → page-eb11cfb1ffeab3ca.js} +1 -1
  115. package/web/.next/static/chunks/app/layout-fad968a635f9a4b3.js +1 -0
  116. package/web/.next/static/chunks/app/page-99e0351e6ccaa384.js +1 -0
  117. package/web/.next/static/chunks/app/relations/{page-fba25393c8688714.js → page-a44fd515a3b0525e.js} +1 -1
  118. package/web/.next/static/chunks/app/resources/[id]/{page-d110d89bb8b5fca7.js → page-fc494e85b01e8cb7.js} +1 -1
  119. package/web/.next/static/chunks/app/resources/{page-bbd0b450d3f3131d.js → page-61cccd8fdcc2f6c8.js} +1 -1
  120. package/web/.next/static/chunks/app/schedules/{page-a1124397fc760413.js → page-96976fff4ee23538.js} +1 -1
  121. package/web/.next/static/chunks/app/sessions/{page-0e322811b0cde724.js → page-a7534ebd90e982d6.js} +1 -1
  122. package/web/.next/static/chunks/app/skills/{page-22ea0ef89d9f7a13.js → page-bc1acd0663f36129.js} +1 -1
  123. package/web/.next/static/chunks/app/types/{page-18c4e1db2724d41d.js → page-ebd37e220f77c1f3.js} +1 -1
  124. package/web/.next/static/css/582723fcea1f9887.css +1 -0
  125. package/web/.next/trace +30 -29
  126. package/web/.next/types/app/chat/page.ts +84 -0
  127. package/web/.next/types/routes.d.ts +2 -1
  128. package/web/.next/types/validator.ts +9 -0
  129. package/web/.next/server/chunks/306.js +0 -1
  130. package/web/.next/server/chunks/555.js +0 -1
  131. package/web/.next/server/chunks/638.js +0 -1
  132. package/web/.next/server/chunks/802.js +0 -1
  133. package/web/.next/static/7BI__-ayGDTlOrSboD_bT/_buildManifest.js +0 -1
  134. package/web/.next/static/chunks/176-aeaf907a6ea5627d.js +0 -1
  135. package/web/.next/static/chunks/291-efae53ea5f7ee92d.js +0 -1
  136. package/web/.next/static/chunks/350-56599dc3bf06066d.js +0 -1
  137. package/web/.next/static/chunks/486-13e08542f3a1cbac.js +0 -1
  138. package/web/.next/static/chunks/491-6b4e6201f5110dff.js +0 -1
  139. package/web/.next/static/chunks/517-ccaf8cc5c733cbd8.js +0 -1
  140. package/web/.next/static/chunks/581-3ad5c4343dad3f50.js +0 -1
  141. package/web/.next/static/chunks/705-c7e75806f77b880c.js +0 -1
  142. package/web/.next/static/chunks/839-4aefe6e71be6e1ef.js +0 -1
  143. package/web/.next/static/chunks/844-fe55292e0701f436.js +0 -1
  144. package/web/.next/static/chunks/app/agents/[id]/page-3faf40800981a736.js +0 -1
  145. package/web/.next/static/chunks/app/layout-99620746d028dda8.js +0 -1
  146. package/web/.next/static/chunks/app/page-a7f292117b7d76bf.js +0 -1
  147. package/web/.next/static/css/b7a03c62468f4263.css +0 -1
  148. /package/web/.next/static/{7BI__-ayGDTlOrSboD_bT → YT6HM6qmegMJaBMX5QvuP}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[350],{10969:(e,l,t)=>{t.d(l,{Dm:()=>J,Kt:()=>I,Qh:()=>k,WQ:()=>z,q0:()=>F});var s=t(94799),n=t(34023),o=t(72705),r=t(494),a=t(87454),i=t(66477),c=t(4713),d=t(92720),u=t(38950),m=t(97541),p=t(52687),h=t(19431),x=t(90124),j=t(32219),f=t(58311),b=t(84616),y=t(62716),g=t(55267),v=t(5503),w=t(79278),N=t(79141),T=t(56072),_=t(69654);let k=(0,n.createContext)(null),A=e=>e.replace(/^\/home\/[^/]+/,"~");function z(e){let{text:l,label:t,compact:a=!1}=e,{t:i}=(0,_.s9)();null!=t||(t=i("common.copy"));let[c,d]=(0,n.useState)(!1);return(0,s.jsxs)("button",{type:"button",className:"copybtn ".concat(a?"compact":""),"aria-label":t,title:t,onClick:e=>{var t;e.preventDefault(),e.stopPropagation(),null==(t=navigator.clipboard)||t.writeText(l).then(()=>{d(!0),setTimeout(()=>d(!1),1200)}).catch(()=>void 0)},children:[c?(0,s.jsx)(o.A,{size:13}):(0,s.jsx)(r.A,{size:13}),a?null:c?i("common.copied"):t]})}let S=e=>"string"==typeof e?e:null==e?"":JSON.stringify(e),O=function(e){for(var l=arguments.length,t=Array(l>1?l-1:0),s=1;s<l;s++)t[s-1]=arguments[s];for(let l of t)if((null==e?void 0:e[l])!=null&&""!==e[l])return e[l]};function C(e){let{oldText:l,newText:t}=e;return(0,s.jsxs)("div",{className:"diff",children:[l.split("\n").map((e,l)=>(0,s.jsxs)("div",{className:"del",children:[(0,s.jsx)("b",{children:"−"}),e]},"o"+l)),t.split("\n").map((e,l)=>(0,s.jsxs)("div",{className:"add",children:[(0,s.jsx)("b",{children:"+"}),e]},"n"+l))]})}function W(e){let{rows:l}=e;return(0,s.jsx)("dl",{className:"kv",children:l.filter(e=>{let[,l]=e;return void 0!==l&&""!==l&&null!==l}).map(e=>{let[l,t]=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{children:l}),(0,s.jsx)("dd",{children:t})]},l)})})}function F(e){var l,t,n,o,r,N;let k,F=e.input&&"object"==typeof e.input?e.input:{},J=e.name,E=/^mcp__([^_]+(?:_[^_]+)*)__(.+)$/.exec(J),P=(E?E[2]:J).toLowerCase().replace(/[^a-z]/g,""),q="string"==typeof F.code?/tools\.hive\.channel_reply\(\s*\{\s*text\s*:\s*("(?:[^"\\]|\\.)*")/.exec(F.code):null;if(q)try{k=JSON.parse(q[1])}catch(e){}if(P.endsWith("channelreply")||void 0!==k){let e=null!=k?k:S(F.text);return{icon:(0,s.jsx)(a.A,{size:14}),label:(0,_.Tl)("tool.channelReply"),summary:e.replace(/\s+/g," ").slice(0,140),body:(0,s.jsx)("pre",{className:"codebox pre-wrap",children:e})}}let I="string"==typeof F.code?/tools\.hive\.skill_read\(\s*\{\s*name\s*:\s*("(?:[^"\\]|\\.)*")/.exec(F.code):null;if(P.endsWith("skillread")||I){let e=S(F.name);if(I)try{e=JSON.parse(I[1])}catch(e){}return{icon:(0,s.jsx)(i.A,{size:14}),label:(0,_.Tl)("tool.skillRead"),summary:e,body:null}}let $="string"==typeof F.code?/tools\.hive\.channel_send_file\(\s*\{\s*path\s*:\s*("(?:[^"\\]|\\.)*")/.exec(F.code):null;if(P.endsWith("channelsendfile")||$){let e=S(F.path);if($)try{e=JSON.parse($[1])}catch(e){}let l=S(F.caption);return{icon:(0,s.jsx)(c.A,{size:14}),label:(0,_.Tl)("tool.channelSendFile"),summary:e.replace(/^.*[\\/]/,""),body:(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.path"),(0,s.jsx)("span",{className:"mono",children:e},"p")],...l?[[(0,_.Tl)("tool.k.caption"),(0,s.jsx)("span",{children:l},"c")]]:[]]})}}let D="string"==typeof F.code?/tools\.hive\.channel_mute\(\s*\{\s*muted\s*:\s*(true|false)/.exec(F.code):null;if(P.endsWith("channelmute")||D){let e=D?"true"===D[1]:!1!==F.muted;return{icon:e?(0,s.jsx)(d.A,{size:14}):(0,s.jsx)(u.A,{size:14}),label:(0,_.Tl)(e?"tool.channelMute":"tool.channelUnmute"),summary:"",body:null}}if((null==E?void 0:E[1])==="hive"&&"dispatch"===E[2])return{icon:(0,s.jsx)(m.A,{size:14}),label:(0,_.Tl)("tool.delegate"),summary:"".concat(S(F.agent),": ").concat(S(F.task).slice(0,90)),body:(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.subagent"),(0,s.jsx)("b",{children:S(F.agent)},"a")],[(0,_.Tl)("tool.k.task"),(0,s.jsx)("span",{className:"pre-wrap",children:S(F.task)},"t")]]})};if((null==E?void 0:E[1])==="hive")return{icon:(0,s.jsx)(m.A,{size:14}),label:(0,_.Tl)("tool.roster"),summary:"",body:null};if(["bash","shell","executebash","execute","run","runcommand","command"].includes(P)||F.command&&P.includes("bash")){let e=S(O(F,"command","cmd","code","script"));return{icon:(0,s.jsx)(p.A,{size:14}),label:(0,_.Tl)("tool.shell"),kind:"shell",command:e,summary:e,body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"cmdhead",children:[(0,s.jsx)("span",{className:"eyebrow",children:(0,_.Tl)("tool.command")}),(0,s.jsx)(z,{text:e,label:(0,_.Tl)("tool.copyCommand")})]}),(0,s.jsxs)("pre",{className:"cmd",children:[(0,s.jsx)("span",{className:"prompt",children:"$"})," ",e]}),F.description&&(0,s.jsx)("p",{className:"hint",style:{margin:"2px 0 0"},children:S(F.description)}),(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.tool"),(0,s.jsx)("code",{children:J},"n")],[(0,_.Tl)("tool.k.workdir"),F.cwd||F.workdir?(0,s.jsx)("code",{children:A(S(null!=(l=F.cwd)?l:F.workdir))},"c"):""],[(0,_.Tl)("tool.k.timeout"),F.timeout?(0,T.nc)(Number(F.timeout)):""],[(0,_.Tl)("tool.k.background"),F.run_in_background?(0,_.Tl)("common.yes"):""]]})]})}}if(["read","fsread","view","cat"].includes(P)){let e=S(O(F,"file_path","filePath","path","file"));return{icon:(0,s.jsx)(h.A,{size:14}),label:(0,_.Tl)("tool.read"),summary:A(e)||S(F.operations?JSON.stringify(F.operations).slice(0,80):""),body:(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")],[(0,_.Tl)("tool.k.offset"),S(null!=(t=F.offset)?t:"")],[(0,_.Tl)("tool.k.limit"),S(null!=(n=F.limit)?n:"")]]})}}if(["write","fswrite","create","writefile"].includes(P)){let e=S(O(F,"file_path","filePath","path")),l=S(O(F,"content","file_text","text"));return{icon:(0,s.jsx)(x.A,{size:14}),label:(0,_.Tl)("tool.write"),summary:(0,_.Tl)("tool.writeSummary",{path:A(e),count:l.split("\n").length}),body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")]]}),(0,s.jsxs)("pre",{className:"codebox",children:[l.slice(0,4e3),l.length>4e3?"\n…":""]})]})}}if(["edit","strreplace","strreplaceeditor","patch","replace"].includes(P)){let e=S(O(F,"file_path","filePath","path"));return{icon:(0,s.jsx)(j.A,{size:14}),label:(0,_.Tl)("tool.edit"),summary:A(e),body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")],[(0,_.Tl)("tool.k.replaceAll"),F.replace_all?(0,_.Tl)("common.yes"):""]]}),(0,s.jsx)(C,{oldText:S(O(F,"old_string","oldString","old_str")),newText:S(O(F,"new_string","newString","new_str"))})]})}}if("multiedit"===P&&Array.isArray(F.edits)){let e=S(F.file_path);return{icon:(0,s.jsx)(j.A,{size:14}),label:(0,_.Tl)("tool.edit"),summary:(0,_.Tl)("tool.editSummary",{path:A(e),count:F.edits.length}),body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")]]}),F.edits.map((e,l)=>(0,s.jsx)(C,{oldText:S(e.old_string),newText:S(e.new_string)},l))]})}}if(["grep","glob","search","find","ls","list","codesearch"].includes(P)){let e=S(O(F,"pattern","query","glob","path"));return{icon:(0,s.jsx)(f.A,{size:14}),label:J.charAt(0).toUpperCase()+J.slice(1),summary:e,body:(0,s.jsx)(W,{rows:Object.entries(F).map(e=>{let[l,t]=e;return[l,(0,s.jsx)("code",{children:S(t)},l)]})})}}if(["webfetch","websearch","fetch","browser"].includes(P)){let e=S(O(F,"url","query"));return{icon:(0,s.jsx)(b.A,{size:14}),label:J,summary:e,body:(0,s.jsx)(W,{rows:Object.entries(F).map(e=>{let[l,t]=e;return[l,(0,s.jsx)("span",{className:"pre-wrap",children:S(t)},l)]})})}}if(["task","agent","subagent"].includes(P))return{icon:(0,s.jsx)(y.A,{size:14}),label:(0,_.Tl)("tool.subagent"),summary:S(O(F,"description","subagent_type")),body:(0,s.jsx)(W,{rows:[[(0,_.Tl)("tool.k.type"),S(null!=(o=F.subagent_type)?o:"")],[(0,_.Tl)("tool.k.description"),S(null!=(r=F.description)?r:"")],[(0,_.Tl)("tool.k.prompt"),(0,s.jsx)("span",{className:"pre-wrap",children:S(null!=(N=F.prompt)?N:"").slice(0,1500)},"p")]]})};if("todowrite"===P&&Array.isArray(F.todos)){let e=F.todos.filter(e=>"completed"===e.status).length;return{icon:(0,s.jsx)(g.A,{size:14}),label:(0,_.Tl)("tool.plan"),summary:(0,_.Tl)("tool.planSummary",{done:e,total:F.todos.length}),body:(0,s.jsx)("ul",{className:"todos",children:F.todos.map((e,l)=>(0,s.jsxs)("li",{"data-s":e.status,children:[(0,s.jsx)("i",{}),S(e.content)]},l))})}}if((null==E?void 0:E[1])==="claude-in-chrome"){let e=S(F.action),l=S(O(F,"url","query","text","ref","value"))||(Array.isArray(F.coordinate)?F.coordinate.join(", "):""),t="navigate"===P||"tabscreatemcp"===P||"tabscontextmcp"===P||"tabsclosemcp"===P,n=(0,_.Tl)("navigate"===P?"tool.chrome.navigate":"tabscreatemcp"===P?"tool.chrome.tabNew":"tabsclosemcp"===P?"tool.chrome.tabClose":P.startsWith("tabs")?"tool.chrome.tabs":"computer"===P?"tool.chrome.act":"readpage"===P||"getpagetext"===P?"tool.chrome.read":"find"===P?"tool.chrome.find":"forminput"===P?"tool.chrome.form":"javascripttool"===P?"tool.chrome.js":"tool.chrome.other");return{icon:t?(0,s.jsx)(b.A,{size:14}):(0,s.jsx)(v.A,{size:14}),label:n,summary:["computer"===P||"javascripttool"===P?e.replace(/_/g," "):"",l].filter(Boolean).join(" \xb7 ").slice(0,140),body:Object.keys(F).some(e=>"tabId"!==e)?(0,s.jsx)(W,{rows:Object.entries(F).filter(e=>{let[l]=e;return"tabId"!==l}).map(e=>{let[l,t]=e;return[l,(0,s.jsx)("span",{className:"pre-wrap",children:S(t)},l)]})}):null}}let M=Object.entries(F);return{icon:(0,s.jsx)(w.A,{size:14}),label:E?"".concat(E[1]," \xb7 ").concat(E[2]):J,summary:M.length?S(M[0][1]).slice(0,100):"",body:M.length?(0,s.jsx)("pre",{className:"codebox",children:JSON.stringify(F,null,2)}):null}}function J(e){var l,t,o,r;let{tool:a,streaming:i}=e,{t:c}=(0,_.s9)(),d=F(a),u=void 0!==a.output,m=!u&&!!i,[,p]=(0,n.useState)(0);(0,n.useEffect)(()=>{if(!m)return;let e=setInterval(()=>p(e=>e+1),500);return()=>clearInterval(e)},[m]);let h=null!=(t=a.durationMs)?t:m&&a.startedAt?Date.now()-a.startedAt:void 0,x=null!=(o=a.output)?o:"",j=x?x.split("\n").length:0,f="shell"===d.kind&&u?null==(l=/(?:^|\n)Exit code:?\s*(-?\d+)/i.exec(x))?void 0:l[1]:void 0,b=(0,n.useContext)(k),[y,g]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{null!==b&&g(b)},[b]),(0,s.jsxs)("details",{className:"fold tool ".concat("shell"===d.kind?"is-shell":""," ").concat(a.error?"err":""," ").concat(m?"running":""),open:y,onToggle:e=>g(e.currentTarget.open),children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)("span",{className:"tico",children:d.icon}),(0,s.jsx)("b",{className:"tlabel",children:d.label}),(0,s.jsxs)("span",{className:"tsum mono",title:null!=(r=d.command)?r:d.summary,children:["shell"===d.kind&&(0,s.jsx)("span",{className:"prompt",children:"$ "}),d.summary]}),(0,s.jsxs)("span",{className:"tmeta",children:[void 0!==f&&"0"!==f&&(0,s.jsx)("span",{className:"tbad",children:c("tool.exit",{code:f})}),a.error&&void 0===f&&(0,s.jsx)("span",{className:"tbad",children:c("tool.failed")}),u&&!a.error&&j>0&&(0,s.jsx)("span",{children:c("tool.lines",{count:j})}),void 0!==h&&(0,s.jsx)("span",{className:m?"live":"",children:(0,T.nc)(h)}),m&&(0,s.jsx)("i",{className:"dot run"})]}),(0,s.jsx)(N.A,{size:14,className:"chev"})]}),(0,s.jsxs)("div",{className:"tbody",children:[d.body,u&&(0,s.jsxs)("div",{className:"tout",children:[(0,s.jsxs)("div",{className:"cmdhead",children:[(0,s.jsx)("span",{className:"eyebrow",children:c("tool.output")}),x&&(0,s.jsx)(z,{text:x,label:c("tool.copyOutput")})]}),(0,s.jsx)("pre",{children:x?x.length>12e3?x.slice(0,12e3)+"\n".concat(c("tool.truncated")):x:c("tool.noOutput")})]})]})]})}let E=["write","fswrite","create","writefile"],P=["edit","strreplace","strreplaceeditor","patch","replace","multiedit"],q=e=>"string"==typeof e&&e?e.split("\n").length:0;function I(e){let{blocks:l}=e,{t}=(0,_.s9)(),n=function(e){let l=new Map;for(let i of e){var t,s,n,o,r,a;if("tool"!==i.type||i.error)continue;let e=i.input&&"object"==typeof i.input?i.input:{},c=(null!=(s=null==(t=/^mcp__.+?__(.+)$/.exec(i.name))?void 0:t[1])?s:i.name).toLowerCase().replace(/[^a-z]/g,""),d=E.includes(c);if(!d&&!P.includes(c))continue;let u=S(O(e,"file_path","filePath","path"));if(!u)continue;let m=Array.isArray(e.edits)?e.edits:[e],p=d?q(O(e,"content","file_text","text")):m.reduce((e,l)=>e+q(O(l,"new_string","newString","new_str")),0),h=d?0:m.reduce((e,l)=>e+q(O(l,"old_string","oldString","old_str")),0),x=l.get(u),j=[...null!=(n=null==x?void 0:x.hunks)?n:[]];if(!d)for(let e of m)j.push({old:S(O(e,"old_string","oldString","old_str")),new:S(O(e,"new_string","newString","new_str"))});l.set(u,{path:u,created:null!=(o=null==x?void 0:x.created)&&o||d,added:(null!=(r=null==x?void 0:x.added)?r:0)+p,removed:(null!=(a=null==x?void 0:x.removed)?a:0)+h,hunks:j,content:d?S(O(e,"content","file_text","text")):null==x?void 0:x.content})}return[...l.values()]}(l);return n.length?(0,s.jsxs)("details",{className:"fold changed",open:n.length<=5,children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)(j.A,{size:14}),t("chat.changedFiles",{count:n.length}),(0,s.jsx)(N.A,{size:14,className:"chev"})]}),(0,s.jsx)("div",{className:"cf-list",children:n.map(e=>(0,s.jsxs)("details",{className:"cf-file",children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)(N.A,{size:12,className:"chev"}),(0,s.jsx)("code",{title:e.path,children:A(e.path)}),(0,s.jsxs)("span",{className:"cf-meta",children:[e.created&&(0,s.jsx)("em",{children:t("chat.fileWritten")}),e.added>0&&(0,s.jsxs)("span",{className:"cf-add",children:["+",e.added]}),e.removed>0&&(0,s.jsxs)("span",{className:"cf-del",children:["−",e.removed]})]})]}),(0,s.jsxs)("div",{className:"cf-body",children:[e.hunks.map((e,l)=>(0,s.jsx)(C,{oldText:e.old,newText:e.new},l)),void 0!==e.content&&0===e.hunks.length&&(0,s.jsxs)("pre",{className:"codebox",children:[e.content.slice(0,6e3),e.content.length>6e3?"\n…":""]})]})]},e.path))})]}):null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[391],{494:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},2432:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},3492:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]])},4713:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]])},5503:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]])},6673:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},7991:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},19431:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},20555:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]])},26701:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},29416:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},32219:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]])},32335:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]])},33691:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]])},34978:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Container",[["path",{d:"M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z",key:"1t2lqe"}],["path",{d:"M10 21.9V14L2.1 9.1",key:"o7czzq"}],["path",{d:"m10 14 11.9-6.9",key:"zm5e20"}],["path",{d:"M14 19.8v-8.1",key:"159ecu"}],["path",{d:"M18 17.5V9.4",key:"11uown"}]])},38950:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]])},47405:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},52263:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]])},52687:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]])},55267:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]])},55712:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},55838:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]])},62716:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},64883:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]])},66477:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},66654:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},66826:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},70283:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},71529:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},73784:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]])},73885:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]])},77841:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]])},79141:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},79278:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},83372:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},84616:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},87454:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},89075:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},90124:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},91833:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]])},92720:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]])},92947:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},97356:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},97541:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]])},98148:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]])},98392:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]])},98938:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},99579:(e,a,t)=>{t.d(a,{A:()=>y});let y=(0,t(74955).A)("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[517],{1517:(e,l,n)=>{n.d(l,{b:()=>h,t:()=>p});var s=n(94799),r=n(34023),t=n(43624),i=n(10804),o=n(5300),a=n(48538),c=n(73506),d=n(3749),m=n(47890),u=n(69654);let p="default-objects";function h(e){var l,n;let{onClose:h,onCreated:f,presetTypeId:v,presetColonyId:b,presetObjectId:g,manager:j=!1}=e,{t:x}=(0,u.s9)(),{types:k,agents:y,refresh:w,colonies:_}=(0,a.q5)(),N=(0,i.dj)(),C=(0,t.useRouter)(),[A,D]=(0,r.useState)(v||j?"form":"type"),[S,E]=(0,r.useState)(()=>{let e={...(0,o.WU)(k.find(e=>e.id===v)),colony_id:null!=b?b:null,object_ids:g?[g]:[]};return j?{...e,description:x("obj.manager.description"),permission:"acceptEdits",skill_ids:[...new Set([...e.skill_ids,p])],skill_loads:{...e.skill_loads,[p]:"always"}}:e}),[q,z]=(0,r.useState)(()=>JSON.stringify(S)),F=e=>{E(e),z(JSON.stringify(e)),D("form")},L=(0,r.useRef)(!1),M=JSON.stringify(S)!==q;(0,c.h)(M&&!L.current);let[O,T]=(0,r.useState)(!1),[P,R]=(0,r.useState)(!1),[K,U]=(0,r.useState)(!1),H=(0,o.tf)(S,y,void 0,_),B=async()=>{if(U(!0),!Object.keys(H).length){R(!0);try{let{object_ids:e,...l}=S,n=await d.FH.post("/agents",l);e.length&&await d.FH.put("/agents/".concat(n.id,"/resources"),{object_ids:e}).catch(e=>N(e instanceof Error?e.message:"","err")),await w(["agents","colonies","objects"]),N(x("newAgent.created",{name:n.name})),L.current=!0,null==f||f(n.id),h(),C.push("/agents/".concat(n.id))}catch(e){N(e instanceof Error?e.message:x("newAgent.failed"),"err"),R(!1)}}};return"type"===A?(0,s.jsx)(i._s,{title:x("newAgent.title"),subtitle:x("newAgent.pickType"),onClose:h,children:(0,s.jsxs)("div",{className:"col gap-m",children:[k.map(e=>(0,s.jsxs)("button",{className:"card card-pad row gap-l cx-typecard",onClick:()=>{F({...(0,o.WU)(e),colony_id:null!=b?b:null,object_ids:g?[g]:[]})},children:[(0,s.jsx)(i._h,{color:m.xq[e.provider].color,queen:"orchestrator"===e.role,label:e.name.slice(0,2).toUpperCase()}),(0,s.jsxs)("div",{className:"grow",children:[(0,s.jsx)("b",{className:"cx-pick-title",children:e.name}),(0,s.jsx)("div",{className:"muted small",children:e.description||x("newAgent.typeFallback",{role:x("role.".concat(e.role)),provider:m.xq[e.provider].label})})]}),(0,s.jsx)("span",{className:"chip",children:m.xq[e.provider].short})]},e.id)),(0,s.jsxs)("button",{className:"card card-pad row gap-l cx-typecard blank",onClick:()=>{F({...(0,o.WU)(),colony_id:null!=b?b:null,object_ids:g?[g]:[]})},children:[(0,s.jsx)(i._h,{color:"var(--muted)",label:"+"}),(0,s.jsxs)("div",{className:"grow",children:[(0,s.jsx)("b",{className:"cx-pick-title",children:x("newAgent.blank")}),(0,s.jsx)("div",{className:"muted small",children:x("newAgent.blankHint")})]})]})]})},"type"):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i._s,{title:x("newAgent.title"),subtitle:j?x("obj.manager.subtitle"):S.type_id?x("newAgent.fromType",{name:null!=(n=null==(l=k.find(e=>e.id===S.type_id))?void 0:l.name)?n:""}):x("newAgent.blank"),onClose:()=>{!M||L.current?h():T(!0)},footer:(0,s.jsxs)(s.Fragment,{children:[!v&&!j&&(0,s.jsx)("button",{className:"btn ghost",onClick:()=>D("type"),children:x("common.back")}),(0,s.jsx)("button",{className:"btn primary",disabled:P,onClick:B,children:P?x("newAgent.creating"):x("newAgent.create")})]}),children:(0,s.jsx)(o.SU,{draft:S,onChange:E,errors:K?H:{},focusName:!0})},"form"),O&&(0,s.jsx)(i.TM,{danger:!0,title:x("fa.unsaved.title"),body:x("fa.unsaved.body"),confirmLabel:x("fa.unsaved.discard"),cancelLabel:x("fa.unsaved.keep"),onClose:()=>T(!1),onConfirm:h})]})}},5300:(e,l,n)=>{n.d(l,{SU:()=>j,TN:()=>v,WU:()=>f,tf:()=>g});var s=n(94799),r=n(34023),t=n(12646),i=n(69654),o=n(56072),a=n(10804),c=n(48538),d=n(22214),m=n(47890),u=n(28941),p=n(7708),h=n(52974);let f=e=>{var l,n,s,r,t,i,o,a,c;return{name:"",description:null!=(l=null==e?void 0:e.description)?l:"",role:null!=(n=null==e?void 0:e.role)?n:"worker",provider:null!=(s=null==e?void 0:e.provider)?s:"claude",model:null!=(r=null==e?void 0:e.model)?r:"",system_prompt:null!=(t=null==e?void 0:e.system_prompt)?t:"",permission:null!=(i=null==e?void 0:e.permission)?i:"acceptEdits",cwd:"",skill_ids:null!=(o=null==e?void 0:e.skill_ids)?o:[],skill_loads:null!=(a=null==e?void 0:e.skill_loads)?a:{},worker_ids:[],type_id:null!=(c=null==e?void 0:e.id)?c:null,colony_id:null,overrides:[],browser:!1,object_ids:[]}},v=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{name:e.name,description:e.description,role:e.role,provider:e.provider,model:e.model,system_prompt:e.system_prompt,permission:e.permission,cwd:e.cwd,skill_ids:e.skill_ids,skill_loads:e.skill_loads,worker_ids:e.worker_ids,type_id:e.type_id,colony_id:e.colony_id,overrides:e.overrides,browser:e.browser,object_ids:l}},b=(e,l,n)=>!!l&&l.inherit[n]&&!e.overrides.includes(n);function g(e,l,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r={};e.name.trim()?l.some(l=>l.id!==n&&l.name.toLowerCase()===e.name.trim().toLowerCase())&&(r.name=(0,i.Tl)("form.err.nameTaken")):r.name=(0,i.Tl)("form.err.name");let t=s.find(l=>l.id===e.colony_id);return e.cwd.trim()||b(e,t,"cwd")&&(null==t?void 0:t.cwd)||(r.cwd=(0,i.Tl)("form.err.folder")),r}function j(e){var l;let{draft:n,onChange:f,errors:v,selfId:g,showType:j=!0,focusName:k=!1}=e,{t:y}=(0,i.s9)(),{skills:w,providers:_,agents:N,types:C,colonies:A,connections:D,objects:S}=(0,c.q5)(),E=(0,r.useMemo)(()=>S.filter(e=>h.G.includes(e.kind)).map(e=>{var l,n,s,r;return{id:e.id,label:e.name,hint:e.manager_id&&e.manager_id!==g?y("form.resources.taken",{name:null!=(s=null==(l=N.find(l=>l.id===e.manager_id))?void 0:l.name)?s:""}):null!=(r=null==(n=A.find(l=>l.id===e.colony_id))?void 0:n.name)?r:y("common.noColony")}}),[S,N,A,g,y]),q=(0,r.useMemo)(()=>D.filter(e=>e.agent_id===g&&e.enabled),[D,g]),z=A.find(e=>e.id===n.colony_id),F=e=>b(n,z,e),L=(e,l)=>f({...n,overrides:l?n.overrides.filter(l=>l!==e):[...new Set([...n.overrides,e])]}),M=(e,l)=>f({...n,[e]:l}),O=(0,r.useMemo)(()=>N.filter(e=>e.id!==g&&"worker"===e.role),[N,g]),T=C.find(e=>e.id===n.type_id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.D0,{label:y("form.name"),error:v.name,hint:y("form.name.hint"),children:(0,s.jsx)("input",{className:"input",value:n.name,onChange:e=>M("name",e.target.value),placeholder:y("form.name.placeholder"),"data-autofocus":k?"":void 0})}),(0,s.jsx)(a.D0,{label:y("form.purpose"),hint:y("form.purpose.hint"),children:(0,s.jsx)("input",{className:"input",value:n.description,onChange:e=>M("description",e.target.value),placeholder:y("form.purpose.placeholder")})}),(0,s.jsxs)(a.D0,{label:y("form.role"),children:[(0,s.jsx)(a.$q,{value:n.role,onChange:e=>M("role",e),options:[{id:"worker",label:y("role.worker")},{id:"orchestrator",label:y("role.orchestrator")}]}),(0,s.jsx)("span",{className:"hint",children:"orchestrator"===n.role?y("form.role.orchestratorHint"):y("form.role.workerHint")})]}),j&&T&&(0,s.jsx)("p",{className:"hint m0",children:y("form.basedOn",{name:T.name})}),(0,s.jsx)(a.D0,{label:y("form.colony"),hint:y("form.colony.hint"),children:(0,s.jsxs)("select",{className:"select",value:null!=(l=n.colony_id)?l:"",onChange:e=>f({...n,colony_id:e.target.value||null,overrides:[]}),children:[(0,s.jsx)("option",{value:"",children:y("common.noColony")}),A.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))]})}),(0,s.jsx)(a.D0,{label:y("form.provider"),children:(0,s.jsx)(a.YO,{value:n.provider,onChange:e=>f({...n,provider:e,model:"",browser:"claude"===e&&n.browser}),providers:_})}),(0,s.jsx)(a.CD,{provider:n.provider,value:n.model,onChange:e=>M("model",e)}),"claude"===n.provider&&(0,s.jsx)(p.Tl,{checked:n.browser,onChange:e=>M("browser",e),label:y("form.browser"),hint:y("form.browser.hint")}),z&&z.inherit.permission&&(0,s.jsx)(x,{colony:z,on:F("permission"),onChange:e=>L("permission",e),label:y("inherit.permissions"),value:(0,m.Ck)(z.permission)}),!F("permission")&&(0,s.jsx)(a.en,{value:n.permission,onChange:e=>M("permission",e),locked:q.length?["plan"]:[]}),q.length>0&&(0,s.jsxs)("p",{className:"hint m0",children:[(0,s.jsxs)("b",{children:[y("form.connections"),":"]})," ",y("form.connections.hint",{names:q.map(e=>e.name).join(", ")})]}),z&&z.inherit.cwd&&z.cwd&&(0,s.jsx)(x,{colony:z,on:F("cwd"),onChange:e=>L("cwd",e),label:y("field.folder"),value:(0,m._1)(z.cwd),mono:!0}),!(F("cwd")&&(null==z?void 0:z.cwd))&&(0,s.jsx)(a.dR,{value:n.cwd,onChange:e=>M("cwd",e),error:v.cwd}),z&&z.inherit.prompt&&z.system_prompt.trim()&&(0,s.jsx)(x,{colony:z,on:F("prompt"),onChange:e=>L("prompt",e),label:y("inherit.context"),value:"".concat(z.system_prompt.trim().slice(0,90)).concat(z.system_prompt.trim().length>90?"…":""),note:y("inherit.context.note")}),(0,s.jsx)(a.D0,{label:F("prompt")||(null==z?void 0:z.system_prompt)?y("form.ownPrompt"):y("form.systemPrompt"),hint:y("form.promptHint",{count:n.system_prompt.length,n:(0,o._E)(n.system_prompt.length)}),children:(0,s.jsx)(t.n,{value:n.system_prompt,onChange:e=>M("system_prompt",e),placeholder:y("form.prompt.placeholder"),defaultView:"write",minHeight:220})}),z&&z.inherit.skills&&z.skill_ids.length>0&&(0,s.jsx)(x,{colony:z,on:F("skills"),onChange:e=>L("skills",e),label:y("inherit.skills"),value:z.skill_ids.map(e=>{var l;return null==(l=w.find(l=>l.id===e))?void 0:l.name}).filter(Boolean).join(", "),note:y("inherit.skills.note")}),(0,s.jsx)(a.D0,{label:y("form.skills"),hint:y("form.skills.hint"),children:(0,s.jsx)(a.kV,{skills:w,value:n.skill_ids,loads:n.skill_loads,onChange:(e,l)=>f({...n,skill_ids:e,skill_loads:l})})}),E.length>0&&(0,s.jsx)(a.D0,{label:y("form.resources"),hint:y("form.resources.hint"),children:(0,s.jsx)(u.c,{multi:!0,options:E,value:n.object_ids,onChange:e=>f({...n,object_ids:e}),placeholder:y("form.resources.placeholder"),empty:y("form.resources.empty"),ariaLabel:y("form.resources")})}),"orchestrator"===n.role&&(0,s.jsx)(a.D0,{label:y("form.team"),hint:y("form.team.hint"),children:O.length?(0,s.jsx)(d.C,{items:O.map(e=>({id:e.id,name:e.name,note:e.description||e.provider})),value:n.worker_ids,onChange:e=>M("worker_ids",e)}):(0,s.jsx)("p",{className:"hint",children:y("form.team.empty")})})]})}function x(e){let{colony:l,on:n,onChange:r,label:t,value:o,note:a,mono:c}=e,{t:d}=(0,i.s9)();return(0,s.jsxs)("label",{className:"inherit-row ".concat(n?"on":""),children:[(0,s.jsx)("input",{type:"checkbox",checked:n,onChange:e=>r(e.target.checked)}),(0,s.jsxs)("span",{className:"grow",children:[(0,s.jsxs)("b",{children:[t," ",(0,s.jsx)("span",{className:"muted fw-500",children:d("inherit.from")})," ",(0,s.jsx)("i",{className:"cdot",style:{background:l.color||"var(--honey)"}}),l.name]}),(0,s.jsx)("span",{className:"inh-val ".concat(c?"mono":""),children:o||"—"}),a&&(0,s.jsx)("span",{className:"hint",children:a})]}),(0,s.jsx)("span",{className:"inh-state",children:d(n?"inherit.following":"inherit.own")})]})}},12646:(e,l,n)=>{n.d(l,{n:()=>_});var s=n(94799),r=n(34023),t=n(6458),i=n(53983),o=n(3492),a=n(98148),c=n(99579),d=n(55838),m=n(98938),u=n(52263),p=n(20555),h=n(91833),f=n(55712),v=n(71529),b=n(69654);function g(e,l,n,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:s,t=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",i=e.slice(l,n)||t;return e.slice(l-s.length,l)===s&&e.slice(n,n+r.length)===r&&l!==n?{value:e.slice(0,l-s.length)+i+e.slice(n+r.length),start:l-s.length,end:n-s.length}:{value:e.slice(0,l)+s+i+r+e.slice(n),start:l+s.length,end:l+s.length+i.length}}function j(e,l,n,s,r){let t=e.lastIndexOf("\n",l-1)+1,i=e.indexOf("\n",n),o=-1===i?e.length:i,a=e.slice(t,o).split("\n"),c=a.every(e=>r.test(e)),d=a.map((e,l)=>c?e.replace(r,""):s(l)+e.replace(r,"")).join("\n");return{value:e.slice(0,t)+d+e.slice(o),start:t,end:t+d.length}}let x=/^\s*[-*+] (\[[ x]\] )?/,k=/^\s*\d+\. /,y=/^#{1,6} /,w=/^> ?/;function _(e){let{value:l,onChange:n,placeholder:_,defaultView:N="split",minHeight:C=340,fill:A=!1}=e,{t:D}=(0,b.s9)(),S=(0,r.useRef)(null),[E,q]=(0,r.useState)(N),z=e=>{let l=S.current;if(!l)return;let s=e(l.value,l.selectionStart,l.selectionEnd);n(s.value),requestAnimationFrame(()=>{l.focus(),l.setSelectionRange(s.start,s.end)})},F=[{id:"h",icon:(0,s.jsx)(o.A,{size:15}),label:D("md.heading"),run:()=>z((e,l,n)=>j(e,l,n,()=>"## ",y))},{id:"b",icon:(0,s.jsx)(a.A,{size:15}),label:D("md.bold"),keys:"B",run:()=>z((e,l,n)=>g(e,l,n,"**","**",D("md.boldPh")))},{id:"i",icon:(0,s.jsx)(c.A,{size:15}),label:D("md.italic"),keys:"I",run:()=>z((e,l,n)=>g(e,l,n,"*","*",D("md.italicPh")))},{id:"c",icon:(0,s.jsx)(d.A,{size:15}),label:D("md.code"),run:()=>z((e,l,n)=>g(e,l,n,"`","`","code"))},{id:"cb",icon:(0,s.jsx)(m.A,{size:15}),label:D("md.codeBlock"),run:()=>z((e,l,n)=>g(e,l,n,"\n```\n","\n```\n","code"))},{id:"ul",icon:(0,s.jsx)(u.A,{size:15}),label:D("md.bullets"),run:()=>z((e,l,n)=>j(e,l,n,()=>"- ",x))},{id:"ol",icon:(0,s.jsx)(p.A,{size:15}),label:D("md.numbered"),run:()=>z((e,l,n)=>j(e,l,n,e=>"".concat(e+1,". "),k))},{id:"q",icon:(0,s.jsx)(h.A,{size:15}),label:D("md.quote"),run:()=>z((e,l,n)=>j(e,l,n,()=>"> ",w))},{id:"l",icon:(0,s.jsx)(f.A,{size:15}),label:D("md.link"),keys:"K",run:()=>z((e,l,n)=>{let s=e.slice(l,n)||D("md.linkPh"),r="[".concat(s,"](https://)");return{value:e.slice(0,l)+r+e.slice(n),start:l+s.length+3,end:l+s.length+11}})},{id:"hr",icon:(0,s.jsx)(v.A,{size:15}),label:D("md.rule"),run:()=>z((e,l,n)=>({value:e.slice(0,l)+"\n\n---\n\n"+e.slice(n),start:l+7,end:l+7}))}],L=l.trim()?l.trim().split(/\s+/).length:0;return(0,s.jsxs)("div",{className:"mde".concat(A?" fill":""),children:[(0,s.jsxs)("div",{className:"mde-bar",role:"toolbar","aria-label":D("md.toolbar"),children:[F.map(e=>(0,s.jsx)("button",{type:"button",className:"mde-btn",title:e.keys?"".concat(e.label," (Ctrl+").concat(e.keys,")"):e.label,"aria-label":e.label,onMouseDown:e=>e.preventDefault(),onClick:e.run,disabled:"preview"===E,children:e.icon},e.id)),(0,s.jsx)("span",{className:"grow"}),(0,s.jsx)("div",{className:"mde-views",role:"group",children:["write","split","preview"].map(e=>(0,s.jsx)("button",{type:"button",className:E===e?"on":"","aria-pressed":E===e,onClick:()=>q(e),children:D("md.view.".concat(e))},e))})]}),(0,s.jsxs)("div",{className:"mde-body v-".concat(E),style:{minHeight:C},children:["preview"!==E&&(0,s.jsx)("textarea",{ref:S,className:"mde-text mono",style:{minHeight:C},value:l,onChange:e=>n(e.target.value),onKeyDown:e=>{let l=e.currentTarget;if(e.ctrlKey||e.metaKey){let l=F.find(l=>l.keys&&l.keys.toLowerCase()===e.key.toLowerCase());if(l){e.preventDefault(),l.run();return}}if("Tab"===e.key){e.preventDefault(),z((l,n,s)=>{if(n===s&&!e.shiftKey)return{value:l.slice(0,n)+" "+l.slice(s),start:n+2,end:n+2};let r=l.lastIndexOf("\n",n-1)+1,t=l.indexOf("\n",s),i=-1===t?l.length:t,o=l.slice(r,i).split("\n").map(l=>e.shiftKey?l.replace(/^ {1,2}/,""):" "+l).join("\n");return{value:l.slice(0,r)+o+l.slice(i),start:r,end:r+o.length}});return}if("Enter"===e.key&&!e.shiftKey&&l.selectionStart===l.selectionEnd){let s=l.value,r=l.selectionStart,t=s.lastIndexOf("\n",r-1)+1,i=s.slice(t,r),o=/^(\s*)([-*+] (?:\[[ x]\] )?|(\d+)\. )(.*)$/.exec(i);if(!o)return;if(e.preventDefault(),!o[4]){n(s.slice(0,t)+s.slice(r)),requestAnimationFrame(()=>l.setSelectionRange(t,t));return}let a=o[3]?"".concat(o[1]).concat(Number(o[3])+1,". "):o[1]+o[2].replace("[x]","[ ]");n(s.slice(0,r)+"\n"+a+s.slice(r)),requestAnimationFrame(()=>{let e=r+1+a.length;l.setSelectionRange(e,e)})}},placeholder:_,spellCheck:!1}),"write"!==E&&(0,s.jsx)("div",{className:"mde-prev md",children:(0,s.jsx)(t.oz,{remarkPlugins:[i.A],children:l||D("skills.previewEmpty")})})]}),(0,s.jsxs)("div",{className:"mde-foot muted",children:[D("md.stats",{words:L,chars:l.length})," \xb7 ",D("md.tips")]})]})}},22214:(e,l,n)=>{n.d(l,{C:()=>t});var s=n(94799),r=n(72705);function t(e){let{items:l,value:n,onChange:t}=e;return(0,s.jsx)("div",{className:"skillpick",children:l.map(e=>{let l=n.includes(e.id);return(0,s.jsxs)("button",{type:"button",className:"skillrow","aria-pressed":l,onClick:()=>t(l?n.filter(l=>l!==e.id):[...n,e.id]),children:[(0,s.jsx)("span",{className:"check",children:l&&(0,s.jsx)(r.A,{size:13,strokeWidth:3})}),(0,s.jsxs)("span",{children:[(0,s.jsx)("b",{className:"fw-600",children:e.name}),(0,s.jsx)("span",{className:"hint hint-block",children:e.note})]})]},e.id)})})}},28941:(e,l,n)=>{n.d(l,{c:()=>a});var s=n(94799),r=n(34023),t=n(70665),i=n(21018),o=n(48539);function a(e){let{options:l,value:n,onChange:a,multi:c=!1,inline:d=!1,placeholder:m,empty:u,ariaLabel:p,autoFocus:h=!1}=e,[f,v]=(0,r.useState)(""),[b,g]=(0,r.useState)(!1),[j,x]=(0,r.useState)(0),k=(0,r.useRef)(null),y=(0,r.useRef)(null);(0,i.s)(b,k,()=>g(!1));let w=n.map(e=>l.find(l=>l.id===e)).filter(e=>!!e),_=(0,r.useMemo)(()=>{let e=f.trim().toLowerCase();return l.filter(l=>{var s;return!n.includes(l.id)&&(!e||"".concat(l.label," ").concat(null!=(s=l.hint)?s:"").toLowerCase().includes(e))}).slice(0,50)},[l,n,f]);(0,r.useEffect)(()=>{x(0)},[f,b]);let N=e=>{var l;a(c?[...n,e.id]:[e.id]),v(""),g(c),c&&(null==(l=y.current)||l.focus())},C=e=>{a(n.filter(l=>l!==e)),requestAnimationFrame(()=>{var e;return null==(e=y.current)?void 0:e.focus()})},A=!c&&w.length>0,D=b&&!A&&(_.length>0||!!u),S=(0,o.B)(D,j,_.length);return(0,s.jsxs)("div",{className:"sg ps ".concat(d?"ps-inline":""),ref:k,children:[(0,s.jsxs)("div",{className:"ps-box input ".concat(b?"open":""),onClick:()=>{if(!A){var e;g(!0),null==(e=y.current)||e.focus()}},children:[w.map(e=>(0,s.jsxs)("span",{className:"chip ps-chip",children:[e.label,(0,s.jsx)("button",{type:"button",onClick:l=>{l.stopPropagation(),C(e.id)},"aria-label":"\xd7 ".concat(e.label),children:(0,s.jsx)(t.A,{size:12})})]},e.id)),!A&&(0,s.jsx)("input",{ref:y,className:"ps-input",value:f,placeholder:w.length?"":m,"aria-label":p,autoComplete:"off",spellCheck:!1,autoFocus:h,...S.input,onFocus:()=>g(!0),onChange:e=>{v(e.target.value),g(!0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),g(!0),x(e=>Math.min(_.length-1,e+1))):"ArrowUp"===e.key?(e.preventDefault(),x(e=>Math.max(0,e-1))):"Enter"===e.key&&b&&_[j]?(e.preventDefault(),N(_[j])):"Escape"===e.key&&b?(e.stopPropagation(),g(!1)):"Backspace"===e.key&&!f&&w.length&&C(w[w.length-1].id)}})]}),D&&(0,s.jsxs)("ul",{className:"sg-list",...S.listProps,children:[0===_.length&&(0,s.jsx)("li",{className:"sg-empty",children:u}),_.map((e,l)=>(0,s.jsx)("li",{...S.optionProps(l),children:(0,s.jsxs)("button",{type:"button",className:"sg-opt ".concat(l===j?"hi":""),onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>x(l),onClick:()=>N(e),children:[(0,s.jsx)("span",{className:"nm",children:e.label}),e.hint&&(0,s.jsx)("span",{className:"hint",children:e.hint})]})},e.id))]})]})}},52974:(e,l,n)=>{n.d(l,{G:()=>c,I:()=>d});var s=n(94799),r=n(34023),t=n(69654),i=n(48538),o=n(10804),a=n(28941);let c=["server","docker","cluster"];function d(e){let{value:l,onChange:n}=e,{t:c}=(0,t.s9)(),{agents:d,colonies:m}=(0,i.o0)(),u=(0,r.useMemo)(()=>d.map(e=>{var l,n;return{id:e.id,label:e.name,hint:null!=(n=null==(l=m.find(l=>l.id===e.colony_id))?void 0:l.name)?n:c("common.noColony")}}),[d,m,c]);return(0,s.jsx)(o.D0,{label:c("obj.manager.label"),hint:l?c("obj.manager.hint.set"):c("obj.manager.hint.none"),children:(0,s.jsx)(a.c,{options:u,value:l?[l]:[],onChange:e=>{var l;return n(null!=(l=e[0])?l:"")},placeholder:c("obj.manager.placeholder"),empty:c("obj.manager.empty"),ariaLabel:c("obj.manager.label")})})}},73506:(e,l,n)=>{n.d(l,{h:()=>r});var s=n(34023);function r(e){(0,s.useEffect)(()=>{if(!e)return;let l=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",l),()=>window.removeEventListener("beforeunload",l)},[e])}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[587],{9217:(e,l,t)=>{t.d(l,{Zp:()=>N,Bh:()=>C,Mr:()=>y,QJ:()=>g,qP:()=>k,Te:()=>S});var s=t(94799),a=t(52974),n=t(34023),r=t(89075),o=t(79141),i=t(10804),d=t(3749),c=t(84561),m=t(69654);let h=null;function u(e){let{template:l,values:t,onPick:a,onValue:r}=e,{t:o}=(0,m.s9)(),c=function(){let[e,l]=(0,n.useState)(h);return(0,n.useEffect)(()=>{h||d.FH.get("/object-templates").then(e=>{h=e,l(e)}).catch(()=>l([]))},[]),e}(),u=null==c?void 0:c.find(e=>e.id===l);return c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"tpls",children:c.map(e=>(0,s.jsxs)("button",{type:"button",className:"tpl","aria-pressed":l===e.id,onClick:()=>a(e),children:[(0,s.jsx)("b",{children:e.name}),(0,s.jsx)("small",{children:e.description})]},e.id))}),u&&u.fields.map(e=>{var l;return(0,s.jsx)(i.D0,{label:e.label,children:(0,s.jsx)("input",{className:"input ".concat("text"===e.kind&&"version"!==e.key?"":"mono"),value:null!=(l=t[e.key])?l:"",onChange:l=>r(e.key,l.target.value),placeholder:e.default,inputMode:"port"===e.kind?"numeric":void 0})},"".concat(u.id,"-").concat(e.key))}),u&&(0,s.jsx)("p",{className:"muted small",style:{margin:0},children:o("tpl.note")})]}):(0,s.jsx)("p",{className:"muted small",style:{margin:0},children:o("git.loading")})}var p=t(48538),b=t(74988),j=t(13460),v=t(29867);let x=e=>void 0===e?"":String(e),g=(e,l,t)=>{var s,a,n,r,o,i,d,c,m,h,u,p,j,v,g,f,k,y,N,w,C,S,D,T,R,q,F,M,P,z,E,O,A,I,_,H,L,K,U,$;let B=(null==e?void 0:e.kind)==="server"?e.config:{},Q=(null==e?void 0:e.kind)==="docker"?e.config:{},V=(null==e?void 0:e.kind)==="http"?e.config:{},Z=(null==e?void 0:e.kind)==="cluster"?e.config:{},W=(null==e?void 0:e.kind)==="database"?e.config:{};return{manager:null!=(d=null==e?void 0:e.manager_id)?d:"",name:null!=(c=null==e?void 0:e.name)?c:"",colony_id:null!=(h=null!=(m=null==e?void 0:e.colony_id)?m:l)?h:"",kind:null!=(p=null!=(u=null==e?void 0:e.kind)?u:t)?p:"server",cwd:null!=(j=B.cwd)?j:"",start:null!=(v=B.start)?v:"",stop:null!=(g=B.stop)?g:"",port:x(B.port),env:(0,b.M6)((null==e?void 0:e.kind)==="server"?B.env:Q.env),restart:null!=(f=B.restart)?f:"no",maxRestarts:x(B.maxRestarts),healthKind:null!=(k=null==(s=B.health)?void 0:s.kind)?k:"",healthTarget:null!=(y=null==(a=B.health)?void 0:a.target)?y:"",healthInterval:x(null==(n=B.health)?void 0:n.intervalSec),healthTimeout:x(null==(r=B.health)?void 0:r.timeoutSec),healthRetries:x(null==(o=B.health)?void 0:o.retries),healthRestart:!!(null==(i=B.health)?void 0:i.restartWhenUnhealthy),stopTimeout:x((null==e?void 0:e.kind)==="server"?B.stopTimeoutSec:Q.stopTimeoutSec),logMax:x((null==e?void 0:e.kind)==="server"?B.logMaxMb:Q.logMaxMb),folder:null!=(N=V.folder)?N:"",defEnv:null!=(w=V.env)?w:"",variables:null!=(C=V.variables)?C:{},members:null!=(S=Z.members)?S:[],template:"",tplValues:{},mode:null!=(D=Q.mode)?D:e?"container":"template",image:null!=(T=Q.image)?T:"",ports:(null!=(R=Q.ports)?R:[]).join("\n"),volumes:(null!=(q=Q.volumes)?q:[]).join("\n"),dockerRestart:null!=(F=Q.restart)?F:"no",command:null!=(M=Q.command)?M:"",file:null!=(P=Q.file)?P:"",project:null!=(z=Q.project)?z:"",services:(null!=(E=Q.services)?E:[]).join(", "),container:null!=(O=Q.container)?O:"",memory:null!=(A=Q.memory)?A:"",cpus:x(Q.cpus),network:null!=(I=Q.network)?I:"",engine:null!=(_=W.engine)?_:"postgresql",dbHost:null!=(H=W.host)?H:"",dbPort:x(W.port),dbUser:null!=(L=W.user)?L:"",dbPassword:"",dbPasswordSet:!!W.passwordSet,dbName:null!=(K=W.database)?K:"",dbFile:null!=(U=W.file)?U:"",dbSsl:!!W.ssl,dbTrust:!!W.trustCert,dbReadOnly:!1!==W.readOnly,dbTimeout:x(W.timeoutSec),dbMaxRows:x(W.maxRows),dbProps:{...null!=($=W.props)?$:{}}}},f=e=>""===e.trim()?void 0:Number(e);function k(e){return"database"===e.kind?y(e):"http"===e.kind?{folder:e.folder.trim(),env:e.defEnv.trim()||void 0,variables:Object.keys(e.variables).length?e.variables:void 0}:"cluster"===e.kind?{members:e.members}:"server"===e.kind?{cwd:e.cwd.trim(),start:e.start.trim(),stop:e.stop.trim()||void 0,port:f(e.port),env:(0,b.y$)(e.env),restart:"no"===e.restart?void 0:e.restart,maxRestarts:f(e.maxRestarts),stopTimeoutSec:f(e.stopTimeout),logMaxMb:f(e.logMax),health:e.healthKind&&e.healthTarget.trim()?{kind:e.healthKind,target:e.healthTarget.trim(),intervalSec:f(e.healthInterval),timeoutSec:f(e.healthTimeout),retries:f(e.healthRetries),restartWhenUnhealthy:e.healthRestart||void 0}:void 0}:"template"===e.mode?{mode:"compose"}:"existing"===e.mode?{mode:"existing",container:e.container.trim(),stopTimeoutSec:f(e.stopTimeout)}:"compose"===e.mode?{mode:"compose",file:e.file.trim(),project:e.project.trim()||void 0,services:e.services.split(",").map(e=>e.trim()).filter(Boolean),stopTimeoutSec:f(e.stopTimeout)}:{mode:"container",image:e.image.trim(),ports:(0,b.Mn)(e.ports),volumes:(0,b.Mn)(e.volumes),env:(0,b.y$)(e.env),restart:e.dockerRestart||"no",command:e.command.trim()||void 0,memory:e.memory.trim()||void 0,cpus:f(e.cpus),network:e.network.trim()||void 0,stopTimeoutSec:f(e.stopTimeout),logMaxMb:f(e.logMax)}}let y=e=>{let l=Object.entries(e.dbProps).filter(l=>{let[t,s]=l;return""!==s.trim()&&(e.dbSsl||!t.startsWith("ssl."))}),t=l.length?Object.fromEntries(l):void 0;return"sqlite"===e.engine?{engine:"sqlite",file:e.dbFile.trim(),props:t,readOnly:e.dbReadOnly,timeoutSec:f(e.dbTimeout),maxRows:f(e.dbMaxRows)}:{engine:e.engine,host:e.dbHost.trim()||void 0,port:f(e.dbPort),user:e.dbUser.trim()||void 0,password:e.dbPassword,database:e.dbName.trim()||void 0,ssl:e.dbSsl||void 0,trustCert:!!e.dbSsl&&!!e.dbTrust||void 0,props:t,readOnly:e.dbReadOnly,timeoutSec:f(e.dbTimeout),maxRows:f(e.dbMaxRows)}},N=e=>{let{title:l,hint:t,wide:a=!1,children:n}=e;return(0,s.jsxs)("section",{className:"of-card ".concat(a?"wide":""),id:"of-".concat(l.toLowerCase().normalize("NFD").replace(/[^a-z0-9]+/g,"-")),"data-title":l,children:[(0,s.jsxs)("header",{children:[(0,s.jsx)("h4",{children:l}),t&&(0,s.jsx)("p",{className:"muted small",children:t})]}),n]})};function w(e){let{file:l,project:t,services:a,onServices:r,onProject:o}=e,{t:c}=(0,m.s9)(),{info:h,err:u,loading:p}=function(e){let[l,t]=(0,n.useState)(null),[s,a]=(0,n.useState)(""),[r,o]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(a(""),!/^\/.+\.ya?ml$/i.test(e))return void t(null);let l=!1;o(!0);let s=setTimeout(()=>d.FH.get("/docker/compose-services?file=".concat(encodeURIComponent(e))).then(e=>!l&&t(e)).catch(e=>{l||(t(null),a(e instanceof Error?e.message:""))}).finally(()=>!l&&o(!1)),300);return()=>{l=!0,clearTimeout(s)}},[e]),{info:l,err:s,loading:r}}(l),b=new Set(a.split(",").map(e=>e.trim()).filter(Boolean));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.D0,{label:c("obj.f.services"),hint:c("dk.services.hint"),children:l?p?(0,s.jsx)("p",{className:"muted small res-m0",children:c("dk.services.loading")}):u?(0,s.jsx)("p",{className:"gx-note err res-m0",children:u}):h&&0===h.services.length?(0,s.jsx)("p",{className:"muted small res-m0",children:c("dk.services.none")}):h?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"chips",children:h.services.map(e=>(0,s.jsx)("button",{type:"button",className:"chip-pick ".concat(b.has(e)?"on":""),"aria-pressed":b.has(e),onClick:()=>(e=>{let l=new Set(b);l.has(e)?l.delete(e):l.add(e),r([...l].join(", "))})(e),children:e},e))}),"file"===h.source&&(0,s.jsx)("p",{className:"muted small res-mt6",children:c("dk.services.file")})]}):null:(0,s.jsx)("p",{className:"muted small res-m0",children:c("dk.services.pickFile")})}),(0,s.jsx)(i.D0,{label:c("obj.f.project"),hint:c("dk.project.hint"),children:(0,s.jsxs)("div",{className:"row gap-s",children:[(0,s.jsx)("input",{className:"input mono",value:t,onChange:e=>o(e.target.value),placeholder:null==h?void 0:h.project}),h&&!t&&(0,s.jsx)("button",{type:"button",className:"btn sm",onClick:()=>o(h.project),children:c("dk.project.use",{name:h.project})})]})})]})}function C(e){var l,t,h;let{d:x,set:g,setD:f,scan:k,showKind:y=!1,error:C,objectId:S}=e,{t:D}=(0,m.s9)(),{colonies:T,objects:R}=(0,p.o0)(),q=function(e){let[l,t]=(0,n.useState)(null),[s,a]=(0,n.useState)(null),[r,o]=(0,n.useState)(""),[i,c]=(0,n.useState)(0);return(0,n.useEffect)(()=>{if(!e)return;let l=!1;return d.FH.get("/docker/containers").then(e=>{var s;l||(t(e.containers),o(e.available?"":null!=(s=e.error)?s:"unavailable"))}).catch(()=>!l&&o("unavailable")),d.FH.get("/docker/images").then(e=>!l&&a(e.images)).catch(()=>void 0),()=>{l=!0}},[e,i]),{containers:l,images:s,error:r,reload:(0,n.useCallback)(()=>c(e=>e+1),[])}}("docker"===x.kind&&("existing"===x.mode||"container"===x.mode)),F=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.jsx)("input",{className:"input ".concat(l.mono?"mono":""),type:l.type,value:x[e],placeholder:l.placeholder,onChange:l=>g(e,l.target.value)})},M=q.error?(0,s.jsx)("p",{className:"muted small res-mt4",children:D("dk.unavailable",{error:q.error})}):null,P=(0,s.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:q.reload,"aria-label":D("dk.refresh"),title:D("dk.refresh"),children:(0,s.jsx)(r.A,{size:14})}),z=k?Object.keys(k.fileVars).filter(e=>"$shared"!==e):void 0,E=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.dR,{value:x.folder,onChange:e=>g("folder",e),label:D("obj.f.httpFolder"),hint:D("obj.f.httpFolder.hint")}),(0,s.jsx)(i.D0,{label:D("obj.f.defaultEnv"),hint:D("obj.f.defaultEnv.hint"),children:(0,s.jsx)(c.b,{value:x.defEnv,onChange:e=>g("defEnv",e),mono:!0,placeholder:"dev",options:[...new Set([...null!=(l=null==k?void 0:k.environments)?l:[],...Object.keys(x.variables).filter(e=>"$shared"!==e)])].map(e=>({value:e}))})})]});return(0,s.jsxs)("div",{className:"of",children:[y&&(0,s.jsx)(N,{title:D("obj.kind.pick"),wide:!0,children:(0,s.jsx)("div",{className:"okinds",children:["server","docker","http","database","cluster"].map(e=>{let{icon:l,color:t}=b.Nd[e];return(0,s.jsxs)("button",{type:"button",className:"okind","aria-pressed":x.kind===e,style:{"--c":t},onClick:()=>g("kind",e),children:[(0,s.jsx)(l,{size:20}),(0,s.jsx)("b",{children:D("obj.kind.".concat(e))}),(0,s.jsx)("small",{children:D("obj.kind.".concat(e,".hint"))})]},e)})})}),(0,s.jsxs)(N,{title:D("of.general"),children:[(0,s.jsx)(i.D0,{label:D("obj.f.name"),error:C,children:F("name",{placeholder:"database"===x.kind?(0,v.I5)(x):void 0})}),(0,s.jsx)(i.D0,{label:D("obj.colony"),children:(0,s.jsxs)("select",{className:"select",value:x.colony_id,onChange:e=>f(l=>({...l,colony_id:e.target.value,members:[]})),children:[(0,s.jsx)("option",{value:"",children:D("obj.noColony")}),T.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))]})}),a.G.includes(x.kind)&&(0,s.jsx)(a.I,{value:x.manager,onChange:e=>g("manager",e)}),"http"===x.kind&&!y&&E]}),"http"===x.kind?(0,s.jsxs)(s.Fragment,{children:[y&&(0,s.jsx)(N,{title:D("of.files"),children:E}),y&&(0,s.jsx)(N,{title:D("of.vars"),wide:!0,children:(0,s.jsx)(j.W,{value:x.variables,onChange:e=>g("variables",e),fileEnvs:z,fileVars:null==k?void 0:k.fileVars,used:null==k?void 0:k.used,fileDefined:null==k?void 0:k.fileDefined,setBy:null==k?void 0:k.setBy})})]}):"database"===x.kind?(0,s.jsx)(v.dN,{d:x,set:g,setD:f,objectId:S,creating:y}):"cluster"===x.kind?(0,s.jsx)(N,{title:D("of.members"),hint:D("obj.f.members.hint"),children:(()=>{let e=R.filter(e=>{var l;return("server"===e.kind||"docker"===e.kind)&&(null!=(l=e.colony_id)?l:"")===x.colony_id});return e.length?(0,s.jsx)("div",{className:"omembers",children:e.map(e=>{let{icon:l,color:t}=b.Nd[e.kind],a=x.members.indexOf(e.id);return(0,s.jsxs)("label",{className:"omember",children:[(0,s.jsx)("input",{type:"checkbox",checked:a>=0,onChange:()=>{let l;return l=e.id,g("members",x.members.includes(l)?x.members.filter(e=>e!==l):[...x.members,l])}}),(0,s.jsx)(l,{size:15,style:{color:t}}),(0,s.jsx)("span",{className:"nm",children:e.name}),a>=0&&(0,s.jsx)("span",{className:"ord",children:a+1})]},e.id)})}):(0,s.jsx)("p",{className:"muted small res-m0",children:D("obj.f.members.none")})})()}):"server"===x.kind?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(N,{title:D("of.run"),children:[(0,s.jsx)(i.dR,{value:x.cwd,onChange:e=>g("cwd",e),label:D("obj.f.folder"),hint:D("obj.f.folder.hint")}),(0,s.jsx)(i.D0,{label:D("obj.f.start"),hint:D("obj.f.start.hint"),children:F("start",{placeholder:"npm run dev",mono:!0})}),(0,s.jsx)(i.D0,{label:D("obj.f.stop"),hint:D("obj.f.stop.hint"),children:F("stop",{mono:!0})}),(0,s.jsx)(i.D0,{label:D("obj.f.port"),hint:D("obj.f.port.hint"),children:F("port",{placeholder:"3000"})})]}),(0,s.jsx)(N,{title:D("of.env"),children:(0,s.jsx)(i.D0,{label:D("obj.f.env"),hint:D("obj.f.env.hint"),children:(0,s.jsx)("textarea",{className:"textarea mono",rows:5,value:x.env,onChange:e=>g("env",e.target.value)})})}),(0,s.jsxs)(N,{title:D("obj.sup.crash"),hint:D("obj.sup.note"),children:[(0,s.jsx)(i.D0,{label:D("obj.sup.restart"),hint:D("obj.sup.restart.hint"),children:(0,s.jsxs)("div",{className:"row gap-s",children:[(0,s.jsxs)("select",{className:"select",value:x.restart,onChange:e=>g("restart",e.target.value),children:[(0,s.jsx)("option",{value:"no",children:D("obj.sup.restart.no")}),(0,s.jsx)("option",{value:"on-failure",children:D("obj.sup.restart.fail")}),(0,s.jsx)("option",{value:"always",children:D("obj.sup.restart.always")})]}),("no"!==x.restart||x.healthRestart)&&(0,s.jsx)("input",{className:"input res-mw130",value:x.maxRestarts,placeholder:D("obj.sup.max"),onChange:e=>g("maxRestarts",e.target.value),title:D("obj.sup.max.hint"),"aria-label":D("obj.sup.max")})]})}),(0,s.jsxs)("details",{className:"fold of-fold",children:[(0,s.jsxs)("summary",{children:[D("obj.sup.more"),(0,s.jsx)(o.A,{size:15,className:"chev","aria-hidden":!0})]}),(0,s.jsxs)("div",{className:"of-grid2",children:[(0,s.jsx)(i.D0,{label:D("obj.sup.stopTimeout"),hint:D("obj.sup.stopTimeout.hint"),children:F("stopTimeout",{placeholder:"8"})}),(0,s.jsx)(i.D0,{label:D("obj.sup.logMax"),hint:D("obj.sup.logMax.hint"),children:F("logMax",{placeholder:"5"})})]})]})]}),(0,s.jsxs)(N,{title:D("obj.sup.health"),hint:D("obj.sup.health.hint"),children:[(0,s.jsx)(i.D0,{label:D("obj.sup.health.how"),children:(0,s.jsxs)("div",{className:"row gap-s",children:[(0,s.jsxs)("select",{className:"select res-mw170",value:x.healthKind,onChange:e=>g("healthKind",e.target.value),children:[(0,s.jsx)("option",{value:"",children:D("obj.sup.health.none")}),(0,s.jsx)("option",{value:"http",children:"HTTP"}),(0,s.jsx)("option",{value:"tcp",children:D("obj.sup.health.tcp")}),(0,s.jsx)("option",{value:"command",children:D("obj.sup.health.command")})]}),x.healthKind&&(0,s.jsx)("input",{className:"input mono grow",value:x.healthTarget,onChange:e=>g("healthTarget",e.target.value),placeholder:"http"===x.healthKind?"http://127.0.0.1:3000/health":"tcp"===x.healthKind?"3000":"curl -fs localhost:3000","aria-label":D("obj.sup.health")})]})}),x.healthKind&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.Tl,{checked:x.healthRestart,onChange:e=>g("healthRestart",e),label:D("obj.sup.healthRestart")}),(0,s.jsx)("p",{className:"hint hint-block",children:(()=>{let e=Number(x.healthInterval)||15,l=Number(x.healthRetries)||3,t=Number(x.maxRestarts)||5;return D(x.healthRestart?"obj.sup.health.sumRestart":"obj.sup.health.sum",{a1:String(e),a2:String(l),a3:String(e*l),a4:String(t)})})()}),(0,s.jsxs)("details",{className:"fold of-fold",children:[(0,s.jsxs)("summary",{children:[D("obj.sup.timing"),(0,s.jsx)(o.A,{size:15,className:"chev","aria-hidden":!0})]}),(0,s.jsxs)("div",{className:"of-grid3",children:[(0,s.jsx)(i.D0,{label:D("obj.sup.interval"),hint:D("obj.sup.interval.hint"),children:F("healthInterval",{placeholder:"15"})}),(0,s.jsx)(i.D0,{label:D("obj.sup.timeout"),hint:D("obj.sup.timeout.hint"),children:F("healthTimeout",{placeholder:"5"})}),(0,s.jsx)(i.D0,{label:D("obj.sup.retries"),hint:D("obj.sup.retries.hint"),children:F("healthRetries",{placeholder:"3"})})]})]})]})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N,{title:D("obj.f.mode"),children:(0,s.jsx)(i.$q,{value:x.mode,onChange:e=>g("mode",e),options:[...y?[{id:"template",label:D("obj.mode.template")}]:[],{id:"container",label:D("obj.mode.container")},{id:"compose",label:D("obj.mode.compose")},{id:"existing",label:D("obj.mode.existing")}]})}),"template"===x.mode&&(0,s.jsx)(N,{title:D("obj.mode.template"),hint:D("tpl.hint"),children:(0,s.jsx)(u,{template:x.template,values:x.tplValues,onPick:e=>f(l=>({...l,template:e.id,tplValues:Object.fromEntries(e.fields.map(e=>[e.key,e.default])),name:l.name.trim()?l.name:e.name})),onValue:(e,l)=>f(t=>({...t,tplValues:{...t.tplValues,[e]:l}}))})}),"container"===x.mode&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(N,{title:D("of.image"),children:[(0,s.jsxs)(i.D0,{label:D("obj.f.image"),children:[(0,s.jsxs)("div",{className:"row gap-s",children:[(0,s.jsx)("div",{className:"grow",children:(0,s.jsx)(c.b,{value:x.image,onChange:e=>g("image",e),mono:!0,placeholder:D("dk.pickImage"),ariaLabel:D("obj.f.image"),options:(null!=(t=q.images)?t:[]).map(e=>({value:e.ref,hint:"".concat(e.size).concat(e.created?" \xb7 ".concat(e.created):"")}))})}),P]}),M]}),(0,s.jsx)(i.D0,{label:D("obj.f.ports"),hint:D("obj.f.ports.hint"),children:(0,s.jsx)("textarea",{className:"textarea mono",rows:2,value:x.ports,onChange:e=>g("ports",e.target.value),placeholder:"8080:80"})}),(0,s.jsxs)(i.D0,{label:D("obj.f.volumes"),hint:D("obj.f.volumes.hint"),children:[(0,s.jsx)("textarea",{className:"textarea mono",rows:2,value:x.volumes,onChange:e=>g("volumes",e.target.value)}),(0,s.jsx)(i.yQ,{bare:!0,value:"",buttonLabel:D("obj.f.volumes.add"),onChange:e=>g("volumes","".concat(x.volumes.trimEnd()).concat(x.volumes.trim()?"\n":"").concat(e,":/data"))})]})]}),(0,s.jsxs)(N,{title:D("of.env"),children:[(0,s.jsx)(i.D0,{label:D("obj.f.env"),hint:D("obj.f.env.hint"),children:(0,s.jsx)("textarea",{className:"textarea mono",rows:4,value:x.env,onChange:e=>g("env",e.target.value)})}),(0,s.jsx)(i.D0,{label:D("obj.f.restart"),children:(0,s.jsx)("select",{className:"select",value:x.dockerRestart,onChange:e=>g("dockerRestart",e.target.value),children:["no","always","unless-stopped","on-failure"].map(e=>(0,s.jsx)("option",{value:e,children:e},e))})}),(0,s.jsx)(i.D0,{label:D("obj.f.command"),children:F("command",{mono:!0})})]}),(0,s.jsx)(N,{title:D("of.limits"),hint:D("obj.dk.limits.hint"),children:(0,s.jsxs)("div",{className:"of-grid2",children:[(0,s.jsx)(i.D0,{label:D("obj.dk.memory"),children:F("memory",{placeholder:"512m"})}),(0,s.jsx)(i.D0,{label:D("obj.dk.cpus"),children:F("cpus",{placeholder:"1.5"})}),(0,s.jsx)(i.D0,{label:D("obj.dk.network"),children:F("network",{placeholder:"bridge"})}),(0,s.jsx)(i.D0,{label:D("obj.sup.stopTimeout"),children:F("stopTimeout",{placeholder:"10"})}),(0,s.jsx)(i.D0,{label:D("obj.sup.logMax"),children:F("logMax",{placeholder:"10"})})]})})]}),"compose"===x.mode&&(0,s.jsxs)(N,{title:D("obj.mode.compose"),children:[(0,s.jsx)(i.yQ,{mode:"file",exts:["yml","yaml"],value:x.file,onChange:e=>g("file",e),label:D("obj.f.file"),hint:D("obj.f.file.hint"),placeholder:"/home/you/app/docker-compose.yml"}),(0,s.jsx)(w,{file:x.file,project:x.project,services:x.services,onServices:e=>g("services",e),onProject:e=>g("project",e)}),(0,s.jsx)(i.D0,{label:D("obj.sup.stopTimeout"),hint:D("obj.sup.stopTimeout.hint"),children:F("stopTimeout",{placeholder:"10"})})]}),"existing"===x.mode&&(0,s.jsxs)(N,{title:D("obj.mode.existing"),children:[(0,s.jsxs)(i.D0,{label:D("obj.f.container"),hint:D("obj.f.container.hint"),children:[(0,s.jsxs)("div",{className:"row gap-s",children:[(0,s.jsx)("div",{className:"grow",children:(0,s.jsx)(c.b,{value:x.container,onChange:e=>g("container",e),mono:!0,placeholder:D("dk.pickContainer"),ariaLabel:D("obj.f.container"),options:(null!=(h=q.containers)?h:[]).map(e=>({value:e.name,hint:"".concat(e.image," \xb7 ").concat(e.state).concat(e.managed?" \xb7 ".concat(D("dk.managed")):"")}))})}),P]}),M]}),(0,s.jsx)(i.D0,{label:D("obj.sup.stopTimeout"),hint:D("obj.sup.stopTimeout.hint"),children:F("stopTimeout",{placeholder:"10"})})]})]})]})}function S(e){let[l,t]=(0,n.useState)(e);return{d:l,setD:t,set:(e,l)=>t(t=>({...t,[e]:l}))}}},13460:(e,l,t)=>{t.d(l,{W:()=>b});var s=t(94799),a=t(34023),n=t(92947),r=t(2432),o=t(58960),i=t(7168),d=t(97356),c=t(70665),m=t(37165),h=t(69654),u=t(84561);let p="$shared";function b(e){var l,t,b;let{value:j,onChange:v,fileEnvs:x=[],fileVars:g={},used:f=[],fileDefined:k=[],setBy:y={}}=e,{t:N}=(0,h.s9)(),w=[p,...[...new Set([...Object.keys(j),...x])].filter(e=>e!==p).sort()],[C,S]=(0,a.useState)(()=>{var e;return null!=(e=w.find(e=>{var l;return e!==p&&Object.keys(null!=(l=j[e])?l:{}).length>0}))?e:w[0]}),[D,T]=(0,a.useState)(""),[R,q]=(0,a.useState)({}),F=null!=(l=j[C])?l:{},M=new Set([...C!==p&&null!=(t=g[p])?t:[],...null!=(b=g[C])?b:[]]),P=f.filter(e=>!(e.name in F)).map(e=>({value:e.name,hint:N("vars.used.count",{count:e.count})})),z=(e,l,t)=>{if(void 0!==t&&t!==e&&t in F)return;let s=Object.entries(F).map(s=>{let[a,n]=s;return a===e?[null!=t?t:a,{...n,...l}]:[a,n]});v({...j,[C]:Object.fromEntries(s)})},E=()=>{let e=D.trim();!/^[\w.$-]{1,60}$/.test(e)||e in j||e===p||(v({...j,[e]:{}}),S(e),T(""))};return(0,s.jsxs)("div",{className:"vars",children:[(0,s.jsxs)("div",{className:"row gap-s",children:[(0,s.jsx)("b",{children:N("ow.tab.vars")}),(0,s.jsxs)(m.B,{size:"sm",label:N("common.help"),title:N("vars.how.title"),children:[(0,s.jsx)("p",{children:N("vars.hint")}),(0,s.jsx)("p",{children:N("vars.how.1")}),(0,s.jsx)("p",{children:N("vars.how.2")}),(0,s.jsx)("p",{children:N("vars.note")})]})]}),(0,s.jsxs)("div",{className:"vars-envs",role:"tablist",children:[w.map(e=>(0,s.jsxs)("button",{type:"button",role:"tab","aria-selected":C===e,className:"vars-env ".concat(C===e?"on":""),onClick:()=>S(e),title:e===p?N("vars.all.hint"):void 0,children:[e===p?N("vars.all"):e,x.includes(e)&&(0,s.jsx)("i",{className:"vars-file",title:N("vars.fromFile"),children:"\xb7"})]},e)),(0,s.jsxs)("span",{className:"vars-add",children:[(0,s.jsx)("input",{className:"input",placeholder:N("vars.newEnv"),value:D,onChange:e=>T(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),E())},"aria-label":N("vars.newEnv")}),(0,s.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:E,disabled:!D.trim(),"aria-label":N("vars.newEnv"),children:(0,s.jsx)(n.A,{size:14})})]})]}),(0,s.jsx)("p",{className:"muted small vars-scope",children:C===p?N("vars.scope.all"):N("vars.scope.env",{env:C})}),(0,s.jsxs)("div",{className:"vars-table",children:[0===Object.keys(F).length&&(0,s.jsx)("p",{className:"muted small",style:{margin:"4px 2px"},children:N("vars.empty")}),Object.entries(F).map((e,l)=>{let[t,a]=e,n="".concat(C,"/").concat(l),c=a.secret&&!R[n];return(0,s.jsxs)("div",{className:"vars-row",children:[(0,s.jsx)(u.b,{value:t,onChange:e=>z(t,{},e.trim()),options:P,mono:!0,placeholder:N("vars.name"),ariaLabel:N("vars.name")}),(0,s.jsx)("input",{className:"input mono",type:c?"password":"text",value:a.value,onChange:e=>z(t,{value:e.target.value}),"aria-label":N("vars.value"),placeholder:a.secret&&a.set&&!a.value?N("vars.saved"):N("vars.value"),autoComplete:"off"}),(0,s.jsx)("button",{type:"button",className:"btn ghost icon sm ".concat(a.secret?"on":""),"aria-pressed":!!a.secret,onClick:()=>z(t,{secret:!a.secret}),"aria-label":N("vars.secret"),title:N("vars.secret.hint"),children:(0,s.jsx)(r.A,{size:14})}),a.secret?(0,s.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:()=>q(e=>({...e,[n]:!e[n]})),"aria-label":N("vars.show"),title:N("vars.show"),children:R[n]?(0,s.jsx)(o.A,{size:14}):(0,s.jsx)(i.A,{size:14})}):(0,s.jsx)("span",{}),(0,s.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:()=>(e=>{let l={...F};delete l[e],v({...j,[C]:l})})(t),"aria-label":N("common.delete"),children:(0,s.jsx)(d.A,{size:14})}),M.has(t)&&(0,s.jsx)("span",{className:"vars-note",children:N("vars.overridden")})]},"".concat(C,":").concat(l))})]}),(0,s.jsxs)("div",{className:"row gap-s",children:[(0,s.jsxs)("button",{type:"button",className:"btn sm",onClick:()=>(e=>{let l=null!=e?e:"name",t=1;for(;l in F;)l="".concat(null!=e?e:"name").concat(++t);v({...j,[C]:{...F,[l]:{value:""}}})})(),children:[(0,s.jsx)(n.A,{size:14}),N("vars.add")]}),C!==p&&!x.includes(C)&&(0,s.jsxs)("button",{type:"button",className:"btn ghost sm",onClick:()=>{let e={...j};delete e[C],v(e),S(p)},children:[(0,s.jsx)(c.A,{size:14}),N("vars.delEnv")]})]})]})}},29867:(e,l,t)=>{t.d(l,{dN:()=>M,I5:()=>F});var s=t(94799),a=t(66843),n=t(34023),r=t(59959),o=t(73885),i=t(74955);let d=(0,i.A)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),c=(0,i.A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var m=t(66826),h=t(55712),u=t(79141),p=t(3749),b=t(10804),j=t(69654);let v=null;function x(){let[e,l]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let e=!0;return null!=v||(v=p.FH.get("/object-db/props").catch(e=>{throw v=null,e})),v.then(t=>{e&&l(t)}).catch(()=>void 0),()=>{e=!1}},[]),e}var g=t(9217),f=t(70665),k=t(92947);let y=["session","network","ssl","advanced"];function N(e){let{def:l,value:t,onChange:a}=e;return"boolean"===l.type?(0,s.jsxs)("select",{className:"select",value:t,onChange:e=>a(e.target.value),"aria-label":l.name,children:[(0,s.jsx)("option",{value:"true",children:"true"}),(0,s.jsx)("option",{value:"false",children:"false"})]}):"choice"===l.type?(0,s.jsxs)("select",{className:"select",value:t,onChange:e=>a(e.target.value),"aria-label":l.name,children:[!t&&(0,s.jsx)("option",{value:""}),l.choices.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]}):(0,s.jsx)("input",{className:"input mono",type:"number"===l.type?"number":"text",min:l.min,max:l.max,value:t,placeholder:l.placeholder,autoComplete:"off",onChange:e=>a(e.target.value),"aria-label":l.name})}function w(e){let{engine:l,value:t,onChange:a,groups:n=y,exclude:r=[],quiet:o=!1}=e,{t:i,locale:d}=(0,j.s9)(),c=x();if(!c)return(0,s.jsx)("p",{className:"muted small",style:{margin:0},children:i("dp.loading")});let m=c[l].filter(e=>n.includes(e.group)&&!r.includes(e.name)),h=m.filter(e=>e.name in t),u=m.filter(e=>!(e.name in t));return(0,s.jsxs)("div",{className:"dprops",children:[0===h.length&&!o&&(0,s.jsx)("p",{className:"muted small",style:{margin:0},children:i("dp.none")}),h.map(e=>(0,s.jsxs)("div",{className:"dprop",children:[(0,s.jsxs)("div",{className:"dprop-row",children:[(0,s.jsx)("code",{className:"dprop-name",children:e.name}),(0,s.jsx)("div",{className:"dprop-val",children:(0,s.jsx)(N,{def:e,value:t[e.name],onChange:l=>a({...t,[e.name]:l})})}),(0,s.jsx)("button",{type:"button",className:"btn ghost icon sm",onClick:()=>{let{[e.name]:l,...s}=t;a(s)},"aria-label":i("dp.remove",{name:e.name}),title:i("dp.remove",{name:e.name}),children:(0,s.jsx)(f.A,{size:14})})]}),(0,s.jsx)("p",{className:"muted small dprop-desc",children:"es"===d?e.es:e.desc})]},e.name)),u.length>0&&(0,s.jsxs)("div",{className:"dprop-add",children:[(0,s.jsx)(k.A,{size:14,className:"muted"}),(0,s.jsxs)("select",{className:"select",value:"","aria-label":i("dp.add"),onChange:e=>{let l=m.find(l=>l.name===e.target.value);l&&a({...t,[l.name]:"boolean"===l.type?"true":"choice"===l.type?l.choices[0]:""})},children:[(0,s.jsx)("option",{value:"",children:i("dp.add")}),y.filter(e=>u.some(l=>l.group===e)).map(e=>(0,s.jsx)("optgroup",{label:i("dp.group.".concat(e)),children:u.filter(l=>l.group===e).map(e=>(0,s.jsx)("option",{value:e.name,children:e.name},e.name))},e))]})]})]})}let C={postgres:"postgresql",postgresql:"postgresql",mysql:"mysql",mariadb:"mysql",mssql:"mssql",sqlserver:"mssql",sqlite:"sqlite",file:"sqlite"};function S(e){let l,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=e.trim(),a=/^(?:jdbc:)?([a-z][a-z0-9+.-]*):/i.exec(s),n=a?C[a[1].toLowerCase()]:void 0;if(!n)return null;let r={engine:n,host:"",port:"",user:"",password:"",database:"",file:"",ssl:!1,trust:!1,props:{}};if("sqlite"===n){let e=s.replace(/^(?:jdbc:)?(?:sqlite|file):(?:\/\/)?/i,"").split("?")[0],l=decodeURIComponent(e.startsWith("/")?e:"/".concat(e));return l.length>1?{...r,file:l}:null}try{l=new URL(s.replace(/^jdbc:/i,"").replace(/^[a-z][a-z0-9+.-]*:/i,"http:"))}catch(e){return null}r.host=l.hostname,r.port=l.port,r.user=decodeURIComponent(l.username),r.password=decodeURIComponent(l.password),r.database=decodeURIComponent(l.pathname.replace(/^\//,""));let o=new Map(t.map(e=>[e.name.toLowerCase(),e]));return l.searchParams.forEach((e,l)=>{let t=l.toLowerCase(),s=e.toLowerCase();if("sslmode"===t||"ssl"===t||"encrypt"===t||"tls"===t)r.ssl=!["disable","disabled","false","no","0","allow","prefer"].includes(s)&&""!==s,r.trust=r.ssl&&["require","required","preferred"].includes(s);else if("trustservercertificate"===t)r.trust="true"===s;else{let l=o.get(t);l&&!l.name.startsWith("ssl.")&&(r.props[l.name]=e)}}),r}let D={mysql:{label:"MySQL / MariaDB",port:3306,color:"#00758f",sample:"mysql://user:password@localhost:3306/app"},postgresql:{label:"PostgreSQL",port:5432,color:"#4a7fb5",sample:"postgresql://user:password@localhost:5432/app?sslmode=require"},sqlite:{label:"SQLite",port:0,color:"#0f80cc",sample:"sqlite:///home/you/app/data.db"},mssql:{label:"SQL Server",port:1433,color:"#cc2927",sample:"mssql://sa:password@localhost:1433/master"}},T=Object.keys(D),R=["ssl.ca","ssl.cert","ssl.key"],q={"ssl.ca":"db.ssl.ca","ssl.cert":"db.ssl.cert","ssl.key":"db.ssl.key"};function F(e){var l;let t="sqlite"===e.engine?null==(l=e.dbFile.split("/").pop())?void 0:l.replace(/\.[^.]+$/,""):e.dbName.trim()||e.dbHost.trim();return t?"".concat(t," \xb7 ").concat(D[e.engine].label.split(" ")[0]):""}function M(e){let{d:l,set:t,setD:i,objectId:v,creating:f=!1}=e,{t:k,locale:y}=(0,j.s9)(),N=x(),[C,F]=(0,n.useState)({state:"idle"}),[M,P]=(0,n.useState)(""),[z,E]=(0,n.useState)(""),O="sqlite"===l.engine,A=function(e){var a;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.jsx)("input",{className:"input ".concat(n.mono?"mono":""),type:n.type,value:l[e],placeholder:n.placeholder,autoComplete:null!=(a=n.auto)?a:"off",onChange:l=>t(e,l.target.value)})},I=e=>{e!==l.engine&&(i(l=>({...l,engine:e,dbProps:{},dbSsl:!1,dbTrust:!1})),F({state:"idle"}))},_=async()=>{F({state:"busy"});try{let e=await p.FH.post("/object-db/test",{id:v,config:(0,g.Mr)(l)});F({state:"ok",text:"".concat(e.version," \xb7 ").concat(e.ms," ms")})}catch(e){F({state:"err",text:e instanceof Error?e.message:""})}},H=()=>{var e,t;let s=S(M,null==N?void 0:N[null!=(t=null==(e=S(M))?void 0:e.engine)?t:l.engine]);if(!s)return void E(k("db.url.bad"));E(""),F({state:"idle"}),i(e=>({...e,engine:s.engine,dbHost:s.host,dbPort:s.port,dbUser:s.user,dbPassword:s.password,dbName:s.database,dbFile:s.file,dbSsl:s.ssl,dbTrust:s.trust,dbProps:s.props})),P("")},L=(0,s.jsxs)(s.Fragment,{children:[O?(0,s.jsx)(b.yQ,{mode:"file",exts:["db","sqlite","sqlite3","db3"],value:l.dbFile,onChange:e=>t("dbFile",e),label:k("db.file"),hint:k("db.file.hint"),placeholder:"/home/you/app/data.db"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"of-grid2",children:[(0,s.jsx)(b.D0,{label:k("db.host"),children:A("dbHost",{placeholder:"127.0.0.1",mono:!0})}),(0,s.jsx)(b.D0,{label:k("db.port"),children:A("dbPort",{placeholder:String(D[l.engine].port)})}),(0,s.jsx)(b.D0,{label:k("db.user"),children:A("dbUser",{mono:!0})}),(0,s.jsx)(b.D0,{label:k("db.password"),hint:l.dbPasswordSet&&!l.dbPassword?k("db.password.saved"):void 0,children:(0,s.jsx)(a.y,{value:l.dbPassword,autoComplete:"new-password",placeholder:l.dbPasswordSet?"••••••••":"",onChange:e=>t("dbPassword",e.target.value)})})]}),(0,s.jsx)(b.D0,{label:k("db.database"),hint:k("db.database.hint"),children:A("dbName",{mono:!0})})]}),(0,s.jsxs)("div",{className:"row gap-s wrap db-test",children:[(0,s.jsxs)("button",{type:"button",className:"btn sm",onClick:()=>void _(),disabled:"busy"===C.state||!!O&&!l.dbFile.trim(),children:["busy"===C.state?(0,s.jsx)(r.A,{size:14,className:"spin"}):(0,s.jsx)(o.A,{size:14}),k("db.test")]}),"ok"===C.state&&(0,s.jsxs)("span",{className:"db-ok small",children:[(0,s.jsx)(d,{size:14}),k("db.test.ok")," \xb7 ",C.text]}),"err"===C.state&&(0,s.jsxs)("span",{className:"db-bad small",children:[(0,s.jsx)(c,{size:14}),C.text]})]})]}),K=O?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.Tl,{checked:l.dbSsl,onChange:e=>t("dbSsl",e),label:k("db.ssl")}),l.dbSsl&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.Tl,{checked:l.dbTrust,onChange:e=>t("dbTrust",e),label:k("db.trust"),hint:l.dbTrust?k("db.trust.on"):k("db.trust.off")}),R.filter(e=>null==N?void 0:N[l.engine].some(l=>l.name===e)).map(e=>{var a;let n=N[l.engine].find(l=>l.name===e);return(0,s.jsx)(b.yQ,{mode:"file",exts:["pem","crt","cer","key"],value:null!=(a=l.dbProps[e])?a:"",onChange:s=>t("dbProps",{...l.dbProps,[e]:s}),label:k(q[e]),hint:"es"===y?n.es:n.desc,placeholder:n.placeholder},e)}),(0,s.jsx)(w,{engine:l.engine,value:l.dbProps,onChange:e=>t("dbProps",e),groups:["ssl"],exclude:[...R],quiet:!0})]})]}),U=(0,s.jsx)(w,{engine:l.engine,value:l.dbProps,onChange:e=>t("dbProps",e),groups:["session","network","advanced"]}),$=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.Tl,{checked:l.dbReadOnly,onChange:e=>t("dbReadOnly",e),label:k("db.readonly"),hint:l.dbReadOnly?k("db.readonly.on"):k("db.readonly.off")}),(0,s.jsxs)("div",{className:"of-grid2",children:[(0,s.jsx)(b.D0,{label:k("db.timeout"),hint:k("db.timeout.hint"),children:A("dbTimeout",{placeholder:"30"})}),(0,s.jsx)(b.D0,{label:k("db.maxRows"),hint:k("db.maxRows.hint"),children:A("dbMaxRows",{placeholder:"1000"})})]})]}),B=(0,s.jsx)("div",{className:"dbengines",role:"group","aria-label":k("db.engine"),children:T.map(e=>(0,s.jsxs)("button",{type:"button",className:"dbengine","aria-pressed":l.engine===e,style:{"--c":D[e].color},onClick:()=>I(e),children:[(0,s.jsx)(m.A,{size:18}),(0,s.jsx)("b",{children:D[e].label}),(0,s.jsx)("small",{children:"sqlite"===e?k("db.engine.file"):k("db.engine.port",{port:D[e].port})})]},e))});return f?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.Zp,{title:k("db.engine"),hint:k("db.engine.hint"),children:B}),(0,s.jsxs)(g.Zp,{title:k("db.conn"),hint:k("db.conn.hint"),children:[(0,s.jsx)(b.D0,{label:k("db.url"),error:z,hint:z?void 0:k("db.url.hint"),children:(0,s.jsxs)("div",{className:"row gap-s",children:[(0,s.jsx)("input",{className:"input mono grow",value:M,placeholder:D[l.engine].sample,autoComplete:"off",spellCheck:!1,onChange:e=>{P(e.target.value),E("")},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),H())}}),(0,s.jsxs)("button",{type:"button",className:"btn sm",disabled:!M.trim(),onClick:H,children:[(0,s.jsx)(h.A,{size:14}),k("db.url.use")]})]})}),L]}),(0,s.jsx)(g.Zp,{title:k("db.safety"),hint:k("db.safety.hint"),children:$}),(0,s.jsxs)("details",{className:"of-adv",children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)(u.A,{size:15}),k("db.advanced"),(0,s.jsx)("span",{className:"muted small",children:k("db.advanced.hint")})]}),!O&&(0,s.jsx)(g.Zp,{title:k("db.sslTitle"),hint:k("db.sslTitle.hint"),children:K}),(0,s.jsx)(g.Zp,{title:k("dp.title"),hint:k("dp.hint"),children:U})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(g.Zp,{title:k("db.conn"),hint:k("db.conn.hint"),children:[(0,s.jsx)(b.D0,{label:k("db.engine"),children:(0,s.jsx)(b.$q,{value:l.engine,onChange:I,options:T.map(e=>({id:e,label:D[e].label}))})}),L]}),!O&&(0,s.jsx)(g.Zp,{title:k("db.sslTitle"),hint:k("db.sslTitle.hint"),children:K}),(0,s.jsx)(g.Zp,{title:k("dp.title"),hint:k("dp.hint"),children:U}),(0,s.jsx)(g.Zp,{title:k("db.safety"),hint:k("db.safety.hint"),children:$})]})}},37165:(e,l,t)=>{t.d(l,{B:()=>o});var s=t(94799),a=t(34023);let n=(0,t(74955).A)("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var r=t(21018);function o(e){let{label:l,title:t,children:o,size:i="md",align:d="start"}=e,[c,m]=(0,a.useState)(!1),h=(0,a.useRef)(null),u=(0,a.useRef)(null),p=(0,a.useId)();return(0,r.s)(c,h,()=>m(!1),()=>{var e;return null==(e=u.current)?void 0:e.focus()}),(0,s.jsxs)("span",{className:"help ".concat("sm"===i?"sm":""," ").concat("end"===d?"end":""),ref:h,children:[(0,s.jsx)("button",{ref:u,type:"button",className:"help-btn","aria-label":l,title:l,"aria-haspopup":"dialog","aria-expanded":c,"aria-controls":c?p:void 0,onClick:()=>m(e=>!e),children:(0,s.jsx)(n,{size:"sm"===i?15:18})}),c&&(0,s.jsxs)("div",{id:p,role:"dialog","aria-label":t,className:"help-pop",children:[(0,s.jsx)("div",{className:"eyebrow",children:t}),(0,s.jsx)("div",{className:"muted small help-body",children:o})]})]})}},84561:(e,l,t)=>{t.d(l,{b:()=>o});var s=t(94799),a=t(34023),n=t(21018),r=t(10804);function o(e){let{value:l,onChange:t,options:o,placeholder:i,mono:d=!1,ariaLabel:c,onOpen:m,empty:h}=e,[u,p]=(0,a.useState)(!1),[b,j]=(0,a.useState)(0),v=(0,a.useRef)(null);(0,n.s)(u,v,()=>p(!1));let x=(0,a.useMemo)(()=>{let e=l.trim().toLowerCase();return(e?o.filter(l=>{var t,s;return"".concat(l.value," ").concat(null!=(t=l.label)?t:""," ").concat(null!=(s=l.hint)?s:"").toLowerCase().includes(e)}):o).slice(0,60)},[o,l]);(0,a.useEffect)(()=>{j(0)},[l,u]);let g=(0,r.Bp)(u&&(x.length>0||!!h),b,x.length),f=e=>{t(e.value),p(!1)};return(0,s.jsxs)("div",{className:"sg",ref:v,children:[(0,s.jsx)("input",{className:"input ".concat(d?"mono":""),value:l,placeholder:i,"aria-label":c,autoComplete:"off",spellCheck:!1,...g.input,onFocus:()=>{u||(p(!0),null==m||m())},onClick:()=>p(!0),onChange:e=>{t(e.target.value),p(!0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),p(!0),j(e=>Math.min(x.length-1,e+1))):"ArrowUp"===e.key?(e.preventDefault(),j(e=>Math.max(0,e-1))):"Enter"===e.key&&u&&x[b]?(e.preventDefault(),f(x[b])):"Escape"===e.key&&u&&(e.stopPropagation(),p(!1))}}),u&&(x.length>0||h)&&(0,s.jsxs)("ul",{className:"sg-list",...g.listProps,children:[0===x.length&&(0,s.jsx)("li",{className:"sg-empty",role:"presentation",children:h}),x.map((e,l)=>{var t;return(0,s.jsx)("li",{...g.optionProps(l),children:(0,s.jsxs)("button",{type:"button",tabIndex:-1,className:"sg-opt ".concat(l===b?"hi":""),onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>j(l),onClick:()=>f(e),children:[(0,s.jsx)("span",{className:"nm ".concat(d?"mono":""),children:null!=(t=e.label)?t:e.value}),e.hint&&(0,s.jsx)("span",{className:"hint",children:e.hint})]})},e.value)})]})]})}},95587:(e,l,t)=>{t.d(l,{X:()=>h});var s=t(94799),a=t(34023),n=t(3749),r=t(69654),o=t(48538),i=t(10804),d=t(9217),c=t(52974),m=t(29867);function h(e){let{presetColonyId:l,presetKind:t,onClose:h,onSaved:u}=e,{t:p}=(0,r.s9)(),{refresh:b}=(0,o.o0)(),j=(0,i.dj)(),{d:v,set:x,setD:g}=(0,d.Te)(()=>(0,d.QJ)(void 0,l,t)),[f,k]=(0,a.useState)(""),[y,N]=(0,a.useState)(!1),w=async()=>{let e=v.name.trim()||("database"===v.kind?(0,m.I5)(v):"");if(!e)return void k(p("obj.err.name"));N(!0),k("");try{if("docker"===v.kind&&"template"===v.mode&&!v.template){k(p("tpl.pick")),N(!1);return}let l="docker"===v.kind&&"template"===v.mode?await n.FH.post("/objects/from-template",{name:e,colony_id:v.colony_id||null,template:v.template,values:v.tplValues}):await n.FH.post("/objects",{name:e,colony_id:v.colony_id||null,kind:v.kind,config:(0,d.qP)(v)});v.manager&&c.G.includes(v.kind)&&await n.FH.put("/objects/".concat(l.id,"/manager"),{agent_id:v.manager}).catch(e=>j(e instanceof Error?e.message:"","err")),await b(["objects","agents"]),j(p("obj.created")),null==u||u(l.id),h()}catch(e){k(e instanceof Error?e.message:p("edit.saveFailed")),N(!1)}};return(0,s.jsx)(i._s,{title:p("obj.newTitle"),subtitle:p("obj.subtitle"),onClose:h,footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{className:"btn ghost",onClick:h,children:p("common.cancel")}),(0,s.jsx)("button",{className:"btn primary",disabled:y,onClick:()=>void w(),children:p("obj.create")})]}),children:(0,s.jsx)(d.Bh,{d:v,set:x,setD:g,showKind:!0,error:f})})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[606],{5372:(e,t,n)=>{n.d(t,{kh:()=>h,rs:()=>g,z6:()=>u});var s=n(94799),a=n(34023),r=n(56742),l=n(48538),i=n(69654),c=n(47890),o=n(72942),d=n(10804);function u(){let[e,t]=(0,a.useState)(null),n=(0,a.useRef)(void 0),l=(0,a.useRef)(!1);l.current=!!e;let i=(0,a.useCallback)((e,s,a)=>{clearTimeout(n.current);let r=()=>t({id:e,rect:s.getBoundingClientRect()});a||l.current?r():n.current=setTimeout(r,280)},[]),c=(0,a.useCallback)(()=>{clearTimeout(n.current),t(null)},[]);return(0,a.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&c()};return window.addEventListener("keydown",t),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("keydown",t),window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[e,c]),(0,a.useEffect)(()=>()=>clearTimeout(n.current),[]),{bind:(0,a.useCallback)(e=>({onMouseEnter:t=>i(e,t.currentTarget,!1),onMouseLeave:c,onFocus:t=>{t.currentTarget.matches(":focus-visible")&&i(e,t.currentTarget,!0)},onBlur:c,onClick:c}),[i,c]),node:e&&"undefined"!=typeof document?(0,r.createPortal)((0,s.jsx)(j,{anchor:e}),document.body):null}}function m(e){let{label:t,children:n}=e;return(0,s.jsxs)("div",{className:"ap-row",children:[(0,s.jsx)("dt",{children:t}),(0,s.jsx)("dd",{children:n})]})}function h(e){let{agent:t,hideColony:n=!1}=e,{t:a}=(0,i.s9)(),r=(0,l.Tu)(e=>e.agents),u=(0,l.Tu)(e=>e.colonies).find(e=>e.id===t.colony_id),h=(0,o.E)((0,l.M_)(t.id)),g=t.worker_ids.map(e=>{var t;return null==(t=r.find(t=>t.id===e))?void 0:t.name}).filter(Boolean),j=r.filter(e=>"orchestrator"===e.role&&e.worker_ids.includes(t.id)).map(e=>e.name),p=e=>e.length>4?"".concat(e.slice(0,4).join(", ")," ").concat(a("hover.more",{count:e.length-4})):e.join(", ");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"ap-head",children:[(0,s.jsx)(d._h,{agent:t}),(0,s.jsxs)("div",{className:"grow",children:[(0,s.jsx)("b",{className:"ap-name",children:t.name}),(0,s.jsxs)("div",{className:"row gap-s wrap mt-s",children:[(0,s.jsx)(d.PW,{role:t.role}),(0,s.jsx)(d.P5,{status:t.status})]})]})]}),(0,s.jsx)("p",{className:"ap-desc ".concat(t.description?"":"muted"),children:t.description||a("switcher.noDescription")}),h&&(0,s.jsxs)("div",{className:"ap-now",children:[(0,s.jsx)("i",{className:"dot run"}),h]}),(0,s.jsxs)("dl",{className:"ap-rows",children:[(0,s.jsxs)(m,{label:a("form.provider"),children:[c.xq[t.provider].label,t.model?" \xb7 ".concat(t.model):" \xb7 ".concat(a("model.cliDefault"))]}),(0,s.jsx)(m,{label:a("inherit.permissions"),children:(0,c.Ck)(t.effective.permission)}),(0,s.jsxs)(m,{label:a("colony.folder"),children:[(0,s.jsx)("span",{className:"mono",children:(0,c._1)(t.effective.cwd)}),t.effective.inherited.includes("cwd")&&(0,s.jsxs)("span",{className:"muted",children:[" \xb7 ",a("colony.fromColony")]})]}),!n&&(0,s.jsx)(m,{label:a("form.colony"),children:u?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("i",{className:"cdot",style:{background:u.color||"var(--honey)"}}),u.name]}):(0,s.jsx)("span",{className:"muted",children:a("common.noColony")})}),"orchestrator"===t.role?(0,s.jsx)(m,{label:a("form.team"),children:g.length?p(g):(0,s.jsx)("span",{className:"muted",children:a("colony.noWorkers")})}):(0,s.jsx)(m,{label:a("rel.directedBy"),children:j.length?p(j):(0,s.jsx)("span",{className:"muted",children:a("hover.noOrchestrator")})}),(0,s.jsx)(m,{label:a("colony.session"),children:(0,s.jsx)("span",{className:"mono",children:t.session_id?"".concat(t.session_id.slice(0,12),"…"):a("colony.noSession")})}),(0,s.jsxs)(m,{label:a("agents.col.updated"),children:[(0,c.KN)(t.updated_at),!!t.queued&&t.queued>0&&(0,s.jsxs)("span",{className:"muted",children:[" \xb7 ",a("queue.count",{count:t.queued})]})]})]})]})}function g(e){var t,n,l;let{target:i,width:c=310,pinned:o=!1,onClose:d,children:u,label:m}=e,h=(0,a.useRef)(null),[g,j]=(0,a.useState)(null),p=(0,a.useCallback)(()=>{var e,t;if(!i)return;let n=null!=(t=null==(e=h.current)?void 0:e.offsetHeight)?t:0,s=i instanceof DOMRect?i:i.getBoundingClientRect(),a=s.right+12+c+8<=window.innerWidth?"right":"left",r="right"===a?s.right+12:Math.max(8,s.left-12-c),l=Math.min(Math.max(8,s.top+s.height/2-n/2),Math.max(8,window.innerHeight-n-8));j(e=>e&&e.left===r&&e.top===l&&e.side===a?e:{left:r,top:l,side:a})},[i,c]);return((0,a.useLayoutEffect)(p),(0,a.useEffect)(()=>{if(!o)return;window.addEventListener("scroll",p,!0),window.addEventListener("resize",p);let e="undefined"!=typeof ResizeObserver&&h.current?new ResizeObserver(p):null;e&&h.current&&e.observe(h.current);let t=e=>{var t;let n=e.target;(null==(t=h.current)?void 0:t.contains(n))||n.closest('.cell, [role="dialog"], .modal, .drawer, .scrim, .menu-pop')||null==d||d()};return document.addEventListener("pointerdown",t),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p),null==e||e.disconnect(),document.removeEventListener("pointerdown",t)}},[o,p,d]),i&&"undefined"!=typeof document)?(0,r.createPortal)((0,s.jsx)("div",{ref:h,className:"ap-card ".concat(o?"pinned":""," ").concat(null!=(t=null==g?void 0:g.side)?t:"right"),role:o?"complementary":"tooltip","aria-label":m,style:{left:null!=(n=null==g?void 0:g.left)?n:-9999,top:null!=(l=null==g?void 0:g.top)?l:-9999,width:c,visibility:g?"visible":"hidden"},children:u}),document.body):null}function j(e){let{anchor:t}=e,n=(0,l.fJ)(t.id);return n?(0,s.jsx)(g,{target:t.rect,children:(0,s.jsx)(h,{agent:n})}):null}},20422:(e,t,n)=>{n.d(t,{N:()=>i});var s=n(94799),a=n(70283),r=n(42162),l=n(69654);function i(e){let{spec:t,label:n,title:i}=e,{t:c}=(0,l.s9)(),o=(0,r.n)();return(0,s.jsxs)("button",{className:"btn sm",onClick:()=>void o.openTerminal(t),title:i,children:[(0,s.jsx)(a.A,{size:14}),null!=n?n:c("dock.nav")]})}},31606:(e,t,n)=>{n.d(t,{md:()=>M,wl:()=>q});var s=n(94799),a=n(20422),r=n(34023),l=n(41463),i=n.n(l),c=n(66654),o=n(70665),d=n(7991),u=n(66826),m=n(2432),h=n(32335),g=n(59959),j=n(73885),p=n(47405),b=n(83372),f=n(6673),v=n(19431),x=n(33691),y=n(26701),k=n(5372),w=n(3749),N=n(69654),E=n(47890),C=n(10804),A=n(28941),z=n(48538),S=n(42162),_=n(1517),$=n(74988),L=n(75010);let T={mysql:"MySQL / MariaDB",postgresql:"PostgreSQL",sqlite:"SQLite",mssql:"SQL Server"};function M(e){let{status:t,className:n=""}=e;return(0,s.jsx)("i",{className:"odot ".concat($.Wy[t]," ").concat(n),"aria-hidden":!0})}function H(e){var t,n,s,a;if("server"===e.kind)return e.config.start;if("http"===e.kind)return(0,E._1)(e.config.folder);if("database"===e.kind){let n=e.config;return"sqlite"===n.engine?(0,E._1)(null!=(t=n.file)?t:""):"".concat(n.host||"127.0.0.1").concat(n.port?":".concat(n.port):"").concat(n.database?"/".concat(n.database):"")}if("cluster"===e.kind)return"".concat(e.config.members.length);let r=e.config;return"container"===r.mode?null!=(n=r.image)?n:"":"compose"===r.mode?(0,E._1)(null!=(s=r.file)?s:""):null!=(a=r.container)?a:""}function q(e){let{object:t,target:n,onClose:l,onCreateManager:q}=e,{t:R}=(0,N.s9)(),{agents:F,objects:P,colonies:O}=(0,z.o0)(),B=(0,S.n)(),W="server"===t.kind||"docker"===t.kind&&"compose"!==t.config.mode,I=t.manager_id?F.filter(e=>e.id===t.manager_id):F.filter(e=>{var n,s;return e.skill_ids.includes(_.t)&&(null!=(n=e.colony_id)?n:null)===(null!=(s=t.colony_id)?s:null)}),[D,K]=(0,r.useState)(!1),{refresh:Q}=(0,z.o0)(),J=async e=>{try{await w.FH.put("/objects/".concat(t.id,"/manager"),{agent_id:e}),await Q(["objects","agents"]),K(!1)}catch(e){U(e instanceof Error?e.message:"","err")}},U=(0,C.dj)(),[G,V]=(0,r.useState)(null),{icon:X,color:Y}=$.Nd[t.kind],Z=t.state.status,ee=async e=>{V(e);try{await w.FH.post("/objects/".concat(t.id,"/action"),{action:e})}catch(t){U("".concat(R("obj.act.failed",{action:R("obj.act.".concat(e))}),": ").concat(t instanceof Error?t.message:""),"err")}finally{V(null)}},et="running"===Z||"starting"===Z,en=async()=>{V("test");try{let e=await w.FH.post("/object-db/test",{id:t.id,config:t.config});U("".concat(R("db.test.ok")," \xb7 ").concat(e.version," \xb7 ").concat(e.ms," ms"))}catch(e){U(e instanceof Error?e.message:"","err")}finally{V(null)}},es="cluster"===t.kind?t.config.members.map(e=>P.find(t=>t.id===e)).filter(e=>!!e):[];return(0,s.jsx)(k.rs,{target:n,pinned:!0,width:380,label:t.name,onClose:l,children:(0,s.jsxs)("div",{className:"col obj-panel res-gap12",children:[(0,s.jsxs)("div",{className:"ap-corner row gap-s",children:[(0,s.jsx)(i(),{className:"btn ghost icon sm",href:"/resources/".concat(t.id,"?tab=config"),"aria-label":R("obj.act.edit"),title:R("obj.act.edit"),children:(0,s.jsx)(c.A,{size:15})}),(0,s.jsx)("button",{className:"btn ghost icon sm",onClick:l,"aria-label":R("common.close"),title:"".concat(R("common.close")," (Esc)"),children:(0,s.jsx)(o.A,{size:16})})]}),(0,s.jsxs)("div",{className:"row gap-l res-pr70",children:[(0,s.jsx)("span",{className:"obj-ico",style:{"--c":Y},children:(0,s.jsx)(X,{size:22})}),(0,s.jsxs)("div",{className:"grow res-minw0",children:[(0,s.jsx)("h2",{className:"res-h2",children:t.name}),(0,s.jsxs)("div",{className:"row gap-s wrap res-mt4",children:[(0,s.jsxs)("span",{className:"ostatus ".concat($.Wy[Z]),children:[(0,s.jsx)(M,{status:Z}),R("obj.status.".concat(Z))]}),(0,s.jsx)("span",{className:"muted small",children:R("obj.kind.".concat(t.kind))})]})]})]}),(t.state.detail||t.state.since)&&(0,s.jsx)("p",{className:"muted small res-m0",children:[(0,$.HS)(R,t.state.detail),t.state.since&&et?R("obj.since",{time:(0,E.KN)(t.state.since)}):"",t.state.pid?R("obj.pid",{pid:t.state.pid}):""].filter(Boolean).join(" \xb7 ")}),(0,s.jsxs)(i(),{className:"btn primary",href:"/resources/".concat(t.id),children:[(0,s.jsx)(d.A,{size:15}),R("obj.open")]}),"cluster"!==t.kind&&(0,s.jsx)("div",{className:"mono small obj-cmd",title:H(t),children:H(t)}),"database"===t.kind&&(0,s.jsxs)("div",{className:"row gap-s wrap",children:[(0,s.jsxs)("span",{className:"db-badge",children:[(0,s.jsx)(u.A,{size:12}),T[t.config.engine]]}),!1!==t.config.readOnly?(0,s.jsxs)("span",{className:"db-badge ro",children:[(0,s.jsx)(m.A,{size:12}),R("db.readonly.badge")]}):(0,s.jsxs)("span",{className:"db-badge rw",children:[(0,s.jsx)(h.A,{size:12}),R("db.write.badge")]}),(0,s.jsxs)("button",{className:"btn sm",disabled:!!G,onClick:()=>void en(),children:["test"===G?(0,s.jsx)(g.A,{size:14,className:"spin"}):(0,s.jsx)(j.A,{size:14}),R("db.test")]})]}),"http"===t.kind||"database"===t.kind?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"row gap-s wrap",children:[(0,s.jsxs)("button",{className:"btn primary sm",disabled:!!G||("cluster"===t.kind?"running"===Z:et),onClick:()=>void ee("start"),children:[(0,s.jsx)(p.A,{size:14}),R("cluster"===t.kind?"obj.act.startAll":"obj.act.start")]}),(0,s.jsxs)("button",{className:"btn sm",disabled:!!G||!et&&"error"!==Z&&!("cluster"===t.kind&&es.some(e=>"running"===e.state.status)),onClick:()=>void ee("stop"),children:[(0,s.jsx)(b.A,{size:14}),R("cluster"===t.kind?"obj.act.stopAll":"obj.act.stop")]}),(0,s.jsxs)("button",{className:"btn sm",disabled:!!G,onClick:()=>void ee("restart"),children:[(0,s.jsx)(f.A,{size:14}),R("cluster"===t.kind?"obj.act.restartAll":"obj.act.restart")]})]}),"cluster"===t.kind&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"eyebrow res-mb6",children:R("obj.members")}),es.length?(0,s.jsx)("div",{className:"col res-gap4",children:es.map((e,t)=>(0,s.jsxs)("div",{className:"row gap-s small",children:[(0,s.jsx)("span",{className:"ord",children:t+1}),(0,s.jsx)(M,{status:e.state.status}),(0,s.jsx)("b",{className:"grow ellipsis",children:e.name}),(0,s.jsx)("span",{className:"muted",children:R("obj.status.".concat(e.state.status))})]},e.id))}):(0,s.jsx)("p",{className:"muted small res-m0",children:R("obj.members.empty")})]}),(0,s.jsxs)("div",{className:"row gap-s wrap",children:[W&&(0,s.jsx)(a.N,{spec:{objectId:t.id},label:"server"===t.kind?R("dock.here"):R("dock.shell")}),(0,s.jsxs)("button",{className:"btn sm",onClick:()=>B.openLogs(t.id,t.name),children:[(0,s.jsx)(v.A,{size:14}),R("dock.logs")]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"eyebrow res-mb6",children:R("obj.logs")}),(0,s.jsx)(L.I,{id:t.id})]})]}),"http"!==t.kind&&"database"!==t.kind&&(0,s.jsxs)("div",{className:"obj-managers",children:[(0,s.jsx)("div",{className:"eyebrow res-mb6",children:R("obj.managers")}),I.length?(0,s.jsx)("div",{className:"row gap-s wrap",children:I.map(e=>(0,s.jsxs)("span",{className:"chip ps-chip",children:[(0,s.jsxs)(i(),{href:"/agents/".concat(e.id),title:"plan"===e.permission?R("obj.managers.readonly"):void 0,children:[e.name,"plan"===e.permission?" \xb7 ".concat(R("obj.managers.ro")):""]}),t.manager_id===e.id&&(0,s.jsx)("button",{type:"button",onClick:()=>void J(null),"aria-label":R("obj.managers.remove"),title:R("obj.managers.remove"),children:(0,s.jsx)(o.A,{size:12})})]},e.id))}):(0,s.jsx)("p",{className:"muted small res-m0",children:R("obj.managers.none")}),t.manager_id&&(0,s.jsx)("p",{className:"muted small res-mt6",children:R("obj.managers.only")}),(0,s.jsxs)("div",{className:"row gap-s wrap res-mt8",children:[(0,s.jsxs)("button",{className:"btn sm",onClick:q,children:[(0,s.jsx)(x.A,{size:14}),R("obj.managers.create")]}),(0,s.jsxs)("button",{className:"btn sm","aria-pressed":D,onClick:()=>K(e=>!e),children:[(0,s.jsx)(y.A,{size:14}),R("obj.managers.add")]})]}),D&&(0,s.jsx)("div",{className:"res-mt8",children:(0,s.jsx)(A.c,{inline:!0,autoFocus:!0,options:F.filter(e=>e.id!==t.manager_id).map(e=>{var t,n;return{id:e.id,label:e.name,hint:null!=(n=null==(t=O.find(t=>t.id===e.colony_id))?void 0:t.name)?n:R("common.noColony")}}),value:[],onChange:e=>e[0]&&void J(e[0]),placeholder:R("obj.manager.placeholder"),empty:R("obj.manager.empty"),ariaLabel:R("obj.managers.add")})})]})]})})}},42162:(e,t,n)=>{n.d(t,{$:()=>u,n:()=>c});var s=n(94799),a=n(34023),r=n(3749),l=n(69654);let i=(0,a.createContext)(null),c=()=>{let e=(0,a.useContext)(i);if(!e)throw Error("DockProvider missing");return e},o="hive-am.dock",d=e=>Math.max(140,Math.min(e,Math.round(.8*window.innerHeight)));function u(e){let{children:t}=e,{t:n}=(0,l.s9)(),[c,u]=(0,a.useState)(!1),[m,h]=(0,a.useState)(320),[g,j]=(0,a.useState)([]),[p,b]=(0,a.useState)(null),[f,v]=(0,a.useState)(!0),[x,y]=(0,a.useState)(""),k=(0,a.useRef)(!1);(0,a.useEffect)(()=>{try{var e;let t=JSON.parse(null!=(e=localStorage.getItem(o))?e:"{}");"number"==typeof t.height&&h(d(t.height)),t.open&&u(!0),"string"==typeof t.active&&b(t.active)}catch(e){}r.FH.get("/terminals").then(e=>{v(e.enabled),j(t=>[...e.terminals.map(e=>({key:"t:".concat(e.id),kind:"term",id:e.id,title:e.title,cwd:e.cwd,ended:e.alive?void 0:e.exitCode})),...t.filter(e=>"logs"===e.kind)]),b(t=>t&&e.terminals.some(e=>"t:".concat(e.id)===t)?t:e.terminals[0]?"t:".concat(e.terminals[0].id):t)}).catch(()=>void 0).finally(()=>{k.current=!0})},[]),(0,a.useEffect)(()=>{if(k.current)try{localStorage.setItem(o,JSON.stringify({open:c,height:m,active:p}))}catch(e){}},[c,m,p]),(0,a.useEffect)(()=>{document.documentElement.style.setProperty("--app-h",c?"calc(100vh - ".concat(m,"px)"):"100vh")},[c,m]);let w=(0,a.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};y("");try{let t=await r.FH.post("/terminals",e),n={key:"t:".concat(t.id),kind:"term",id:t.id,title:t.title,cwd:t.cwd};j(e=>[...e,n]),b(n.key),u(!0)}catch(e){y(e instanceof Error?e.message:n("dock.failed")),u(!0)}},[n]),N=(0,a.useCallback)((e,t)=>{let n="l:".concat(e);j(s=>s.some(e=>e.key===n)?s:[...s,{key:n,kind:"logs",objectId:e,title:t}]),b(n),u(!0)},[]),E=(0,a.useCallback)(e=>{j(t=>{let n=t.find(t=>t.key===e);(null==n?void 0:n.kind)==="term"&&r.FH.del("/terminals/".concat(n.id)).catch(()=>void 0);let s=t.filter(t=>t.key!==e);return b(t=>{var n,a;return t===e?null!=(a=null==(n=s[s.length-1])?void 0:n.key)?a:null:t}),s})},[]),C=(0,a.useCallback)((e,t)=>j(n=>n.map(n=>n.key===e&&"term"===n.kind?{...n,ended:null!=t?t:0}:n)),[]),A=(0,a.useCallback)(()=>{if(c)return void u(!1);u(!0),!g.length&&f&&w()},[c,g.length,f,w]);(0,a.useEffect)(()=>{let e=e=>{!e.ctrlKey||e.altKey||e.metaKey||"`"!==e.key&&"Backquote"!==e.code||(e.preventDefault(),e.stopPropagation(),A())};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[A]);let z=(0,a.useMemo)(()=>({open:c,height:m,tabs:g,active:p,enabled:f,error:x,toggle:A,setOpen:u,setHeight:e=>h(d(e)),setActive:b,openTerminal:w,openLogs:N,closeTab:E,markEnded:C}),[c,m,g,p,f,x,A,w,N,E,C]);return(0,s.jsx)(i.Provider,{value:z,children:t})}},72942:(e,t,n)=>{n.d(t,{E:()=>r});var s=n(68419),a=n(10969);function r(e){if(!e)return null;let t=e.blocks[e.blocks.length-1],n="dispatch"===e.source?(0,s.Tl)("activity.delegated"):"";if(!t)return"".concat(n).concat((0,s.Tl)("activity.starting"));if("tool"===t.type){let e=(0,a.q0)(t),r="".concat(e.label).concat(e.summary?" ".concat(e.summary):"");return"".concat(n).concat(void 0===t.output?(0,s.Tl)("activity.running",{tool:r}):(0,s.Tl)("activity.ran",{tool:r}))}return"".concat(n).concat("thinking"===t.type?(0,s.Tl)("activity.thinking"):(0,s.Tl)("activity.writing"))}},74988:(e,t,n)=>{n.d(t,{HS:()=>j,M6:()=>u,Mn:()=>h,Nd:()=>o,Wy:()=>d,y$:()=>m});var s=n(29416),a=n(34978),r=n(84616),l=n(66826),i=n(73784),c=n(47890);let o={server:{color:"#0f8f9e",icon:s.A},docker:{color:"#2496ed",icon:a.A},http:{color:"#7a4de0",icon:r.A},database:{color:"#d9822b",icon:l.A},cluster:{color:c.Ng,icon:i.A}},d={running:"ok",ready:"ok",starting:"warn",error:"err",stopped:"off",unknown:"off"},u=e=>Object.entries(null!=e?e:{}).map(e=>{let[t,n]=e;return"".concat(t,"=").concat(n)}).join("\n");function m(e){let t={};for(let n of e.split("\n")){let e=n.trim();if(!e||e.startsWith("#"))continue;let s=e.indexOf("=");if(s<=0)throw Error('"'.concat(e,'" is not NAME=value'));t[e.slice(0,s).trim()]=e.slice(s+1)}return t}let h=e=>e.split("\n").map(e=>e.trim()).filter(Boolean),g=[[/^(\d+) requests in (\d+) files$/,"d.requests"],[/^(\d+)\/(\d+) running$/,"d.running"],[/^no members$/,"d.noMembers"],[/^only (\d+)\/(\d+) running · stopped: (.+)$/,"d.onlySome"],[/^(.+) failed · (\d+)\/(\d+) running$/,"d.failed"],[/^waiting for port (\d+)$/,"d.waitPort"],[/^running, but nothing listens on port (\d+)$/,"d.noPort"],[/^exited with code (\d+)$/,"d.exited"],[/^ended by (\w+)$/,"d.signal"],[/^restarted \((\d+)\/(\d+)\)$/,"d.restarted"],[/^was unhealthy: restarting \((\d+)\/(\d+)\)$/,"d.unhealthyRestart"],[/^health check pending$/,"d.healthPending"],[/^restarting$/,"d.restarting"],[/^container not found$/,"d.noContainer"],[/^the compose file is missing$/,"d.noCompose"],[/^(\d+) of (\d+) running$/,"d.running2"],[/^(\d+) services?$/,"d.services"],[/^a service exited with an error$/,"d.serviceFailed"],[/^checking…$/,"d.checking"],[/^unhealthy$/,"d.unhealthy"]];function j(e,t){return t?t.split(" \xb7 ").map(t=>{for(let[n,s]of g){let a=n.exec(t);if(a)return e(s,Object.fromEntries(a.slice(1).map((e,t)=>["a".concat(t+1),e])))}let n=/^(.*)restarting in (\d+) s \((\d+)\/(\d+)\)$/.exec(t);if(n)return e("d.restartIn",{a1:n[2],a2:n[3],a3:n[4]});let s=/^gave up after (\d+) restarts$/.exec(t);if(s)return e("d.gaveUp",{a1:s[1]});let a=/^unhealthy: (.+)$/.exec(t);return a?"".concat(e("d.unhealthy"),": ").concat(a[1]):t}).join(" \xb7 "):""}},75010:(e,t,n)=>{n.d(t,{I:()=>d});var s=n(94799),a=n(34023),r=n(98392),l=n(64883),i=n(3749),c=n(69654);let o=/\u001b\[[0-9;?]*[ -/]*[@-~]/g;function d(e){let{id:t,height:n=220}=e,{t:d}=(0,c.s9)(),[u,m]=(0,a.useState)(null),h=(0,a.useRef)(""),g=(0,a.useRef)(null),j=(0,a.useRef)(!0),[p,b]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=!1,n;m(null),h.current="",j.current=!0,b(!1);let s=async()=>{try{let n=h.current?"after=".concat(encodeURIComponent(h.current)):"tail=300",s=await i.FH.get("/objects/".concat(t,"/logs?").concat(n));if(e)return;h.current=s.cursor||h.current;let a=s.text.replace(o,"");m(e=>{let t=s.reset?"":null!=e?e:"";if(!a)return null!=e?e:"";let n=!t||t.endsWith("\n")||a.startsWith("\n")?t+a:"".concat(t,"\n").concat(a);return n.length>2e5?n.slice(n.length-2e5):n})}catch(e){}e||(n=setTimeout(s,1200))};return s(),()=>{e=!0,clearTimeout(n)}},[t]),(0,a.useEffect)(()=>{let e=g.current;e&&j.current&&(e.scrollTop=e.scrollHeight)},[u]),(0,s.jsxs)("div",{className:"logv",children:[(0,s.jsx)("pre",{ref:g,className:"logv-body mono",style:{height:n},onScroll:()=>{let e=g.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<24;j.current=t,b(!t)},tabIndex:0,children:null===u?d("git.loading"):u.trim()?u:d("obj.logs.empty")}),(0,s.jsxs)("div",{className:"logv-tools",children:[p&&(0,s.jsxs)("button",{className:"btn sm",onClick:()=>{let e=g.current;e&&(e.scrollTop=e.scrollHeight,j.current=!0,b(!1))},children:[(0,s.jsx)(r.A,{size:14}),d("obj.logs.bottom")]}),(0,s.jsx)("button",{className:"btn ghost icon sm",onClick:()=>m(""),"aria-label":d("obj.logs.clear"),title:d("obj.logs.clear"),children:(0,s.jsx)(l.A,{size:14})})]})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[654],{494:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},4713:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]])},5503:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]])},7697:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},8089:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]])},14214:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]])},18853:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Ear",[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]])},19431:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},32219:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]])},38950:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]])},46325:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]])},49731:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},50352:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]])},50703:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},52687:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]])},55267:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]])},62716:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},66477:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},75014:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},79141:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},79278:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},83372:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},84611:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])},84616:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},87454:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},90124:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},92720:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]])},97541:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]])}}]);