orcasynth 1.4.1 → 1.4.3

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 (220) hide show
  1. package/dist/api/server.js +14 -5
  2. package/dist/integrations/projectFiles.js +16 -0
  3. package/dist/integrations/usage/claude.js +7 -7
  4. package/dist/integrations/usage/codex.js +5 -7
  5. package/dist/integrations/usage/index.js +2 -8
  6. package/dist/integrations/usage/walk.js +14 -0
  7. package/dist/overseer/stuckDetector.js +4 -10
  8. package/dist/shared/id.js +7 -0
  9. package/dist/shared/time.js +12 -0
  10. package/dist/store/cascade.js +24 -0
  11. package/dist/store/db.js +3 -0
  12. package/dist/store/projectStore.js +8 -6
  13. package/dist/store/schema.sql +1 -1
  14. package/dist/store/taskStore.js +2 -8
  15. package/package.json +1 -1
  16. package/web-dist/.next/BUILD_ID +1 -1
  17. package/web-dist/.next/build-manifest.json +3 -3
  18. package/web-dist/.next/server/app/_global-error.html +1 -1
  19. package/web-dist/.next/server/app/_global-error.rsc +1 -1
  20. package/web-dist/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  21. package/web-dist/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  22. package/web-dist/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  23. package/web-dist/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  24. package/web-dist/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  25. package/web-dist/.next/server/app/_not-found/page.js.nft.json +1 -1
  26. package/web-dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  27. package/web-dist/.next/server/app/_not-found.html +1 -1
  28. package/web-dist/.next/server/app/_not-found.rsc +11 -11
  29. package/web-dist/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
  30. package/web-dist/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  31. package/web-dist/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
  32. package/web-dist/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  33. package/web-dist/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  34. package/web-dist/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  35. package/web-dist/.next/server/app/account/page.js.nft.json +1 -1
  36. package/web-dist/.next/server/app/account/page_client-reference-manifest.js +1 -1
  37. package/web-dist/.next/server/app/account.html +1 -1
  38. package/web-dist/.next/server/app/account.rsc +13 -13
  39. package/web-dist/.next/server/app/account.segments/_full.segment.rsc +13 -13
  40. package/web-dist/.next/server/app/account.segments/_head.segment.rsc +4 -4
  41. package/web-dist/.next/server/app/account.segments/_index.segment.rsc +6 -6
  42. package/web-dist/.next/server/app/account.segments/_tree.segment.rsc +2 -2
  43. package/web-dist/.next/server/app/account.segments/account/__PAGE__.segment.rsc +4 -4
  44. package/web-dist/.next/server/app/account.segments/account.segment.rsc +3 -3
  45. package/web-dist/.next/server/app/dash/page.js.nft.json +1 -1
  46. package/web-dist/.next/server/app/dash/page_client-reference-manifest.js +1 -1
  47. package/web-dist/.next/server/app/dash.html +1 -1
  48. package/web-dist/.next/server/app/dash.rsc +13 -13
  49. package/web-dist/.next/server/app/dash.segments/_full.segment.rsc +13 -13
  50. package/web-dist/.next/server/app/dash.segments/_head.segment.rsc +4 -4
  51. package/web-dist/.next/server/app/dash.segments/_index.segment.rsc +6 -6
  52. package/web-dist/.next/server/app/dash.segments/_tree.segment.rsc +2 -2
  53. package/web-dist/.next/server/app/dash.segments/dash/__PAGE__.segment.rsc +4 -4
  54. package/web-dist/.next/server/app/dash.segments/dash.segment.rsc +3 -3
  55. package/web-dist/.next/server/app/escalations/page.js.nft.json +1 -1
  56. package/web-dist/.next/server/app/escalations/page_client-reference-manifest.js +1 -1
  57. package/web-dist/.next/server/app/escalations.html +1 -1
  58. package/web-dist/.next/server/app/escalations.rsc +13 -13
  59. package/web-dist/.next/server/app/escalations.segments/_full.segment.rsc +13 -13
  60. package/web-dist/.next/server/app/escalations.segments/_head.segment.rsc +4 -4
  61. package/web-dist/.next/server/app/escalations.segments/_index.segment.rsc +6 -6
  62. package/web-dist/.next/server/app/escalations.segments/_tree.segment.rsc +2 -2
  63. package/web-dist/.next/server/app/escalations.segments/escalations/__PAGE__.segment.rsc +4 -4
  64. package/web-dist/.next/server/app/escalations.segments/escalations.segment.rsc +3 -3
  65. package/web-dist/.next/server/app/index.html +1 -1
  66. package/web-dist/.next/server/app/index.rsc +13 -13
  67. package/web-dist/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  68. package/web-dist/.next/server/app/index.segments/_full.segment.rsc +13 -13
  69. package/web-dist/.next/server/app/index.segments/_head.segment.rsc +4 -4
  70. package/web-dist/.next/server/app/index.segments/_index.segment.rsc +6 -6
  71. package/web-dist/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  72. package/web-dist/.next/server/app/kanban/page.js.nft.json +1 -1
  73. package/web-dist/.next/server/app/kanban/page_client-reference-manifest.js +1 -1
  74. package/web-dist/.next/server/app/kanban.html +1 -1
  75. package/web-dist/.next/server/app/kanban.rsc +13 -13
  76. package/web-dist/.next/server/app/kanban.segments/_full.segment.rsc +13 -13
  77. package/web-dist/.next/server/app/kanban.segments/_head.segment.rsc +4 -4
  78. package/web-dist/.next/server/app/kanban.segments/_index.segment.rsc +6 -6
  79. package/web-dist/.next/server/app/kanban.segments/_tree.segment.rsc +2 -2
  80. package/web-dist/.next/server/app/kanban.segments/kanban/__PAGE__.segment.rsc +4 -4
  81. package/web-dist/.next/server/app/kanban.segments/kanban.segment.rsc +3 -3
  82. package/web-dist/.next/server/app/onboarding/page.js.nft.json +1 -1
  83. package/web-dist/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  84. package/web-dist/.next/server/app/onboarding.html +1 -1
  85. package/web-dist/.next/server/app/onboarding.rsc +13 -13
  86. package/web-dist/.next/server/app/onboarding.segments/_full.segment.rsc +13 -13
  87. package/web-dist/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
  88. package/web-dist/.next/server/app/onboarding.segments/_index.segment.rsc +6 -6
  89. package/web-dist/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
  90. package/web-dist/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
  91. package/web-dist/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
  92. package/web-dist/.next/server/app/page.js.nft.json +1 -1
  93. package/web-dist/.next/server/app/page_client-reference-manifest.js +1 -1
  94. package/web-dist/.next/server/app/projects/page.js.nft.json +1 -1
  95. package/web-dist/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  96. package/web-dist/.next/server/app/projects.html +1 -1
  97. package/web-dist/.next/server/app/projects.rsc +13 -13
  98. package/web-dist/.next/server/app/projects.segments/_full.segment.rsc +13 -13
  99. package/web-dist/.next/server/app/projects.segments/_head.segment.rsc +4 -4
  100. package/web-dist/.next/server/app/projects.segments/_index.segment.rsc +6 -6
  101. package/web-dist/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
  102. package/web-dist/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +4 -4
  103. package/web-dist/.next/server/app/projects.segments/projects.segment.rsc +3 -3
  104. package/web-dist/.next/server/app/sessions/page.js.nft.json +1 -1
  105. package/web-dist/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  106. package/web-dist/.next/server/app/sessions.html +1 -1
  107. package/web-dist/.next/server/app/sessions.rsc +13 -13
  108. package/web-dist/.next/server/app/sessions.segments/_full.segment.rsc +13 -13
  109. package/web-dist/.next/server/app/sessions.segments/_head.segment.rsc +4 -4
  110. package/web-dist/.next/server/app/sessions.segments/_index.segment.rsc +6 -6
  111. package/web-dist/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
  112. package/web-dist/.next/server/app/sessions.segments/sessions/__PAGE__.segment.rsc +4 -4
  113. package/web-dist/.next/server/app/sessions.segments/sessions.segment.rsc +3 -3
  114. package/web-dist/.next/server/app/settings/page.js.nft.json +1 -1
  115. package/web-dist/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  116. package/web-dist/.next/server/app/settings.html +1 -1
  117. package/web-dist/.next/server/app/settings.rsc +13 -13
  118. package/web-dist/.next/server/app/settings.segments/_full.segment.rsc +13 -13
  119. package/web-dist/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  120. package/web-dist/.next/server/app/settings.segments/_index.segment.rsc +6 -6
  121. package/web-dist/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  122. package/web-dist/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  123. package/web-dist/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  124. package/web-dist/.next/server/app/tasks/page.js.nft.json +1 -1
  125. package/web-dist/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
  126. package/web-dist/.next/server/app/tasks.html +1 -1
  127. package/web-dist/.next/server/app/tasks.rsc +13 -13
  128. package/web-dist/.next/server/app/tasks.segments/_full.segment.rsc +13 -13
  129. package/web-dist/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
  130. package/web-dist/.next/server/app/tasks.segments/_index.segment.rsc +6 -6
  131. package/web-dist/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
  132. package/web-dist/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
  133. package/web-dist/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
  134. package/web-dist/.next/server/app/timeline/page.js.nft.json +1 -1
  135. package/web-dist/.next/server/app/timeline/page_client-reference-manifest.js +1 -1
  136. package/web-dist/.next/server/app/timeline.html +1 -1
  137. package/web-dist/.next/server/app/timeline.rsc +13 -13
  138. package/web-dist/.next/server/app/timeline.segments/_full.segment.rsc +13 -13
  139. package/web-dist/.next/server/app/timeline.segments/_head.segment.rsc +4 -4
  140. package/web-dist/.next/server/app/timeline.segments/_index.segment.rsc +6 -6
  141. package/web-dist/.next/server/app/timeline.segments/_tree.segment.rsc +2 -2
  142. package/web-dist/.next/server/app/timeline.segments/timeline/__PAGE__.segment.rsc +4 -4
  143. package/web-dist/.next/server/app/timeline.segments/timeline.segment.rsc +3 -3
  144. package/web-dist/.next/server/app/users/page.js.nft.json +1 -1
  145. package/web-dist/.next/server/app/users/page_client-reference-manifest.js +1 -1
  146. package/web-dist/.next/server/app/users.html +1 -1
  147. package/web-dist/.next/server/app/users.rsc +13 -13
  148. package/web-dist/.next/server/app/users.segments/_full.segment.rsc +13 -13
  149. package/web-dist/.next/server/app/users.segments/_head.segment.rsc +4 -4
  150. package/web-dist/.next/server/app/users.segments/_index.segment.rsc +6 -6
  151. package/web-dist/.next/server/app/users.segments/_tree.segment.rsc +2 -2
  152. package/web-dist/.next/server/app/users.segments/users/__PAGE__.segment.rsc +4 -4
  153. package/web-dist/.next/server/app/users.segments/users.segment.rsc +3 -3
  154. package/web-dist/.next/server/chunks/[root-of-the-server]__0bvp8h1._.js +1 -1
  155. package/web-dist/.next/server/chunks/[root-of-the-server]__1dgbigm._.js +1 -1
  156. package/web-dist/.next/server/chunks/[root-of-the-server]__1wxxtv8._.js +1 -1
  157. package/web-dist/.next/server/chunks/ssr/{[root-of-the-server]__1tooevx._.js → [root-of-the-server]__0i_7o4p._.js} +2 -2
  158. package/web-dist/.next/server/chunks/ssr/_015zf-4._.js +1 -1
  159. package/web-dist/.next/server/chunks/ssr/_04ezsju._.js +3 -0
  160. package/web-dist/.next/server/chunks/ssr/_04o_q14._.js +1 -1
  161. package/web-dist/.next/server/chunks/ssr/_057a06r._.js +1 -1
  162. package/web-dist/.next/server/chunks/ssr/_085pshu._.js +1 -1
  163. package/web-dist/.next/server/chunks/ssr/_0tc9z5_._.js +1 -1
  164. package/web-dist/.next/server/chunks/ssr/_0tzourm._.js +1 -1
  165. package/web-dist/.next/server/chunks/ssr/_12jhzvy._.js +3 -0
  166. package/web-dist/.next/server/chunks/ssr/_136wthy._.js +3 -0
  167. package/web-dist/.next/server/chunks/ssr/_193-v_i._.js +3 -0
  168. package/web-dist/.next/server/chunks/ssr/_1heytlk._.js +3 -0
  169. package/web-dist/.next/server/chunks/ssr/_1mjzb9s._.js +1 -1
  170. package/web-dist/.next/server/chunks/ssr/_1xwktd-._.js +1 -1
  171. package/web-dist/.next/server/chunks/ssr/_1zscr7t._.js +3 -0
  172. package/web-dist/.next/server/chunks/ssr/app_dash_page_tsx_12v0wx-._.js +1 -1
  173. package/web-dist/.next/server/chunks/ssr/app_kanban_page_tsx_06_8oyf._.js +1 -1
  174. package/web-dist/.next/server/chunks/ssr/app_projects_page_tsx_1w-8z74._.js +3 -3
  175. package/web-dist/.next/server/chunks/ssr/app_tasks_page_tsx_1p6mxbw._.js +1 -1
  176. package/web-dist/.next/server/chunks/ssr/app_timeline_page_tsx_0thxir0._.js +1 -1
  177. package/web-dist/.next/server/chunks/ssr/components_shell_Shell_tsx_1e5c27h._.js +1 -1
  178. package/web-dist/.next/server/middleware-build-manifest.js +3 -3
  179. package/web-dist/.next/server/pages/404.html +1 -1
  180. package/web-dist/.next/server/pages/500.html +1 -1
  181. package/web-dist/.next/static/chunks/0l1t1fcd-_jj9.js +1 -0
  182. package/web-dist/.next/static/chunks/11xbsx12drypd.js +1 -0
  183. package/web-dist/.next/static/chunks/186xbnkxm5iu3.js +1 -0
  184. package/web-dist/.next/static/chunks/1c_1_ca4-vgc7.js +1 -0
  185. package/web-dist/.next/static/chunks/{3wo9m5v__3pi2.js → 1f5f3qgbcjv4u.js} +1 -1
  186. package/web-dist/.next/static/chunks/1t-dast4rat3s.css +2 -0
  187. package/web-dist/.next/static/chunks/1wsag7zex3h4_.js +1 -0
  188. package/web-dist/.next/static/chunks/24unfsl4do--1.js +1 -0
  189. package/web-dist/.next/static/chunks/2bfjq22q8xyfs.js +1 -0
  190. package/web-dist/.next/static/chunks/2kuzf7llj_291.js +1 -0
  191. package/web-dist/.next/static/chunks/2pbhzo7fu4xcs.js +11 -0
  192. package/web-dist/.next/static/chunks/30ztbacooyerd.js +1 -0
  193. package/web-dist/.next/static/chunks/34bew8owm40fg.js +1 -0
  194. package/web-dist/.next/static/chunks/3a7pgnw_6io2v.js +1 -0
  195. package/web-dist/.next/static/chunks/3k-swqzkcvlzm.js +1 -0
  196. package/web-dist/.next/static/chunks/{0xgdqczv5tvu5.js → 3saus_snl5ri7.js} +1 -1
  197. package/web-dist/.next/server/chunks/ssr/_09x5h4x._.js +0 -3
  198. package/web-dist/.next/server/chunks/ssr/_0lctmoh._.js +0 -3
  199. package/web-dist/.next/server/chunks/ssr/_0zho8fx._.js +0 -3
  200. package/web-dist/.next/server/chunks/ssr/_1812xdn._.js +0 -3
  201. package/web-dist/.next/server/chunks/ssr/_1m2qx8p._.js +0 -3
  202. package/web-dist/.next/server/chunks/ssr/_1w24b42._.js +0 -3
  203. package/web-dist/.next/server/chunks/ssr/app_sessions_page_tsx_0r1_4_3._.js +0 -3
  204. package/web-dist/.next/static/chunks/05jfk0-07tiga.js +0 -11
  205. package/web-dist/.next/static/chunks/0x8sf96sz490-.css +0 -2
  206. package/web-dist/.next/static/chunks/201p8-_l1h8w8.js +0 -1
  207. package/web-dist/.next/static/chunks/218i8jnxp91u8.js +0 -1
  208. package/web-dist/.next/static/chunks/2_uoi0tzglv_7.js +0 -1
  209. package/web-dist/.next/static/chunks/2ki5va2_5l6d6.js +0 -1
  210. package/web-dist/.next/static/chunks/2sm_cc2r9sjzp.js +0 -1
  211. package/web-dist/.next/static/chunks/2xur1zqckjlq3.js +0 -1
  212. package/web-dist/.next/static/chunks/35babynx5l240.js +0 -1
  213. package/web-dist/.next/static/chunks/3i0jpc47nxz7y.js +0 -1
  214. package/web-dist/.next/static/chunks/3soklmhd2y9yp.js +0 -1
  215. package/web-dist/.next/static/chunks/3ssnuxdh0r51g.js +0 -1
  216. package/web-dist/.next/static/chunks/3ybvfq13cp-hb.js +0 -1
  217. package/web-dist/.next/static/chunks/3yqt3l54sr5si.js +0 -1
  218. /package/web-dist/.next/static/{qtJrbMvehxNiblgQJOzhz → -qI9ABgqZPR_Ri56jzVI5}/_buildManifest.js +0 -0
  219. /package/web-dist/.next/static/{qtJrbMvehxNiblgQJOzhz → -qI9ABgqZPR_Ri56jzVI5}/_clientMiddlewareManifest.js +0 -0
  220. /package/web-dist/.next/static/{qtJrbMvehxNiblgQJOzhz → -qI9ABgqZPR_Ri56jzVI5}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o={assign:function(){return l},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return s}};for(var i in o)Object.defineProperty(r,i,{enumerable:!0,get:o[i]});function a(e){let t={};for(let[r,o]of e.entries()){let e=t[r];void 0===e?t[r]=o:Array.isArray(e)?e.push(o):t[r]=[e,o]}return t}function n(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e))if(Array.isArray(o))for(let e of o)t.append(r,n(e));else t.set(r,n(o));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,o]of r.entries())e.append(t,o)}return e}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return v},NormalizeError:function(){return b},PageNotFoundError:function(){return g},SP:function(){return m},ST:function(){return f},WEB_VITALS:function(){return a},execOnce:function(){return n},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return l},isResSent:function(){return h},loadGetInitialProps:function(){return x},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return w}};for(var i in o)Object.defineProperty(r,i,{enumerable:!0,get:o[i]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return(...o)=>(r||(r=!0,t=e(...o)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function x(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await x(t.Component,t.ctx)}:{};let o=await e.getInitialProps(t);if(r&&h(r))return o;if(!o)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${o}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return o}let m="u">typeof performance,f=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class b extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return o}});let o=e=>{}},9912,e=>{"use strict";let t=(0,e.i(75254).default)("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",0,t],9912)},7233,e=>{"use strict";let t=(0,e.i(75254).default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],7233)},82458,e=>{"use strict";let t=(0,e.i(75254).default)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},24877,56474,e=>{"use strict";let t={30:"#3a3a3a",31:"#ef4444",32:"#22c55e",33:"#eab308",34:"#3b82f6",35:"#a855f7",36:"#06b6d4",37:"#d4d4d4",90:"#6b7280",91:"#f87171",92:"#4ade80",93:"#facc15",94:"#60a5fa",95:"#c084fc",96:"#22d3ee",97:"#f5f5f5"};function r(e){let r,o,i=[],a="",n=()=>{a&&(i.push({text:a.replace(/\x1b\[[0-9;?]*[ -/]*[@-ln-~]/g,"").replace(/\x1b[()][0-9A-Za-z]/g,"").replace(/\x1b[=>]/g,"").replace(/\x1b/g,""),color:r}),a="")},s=/\x1b\[([0-9;]*)m/g,l=0;for(;null!==(o=s.exec(e));){a+=e.slice(l,o.index),n(),l=s.lastIndex;let i=(o[1]||"0").split(";").map(e=>Number(e||0));for(let e=0;e<i.length;e++){let o=i[e];0===o||39===o?r=void 0:t[o]?r=t[o]:38===o&&(5===i[e+1]?(r=function(e){if(e<16)return t[e<8?30+e:90+(e-8)]??"#d4d4d4";if(e>=232){let t=8+(e-232)*10;return`rgb(${t},${t},${t})`}let r=e-16,o=Math.floor(r/36),i=Math.floor(r%36/6),a=e=>0===e?0:55+40*e;return`rgb(${a(o)},${a(i)},${a(r%6)})`}(i[e+2]??7),e+=2):2===i[e+1]&&(r=`rgb(${i[e+2]??0},${i[e+3]??0},${i[e+4]??0})`,e+=4))}}return a+=e.slice(l),n(),i.filter(e=>e.text.length>0)}e.s(["parseAnsi",0,r],56474);let o="agent:";function i(e){let t=e.labels?.find(e=>e.startsWith(o));return t?t.slice(o.length):null}function a(e){if(!e)return null;let t=new Date(e.includes("T")?e:e.replace(" ","T")+(e.endsWith("Z")?"":"Z")).getTime();return Number.isNaN(t)?null:t}function n(e){let t=e.labels?.find(e=>e.startsWith("started:"));if(t){let e=Number(t.slice(8));if(Number.isFinite(e))return e}return a(e.created_at)}e.s(["agentDisplayName",0,function(e){return e.replace(/^orca-/,"")||e},"keysForOption",0,function(e){return[...Array(Math.max(0,Number(e)-1)).fill("Down"),"Enter"]},"lastClosedTask",0,function(e){let t=e.filter(e=>"closed"===e.status);return 0===t.length?null:t.reduce((e,t)=>(a(t.closed_at)??0)>(a(e.closed_at)??0)?t:e)},"liveState",0,function(e,t){return e?.type==="needs_input"?"needs_input":t||e?.type==="working"?"working":e?.type==="complete"?"complete":"idle"},"missionEpicId",0,function(e){return e.replace(/^m-/,"")},"needsInputSessions",0,function(e,t){return e.filter(e=>t[e]?.type==="needs_input")},"parseTs",0,a,"tailSnippet",0,function(e){let t=e.split("\n");for(let e=t.length-1;e>=0;e--){let o=r(t[e]).map(e=>e.text).join("").trim();if(o)return o}return""},"taskAgentName",0,i,"taskBlockers",0,function(e,t,r){return t.filter(t=>t.task_id===e).map(e=>r.get(e.depends_on_id)).filter(e=>!!e&&"closed"!==e.status&&"cancelled"!==e.status)},"taskElapsed",0,function(e,t){let r=n(e);if(null==r)return null;let o=Math.max(0,Math.floor((("closed"===e.status||"cancelled"===e.status?a(e.closed_at)??t:t)-r)/1e3));if(o<60)return`${o}s`;let i=Math.floor(o/60);if(i<60)return`${i}m`;let s=Math.floor(i/60);return s<24?`${s}h`:`${Math.floor(s/24)}d`},"taskForSession",0,function(e,t){if(!t.startsWith("orca-"))return;let r=`${o}${t.slice(5)}`,i=e.filter(e=>(e.labels??[]).includes(r));return i.length<=1?i[0]:i.find(e=>"in_progress"===e.status)??[...i].sort((e,t)=>(a(t.created_at)??0)-(a(e.created_at)??0))[0]},"taskSessionName",0,function(e){let t=i(e);return t?`orca-${t}`:null},"taskStartedMs",0,n],24877)},63804,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["ListChecks",0,t],63804)},73884,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["XCircle",0,t],73884)},93283,e=>{"use strict";var t=e.i(66027),r=e.i(40273);e.s(["useSessionPane",0,function(e,o=8,i=!0){let a=(0,t.useQuery)({queryKey:["session-pane",e,"ansi"],queryFn:()=>r.orcaClient.sessionPane(e,!0),enabled:i&&!!e,refetchInterval:2e3,refetchOnWindowFocus:!1});return{tail:(a.data?.pane??"").split("\n").slice(-o).join("\n"),isLoading:a.isLoading,isError:a.isError}}])},77154,e=>{"use strict";let t="exec:";e.s(["taskExec",0,function(e){let r=e?.find(e=>e.startsWith(t));return r?r.slice(t.length):""}])},91842,e=>{"use strict";var t=e.i(71645),r=e.i(93283);let o={stalledSec:300,stuckSec:900};e.s(["useSessionStall",0,function(e,i,a=o){let{tail:n}=(0,r.useSessionPane)(e,8,i),[s,l]=(0,t.useState)(()=>Date.now()),c=(0,t.useRef)(Date.now());if((0,t.useEffect)(()=>{c.current=Date.now()},[n]),(0,t.useEffect)(()=>{if(!i)return;let e=setInterval(()=>l(Date.now()),1e3);return()=>clearInterval(e)},[i]),!i)return{state:"fresh",silenceSec:0};let u=Math.floor((s-c.current)/1e3);return{state:function(e,t,r=o){if(!t)return"fresh";let i=Math.max(0,e);return i>=r.stuckSec?"stuck":i>=r.stalledSec?"stalled":"fresh"}(u,!0,a),silenceSec:u}}])},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o={formatUrl:function(){return s},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var i in o)Object.defineProperty(r,i,{enumerable:!0,get:o[i]});let a=e.r(90809)._(e.r(98183)),n=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,o=e.protocol||"",i=e.pathname||"",s=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return o&&!o.endsWith(":")&&(o+=":"),e.slashes||(!o||n.test(o))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c=""),s&&"#"!==s[0]&&(s="#"+s),u&&"?"!==u[0]&&(u="?"+u),i=i.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${o}${c}${i}${u}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return s(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let o=e.r(71645);function i(e,t){let r=(0,o.useRef)(null),i=(0,o.useRef)(null);return(0,o.useCallback)(o=>{if(null===o){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=a(e,o)),t&&(i.current=a(t,o))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let o=e.r(18967),i=e.r(52817);function a(e){if(!(0,o.isAbsoluteUrl)(e))return!0;try{let t=(0,o.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return o}});let o=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o={default:function(){return y},useLinkStatus:function(){return g}};for(var i in o)Object.defineProperty(r,i,{enumerable:!0,get:o[i]});let a=e.r(90809),n=e.r(43476),s=a._(e.r(71645)),l=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),h=e.r(5550);e.r(33525);let p=e.r(88540),x=e.r(91949),m=e.r(73668),f=e.r(9396);function y(t){var r,o;let i,a,y,[g,v]=(0,s.useOptimistic)(x.IDLE_LINK_STATUS),k=(0,s.useRef)(null),{href:w,as:C,children:S,prefetch:j=null,passHref:E,replace:M,shallow:P,scroll:Q,onClick:q,onMouseEnter:K,onTouchStart:R,legacyBehavior:_=!1,onNavigate:N,transitionTypes:F,ref:O,unstable_dynamicOnHover:T,...z}=t;i=S,_&&("string"==typeof i||"number"==typeof i)&&(i=(0,n.jsx)("a",{children:i}));let U=s.default.useContext(c.AppRouterContext),A=!1!==j,$=!1!==j?null===(o=j)||"auto"===o?f.FetchStrategy.PPR:f.FetchStrategy.Full:f.FetchStrategy.PPR,I="string"==typeof(r=C||w)?r:(0,l.formatUrl)(r);if(_){if(i?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=s.default.Children.only(i)}let Y=_?a&&"object"==typeof a&&a.ref:O,L=s.default.useCallback(e=>(null!==U&&(k.current=(0,x.mountLinkInstance)(e,I,U,$,A,v)),()=>{k.current&&((0,x.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,x.unmountPrefetchableInstance)(e)}),[A,I,U,$,v]),D={ref:(0,u.useMergedRef)(L,Y),onClick(t){_||"function"!=typeof q||q(t),_&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!U||t.defaultPrevented||function(t,r,o,i,a,n,l){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),n){let e=!1;if(n({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);s.default.startTransition(()=>{d(r,i?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,o.current,l)})}}(t,I,k,M,Q,N,F)},onMouseEnter(e){_||"function"!=typeof K||K(e),_&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),U&&A&&(0,x.onNavigationIntent)(e.currentTarget,!0===T)},onTouchStart:function(e){_||"function"!=typeof R||R(e),_&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),U&&A&&(0,x.onNavigationIntent)(e.currentTarget,!0===T)}};return(0,d.isAbsoluteUrl)(I)?D.href=I:_&&!E&&("a"!==a.type||"href"in a.props)||(D.href=(0,h.addBasePath)(I)),y=_?s.default.cloneElement(a,D):(0,n.jsx)("a",{...z,...D,children:i}),(0,n.jsx)(b.Provider,{value:g,children:y})}e.r(84508);let b=(0,s.createContext)(x.IDLE_LINK_STATUS),g=()=>(0,s.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},61911,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["Users",0,t],61911)},41382,e=>{"use strict";let t=(0,e.i(75254).default)("SquareKanban",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 7v7",key:"1x2jlm"}],["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M16 7v9",key:"1hp2iy"}]]);e.s(["KanbanSquare",0,t],41382)},21218,e=>{"use strict";let t=(0,e.i(75254).default)("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["Activity",0,t],21218)},51737,e=>{"use strict";let t=(0,e.i(75254).default)("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["ShieldAlert",0,t],51737)},20535,e=>{"use strict";var t=e.i(84981);e.s(["SquareTerminal",()=>t.default])},45423,e=>{"use strict";let t=(0,e.i(75254).default)("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);e.s(["Bell",0,t],45423)},1544,e=>{"use strict";var t=e.i(43476),r=e.i(71645),o=e.i(40273);let i=["#ef4444","#f59e0b","#10b981","#3b82f6","#8b5cf6","#ec4899","#14b8a6","#f97316"];e.s(["Avatar",0,function({user:e,size:a=36}){let n=e.name?.trim()||e.username,[s,l]=(0,r.useState)(null);return((0,r.useEffect)(()=>{if(!e.avatar)return void l(null);let t=!0;return o.orcaClient.avatarUrl(e.id).then(e=>{t&&l(e)}).catch(()=>{t&&l(null)}),()=>{t=!1}},[e.id,e.avatar]),e.avatar&&s)?(0,t.jsx)("img",{src:s,alt:n,className:"shrink-0 rounded-full border border-border object-cover",style:{width:a,height:a}}):(0,t.jsx)("span",{className:"inline-flex shrink-0 items-center justify-center rounded-full font-mono font-semibold text-white",style:{width:a,height:a,fontSize:.38*a,background:i[[...n].reduce((e,t)=>e+t.charCodeAt(0),0)%i.length]},"aria-label":n,children:n.trim().slice(0,2).toUpperCase()||"?"})}])},84614,e=>{"use strict";let t=(0,e.i(75254).default)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],84614)},60289,89128,45286,e=>{"use strict";let t=(0,e.i(75254).default)("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);e.s(["LayoutDashboard",0,t],60289);var r=e.i(43476),o=e.i(82458);e.s(["TriangleAlert",()=>o.default],89128);var o=o,i=e.i(4552),a=e.i(24877),n=e.i(89901),s=e.i(80809);e.i(69530);var l=e.i(2942);e.s(["NeedsInputRow",0,function({name:e,question:t,options:c,exec:u}){let{t:d}=(0,l.useTranslation)(),h=(0,i.useSendInput)(),{toast:p}=(0,s.useToast)(),x=!!c&&c.length>0,m=(t,r)=>h.mutate({name:e,keys:t},{onSuccess:()=>p(r),onError:e=>p(String(e),"error")});return(0,r.jsxs)("div",{className:`flex gap-2.5 rounded-md border border-border bg-bg px-3 py-2 ${x?"flex-col items-stretch":"items-center"}`,children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,r.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md border border-border bg-elevated",children:u?(0,r.jsx)(n.ModelIcon,{name:u,size:13}):(0,r.jsx)(o.default,{size:12,className:"text-warning","aria-hidden":!0})}),(0,r.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-text",children:e}),(0,r.jsx)("span",{className:`min-w-0 flex-1 text-xs text-text-muted ${x?"":"truncate"}`,title:t,children:t}),!x&&(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:[(0,r.jsx)("button",{type:"button",onClick:()=>m(["Enter"],d.sessions.approved.replace("{name}",e)),className:"rounded-md border border-approve/50 bg-approve/10 px-2.5 py-1 text-xs font-medium text-approve transition-colors hover:bg-approve hover:text-white active:scale-95",children:d.sessions.allow}),(0,r.jsx)("button",{type:"button",onClick:()=>m(["Escape"],d.sessions.rejected.replace("{name}",e)),className:"rounded-md border border-danger/50 bg-danger/10 px-2.5 py-1 text-xs font-medium text-danger transition-colors hover:bg-danger hover:text-white active:scale-95",children:d.sessions.reject})]})]}),x&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 pl-[34px]",children:[c.map(t=>(0,r.jsxs)("button",{type:"button",title:t.label,onClick:()=>m((0,a.keysForOption)(t.id),d.sessions.answered.replace("{name}",e).replace("{option}",t.label)),className:"max-w-full truncate rounded-md border border-accent/50 bg-accent/10 px-2.5 py-1 text-xs font-medium text-accent transition-colors hover:bg-accent hover:text-white active:scale-95",children:[(0,r.jsxs)("span",{className:"opacity-60",children:[t.id,"."]})," ",t.label]},t.id)),(0,r.jsx)("button",{type:"button",onClick:()=>m(["Escape"],d.sessions.rejected.replace("{name}",e)),className:"rounded-md border border-danger/50 bg-danger/10 px-2.5 py-1 text-xs font-medium text-danger transition-colors hover:bg-danger hover:text-white active:scale-95",children:d.sessions.reject})]})]})}],45286)},89901,66992,e=>{"use strict";var t=e.i(43476);let r=(0,e.i(75254).default)("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);e.s(["Cpu",0,r],66992);let o=new Set(["ace-text","ace","adobe-color","adobe-text","adobe","adobefirefly-color","adobefirefly-text","adobefirefly","agentvoice-color","agentvoice-text","agentvoice","agui-text","agui","ai2-color","ai2-text","ai2","ai21-brand-color","ai21-brand","ai21-text","ai21","ai302-color","ai302-text","ai302","ai360-color","ai360-text","ai360","aihubmix-color","aihubmix-text","aihubmix","aimass-color","aimass-text","aimass","aionlabs-color","aionlabs-text","aionlabs","airjelly-color","airjelly-text","airjelly","aistudio-text","aistudio","akashchat-color","akashchat-text","akashchat","alephalpha-text","alephalpha","alibaba-brand-color","alibaba-brand","alibaba-color","alibaba-text-cn","alibaba-text","alibaba","alibabacloud-color","alibabacloud-text-cn","alibabacloud-text","alibabacloud","amp-color","amp-text","amp","antgroup-brand-color","antgroup-brand","antgroup-color","antgroup-text-cn","antgroup-text","antgroup","anthropic-text","anthropic","antigravity-color","antigravity-text","antigravity","anyscale-color","anyscale-text","anyscale","apertis-color","apertis-text","apertis","apple-text","apple","arcee-color","arcee-text","arcee","askverdict-color","askverdict-text","askverdict","assemblyai-color","assemblyai-text","assemblyai","atlascloud-text","atlascloud","automatic-color","automatic-text","automatic","aws-brand-color","aws-brand","aws-color","aws-text","aws","aya-color","aya-text","aya","azure-color","azure-text","azure","azureai-color","azureai-text","azureai","baai-text","baai","baichuan-color","baichuan-text","baichuan","baidu-brand-color","baidu-brand","baidu-color","baidu-text-cn","baidu-text","baidu","baiducloud-color","baiducloud-text","baiducloud","bailian-color","bailian-text","bailian","baseten-text","baseten","bedrock-color","bedrock-text","bedrock","bfl-text","bfl","bilibili-color","bilibili-text","bilibili","bilibiliindex-text","bilibiliindex","bing-color","bing-text","bing","briaai-color","briaai-text","briaai","burncloud-color","burncloud-text","burncloud","bytedance-brand-color","bytedance-brand","bytedance-color","bytedance-text-cn","bytedance-text","bytedance","capcut-text","capcut","centml-brand-color","centml-brand","centml-color","centml-text","centml","cerebras-brand-color","cerebras-brand","cerebras-color","cerebras-text","cerebras","chatglm-color","chatglm-text","chatglm","cherrystudio-color","cherrystudio-text","cherrystudio","civitai-color","civitai-text-color","civitai-text","civitai","claude-color","claude-text","claude","claudecode-color","claudecode-text","claudecode","cline-text","cline","clipdrop-text","clipdrop","cloudflare-color","cloudflare-text","cloudflare","codebuddy-color","codebuddy-text","codebuddy","codeflicker-color","codeflicker-text","codeflicker","codegeex-color","codegeex-text","codegeex","codex-color","codex-text","codex","cogvideo-color","cogvideo-text","cogvideo","cogview-color","cogview-text","cogview","cohere-color","cohere-text","cohere","colab-color","colab-text","colab","cometapi-color","cometapi-text","cometapi","comfyui-color","comfyui-text","comfyui","commanda-color","commanda-text","commanda","copilot-color","copilot-text","copilot","copilotkit-color","copilotkit-text","copilotkit","coqui-color","coqui-text","coqui","coze-text","coze","crewai-brand-color","crewai-brand","crewai-color","crewai-text","crewai","crusoe-color","crusoe-text","crusoe","cursor-text","cursor","cybercut-text","cybercut","dalle-color","dalle-text","dalle","dbrx-brand-color","dbrx-brand","dbrx-color","dbrx-text","dbrx","deepai-text","deepai","deepcogito-color","deepcogito-text","deepcogito","deepinfra-color","deepinfra-text","deepinfra","deepl-color","deepl-text","deepl","deepmind-color","deepmind-text","deepmind","deepseek-color","deepseek-text","deepseek","devin-color","devin-text","devin","dify-color","dify-text","dify","doc2x-color","doc2x-text","doc2x","docsearch-color","docsearch-text","docsearch","dolphin-text","dolphin","doubao-color","doubao-text","doubao","dreammachine-text","dreammachine","elevenlabs-text","elevenlabs","elevenx-text","elevenx","essentialai-color","essentialai-text","essentialai","exa-color","exa-text","exa","fal-color","fal-text","fal","fastgpt-color","fastgpt-text","fastgpt","featherless-color","featherless-text","featherless","figma-color","figma-text","figma","fireworks-color","fireworks-text","fireworks","fishaudio-text","fishaudio","flora-text","flora","flowith-text","flowith","flux-text","flux","friendli-text","friendli","gemini-color","gemini-text","gemini","geminicli-color","geminicli-text","geminicli","gemma-color","gemma-text","gemma","giteeai-text","giteeai","github-text","github","githubcopilot-text","githubcopilot","glama-text","glama","glif-text","glif","glmv-color","glmv-text","glmv","google-brand-color","google-brand","google-color","google","googlecloud-brand-color","googlecloud-brand","googlecloud-color","googlecloud","goose-text","goose","gradio-color","gradio-text","gradio","greptile-color","greptile-text","greptile","grok-text","grok","groq-text","groq","hailuo-color","hailuo-text","hailuo","haiper-text","haiper","hedra-text","hedra","hermesagent-text","hermesagent","higress-color","higress-text","higress","huawei-color","huawei-text-cn","huawei-text","huawei","huaweicloud-color","huaweicloud-text-cn","huaweicloud-text","huaweicloud","huggingface-color","huggingface-text","huggingface","hunyuan-color","hunyuan-text","hunyuan","hyperbolic-color","hyperbolic-text","hyperbolic","ibm-text","ibm","ideogram-text","ideogram","iflytekcloud-color","iflytekcloud-text","iflytekcloud","inception-text","inception","inference-text","inference","infermatic-color","infermatic-text","infermatic","infinigence-color","infinigence-text-cn","infinigence-text","infinigence","inflection-text","inflection","internlm-color","internlm-text","internlm","jimeng-color","jimeng-text","jimeng","jina-text","jina","junie-color","junie-text","junie","kilocode-text","kilocode","kimi-color","kimi-text","kimi","kiro-color","kiro-text","kiro","kling-color","kling-text","kling","kluster-color","kluster-text","kluster","kolors-color","kolors-text","kolors","krea-text","krea","kwaikat-text-color","kwaikat-text","kwaikat","kwaipilot-color","kwaipilot-text","kwaipilot","lambda-text","lambda","langchain-color","langchain-text","langchain","langfuse-color","langfuse-text","langfuse","langgraph-color","langgraph-text","langgraph","langsmith-color","langsmith-text","langsmith","leptonai-color","leptonai-text","leptonai","lg-color","lg-text","lg","lightricks-text","lightricks","liquid-text","liquid","livekit-color","livekit-text","livekit","llamaindex-color","llamaindex-text","llamaindex","llava-color","llava-text","llava","llmapi-color","llmapi-text","llmapi","lmstudio-text","lmstudio","lobehub-color","lobehub-text","lobehub","longcat-color","longcat-text","longcat","lovable-color","lovable-text","lovable","lovart-text","lovart","luma-color","luma-text","luma","magic-text","magic","make-color","make-text","make","manus-text","manus","mastra-text","mastra","mcp-text","mcp","mcpso-color","mcpso-text","mcpso","menlo-color","menlo-text","menlo","meshy-color","meshy-text","meshy","meta-brand-color","meta-brand","meta-color","meta-text","meta","metaai-color","metaai-text","metaai","metagpt-text","metagpt","microsoft-color","microsoft-text","microsoft","midjourney-text","midjourney","minimax-color","minimax-text","minimax","mistral-color","mistral-text","mistral","modelscope-color","modelscope-text","modelscope","monica-color","monica-text","monica","moonshot-text","moonshot","morph-color","morph-text","morph","moxt-color","moxt-text","moxt","myshell-color","myshell-text","myshell","n8n-color","n8n-text","n8n","nanobanana-color","nanobanana-text","nanobanana","nebius-text","nebius","newapi-color","newapi-text","newapi","notebooklm-text","notebooklm","notion-text","notion","nousresearch-text","nousresearch","nova-color","nova-text","nova","novelai-text","novelai","novita-color","novita-text","novita","nplcloud-color","nplcloud-text","nplcloud","nvidia-color","nvidia-text","nvidia","obsidian-color","obsidian-text","obsidian","ollama-text","ollama","openai-text","openai","openchat-color","openchat-text","openchat","openclaw-color","openclaw-text","openclaw","opencode-text","opencode","openhands-color","openhands-text","openhands","openhuman-text","openhuman","openrouter-text","openrouter","openwebui-text","openwebui","palm-color","palm-text","palm","parasail-text","parasail","perplexity-color","perplexity-text","perplexity","phidata-color","phidata-text","phidata","phind-text","phind","pika-text","pika","pixverse-color","pixverse-text","pixverse","player2-color","player2-text","player2","poe-color","poe-text","poe","pollinations-text","pollinations","ppio-color","ppio-text-cn","ppio-text","ppio","prunaai-color","prunaai-text","prunaai","pydanticai-color","pydanticai-text","pydanticai","qingyan-color","qingyan-text","qingyan","qiniu-color","qiniu-text","qiniu","qoder-color","qoder-text","qoder","qwen-color","qwen-text","qwen","railway-text","railway","recraft-text","recraft","relace-text","relace","replicate-brand","replicate-text","replicate","replit-color","replit-text","replit","reve-text","reve","roocode-text","roocode","rsshub-color","rsshub-text","rsshub","runway-text","runway","rwkv-color","rwkv-text","rwkv","sambanova-color","sambanova-text","sambanova","search1api-color","search1api-text","search1api","searchapi-text","searchapi","sensenova-brand-color","sensenova-brand","sensenova-color","sensenova-text","sensenova","siliconcloud-color","siliconcloud-text","siliconcloud","sillytavern-color","sillytavern-text","sillytavern","skywork-color","skywork-text","skywork","slock-text","slock","smithery-color","smithery-text","smithery","snowflake-color","snowflake-text","snowflake","sophnet-color","sophnet-text","sophnet","sora-color","sora-text","sora","spark-color","spark-text","spark","speedai-color","speedai-text","speedai","stability-brand-color","stability-brand","stability-color","stability-text","stability","statecloud-color","statecloud-text","statecloud","stepfun-color","stepfun-text","stepfun","straico-color","straico-text","straico","streamlake-color","streamlake-text","streamlake","submodel-color","submodel-text","submodel","suno-text","suno","sync-text","sync","targon-color","targon-text","targon","tavily-color","tavily-text","tavily","tencent-brand-color","tencent-brand","tencent-color","tencent-text-cn","tencent-text","tencent","tencentcloud-color","tencentcloud-text","tencentcloud","tiangong-color","tiangong-text","tiangong","tii-color","tii-text","tii","together-brand-color","together-brand","together-color","together-text","together","topazlabs-text","topazlabs","trae-color","trae-text","trae","tripo-color","tripo-text","tripo","turix-text","turix","udio-color","udio-text","udio","unstructured-color","unstructured-text","unstructured","upstage-color","upstage-text","upstage","v0","vectorizerai-text","vectorizerai","venice-color","venice-text","venice","vercel-text","vercel","vertexai-color","vertexai-text","vertexai","vidu-color","vidu-text","vidu","viggle-text","viggle","vllm-color","vllm-text","vllm","volcengine-color","volcengine-text","volcengine","voyage-color","voyage-text","voyage","wenxin-color","wenxin-text","wenxin","windsurf-text","windsurf","workersai-color","workersai-text","workersai","worldrouter-text","worldrouter","xai-text","xai","xiaomimimo-text","xiaomimimo","xinference-color","xinference-text","xinference","xpay-color","xpay-text","xpay","xuanyuan-color","xuanyuan-text","xuanyuan","yandex-text","yandex","yi-color","yi-text","yi","youmind-text","youmind","yuanbao-color","yuanbao-text","yuanbao","zai-text","zai","zapier-color","zapier-text","zapier","zeabur-color","zeabur-text","zeabur","zencoder-color","zencoder-text","zencoder","zenmux-text","zenmux","zeroone-color","zeroone-text","zeroone","zhipu-color","zhipu-text","zhipu"]),i=[[/deepseek/i,"deepseek"],[/claude[\s_-]?code|claudecode/i,"claudecode"],[/claude|anthropic|sonnet|opus|haiku/i,"claude"],[/codex/i,"codex"],[/gpt|openai|chatgpt|\bo[1-4]\b/i,"openai"],[/kimi|\bk2\b/i,"kimi"],[/moonshot/i,"moonshot"],[/minimax/i,"minimax"],[/qwen|qwq/i,"qwen"],[/gemini/i,"gemini"],[/mistral|mixtral|codestral|magistral|devstral/i,"mistral"],[/grok/i,"grok"],[/\bxai\b/i,"xai"],[/glm|chatglm|zhipu/i,"zhipu"],[/llama|meta[\s_-]?ai|\bmeta\b/i,"metaai"],[/ollama/i,"ollama"]];e.s(["ModelIcon",0,function({name:e,size:a=20,className:n=""}){let s=function(e){if(!e)return null;for(let[t,r]of i)if(t.test(e)){let e=`${r}-color`;if(o.has(e))return{slug:e,color:!0};if(o.has(r))return{slug:r,color:!1}}return null}(e);return s?(0,t.jsx)("img",{src:`/models/${s.slug}.svg`,alt:"",className:`shrink-0 object-contain ${s.color?"":"invert"} ${n}`,style:{width:a,height:a},"aria-hidden":!0}):(0,t.jsx)(r,{size:a,className:`text-text-muted ${n}`,"aria-hidden":!0})}],89901)},75254,e=>{"use strict";var t=e.i(71645);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,t.forwardRef)(({color:e="currentColor",size:i=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:s="",children:l,iconNode:c,...u},d)=>(0,t.createElement)("svg",{ref:d,...o,width:i,height:i,stroke:e,strokeWidth:n?24*Number(a)/Number(i):a,className:r("lucide",s),...u},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(l)?l:[l]]));e.s(["default",0,(e,o)=>{let a=(0,t.forwardRef)(({className:a,...n},s)=>(0,t.createElement)(i,{ref:s,iconNode:o,className:r(`lucide-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,a),...n}));return a.displayName=`${e}`,a}],75254)},76525,e=>{"use strict";var t=e.i(43476);let r={default:"bg-elevated border-border text-text hover:border-border-strong hover:bg-elevated/80",accent:"bg-accent border-accent text-white hover:opacity-90",ghost:"bg-transparent border-transparent text-text-muted hover:bg-elevated hover:text-text",danger:"bg-danger border-danger text-white hover:opacity-90"};e.s(["Button",0,function({variant:e="default",icon:o,className:i="",children:a,...n}){let s=i.trim();return(0,t.jsxs)("button",{className:`inline-flex h-9 items-center justify-center gap-2 border px-3.5 text-sm font-medium rounded-md transition-[color,background-color,border-color,transform] duration-150 active:scale-[0.97] disabled:opacity-40 disabled:cursor-not-allowed disabled:active:scale-100 ${r[e]}${s?` ${s}`:""}`,...n,children:[o?(0,t.jsx)(o,{size:14,"aria-hidden":!0}):null,a]})}])},14272,e=>{"use strict";var t=e.i(40143),r=e.i(88587),o=e.i(36553),i=class extends r.Removable{#e;#t;#r;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#t=[],this.state=e.state||a(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=(0,o.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#i({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});let i="pending"===this.state.status,a=!this.#o.canStart();try{if(i)t();else{this.#i({type:"pending",variables:e,isPaused:a}),this.#r.config.onMutate&&await this.#r.config.onMutate(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#i({type:"pending",context:t,variables:e,isPaused:a})}let o=await this.#o.start();return await this.#r.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#r.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#i({type:"success",data:o}),o}catch(t){try{await this.#r.config.onError?.(t,e,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#r.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#i({type:"error",error:t}),t}finally{this.#r.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}e.s(["Mutation",0,i,"getDefaultState",0,a])},95468,e=>{"use strict";let t=(0,e.i(75254).default)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,t],95468)},63209,e=>{"use strict";let t=(0,e.i(75254).default)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],63209)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],37727)},80809,e=>{"use strict";var t=e.i(43476),r=e.i(71645),o=e.i(95468),i=e.i(63209),a=e.i(37727);e.i(69530);var n=e.i(2942);let s=(0,r.createContext)(null),l=0;function c({item:e,meta:o,dismissLabel:i,onDismiss:n}){let{Icon:s,color:l,title:u}=o,[d,h]=(0,r.useState)(100),p=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{let e=0,t=performance.now(),r=requestAnimationFrame(function o(i){(p.current||(e+=i-t),t=i,h(Math.max(0,100-e/4500*100)),e>=4500)?n():r=requestAnimationFrame(o)});return()=>cancelAnimationFrame(r)},[n]),(0,t.jsxs)("div",{role:"status",onMouseEnter:()=>{p.current=!0},onMouseLeave:()=>{p.current=!1},className:"pointer-events-auto relative flex items-start gap-3 overflow-hidden rounded-lg border border-border bg-surface py-3 pl-4 pr-3",style:{boxShadow:"var(--shadow-raised)",borderLeft:`3px solid ${l}`,animation:"toast-in 200ms var(--ease-out)"},children:[(0,t.jsx)(s,{size:20,"aria-hidden":!0,className:"mt-px shrink-0",style:{color:l}}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-text",children:u}),(0,t.jsx)("div",{className:"mt-0.5 break-words text-sm leading-snug text-text-muted",children:e.message})]}),(0,t.jsx)("button",{type:"button","aria-label":i,onClick:n,className:"-mr-1 -mt-1 flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-elevated hover:text-text",children:(0,t.jsx)(a.X,{size:15,"aria-hidden":!0})}),(0,t.jsx)("span",{className:"absolute bottom-0 left-0 h-0.5",style:{width:`${d}%`,backgroundColor:l,opacity:.5},"aria-hidden":!0})]})}e.s(["ToastProvider",0,function({children:e}){let{t:a}=(0,n.useTranslation)(),u={ok:{Icon:o.CheckCircle2,color:"var(--color-success)",title:a.common.success},error:{Icon:i.AlertCircle,color:"var(--color-danger)",title:a.common.error}},[d,h]=(0,r.useState)([]),p=(0,r.useCallback)(e=>h(t=>t.filter(t=>t.id!==e)),[]),x=(0,r.useCallback)((e,t="ok")=>{let r=l++;h(o=>[...o,{id:r,message:e,tone:t}])},[]),m=(0,r.useMemo)(()=>({toast:x}),[x]);return(0,t.jsxs)(s.Provider,{value:m,children:[e,(0,t.jsx)("div",{className:"pointer-events-none fixed bottom-5 right-5 z-50 flex w-[22rem] max-w-[calc(100vw-2.5rem)] flex-col gap-2.5",children:d.map(e=>(0,t.jsx)(c,{item:e,meta:u[e.tone],dismissLabel:a.common.dismiss,onDismiss:()=>p(e.id)},e.id))})]})},"useToast",0,function(){let e=(0,r.useContext)(s);if(!e)throw Error("useToast must be used within ToastProvider");return e}])},4552,e=>{"use strict";var t=e.i(71645),r=e.i(14272),o=e.i(40143),i=e.i(15823),a=e.i(19273),n=class extends i.Subscribable{#e;#a=void 0;#n;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,a.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.hashKey)(t.mutationKey)!==(0,a.hashKey)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#c(e)}getCurrentResult(){return this.#a}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#l(),this.#c()}mutate(e,t){return this.#s=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#l(){let e=this.#n?.state??(0,r.getDefaultState)();this.#a={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#c(e){o.notifyManager.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#a.variables,r=this.#a.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,r,o)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,r,o)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,r,o)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,r,o)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#a)})})}},s=e.i(12598);function l(e,r){let i=(0,s.useQueryClient)(r),[l]=t.useState(()=>new n(i,e));t.useEffect(()=>{l.setOptions(e)},[l,e]);let c=t.useSyncExternalStore(t.useCallback(e=>l.subscribe(o.notifyManager.batchCalls(e)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),u=t.useCallback((e,t)=>{l.mutate(e,t).catch(a.noop)},[l]);if(c.error&&(0,a.shouldThrowError)(l.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}var c=e.i(40273),u=e.i(51981);function d(e,t){e.invalidateQueries({queryKey:["project-files",t]}),e.invalidateQueries({queryKey:["project-git",t]}),e.invalidateQueries({queryKey:["project-changed",t]})}e.s(["useApproveGate",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.approveGate(e),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.tasks})})},"useAssignProject",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>e.currentlyAssigned?c.orcaClient.unassignProject(e.userId,e.projectId):c.orcaClient.assignProject(e.userId,e.projectId),onSuccess:(t,r)=>e.invalidateQueries({queryKey:["user-projects",r.userId]})})},"useChangePassword",0,function(){return l({mutationFn:e=>c.orcaClient.changePassword(e.currentPassword,e.newPassword)})},"useCleanupAll",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:()=>c.orcaClient.cleanupAll(),onSuccess:()=>e.invalidateQueries()})},"useCloseTask",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.closeTask(e),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.tasks})})},"useCopyProjectEntry",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.copyProjectEntry(e.id,e.from,e.to),onSuccess:(t,r)=>d(e,r.id)})},"useCreateProject",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.createProject(e),onSuccess:()=>e.invalidateQueries({queryKey:["projects"]})})},"useCreateTask",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.createTask(e),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.tasks})})},"useCreateUser",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.createUser(e.username,e.password),onSuccess:()=>e.invalidateQueries({queryKey:["users"]})})},"useDeleteMission",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.deleteMission(e),onSuccess:()=>{e.invalidateQueries({queryKey:u.QUERY_KEYS.tasks}),e.invalidateQueries({queryKey:u.QUERY_KEYS.missions}),e.invalidateQueries({queryKey:["mission"]})}})},"useDeleteProjectEntry",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.deleteProjectEntry(e.id,e.path),onSuccess:(t,r)=>d(e,r.id)})},"useDeleteTask",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.deleteTask(e),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.tasks})})},"useDeleteUser",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.deleteUser(e),onSuccess:()=>e.invalidateQueries({queryKey:["users"]})})},"useDisengage",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.disengageMission(e),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.missions})})},"useEngage",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.engage(e),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.missions})})},"useHermesInstall",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.hermesInstall(e),onSuccess:(t,r)=>{e.invalidateQueries({queryKey:r.home?["hermes-status",r.home]:["hermes-status"]})}})},"useInsertPhases",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.insertPhases(e.epicId,e.body),onSuccess:(t,r)=>{e.invalidateQueries({queryKey:u.QUERY_KEYS.tasks}),e.invalidateQueries({queryKey:["mission",r.epicId]}),e.invalidateQueries({queryKey:u.QUERY_KEYS.missions})}})},"useKillSession",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.killSession(e),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.sessions})})},"useLogin",0,function(){return l({mutationFn:e=>c.orcaClient.login(e.username,e.password)})},"useLogout",0,function(){return l({mutationFn:()=>c.orcaClient.logout()})},"useNewProjectDir",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.newProjectDir(e.id,e.path),onSuccess:(t,r)=>d(e,r.id)})},"useNewProjectFile",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.newProjectFile(e.id,e.path),onSuccess:(t,r)=>d(e,r.id)})},"usePauseMission",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.pauseMission(e),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.missions})})},"usePlanTask",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.planTask(e),onSuccess:()=>{e.invalidateQueries({queryKey:u.QUERY_KEYS.tasks}),e.invalidateQueries({queryKey:u.QUERY_KEYS.missions})}})},"useRemoveProject",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.removeProject(e),onSuccess:()=>e.invalidateQueries({queryKey:["projects"]})})},"useRenameProjectEntry",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.renameProjectEntry(e.id,e.from,e.to),onSuccess:(t,r)=>d(e,r.id)})},"useResumeMission",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.resumeMission(e),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.missions})})},"useSendInput",0,function(){return l({mutationFn:e=>c.orcaClient.sendKeys(e.name,e.keys)})},"useSetTaskExec",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.setTaskExec(e.id,e.exec),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.tasks})})},"useSetTaskStatus",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.setTaskStatus(e.id,e.status),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.tasks})})},"useSpawn",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.spawn(e),onSuccess:()=>{e.invalidateQueries({queryKey:u.QUERY_KEYS.tasks}),e.invalidateQueries({queryKey:u.QUERY_KEYS.sessions})}})},"useUpdateConfig",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.updateConfig(e),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.config})})},"useUpdateMe",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.updateMe(e),onSuccess:()=>e.invalidateQueries({queryKey:["me"]})})},"useUpdateProject",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.updateProject(e.id,{path:e.path,notes:e.notes}),onSuccess:()=>e.invalidateQueries({queryKey:["projects"]})})},"useUpdateTask",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.updateTask(e.id,e.patch),onSuccess:()=>e.invalidateQueries({queryKey:u.QUERY_KEYS.tasks})})},"useUpdateUser",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.updateUser(e.id,e.patch),onSuccess:()=>{e.invalidateQueries({queryKey:["users"]}),e.invalidateQueries({queryKey:["me"]})}})},"useUploadAvatar",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.uploadAvatar(e),onSuccess:()=>e.invalidateQueries({queryKey:["me"]})})},"useWriteProjectFile",0,function(){let e=(0,s.useQueryClient)();return l({mutationFn:e=>c.orcaClient.writeProjectFile(e.id,e.path,e.content),onSuccess:(t,r)=>{e.invalidateQueries({queryKey:["project-file",r.id,r.path]}),e.invalidateQueries({queryKey:["project-git",r.id]})}})}],4552)},1206,e=>{"use strict";var t=e.i(43476);let r=(0,e.i(71645).forwardRef)(function({className:e="",...r},o){let i=e.trim();return(0,t.jsx)("input",{ref:o,className:`h-9 w-full rounded-md border border-border bg-surface px-3 text-sm text-text placeholder:text-text-muted transition-colors focus:border-accent focus:outline-none disabled:opacity-40 disabled:cursor-not-allowed${i?` ${i}`:""}`,...r})});e.s(["Input",0,r])},90272,e=>{"use strict";let t=(0,e.i(75254).default)("FolderGit2",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);e.s(["FolderGit2",0,t],90272)},18566,(e,t,r)=>{t.exports=e.r(76562)},84981,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["default",0,t])},55436,e=>{"use strict";let t=(0,e.i(75254).default)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);e.s(["Search",0,t],55436)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,7835,e=>{"use strict";let s=(0,e.i(75254).default)("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);e.s(["Radio",0,s],7835)},72520,e=>{"use strict";let s=(0,e.i(75254).default)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,s],72520)},64668,23622,2817,e=>{"use strict";var s=e.i(17521);e.s(["LoaderCircle",()=>s.default],64668);let t=(0,e.i(75254).default)("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);e.s(["Ban",0,t],23622);var a=e.i(56474);let i=[{re:/\b(failed|failure|panic|traceback|uncaught|cannot find module|command not found|enoent)\b/,cat:"error"},{re:/\b(do you want to|allow|approve|yes\/no|y\/n|press enter|press \[?enter\]? to continue)\b/,cat:"prompted"},{re:/\b(npm (install|ci|i|add)|yarn add|pnpm (add|install)|pip install|cargo (add|install)|apt[- ]get install|brew install)\b/,cat:"installing"},{re:/\b(vitest|jest|pytest|cargo test|go test|npm (run )?test|mocha|playwright|✓|✗|[0-9]+ passing|[0-9]+ failing)\b/,cat:"testing"},{re:/\b(npm run build|next build|tsc|cargo build|make\b|go build|webpack|vite build|compil|building)\b/,cat:"building"},{re:/\b(edit|patch|wrote|updated?|created|apply|insert|delete|refactor|\.tsx?|\.jsx?|\.py|\.go|\.rs)\b/,cat:"editing"},{re:/\b(thinking|reasoning|analyz|planning|consider|let me|i'll|i will|let's)\b/,cat:"thinking"}];e.s(["sessionActivity",0,function(e){if(!e||!e.trim())return"unknown";let s=e.split("\n").map(e=>(0,a.parseAnsi)(e).map(e=>e.text).join("")).join("\n").toLowerCase();for(let e of i)if(e.re.test(s))return e.cat;return"unknown"}],2817)},51509,e=>{"use strict";var s=e.i(43476);e.s(["ModuleHeader",0,function({title:e,count:t,icon:a,children:i}){return(0,s.jsxs)("div",{className:"z-20 -mx-4 -mt-4 mb-5 flex flex-col gap-2 border-b border-border bg-bg px-4 py-3 md:sticky md:top-0 md:flex-row md:flex-wrap md:items-center md:gap-x-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[a?(0,s.jsx)(a,{size:16,className:"shrink-0 text-text-muted","aria-hidden":!0}):null,(0,s.jsx)("h1",{className:"text-base font-semibold tracking-tight text-text",children:e}),void 0!==t?(0,s.jsx)("span",{className:"rounded-full bg-elevated px-2 py-0.5 font-mono text-[11px] text-text-muted",children:t}):null]}),i?(0,s.jsx)("div",{className:"flex flex-wrap items-center gap-2 md:ml-auto",children:i}):null]})}])},26178,e=>{"use strict";var s=e.i(43476);e.s(["ModuleShell",0,function({moduleId:e,children:t}){return(0,s.jsx)("section",{"data-module":e,className:"module-root flex flex-col gap-4",children:t})}])},44375,e=>{"use strict";var s=e.i(43476),t=e.i(76525);e.i(69530);var a=e.i(2942);e.s(["EmptyState",0,function({title:e,description:t,icon:a,action:i}){return(0,s.jsxs)("div",{className:"flex animate-fade-up flex-col items-center justify-center gap-3 py-14 text-center",children:[a?(0,s.jsx)(a,{size:28,strokeWidth:1.25,className:"text-text-muted/40","aria-hidden":!0}):null,(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm uppercase tracking-wide text-text",children:e}),t&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:t})]}),i]})},"ErrorState",0,function({message:e,onRetry:i}){let{t:n}=(0,a.useTranslation)();return(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center",children:[(0,s.jsx)("p",{className:"text-sm text-accent",children:e}),i&&(0,s.jsx)(t.Button,{onClick:i,children:n.common.retry})]})},"LoadingState",0,function({label:e,variant:t="list"}){let{t:i}=(0,a.useTranslation)();return e?(0,s.jsx)("div",{className:"flex items-center justify-center py-12 font-mono text-xs text-text-muted animate-pulse",children:e}):"cards"===t?(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3","aria-busy":"true","aria-label":i.common.loading,children:[0,1,2,3,4,5].map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 rounded-lg border border-border bg-surface p-3",style:{boxShadow:"var(--shadow-card)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("div",{className:"skeleton h-9 w-9 rounded-lg"}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5",children:[(0,s.jsx)("div",{className:"skeleton h-3.5 w-2/3 rounded"}),(0,s.jsx)("div",{className:"skeleton h-3 w-1/3 rounded"})]})]}),(0,s.jsx)("div",{className:"skeleton h-6 w-full rounded-md"})]},e))}):"kanban"===t?(0,s.jsx)("div",{className:"flex gap-3 overflow-hidden","aria-busy":"true","aria-label":i.common.loading,children:[0,1,2,3,4].map(e=>(0,s.jsxs)("div",{className:"flex min-w-[14rem] flex-1 flex-col gap-2 rounded-lg border border-border bg-surface p-2",children:[(0,s.jsx)("div",{className:"skeleton h-3 w-20 rounded"}),[0,1,2].map(e=>(0,s.jsx)("div",{className:"skeleton h-12 w-full rounded-md"},e))]},e))}):(0,s.jsx)("div",{className:"flex flex-col gap-2.5 py-2","aria-busy":"true","aria-label":i.common.loading,children:[88,72,80,64].map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"skeleton h-4 w-4 rounded-md"}),(0,s.jsx)("div",{className:"skeleton h-3.5 rounded",style:{width:`${e}%`}})]},t))})}])},89890,e=>{"use strict";var s=e.i(43476);let t={default:"border-border bg-elevated text-text-muted",accent:"border-accent/40 bg-accent/10 text-accent",muted:"border-border bg-elevated text-text-muted",danger:"border-danger/40 bg-danger/10 text-danger",success:"border-success/40 bg-success/10 text-success",warning:"border-warning/40 bg-warning/10 text-warning"};e.s(["Badge",0,function({children:e,tone:a="default"}){return(0,s.jsx)("span",{className:`inline-flex items-center rounded-md border px-2 py-0.5 font-mono text-[11px] font-medium ${t[a]}`,children:e})}])},14683,e=>{"use strict";let s=(0,e.i(75254).default)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",0,s],14683)},52008,e=>{"use strict";let s=(0,e.i(75254).default)("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:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);e.s(["Layers",0,s],52008)},83086,e=>{"use strict";let s=(0,e.i(75254).default)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);e.s(["Sparkles",0,s],83086)},81646,e=>{"use strict";var s=e.i(43476),t=e.i(95468),a=e.i(73884),i=e.i(89890);e.i(69530);var n=e.i(2942);e.s(["OutcomeBadge",0,function({outcome:e}){let{t:r}=(0,n.useTranslation)();if(!e)return null;let l="fail"===e;return(0,s.jsxs)(i.Badge,{tone:l?"danger":"success",children:[l?(0,s.jsx)(a.XCircle,{size:11,className:"mr-1 inline","aria-hidden":!0}):(0,s.jsx)(t.CheckCircle2,{size:11,className:"mr-1 inline","aria-hidden":!0}),l?r.tasks.outcomeFail:r.tasks.outcomeOk]})}])},56284,e=>{"use strict";var s=e.i(43476);e.s(["IconButton",0,function({icon:e,label:t,onClick:a,variant:i="default",disabled:n=!1}){return(0,s.jsx)("button",{type:"button","aria-label":t,title:t,onClick:a,disabled:n,className:`inline-flex h-7 w-7 items-center justify-center border transition-colors ${"danger"===i?"text-danger hover:bg-danger hover:text-bg border-danger":"text-text-muted hover:bg-elevated hover:text-text border-border"} ${n?"opacity-40":""}`,style:{transitionDuration:"var(--motion-fast)"},children:(0,s.jsx)(e,{size:14,"aria-hidden":!0})})}])},10289,e=>{"use strict";let s=(0,e.i(75254).default)("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);e.s(["Bug",0,s],10289)},34723,e=>{"use strict";var s=e.i(63804),t=e.i(10289),a=e.i(83086),i=e.i(52008);let n=(0,e.i(75254).default)("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"}]]);var r=e.i(14683);let l={task:{icon:s.ListChecks,label:"Task",tone:"default"},bug:{icon:t.Bug,label:"Bug",tone:"danger"},feature:{icon:a.Sparkles,label:"Feature",tone:"accent"},epic:{icon:i.Layers,label:"Epic",tone:"accent"},chore:{icon:n,label:"Chore",tone:"muted"}};function d(e){return l[e??"task"]??{icon:r.Circle,label:e??"Task",tone:"default"}}e.s(["PRIORITIES",0,["P0","P1","P2","P3"],"TASK_TYPES",0,["task","feature","bug","chore","epic"],"statusLabel",0,function(e,s){return({open:e.tasks.statusOpen,in_progress:e.tasks.statusInProgress,blocked:e.tasks.statusBlocked,closed:e.tasks.statusClosed,cancelled:e.tasks.statusCancelled})[s]??s},"taskTypeLabel",0,function(e,s){return({task:e.tasks.typeTask,bug:e.tasks.typeBug,feature:e.tasks.typeFeature,epic:e.tasks.typeEpic,chore:e.tasks.typeChore})[s]??d(s).label},"taskTypeMeta",0,d],34723)},81203,e=>{"use strict";let s=(0,e.i(75254).default)("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);e.s(["Power",0,s],81203)},31343,e=>{"use strict";let s=(0,e.i(75254).default)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);e.s(["Play",0,s],31343)},17521,e=>{"use strict";let s=(0,e.i(75254).default)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,s])},34182,74848,e=>{"use strict";let s={open:"success",in_progress:"warning",blocked:"danger",closed:"danger",cancelled:"muted"};e.s(["statusTone",0,function(e){return s[e]}],34182);var t=e.i(43476);e.s(["ProgressRibbon",0,function({phases:e,className:s=""}){return(0,t.jsx)("div",{className:`flex h-1.5 gap-0.5 overflow-hidden rounded-full ${s}`,children:0===e.length?(0,t.jsx)("div",{className:"h-full flex-1 rounded-full bg-elevated"}):e.map(e=>{let s;return(0,t.jsx)("div",{className:`h-full flex-1 rounded-full transition-colors ${"closed"===(s=e.status)?"bg-accent":"in_progress"===s?"bg-accent/60":"blocked"===s?"bg-danger":"cancelled"===s?"bg-elevated":"bg-border-strong"}`,style:{transitionDuration:"var(--motion-base)"},title:`${e.title} — ${e.status}`},e.id)})})}],74848)},64673,e=>{"use strict";var s=e.i(43476),t=e.i(24877);e.i(69530);var a=e.i(2942);let i={working:{color:"var(--color-success)",ring:"color-mix(in srgb, var(--color-success) 50%, transparent)",pulse:!0},needs_input:{color:"var(--color-warning)",ring:"color-mix(in srgb, var(--color-warning) 50%, transparent)",pulse:!0},stalled:{color:"var(--color-warning)",ring:"color-mix(in srgb, var(--color-warning) 50%, transparent)",pulse:!1},stuck:{color:"var(--color-danger)",ring:"color-mix(in srgb, var(--color-danger) 50%, transparent)",pulse:!0},complete:{color:"var(--color-text-muted)",ring:"transparent",pulse:!1},idle:{color:"var(--color-border-strong)",ring:"transparent",pulse:!1}};e.s(["AgentStatusDot",0,function({signal:e,live:n=!1,size:r="md",stall:l,silenceSec:d=0}){let o,{t:c}=(0,a.useTranslation)(),x="stuck"===l?"stuck":"stalled"===l?"stalled":(0,t.liveState)(e,n),u=i[x],m="sm"===r?6:8;return o="stalled"===x?c.agent.stalled.replace("{min}",String(Math.max(1,Math.floor(d/60)))):"stuck"===x?c.agent.stuck.replace("{min}",String(Math.max(1,Math.floor(d/60)))):c.agent["idle"===x?"idle":"needs_input"===x?"needsInput":x],(0,s.jsx)("span",{className:`inline-block shrink-0 rounded-full ${u.pulse?"live-dot":""}`,style:{width:m,height:m,backgroundColor:u.color,"--live-ring":u.ring},role:"status","aria-label":o,title:o})}])},98715,e=>{"use strict";var s=e.i(24877);function t(e){let t=new Set(e.filter(e=>"epic"===e.type).map(e=>e.id)),a=new Map;for(let s of e)if(s.parent_id&&t.has(s.parent_id)){let e=a.get(s.parent_id)??[];e.push(s),a.set(s.parent_id,e)}for(let e of a.values())e.sort((e,t)=>((0,s.parseTs)(e.created_at)??0)-((0,s.parseTs)(t.created_at)??0));return a}e.s(["epicCapacity",0,function(e,t,a){let i=0;for(let a of e){let e=(0,s.taskSessionName)(a);"in_progress"===a.status&&e&&t.includes(e)&&i++}let n=Math.max(0,Number.isFinite(a)?Math.floor(a):0),r=Math.min(i,n);return{running:r,max:n,free:Math.max(0,n-r)}},"epicChildren",0,t,"epicEffectiveStatus",0,function(e,s,t=[]){return"epic"!==e.type?e.status:s.some(s=>s.epic_id===e.id&&"disengaged"!==s.state)?"in_progress":0===t.length?e.status:t.some(e=>"in_progress"===e.status)?"in_progress":t.some(e=>"blocked"===e.status)?"blocked":t.some(e=>"open"===e.status)?"open":"closed"},"epicLive",0,function(e,t,a){let i=0,n=0;for(let r of e){let e=(0,s.taskSessionName)(r);"in_progress"===r.status&&e&&t.includes(e)&&i++,e&&t.includes(e)&&a[e]?.type==="needs_input"&&n++}return{running:i,needsInput:n}},"epicProgress",0,function(e){return{done:e.filter(e=>"closed"===e.status||"cancelled"===e.status).length,total:e.length}},"phaseIds",0,function(e){let s=new Set;for(let a of t(e).values())for(let e of a)s.add(e.id);return s}])},95242,39312,e=>{"use strict";var s=e.i(75254);let t=(0,s.default)("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);e.s(["Pause",0,t],95242);let a=(0,s.default)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",0,a],39312)},67866,e=>{"use strict";var s=e.i(43476),t=e.i(60289),a=e.i(26178),i=e.i(51509);e.i(69530);var n=e.i(2942),r=e.i(22016),l=e.i(63804),d=e.i(9912),o=e.i(72520),c=e.i(7233),x=e.i(7835);let u=(0,e.i(75254).default)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var m=e.i(95242),p=e.i(31343),h=e.i(81203),g=e.i(39312),f=e.i(14683),b=e.i(64668),v=e.i(23622),j=e.i(83086),k=e.i(51981),y=e.i(4552),N=e.i(34182),w=e.i(89890),S=e.i(81646),M=e.i(89128),z=e.i(24877),_=e.i(77154),T=e.i(45286);function C({sessions:e}){let{t}=(0,n.useTranslation)(),a=(0,k.useSessions)(),i=(0,k.useSessionSignals)(),r=(0,k.useTasks)(),l=(0,z.needsInputSessions)(e??a.data??[],i);return 0===l.length?null:(0,s.jsxs)("section",{className:"flex flex-col gap-2 rounded-lg border border-warning/50 bg-warning/[0.06] p-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-warning",children:[(0,s.jsx)(M.TriangleAlert,{size:13,"aria-hidden":!0}),t.dashboard.needsAttentionTitle]}),(0,s.jsx)("div",{className:"flex flex-col gap-1.5",children:l.map(e=>{let t=i[e];return(0,s.jsx)(T.NeedsInputRow,{name:e,question:t?.type==="needs_input"?t.question:"",options:t?.type==="needs_input"?t.options:void 0,exec:(0,_.taskExec)((r.data??[]).find(s=>(0,z.taskSessionName)(s)===e)?.labels)},e)})})]})}var R=e.i(74848),L=e.i(64673),P=e.i(56284);function A({running:e,max:t,className:a=""}){let{t:i}=(0,n.useTranslation)(),r=Math.max(0,Math.floor(t)),l=Math.min(e,r),d=i.missions.capacityUsed.replace("{running}",String(l)).replace("{max}",String(r));return(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${a}`,role:"meter","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":r,"aria-label":d,title:d,children:[r>0?(0,s.jsx)("span",{className:"flex h-1.5 gap-0.5","aria-hidden":!0,children:Array.from({length:r},(e,t)=>(0,s.jsx)("span",{className:`h-full w-2 rounded-full transition-colors ${t<l?"bg-accent":"bg-border"}`,style:{transitionDuration:"var(--motion-base)"}},t))}):null,(0,s.jsxs)("span",{className:"font-mono text-[11px] tabular-nums text-text-muted",children:[l,"/",r]})]})}var B=e.i(44375),E=e.i(80809),I=e.i(93283),D=e.i(91842),$=e.i(2817),q=e.i(98715),O=e.i(89901),U=e.i(34723);function F({name:e,task:t}){let{t:a}=(0,n.useTranslation)(),{tail:i}=(0,I.useSessionPane)(e,4),l=(0,_.taskExec)(t?.labels),d=(0,z.tailSnippet)(i)||"…",{state:o,silenceSec:c}=(0,D.useSessionStall)(e,!0),u=(0,$.sessionActivity)(i);return(0,s.jsxs)(r.default,{href:"/sessions",className:"flex items-center gap-2.5 rounded-md border border-border bg-bg px-3 py-2 transition-colors hover:border-border-strong",children:[(0,s.jsx)(L.AgentStatusDot,{live:!0,size:"sm",stall:o,silenceSec:c}),(0,s.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md border border-border bg-elevated",children:l?(0,s.jsx)(O.ModelIcon,{name:l,size:13}):(0,s.jsx)(x.Radio,{size:12,className:"text-text-muted","aria-hidden":!0})}),(0,s.jsx)("span",{className:"shrink-0 font-mono text-xs text-text",children:e}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-[11px] text-text-muted",children:d}),(0,s.jsx)(w.Badge,{tone:"error"===u?"danger":"prompted"===u?"warning":"unknown"===u?"muted":"accent",children:a.activity[u]})]})}function H({value:e,label:t,tone:a,icon:i}){return(0,s.jsxs)("span",{className:"flex items-baseline gap-1.5",children:[i?(0,s.jsx)(i,{size:12,className:"shrink-0 self-center text-text-muted","aria-hidden":!0}):null,(0,s.jsx)("span",{className:`font-mono text-xl tabular-nums ${"danger"===a?"text-danger":"accent"===a?"text-accent":"text-text"}`,children:e}),(0,s.jsx)("span",{className:"text-[11px] uppercase tracking-wide text-text-muted",children:t})]})}function Z(){var e,t,a;let i,m,{t:p}=(0,n.useTranslation)(),h=(0,k.useTasks)(),j=(0,k.useSessions)(),M=(0,k.useMissions)(),_=(0,k.useSessionSignals)(),T=(0,y.usePauseMission)(),R=(0,y.useResumeMission)(),L=(0,y.useDisengage)(),{toast:P}=(0,E.useToast)(),I=(e=h.data,t=j.data,a=M.data,i=e??[],{open:(m=e=>i.filter(s=>s.status===e).length)("open"),inProgress:m("in_progress"),blocked:m("blocked"),liveSessions:(t??[]).length,activeMissions:(a??[]).filter(e=>"disengaged"!==e.state).length}),D={active:p.missions.stateActive,paused:p.missions.paused,disengaged:p.missions.stateDisengaged,stalled:p.missions.stateStalled},$=(j.data??[]).slice(0,6),O=(h.data??[]).filter(e=>"epic"!==e.type).slice(0,6),Z=(h.data??[]).filter(e=>"closed"===e.status&&"epic"!==e.type).sort((e,s)=>((0,z.parseTs)(s.closed_at)??0)-((0,z.parseTs)(e.closed_at)??0)).slice(0,6);return(0,s.jsxs)("div",{className:"flex w-full flex-col gap-5",children:[(0,s.jsx)(C,{}),(0,s.jsxs)("section",{className:"rounded-lg border border-border border-t-2 border-t-accent/40 bg-surface p-5",style:{boxShadow:"var(--shadow-card)"},children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-2",children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] font-semibold uppercase tracking-widest text-text-muted",children:[(0,s.jsx)(g.Zap,{size:12,className:"text-accent","aria-hidden":!0}),p.dashboard.now]}),(0,s.jsx)("span",{className:"h-5 w-px bg-border","aria-hidden":!0}),(0,s.jsx)(H,{value:I.inProgress,label:p.dashboard.inProgress,tone:"accent",icon:b.LoaderCircle}),(0,s.jsx)(H,{value:I.open,label:p.dashboard.open,icon:f.Circle}),(0,s.jsx)(H,{value:I.blocked,label:p.dashboard.blocked,tone:I.blocked>0?"danger":void 0,icon:v.Ban}),(0,s.jsx)(H,{value:I.liveSessions,label:p.dashboard.liveSessions,icon:x.Radio}),(0,s.jsx)(H,{value:I.activeMissions,label:p.dashboard.activeMissions,icon:d.Rocket})]}),(0,s.jsx)("div",{className:"mt-4 flex flex-col gap-2",children:$.length>0?$.map(e=>(0,s.jsx)(F,{name:e,task:(0,z.taskForSession)(h.data??[],e)},e)):(0,s.jsxs)("div",{className:"flex flex-col items-center gap-1.5 rounded-md border border-dashed border-border px-3 py-4 text-center text-xs text-text-muted",children:[(0,s.jsx)(x.Radio,{size:14,"aria-hidden":!0}),p.dashboard.nothingRunning]})}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[(0,s.jsxs)(r.default,{href:"/tasks?new=1",className:"inline-flex h-9 items-center gap-1.5 rounded-md border border-accent bg-accent px-3.5 text-sm font-medium text-white transition-opacity hover:opacity-90",children:[(0,s.jsx)(c.Plus,{size:14,"aria-hidden":!0}),p.tasks.newTask]}),(0,s.jsxs)(r.default,{href:"/tasks?new=1",className:"inline-flex h-9 items-center gap-1.5 rounded-md border border-border bg-elevated px-3.5 text-sm font-medium text-text transition-colors hover:border-border-strong",children:[(0,s.jsx)(d.Rocket,{size:14,"aria-hidden":!0}),p.missions.newMission]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[(0,s.jsxs)("section",{className:"flex flex-col rounded-lg border border-border bg-surface",style:{boxShadow:"var(--shadow-card)"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(l.ListChecks,{size:15,className:"text-text-muted","aria-hidden":!0}),(0,s.jsx)("h2",{className:"text-sm font-medium text-text",children:p.page.tasks})]}),(0,s.jsxs)(r.default,{href:"/tasks",className:"inline-flex items-center gap-1 text-xs font-medium text-accent transition-opacity hover:opacity-80",children:[p.dashboard.viewAll,(0,s.jsx)(o.ArrowRight,{size:12,"aria-hidden":!0})]})]}),h.isLoading?(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(B.LoadingState,{})}):h.isError?(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(B.ErrorState,{message:p.common.daemonUnreachable,onRetry:()=>h.refetch()})}):0===O.length?(0,s.jsx)(B.EmptyState,{title:p.tasks.empty,icon:l.ListChecks}):(0,s.jsx)("div",{className:"flex flex-col divide-y divide-border",children:O.map(e=>{let t=(0,U.taskTypeMeta)(e.type).icon;return(0,s.jsxs)(r.default,{href:"/tasks",className:"flex items-center gap-3 px-4 py-2.5 transition-colors hover:bg-elevated",children:[(0,s.jsx)(t,{size:14,className:"shrink-0 text-text-muted","aria-hidden":!0}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm text-text",children:e.title}),(0,s.jsx)(w.Badge,{tone:(0,N.statusTone)(e.status),children:(0,U.statusLabel)(p,e.status)})]},e.id)})})]}),(0,s.jsxs)("section",{className:"flex flex-col rounded-lg border border-border bg-surface",style:{boxShadow:"var(--shadow-card)"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(d.Rocket,{size:15,className:"text-text-muted","aria-hidden":!0}),(0,s.jsx)("h2",{className:"text-sm font-medium text-text",children:p.page.missions})]}),(0,s.jsxs)(r.default,{href:"/tasks",className:"inline-flex items-center gap-1 text-xs font-medium text-accent transition-opacity hover:opacity-80",children:[p.dashboard.viewAll,(0,s.jsx)(o.ArrowRight,{size:12,"aria-hidden":!0})]})]}),M.isLoading?(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(B.LoadingState,{})}):M.isError?(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(B.ErrorState,{message:p.common.daemonUnreachable,onRetry:()=>M.refetch()})}):M.data&&0!==M.data.length?(0,s.jsx)("div",{className:"flex flex-col divide-y divide-border",children:M.data.map(e=>{let t,a=h.data?.find(s=>s.id===e.epic_id),i=(h.data??[]).filter(s=>s.parent_id===e.epic_id),n=i.filter(e=>"closed"===e.status||"cancelled"===e.status).length,l=i.filter(e=>"in_progress"===e.status),d=l.filter(e=>{let s=(0,z.taskSessionName)(e);return!!s&&_[s]?.type==="needs_input"}).length;return(0,s.jsxs)(r.default,{href:"/tasks",className:"flex items-center gap-3 px-4 py-2.5 transition-colors hover:bg-elevated",children:[(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm text-text",children:a?.title??e.epic_id}),d>0?(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-[11px] font-medium text-warning",title:p.agent.needsInput,children:[(0,s.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-warning","aria-hidden":!0}),d]}):null,l.length>0?(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-[11px] font-medium text-success",title:p.agent.working,children:[(0,s.jsx)("span",{className:"live-dot h-1.5 w-1.5 rounded-full bg-success",style:{"--live-ring":"color-mix(in srgb, var(--color-success) 50%, transparent)"},"aria-hidden":!0}),l.length]}):null,(0,s.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-text-muted",children:[n,"/",i.length]}),"disengaged"!==e.state?(t=(0,q.epicCapacity)(i,j.data??[],e.max_sessions),(0,s.jsx)(A,{running:t.running,max:t.max})):null,(0,s.jsx)(w.Badge,{tone:"disengaged"===e.state?"muted":"accent",children:D[e.state]??e.state})]},e.id)})}):(0,s.jsx)(B.EmptyState,{title:p.missions.empty,icon:d.Rocket})]})]}),(0,s.jsx)(W,{missions:M.data??[],tasks:h.data??[],sessionNames:j.data??[],signals:_,onPause:e=>T.mutate(e,{onSuccess:()=>P(p.missions.pausedMsg),onError:e=>P(String(e),"error")}),onResume:e=>R.mutate(e,{onSuccess:()=>P(p.missions.resumed),onError:e=>P(String(e),"error")}),onDisengage:e=>L.mutate(e,{onSuccess:()=>P(p.missions.disengaged),onError:e=>P(String(e),"error")}),isLoading:M.isLoading,isError:M.isError,onRetry:()=>M.refetch()}),Z.length>0&&(0,s.jsxs)("section",{className:"flex flex-col rounded-lg border border-border bg-surface",style:{boxShadow:"var(--shadow-card)"},children:[(0,s.jsx)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(u,{size:15,className:"text-text-muted","aria-hidden":!0}),(0,s.jsx)("h2",{className:"text-sm font-medium text-text",children:p.dashboard.recentOutcomes})]})}),(0,s.jsx)("div",{className:"flex flex-col divide-y divide-border",children:Z.map(e=>(0,s.jsxs)(r.default,{href:`/tasks?select=${encodeURIComponent(e.id)}`,className:"flex items-center gap-3 px-4 py-2.5 transition-colors hover:bg-elevated",children:[(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block truncate text-sm text-text",children:e.title}),(0,s.jsx)("span",{className:"block truncate text-[11px] text-text-muted",children:e.result_summary?.trim()||p.tasks.noSummary})]}),(0,s.jsx)(S.OutcomeBadge,{outcome:e.outcome})]},e.id))})]})]})}function K({mission:e,epic:t,kids:a,sessionNames:i,signals:l,onPause:d,onResume:o,onDisengage:c}){let{t:x}=(0,n.useTranslation)(),u="paused"===e.state,g="disengaged"===e.state,f=function(e,s){for(let t of e){if("in_progress"!==t.status)continue;let e=(0,z.taskSessionName)(t);if(e&&s.includes(e))return t}return null}(a,i),b=f?(0,z.taskSessionName)(f):null,v=!!(b&&i.includes(b)),j=b?l[b]:void 0,k=(0,D.useSessionStall)(b??"",v&&!!b),y=(0,q.epicCapacity)(a,i,e.max_sessions);return(0,s.jsxs)("div",{className:"flex flex-col gap-2 px-4 py-3 transition-colors hover:bg-elevated",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(r.default,{href:"/tasks",className:"flex min-w-0 flex-1 items-center gap-2",children:(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-text",children:t?.title??e.epic_id})}),g||u?null:(0,s.jsx)(A,{running:y.running,max:y.max}),(0,s.jsx)(w.Badge,{tone:g?"muted":u?"warning":"accent",children:u?x.missions.statePaused:g?x.missions.stateDisengaged:x.missions.stateActive})]}),(0,s.jsx)("div",{className:"flex items-center gap-2",children:(0,s.jsx)(R.ProgressRibbon,{phases:a,className:"flex-1"})}),f?(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted",children:[(0,s.jsx)(L.AgentStatusDot,{signal:j,live:v,size:"sm",stall:k.state,silenceSec:k.silenceSec}),(0,s.jsx)("span",{className:"truncate",children:f.title})]}):(0,s.jsx)("div",{className:"text-[11px] text-text-muted",children:x.missions.noTasks}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[g?null:u?(0,s.jsx)(P.IconButton,{icon:p.Play,label:x.missions.resume,onClick:o}):(0,s.jsx)(P.IconButton,{icon:m.Pause,label:x.missions.pause,onClick:d}),(0,s.jsx)(P.IconButton,{icon:h.Power,label:x.missions.disengage,variant:"danger",onClick:c})]})]})}function W({missions:e,tasks:t,sessionNames:a,signals:i,onPause:l,onResume:c,onDisengage:x,isLoading:u,isError:m,onRetry:p}){let{t:h}=(0,n.useTranslation)(),g=e.filter(e=>"disengaged"!==e.state);return(0,s.jsxs)("section",{className:"flex flex-col rounded-lg border border-border border-t-2 border-t-accent/40 bg-surface",style:{boxShadow:"var(--shadow-card)"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(d.Rocket,{size:15,className:"text-text-muted","aria-hidden":!0}),(0,s.jsx)("h2",{className:"text-sm font-medium text-text",children:h.dashboard.autopilotSpotlight})]}),(0,s.jsxs)(r.default,{href:"/tasks",className:"inline-flex items-center gap-1 text-xs font-medium text-accent transition-opacity hover:opacity-80",children:[h.dashboard.viewAll,(0,s.jsx)(o.ArrowRight,{size:12,"aria-hidden":!0})]})]}),(0,s.jsxs)("p",{className:"flex items-center gap-1.5 px-4 py-2 text-[11px] text-text-muted",children:[(0,s.jsx)(j.Sparkles,{size:12,className:"shrink-0 text-text-muted","aria-hidden":!0}),h.dashboard.autopilotSpotlightDesc]}),u?(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(B.LoadingState,{})}):m?(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(B.ErrorState,{message:h.common.daemonUnreachable,onRetry:p})}):0===g.length?(0,s.jsx)(B.EmptyState,{title:h.dashboard.noActiveMissions,icon:d.Rocket}):(0,s.jsx)("div",{className:"flex flex-col divide-y divide-border",children:g.map(e=>{let n=t.find(s=>s.id===e.epic_id),r=t.filter(s=>s.parent_id===e.epic_id);return(0,s.jsx)(K,{mission:e,epic:n,kids:r,sessionNames:a,signals:i,onPause:()=>l(e.id),onResume:()=>c(e.id),onDisengage:()=>x(e.id)},e.id)})})]})}e.s(["default",0,function(){let{t:e}=(0,n.useTranslation)();return(0,s.jsxs)(a.ModuleShell,{moduleId:"dashboard",children:[(0,s.jsx)(i.ModuleHeader,{title:e.page.dashboard,icon:t.LayoutDashboard}),(0,s.jsx)(Z,{})]})},"dynamic",0,"force-dynamic"],67866)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,26178,e=>{"use strict";var t=e.i(43476);e.s(["ModuleShell",0,function({moduleId:e,children:s}){return(0,t.jsx)("section",{"data-module":e,className:"module-root flex flex-col gap-4",children:s})}])},44375,e=>{"use strict";var t=e.i(43476),s=e.i(76525);e.i(69530);var a=e.i(2942);e.s(["EmptyState",0,function({title:e,description:s,icon:a,action:l}){return(0,t.jsxs)("div",{className:"flex animate-fade-up flex-col items-center justify-center gap-3 py-14 text-center",children:[a?(0,t.jsx)(a,{size:28,strokeWidth:1.25,className:"text-text-muted/40","aria-hidden":!0}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-sm uppercase tracking-wide text-text",children:e}),s&&(0,t.jsx)("p",{className:"text-xs text-text-muted",children:s})]}),l]})},"ErrorState",0,function({message:e,onRetry:l}){let{t:i}=(0,a.useTranslation)();return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center",children:[(0,t.jsx)("p",{className:"text-sm text-accent",children:e}),l&&(0,t.jsx)(s.Button,{onClick:l,children:i.common.retry})]})},"LoadingState",0,function({label:e,variant:s="list"}){let{t:l}=(0,a.useTranslation)();return e?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 font-mono text-xs text-text-muted animate-pulse",children:e}):"cards"===s?(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3","aria-busy":"true","aria-label":l.common.loading,children:[0,1,2,3,4,5].map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 rounded-lg border border-border bg-surface p-3",style:{boxShadow:"var(--shadow-card)"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("div",{className:"skeleton h-9 w-9 rounded-lg"}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5",children:[(0,t.jsx)("div",{className:"skeleton h-3.5 w-2/3 rounded"}),(0,t.jsx)("div",{className:"skeleton h-3 w-1/3 rounded"})]})]}),(0,t.jsx)("div",{className:"skeleton h-6 w-full rounded-md"})]},e))}):"kanban"===s?(0,t.jsx)("div",{className:"flex gap-3 overflow-hidden","aria-busy":"true","aria-label":l.common.loading,children:[0,1,2,3,4].map(e=>(0,t.jsxs)("div",{className:"flex min-w-[14rem] flex-1 flex-col gap-2 rounded-lg border border-border bg-surface p-2",children:[(0,t.jsx)("div",{className:"skeleton h-3 w-20 rounded"}),[0,1,2].map(e=>(0,t.jsx)("div",{className:"skeleton h-12 w-full rounded-md"},e))]},e))}):(0,t.jsx)("div",{className:"flex flex-col gap-2.5 py-2","aria-busy":"true","aria-label":l.common.loading,children:[88,72,80,64].map((e,s)=>(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"skeleton h-4 w-4 rounded-md"}),(0,t.jsx)("div",{className:"skeleton h-3.5 rounded",style:{width:`${e}%`}})]},s))})}])},51509,e=>{"use strict";var t=e.i(43476);e.s(["ModuleHeader",0,function({title:e,count:s,icon:a,children:l}){return(0,t.jsxs)("div",{className:"z-20 -mx-4 -mt-4 mb-5 flex flex-col gap-2 border-b border-border bg-bg px-4 py-3 md:sticky md:top-0 md:flex-row md:flex-wrap md:items-center md:gap-x-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[a?(0,t.jsx)(a,{size:16,className:"shrink-0 text-text-muted","aria-hidden":!0}):null,(0,t.jsx)("h1",{className:"text-base font-semibold tracking-tight text-text",children:e}),void 0!==s?(0,t.jsx)("span",{className:"rounded-full bg-elevated px-2 py-0.5 font-mono text-[11px] text-text-muted",children:s}):null]}),l?(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2 md:ml-auto",children:l}):null]})}])},81418,e=>{"use strict";let t=(0,e.i(75254).default)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,t],81418)},58524,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["Link2",0,t],58524)},3116,e=>{"use strict";let t=(0,e.i(75254).default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);e.s(["Clock",0,t],3116)},31343,e=>{"use strict";let t=(0,e.i(75254).default)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);e.s(["Play",0,t],31343)},88508,e=>{"use strict";var t=e.i(24877);e.s(["formatTaskTime",0,function(e,s,a){if(!e)return{label:"",title:""};let l=(0,t.parseTs)(e);if(null==l)return{label:e,title:e};let i=new Date(l).toLocaleString(a,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),r=s-l;if(r<864e5){if(r<0)return{label:"0s",title:i};let e=Math.floor(r/1e3);if(e<60)return{label:`${e}s`,title:i};let t=Math.floor(e/60);if(t<60)return{label:`${t}m`,title:i};let s=Math.floor(t/60);return{label:`${s}h`,title:i}}return{label:new Date(l).toLocaleString(a,{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"}),title:i}}])},67240,e=>{"use strict";let t=(0,e.i(75254).default)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],67240)},16116,e=>{"use strict";var t=e.i(43476),s=e.i(26178),a=e.i(51737),l=e.i(81418),i=e.i(9912),r=e.i(31343),n=e.i(67240),d=e.i(58524),c=e.i(3116),o=e.i(51981),x=e.i(4552),m=e.i(40273),u=e.i(88508),h=e.i(51509),p=e.i(76525),f=e.i(44375),g=e.i(80809);e.i(69530);var j=e.i(2942);function b(){let{t:e,locale:s}=(0,j.useTranslation)(),b=(0,o.useEscalations)(),k=(0,x.useSetTaskStatus)(),N=(0,x.useApproveGate)(),v=(0,x.useResumeMission)(),{toast:y}=(0,g.useToast)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.ModuleHeader,{title:e.escalations.title,count:b.length,icon:a.ShieldAlert}),0===b.length?(0,t.jsx)(f.EmptyState,{title:e.escalations.empty,description:e.escalations.emptyDesc,icon:l.ShieldCheck}):(0,t.jsx)("div",{className:"flex flex-col gap-3",children:b.map(l=>{let o=(0,u.formatTaskTime)(l.ts,Date.now(),s);return(0,t.jsxs)("article",{className:"flex flex-col gap-3 rounded-lg border border-warning/40 bg-warning/[0.05] p-4",style:{boxShadow:"var(--shadow-card)"},children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-warning/40 bg-warning/10",children:(0,t.jsx)(a.ShieldAlert,{size:20,className:"text-warning","aria-hidden":!0})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h2",{className:"truncate text-sm font-semibold text-text",children:l.title}),(0,t.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 font-mono text-[11px] text-text-muted",children:[l.epicId?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Rocket,{size:11,className:"shrink-0","aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:l.epicId})]}):null,o.label?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"opacity-50",children:"·"}),(0,t.jsx)(c.Clock,{size:11,className:"shrink-0","aria-hidden":!0}),(0,t.jsx)("span",{title:o.title,children:o.label})]}):null]})]})]}),(0,t.jsxs)("div",{className:"rounded-md border border-border bg-elevated p-3",children:[(0,t.jsx)("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e.escalations.rationale}),(0,t.jsx)("p",{className:"whitespace-pre-wrap text-sm leading-relaxed text-text",children:l.rationale||e.escalations.noReason})]}),l.blocked.length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e.escalations.blockedBy}),(0,t.jsx)("ul",{className:"flex flex-col gap-1",children:l.blocked.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-2 text-xs text-text",children:[(0,t.jsx)(d.Link2,{size:12,className:"shrink-0 text-text-muted","aria-hidden":!0}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.title})]},e.id))})]}):null,(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,t.jsx)(p.Button,{variant:"ghost",icon:n.RotateCcw,onClick:()=>{k.mutate({id:l.taskId,status:"open"},{onSuccess:()=>{l.epicId&&v.mutate(`m-${l.epicId}`,{onError:()=>{}}),y(e.escalations.rerunning)},onError:t=>y((0,m.apiErrorMessage)(t)||e.escalations.actionError,"error")})},disabled:k.isPending,children:e.escalations.rerun}),(0,t.jsx)(p.Button,{variant:"accent",icon:r.Play,onClick:()=>{0!==l.blocked.length&&N.mutate(l.taskId,{onSuccess:()=>{l.epicId&&v.mutate(`m-${l.epicId}`,{onError:()=>{}}),y(e.escalations.approved)},onError:t=>y((0,m.apiErrorMessage)(t)||e.escalations.actionError,"error")})},disabled:0===l.blocked.length||N.isPending,children:e.escalations.approve})]})]},`${l.taskId}-${l.ts}`)})})]})}e.s(["default",0,function(){return(0,t.jsx)(s.ModuleShell,{moduleId:"escalations",children:(0,t.jsx)(b,{})})},"dynamic",0,"force-dynamic"],16116)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96527,e=>{"use strict";var s=e.i(43476),t=e.i(26178),a=e.i(71645),i=e.i(18566),n=e.i(7233),l=e.i(63804),r=e.i(55436),o=e.i(22915),d=e.i(27612),c=e.i(37727),u=e.i(73375),x=e.i(63059),m=e.i(89853),p=e.i(70956),h=e.i(51981),g=e.i(24877),f=e.i(98715),j=e.i(4552),b=e.i(88699),k=e.i(31343),v=e.i(75254);let y=(0,v.default)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);var S=e.i(47155),N=e.i(34667),w=e.i(58524),C=e.i(74886),T=e.i(81418),P=e.i(67240);let M=(0,v.default)("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);var E=e.i(40273),B=e.i(77154),D=e.i(80809);e.i(69530);var I=e.i(2942);function z(e){let s=(0,j.useSpawn)(),t=(0,j.useKillSession)(),a=(0,j.useSetTaskStatus)(),i=(0,j.useSendInput)(),n=(0,h.useSessions)(),{toast:l}=(0,D.useToast)(),{t:r}=(0,I.useTranslation)(),o=(0,B.taskExec)(e.labels),d=(0,g.taskSessionName)(e),c="in_progress"===e.status&&!!d&&(n.data??[]).includes(d);return{session:d,running:c,start:()=>s.mutate({taskId:e.id,exec:o||void 0},{onSuccess:e=>l(r.tasks.launched.replace("{session}",e.session)),onError:e=>l((0,E.apiErrorMessage)(e),"error")}),stop:()=>{d&&t.mutate(d),a.mutate({id:e.id,status:"open"},{onSuccess:()=>l(r.tasks.stopped.replace("{id}",e.id)),onError:e=>l((0,E.apiErrorMessage)(e),"error")})},pause:()=>{d&&i.mutate({name:d,keys:["C-c"]},{onSuccess:()=>l(r.sessions.interrupted.replace("{name}",d)),onError:e=>l((0,E.apiErrorMessage)(e),"error")})}}}var _=e.i(88508),L=e.i(89890),A=e.i(89901),F=e.i(56284),$=e.i(64673),R=e.i(81646),O=e.i(88242),q=e.i(97344),K=e.i(53727),H=e.i(44375),U=e.i(34182),G=e.i(34723);function V({taskId:e,onEdit:t,onBack:i}){let{t:n,locale:l}=(0,I.useTranslation)(),r=(0,h.useTasks)(),d=(0,h.useAllDeps)(),c=(0,h.useActivity)("signal"),{data:x}=(0,h.useConfig)(),m=(0,j.useCloseTask)(),p=(0,j.useSetTaskStatus)(),f=(0,j.useResumeMission)(),{toast:v}=(0,D.useToast)(),[Y,Q]=(0,a.useState)(!1),Z=r.data?.find(s=>s.id===e),{session:J,running:W,start:ee,stop:es,pause:et}=z(Z??{id:e,title:"",status:"open"}),ea=(0,h.useSessionSignal)(J??"");if(!Z)return(0,s.jsx)(H.EmptyState,{title:n.tasks.selectHint,icon:N.TerminalSquare});let ei=(0,G.taskTypeMeta)(Z.type).icon,en=(0,B.taskExec)(Z.labels),el=en||x?.defaults?.exec||"",er=(0,g.taskAgentName)(Z),eo="closed"===Z.status||"cancelled"===Z.status,ed=Z.closed_at||Z.created_at,ec=(0,_.formatTaskTime)(ed,Date.now(),l),eu=new Map((r.data??[]).map(e=>[e.id,e])),ex=(d.data??[]).filter(s=>s.task_id===e).map(e=>eu.get(e.depends_on_id)).filter(e=>!!e),em=(c.data??[]).filter(s=>s.target===e||J&&s.target===J).slice(0,6),ep=async()=>{try{await navigator.clipboard.writeText(Z.id),v(n.tasks.idCopied.replace("{id}",Z.id))}catch{v(n.tasks.idCopyFailed,"error")}},eh=!!Z.parent_id,eg="epic"===Z.type,ef=e=>{p.mutate({id:Z.id,status:"open"},{onSuccess:()=>{eh&&f.mutate(`m-${Z.parent_id}`,{onError:()=>{}}),v(e.replace("{id}",Z.id))},onError:e=>v((0,E.apiErrorMessage)(e),"error")})};return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"sticky top-0 z-10 -mx-4 flex flex-col gap-2 border-b border-border bg-surface px-4 pb-3 pt-1",children:[i?(0,s.jsxs)("button",{type:"button",onClick:i,className:"-ml-1 inline-flex w-fit items-center gap-1 rounded-md px-1.5 py-1 text-xs text-text-muted transition-colors hover:bg-elevated hover:text-text",children:[(0,s.jsx)(u.ChevronLeft,{size:14,"aria-hidden":!0}),n.tasks.backToFlow]}):null,(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-xl border border-border bg-elevated",children:el?(0,s.jsx)(A.ModelIcon,{name:el,size:26}):(0,s.jsx)(ei,{size:22,className:"text-text-muted","aria-hidden":!0})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("h2",{className:"min-w-0 flex-1 text-base font-semibold text-text",children:Z.title}),(0,s.jsx)($.AgentStatusDot,{signal:ea,live:W})]}),(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 font-mono text-[11px] text-text-muted",children:[(0,s.jsx)("span",{children:Z.id}),(0,s.jsx)(F.IconButton,{icon:C.Copy,label:n.tasks.copyId,onClick:ep}),er?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"opacity-50",children:"·"}),(0,s.jsx)("span",{children:(0,g.taskSessionName)(Z)})]}):null,ec.label?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"opacity-50",children:"·"}),(0,s.jsx)("span",{title:ec.title,children:ec.label})]}):null]})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,s.jsx)(L.Badge,{tone:(0,U.statusTone)(Z.status),children:(0,G.statusLabel)(n,Z.status)}),eo?(0,s.jsx)(R.OutcomeBadge,{outcome:Z.outcome}):null,en?(0,s.jsx)(L.Badge,{children:en}):null,er?(0,s.jsx)(O.TaskUsageBadge,{taskId:Z.id,live:W}):null]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[W?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(F.IconButton,{icon:y,label:n.tasks.stop,variant:"danger",onClick:es}),(0,s.jsx)(F.IconButton,{icon:S.SquareSlash,label:n.sessions.interrupt,onClick:et})]}):"blocked"===Z.status&&eh?(0,s.jsx)(F.IconButton,{icon:T.ShieldCheck,label:n.tasks.approveContinue,onClick:()=>ef(n.tasks.approved)}):eo&&eh?(0,s.jsx)(F.IconButton,{icon:P.RotateCcw,label:n.tasks.rerun,onClick:()=>ef(n.tasks.rerunning)}):(0,s.jsx)(F.IconButton,{icon:k.Play,label:n.tasks.start,onClick:ee}),J?(0,s.jsx)(F.IconButton,{icon:N.TerminalSquare,label:n.tasks.openTerminal,onClick:()=>Q(!0)}):null,t?(0,s.jsx)(F.IconButton,{icon:b.Pencil,label:n.common.edit,onClick:()=>t(Z)}):null,eo?null:(0,s.jsx)(F.IconButton,{icon:o.Archive,label:n.tasks.closeArchive,onClick:()=>m.mutate(Z.id,{onSuccess:()=>v(n.tasks.closed.replace("{id}",Z.id)),onError:e=>v(String(e),"error")})})]})]}),Z.description?.trim()?(0,s.jsx)(X,{label:n.tasks.fieldDetails,children:(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm leading-relaxed text-text-muted",children:Z.description})}):null,ex.length>0?(0,s.jsx)(X,{label:n.tasks.dependencies,children:(0,s.jsx)("ul",{className:"flex flex-col gap-1",children:ex.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsx)(w.Link2,{size:12,className:"shrink-0 text-text-muted","aria-hidden":!0}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-text",children:e.title}),(0,s.jsx)(L.Badge,{tone:(0,U.statusTone)(e.status),children:(0,G.statusLabel)(n,e.status)})]},e.id))})}):null,W&&J?(0,s.jsx)(X,{label:n.tasks.liveOutput,children:(0,s.jsx)(q.LiveTail,{name:J,lines:28,heightClass:"max-h-96",onExpand:()=>Q(!0)})}):null,eo&&(Z.result_summary||Z.outcome)?(0,s.jsx)(X,{label:eg?n.tasks.missionSummaryTitle:n.tasks.resultTitle,children:(0,s.jsxs)("div",{className:"flex items-start gap-2.5 rounded-lg border border-border bg-elevated p-3",children:[(0,s.jsx)(M,{size:15,className:"mt-0.5 shrink-0 text-text-muted","aria-hidden":!0}),(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm leading-relaxed text-text",children:Z.result_summary?.trim()||n.tasks.noSummary})]})}):null,em.length>0?(0,s.jsx)(X,{label:n.tasks.recentActivity,children:(0,s.jsx)("ul",{className:"flex flex-col divide-y divide-border",children:em.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-2 py-1.5 text-xs",children:[(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-text-muted",children:e.detail}),(0,s.jsx)("span",{className:"shrink-0 font-mono text-text-muted opacity-70",children:e.ts.slice(11,16)})]},e.id))})}):null,Y&&J&&(0,s.jsx)(K.TerminalModal,{session:J,onClose:()=>Q(!1)})]})}function X({label:e,children:t}){return(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e}),t]})}var Y=e.i(9912);function Q({epic:e,phases:t,activeId:i,onSelectPhase:n}){let{t:l}=(0,I.useTranslation)(),r=(0,h.useSessions)(),o=(0,h.useSessionSignals)(),{data:d}=(0,h.useConfig)(),c=new Set(r.data??[]),{done:u,total:x}=(0,f.epicProgress)(t);return(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 rounded-xl border border-accent/40 bg-accent/[0.06] p-3",style:{boxShadow:"var(--shadow-card)"},children:[(0,s.jsx)("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-border bg-elevated",children:(0,s.jsx)(Y.Rocket,{size:20,className:"text-accent","aria-hidden":!0})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("h2",{className:"truncate text-sm font-semibold text-text",children:e.title}),(0,s.jsxs)("span",{className:"font-mono text-[11px] text-text-muted",children:[u,"/",x," ",l.tasks.phasesLabel]})]}),(0,s.jsx)(L.Badge,{tone:(0,U.statusTone)(e.status),children:(0,G.statusLabel)(l,e.status)})]}),t.map((e,t)=>{let r=(0,B.taskExec)(e.labels)||d?.defaults?.exec||"",u=(0,g.taskAgentName)(e),x=(0,g.taskSessionName)(e),m="in_progress"===e.status&&!!x&&c.has(x),p=x?o[x]:void 0,h=m||p?.type==="needs_input";return(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("div",{className:"ml-5 flex h-6 w-px justify-center",children:(0,s.jsx)("span",{className:`h-full w-px ${h?"flow-edge flow-edge-active":"flow-edge"}`,"aria-hidden":!0})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>n(e.id),className:`group flex min-w-0 flex-1 items-center gap-3 rounded-xl border bg-surface p-3 text-left transition-all hover:-translate-y-0.5 ${i===e.id?"border-accent":"border-border hover:border-border-strong"} ${h?"flow-active":""}`,style:{boxShadow:"var(--shadow-card)",transitionDuration:"var(--motion-fast)"},children:[(0,s.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-border bg-elevated font-mono text-[11px] text-text-muted",children:t+1}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-text",children:e.title}),(0,s.jsx)(L.Badge,{tone:(0,U.statusTone)(e.status),children:(0,G.statusLabel)(l,e.status)})]}),r||u?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"hidden h-px w-6 shrink-0 sm:block flow-edge-h","aria-hidden":!0}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-col gap-1.5 pl-8 sm:pl-0",children:[r?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-elevated px-2 py-1 text-[11px] text-text-muted",title:r,children:[(0,s.jsx)(A.ModelIcon,{name:r,size:14}),(0,s.jsx)("span",{className:"font-mono",children:r})]}):null,u?(0,s.jsxs)("button",{type:"button",onClick:()=>n(e.id),className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-elevated px-2 py-1 text-[11px] text-text transition-colors hover:border-border-strong",title:u,children:[(0,s.jsx)($.AgentStatusDot,{signal:p,live:m,size:"sm"}),(0,s.jsx)("span",{className:"font-mono",children:u})]}):null]})]}):null]})]},e.id)})]})}var Z=e.i(86448),J=e.i(95242),W=e.i(81203),ee=e.i(75822),es=e.i(74848),et=e.i(9236),ea=e.i(20885),ei=e.i(29618),en=e.i(3116),el=e.i(39312),er=e.i(45601),eo=e.i(55626),ed=e.i(91842);function ec({task:e,onEdit:t,onSelect:i,active:n=!1,blockers:l,selected:r=!1,onToggleSelect:c,selecting:u=!1}){let x=(0,j.useCloseTask)(),m=(0,j.useDeleteTask)(),{toast:p}=(0,D.useToast)(),{t:g,locale:f}=(0,I.useTranslation)(),[v,S]=(0,a.useState)(!1),{data:N}=(0,h.useConfig)(),w=(0,G.taskTypeMeta)(e.type).icon,C=(0,B.taskExec)(e.labels)||N?.defaults?.exec||"",T="closed"===e.status,{session:P,running:M,start:E,stop:O,pause:q}=z(e),K=(0,h.useSessionSignal)(P??""),H=(0,ed.useSessionStall)(P??"",M&&!!P),V=P?{stall:H.state,silenceSec:H.silenceSec}:{},X=(l?.length??0)>0,Y=()=>(i??t)(e),Q=e.scheduled_at||e.closed_at||e.created_at,Z=Q?(0,_.formatTaskTime)(Q,Date.now(),f):null;return(0,s.jsxs)("div",{role:"button",tabIndex:0,onClick:Y,onKeyDown:e=>{"Enter"===e.key&&Y()},className:`card-interactive group relative flex flex-wrap cursor-pointer items-center gap-x-3 gap-y-2 rounded-lg border p-2.5 ${r||n?"border-accent bg-accent/[0.06]":"border-border bg-surface"}`,children:[(0,s.jsx)("span",{className:`flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border-2 bg-elevated ${M?"border-accent":"border-border"}`,children:C?(0,s.jsx)(A.ModelIcon,{name:C,size:26}):(0,s.jsx)(w,{size:22,className:"text-text-muted","aria-hidden":!0})}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"truncate text-sm font-medium text-text",children:e.title}),(0,s.jsx)($.AgentStatusDot,{signal:K,live:M,size:"sm",...V})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[C?(0,s.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-md border border-border bg-elevated px-1.5 py-0.5 font-mono text-[11px] text-text-muted",title:C,children:[(0,s.jsx)(A.ModelIcon,{name:C,size:11}),(0,er.execModel)(C)]}):(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,s.jsx)(w,{size:11,className:"shrink-0 text-text-muted","aria-hidden":!0}),(0,s.jsx)("span",{className:"truncate font-mono text-[11px] text-text-muted",children:e.id})]}),X?(0,s.jsxs)("span",{className:"shrink-0 text-[11px] text-warning",title:l.map(e=>e.title).join(", "),children:["· ",g.tasks.dependencies," ",l.length]}):null]})]}),(0,s.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[Z?(0,s.jsx)("span",{title:Z.title,children:(0,s.jsxs)(L.Badge,{tone:"muted",children:[e.scheduled_at&&e.autostart?(0,s.jsx)(el.Zap,{size:11,className:"mr-1 inline","aria-hidden":!0}):(0,s.jsx)(en.Clock,{size:11,className:"mr-1 inline","aria-hidden":!0}),Z.label]})}):null,(0,s.jsx)(et.ProjectPill,{projectId:e.project_id}),T?(0,s.jsx)(R.OutcomeBadge,{outcome:e.outcome}):null,(0,s.jsx)(L.Badge,{tone:(0,U.statusTone)(e.status),children:(0,G.statusLabel)(g,e.status)})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1",onClick:e=>e.stopPropagation(),children:[M?(0,s.jsx)(F.IconButton,{icon:y,label:g.tasks.stop,variant:"danger",onClick:O}):(0,s.jsx)(F.IconButton,{icon:k.Play,label:g.tasks.start,onClick:E}),M?(0,s.jsx)(F.IconButton,{icon:J.Pause,label:g.tasks.pause,onClick:q}):null,(0,s.jsx)(F.IconButton,{icon:b.Pencil,label:g.common.edit,onClick:()=>t(e)}),(0,s.jsx)(ea.ActionMenu,{label:g.tasks.deleteOrClose,items:[{label:g.tasks.closeArchive,icon:o.Archive,onSelect:()=>x.mutate(e.id,{onSuccess:()=>p(g.tasks.closed.replace("{id}",e.id)),onError:e=>p(String(e),"error")})},{label:g.tasks.deletePermanently,icon:d.Trash2,tone:"danger",onSelect:()=>S(!0)}]})]})]}),c?(0,s.jsx)("button",{type:"button",role:"checkbox","aria-checked":r,"aria-label":g.sessions.selectLabel.replace("{id}",e.id),onClick:s=>{s.stopPropagation(),c(e.id)},className:`shrink-0 transition-opacity ${u||r?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,s.jsx)(eo.Checkbox,{checked:r})}):null,v&&(0,s.jsx)("div",{onClick:e=>e.stopPropagation(),children:(0,s.jsx)(ei.ConfirmDialog,{open:v,title:g.tasks.confirmDeleteTitle.replace("{id}",e.id),description:g.tasks.confirmDeleteDescription,onClose:()=>S(!1),onConfirm:()=>{S(!1),m.mutate(e.id,{onSuccess:()=>p(g.tasks.deleted.replace("{id}",e.id)),onError:e=>p(String(e),"error")})}})})]})}var eu=e.i(83086),ex=e.i(52008),em=e.i(16302),ep=e.i(46040),eh=e.i(76525),eg=e.i(1206),ef=e.i(71120),ej=e.i(94321),eb=e.i(84375);function ek({epicId:e,onClose:t}){let{data:i}=(0,h.useConfig)(),r=(0,j.useInsertPhases)(),{toast:o}=(0,D.useToast)(),{t:d}=(0,I.useTranslation)(),u=(0,em.allModels)(i?.customModels,i?.hiddenPresets).filter(e=>!i?.allowedExecs||i.allowedExecs.includes(e.exec)),[x,m]=(0,a.useState)("manual"),[p,g]=(0,a.useState)(""),[f,b]=(0,a.useState)(""),[k,v]=(0,a.useState)([{title:"",type:"task"}]),y=r.isPending;async function S(){let s="manual"===x?{phases:k.map(e=>({title:e.title.trim(),type:e.type})).filter(e=>e.title)}:{goal:f.trim()};if("manual"===x&&(!s.phases||0===s.phases.length))return void o(d.missions.addPhaseAtLeastOne,"error");if("replan"===x&&!s.goal)return void o(d.missions.addPhaseGoalRequired,"error");let a={...s,exec:p||void 0};try{let s=await r.mutateAsync({epicId:e,body:a});o(d.missions.addPhaseInserted.replace("{count}",String(s.phases.length)).replace("{s}",1===s.phases.length?"":"s").replace("{epicId}",e)),t()}catch(e){e instanceof E.OrcaApiError&&"autopilot_key_missing"===e.code?o(d.tasks.autopilotKeyMissing,"error"):o(String(e),"error")}}return(0,s.jsxs)(ep.Modal,{title:d.missions.addPhaseModalTitle.replace("{epic}",e),description:e,onClose:t,size:"md",icon:ex.Layers,children:[(0,s.jsxs)(ep.ModalBody,{children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:d.missions.addPhaseModalDesc}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(eb.Segmented,{value:x,onChange:e=>m(e),options:[{value:"manual",label:d.missions.addPhaseModeManual,icon:l.ListChecks},{value:"replan",label:d.missions.addPhaseModeReplan,icon:eu.Sparkles}]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"manual"===x?d.missions.addPhaseManualDesc:d.missions.addPhaseReplanDesc})]}),"manual"===x?(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[k.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(eg.Input,{value:e.title,placeholder:d.tasks.phasePlaceholder.replace("{n}",String(t+1)),onChange:e=>v(s=>s.map((s,a)=>a===t?{...s,title:e.target.value}:s))}),(0,s.jsx)(ef.Select,{value:e.type,onChange:e=>v(s=>s.map((s,a)=>a===t?{...s,type:e.target.value}:s)),className:"w-32",children:G.TASK_TYPES.filter(e=>"epic"!==e).map(e=>(0,s.jsx)("option",{value:e,children:(0,G.taskTypeLabel)(d,e)},e))}),(0,s.jsx)(F.IconButton,{icon:c.X,label:d.tasks.removePhase,onClick:()=>v(e=>e.length>1?e.filter((e,s)=>s!==t):e)})]},t)),(0,s.jsxs)("button",{type:"button",onClick:()=>v(e=>[...e,{title:"",type:"task"}]),className:"inline-flex items-center gap-1 self-start text-xs text-accent hover:underline",children:[(0,s.jsx)(n.Plus,{size:13,"aria-hidden":!0})," ",d.tasks.addPhase]})]}):(0,s.jsx)(ej.Field,{label:d.missions.addPhaseFieldGoal,hint:d.missions.addPhaseGoalHint,children:(0,s.jsx)("textarea",{value:f,onChange:e=>b(e.target.value),placeholder:d.missions.addPhaseGoalPlaceholder,rows:4,className:"w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text placeholder:text-text-muted focus:border-accent focus:outline-none"})}),(0,s.jsx)(ej.Field,{label:d.missions.addPhaseFieldExecutor,children:(0,s.jsxs)(ef.Select,{value:p,onChange:e=>g(e.target.value),children:[(0,s.jsx)("option",{value:"",children:d.tasks.defaultExecutor}),u.map(e=>(0,s.jsx)("option",{value:e.exec,children:e.label},e.exec))]})})]}),(0,s.jsxs)(ep.ModalFooter,{children:[(0,s.jsx)(eh.Button,{variant:"ghost",onClick:t,children:d.common.cancel}),(0,s.jsx)(eh.Button,{variant:"accent",disabled:y,onClick:S,children:d.missions.addPhaseInsert})]})]})}function ev({epic:e,phases:t,effectiveStatus:i,expanded:l,onToggle:r,onEdit:o,onSelect:c,activeId:u,blockedBy:m}){let{t:p}=(0,I.useTranslation)(),g=(0,h.useSessions)(),b=(0,h.useSessionSignals)(),v=(0,h.useMissions)(),{data:y}=(0,h.useConfig)(),{toast:S}=(0,D.useToast)(),N=(0,j.useDeleteMission)(),w=(0,j.useEngage)(),C=(0,j.usePauseMission)(),T=(0,j.useResumeMission)(),P=(0,j.useDisengage)(),[M,B]=(0,a.useState)(!1),[z,_]=(0,a.useState)(!1),{done:A,total:F}=(0,f.epicProgress)(t),{running:$,needsInput:R}=(0,f.epicLive)(t,g.data??[],b),O=(0,G.taskTypeMeta)("epic").icon,q=(0,Z.useQueries)({queries:t.map(e=>({queryKey:["task-usage",e.id],queryFn:()=>E.orcaClient.taskUsage(e.id),staleTime:3e5}))}).reduce((e,s)=>e+(s.data?.costUsd??0),0),K=v.data?.find(s=>s.epic_id===e.id)??null,H=(i??e.status)==="closed"||(i??e.status)==="cancelled",V=null!=K&&"disengaged"!==K.state,X=K?.state==="paused";return(0,s.jsxs)("div",{className:"group/epic rounded-lg border border-accent/30 bg-accent/[0.04]",children:[(0,s.jsxs)("div",{className:"relative flex items-stretch",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>{r(),c(e)},"aria-expanded":l,className:`flex min-w-0 flex-1 items-center gap-3 p-3 text-left transition-colors hover:bg-accent/[0.06] ${u===e.id?"bg-accent/[0.06]":""}`,children:[(0,s.jsx)(x.ChevronRight,{size:16,className:`shrink-0 text-text-muted transition-transform ${l?"rotate-90":""}`,"aria-hidden":!0}),(0,s.jsx)("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-border bg-elevated",children:(0,s.jsx)(O,{size:20,className:"text-accent","aria-hidden":!0})}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-text",children:e.title}),R>0||$>0?(0,s.jsx)("span",{className:"live-dot h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:R>0?"var(--color-warning)":"var(--color-success)","--live-ring":R>0?"color-mix(in srgb, var(--color-warning) 50%, transparent)":"color-mix(in srgb, var(--color-success) 50%, transparent)"},"aria-hidden":!0}):null]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(es.ProgressRibbon,{phases:t,className:"max-w-[12rem] flex-1"}),(0,s.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-text-muted",children:[A,"/",F," ",p.tasks.phasesLabel]}),q>0?(0,s.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-0.5 rounded border border-approve/30 px-1.5 py-0.5 font-mono text-[11px] text-approve",title:`${p.usage.cost}: $${q.toFixed(4)}`,children:[(0,s.jsx)(ee.Coins,{size:10,className:"shrink-0","aria-hidden":!0}),"$",q.toFixed(4)]}):null,(0,s.jsx)(et.ProjectPill,{projectId:e.project_id})]})]}),(0,s.jsx)(L.Badge,{tone:(0,U.statusTone)(i??e.status),children:(0,G.statusLabel)(p,i??e.status)})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 pr-3",children:[V||H||K?null:(0,s.jsx)(ey,{icon:Y.Rocket,label:p.missions.engage,tone:"accent",onClick:()=>w.mutate({epicId:e.id,autonomy:y?.defaults?.autonomy??"L3",maxSessions:y?.defaults?.maxSessions??1},{onSuccess:()=>S(p.missions.engaged.replace("{epicId}",e.id)),onError:e=>S(String(e),"error")}),disabled:w.isPending}),V?(0,s.jsxs)(s.Fragment,{children:[X?(0,s.jsx)(ey,{icon:k.Play,label:p.missions.resume,tone:"accent",onClick:()=>T.mutate(K.id,{onSuccess:()=>S(p.missions.resumed),onError:e=>S(String(e),"error")}),disabled:T.isPending}):(0,s.jsx)(ey,{icon:J.Pause,label:p.missions.pause,onClick:()=>C.mutate(K.id,{onSuccess:()=>S(p.missions.pausedMsg),onError:e=>S(String(e),"error")}),disabled:C.isPending}),(0,s.jsx)(ey,{icon:W.Power,label:p.missions.disengage,tone:"danger",onClick:()=>P.mutate(K.id,{onSuccess:()=>S(p.missions.disengaged),onError:e=>S(String(e),"error")}),disabled:P.isPending})]}):null,(0,s.jsx)("div",{className:"opacity-0 transition-opacity group-hover/epic:opacity-100",children:(0,s.jsx)(ea.ActionMenu,{label:p.tasks.epicActions,items:[{label:p.missions.addPhase,icon:n.Plus,onSelect:()=>_(!0)},{label:p.tasks.deleteMission,icon:d.Trash2,tone:"danger",onSelect:()=>B(!0)}]})})]})]}),l?(0,s.jsx)("div",{className:"flex flex-col gap-2.5 rounded-b-lg border-t border-accent/20 bg-bg/30 p-2.5 pl-5",children:t.map(e=>(0,s.jsx)(ec,{task:e,onEdit:o,onSelect:c,active:u===e.id,blockers:m.get(e.id)},e.id))}):null,z&&(0,s.jsx)(ek,{epicId:e.id,onClose:()=>_(!1)}),(0,s.jsx)(ei.ConfirmDialog,{open:M,title:p.tasks.confirmDeleteMissionTitle.replace("{id}",e.id),description:p.tasks.confirmDeleteMissionDescription,confirmLabel:p.tasks.deleteMission,onClose:()=>B(!1),onConfirm:()=>{B(!1),N.mutate(e.id,{onSuccess:()=>S(p.tasks.missionDeleted.replace("{id}",e.id)),onError:e=>S(String(e),"error")})}})]})}function ey({icon:e,label:t,onClick:a,tone:i="default",disabled:n}){return(0,s.jsxs)("button",{type:"button",onClick:a,disabled:n,title:t,className:`inline-flex items-center gap-1 rounded-full border bg-elevated px-2.5 py-1 text-[11px] font-medium transition-colors disabled:opacity-50 ${"accent"===i?"border-accent/40 text-accent hover:bg-accent/10":"danger"===i?"border-danger/40 text-danger hover:bg-danger/10":"border-border text-text-muted hover:border-border-strong hover:text-text"}`,style:{transitionDuration:"var(--motion-fast)"},children:[(0,s.jsx)(e,{size:12,className:"shrink-0","aria-hidden":!0}),(0,s.jsx)("span",{className:"hidden sm:inline",children:t})]})}var eS=e.i(51509),eN=e.i(40310),ew=e.i(11476),eC=e.i(53992),eT=e.i(38112),eP=e.i(42113);let eM=["all","open","in_progress","blocked","closed","cancelled","autopilot"];function eE(e){let s=e.scheduled_at||e.closed_at||e.created_at,t=s?new Date(s).getTime():NaN;return Number.isNaN(t)?0:t}let eB=e=>(0,eP.dayKey)(new Date(e));function eD(){let e=(0,h.useAllDeps)(),t=(0,h.useSessions)(),b=(0,h.useSessionSignals)(),k=(0,h.useMissions)(),v=(0,j.useCloseTask)(),y=(0,j.useDeleteTask)(),{toast:S}=(0,D.useToast)(),{t:N,locale:w}=(0,I.useTranslation)(),[C,T]=(0,a.useState)(!1),[P,M]=(0,a.useState)(null),[E,B]=(0,a.useState)(""),[z,_]=(0,eN.usePersistentState)("orca.tasks.filter","in_progress",eM),{selectedProject:L,setProject:A}=(0,ew.useProjectFilter)("orca.tasks.project"),F=(0,h.useTasks)("all"===L?void 0:L),[$,R]=(0,a.useState)(0),[O,q]=(0,a.useState)(new Set),[K,U]=(0,a.useState)(!1),[G,X]=(0,a.useState)(null),Y=(0,a.useMemo)(()=>(0,f.epicChildren)(F.data??[]),[F.data]),Z=(0,a.useMemo)(()=>(0,f.phaseIds)(F.data??[]),[F.data]),[J,W]=(0,a.useState)(new Set),ee=[{value:"in_progress",label:N.tasks.filterActive},{value:"open",label:N.tasks.filterOpen},{value:"blocked",label:N.tasks.filterBlocked},{value:"closed",label:N.tasks.filterClosed},{value:"autopilot",label:N.tasks.filterAutopilot},{value:"all",label:N.tasks.filterAll}],es=(0,i.useRouter)(),et=(0,i.useSearchParams)();(0,a.useEffect)(()=>{"1"===et.get("new")&&(T(!0),es.replace("/tasks"))},[et,es]),(0,a.useEffect)(()=>{let e=et.get("select");e&&X(e)},[et]),(0,a.useEffect)(()=>{if(!G)return;let e=F.data?.find(e=>e.id===G);e?.parent_id&&Z.has(G)&&W(s=>new Set(s).add(e.parent_id))},[G,F.data,Z]),(0,a.useEffect)(()=>{if("autopilot"!==z)return;let e=new Set;for(let s of F.data??[]){if("epic"!==s.type)continue;let a=Y.get(s.id)??[];if(0===a.length)continue;let{running:i}=(0,f.epicLive)(a,t.data??[],b),n=a.some(e=>{let s=(0,g.taskSessionName)(e);return!!s&&b[s]?.type==="needs_input"});(i>0||n)&&e.add(s.id)}e.size&&W(s=>{let t=new Set(s);for(let s of e)t.add(s);return t})},[z,F.data,Y,t.data,b]);let ea=(0,a.useMemo)(()=>{let s=new Map((F.data??[]).map(e=>[e.id,e])),t=new Map;for(let a of F.data??[]){let i=(0,g.taskBlockers)(a.id,e.data??[],s);i.length>0&&t.set(a.id,i)}return t},[F.data,e.data]),en=e=>q(s=>{let t=new Set(s);return t.has(e)?t.delete(e):t.add(e),t}),el=()=>q(new Set),er=(0,a.useMemo)(()=>{let e=E.trim().toLowerCase(),s=s=>`${s.title} ${s.id} ${s.description??""}`.toLowerCase().includes(e),a=e=>{let s=Y.get(e.id)??[];return(0,f.epicLive)(s,t.data??[],b).running>0||s.some(e=>{let s=(0,g.taskSessionName)(e);return!!s&&b[s]?.type==="needs_input"})};return(F.data??[]).filter(e=>!Z.has(e.id)).filter(t=>{if("autopilot"===z)return"epic"===t.type&&0!==(Y.get(t.id)??[]).length;let a="epic"===t.type?Y.get(t.id)??[]:[],i="epic"===t.type?(0,f.epicEffectiveStatus)(t,k.data??[],a):t.status;return("all"===z||i===z)&&(!e||s(t)||a.some(s))}).sort((e,s)=>{if("autopilot"===z){let t=a(e);if(t!==a(s))return t?-1:1}return eE(s)-eE(e)})},[F.data,E,z,Y,Z,t.data,b,k.data]);(0,a.useEffect)(()=>{R(0)},[E,z,L]);let eo=Math.max(1,Math.ceil(er.length/12)),ed=Math.min($,eo-1),eu=er.slice(12*ed,12*ed+12),ex=e=>{let s=new Date,t=eB(s.getTime()),a=eB(s.getTime()-864e5),i=eB(e);return i===t?N.tasks.dayToday:i===a?N.tasks.dayYesterday:new Date(e).toLocaleDateString(w,{weekday:"short",month:"short",day:"numeric"})},em=(0,a.useMemo)(()=>{let e=[];for(let s of eu){let t=eE(s),a=eB(t),i=e[e.length-1];i&&i.key===a?i.items.push(s):e.push({key:a,label:ex(t),items:[s]})}return e},[eu,w,N]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(eS.ModuleHeader,{title:N.page.tasks,count:er.length,icon:l.ListChecks,children:[(0,s.jsxs)("div",{className:"relative w-40 sm:w-52",children:[(0,s.jsx)(r.Search,{size:14,"aria-hidden":!0,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-text-muted"}),(0,s.jsx)(eg.Input,{value:E,onChange:e=>B(e.target.value),placeholder:N.tasks.searchPlaceholder,className:"pl-9"})]}),(0,s.jsx)(eb.Segmented,{value:z,onChange:e=>_(e),options:ee}),(0,s.jsx)(eh.Button,{variant:"accent",icon:n.Plus,onClick:()=>T(!0),children:N.tasks.newTask})]}),(0,s.jsx)(eC.ProjectFilterPills,{value:L,onChange:A}),F.isLoading?(0,s.jsx)(H.LoadingState,{variant:"cards"}):F.isError?(0,s.jsx)(H.ErrorState,{message:N.common.daemonUnreachable,onRetry:()=>F.refetch()}):F.data&&0!==F.data.length?0===er.length?(0,s.jsx)(H.EmptyState,{title:N.tasks.noMatches,description:N.tasks.noMatchesDescription,icon:r.Search}):(0,s.jsxs)("div",{className:"lg:flex lg:items-start lg:gap-5",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-5 lg:w-[42%] lg:shrink-0",children:[em.map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(m.CalendarDays,{size:12,className:"shrink-0 text-text-muted","aria-hidden":!0}),(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-text-muted",children:e.label}),(0,s.jsx)("span",{className:"h-px flex-1 bg-border"}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 font-mono text-tiny text-text-muted",children:[(0,s.jsx)(p.List,{size:11,className:"shrink-0 text-text-muted","aria-hidden":!0}),e.items.length]})]}),(0,s.jsx)("div",{className:"flex flex-col gap-3",children:e.items.map(e=>{let t=Y.get(e.id);return"epic"===e.type&&t&&t.length>0?(0,s.jsx)(ev,{epic:e,phases:t,effectiveStatus:(0,f.epicEffectiveStatus)(e,k.data??[],t),expanded:J.has(e.id),onToggle:()=>{let s;return s=e.id,W(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})},onEdit:M,onSelect:e=>X(e.id),activeId:G,blockedBy:ea},e.id):(0,s.jsx)(ec,{task:e,onEdit:M,onSelect:e=>X(e.id),active:G===e.id,blockers:ea.get(e.id),selected:O.has(e.id),onToggleSelect:en,selecting:O.size>0},e.id)})})]},e.key)),er.length>12&&(0,s.jsxs)("div",{className:"flex items-center justify-between border-t border-border pt-3",children:[(0,s.jsx)("span",{className:"font-mono text-xs text-text-muted",children:N.tasks.pageRange.replace("{from}",String(12*ed+1)).replace("{to}",String(12*ed+eu.length)).replace("{total}",String(er.length))}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(eh.Button,{variant:"ghost",icon:u.ChevronLeft,disabled:0===ed,onClick:()=>R(ed-1),children:N.tasks.prevPage}),(0,s.jsxs)(eh.Button,{variant:"ghost",disabled:ed>=eo-1,onClick:()=>R(ed+1),children:[N.tasks.nextPage,(0,s.jsx)(x.ChevronRight,{size:15,className:"ml-1"})]})]})]})]}),(0,s.jsx)("aside",{className:"mt-5 min-w-0 lg:mt-0 lg:flex-1 lg:sticky lg:top-16 lg:max-h-[calc(100vh-80px)] lg:overflow-y-auto",children:(()=>{if(!G)return(0,s.jsxs)("div",{className:"hidden items-center justify-center gap-2 rounded-lg border border-dashed border-border py-20 text-sm text-text-muted lg:flex",children:[(0,s.jsx)(l.ListChecks,{size:14,className:"shrink-0 text-text-muted/50","aria-hidden":!0}),N.tasks.selectHint]});let e=F.data?.find(e=>e.id===G),t=e?.type==="epic"?Y.get(e.id)??[]:[];if(e?.type==="epic"&&t.length>0)return(0,s.jsx)("div",{className:"rounded-lg border border-border bg-surface p-4",style:{boxShadow:"var(--shadow-card)"},children:(0,s.jsx)(Q,{epic:e,phases:t,activeId:G,onSelectPhase:X})});let a=e?.parent_id&&F.data?.some(s=>s.id===e.parent_id&&"epic"===s.type)?e.parent_id:null;return(0,s.jsx)("div",{className:"rounded-lg border border-border bg-surface p-4",style:{boxShadow:"var(--shadow-card)"},children:(0,s.jsx)(V,{taskId:G,onEdit:M,onBack:a?()=>X(a):void 0})})})()})]}):(0,s.jsx)(H.EmptyState,{title:N.tasks.empty,description:N.tasks.emptyDescription,icon:l.ListChecks,action:(0,s.jsx)(eh.Button,{variant:"accent",icon:n.Plus,onClick:()=>T(!0),children:N.tasks.newTask})}),O.size>0&&(0,s.jsxs)("div",{className:"fixed bottom-6 left-1/2 z-40 flex -translate-x-1/2 items-center gap-2 rounded-xl border border-border bg-elevated px-3 py-2 shadow-[var(--shadow-raised)] animate-fade-up",children:[(0,s.jsx)("span",{className:"px-1 text-sm text-text",children:N.tasks.nSelected.replace("{count}",String(O.size))}),(0,s.jsx)(eh.Button,{variant:"default",icon:o.Archive,onClick:()=>{O.forEach(e=>v.mutate(e)),S(N.tasks.nClosed.replace("{count}",String(O.size))),el()},children:N.common.close}),(0,s.jsx)(eh.Button,{variant:"danger",icon:d.Trash2,onClick:()=>U(!0),children:N.common.delete}),(0,s.jsx)("button",{type:"button","aria-label":N.tasks.clearSelection,onClick:el,className:"flex h-8 w-8 items-center justify-center rounded-md text-text-muted hover:bg-surface hover:text-text",children:(0,s.jsx)(c.X,{size:15})})]}),C&&(0,s.jsx)(eT.TaskModal,{onClose:()=>T(!1)}),P&&(0,s.jsx)(eT.TaskModal,{task:P,onClose:()=>M(null)}),(0,s.jsx)(ei.ConfirmDialog,{open:K,title:N.tasks.confirmBulkDeleteTitle.replace("{count}",String(O.size)),description:N.tasks.confirmBulkDeleteDescription,onClose:()=>U(!1),onConfirm:()=>{O.forEach(e=>y.mutate(e)),S(N.tasks.nDeleted.replace("{count}",String(O.size))),el(),U(!1)}})]})}e.s(["default",0,function(){return(0,s.jsx)(t.ModuleShell,{moduleId:"tasks",children:(0,s.jsx)(eD,{})})},"dynamic",0,"force-dynamic"],96527)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56909,e=>{"use strict";let t=(0,e.i(75254).default)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",0,t],56909)},86536,e=>{"use strict";let t=(0,e.i(75254).default)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],86536)},94008,76881,e=>{"use strict";let t=(0,e.i(75254).default)("File",[["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"}]]);e.s(["File",0,t],94008);var r=e.i(43476);e.s(["PatchView",0,function({diff:e,empty:t}){return e.trim()?(0,r.jsx)("pre",{className:"h-full overflow-auto bg-bg p-3 font-mono text-xs leading-relaxed",children:e.split("\n").map((e,t)=>{let n=e.startsWith("+")&&!e.startsWith("+++")?"text-success":e.startsWith("-")&&!e.startsWith("---")?"text-danger":e.startsWith("@@")?"text-accent":"text-text-muted";return(0,r.jsx)("div",{className:n,children:e||" "},t)})}):(0,r.jsx)("p",{className:"p-4 text-center text-sm text-text-muted",children:t})}],76881)},93393,e=>{"use strict";let t=(0,e.i(75254).default)("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);e.s(["default",0,t])},25744,e=>{"use strict";var t=e.i(93393);e.s(["GitCommitHorizontal",()=>t.default])},26336,e=>{"use strict";let t=(0,e.i(75254).default)("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);e.s(["Minimize2",0,t],26336)},88784,83454,e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){var r,i;r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e){return function t(){for(var r=this,n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.apply(r,[].concat(i,n))}}}function l(e){return({}).toString.call(e).includes("Object")}function c(e){return"function"==typeof e}var s,u,d=a(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),f=function(e,t){return l(t)||d("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&d("changeField"),t},m=function(e){c(e)||d("selectorType")},p=function(e){c(e)||l(e)||d("handlerType"),l(e)&&Object.values(e).some(function(e){return!c(e)})&&d("handlersType")},h=function(e){e||d("initialIsRequired"),l(e)||d("initialType"),Object.keys(e).length||d("initialContent")};function g(e,t){return c(t)?t(e.current):t}function x(e,t){return e.current=o(o({},e.current),t),t}function y(e,t,r){return c(t)?t(e.current):Object.keys(r).forEach(function(r){var n;return null==(n=t[r])?void 0:n.call(t,e.current[r])}),r}var v={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},b=(s=function(e,t){throw Error(e[t]||e.default)},function e(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return n.length>=s.length?s.apply(this,n):function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return e.apply(t,[].concat(n,i))}})(v),j=function(e){return(e||b("configIsRequired"),({}).toString.call(e).includes("Object")||b("configType"),e.urls)?(console.warn(v.deprecation),{paths:{vs:e.urls.monacoBase}}):e},w=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}},k={type:"cancelation",msg:"operation is manually canceled"};function O(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(k):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var M=["monaco"],P=function(e){if(Array.isArray(e))return e}(u=({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h(e),p(t);var r={current:e},n=a(y)(r,t),i=a(x)(r),o=a(f)(e),l=a(g)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return m(e),e(r.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(n,i,o,l)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,o,a=[],l=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(l=(r=i.call(t)).done)&&(a.push(r.value),2!==a.length);l=!0);}catch(e){c=!0,n=e}finally{try{if(!l&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw n}}return a}}(u)||function(e){if(e){if("string"==typeof e)return t(e,2);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,2):void 0}}(u)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),N=P[0],E=P[1];function S(e){return document.body.appendChild(e)}function R(e){var t,r,n=N(function(e){return{config:e.config,reject:e.reject}}),i=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return i.onload=function(){return e()},i.onerror=n.reject,i}function C(){var e=N(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var r=t.m||t;T(r),e.resolve(r)},function(t){e.reject(t)})}function T(e){N().monaco||E({monaco:e})}var z=new Promise(function(e,t){return E({resolve:e,reject:t})}),_={config:function(e){var t=j(e),r=t.monaco,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,M);E(function(e){return{config:function e(t,r){return Object.keys(r).forEach(function(n){r[n]instanceof Object&&t[n]&&Object.assign(r[n],e(t[n],r[n]))}),n(n({},t),r)}(e.config,i),monaco:r}})},init:function(){var e=N(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(E({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),O(z);if(window.monaco&&window.monaco.editor)return T(window.monaco),e.resolve(window.monaco),O(z);w(S,R)(C)}return O(z)},__getMonacoInstance:function(){return N(function(e){return e.monaco})}};e.s(["default",0,_],83454);var I=e.i(71645),L={display:"flex",position:"relative",textAlign:"initial"},V={width:"100%"},A={display:"none"},D={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"},F=function({children:e}){return I.default.createElement("div",{style:D},e)},q=(0,I.memo)(function({width:e,height:t,isEditorReady:r,loading:n,_ref:i,className:o,wrapperProps:a}){return I.default.createElement("section",{style:{...L,width:e,height:t},...a},!r&&I.default.createElement(F,null,n),I.default.createElement("div",{ref:i,style:{...V,...!r&&A},className:o}))}),B=function(e){(0,I.useEffect)(e,[])},U=function(e,t,r=!0){let n=(0,I.useRef)(!0);(0,I.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)};function $(){}function H(e,t,r,n){var i,o,a,l,c,s;return i=e,o=n,i.editor.getModel(W(i,o))||(a=e,l=t,c=r,s=n,a.editor.createModel(l,c,s?W(a,s):void 0))}function W(e,t){return e.Uri.parse(t)}var G=(0,I.memo)(function({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:s="light",loading:u="Loading...",options:d={},height:f="100%",width:m="100%",className:p,wrapperProps:h={},beforeMount:g=$,onMount:x=$}){let[y,v]=(0,I.useState)(!1),[b,j]=(0,I.useState)(!0),w=(0,I.useRef)(null),k=(0,I.useRef)(null),O=(0,I.useRef)(null),M=(0,I.useRef)(x),P=(0,I.useRef)(g),N=(0,I.useRef)(!1);B(()=>{let e=_.init();return e.then(e=>(k.current=e)&&j(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{let t;return w.current?(t=w.current?.getModel(),void(l||t?.original?.dispose(),c||t?.modified?.dispose(),w.current?.dispose())):e.cancel()}}),U(()=>{if(w.current&&k.current){let t=w.current.getOriginalEditor(),i=H(k.current,e||"",n||r||"text",o||"");i!==t.getModel()&&t.setModel(i)}},[o],y),U(()=>{if(w.current&&k.current){let e=w.current.getModifiedEditor(),n=H(k.current,t||"",i||r||"text",a||"");n!==e.getModel()&&e.setModel(n)}},[a],y),U(()=>{let e=w.current.getModifiedEditor();e.getOption(k.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],y),U(()=>{w.current?.getModel()?.original.setValue(e||"")},[e],y),U(()=>{let{original:e,modified:t}=w.current.getModel();k.current.editor.setModelLanguage(e,n||r||"text"),k.current.editor.setModelLanguage(t,i||r||"text")},[r,n,i],y),U(()=>{k.current?.editor.setTheme(s)},[s],y),U(()=>{w.current?.updateOptions(d)},[d],y);let E=(0,I.useCallback)(()=>{if(!k.current)return;P.current(k.current);let l=H(k.current,e||"",n||r||"text",o||""),c=H(k.current,t||"",i||r||"text",a||"");w.current?.setModel({original:l,modified:c})},[r,t,i,e,n,o,a]),S=(0,I.useCallback)(()=>{!N.current&&O.current&&(w.current=k.current.editor.createDiffEditor(O.current,{automaticLayout:!0,...d}),E(),k.current?.editor.setTheme(s),v(!0),N.current=!0)},[d,s,E]);return(0,I.useEffect)(()=>{y&&M.current(w.current,k.current)},[y]),(0,I.useEffect)(()=>{b||y||S()},[b,y,S]),I.default.createElement(q,{width:m,height:f,isEditorReady:y,loading:u,_ref:O,className:p,wrapperProps:h})}),K=function(e){let t=(0,I.useRef)();return(0,I.useEffect)(()=>{t.current=e},[e]),t.current},Q=new Map,X=(0,I.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:i,path:o,theme:a="light",line:l,loading:c="Loading...",options:s={},overrideServices:u={},saveViewState:d=!0,keepCurrentModel:f=!1,width:m="100%",height:p="100%",className:h,wrapperProps:g={},beforeMount:x=$,onMount:y=$,onChange:v,onValidate:b=$}){let[j,w]=(0,I.useState)(!1),[k,O]=(0,I.useState)(!0),M=(0,I.useRef)(null),P=(0,I.useRef)(null),N=(0,I.useRef)(null),E=(0,I.useRef)(y),S=(0,I.useRef)(x),R=(0,I.useRef)(),C=(0,I.useRef)(n),T=K(o),z=(0,I.useRef)(!1),L=(0,I.useRef)(!1);B(()=>{let e=_.init();return e.then(e=>(M.current=e)&&O(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>P.current?void(R.current?.dispose(),f?d&&Q.set(o,P.current.saveViewState()):P.current.getModel()?.dispose(),P.current.dispose()):e.cancel()}),U(()=>{let a=H(M.current,e||n||"",t||i||"",o||r||"");a!==P.current?.getModel()&&(d&&Q.set(T,P.current?.saveViewState()),P.current?.setModel(a),d&&P.current?.restoreViewState(Q.get(o)))},[o],j),U(()=>{P.current?.updateOptions(s)},[s],j),U(()=>{P.current&&void 0!==n&&(P.current.getOption(M.current.editor.EditorOption.readOnly)?P.current.setValue(n):n!==P.current.getValue()&&(L.current=!0,P.current.executeEdits("",[{range:P.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),P.current.pushUndoStop(),L.current=!1))},[n],j),U(()=>{let e=P.current?.getModel();e&&i&&M.current?.editor.setModelLanguage(e,i)},[i],j),U(()=>{void 0!==l&&P.current?.revealLine(l)},[l],j),U(()=>{M.current?.editor.setTheme(a)},[a],j);let V=(0,I.useCallback)(()=>{if(!(!N.current||!M.current)&&!z.current){S.current(M.current);let c=o||r,f=H(M.current,n||e||"",t||i||"",c||"");P.current=M.current?.editor.create(N.current,{model:f,automaticLayout:!0,...s},u),d&&P.current.restoreViewState(Q.get(c)),M.current.editor.setTheme(a),void 0!==l&&P.current.revealLine(l),w(!0),z.current=!0}},[e,t,r,n,i,o,s,u,d,a,l]);return(0,I.useEffect)(()=>{j&&E.current(P.current,M.current)},[j]),(0,I.useEffect)(()=>{k||j||V()},[k,j,V]),C.current=n,(0,I.useEffect)(()=>{j&&v&&(R.current?.dispose(),R.current=P.current?.onDidChangeModelContent(e=>{L.current||v(P.current.getValue(),e)}))},[j,v]),(0,I.useEffect)(()=>{if(j){let e=M.current.editor.onDidChangeMarkers(e=>{let t=P.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=M.current.editor.getModelMarkers({resource:t});b?.(e)}});return()=>{e?.dispose()}}return()=>{}},[j,b]),I.default.createElement(q,{width:m,height:p,isEditorReady:j,loading:c,_ref:N,className:h,wrapperProps:g})});e.s(["DiffEditor",0,G,"Editor",0,X,"default",0,X,"useMonaco",0,function(){let[e,t]=(0,I.useState)(_.__getMonacoInstance());return B(()=>{let r;return e||(r=_.init()).then(e=>{t(e)}),()=>r?.cancel()}),e}],88784)},94321,e=>{"use strict";var t=e.i(43476);e.s(["Field",0,function({label:e,htmlFor:r,children:n,hint:i}){return(0,t.jsxs)("label",{htmlFor:r,className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:e}),n,i?(0,t.jsx)("span",{className:"text-xs text-text-muted",children:i}):null]})}])},51509,e=>{"use strict";var t=e.i(43476);e.s(["ModuleHeader",0,function({title:e,count:r,icon:n,children:i}){return(0,t.jsxs)("div",{className:"z-20 -mx-4 -mt-4 mb-5 flex flex-col gap-2 border-b border-border bg-bg px-4 py-3 md:sticky md:top-0 md:flex-row md:flex-wrap md:items-center md:gap-x-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[n?(0,t.jsx)(n,{size:16,className:"shrink-0 text-text-muted","aria-hidden":!0}):null,(0,t.jsx)("h1",{className:"text-base font-semibold tracking-tight text-text",children:e}),void 0!==r?(0,t.jsx)("span",{className:"rounded-full bg-elevated px-2 py-0.5 font-mono text-[11px] text-text-muted",children:r}):null]}),i?(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2 md:ml-auto",children:i}):null]})}])},26178,e=>{"use strict";var t=e.i(43476);e.s(["ModuleShell",0,function({moduleId:e,children:r}){return(0,t.jsx)("section",{"data-module":e,className:"module-root flex flex-col gap-4",children:r})}])},44375,e=>{"use strict";var t=e.i(43476),r=e.i(76525);e.i(69530);var n=e.i(2942);e.s(["EmptyState",0,function({title:e,description:r,icon:n,action:i}){return(0,t.jsxs)("div",{className:"flex animate-fade-up flex-col items-center justify-center gap-3 py-14 text-center",children:[n?(0,t.jsx)(n,{size:28,strokeWidth:1.25,className:"text-text-muted/40","aria-hidden":!0}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-sm uppercase tracking-wide text-text",children:e}),r&&(0,t.jsx)("p",{className:"text-xs text-text-muted",children:r})]}),i]})},"ErrorState",0,function({message:e,onRetry:i}){let{t:o}=(0,n.useTranslation)();return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center",children:[(0,t.jsx)("p",{className:"text-sm text-accent",children:e}),i&&(0,t.jsx)(r.Button,{onClick:i,children:o.common.retry})]})},"LoadingState",0,function({label:e,variant:r="list"}){let{t:i}=(0,n.useTranslation)();return e?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 font-mono text-xs text-text-muted animate-pulse",children:e}):"cards"===r?(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3","aria-busy":"true","aria-label":i.common.loading,children:[0,1,2,3,4,5].map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 rounded-lg border border-border bg-surface p-3",style:{boxShadow:"var(--shadow-card)"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("div",{className:"skeleton h-9 w-9 rounded-lg"}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5",children:[(0,t.jsx)("div",{className:"skeleton h-3.5 w-2/3 rounded"}),(0,t.jsx)("div",{className:"skeleton h-3 w-1/3 rounded"})]})]}),(0,t.jsx)("div",{className:"skeleton h-6 w-full rounded-md"})]},e))}):"kanban"===r?(0,t.jsx)("div",{className:"flex gap-3 overflow-hidden","aria-busy":"true","aria-label":i.common.loading,children:[0,1,2,3,4].map(e=>(0,t.jsxs)("div",{className:"flex min-w-[14rem] flex-1 flex-col gap-2 rounded-lg border border-border bg-surface p-2",children:[(0,t.jsx)("div",{className:"skeleton h-3 w-20 rounded"}),[0,1,2].map(e=>(0,t.jsx)("div",{className:"skeleton h-12 w-full rounded-md"},e))]},e))}):(0,t.jsx)("div",{className:"flex flex-col gap-2.5 py-2","aria-busy":"true","aria-label":i.common.loading,children:[88,72,80,64].map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"skeleton h-4 w-4 rounded-md"}),(0,t.jsx)("div",{className:"skeleton h-3.5 rounded",style:{width:`${e}%`}})]},r))})}])},89890,e=>{"use strict";var t=e.i(43476);let r={default:"border-border bg-elevated text-text-muted",accent:"border-accent/40 bg-accent/10 text-accent",muted:"border-border bg-elevated text-text-muted",danger:"border-danger/40 bg-danger/10 text-danger",success:"border-success/40 bg-success/10 text-success",warning:"border-warning/40 bg-warning/10 text-warning"};e.s(["Badge",0,function({children:e,tone:n="default"}){return(0,t.jsx)("span",{className:`inline-flex items-center rounded-md border px-2 py-0.5 font-mono text-[11px] font-medium ${r[n]}`,children:e})}])},46040,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(74080);e.i(69530);var i=e.i(2942);let o={lg:"h-[88vh] w-[92vw]",xl:"max-h-[90vh] w-full max-w-2xl",md:"max-h-[88vh] w-full max-w-lg",sm:"max-h-[80vh] w-full max-w-md"};e.s(["Modal",0,function({title:e,onClose:a,children:l,size:c="lg",icon:s,description:u}){let{t:d}=(0,i.useTranslation)(),[f,m]=(0,r.useState)(!1);return((0,r.useEffect)(()=>m(!0),[]),(0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&a()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a]),f)?(0,n.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:a,children:(0,t.jsxs)("div",{className:`animate-pop-in flex flex-col rounded-lg bg-surface border border-border ${o[c]}`,style:{boxShadow:"var(--shadow-raised)"},onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-3",children:[s?(0,t.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border bg-elevated",children:(0,t.jsx)(s,{size:18,className:"text-accent","aria-hidden":!0})}):null,(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h2",{className:"truncate text-sm font-semibold text-text",children:e}),u?(0,t.jsx)("p",{className:"truncate text-xs text-text-muted",children:u}):null]}),(0,t.jsx)("button",{type:"button","aria-label":d.common.close,onClick:a,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-elevated hover:text-text",children:"×"})]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:l})]})}),document.body):null},"ModalBody",0,function({children:e,gap:r=5}){return(0,t.jsx)("div",{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-5 ${4===r?"gap-4":6===r?"gap-6":"gap-5"}`,children:e})},"ModalFooter",0,function({children:e}){return(0,t.jsx)("div",{className:"flex shrink-0 items-center justify-end gap-2 border-t border-border px-5 py-3",children:e})}])},27612,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["Trash2",0,t],27612)},78894,e=>{"use strict";var t=e.i(82458);e.s(["AlertTriangle",()=>t.default])},88699,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["Pencil",0,t],88699)},98361,e=>{"use strict";let t=(0,e.i(75254).default)("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);e.s(["Maximize2",0,t],98361)},63059,e=>{"use strict";let t=(0,e.i(75254).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],63059)},67585,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return i}});let n=e.r(32061);function i({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return c}});let n=e.r(43476),i=e.r(74080),o=e.r(63599),a=e.r(9885),l=e.r(43369);function c({moduleIds:e}){if("u">typeof window)return null;let t=o.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let s=(0,l.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}${s}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,i.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let n=e.r(43476),i=e.r(71645),o=e.r(67585),a=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let c={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},s=function(e){let t={...c,...e},r=(0,i.lazy)(()=>t.loader().then(l)),s=t.loading;function u(e){let l=s?(0,n.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,c=!t.ssr||!!t.loading,u=c?i.Suspense:i.Fragment,d=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(u,{...c?{fallback:l}:{},children:d})}return u.displayName="LoadableComponent",u}},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i}});let n=e.r(55682)._(e.r(69093));function i(e,t){let r={};"function"==typeof e&&(r.loader=e);let i={...r,...t};return(0,n.default)({...i,modules:i.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},74886,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["Copy",0,t],74886)},53096,e=>{e.v(t=>Promise.all(["static/chunks/1t_gu3tshssgg.js"].map(t=>e.l(t))).then(()=>t(67211)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20885,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(74080),l=e.i(27612);e.i(69530);var n=e.i(2942);e.s(["ActionMenu",0,function({items:e,label:r,trigger:i,align:o="right"}){let[d,c]=(0,a.useState)(!1),u=(0,a.useRef)(null),x=(0,a.useRef)(null),m=(0,a.useRef)(null),h=(0,a.useRef)(null),{t:p}=(0,n.useTranslation)(),g=r??p.common.actions,[f,b]=(0,a.useState)(null),[k,v]=(0,a.useState)(!1);(0,a.useEffect)(()=>v(!0),[]);let y=()=>{let e=x.current;if(!e)return;let t=e.getBoundingClientRect();b("right"===o?{top:t.bottom,right:window.innerWidth-t.right}:{top:t.bottom,left:t.left})},j=()=>{h.current&&(clearTimeout(h.current),h.current=null)},w=()=>{j(),h.current=setTimeout(()=>c(!1),160)},N=()=>{j(),y(),c(!0)};return(0,a.useEffect)(()=>{if(!d)return;let e=e=>{u.current?.contains(e.target)||m.current?.contains(e.target)||c(!1)},t=e=>{"Escape"===e.key&&c(!1)},a=()=>y();return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t),window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0)}},[d]),(0,a.useEffect)(()=>()=>j(),[]),(0,t.jsxs)("div",{ref:u,className:"relative",onMouseEnter:N,onMouseLeave:w,children:[(0,t.jsx)("button",{ref:x,type:"button","aria-label":g,"aria-haspopup":"menu","aria-expanded":d,title:g,onClick:()=>d?c(!1):N(),className:"inline-flex h-8 w-8 items-center justify-center rounded-md border border-danger/60 text-danger transition-colors hover:bg-danger hover:text-white",style:{transitionDuration:"var(--motion-fast)"},children:i??(0,t.jsx)(l.Trash2,{size:15,"aria-hidden":!0})}),k&&d&&f&&(0,s.createPortal)((0,t.jsx)("div",{ref:m,role:"menu",onMouseEnter:j,onMouseLeave:w,className:"fixed z-[61] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-surface py-1.5",style:{top:f.top,left:f.left,right:f.right,boxShadow:"var(--shadow-raised)"},children:e.map(e=>{let a=e.icon,s="danger"===e.tone;return(0,t.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{c(!1),e.onSelect()},className:`flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left text-sm transition-colors ${s?"text-danger hover:bg-danger hover:text-white":"text-text hover:bg-elevated"}`,style:{transitionDuration:"var(--motion-fast)"},children:[a?(0,t.jsx)(a,{size:15,"aria-hidden":!0}):null,e.label]},e.label)})}),document.body)]})}])},84375,e=>{"use strict";var t=e.i(43476);e.s(["Segmented",0,function({options:e,value:a,onChange:s}){return(0,t.jsx)("div",{role:"radiogroup",className:"flex flex-wrap gap-1.5",children:e.map(e=>{let l=e.value===a,n=e.icon;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":l,"aria-label":e.label,onClick:()=>s(e.value),className:`inline-flex h-9 items-center gap-1.5 rounded-md border px-3 text-xs font-medium transition-colors ${l?"border-accent/50 bg-accent/15 text-accent":"border-border bg-elevated text-text-muted hover:border-border-strong hover:text-text"}`,style:{transitionDuration:"var(--motion-fast)"},children:[n?(0,t.jsx)(n,{size:13,"aria-hidden":!0}):null,e.label]},e.value)})})}])},40310,e=>{"use strict";var t=e.i(71645);e.s(["usePersistentState",0,function(e,a,s){let[l,n]=(0,t.useState)(a);return(0,t.useEffect)(()=>{try{let t=localStorage.getItem(e);if(null===t)return;("function"==typeof s?s(t):s.includes(t))&&n(t)}catch{}},[e]),[l,(0,t.useCallback)(t=>{n(t);try{localStorage.setItem(e,t)}catch{}},[e])]}])},14683,e=>{"use strict";let t=(0,e.i(75254).default)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",0,t],14683)},9236,e=>{"use strict";var t=e.i(43476),a=e.i(90272),s=e.i(51981);e.s(["ProjectPill",0,function({projectId:e,always:l=!1}){let{data:n}=(0,s.useProjects)();if(null==e||!n||!l&&n.length<2)return null;let r=n.find(t=>t.id===e);return r?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md border border-border bg-elevated px-1.5 py-0.5 font-mono text-[11px] text-text-muted",title:r.path,children:[(0,t.jsx)(a.FolderGit2,{size:11,className:"shrink-0","aria-hidden":!0}),(0,t.jsx)("span",{className:"max-w-32 truncate",children:r.slug})]}):null}])},70956,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["List",0,t],70956)},97344,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(98361),l=e.i(93283),n=e.i(56474);e.i(69530);var r=e.i(2942);e.s(["LiveTail",0,function({name:e,lines:i=20,heightClass:o="max-h-80",onExpand:d}){let{t:c}=(0,r.useTranslation)(),{tail:u,isLoading:x}=(0,l.useSessionPane)(e,i),m=(0,a.useRef)(null),h=(0,a.useRef)(null),[p,g]=(0,a.useState)({scale:1,h:0});(0,a.useEffect)(()=>{let e=m.current,t=h.current;if(!e||!t)return;let a=()=>{let a=t.scrollWidth,s=t.scrollHeight,l=e.clientWidth;if(!a||!l)return;let n=Math.min(1,l/a);g({scale:n,h:Math.ceil(s*n)})};a();let s=new ResizeObserver(a);return s.observe(e),()=>s.disconnect()},[u]);let f=(0,t.jsx)("div",{ref:m,className:`${o} overflow-auto`,children:(0,t.jsx)("div",{className:"overflow-hidden",style:{height:p.h||void 0},children:(0,t.jsx)("pre",{ref:h,style:{transform:p.scale<1?`scale(${p.scale})`:void 0,transformOrigin:"top left"},className:"w-max whitespace-pre font-mono text-xs leading-relaxed text-text-muted",children:x?c.sessions.loading:u?(0,n.parseAnsi)(u).map((e,a)=>(0,t.jsx)("span",{style:e.color?{color:e.color}:void 0,children:e.text},a)):c.sessions.noOutput})})});return d?(0,t.jsxs)("div",{className:"group relative",children:[(0,t.jsx)("div",{role:"button",tabIndex:0,onClick:d,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),d())},title:c.tasks.openTerminal,className:"block w-full cursor-pointer rounded-md border border-border bg-bg p-3 transition-colors hover:border-accent/60 focus:border-accent focus:outline-none",children:f}),(0,t.jsxs)("span",{className:"pointer-events-none absolute right-2 top-2 flex items-center gap-1 rounded-md border border-border bg-surface/90 px-2 py-1 text-[11px] text-text-muted opacity-0 backdrop-blur transition-opacity group-hover:opacity-100",children:[(0,t.jsx)(s.Maximize2,{size:12,"aria-hidden":!0})," ",c.tasks.openTerminal]})]}):(0,t.jsx)("div",{className:"rounded-md border border-border bg-bg p-3",children:f})}])},88242,75822,e=>{"use strict";var t=e.i(43476),a=e.i(51981),s=e.i(75254);let l=(0,s.default)("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),n=(0,s.default)("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]),r=(0,s.default)("DatabaseZap",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 15 21.84",key:"14ibmq"}],["path",{d:"M21 5V8",key:"1marbg"}],["path",{d:"M21 12L18 17H22L19 22",key:"zafso"}],["path",{d:"M3 12A9 3 0 0 0 14.59 14.87",key:"1y4wr8"}]]),i=(0,s.default)("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"}]]);e.s(["Coins",0,i],75822),e.i(69530);var o=e.i(2942);function d(e){return!Number.isFinite(e)||e<=0?"0":e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(+(e<1e4))}k`:`${(e/1e6).toFixed(1)}M`}function c({usage:e}){let{t:a}=(0,o.useTranslation)();if(!e||0===e.total)return null;let s=e.cacheRead+e.cacheWrite,x=s>0,m=null!=e.costUsd&&e.costUsd>0,h=[`${a.usage.inputTokens}: ${e.input.toLocaleString()}`,x?`${a.usage.cache}: ${s.toLocaleString()}`:null,`${a.usage.outputTokens}: ${e.output.toLocaleString()}`,null!=e.costUsd&&e.costUsd>0?`${a.usage.cost}: $${e.costUsd.toFixed(4)}`:null].filter(Boolean).join(" · ");return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 font-mono text-[11px]",title:h,children:[(0,t.jsx)(u,{icon:l,label:a.usage.input,display:d(e.input),className:"border-info/30 text-info"}),x?(0,t.jsx)(u,{icon:r,label:a.usage.cache,display:d(s),className:"border-warning/30 text-warning"}):null,(0,t.jsx)(u,{icon:n,label:a.usage.output,display:d(e.output),className:"border-danger/30 text-danger"}),m?(0,t.jsx)(u,{icon:i,label:a.usage.cost,display:`$${e.costUsd.toFixed(4)}`,className:"border-approve/30 text-approve"}):null]})}function u({icon:e,label:a,display:s,className:l}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-0.5 rounded border px-1.5 py-0.5 ${l??""}`,children:[(0,t.jsx)(e,{size:10,className:"shrink-0","aria-hidden":!0}),(0,t.jsx)("span",{className:"uppercase tracking-wide",children:a}),(0,t.jsx)("span",{children:s})]})}e.s(["TaskUsageBadge",0,function({taskId:e,live:s=!1}){let{data:l}=(0,a.useTaskUsage)(e,s);return l?(0,t.jsx)(c,{usage:l}):null}],88242)},51509,e=>{"use strict";var t=e.i(43476);e.s(["ModuleHeader",0,function({title:e,count:a,icon:s,children:l}){return(0,t.jsxs)("div",{className:"z-20 -mx-4 -mt-4 mb-5 flex flex-col gap-2 border-b border-border bg-bg px-4 py-3 md:sticky md:top-0 md:flex-row md:flex-wrap md:items-center md:gap-x-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s?(0,t.jsx)(s,{size:16,className:"shrink-0 text-text-muted","aria-hidden":!0}):null,(0,t.jsx)("h1",{className:"text-base font-semibold tracking-tight text-text",children:e}),void 0!==a?(0,t.jsx)("span",{className:"rounded-full bg-elevated px-2 py-0.5 font-mono text-[11px] text-text-muted",children:a}):null]}),l?(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2 md:ml-auto",children:l}):null]})}])},44375,e=>{"use strict";var t=e.i(43476),a=e.i(76525);e.i(69530);var s=e.i(2942);e.s(["EmptyState",0,function({title:e,description:a,icon:s,action:l}){return(0,t.jsxs)("div",{className:"flex animate-fade-up flex-col items-center justify-center gap-3 py-14 text-center",children:[s?(0,t.jsx)(s,{size:28,strokeWidth:1.25,className:"text-text-muted/40","aria-hidden":!0}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-sm uppercase tracking-wide text-text",children:e}),a&&(0,t.jsx)("p",{className:"text-xs text-text-muted",children:a})]}),l]})},"ErrorState",0,function({message:e,onRetry:l}){let{t:n}=(0,s.useTranslation)();return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center",children:[(0,t.jsx)("p",{className:"text-sm text-accent",children:e}),l&&(0,t.jsx)(a.Button,{onClick:l,children:n.common.retry})]})},"LoadingState",0,function({label:e,variant:a="list"}){let{t:l}=(0,s.useTranslation)();return e?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 font-mono text-xs text-text-muted animate-pulse",children:e}):"cards"===a?(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3","aria-busy":"true","aria-label":l.common.loading,children:[0,1,2,3,4,5].map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 rounded-lg border border-border bg-surface p-3",style:{boxShadow:"var(--shadow-card)"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("div",{className:"skeleton h-9 w-9 rounded-lg"}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5",children:[(0,t.jsx)("div",{className:"skeleton h-3.5 w-2/3 rounded"}),(0,t.jsx)("div",{className:"skeleton h-3 w-1/3 rounded"})]})]}),(0,t.jsx)("div",{className:"skeleton h-6 w-full rounded-md"})]},e))}):"kanban"===a?(0,t.jsx)("div",{className:"flex gap-3 overflow-hidden","aria-busy":"true","aria-label":l.common.loading,children:[0,1,2,3,4].map(e=>(0,t.jsxs)("div",{className:"flex min-w-[14rem] flex-1 flex-col gap-2 rounded-lg border border-border bg-surface p-2",children:[(0,t.jsx)("div",{className:"skeleton h-3 w-20 rounded"}),[0,1,2].map(e=>(0,t.jsx)("div",{className:"skeleton h-12 w-full rounded-md"},e))]},e))}):(0,t.jsx)("div",{className:"flex flex-col gap-2.5 py-2","aria-busy":"true","aria-label":l.common.loading,children:[88,72,80,64].map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"skeleton h-4 w-4 rounded-md"}),(0,t.jsx)("div",{className:"skeleton h-3.5 rounded",style:{width:`${e}%`}})]},a))})}])},26178,e=>{"use strict";var t=e.i(43476);e.s(["ModuleShell",0,function({moduleId:e,children:a}){return(0,t.jsx)("section",{"data-module":e,className:"module-root flex flex-col gap-4",children:a})}])},89890,e=>{"use strict";var t=e.i(43476);let a={default:"border-border bg-elevated text-text-muted",accent:"border-accent/40 bg-accent/10 text-accent",muted:"border-border bg-elevated text-text-muted",danger:"border-danger/40 bg-danger/10 text-danger",success:"border-success/40 bg-success/10 text-success",warning:"border-warning/40 bg-warning/10 text-warning"};e.s(["Badge",0,function({children:e,tone:s="default"}){return(0,t.jsx)("span",{className:`inline-flex items-center rounded-md border px-2 py-0.5 font-mono text-[11px] font-medium ${a[s]}`,children:e})}])},46040,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(74080);e.i(69530);var l=e.i(2942);let n={lg:"h-[88vh] w-[92vw]",xl:"max-h-[90vh] w-full max-w-2xl",md:"max-h-[88vh] w-full max-w-lg",sm:"max-h-[80vh] w-full max-w-md"};e.s(["Modal",0,function({title:e,onClose:r,children:i,size:o="lg",icon:d,description:c}){let{t:u}=(0,l.useTranslation)(),[x,m]=(0,a.useState)(!1);return((0,a.useEffect)(()=>m(!0),[]),(0,a.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[r]),x)?(0,s.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:r,children:(0,t.jsxs)("div",{className:`animate-pop-in flex flex-col rounded-lg bg-surface border border-border ${n[o]}`,style:{boxShadow:"var(--shadow-raised)"},onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 border-b border-border px-5 py-3",children:[d?(0,t.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border bg-elevated",children:(0,t.jsx)(d,{size:18,className:"text-accent","aria-hidden":!0})}):null,(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h2",{className:"truncate text-sm font-semibold text-text",children:e}),c?(0,t.jsx)("p",{className:"truncate text-xs text-text-muted",children:c}):null]}),(0,t.jsx)("button",{type:"button","aria-label":u.common.close,onClick:r,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-elevated hover:text-text",children:"×"})]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:i})]})}),document.body):null},"ModalBody",0,function({children:e,gap:a=5}){return(0,t.jsx)("div",{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-5 ${4===a?"gap-4":6===a?"gap-6":"gap-5"}`,children:e})},"ModalFooter",0,function({children:e}){return(0,t.jsx)("div",{className:"flex shrink-0 items-center justify-end gap-2 border-t border-border px-5 py-3",children:e})}])},27612,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["Trash2",0,t],27612)},98361,e=>{"use strict";let t=(0,e.i(75254).default)("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);e.s(["Maximize2",0,t],98361)},78894,e=>{"use strict";var t=e.i(82458);e.s(["AlertTriangle",()=>t.default])},88699,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["Pencil",0,t],88699)},63059,e=>{"use strict";let t=(0,e.i(75254).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],63059)},94321,e=>{"use strict";var t=e.i(43476);e.s(["Field",0,function({label:e,htmlFor:a,children:s,hint:l}){return(0,t.jsxs)("label",{htmlFor:a,className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:e}),s,l?(0,t.jsx)("span",{className:"text-xs text-text-muted",children:l}):null]})}])},16302,e=>{"use strict";let t=[{label:"GLM 5.2",exec:"ollama-cloud/glm-5.2"},{label:"GPT 5.5",exec:"codex:gpt-5.5"},{label:"Claude Sonnet 4.5",exec:"sonnet"},{label:"Claude Opus 4.8",exec:"opus"},{label:"DeepSeek V4 Pro",exec:"ollama-cloud/deepseek-v4-pro"},{label:"Kimi k2.7 Code",exec:"ollama/kimi-k2.7-code"},{label:"MiniMax M3",exec:"ollama-cloud/minimax-m3"},{label:"DeepSeek v4 Flash",exec:"ollama-cloud/deepseek-v4-flash"},{label:"MiniMax M2.7",exec:"ollama-cloud/minimax-m2.7"},{label:"GLM 5.1",exec:"ollama-cloud/glm-5.1"},{label:"QWEN 3.5",exec:"ollama-cloud/qwen3.5"}];e.s(["EXEC_PRESETS",0,t,"allModels",0,function(e=[],a=[]){let s=new Set(e.map(e=>e.exec)),l=new Set(a);return[...t.filter(e=>!s.has(e.exec)&&!l.has(e.exec)),...e]}])},71120,e=>{"use strict";var t=e.i(43476);e.s(["Select",0,function({className:e="",children:a,...s}){let l=e.trim();return(0,t.jsx)("select",{className:`h-9 w-full rounded-md border border-border bg-surface px-3 text-sm text-text transition-colors focus:border-accent focus:outline-none disabled:opacity-40 disabled:cursor-not-allowed${l?` ${l}`:""}`,...s,children:a})}])},29618,e=>{"use strict";var t=e.i(43476),a=e.i(78894),s=e.i(46040),l=e.i(76525);e.i(69530);var n=e.i(2942);e.s(["ConfirmDialog",0,function({open:e,title:r,description:i,confirmLabel:o,onConfirm:d,onClose:c}){let{t:u}=(0,n.useTranslation)();return e?(0,t.jsxs)(s.Modal,{title:r,onClose:c,size:"sm",icon:a.AlertTriangle,children:[(0,t.jsx)(s.ModalBody,{children:i?(0,t.jsx)("p",{className:"text-sm leading-relaxed text-text-muted",children:i}):null}),(0,t.jsxs)(s.ModalFooter,{children:[(0,t.jsx)(l.Button,{variant:"ghost",onClick:c,children:u.common.cancel}),(0,t.jsx)(l.Button,{variant:"danger",onClick:d,children:o??u.common.delete})]})]}):null}])},56156,e=>{"use strict";var t=e.i(43476);e.s(["Toggle",0,function({checked:e,onChange:a,label:s,disabled:l=!1}){return(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":e,"aria-label":s,disabled:l,onClick:()=>!l&&a(!e),className:`inline-flex h-5 w-9 items-center border border-border px-0.5 transition-colors ${e?"bg-accent":"bg-elevated"} ${l?"opacity-40":"cursor-pointer"}`,style:{transitionDuration:"var(--motion-fast)"},children:(0,t.jsx)("span",{className:`block h-3.5 w-3.5 transition-transform ${e?"translate-x-4 bg-bg":"translate-x-0 bg-text-muted"}`,style:{transitionDuration:"var(--motion-base)",transitionTimingFunction:"var(--ease-spring)"}})})}])},58524,e=>{"use strict";let t=(0,e.i(75254).default)("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"}]]);e.s(["Link2",0,t],58524)},3116,e=>{"use strict";let t=(0,e.i(75254).default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);e.s(["Clock",0,t],3116)},31343,e=>{"use strict";let t=(0,e.i(75254).default)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);e.s(["Play",0,t],31343)},88508,e=>{"use strict";var t=e.i(24877);e.s(["formatTaskTime",0,function(e,a,s){if(!e)return{label:"",title:""};let l=(0,t.parseTs)(e);if(null==l)return{label:e,title:e};let n=new Date(l).toLocaleString(s,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),r=a-l;if(r<864e5){if(r<0)return{label:"0s",title:n};let e=Math.floor(r/1e3);if(e<60)return{label:`${e}s`,title:n};let t=Math.floor(e/60);if(t<60)return{label:`${t}m`,title:n};let a=Math.floor(t/60);return{label:`${a}h`,title:n}}return{label:new Date(l).toLocaleString(s,{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"}),title:n}}])},43531,e=>{"use strict";let t=(0,e.i(75254).default)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],43531)},73375,89853,e=>{"use strict";var t=e.i(75254);let a=(0,t.default)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,a],73375);let s=(0,t.default)("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);e.s(["CalendarDays",0,s],89853)},42113,e=>{"use strict";let t=e=>String(e).padStart(2,"0");function a(e){return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function s(e){return e.scheduled_at||e.closed_at||null}function l(e){let t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=(t.getDay()+6)%7;return t.setDate(t.getDate()-a),t}e.s(["countUnscheduled",0,function(e){return e.filter(e=>!s(e)).length},"dayKey",0,a,"monthMatrix",0,function(e){let t=l(new Date(e.getFullYear(),e.getMonth(),1)),a=[],s=new Date(t);for(let t=0;t<6;t++){let t=[];for(let e=0;e<7;e++)t.push(new Date(s)),s.setDate(s.getDate()+1);if(a.push(t),t[6].getMonth()!==e.getMonth()&&t[0].getMonth()!==e.getMonth())break}return a},"sameDay",0,function(e,t){return a(e)===a(t)},"shift",0,function(e,t,a){let s=new Date(e);return"day"===t?s.setDate(s.getDate()+a):"week"===t?s.setDate(s.getDate()+7*a):s.setMonth(s.getMonth()+a),s},"taskCalDate",0,s,"tasksByDay",0,function(e){let t=new Map;for(let l of e){let e=s(l);if(!e)continue;let n=new Date(e);if(Number.isNaN(n.getTime()))continue;let r=a(n);(t.get(r)??t.set(r,[]).get(r)).push(l)}for(let e of t.values())e.sort((e,t)=>(s(e)??"").localeCompare(s(t)??""));return t},"weekDays",0,function(e){let t=l(e);return Array.from({length:7},(e,a)=>new Date(t.getFullYear(),t.getMonth(),t.getDate()+a))}])},31278,e=>{"use strict";var t=e.i(17521);e.s(["Loader2",()=>t.default])},55626,e=>{"use strict";var t=e.i(43476),a=e.i(43531);e.s(["Checkbox",0,function({checked:e,className:s=""}){return(0,t.jsx)("span",{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-[5px] border transition-colors ${e?"border-accent bg-accent text-white":"border-border-strong bg-surface"} ${s}`,"aria-hidden":!0,children:(0,t.jsx)(a.Check,{size:11,strokeWidth:3,className:`transition-transform duration-150 ${e?"scale-100 opacity-100":"scale-50 opacity-0"}`,style:{transitionTimingFunction:"var(--ease-spring)"}})})}])},38112,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(31343),l=e.i(83086),n=e.i(63804),r=e.i(7233),i=e.i(37727),o=e.i(78894),d=e.i(88699),c=e.i(31278),u=e.i(90272),x=e.i(51981),m=e.i(4552),h=e.i(16302),p=e.i(77154),g=e.i(40273),f=e.i(46040),b=e.i(76525),k=e.i(1206),v=e.i(71120),y=e.i(55626),j=e.i(56156),w=e.i(94321),N=e.i(84375),M=e.i(56284),S=e.i(89890),C=e.i(80809),T=e.i(97344);e.i(69530);var P=e.i(2942),D=e.i(34723);function L(e){if(!e)return"";let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let a=e=>String(e).padStart(2,"0");return`${t.getFullYear()}-${a(t.getMonth()+1)}-${a(t.getDate())}T${a(t.getHours())}:${a(t.getMinutes())}`}let E=e=>e?new Date(e).toISOString():null;e.s(["TaskModal",0,function({task:e,onClose:$,initialSchedule:F}){let z=!!e,{data:A}=(0,x.useConfig)(),I=(0,h.allModels)(A?.customModels,A?.hiddenPresets).filter(e=>!A?.allowedExecs||A.allowedExecs.includes(e.exec)),{toast:B}=(0,C.useToast)(),{t:R}=(0,P.useTranslation)(),_=(0,m.useCreateTask)(),H=(0,m.useUpdateTask)(),U=(0,m.useSetTaskExec)(),O=(0,m.useSpawn)(),G=(0,m.usePlanTask)(),[K,W]=(0,a.useState)("single"),{data:V}=(0,x.useProjects)(),[Y,q]=(0,a.useState)(void 0),X=Y??V?.[0]?.id,[J,Q]=(0,a.useState)(e?.title??""),[Z,ee]=(0,a.useState)(e?.description??""),[et,ea]=(0,a.useState)(e?.type??"task"),[es,el]=(0,a.useState)(e?.priority??"P2"),[en,er]=(0,a.useState)(e?(0,p.taskExec)(e.labels):""),[ei,eo]=(0,a.useState)(L(e?.scheduled_at)||L(F)),[ed,ec]=(0,a.useState)(!!e?.autostart),[eu,ex]=(0,a.useState)([]),[em,eh]=(0,a.useState)(!1),ep=(0,x.useTasks)(),eg=(ep.data??[]).filter(t=>t.id!==e?.id&&"epic"!==t.type&&"closed"!==t.status&&"cancelled"!==t.status);(0,a.useEffect)(()=>{if(!e)return;let t=!0;return g.orcaClient.taskDeps(e.id).then(e=>{t&&ex(e)}).catch(()=>{}),()=>{t=!1}},[e]);let ef=(()=>{let t=E(ei);if(!t)return;let a=new Date(t).getTime();return(ep.data??[]).find(t=>t.id!==e?.id&&t.scheduled_at&&6e5>Math.abs(new Date(t.scheduled_at).getTime()-a))})(),[eb,ek]=(0,a.useState)(""),[ev,ey]=(0,a.useState)(null),[ej,ew]=(0,a.useState)(null),eN=ev??A?.defaults?.autonomy??"L3",eM=ej??A?.defaults?.maxSessions??1,[eS,eC]=(0,a.useState)(!1),[eT,eP]=(0,a.useState)(!1),[eD,eL]=(0,a.useState)(null),[eE,e$]=(0,a.useState)(null),[eF,ez]=(0,a.useState)(null),eA=(0,x.usePlanJob)(eE),[eI,eB]=(0,a.useState)(!1),[eR,e_]=(0,a.useState)([{title:"",type:"task"}]),eH=G.isPending||null!==eE,eU=_.isPending||H.isPending||O.isPending||U.isPending||eH;async function eO(){if(J.trim())try{if(z)await H.mutateAsync({id:e.id,patch:{title:J.trim(),type:et,priority:es,description:Z.trim(),scheduled_at:E(ei),autostart:+!!ed,deps:eu}}),en!==(0,p.taskExec)(e.labels)&&await U.mutateAsync({id:e.id,exec:en}),B(R.tasks.updated.replace("{id}",e.id));else{let e=await _.mutateAsync({title:J.trim(),type:et,priority:es,description:Z.trim(),scheduled_at:E(ei),autostart:+!!ed,deps:eu,project_id:X});en&&await U.mutateAsync({id:e.id,exec:en}),em&&await O.mutateAsync({taskId:e.id,exec:en||void 0}),B(em?R.tasks.createdAndLaunched.replace("{title}",e.title):R.tasks.created.replace("{title}",e.title))}$()}catch(e){B(String(e),"error")}}async function eG(){if(eb.trim()){ez(null);try{let e=await G.mutateAsync({goal:eb.trim(),exec:eT?void 0:en||void 0,autoModel:eT,autonomy:eN,maxSessions:eM,engage:eS,project_id:X});"jobId"in e?e$(e.jobId):eW(e)}catch(e){e instanceof g.OrcaApiError&&"autopilot_key_missing"===e.code?(eB(!0),B(R.tasks.autopilotKeyMissing,"error")):B(String(e),"error")}}}async function eK(){let e=eR.map(e=>({title:e.title.trim(),type:e.type})).filter(e=>e.title);if(0===e.length)return void B(R.tasks.addAtLeastOnePhase,"error");try{let t=await G.mutateAsync({goal:eb.trim(),phases:e,exec:en||void 0,autonomy:eN,maxSessions:eM,engage:eS,project_id:X});"jobId"in t?e$(t.jobId):eW(t)}catch(e){B(String(e),"error")}}function eW(e){eL({epicId:e.epic.id,phases:e.phases.map(e=>({title:e.title,type:e.type??"task",agent:e.labels?.find(e=>e.startsWith("agent:"))?.slice("agent:".length)})),engaged:!!e.mission}),B(R.tasks.planCreated.replace("{count}",String(e.phases.length)).replace("{m}",e.mission?R.tasks.autopilotStarted:"."))}(0,a.useEffect)(()=>{let e=eA.data;e&&eE&&("done"===e.status?(eL({epicId:e.epicId??"",phases:e.phases,engaged:eS}),B(R.tasks.planCreated.replace("{count}",String(e.phases.length)).replace("{m}",eS?R.tasks.autopilotStarted:".")),e$(null)):"failed"===e.status&&(ez(e.error??R.tasks.planFailed),B(R.tasks.planFailed,"error"),e$(null)))},[eA.data,eE]);let eV=(0,t.jsx)(w.Field,{label:R.tasks.fieldExecutor,children:(0,t.jsxs)(v.Select,{value:en,onChange:e=>er(e.target.value),children:[(0,t.jsx)("option",{value:"",children:R.tasks.defaultExecutor}),I.map(e=>(0,t.jsx)("option",{value:e.exec,children:e.label},e.exec))]})}),eY=z?R.tasks.editTitle.replace("{id}",e.id):R.tasks.newTitle,eq=z?d.Pencil:"planning"===K?l.Sparkles:n.ListChecks;return(0,t.jsx)(f.Modal,{title:eY,description:z?e.id:void 0,onClose:$,size:"xl",icon:eq,children:(0,t.jsxs)(f.ModalBody,{children:[!z&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(N.Segmented,{value:K,onChange:e=>W(e),options:[{value:"single",label:R.tasks.singleTask,icon:n.ListChecks},{value:"planning",label:R.tasks.autopilotPlanning,icon:l.Sparkles}]}),(0,t.jsx)("p",{className:"text-xs text-text-muted",children:"single"===K?R.tasks.singleTaskDesc:R.tasks.autopilotPlanningDesc})]}),!z&&V&&V.length>1&&(0,t.jsx)(w.Field,{label:R.tasks.fieldProject,hint:R.tasks.fieldProjectHint,children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:V.map(e=>{let a=X===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>q(e.id),title:e.path,className:`inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs font-medium transition-colors ${a?"border-accent/50 bg-accent/15 text-accent":"border-border bg-elevated text-text-muted hover:border-border-strong hover:text-text"}`,style:{transitionDuration:"var(--motion-fast)"},children:[(0,t.jsx)(u.FolderGit2,{size:13,className:"shrink-0","aria-hidden":!0}),e.slug]},e.id)})})}),(z||"single"===K)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Field,{label:R.tasks.fieldTitle,children:(0,t.jsx)(k.Input,{value:J,onChange:e=>Q(e.target.value),placeholder:R.tasks.titlePlaceholder,autoFocus:!0})}),(0,t.jsx)(w.Field,{label:R.tasks.fieldDetails,hint:R.tasks.detailsHint,children:(0,t.jsx)("textarea",{value:Z,onChange:e=>ee(e.target.value),placeholder:R.tasks.detailsPlaceholder,rows:4,className:"w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text placeholder:text-text-muted focus:border-accent focus:outline-none"})}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(w.Field,{label:R.tasks.fieldType,children:(0,t.jsx)(v.Select,{value:et,onChange:e=>ea(e.target.value),children:D.TASK_TYPES.map(e=>(0,t.jsx)("option",{value:e,children:(0,D.taskTypeLabel)(R,e)},e))})}),(0,t.jsx)(w.Field,{label:R.tasks.fieldPriority,children:(0,t.jsx)(v.Select,{value:es,onChange:e=>el(e.target.value),children:D.PRIORITIES.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[eV,(0,t.jsx)(w.Field,{label:R.tasks.fieldSchedule,hint:R.tasks.scheduleHint,children:(0,t.jsx)(k.Input,{type:"datetime-local",value:ei,onChange:e=>eo(e.target.value)})})]}),ef&&(0,t.jsxs)("p",{className:"-mt-2 flex items-center gap-1.5 text-xs text-warning",children:[(0,t.jsx)(o.AlertTriangle,{size:13,"aria-hidden":!0}),R.tasks.scheduleConflict.replace("{title}",ef.title)]}),ei&&(0,t.jsxs)("button",{type:"button",onClick:()=>ec(e=>!e),className:"-mt-1 flex w-fit items-start gap-2 text-left text-sm text-text",children:[(0,t.jsx)(y.Checkbox,{checked:ed,className:"mt-0.5"}),(0,t.jsxs)("span",{children:[R.tasks.autostart,(0,t.jsx)("span",{className:"mt-0.5 block text-xs text-text-muted",children:R.tasks.autostartHint})]})]}),eg.length>0&&(0,t.jsx)(w.Field,{label:R.tasks.fieldDependsOn,hint:R.tasks.dependsOnHint,children:(0,t.jsx)("div",{className:"max-h-32 overflow-y-auto rounded-md border border-border bg-surface p-1",children:eg.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{let t;return t=e.id,ex(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"flex w-full cursor-pointer items-center gap-2 rounded px-2 py-1 text-left text-sm hover:bg-elevated",children:[(0,t.jsx)(y.Checkbox,{checked:eu.includes(e.id)}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-text",children:e.title}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-text-muted",children:e.id})]},e.id))})}),!z&&(0,t.jsxs)("button",{type:"button",onClick:()=>eh(e=>!e),className:"flex w-fit items-center gap-2 text-sm text-text",children:[(0,t.jsx)(y.Checkbox,{checked:em}),R.tasks.launchImmediately]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-1",children:[(0,t.jsx)(b.Button,{variant:"ghost",onClick:$,children:R.common.cancel}),(0,t.jsx)(b.Button,{variant:"accent",icon:z?void 0:em?s.Play:void 0,disabled:eU||!J.trim(),onClick:eO,children:z?R.common.save:em?R.tasks.createAndLaunch:R.tasks.create})]})]}),!z&&"planning"===K&&!eD&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Field,{label:R.tasks.fieldGoal,hint:R.tasks.goalHint,children:(0,t.jsx)("textarea",{value:eb,onChange:e=>ek(e.target.value),placeholder:R.tasks.goalPlaceholder,rows:4,className:"w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text placeholder:text-text-muted focus:border-accent focus:outline-none"})}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(w.Field,{label:R.tasks.fieldAutonomy,children:(0,t.jsx)(v.Select,{value:eN,onChange:e=>ey(e.target.value),children:["L0","L1","L2","L3"].map(e=>(0,t.jsx)("option",{value:e,children:e},e))})}),(0,t.jsx)(w.Field,{label:R.tasks.fieldMaxSessions,children:(0,t.jsx)(k.Input,{type:"number",min:1,value:eM,onChange:e=>ew(Number(e.target.value))})})]}),(0,t.jsx)(w.Field,{label:R.tasks.autoModelLabel,hint:R.tasks.autoModelHint,children:(0,t.jsx)(j.Toggle,{checked:eT,onChange:eP,label:R.tasks.autoModelLabel})}),!eT&&eV,(0,t.jsxs)("button",{type:"button",onClick:()=>eC(e=>!e),className:"flex w-fit items-center gap-2 text-sm text-text",children:[(0,t.jsx)(y.Checkbox,{checked:eS}),R.tasks.startAutopilot]}),eI&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 rounded-md border border-border bg-elevated/40 p-3",children:[(0,t.jsx)("span",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:R.tasks.manualPhases}),eR.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(k.Input,{value:e.title,placeholder:R.tasks.phasePlaceholder.replace("{n}",String(a+1)),onChange:e=>e_(t=>t.map((t,s)=>s===a?{...t,title:e.target.value}:t))}),(0,t.jsx)(v.Select,{value:e.type,onChange:e=>e_(t=>t.map((t,s)=>s===a?{...t,type:e.target.value}:t)),className:"w-32",children:D.TASK_TYPES.filter(e=>"epic"!==e).map(e=>(0,t.jsx)("option",{value:e,children:(0,D.taskTypeLabel)(R,e)},e))}),(0,t.jsx)(M.IconButton,{icon:i.X,label:R.tasks.removePhase,onClick:()=>e_(e=>e.length>1?e.filter((e,t)=>t!==a):e)})]},a)),(0,t.jsxs)("button",{type:"button",onClick:()=>e_(e=>[...e,{title:"",type:"task"}]),className:"inline-flex items-center gap-1 self-start text-xs text-accent hover:underline",children:[(0,t.jsx)(r.Plus,{size:13,"aria-hidden":!0})," ",R.tasks.addPhase]})]}),eH&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-elevated/40 px-3 py-2.5 text-sm text-text-muted",children:[(0,t.jsx)(c.Loader2,{size:15,className:"shrink-0 animate-spin text-accent","aria-hidden":!0}),R.tasks.planning]}),eA.data?.sessionName&&(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:R.tasks.plannerPreview}),(0,t.jsx)(T.LiveTail,{name:eA.data.sessionName,lines:16,heightClass:"max-h-56"})]})]}),eF&&!eH&&(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-warning/40 bg-warning/10 px-3 py-2.5 text-sm text-warning",children:[(0,t.jsx)(o.AlertTriangle,{size:15,className:"mt-0.5 shrink-0","aria-hidden":!0}),(0,t.jsxs)("span",{className:"min-w-0 break-words",children:[R.tasks.planFailed,": ",eF]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-1",children:[(0,t.jsx)(b.Button,{variant:"ghost",onClick:$,children:R.common.cancel}),eI?(0,t.jsx)(b.Button,{variant:"accent",disabled:eU,onClick:eK,children:R.tasks.createPlan}):(0,t.jsx)(b.Button,{variant:"accent",icon:l.Sparkles,disabled:eU||!eb.trim(),onClick:eG,children:eH?R.tasks.planning:R.tasks.generatePlan})]})]}),eD&&(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)("p",{className:"text-sm text-text-muted",children:R.tasks.createdEpic.replace("{id}",eD.epicId).replace("{count}",String(eD.phases.length)).replace("{m}",eD.engaged?R.tasks.autopilotEngaged:".")}),(0,t.jsx)("ul",{className:"flex flex-col divide-y divide-border rounded-md border border-border",children:eD.phases.map((e,a)=>{let s=(0,D.taskTypeMeta)(e.type).icon;return(0,t.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2 text-sm",children:[(0,t.jsx)("span",{className:"w-4 shrink-0 font-mono text-xs text-text-muted",children:a+1}),(0,t.jsx)(s,{size:15,className:"shrink-0 text-text-muted","aria-hidden":!0}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-text",children:e.title}),e.agent?(0,t.jsx)(S.Badge,{tone:"accent",children:e.agent}):null]},a)})}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(b.Button,{variant:"accent",onClick:$,children:R.tasks.done})})]})]})})}])},22915,e=>{"use strict";let t=(0,e.i(75254).default)("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);e.s(["Archive",0,t],22915)},53992,e=>{"use strict";var t=e.i(43476),a=e.i(90272),s=e.i(51981);e.i(69530);var l=e.i(2942);e.s(["ProjectFilterPills",0,function({value:e,onChange:n}){let{data:r}=(0,s.useProjects)(),{t:i}=(0,l.useTranslation)();if(!r||r.length<2)return null;let o=e=>`inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs font-medium transition-colors ${e?"border-accent/50 bg-accent/15 text-accent":"border-border bg-elevated text-text-muted hover:border-border-strong hover:text-text"}`;return(0,t.jsxs)("div",{role:"group","aria-label":i.tasks.filterProjectsAria,className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsxs)("button",{type:"button","aria-pressed":"all"===e,onClick:()=>n("all"),className:o("all"===e),style:{transitionDuration:"var(--motion-fast)"},children:[(0,t.jsx)(a.FolderGit2,{size:13,className:"shrink-0","aria-hidden":!0}),i.tasks.filterAllProjects]}),r.map(s=>(0,t.jsxs)("button",{type:"button","aria-pressed":e===s.id,onClick:()=>n(s.id),title:s.path,className:o(e===s.id),style:{transitionDuration:"var(--motion-fast)"},children:[(0,t.jsx)(a.FolderGit2,{size:13,className:"shrink-0","aria-hidden":!0}),s.slug]},s.id))]})}])},11476,e=>{"use strict";var t=e.i(40310),a=e.i(51981);let s=e=>"all"===e||/^\d+$/.test(e);e.s(["useProjectFilter",0,function(e){let l=(0,a.useProjects)(),[n,r]=(0,t.usePersistentState)(e,"all",s),i="all"===n?"all":Number(n);return{selectedProject:"all"===i||l.data&&!l.data.some(e=>e.id===i)?"all":i,setProject:e=>r("all"===e?"all":String(e))}}])}]);