@chorus-aidlc/chorus 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +319 -319
  3. package/.next/standalone/.next/app-path-routes-manifest.json +40 -40
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +36 -36
  6. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +1 -1
  7. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js +1 -1
  9. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js +1 -1
  11. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +2 -2
  13. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
  14. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +1 -1
  16. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +2 -2
  18. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/[ideaUuid]/page.js +1 -1
  20. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/[ideaUuid]/page.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/[ideaUuid]/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/page.js +1 -1
  23. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/page.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
  26. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +1 -1
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +2 -2
  39. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +2 -2
  41. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  45. package/.next/standalone/.next/server/app/_not-found.rsc +6 -6
  46. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/admin/companies/new.html +1 -1
  49. package/.next/standalone/.next/server/app/admin/companies/new.rsc +6 -6
  50. package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/.next/server/app/admin/companies.html +1 -1
  52. package/.next/standalone/.next/server/app/admin/companies.rsc +6 -6
  53. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/admin.html +1 -1
  55. package/.next/standalone/.next/server/app/admin.rsc +6 -6
  56. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  60. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/api/auth/refresh/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
  76. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/api/documents/[uuid]/route.js +1 -1
  78. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  86. package/.next/standalone/.next/server/app/api/mcp/route.js +3 -3
  87. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
  89. package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
  90. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  91. package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
  92. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  93. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  95. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  96. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  98. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  103. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
  104. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
  105. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route.js +1 -1
  107. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  109. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  111. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route.js +1 -1
  112. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route.js +1 -1
  114. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route.js +1 -1
  116. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  117. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route.js +1 -1
  119. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route.js +1 -1
  124. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  125. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route.js +1 -1
  126. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route.js +1 -1
  128. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  129. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route.js +1 -1
  130. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  131. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route.js +1 -1
  132. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  133. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  135. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  136. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  138. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  139. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  140. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/index.html +1 -1
  142. package/.next/standalone/.next/server/app/index.rsc +6 -6
  143. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  144. package/.next/standalone/.next/server/app/login/admin.html +1 -1
  145. package/.next/standalone/.next/server/app/login/admin.rsc +6 -6
  146. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/login/callback.html +1 -1
  148. package/.next/standalone/.next/server/app/login/callback.rsc +6 -6
  149. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  151. package/.next/standalone/.next/server/app/login/pick-workspace.html +1 -1
  152. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +6 -6
  153. package/.next/standalone/.next/server/app/login/silent-refresh/page_client-reference-manifest.js +1 -1
  154. package/.next/standalone/.next/server/app/login/silent-refresh.html +1 -1
  155. package/.next/standalone/.next/server/app/login/silent-refresh.rsc +6 -6
  156. package/.next/standalone/.next/server/app/login.html +1 -1
  157. package/.next/standalone/.next/server/app/login.rsc +6 -6
  158. package/.next/standalone/.next/server/app/onboarding/page.js +4 -3
  159. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  160. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  161. package/.next/standalone/.next/server/app/onboarding.html +1 -1
  162. package/.next/standalone/.next/server/app/onboarding.rsc +7 -7
  163. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  164. package/.next/standalone/.next/server/app/projects.html +1 -1
  165. package/.next/standalone/.next/server/app/projects.rsc +7 -7
  166. package/.next/standalone/.next/server/app/settings.html +1 -1
  167. package/.next/standalone/.next/server/app/settings.rsc +8 -8
  168. package/.next/standalone/.next/server/app-paths-manifest.json +40 -40
  169. package/.next/standalone/.next/server/chunks/1002.js +1 -1
  170. package/.next/standalone/.next/server/chunks/1596.js +2 -2
  171. package/.next/standalone/.next/server/chunks/1673.js +1 -0
  172. package/.next/standalone/.next/server/chunks/1871.js +1 -1
  173. package/.next/standalone/.next/server/chunks/2570.js +1 -1
  174. package/.next/standalone/.next/server/chunks/2618.js +1 -1
  175. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  176. package/.next/standalone/.next/server/chunks/{2675.js → 3139.js} +1 -1
  177. package/.next/standalone/.next/server/chunks/3405.js +1 -0
  178. package/.next/standalone/.next/server/chunks/4294.js +1 -0
  179. package/.next/standalone/.next/server/chunks/{8251.js → 5044.js} +1 -1
  180. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  181. package/.next/standalone/.next/server/chunks/6207.js +1 -1
  182. package/.next/standalone/.next/server/chunks/6836.js +1 -0
  183. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  184. package/.next/standalone/.next/server/chunks/8322.js +2 -2
  185. package/.next/standalone/.next/server/chunks/8881.js +1 -1
  186. package/.next/standalone/.next/server/chunks/920.js +1 -1
  187. package/.next/standalone/.next/server/chunks/937.js +2 -2
  188. package/.next/standalone/.next/server/chunks/9508.js +2 -2
  189. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  190. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  191. package/.next/standalone/.next/server/next-font-manifest.js +1 -1
  192. package/.next/standalone/.next/server/next-font-manifest.json +1 -1
  193. package/.next/standalone/.next/server/pages/404.html +1 -1
  194. package/.next/standalone/.next/server/pages/500.html +1 -1
  195. package/.next/standalone/.next/server/pages-manifest.json +1 -1
  196. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  197. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  198. package/.next/standalone/.next/static/chunks/10739-a14d0dc7271f247e.js +1 -0
  199. package/.next/standalone/.next/static/chunks/19126-f1bc396538752bce.js +1 -0
  200. package/.next/standalone/.next/static/chunks/{53664-a2be2eaacce03f0f.js → 23588-66d80958224a8544.js} +1 -1
  201. package/.next/standalone/.next/static/chunks/32190-a110356fb68a4333.js +1 -0
  202. package/.next/standalone/.next/static/chunks/{4860.d626399834b496e5.js → 4860.15c9ae5b6268c6fc.js} +1 -1
  203. package/.next/standalone/.next/static/chunks/65371-d3686d82abca6495.js +1 -0
  204. package/.next/standalone/.next/static/chunks/70317-49653c6dce23f1d9.js +1 -0
  205. package/.next/standalone/.next/static/chunks/8731-7869a6ed671c63a3.js +1 -0
  206. package/.next/standalone/.next/static/chunks/{99373.aedaca88297c6d8b.js → 99373.9939e11f5b4e0615.js} +1 -1
  207. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-719f0815a37f19be.js +1 -0
  208. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-bc8c3c0362de377c.js +1 -0
  209. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-c1c4b5798c494341.js +1 -0
  210. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-29ac4172940780e0.js +1 -0
  211. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/ideas/[ideaUuid]/{page-2d820769aa7bcaf6.js → page-e59232665c3a0412.js} +1 -1
  212. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/ideas/{page-dec0e71221d77928.js → page-9b1e02b5e2cfb410.js} +1 -1
  213. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-567e98e9e90a7ef1.js +1 -0
  214. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/{page-bc66567cb9c40bf0.js → page-31f4ffd9778a39ed.js} +1 -1
  215. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/{page-86cfeb421fa97830.js → page-8eded17e1e44522d.js} +1 -1
  216. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-7fe70579023330da.js → page-e5c99f2020b904f5.js} +1 -1
  217. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-8c51993bb3866a55.js → page-7947010e9684fbcf.js} +1 -1
  218. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-a01b45dbe80aeecf.js +1 -0
  219. package/.next/standalone/.next/static/chunks/app/{layout-22f1a931323bbb60.js → layout-482dee7dace72c88.js} +1 -1
  220. package/.next/standalone/.next/static/chunks/app/onboarding/page-ac0593c045c64013.js +1 -0
  221. package/.next/standalone/.next/static/chunks/{webpack-da41e6b9f3fe2f48.js → webpack-1bb984dd0934fa96.js} +1 -1
  222. package/.next/standalone/.next/static/css/84edd78de243cde6.css +1 -0
  223. package/.next/standalone/.next/static/css/{ca9796ac54f96058.css → a577d38ad6d7491b.css} +1 -1
  224. package/.next/standalone/.next/static/media/0f1bdadaf30e2d5f-s.woff2 +0 -0
  225. package/.next/standalone/.next/static/media/22a5144ee8d83bca-s.p.woff2 +0 -0
  226. package/.next/standalone/.next/static/media/2c34d62a75506231-s.woff2 +0 -0
  227. package/.next/standalone/.next/static/media/601f5c280d60caca-s.woff2 +0 -0
  228. package/.next/standalone/.next/static/media/9766a7e9e2e0ad5a-s.woff2 +0 -0
  229. package/.next/standalone/.next/static/media/a115172161b307bb-s.woff2 +0 -0
  230. package/.next/standalone/.next/static/media/aa016aab0e6d1295-s.woff2 +0 -0
  231. package/.next/standalone/.next/static/media/b66cf8e69499582a-s.woff2 +0 -0
  232. package/.next/standalone/.next/static/media/d100b2a099e34044-s.woff2 +0 -0
  233. package/.next/standalone/.next/static/media/f5271587012faf78-s.p.woff2 +0 -0
  234. package/.next/standalone/.next/static/media/f639721981034f88-s.woff2 +0 -0
  235. package/.next/standalone/package.json +1 -1
  236. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +7 -1
  237. package/.next/standalone/public/chorus-plugin/agents/proposal-reviewer.md +1 -1
  238. package/.next/standalone/public/chorus-plugin/agents/task-reviewer.md +1 -1
  239. package/.next/standalone/public/chorus-plugin/bin/on-post-verify-task.sh +190 -0
  240. package/.next/standalone/public/chorus-plugin/bin/on-session-start.sh +58 -0
  241. package/.next/standalone/public/chorus-plugin/bin/test-syntax.sh +1 -0
  242. package/.next/standalone/public/chorus-plugin/bin/tests/test-on-post-verify-task.sh +365 -0
  243. package/.next/standalone/public/chorus-plugin/hooks/hooks.json +9 -0
  244. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +2 -1
  245. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +9 -1
  246. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +1 -1
  247. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +436 -0
  248. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +11 -1
  249. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
  250. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
  251. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +26 -4
  252. package/.next/standalone/public/install-opencode.sh +284 -0
  253. package/README.md +44 -10
  254. package/README.zh.md +24 -10
  255. package/chorus.mjs +56 -12
  256. package/package.json +1 -1
  257. package/.next/standalone/.next/server/chunks/1639.js +0 -1
  258. package/.next/standalone/.next/server/chunks/3300.js +0 -1
  259. package/.next/standalone/.next/server/chunks/8584.js +0 -1
  260. package/.next/standalone/.next/server/chunks/9051.js +0 -1
  261. package/.next/standalone/.next/static/chunks/10739-5c185aa0432f5d56.js +0 -1
  262. package/.next/standalone/.next/static/chunks/19126-858a24cab6fd338a.js +0 -1
  263. package/.next/standalone/.next/static/chunks/29445-04c4ab36da85b7da.js +0 -1
  264. package/.next/standalone/.next/static/chunks/39611-cc227784ed679a6d.js +0 -1
  265. package/.next/standalone/.next/static/chunks/96919-8cbf6310c703e7af.js +0 -1
  266. package/.next/standalone/.next/static/chunks/99513-24849ff68a8098e1.js +0 -1
  267. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-acddb9c84f5d1607.js +0 -1
  268. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-b4c6141dd26cc506.js +0 -1
  269. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-4bf7bff8d68509f9.js +0 -1
  270. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-37a0cea0ba40c31b.js +0 -1
  271. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-355321010dd82e56.js +0 -1
  272. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-8db25385236a9bbf.js +0 -1
  273. package/.next/standalone/.next/static/chunks/app/onboarding/page-e9409a2935c3c480.js +0 -1
  274. package/.next/standalone/.next/static/css/de70bee13400563f.css +0 -1
  275. package/.next/standalone/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
  276. package/.next/standalone/.next/static/media/747892c23ea88013-s.woff2 +0 -0
  277. package/.next/standalone/.next/static/media/8d697b304b401681-s.woff2 +0 -0
  278. package/.next/standalone/.next/static/media/93f479601ee12b01-s.p.woff2 +0 -0
  279. package/.next/standalone/.next/static/media/9610d9e46709d722-s.woff2 +0 -0
  280. package/.next/standalone/.next/static/media/ba015fad6dcf6784-s.woff2 +0 -0
  281. /package/.next/standalone/.next/static/{CQcM9hNpa5m8P_K5qveuk → CqUAJ6h-gVfCxU6FvVekP}/_buildManifest.js +0 -0
  282. /package/.next/standalone/.next/static/{CQcM9hNpa5m8P_K5qveuk → CqUAJ6h-gVfCxU6FvVekP}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[10739],{2774:(e,t,s)=>{"use strict";s.d(t,{TaskViewToggle:()=>el});var a=s(90508),r=s(1856),n=s(23675),i=s(39268),o=s(83064),l=s(18789),d=s(76111),c=s(5616),u=s(22922),p=s(57731),x=s(48416),m=s(62205),g=s(81531),f=s(56770),h=s(66206);let v=(0,h.A)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var b=s(60532),j=s(9160),y=s(24377),w=s(17001),C=s(4365);function N(e){let{projectUuid:t}=e,s=(0,i.c)("tasks"),o=(0,n.useRouter)(),l=(0,n.usePathname)(),d=(0,n.useSearchParams)(),[c,x]=(0,r.useState)(!1),[m,g]=(0,r.useState)([]),[h,N]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{let e=d.get("proposalUuids");e?N(new Set(e.split(",").filter(Boolean))):N(new Set)},[d]),(0,r.useEffect)(()=>{let e=!1;return async function(){try{let s=await fetch("/api/projects/".concat(t,"/proposals/summary"));if(!s.ok)return;let a=await s.json();!e&&a.success&&g(a.data)}catch(e){}}(),()=>{e=!0}},[t]);let k=(0,r.useCallback)(e=>{let t=new URLSearchParams(d.toString());e.size>0?t.set("proposalUuids",Array.from(e).join(",")):t.delete("proposalUuids");let s=t.toString();o.replace("".concat(l).concat(s?"?".concat(s):""),{scroll:!1})},[o,l,d]),A=(0,r.useCallback)(e=>{N(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),k(s),s})},[k]),F=(0,r.useCallback)(()=>{N(new Set),k(new Set)},[k]),E=h.size>0;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground shrink-0",children:[(0,a.jsx)(f.A,{className:"size-4"}),(0,a.jsxs)("span",{children:[s("proposalFilter.label"),":"]})]}),(0,a.jsxs)(w.AM,{open:c,onOpenChange:x,children:[(0,a.jsx)(w.Wv,{asChild:!0,children:(0,a.jsxs)(u.$,{variant:"outline",size:"sm",role:"combobox","aria-expanded":c,className:(0,y.cn)("justify-between gap-1 min-w-[120px] max-w-[200px] md:min-w-[160px] md:max-w-none",E&&"border-[#C67A52] bg-[#FFF8F4]"),children:[(0,a.jsx)("span",{className:"truncate",children:E?s("proposalFilter.filtered",{filtered:h.size,total:m.length}):s("proposalFilter.allProposals")}),(0,a.jsx)(v,{className:"size-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(w.hl,{className:"w-[300px] p-0",align:"start",children:(0,a.jsxs)(C.uB,{children:[(0,a.jsx)(C.G7,{placeholder:s("proposalFilter.search")}),(0,a.jsxs)(C.oI,{children:[(0,a.jsx)(C.xL,{children:s("proposalFilter.noResults")}),(0,a.jsx)(C.L$,{children:m.map(e=>{let t=h.has(e.uuid);return(0,a.jsxs)(C.h_,{value:e.title,onSelect:()=>A(e.uuid),className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:(0,y.cn)("flex size-4 shrink-0 items-center justify-center rounded-sm border",t?"border-[#C67A52] bg-[#C67A52] text-white":"border-muted-foreground/30"),children:t&&(0,a.jsx)(b.A,{className:"size-3"})}),(0,a.jsx)("span",{className:"truncate",children:e.title})]}),(0,a.jsx)(p.E,{variant:"secondary",className:"ml-2 shrink-0",children:s("proposalFilter.taskCount",{count:e.taskCount})})]},e.uuid)})})]})]})})]}),E&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-wrap gap-1 max-w-full",children:m.filter(e=>h.has(e.uuid)).map(e=>(0,a.jsxs)(p.E,{variant:"outline",className:"gap-1 border-[#C67A52] bg-[#FFF8F4] text-[#C67A52]",children:[e.title,(0,a.jsx)("button",{type:"button",className:"ml-0.5 rounded-full hover:bg-[#C67A52]/20",onClick:()=>A(e.uuid),children:(0,a.jsx)(j.A,{className:"size-3"})})]},e.uuid))}),(0,a.jsx)(u.$,{variant:"ghost",size:"xs",onClick:F,className:"text-muted-foreground",children:s("proposalFilter.clear")})]})]})}var k=s(1976),A=s(96213);let F=(0,h.A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var E=s(17475);let B=(0,h.A)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var z=s(43827);let P=(0,r.createContext)(null);var S=s(95725),_=s(66506);let D=e=>!e.isLayoutDirty&&e.willUpdate(!1),R=e=>{let{children:t,id:s,inherit:n=!0}=e,i=(0,r.useContext)(z.L),o=(0,r.useContext)(P),[l,d]=function(){let e=function(){let e=(0,r.useRef)(!1);return(0,_.E)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}(),[t,s]=(0,r.useState)(0),a=(0,r.useCallback)(()=>{e.current&&s(t+1)},[t]);return[(0,r.useCallback)(()=>S.Gt.postRender(a),[a]),t]}(),c=(0,r.useRef)(null),u=i.id||o;null===c.current&&((e=>!0==(!0===e)||"id"===e)(n)&&u&&(s=s?u+"-"+s:u),c.current={id:s,group:!0===n&&i.group||function(){let e=new Set,t=new WeakMap,s=()=>e.forEach(D);return{add:a=>{e.add(a),t.set(a,a.addEventListener("willUpdate",s))},remove:a=>{e.delete(a);let r=t.get(a);r&&(r(),t.delete(a)),s()},dirty:s}}()});let p=(0,r.useMemo)(()=>({...c.current,forceRender:l}),[d]);return(0,a.jsx)(z.L.Provider,{value:p,children:t})};var U=s(16544),O=s(65626),T=s(97438),L=s(52217);let M=(0,L.createServerReference)("40a50a4ce8ce883e434897e548cbdd26cece6b4ceb",L.callServer,void 0,L.findSourceMapURL,"fetchTasksAction"),I=(0,L.createServerReference)("70152b61cb748897846229118842ce0c46b96a1abd",L.callServer,void 0,L.findSourceMapURL,"moveTaskToColumnAction"),K=(0,L.createServerReference)("60d44249373e6041564928a949b8c57ede4676f603",L.callServer,void 0,L.findSourceMapURL,"forceMoveTaskToColumnAction");var V=s(67712),$=s(78278),q=s(18543),G=s(63964);let W={open:"bg-[#FFF3E0] text-[#E65100]",assigned:"bg-[#E3F2FD] text-[#1976D2]",in_progress:"bg-[#E8F5E9] text-[#5A9E6F]",to_verify:"bg-[#F3E5F5] text-[#7B1FA2]",done:"bg-[#E0F2F1] text-[#00796B]",closed:"bg-[#F5F5F5] text-[#9A9A9A]"},Z={open:"open",assigned:"assigned",in_progress:"inProgress",to_verify:"toVerify",done:"done",closed:"closed"},H={in_progress:"bg-[#FFF3E0] text-[#E65100]",assigned:"bg-[#E8F5E9] text-[#2E7D32]",open:"bg-[#F5F5F5] text-[#6B6B6B]",to_verify:"bg-[#E3F2FD] text-[#1565C0]"},Y=[{id:"todo",labelKey:"todo",statuses:["open","assigned"]},{id:"in_progress",labelKey:"inProgress",statuses:["in_progress"]},{id:"to_verify",labelKey:"toVerify",statuses:["to_verify"]},{id:"done",labelKey:"done",statuses:["done","closed"]}];function J(e){let{projectUuid:t,initialTasks:s,currentUserUuid:n,selectedTaskUuid:o,onTaskSelect:l,onPanelClose:d,proposalUuidFilter:c}=e,m=(0,i.c)(),[g,f]=(0,r.useState)(s),[h,v]=(0,r.useState)({}),[b,j]=(0,r.useState)(!1),[y,w]=(0,r.useState)(null),[C,N]=(0,r.useState)([]),[z,P]=(0,r.useState)(!1),[S,_]=(0,r.useState)([]),[D,L]=(0,r.useState)(!1),[J,Q]=(0,r.useState)(!1),X=(0,r.useCallback)(async()=>{let e=await M(t);if(e.success){let t=c?e.data.filter(e=>e.proposalUuid&&c.has(e.proposalUuid)):e.data;f(t);let s=await (0,q.h)(t.map(e=>e.uuid));s.success&&s.data&&v(s.data)}},[t,c]);(0,G.eV)("task",X);let ee=(0,r.useRef)(c);(0,r.useEffect)(()=>{ee.current!==c&&(ee.current=c,X())},[c,X]),(0,r.useEffect)(()=>{0!==s.length&&(0,q.h)(s.map(e=>e.uuid)).then(e=>{e.success&&e.data&&v(e.data)})},[s]);let et=(0,r.useMemo)(()=>{var e;return o&&null!=(e=g.find(e=>e.uuid===o))?e:null},[o,g]),es=e=>g.filter(t=>e.includes(t.status)),ea=e=>es(e).reduce((e,t)=>e+(t.storyPoints||0),0),er=async e=>{let s;Q(!1);let{destination:a,source:r,draggableId:n}=e;if(!a||a.droppableId===r.droppableId&&a.index===r.index)return;let i=a.droppableId;r.droppableId;let o=g.find(e=>e.uuid===n);if(!o)return;if(Y.find(e=>e.id===i),"todo"===i)s="assigned"===o.status?"assigned":"open";else if("in_progress"===i)s="in_progress";else if("to_verify"===i)s="to_verify";else{if("done"!==i)return;s="to_verify"===o.status?"done":"to_verify"}f(e=>e.map(e=>e.uuid===n?{...e,status:s}:e));let l=await I(n,i,t);if(l.success)X();else{if("blocked"in l&&l.blocked&&"blockers"in l){f(e=>e.map(e=>e.uuid===n?{...e,status:o.status}:e)),w(o),N(l.blockers),j(!0);return}f(e=>e.map(e=>e.uuid===n?{...e,status:o.status}:e)),"gateBlocked"in l&&l.gateBlocked&&(_("unresolvedCriteria"in l&&Array.isArray(l.unresolvedCriteria)?l.unresolvedCriteria:[]),P(!0))}},en=async()=>{if(y){L(!0);try{let e=await K(y.uuid,"in_progress");e.success?(j(!1),w(null),N([]),X()):V.q.error("Failed to force move task:",e.error)}finally{L(!1)}}},ei=()=>{j(!1),w(null),N([])};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k.JY,{onDragStart:()=>{Q(!0)},onDragEnd:er,children:(0,a.jsx)(R,{children:(0,a.jsx)("div",{className:"flex flex-1 gap-4 overflow-x-auto pb-4",children:Y.map(e=>{let t=es(e.statuses);return(0,a.jsxs)("div",{className:"flex w-[300px] flex-shrink-0 flex-col rounded-xl bg-[#F5F2EC] p-4",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-[#2C2C2C]",children:m("status.".concat(e.labelKey))}),(0,a.jsx)("span",{className:"rounded-full bg-white px-2 py-0.5 text-xs font-medium text-[#6B6B6B]",children:t.length})]}),ea(e.statuses)>0&&(0,a.jsxs)("span",{className:"flex items-center gap-1 text-xs text-[#9A9A9A]",children:[(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3 w-3",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),ea(e.statuses),"h"]})]}),(0,a.jsx)(k.gL,{droppableId:e.id,children:(e,s)=>(0,a.jsxs)("div",{ref:e.innerRef,...e.droppableProps,className:"flex-1 space-y-3 overflow-y-auto min-h-[100px] rounded-lg pt-3 pr-3 transition-colors ".concat(s.isDraggingOver?"bg-[#E5E0D8]":""),children:[0!==t.length||s.isDraggingOver?t.map((e,t)=>{let s=!!e.dependsOn&&0!==e.dependsOn.length&&e.dependsOn.some(e=>"done"!==e.status&&"closed"!==e.status),r=(s?!e.dependsOn?[]:e.dependsOn.filter(e=>"done"!==e.status&&"closed"!==e.status):[]).map(e=>e.title).join(", ");return(0,a.jsx)(k.sx,{draggableId:e.uuid,index:t,children:(t,n)=>(0,a.jsx)("div",{ref:t.innerRef,...t.draggableProps,...t.dragHandleProps,onClick:()=>{n.isDragging||l(e.uuid)},style:t.draggableProps.style,children:(0,a.jsxs)(U.P.div,{className:"relative",layoutId:J?void 0:"task-card-".concat(e.uuid),transition:O.Yv.spring,children:[h[e.uuid]>0&&(0,a.jsx)("div",{className:"absolute -top-3 -right-3 z-10 flex h-11 w-11 items-center justify-center rounded-full border-2 border-green-400 bg-white shadow-sm",children:(0,a.jsx)("img",{src:"/typing-animation.gif",alt:"",className:"h-8 w-8"})}),(0,a.jsx)(A.D,{entityType:"task",entityUuid:e.uuid,children:(0,a.jsxs)(x.Zp,{className:"cursor-pointer p-4 transition-all ".concat(s?"border-dashed border-[#D1D1D1] opacity-60":"border-[#E5E0D8] hover:border-[#C67A52]"," bg-white hover:shadow-sm ").concat(n.isDragging?"shadow-lg rotate-2":""),children:[(0,a.jsxs)("div",{className:"mb-2 flex items-start justify-between",children:[(0,a.jsx)(p.E,{className:W[e.status]||"",children:m("status.".concat(Z[e.status]||e.status))}),(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:e.storyPoints&&(0,a.jsxs)("span",{className:"flex items-center gap-1 rounded bg-[#FFF3E0] px-2 py-0.5 text-xs font-medium text-[#E65100]",children:[(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3 w-3",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),e.storyPoints,"h"]})})]}),(0,a.jsx)("h4",{className:"mb-1 font-medium text-[#2C2C2C]",children:e.title}),e.description&&(0,a.jsx)("p",{className:"mb-2 line-clamp-2 text-sm text-[#6B6B6B]",children:e.description}),s&&(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 rounded-md bg-[#FFF3E0] px-2 py-1",children:[(0,a.jsx)(F,{className:"h-3 w-3 shrink-0 text-[#E65100]"}),(0,a.jsx)("span",{className:"text-[9px] font-medium leading-tight text-[#E65100] line-clamp-1",children:m("tasks.blockedBy",{tasks:r})})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between text-xs text-[#9A9A9A]",children:[e.assignee?(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3 w-3",children:[(0,a.jsx)("path",{d:"M12 8V4H8"}),(0,a.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"})]}),e.assignee.name]}):"open"===e.status?(0,a.jsx)("span",{className:"text-[#C67A52]",children:m("common.assign")}):(0,a.jsx)("span",{children:m("common.unassigned")}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[h[e.uuid]>0&&(0,a.jsxs)(p.E,{variant:"outline",className:"h-4 gap-1 border-green-300 px-1.5 text-[10px] text-green-700",children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-500"}),m("sessions.workerCount",{count:h[e.uuid]})]}),e.acceptanceSummary&&e.acceptanceSummary.total>0&&(()=>{let t=e.acceptanceSummary,s="to_verify"===e.status,r=t.requiredPassed===t.required&&t.required>0,n=t.requiredFailed>0,i="bg-[#F5F2EC] text-[#9A9A9A]";return s&&(i=r?"bg-green-50 text-green-700":n?"bg-red-50 text-[#C4574C]":"bg-amber-50 text-[#D97706]"),(0,a.jsxs)(p.E,{className:"h-4 gap-1 border-0 px-1.5 text-[9px] ".concat(i),children:[(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-2.5 w-2.5",children:[(0,a.jsx)("path",{d:"M9 11l3 3L22 4"}),(0,a.jsx)("path",{d:"M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11"})]}),t.passed,"/",t.total]})})()]})]})]})})]})})},e.uuid)}):(0,a.jsx)("div",{className:"flex h-24 items-center justify-center rounded-lg border-2 border-dashed border-[#E5E0D8] text-sm text-[#9A9A9A]",children:m("tasks.noTasks")}),e.placeholder]})})]},e.id)})})})}),et&&(0,a.jsx)($.v,{task:et,projectUuid:t,currentUserUuid:n,onClose:d}),(0,a.jsx)(T.lG,{open:b,onOpenChange:e=>{e||ei()},children:(0,a.jsxs)(T.Cf,{className:"max-w-md rounded-2xl",children:[(0,a.jsxs)(T.c7,{children:[(0,a.jsxs)(T.L3,{className:"flex items-center gap-2",children:[(0,a.jsx)(E.A,{className:"h-5 w-5 text-[#E65100]"}),m("tasks.dependencyBlocked")]}),(0,a.jsx)(T.rr,{children:m("tasks.dependencyBlockedDescription")})]}),(0,a.jsxs)("div",{className:"rounded-lg bg-[#FAF8F4] p-3",children:[(0,a.jsx)("p",{className:"mb-2 text-xs font-medium text-[#6B6B6B]",children:m("tasks.blockerList")}),(0,a.jsx)("div",{className:"space-y-2",children:C.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-[#E5E0D8] bg-white p-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-[#2C2C2C]",children:e.title}),(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[e.assignee&&(0,a.jsx)("span",{className:"text-xs text-[#6B6B6B]",children:e.assignee.name}),e.sessionCheckin&&(0,a.jsxs)("span",{className:"flex items-center gap-1 text-xs text-[#6B6B6B]",children:[(0,a.jsx)(B,{className:"h-3 w-3"}),e.sessionCheckin.sessionName]})]})]}),(0,a.jsx)(p.E,{className:"shrink-0 ".concat(H[e.status]||"bg-[#F5F5F5] text-[#6B6B6B]"),children:m("status.".concat(Z[e.status]||e.status))})]},e.uuid))})]}),(0,a.jsxs)(T.Es,{className:"gap-2 sm:gap-0",children:[(0,a.jsx)(u.$,{variant:"outline",onClick:ei,children:m("common.cancel")}),(0,a.jsx)(u.$,{className:"bg-[#E65100] hover:bg-[#BF4400] text-white",onClick:en,disabled:D,children:D?m("common.processing"):m("tasks.forceMove")})]})]})}),(0,a.jsx)(T.lG,{open:z,onOpenChange:P,children:(0,a.jsxs)(T.Cf,{className:"max-w-[520px] rounded-2xl p-0 gap-0",children:[(0,a.jsxs)(T.c7,{className:"px-6 pt-6 pb-4",children:[(0,a.jsxs)(T.L3,{className:"flex items-center gap-2.5",children:[(0,a.jsx)(E.A,{className:"h-5 w-5 text-[#C4574C]"}),m("acceptanceCriteria.title")]}),(0,a.jsx)(T.rr,{className:"text-[13px] leading-relaxed text-[#6B6B6B]",children:m("acceptanceCriteria.gateBlocked",{count:S.filter(e=>e.required&&"passed"!==e.status).length})})]}),(0,a.jsxs)("div",{className:"px-6 pb-4 space-y-3",children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold text-[#9A9A9A] uppercase tracking-wide",children:m("acceptanceCriteria.title")}),S.map(e=>(0,a.jsxs)("div",{className:"rounded-lg border p-3 space-y-2 ".concat("failed"===e.status?"border-red-200 bg-white":"border-[#E5E0D8] bg-white"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full shrink-0 ".concat("failed"===e.status?"bg-[#C4574C]":"bg-[#F59E0B]")}),(0,a.jsx)("span",{className:"text-xs font-semibold text-[#2C2C2C]",children:e.description})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pl-4",children:[(0,a.jsx)(p.E,{className:"text-[10px] border-0 ".concat("failed"===e.status?"bg-red-50 text-[#C4574C]":"bg-amber-50 text-[#D97706]"),children:m("acceptanceCriteria.status.".concat(e.status))}),(0,a.jsx)(p.E,{className:"text-[10px] border-0 bg-[#FAF8F4] text-[#9A9A9A]",children:e.required?m("acceptanceCriteria.required"):m("acceptanceCriteria.optional")}),!e.evidence&&(0,a.jsx)("span",{className:"text-[10px] italic text-[#9A9A9A]",children:m("acceptanceCriteria.noEvidence")})]}),e.evidence&&(0,a.jsxs)("div",{className:"rounded-md bg-red-50 p-2 ml-4",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium text-[#9A9A9A]",children:m("acceptanceCriteria.verifyEvidence")}),(0,a.jsx)("p",{className:"text-[11px] text-[#2C2C2C] mt-0.5",children:e.evidence})]})]},e.uuid))]}),(0,a.jsx)(T.Es,{className:"border-t border-[#E5E2DC] px-6 py-4",children:(0,a.jsx)(u.$,{className:"rounded-lg bg-[#C4574C] hover:bg-[#A3433A] text-white",onClick:()=>P(!1),children:m("acceptanceCriteria.dismiss")})})]})})]})}var Q=s(26145);s(33805);var X=s(85226),ee=s(92745);let et=(0,L.createServerReference)("40ff585eecb554f3532597c3783fdee416ae8754c0",L.callServer,void 0,L.findSourceMapURL,"getProjectDependenciesAction");var es=s(32872);function ea(e){let{projectUuid:t,onTaskSelect:s,refreshKey:o}=e,l=(0,i.c)(),d=(0,n.useSearchParams)(),[c,p,x]=(0,Q.ck)([]),[m,g,f]=(0,Q.fM)([]),[h,v]=(0,r.useState)(!0),[b,y]=(0,r.useState)(null),w=(0,r.useMemo)(()=>{let e=d.get("proposalUuids");if(!e)return null;let t=e.split(",").filter(Boolean);return t.length>0?new Set(t):null},[d]),C=(0,r.useCallback)(async()=>{v(!0);let e=await et(t),s=e.nodes,a=e.edges;if(w){let t=new Set((s=e.nodes.filter(e=>null!==e.proposalUuid&&w.has(e.proposalUuid))).map(e=>e.uuid));a=e.edges.filter(e=>t.has(e.from)&&t.has(e.to))}let r=s.map(e=>({id:e.uuid,type:"taskNode",position:{x:0,y:0},data:{title:e.title,status:e.status,priority:e.priority,proposalUuid:e.proposalUuid}})),n=a.map((e,t)=>({id:"e-".concat(t),source:e.to,target:e.from,...ee.qK})),{nodes:i,edges:o}=(0,ee.nF)(r,n);p(i),g(o),v(!1)},[t,w,p,g]);(0,r.useEffect)(()=>{C()},[C,o]);let N=(0,r.useCallback)(async e=>{if(!e.source||!e.target)return;y(null);let t=e.target,s=e.source,a=await (0,es.w)(t,s);if(!a.success)return void y(a.error||l("tasks.failedToAddDep"));await C()},[C]),k=(0,r.useCallback)((e,t)=>{s(t.id)},[s]);return h?(0,a.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,a.jsx)(X.A,{className:"h-6 w-6 animate-spin text-[#9A9A9A]"})}):0===c.length?(0,a.jsx)("div",{className:"flex flex-1 items-center justify-center text-sm text-[#9A9A9A]",children:l("tasks.noTasksToDisplay")}):(0,a.jsxs)("div",{className:"flex-1 rounded-xl border border-[#E5E0D8] bg-[#FAFAF8] relative",children:[b&&(0,a.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-10 rounded-lg bg-red-50 border border-red-200 px-4 py-2 text-xs text-red-700 shadow-sm",children:[b,(0,a.jsx)(u.$,{variant:"ghost",size:"icon",className:"ml-2 h-5 w-5 font-medium hover:text-red-900",onClick:()=>y(null),children:(0,a.jsx)(j.A,{className:"h-3 w-3"})})]}),(0,a.jsxs)(Q.Gc,{nodes:c,edges:m,onNodesChange:x,onEdgesChange:f,onConnect:N,onNodeClick:k,nodeTypes:ee.c_,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:1.5,proOptions:{hideAttribution:!0},children:[(0,a.jsx)(Q.VS,{color:"#E5E0D8",gap:20}),(0,a.jsx)(Q.H2,{className:"[&>button]:border-[#E5E0D8] [&>button]:bg-white [&>button]:text-[#2C2C2C] [&>button:hover]:bg-[#FAF8F4]"})]})]})}let er={open:"bg-[#FFF3E0] text-[#E65100]",assigned:"bg-[#E3F2FD] text-[#1976D2]",in_progress:"bg-[#E8F5E9] text-[#5A9E6F]",to_verify:"bg-[#F3E5F5] text-[#7B1FA2]",done:"bg-[#E0F2F1] text-[#00796B]",closed:"bg-[#F5F5F5] text-[#9A9A9A]"},en={open:"open",assigned:"assigned",in_progress:"inProgress",to_verify:"toVerify",done:"done",closed:"closed"},ei=[{id:"all",labelKey:"allStatuses",statuses:[]},{id:"todo",labelKey:"todo",statuses:["open","assigned"]},{id:"in_progress",labelKey:"inProgress",statuses:["in_progress"]},{id:"to_verify",labelKey:"toVerify",statuses:["to_verify"]},{id:"done",labelKey:"done",statuses:["done","closed"]}],eo={high:"bg-red-100 text-red-700",medium:"bg-yellow-100 text-yellow-700",low:"bg-blue-100 text-blue-700"};function el(e){let{projectUuid:t,initialTasks:s,currentUserUuid:f,initialSelectedTaskUuid:h}=e,v=(0,i.c)(),b=(0,m.a)(),j=(0,n.useSearchParams)(),[y,w]=(0,r.useState)("kanban"),C="/projects/".concat(t,"/tasks"),{selectedId:k,openPanel:A,closePanel:F}=(0,g.T)(C,h),E=(0,r.useMemo)(()=>{let e=j.get("proposalUuids");if(!e)return null;let t=e.split(",").filter(Boolean);return t.length>0?new Set(t):null},[j]);(0,r.useEffect)(()=>{b&&"kanban"===y&&w("list")},[b]);let[B,z]=(0,r.useState)(!1),[P,S]=(0,r.useState)(0),[_,D]=(0,r.useState)("all"),R=(0,r.useMemo)(()=>{var e;return k&&null!=(e=s.find(e=>e.uuid===k))?e:null},[k,s]),O=(0,r.useCallback)(()=>{S(e=>e+1)},[]),T=(0,r.useMemo)(()=>E?s.filter(e=>e.proposalUuid&&E.has(e.proposalUuid)):s,[s,E]),L=(0,r.useMemo)(()=>{let e=ei.find(e=>e.id===_);return e&&0!==e.statuses.length?T.filter(t=>e.statuses.includes(t.status)):T},[T,_]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4 overflow-x-auto",children:(0,a.jsx)(N,{projectUuid:t})}),(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-[#F5F2EC] p-1 w-fit",children:[b&&(0,a.jsxs)(u.$,{variant:"ghost",size:"sm",className:"h-8 gap-1.5 rounded-md px-3 text-xs ".concat("list"===y?"bg-white text-[#2C2C2C] shadow-sm":"text-[#6B6B6B] hover:text-[#2C2C2C]"),onClick:()=>w("list"),children:[(0,a.jsx)(o.A,{className:"h-3.5 w-3.5"}),v("tasks.listView")]}),!b&&(0,a.jsxs)(u.$,{variant:"ghost",size:"sm",className:"h-8 gap-1.5 rounded-md px-3 text-xs ".concat("kanban"===y?"bg-white text-[#2C2C2C] shadow-sm":"text-[#6B6B6B] hover:text-[#2C2C2C]"),onClick:()=>w("kanban"),children:[(0,a.jsx)(l.A,{className:"h-3.5 w-3.5"}),v("tasks.kanbanView")]}),(0,a.jsxs)(u.$,{variant:"ghost",size:"sm",className:"h-8 gap-1.5 rounded-md px-3 text-xs ".concat("dag"===y?"bg-white text-[#2C2C2C] shadow-sm":"text-[#6B6B6B] hover:text-[#2C2C2C]"),onClick:()=>w("dag"),children:[(0,a.jsx)(d.A,{className:"h-3.5 w-3.5"}),v("tasks.dagView")]})]}),(0,a.jsxs)(u.$,{className:"bg-[#C67A52] hover:bg-[#B56A42] text-white",onClick:()=>{F(),z(!0)},children:[(0,a.jsx)(c.A,{className:"mr-2 h-4 w-4"}),v("tasks.newTask")]})]}),"list"===y?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4 flex gap-1 overflow-x-auto border-b border-[#E5E0D8] pb-2",children:ei.map(e=>{let t=0===e.statuses.length?T.length:T.filter(t=>e.statuses.includes(t.status)).length;return(0,a.jsxs)(u.$,{variant:"ghost",size:"sm",className:"h-8 shrink-0 rounded-md px-3 text-xs ".concat(_===e.id?"bg-[#F5F2EC] text-[#2C2C2C] font-medium":"text-[#6B6B6B] hover:text-[#2C2C2C]"),onClick:()=>D(e.id),children:["all"===e.id?v("tasks.".concat(e.labelKey)):v("status.".concat(e.labelKey)),(0,a.jsx)("span",{className:"ml-1.5 rounded-full bg-white px-1.5 py-0.5 text-[10px] font-medium text-[#6B6B6B]",children:t})]},e.id)})}),(0,a.jsx)("div",{className:"flex-1 space-y-2 overflow-y-auto",children:0===L.length?(0,a.jsx)(U.P.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.2,ease:[0,0,.2,1]},className:"flex h-24 items-center justify-center rounded-lg border-2 border-dashed border-[#E5E0D8] text-sm text-[#9A9A9A]",children:v("tasks.noTasks")}):L.map(e=>(0,a.jsxs)(x.Zp,{className:"cursor-pointer border-[#E5E0D8] bg-white p-4 transition-all hover:border-[#C67A52] hover:shadow-sm",onClick:()=>A(e.uuid),children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h4",{className:"font-medium text-[#2C2C2C] truncate",children:e.title}),e.description&&(0,a.jsx)("p",{className:"mt-1 line-clamp-1 text-sm text-[#6B6B6B]",children:e.description})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[null!=e.storyPoints&&e.storyPoints>0&&(0,a.jsxs)("span",{className:"rounded bg-[#FFF3E0] px-2 py-0.5 text-xs font-medium text-[#E65100]",children:[e.storyPoints,"h"]}),(0,a.jsx)(p.E,{className:eo[e.priority]||"",children:v("priority.".concat(e.priority))}),(0,a.jsx)(p.E,{className:er[e.status]||"",children:v("status.".concat(en[e.status]||e.status))})]})]}),e.assignee&&(0,a.jsx)("div",{className:"mt-2 flex items-center gap-1.5 text-xs text-[#9A9A9A]",children:(0,a.jsx)("span",{className:"truncate",children:e.assignee.name})})]},e.uuid))}),R&&(0,a.jsx)($.v,{task:R,projectUuid:t,currentUserUuid:f,onClose:F,onDependencyChange:O})]}):"kanban"===y?(0,a.jsx)(J,{projectUuid:t,initialTasks:T,currentUserUuid:f,selectedTaskUuid:k,onTaskSelect:A,onPanelClose:F,proposalUuidFilter:E}):(0,a.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,a.jsx)(ea,{projectUuid:t,onTaskSelect:e=>A(e),refreshKey:P}),R&&(0,a.jsx)($.v,{task:R,projectUuid:t,currentUserUuid:f,onClose:F,onDependencyChange:O})]}),B&&!R&&(0,a.jsx)($.v,{task:null,projectUuid:t,currentUserUuid:f,onClose:()=>z(!1),onCreated:()=>z(!1)})]})}},4365:(e,t,s)=>{"use strict";s.d(t,{G7:()=>l,L$:()=>u,h_:()=>p,oI:()=>d,uB:()=>o,xL:()=>c});var a=s(90508);s(1856);var r=s(64731),n=s(30044),i=s(24377);function o(e){let{className:t,...s}=e;return(0,a.jsx)(r.uB,{"data-slot":"command",className:(0,i.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...s})}function l(e){let{className:t,...s}=e;return(0,a.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,a.jsx)(n.A,{className:"size-4 shrink-0 opacity-50"}),(0,a.jsx)(r.uB.Input,{"data-slot":"command-input",className:(0,i.cn)("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...s})]})}function d(e){let{className:t,...s}=e;return(0,a.jsx)(r.uB.List,{"data-slot":"command-list",className:(0,i.cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...s})}function c(e){let{...t}=e;return(0,a.jsx)(r.uB.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function u(e){let{className:t,...s}=e;return(0,a.jsx)(r.uB.Group,{"data-slot":"command-group",className:(0,i.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...s})}function p(e){let{className:t,...s}=e;return(0,a.jsx)(r.uB.Item,{"data-slot":"command-item",className:(0,i.cn)("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...s})}},14554:(e,t,s)=>{"use strict";s.d(t,{p:()=>n});var a=s(90508);s(1856);var r=s(24377);function n(e){let{className:t,type:s,...n}=e;return(0,a.jsx)("input",{type:s,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}},15972:(e,t,s)=>{"use strict";s.d(t,{T:()=>n});var a=s(90508);s(1856);var r=s(24377);function n(e){let{className:t,...s}=e;return(0,a.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...s})}},17001:(e,t,s)=>{"use strict";s.d(t,{AM:()=>i,Wv:()=>o,hl:()=>l});var a=s(90508);s(1856);var r=s(79919),n=s(24377);function i(e){let{...t}=e;return(0,a.jsx)(r.Root,{"data-slot":"popover",...t})}function o(e){let{...t}=e;return(0,a.jsx)(r.Trigger,{"data-slot":"popover-trigger",...t})}function l(e){let{className:t,align:s="center",sideOffset:i=4,...o}=e;return(0,a.jsx)(r.Portal,{children:(0,a.jsx)(r.Content,{"data-slot":"popover-content",align:s,sideOffset:i,className:(0,n.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),...o})})}},41033:(e,t,s)=>{"use strict";s.d(t,{C:()=>l,z:()=>o});var a=s(90508);s(1856);var r=s(97964),n=s(63197),i=s(24377);function o(e){let{className:t,...s}=e;return(0,a.jsx)(n.Root,{"data-slot":"radio-group",className:(0,i.cn)("grid gap-3",t),...s})}function l(e){let{className:t,...s}=e;return(0,a.jsx)(n.Item,{"data-slot":"radio-group-item",className:(0,i.cn)("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:(0,a.jsx)(n.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:(0,a.jsx)(r.A,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}},51817:(e,t,s)=>{"use strict";s.d(t,{$v:()=>g,EO:()=>u,Lt:()=>o,Rx:()=>f,Zr:()=>h,ck:()=>x,r7:()=>m,tv:()=>l,wd:()=>p});var a=s(90508);s(1856);var r=s(90299),n=s(24377),i=s(22922);function o(e){let{...t}=e;return(0,a.jsx)(r.Root,{"data-slot":"alert-dialog",...t})}function l(e){let{...t}=e;return(0,a.jsx)(r.Trigger,{"data-slot":"alert-dialog-trigger",...t})}function d(e){let{...t}=e;return(0,a.jsx)(r.Portal,{"data-slot":"alert-dialog-portal",...t})}function c(e){let{className:t,...s}=e;return(0,a.jsx)(r.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,n.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...s})}function u(e){let{className:t,size:s="default",...i}=e;return(0,a.jsxs)(d,{children:[(0,a.jsx)(c,{}),(0,a.jsx)(r.Content,{"data-slot":"alert-dialog-content","data-size":s,className:(0,n.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg",t),...i})]})}function p(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,n.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",t),...s})}function x(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,n.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",t),...s})}function m(e){let{className:t,...s}=e;return(0,a.jsx)(r.Title,{"data-slot":"alert-dialog-title",className:(0,n.cn)("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",t),...s})}function g(e){let{className:t,...s}=e;return(0,a.jsx)(r.Description,{"data-slot":"alert-dialog-description",className:(0,n.cn)("text-muted-foreground text-sm",t),...s})}function f(e){let{className:t,variant:s="default",size:o="default",...l}=e;return(0,a.jsx)(i.$,{variant:s,size:o,asChild:!0,children:(0,a.jsx)(r.Action,{"data-slot":"alert-dialog-action",className:(0,n.cn)(t),...l})})}function h(e){let{className:t,variant:s="outline",size:o="default",...l}=e;return(0,a.jsx)(i.$,{variant:s,size:o,asChild:!0,children:(0,a.jsx)(r.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,n.cn)(t),...l})})}},57731:(e,t,s)=>{"use strict";s.d(t,{E:()=>l});var a=s(90508);s(1856);var r=s(49499),n=s(54154),i=s(24377);let o=(0,r.F)("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline",success:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100",warning:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100"}},defaultVariants:{variant:"default"}});function l(e){let{className:t,variant:s="default",asChild:r=!1,...l}=e,d=r?n.bL:"span";return(0,a.jsx)(d,{"data-slot":"badge","data-variant":s,className:(0,i.cn)(o({variant:s}),t),...l})}},62205:(e,t,s)=>{"use strict";s.d(t,{a:()=>r});var a=s(1856);function r(){let[e,t]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=window.matchMedia("(max-width: 767px)");t(e.matches);let s=e=>t(e.matches);return e.addEventListener("change",s),()=>e.removeEventListener("change",s)},[]),e}},64993:(e,t,s)=>{"use strict";s.d(t,{F:()=>i});var a=s(90508);s(1856);var r=s(65326),n=s(24377);function i(e){let{className:t,children:s,...i}=e;return(0,a.jsxs)(r.Root,{"data-slot":"scroll-area",className:(0,n.cn)("relative",t),...i,children:[(0,a.jsx)(r.Viewport,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:s}),(0,a.jsx)(o,{}),(0,a.jsx)(r.Corner,{})]})}function o(e){let{className:t,orientation:s="vertical",...i}=e;return(0,a.jsx)(r.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:s,className:(0,n.cn)("flex touch-none p-px transition-colors select-none","vertical"===s&&"h-full w-2.5 border-l border-l-transparent","horizontal"===s&&"h-2.5 flex-col border-t border-t-transparent",t),...i,children:(0,a.jsx)(r.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}},65626:(e,t,s)=>{"use strict";s.d(t,{K5:()=>l,Rf:()=>o,Yv:()=>a,bK:()=>i,qG:()=>n,tE:()=>r});let a={fast:.15,normal:.2,slow:.3,easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],stagger:.04,staggerFast:.03,spring:{type:"spring",stiffness:500,damping:30},tween:{type:"tween",duration:.2,ease:[0,0,.2,1]}},r={initial:{opacity:0,y:8},animate:{opacity:1,y:0,transition:{duration:a.normal,ease:a.easeOut}},exit:{opacity:0,y:-4,transition:{duration:a.fast,ease:a.easeOut}}},n={initial:{opacity:0},animate:{opacity:1,transition:{duration:a.normal,ease:a.easeOut}},exit:{opacity:0,transition:{duration:a.fast,ease:a.easeOut}}};a.normal,a.easeOut,a.fast,a.easeOut;let i={initial:{},animate:{transition:{staggerChildren:a.stagger}}},o={initial:{opacity:0,y:8},animate:{opacity:1,y:0,transition:{duration:a.normal,ease:a.easeOut}}},l={initial:{opacity:0,scale:.95,y:-4},animate:{opacity:1,scale:1,y:0,transition:{duration:a.fast,ease:a.easeOut}},exit:{opacity:0,scale:.95,y:-4,transition:{duration:a.fast,ease:a.easeOut}}}},78917:(e,t,s)=>{Promise.resolve().then(s.bind(s,2774))},79919:(e,t,s)=>{"use strict";s.r(t),s.d(t,{Anchor:()=>G,Arrow:()=>J,Close:()=>Y,Content:()=>H,Popover:()=>A,PopoverAnchor:()=>E,PopoverArrow:()=>V,PopoverClose:()=>K,PopoverContent:()=>U,PopoverPortal:()=>D,PopoverTrigger:()=>z,Portal:()=>Z,Root:()=>q,Trigger:()=>W,createPopoverScope:()=>w});var a=s(1856),r=s(33328),n=s(34124),i=s(21032),o=s(63569),l=s(12139),d=s(80491),c=s(40577),u=s(67221),p=s(17533),x=s(19900),m=s(93367),g=s(54154),f=s(66249),h=s(2188),v=s(46523),b=s(90508),j="Popover",[y,w]=(0,i.A)(j,[u.Bk]),C=(0,u.Bk)(),[N,k]=y(j),A=e=>{let{__scopePopover:t,children:s,open:r,defaultOpen:n,onOpenChange:i,modal:o=!1}=e,l=C(t),d=a.useRef(null),[p,x]=a.useState(!1),[m,g]=(0,f.i)({prop:r,defaultProp:null!=n&&n,onChange:i,caller:j});return(0,b.jsx)(u.bL,{...l,children:(0,b.jsx)(N,{scope:t,contentId:(0,c.B)(),triggerRef:d,open:m,onOpenChange:g,onOpenToggle:a.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:p,onCustomAnchorAdd:a.useCallback(()=>x(!0),[]),onCustomAnchorRemove:a.useCallback(()=>x(!1),[]),modal:o,children:s})})};A.displayName=j;var F="PopoverAnchor",E=a.forwardRef((e,t)=>{let{__scopePopover:s,...r}=e,n=k(F,s),i=C(s),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=n;return a.useEffect(()=>(o(),()=>l()),[o,l]),(0,b.jsx)(u.Mz,{...i,...r,ref:t})});E.displayName=F;var B="PopoverTrigger",z=a.forwardRef((e,t)=>{let{__scopePopover:s,...a}=e,i=k(B,s),o=C(s),l=(0,n.s)(t,i.triggerRef),d=(0,b.jsx)(m.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":$(i.open),...a,ref:l,onClick:(0,r.mK)(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?d:(0,b.jsx)(u.Mz,{asChild:!0,...o,children:d})});z.displayName=B;var P="PopoverPortal",[S,_]=y(P,{forceMount:void 0}),D=e=>{let{__scopePopover:t,forceMount:s,children:a,container:r}=e,n=k(P,t);return(0,b.jsx)(S,{scope:t,forceMount:s,children:(0,b.jsx)(x.C,{present:s||n.open,children:(0,b.jsx)(p.Portal,{asChild:!0,container:r,children:a})})})};D.displayName=P;var R="PopoverContent",U=a.forwardRef((e,t)=>{let s=_(R,e.__scopePopover),{forceMount:a=s.forceMount,...r}=e,n=k(R,e.__scopePopover);return(0,b.jsx)(x.C,{present:a||n.open,children:n.modal?(0,b.jsx)(T,{...r,ref:t}):(0,b.jsx)(L,{...r,ref:t})})});U.displayName=R;var O=(0,g.TL)("PopoverContent.RemoveScroll"),T=a.forwardRef((e,t)=>{let s=k(R,e.__scopePopover),i=a.useRef(null),o=(0,n.s)(t,i),l=a.useRef(!1);return a.useEffect(()=>{let e=i.current;if(e)return(0,h.Eq)(e)},[]),(0,b.jsx)(v.A,{as:O,allowPinchZoom:!0,children:(0,b.jsx)(M,{...e,ref:o,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,r.mK)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),l.current||null==(t=s.triggerRef.current)||t.focus()}),onPointerDownOutside:(0,r.mK)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,s=0===t.button&&!0===t.ctrlKey;l.current=2===t.button||s},{checkForDefaultPrevented:!1}),onFocusOutside:(0,r.mK)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),L=a.forwardRef((e,t)=>{let s=k(R,e.__scopePopover),r=a.useRef(!1),n=a.useRef(!1);return(0,b.jsx)(M,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,i;null==(a=e.onCloseAutoFocus)||a.call(e,t),t.defaultPrevented||(r.current||null==(i=s.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:t=>{var a,i;null==(a=e.onInteractOutside)||a.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(n.current=!0));let o=t.target;(null==(i=s.triggerRef.current)?void 0:i.contains(o))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&n.current&&t.preventDefault()}})}),M=a.forwardRef((e,t)=>{let{__scopePopover:s,trapFocus:a,onOpenAutoFocus:r,onCloseAutoFocus:n,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:p,onFocusOutside:x,onInteractOutside:m,...g}=e,f=k(R,s),h=C(s);return(0,l.Oh)(),(0,b.jsx)(d.n,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:n,children:(0,b.jsx)(o.qW,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:m,onEscapeKeyDown:c,onPointerDownOutside:p,onFocusOutside:x,onDismiss:()=>f.onOpenChange(!1),children:(0,b.jsx)(u.UC,{"data-state":$(f.open),role:"dialog",id:f.contentId,...h,...g,ref:t,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),I="PopoverClose",K=a.forwardRef((e,t)=>{let{__scopePopover:s,...a}=e,n=k(I,s);return(0,b.jsx)(m.sG.button,{type:"button",...a,ref:t,onClick:(0,r.mK)(e.onClick,()=>n.onOpenChange(!1))})});K.displayName=I;var V=a.forwardRef((e,t)=>{let{__scopePopover:s,...a}=e,r=C(s);return(0,b.jsx)(u.i3,{...r,...a,ref:t})});function $(e){return e?"open":"closed"}V.displayName="PopoverArrow";var q=A,G=E,W=z,Z=D,H=U,Y=K,J=V},88064:(e,t,s)=>{"use strict";s.d(t,{J:()=>i});var a=s(90508);s(1856);var r=s(58057),n=s(24377);function i(e){let{className:t,...s}=e;return(0,a.jsx)(r.Root,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...s})}},91846:(e,t,s)=>{"use strict";s.d(t,{bq:()=>u,eb:()=>x,gC:()=>p,l6:()=>d,yv:()=>c});var a=s(90508);s(1856);var r=s(17730),n=s(60532),i=s(89967),o=s(48218),l=s(24377);function d(e){let{...t}=e;return(0,a.jsx)(o.Root,{"data-slot":"select",...t})}function c(e){let{...t}=e;return(0,a.jsx)(o.Value,{"data-slot":"select-value",...t})}function u(e){let{className:t,size:s="default",children:n,...i}=e;return(0,a.jsxs)(o.Trigger,{"data-slot":"select-trigger","data-size":s,className:(0,l.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...i,children:[n,(0,a.jsx)(o.Icon,{asChild:!0,children:(0,a.jsx)(r.A,{className:"size-4 opacity-50"})})]})}function p(e){let{className:t,children:s,position:r="item-aligned",align:n="center",...i}=e;return(0,a.jsx)(o.Portal,{children:(0,a.jsxs)(o.Content,{"data-slot":"select-content",className:(0,l.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,align:n,...i,children:[(0,a.jsx)(m,{}),(0,a.jsx)(o.Viewport,{className:(0,l.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:s}),(0,a.jsx)(g,{})]})})}function x(e){let{className:t,children:s,...r}=e;return(0,a.jsxs)(o.Item,{"data-slot":"select-item",className:(0,l.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...r,children:[(0,a.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(o.ItemIndicator,{children:(0,a.jsx)(n.A,{className:"size-4"})})}),(0,a.jsx)(o.ItemText,{children:s})]})}function m(e){let{className:t,...s}=e;return(0,a.jsx)(o.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:(0,l.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,a.jsx)(i.A,{className:"size-4"})})}function g(e){let{className:t,...s}=e;return(0,a.jsx)(o.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:(0,l.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,a.jsx)(r.A,{className:"size-4"})})}},97438:(e,t,s)=>{"use strict";s.d(t,{Cf:()=>p,Es:()=>m,L3:()=>g,c7:()=>x,lG:()=>l,rr:()=>f,zM:()=>d});var a=s(90508);s(1856);var r=s(9160),n=s(71350),i=s(24377),o=s(22922);function l(e){let{...t}=e;return(0,a.jsx)(n.Root,{"data-slot":"dialog",...t})}function d(e){let{...t}=e;return(0,a.jsx)(n.Trigger,{"data-slot":"dialog-trigger",...t})}function c(e){let{...t}=e;return(0,a.jsx)(n.Portal,{"data-slot":"dialog-portal",...t})}function u(e){let{className:t,...s}=e;return(0,a.jsx)(n.Overlay,{"data-slot":"dialog-overlay",className:(0,i.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...s})}function p(e){let{className:t,children:s,showCloseButton:o=!0,...l}=e;return(0,a.jsxs)(c,{"data-slot":"dialog-portal",children:[(0,a.jsx)(u,{}),(0,a.jsxs)(n.Content,{"data-slot":"dialog-content",className:(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",t),...l,children:[s,o&&(0,a.jsxs)(n.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,a.jsx)(r.A,{}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function x(e){let{className:t,...s}=e;return(0,a.jsx)("div",{"data-slot":"dialog-header",className:(0,i.cn)("flex flex-col gap-2 text-center sm:text-left",t),...s})}function m(e){let{className:t,showCloseButton:s=!1,children:r,...l}=e;return(0,a.jsxs)("div",{"data-slot":"dialog-footer",className:(0,i.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...l,children:[r,s&&(0,a.jsx)(n.Close,{asChild:!0,children:(0,a.jsx)(o.$,{variant:"outline",children:"Close"})})]})}function g(e){let{className:t,...s}=e;return(0,a.jsx)(n.Title,{"data-slot":"dialog-title",className:(0,i.cn)("text-lg leading-none font-semibold",t),...s})}function f(e){let{className:t,...s}=e;return(0,a.jsx)(n.Description,{"data-slot":"dialog-description",className:(0,i.cn)("text-muted-foreground text-sm",t),...s})}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[19126],{813:(e,t,s)=>{"use strict";s.d(t,{IdeasList:()=>R});var n=s(90508),a=s(1856),r=s(12790),i=s.n(r),l=s(39268),o=s(5425),c=s(94903),d=s(43057),u=s(56770),m=s(48416),p=s(57731),h=s(73693),x=s(37021),f=s(51708),v=s(53664),b=s(63964),g=s(81531),j=s(96213),N=s(16544),P=s(65626);function w(e){let{children:t,className:s}=e;return(0,n.jsx)(N.P.div,{variants:P.bK,initial:"initial",animate:"animate",className:s,children:t})}function y(e){let{children:t,className:s}=e;return(0,n.jsx)(N.P.div,{variants:P.Rf,className:s,children:t})}var E=s(52217);let C=(0,E.createServerReference)("40160cd5e9a08aca7375aefb470815b4c1834b7e5f",E.callServer,void 0,E.findSourceMapURL,"fetchIdeasAction");var A=s(38106);let S={open:{dot:"bg-[#2563EB]",className:"bg-[#DBEAFE] text-[#1D4ED8] border-transparent"},elaborating:{dot:"bg-[#1976D2]",className:"bg-[#E3F2FD] text-[#1976D2] border-transparent"},proposal_created:{dot:"bg-[#FF9800]",className:"bg-[#FFF3E0] text-[#E65100] border-transparent"},completed:{dot:"bg-[#4CAF50]",className:"bg-[#E8F5E9] text-[#2E7D32] border-transparent"},closed:{dot:"bg-[#9A9A9A]",className:"bg-[#F5F5F5] text-[#6B6B6B] border-transparent"}},F={open:"open",elaborating:"elaborating",proposal_created:"proposal_created",completed:"completed",closed:"closed"};function R(e){let{ideas:t,projectUuid:s,currentUserUuid:r,usedIdeaUuids:N,ideaProposalMap:P,initialSelectedIdeaUuid:E}=e,R=(0,l.c)(),[D,B]=(0,a.useState)(t),[M,k]=(0,a.useState)(N),[L,U]=(0,a.useState)(P);(0,a.useEffect)(()=>{B(t)},[t]),(0,a.useEffect)(()=>{k(N)},[N]),(0,a.useEffect)(()=>{U(P)},[P]);let I=(0,a.useCallback)(async()=>{let e=await C(s);e.success&&(B(e.data.ideas),k(e.data.usedIdeaUuids),U(e.data.ideaProposalMap))},[s]);(0,b.eV)("idea",I);let T="/projects/".concat(s,"/ideas"),{selectedId:z,openPanel:_,closePanel:q}=(0,g.T)(T,E),H=new Set(M);(0,a.useEffect)(()=>{z&&!D.some(e=>e.uuid===z)&&q()},[z,D,q]);let V=(0,a.useMemo)(()=>{var e;return z&&null!=(e=D.find(e=>e.uuid===z))?e:null},[z,D]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{className:"space-y-4",children:D.map(e=>{var t,a;let r=S[e.status]||S.open,l=H.has(e.uuid);return(0,n.jsx)(y,{children:(0,n.jsx)(j.D,{entityType:"idea",entityUuid:e.uuid,children:(0,n.jsxs)(m.Zp,{className:"cursor-pointer border-[#E5E0D8] py-4 transition-all hover:border-[#C67A52]/50 hover:shadow-sm",onClick:()=>_(e.uuid),children:[(0,n.jsxs)(m.aR,{className:"gap-0 py-0",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(h.eu,{size:"sm",children:(0,n.jsx)(h.q5,{className:"bg-[#E5E0D8] text-[#6B6B6B]",children:(null==(t=e.createdBy)?void 0:t.type)==="agent"?(0,n.jsx)(o.A,{className:"h-3 w-3"}):(0,n.jsx)(c.A,{className:"h-3 w-3"})})}),(0,n.jsx)("span",{className:"text-[11px] text-[#6B6B6B]",children:(null==(a=e.createdBy)?void 0:a.name)||R("common.unknown")}),(0,n.jsx)("span",{className:"text-[11px] text-[#9A9A9A]",children:"•"}),(0,n.jsx)("span",{className:"text-[11px] text-[#9A9A9A]",children:function(e,t){let s=new Date(e),n=new Date().getTime()-s.getTime(),a=Math.floor(n/6e4),r=Math.floor(n/36e5),i=Math.floor(n/864e5);return a<1?t("time.justNow"):a<60?t("time.minutesAgo",{minutes:a}):r<24?t("time.hoursAgo",{hours:r}):i<7?t("time.daysAgo",{days:i}):(0,A.r)(s)}(e.createdAt,R)})]}),(0,n.jsx)(m.X9,{children:(0,n.jsxs)(p.E,{className:"gap-1.5 text-[10px] ".concat(r.className),children:[(0,n.jsx)("span",{className:"h-1.5 w-1.5 rounded-full ".concat(r.dot)}),l?R("ideas.proposalGenerated"):R("status.".concat(F[e.status]||e.status))]})})]}),(0,n.jsxs)(m.Wu,{className:"space-y-2 py-0",children:[e.assignee&&(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)("span",{className:"text-[11px] text-[#9A9A9A]",children:[R("ideas.assignedTo"),":"]}),(0,n.jsxs)(p.E,{className:"gap-1.5 bg-[#F0F9FF] text-[#0284C7] border-transparent text-[10px]",children:[(0,n.jsx)(o.A,{className:"h-3 w-3"}),e.assignee.name]})]}),(0,n.jsx)("h3",{className:"text-sm font-medium text-[#2C2C2C]",children:e.title}),e.content&&(0,n.jsx)("div",{className:"prose prose-sm max-w-none line-clamp-3 text-[13px] leading-relaxed text-[#2C2C2C]",children:(0,n.jsx)(x.jH,{plugins:{code:f.a},children:e.content})})]}),(0,n.jsxs)(m.wL,{className:"gap-4 py-0 text-[#6B6B6B]",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,n.jsx)(d.A,{className:"h-3.5 w-3.5"}),(0,n.jsxs)("span",{className:"text-xs",children:[e.commentCount," ",R("comments.title").toLowerCase()]})]}),l&&L[e.uuid]&&(0,n.jsxs)(i(),{href:"/projects/".concat(s,"/proposals/").concat(L[e.uuid]),onClick:e=>e.stopPropagation(),className:"flex items-center gap-1.5 text-[#C67A52] hover:text-[#B56A42] transition-colors",children:[(0,n.jsx)(u.A,{className:"h-3.5 w-3.5"}),(0,n.jsx)("span",{className:"text-xs font-medium",children:R("ideas.viewProposal")})]})]})]})})},e.uuid)})}),V&&(0,n.jsx)(v.D,{idea:V,projectUuid:s,currentUserUuid:r,isUsedInProposal:H.has(V.uuid),onClose:q,onDeleted:q})]})}},19126:(e,t,s)=>{Promise.resolve().then(s.bind(s,52053)),Promise.resolve().then(s.bind(s,90299)),Promise.resolve().then(s.bind(s,65514)),Promise.resolve().then(s.bind(s,98861)),Promise.resolve().then(s.bind(s,38476)),Promise.resolve().then(s.bind(s,74542)),Promise.resolve().then(s.bind(s,71350)),Promise.resolve().then(s.bind(s,39025)),Promise.resolve().then(s.bind(s,75368)),Promise.resolve().then(s.bind(s,89684)),Promise.resolve().then(s.bind(s,58057)),Promise.resolve().then(s.bind(s,6512)),Promise.resolve().then(s.bind(s,25051)),Promise.resolve().then(s.bind(s,4374)),Promise.resolve().then(s.bind(s,19345)),Promise.resolve().then(s.bind(s,79919)),Promise.resolve().then(s.bind(s,17533)),Promise.resolve().then(s.bind(s,99545)),Promise.resolve().then(s.bind(s,63197)),Promise.resolve().then(s.bind(s,65326)),Promise.resolve().then(s.bind(s,48218)),Promise.resolve().then(s.bind(s,56260)),Promise.resolve().then(s.bind(s,60322)),Promise.resolve().then(s.bind(s,79834)),Promise.resolve().then(s.bind(s,6947)),Promise.resolve().then(s.bind(s,88878)),Promise.resolve().then(s.bind(s,34857)),Promise.resolve().then(s.bind(s,97006)),Promise.resolve().then(s.bind(s,45841)),Promise.resolve().then(s.t.bind(s,12790,23)),Promise.resolve().then(s.bind(s,75912)),Promise.resolve().then(s.bind(s,813)),Promise.resolve().then(s.bind(s,58866))},43057:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(66206).A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]])},58866:(e,t,s)=>{"use strict";s.d(t,{AnimatedEmptyState:()=>r});var n=s(90508),a=s(16544);function r(e){let{children:t}=e;return(0,n.jsx)(a.P.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.2,ease:[0,0,.2,1]},children:t})}},67103:(e,t,s)=>{"use strict";s.d(t,{N:()=>g});var n=s(90508),a=s(1856),r=s(43827),i=s(66071),l=s(66506),o=s(95535),c=s(63605),d=s(8334);function u(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class m extends a.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,c.s)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,s=(0,c.s)(e)&&e.offsetWidth||0,n=(0,c.s)(e)&&e.offsetHeight||0,a=getComputedStyle(t),r=this.props.sizeRef.current;r.height=parseFloat(a.height),r.width=parseFloat(a.width),r.top=t.offsetTop,r.left=t.offsetLeft,r.right=s-r.width-r.left,r.bottom=n-r.height-r.top}return null}componentDidUpdate(){}render(){return this.props.children}}function p(e){var t,s;let{children:r,isPresent:i,anchorX:l,anchorY:o,root:c,pop:p}=e,h=(0,a.useId)(),x=(0,a.useRef)(null),f=(0,a.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:v}=(0,a.useContext)(d.Q),b=function(...e){return a.useCallback(function(...e){return t=>{let s=!1,n=e.map(e=>{let n=u(e,t);return s||"function"!=typeof n||(s=!0),n});if(s)return()=>{for(let t=0;t<n.length;t++){let s=n[t];"function"==typeof s?s():u(e[t],null)}}}}(...e),e)}(x,null!=(s=null==(t=r.props)?void 0:t.ref)?s:null==r?void 0:r.ref);return(0,a.useInsertionEffect)(()=>{let{width:e,height:t,top:s,left:n,right:a,bottom:r}=f.current;if(i||!1===p||!x.current||!e||!t)return;x.current.dataset.motionPopId=h;let d=document.createElement("style");v&&(d.nonce=v);let u=null!=c?c:document.head;return u.appendChild(d),d.sheet&&d.sheet.insertRule('\n [data-motion-pop-id="'.concat(h,'"] {\n position: absolute !important;\n width: ').concat(e,"px !important;\n height: ").concat(t,"px !important;\n ").concat("left"===l?"left: ".concat(n):"right: ".concat(a),"px !important;\n ").concat("bottom"===o?"bottom: ".concat(r):"top: ".concat(s),"px !important;\n }\n ")),()=>{var e;null==(e=x.current)||e.removeAttribute("data-motion-pop-id"),u.contains(d)&&u.removeChild(d)}},[i]),(0,n.jsx)(m,{isPresent:i,childRef:x,sizeRef:f,pop:p,children:!1===p?r:a.cloneElement(r,{ref:b})})}let h=e=>{let{children:t,initial:s,isPresent:r,onExitComplete:l,custom:c,presenceAffectsLayout:d,mode:u,anchorX:m,anchorY:h,root:f}=e,v=(0,i.M)(x),b=(0,a.useId)(),g=!0,j=(0,a.useMemo)(()=>(g=!1,{id:b,initial:s,isPresent:r,custom:c,onExitComplete:e=>{for(let t of(v.set(e,!0),v.values()))if(!t)return;l&&l()},register:e=>(v.set(e,!1),()=>v.delete(e))}),[r,v,l]);return d&&g&&(j={...j}),(0,a.useMemo)(()=>{v.forEach((e,t)=>v.set(t,!1))},[r]),a.useEffect(()=>{r||v.size||!l||l()},[r]),t=(0,n.jsx)(p,{pop:"popLayout"===u,isPresent:r,anchorX:m,anchorY:h,root:f,children:t}),(0,n.jsx)(o.t.Provider,{value:j,children:t})};function x(){return new Map}var f=s(99672);let v=e=>e.key||"";function b(e){let t=[];return a.Children.forEach(e,e=>{(0,a.isValidElement)(e)&&t.push(e)}),t}let g=e=>{let{children:t,custom:s,initial:o=!0,onExitComplete:c,presenceAffectsLayout:d=!0,mode:u="sync",propagate:m=!1,anchorX:p="left",anchorY:x="top",root:g}=e,[j,N]=(0,f.xQ)(m),P=(0,a.useMemo)(()=>b(t),[t]),w=m&&!j?[]:P.map(v),y=(0,a.useRef)(!0),E=(0,a.useRef)(P),C=(0,i.M)(()=>new Map),A=(0,a.useRef)(new Set),[S,F]=(0,a.useState)(P),[R,D]=(0,a.useState)(P);(0,l.E)(()=>{y.current=!1,E.current=P;for(let e=0;e<R.length;e++){let t=v(R[e]);w.includes(t)?(C.delete(t),A.current.delete(t)):!0!==C.get(t)&&C.set(t,!1)}},[R,w.length,w.join("-")]);let B=[];if(P!==S){let e=[...P];for(let t=0;t<R.length;t++){let s=R[t],n=v(s);w.includes(n)||(e.splice(t,0,s),B.push(s))}return"wait"===u&&B.length&&(e=B),D(b(e)),F(P),null}let{forceRender:M}=(0,a.useContext)(r.L);return(0,n.jsx)(n.Fragment,{children:R.map(e=>{let t=v(e),a=(!m||!!j)&&(P===R||w.includes(t));return(0,n.jsx)(h,{isPresent:a,initial:(!y.current||!!o)&&void 0,custom:s,presenceAffectsLayout:d,mode:u,root:g,onExitComplete:a?void 0:()=>{if(A.current.has(t)||!C.has(t))return;A.current.add(t),C.set(t,!0);let e=!0;C.forEach(t=>{t||(e=!1)}),e&&(null==M||M(),D(E.current),m&&(null==N||N()),c&&c())},anchorX:p,anchorY:x,children:e},t)})})}},75912:(e,t,s)=>{"use strict";s.d(t,{IdeaCreateForm:()=>b});var n=s(90508),a=s(1856),r=s(23675),i=s(39268),l=s(22922),o=s(14554),c=s(15972),d=s(88064),u=s(48416),m=s(67103),p=s(16544),h=s(60532),x=s(85226),f=s(52217);let v=(0,f.createServerReference)("407011622364a55cf622bc6ca450f4e59d50867852",f.callServer,void 0,f.findSourceMapURL,"createIdeaAction");function b(e){let{projectUuid:t}=e,s=(0,i.c)(),f=(0,r.useRouter)(),[b,g]=(0,a.useTransition)(),[j,N]=(0,a.useState)(""),[P,w]=(0,a.useState)(""),[y,E]=(0,a.useState)(null),[C,A]=(0,a.useState)(!1),S=async e=>{if(e.preventDefault(),E(null),!j.trim())return void E(s("ideas.titleRequired"));g(async()=>{try{let e=await v({projectUuid:t,title:j.trim(),content:P.trim()||void 0});e.success?(A(!0),setTimeout(()=>{N(""),w(""),f.refresh(),A(!1)},600)):E(e.error||s("ideas.createFailed"))}catch(e){E(s("common.genericError"))}})};return(0,n.jsx)(u.Zp,{className:"border-[#E5E0D8] rounded-2xl py-5",children:(0,n.jsx)(u.Wu,{children:(0,n.jsxs)("form",{onSubmit:S,className:"space-y-4",children:[y&&(0,n.jsx)("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:y}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(d.J,{htmlFor:"idea-title",className:"text-[13px] font-medium text-[#2C2C2C]",children:s("ideas.titleLabel")}),(0,n.jsx)(o.p,{id:"idea-title",value:j,onChange:e=>N(e.target.value),placeholder:s("ideas.whatIsYourIdea"),className:"border-[#E5E0D8] text-sm",required:!0})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(d.J,{htmlFor:"idea-content",className:"text-[13px] font-medium text-[#2C2C2C]",children:s("common.content")}),(0,n.jsx)(c.T,{id:"idea-content",value:P,onChange:e=>w(e.target.value),placeholder:s("ideas.addMoreDetails"),rows:2,className:"border-[#E5E0D8] text-sm resize-none"})]})]}),(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsx)(l.$,{type:"submit",disabled:b||C||!j.trim(),size:"sm",className:"bg-[#C67A52] hover:bg-[#B56A42] text-white",children:(0,n.jsx)(m.N,{mode:"wait",children:C?(0,n.jsx)(p.P.span,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0},transition:{duration:.15},className:"flex items-center gap-2",children:(0,n.jsx)(h.A,{className:"h-3.5 w-3.5"})},"success"):b?(0,n.jsxs)(p.P.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex items-center gap-2",children:[(0,n.jsx)(x.A,{className:"h-4 w-4 animate-spin"}),s("common.creating")]},"loading"):(0,n.jsx)(p.P.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:s("ideas.submit")},"idle")})})})]})})})}},81531:(e,t,s)=>{"use strict";s.d(t,{T:()=>a});var n=s(1856);function a(e,t){let[s,a]=(0,n.useState)(null!=t?t:null),[r,i]=(0,n.useState)(()=>new URLSearchParams(window.location.search).get("tab")),l=(0,n.useCallback)((t,s)=>{let n=new URLSearchParams(window.location.search);t?n.set("panel",t):n.delete("panel"),s?n.set("tab",s):n.delete("tab");let a=n.toString();return a?"".concat(e,"?").concat(a):e},[e]),o=(0,n.useCallback)((e,t)=>{let s=l(e,t);window.history.replaceState(null,"",s),a(e),i(null!=t?t:null)},[l]),c=(0,n.useCallback)(()=>{let e=l(null);window.history.replaceState(null,"",e),a(null),i(null)},[l]),d=(0,n.useCallback)(e=>{if(!s)return;let t=l(s,e);window.history.replaceState(null,"",t),i(e)},[l,s]);return(0,n.useEffect)(()=>{function e(){let e=new URLSearchParams(window.location.search),t=e.get("panel");t?(a(t),i(e.get("tab"))):(a(null),i(null))}return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),{selectedId:s,selectedTab:r,openPanel:o,closePanel:c,switchTab:d}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[29445],{6985:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(66206).A)("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"}]])},18543:(e,s,t)=>{t.d(s,{h:()=>i});var a=t(52217);let i=(0,a.createServerReference)("4037ee2edf72df3a68ba1e20d0b95f368656445ca8",a.callServer,void 0,a.findSourceMapURL,"getBatchWorkerCountsAction")},18789:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(66206).A)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]])},32872:(e,s,t)=>{t.d(s,{w:()=>i});var a=t(52217);let i=(0,a.createServerReference)("60ea2934ba4a5b604a82f3617d1f94581311cab833",a.callServer,void 0,a.findSourceMapURL,"addTaskDependencyAction")},62482:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(66206).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},67712:(e,s,t)=>{t.d(s,{q:()=>c});var a=t(55036);let i={debug:0,info:1,warn:2,error:3},r=a.env.NEXT_PUBLIC_LOG_LEVEL||"warn";function n(e){return i[e]>=i[r]}let c={debug:function(e){for(var s=arguments.length,t=Array(s>1?s-1:0),a=1;a<s;a++)t[a-1]=arguments[a];n("debug")&&console.debug("[Chorus] ".concat(e),...t)},info:function(e){for(var s=arguments.length,t=Array(s>1?s-1:0),a=1;a<s;a++)t[a-1]=arguments[a];n("info")&&console.info("[Chorus] ".concat(e),...t)},warn:function(e){for(var s=arguments.length,t=Array(s>1?s-1:0),a=1;a<s;a++)t[a-1]=arguments[a];n("warn")&&console.warn("[Chorus] ".concat(e),...t)},error:function(e){for(var s=arguments.length,t=Array(s>1?s-1:0),a=1;a<s;a++)t[a-1]=arguments[a];n("error")&&console.error("[Chorus] ".concat(e),...t)}}},70633:(e,s,t)=>{t.d(s,{A:()=>a});let a=(0,t(66206).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},78278:(e,s,t)=>{t.d(s,{v:()=>eg});var a=t(90508),i=t(1856),r=t(23675),n=t(39268),c=t(76111),l=t(9160),d=t(5616),o=t(70633),x=t(57893),m=t(5425),u=t(56770),h=t(85226),p=t(62898),g=t(42533),v=t(1861),f=t(66206);let j=(0,f.A)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);var b=t(17475),A=t(60532),N=t(94903),C=t(62482),y=t(6985);let w=(0,f.A)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var k=t(97413),F=t(57731),E=t(48416),S=t(22922),D=t(14554),B=t(15972),_=t(88064),R=t(64993),T=t(91846),U=t(51817),L=t(73693),P=t(52217);let M=(0,P.createServerReference)("6087c85c777ab278476906c7c12f9db1d6c24f5275",P.callServer,void 0,P.findSourceMapURL,"updateTaskStatusAction"),q=(0,P.createServerReference)("4031d5da5330dfa122d8300df4f488c4f13fa1d9fe",P.callServer,void 0,P.findSourceMapURL,"createTaskAction"),z=(0,P.createServerReference)("401c19f5b7d207c4cba88fcbdee5866eb70f265d78",P.callServer,void 0,P.findSourceMapURL,"updateTaskFieldsAction"),$=(0,P.createServerReference)("6044118f945eb7ec572d28494f4fc5b2fb4820827d",P.callServer,void 0,P.findSourceMapURL,"deleteTaskAction"),V=(0,P.createServerReference)("60729c80a78426b20df988578d998a566a66bc2496",P.callServer,void 0,P.findSourceMapURL,"markCriteriaAction"),W=(0,P.createServerReference)("60048fa1d5ef26a606a459457d8fb1984a1900b2b7",P.callServer,void 0,P.findSourceMapURL,"resetCriterionAction");var J=t(37486);let O=(0,P.createServerReference)("406afedcd411eaaa478d46b4f103677baf2db8bcc6",P.callServer,void 0,P.findSourceMapURL,"getTaskActivitiesAction"),H=(0,P.createServerReference)("4077a5703649e3d1c4349209f65e6d64b6ea5c4d23",P.callServer,void 0,P.findSourceMapURL,"getTaskSourceAction");var I=t(37021),G=t(51708),X=t(41033);let Z=(0,P.createServerReference)("00b90e532ab1af14f03a59ebaf794acdcb1e8e00e2",P.callServer,void 0,P.findSourceMapURL,"getDeveloperAgentsAction"),K=(0,P.createServerReference)("40f7a9a62acd203b03bc4bce1bc45bd4b3bc71546d",P.callServer,void 0,P.findSourceMapURL,"claimTaskAction"),Q=(0,P.createServerReference)("600aa54e0e9c1ebfbce33061f33fa54ae172ce6aba",P.callServer,void 0,P.findSourceMapURL,"claimTaskToAgentAction"),Y=(0,P.createServerReference)("6038409dcf4869824ac35ca72e9453a9d7d26b2232",P.callServer,void 0,P.findSourceMapURL,"claimTaskToUserAction"),ee=(0,P.createServerReference)("403eb1f951029f9e86952fc15cad6fcd97bc7241e2",P.callServer,void 0,P.findSourceMapURL,"releaseTaskAction");function es(e){var s;let{task:t,projectUuid:c,currentUserUuid:d,onClose:o}=e,x=(0,n.c)(),u=(0,r.useRouter)(),[p,g]=(0,i.useState)(!1),[v,f]=(0,i.useState)("self"),[j,b]=(0,i.useState)(""),[A,C]=(0,i.useState)(""),[y,w]=(0,i.useState)([]),[k,F]=(0,i.useState)([]),[E,D]=(0,i.useState)(!0),[B,R]=(0,i.useState)(null),U=!!t.assignee;(0,i.useEffect)(()=>{!async function(){D(!0);let e=await Z();w(e.agents||[]),F((e.users||[]).filter(e=>e.uuid!==d)),D(!1)}()},[d]);let L=async()=>{let e;if(g(!0),R(null),"self"===v)e=await K(t.uuid);else if("agent"===v&&j)e=await Q(t.uuid,j);else if("user"===v&&A)e=await Y(t.uuid,A);else{if("release"!==v)return void g(!1);e=await ee(t.uuid)}g(!1),(null==e?void 0:e.success)?(o(),u.refresh()):(null==e?void 0:e.error)&&R(e.error)},P="self"===v||"agent"===v&&j||"user"===v&&A||"release"===v&&U;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 z-50 bg-black/40",onClick:o}),(0,a.jsxs)("div",{className:"fixed left-1/2 top-1/2 z-50 w-[400px] -translate-x-1/2 -translate-y-1/2 rounded-2xl bg-white shadow-xl border border-[#E5E0D8]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-[#E5E0D8] px-6 py-5",children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C]",children:x("tasks.assignTask")}),(0,a.jsx)("button",{onClick:o,className:"text-[#9A9A9A] hover:text-[#6B6B6B] transition-colors",children:(0,a.jsx)(l.A,{className:"h-5 w-5"})})]}),(0,a.jsxs)("div",{className:"p-6 space-y-4",children:[(0,a.jsxs)("div",{className:"rounded-lg bg-[#FAF8F4] p-3",children:[(0,a.jsx)("p",{className:"text-[13px] font-medium text-[#2C2C2C]",children:t.title}),t.description&&(0,a.jsx)("p",{className:"mt-1 text-[11px] text-[#6B6B6B] line-clamp-2",children:t.description})]}),U&&(0,a.jsx)("div",{className:"rounded-lg bg-[#E3F2FD] p-3",children:(0,a.jsxs)("p",{className:"text-xs text-[#1976D2]",children:[x("common.currentAssignee"),": ",(0,a.jsx)("span",{className:"font-medium",children:null==(s=t.assignee)?void 0:s.name})]})}),B&&(0,a.jsx)("div",{className:"rounded-lg bg-[#FEE2E2] p-3",children:(0,a.jsx)("p",{className:"text-xs text-[#D32F2F]",children:B})}),(0,a.jsx)("p",{className:"text-[13px] text-[#6B6B6B]",children:x("assign.selectAssignee")}),E?(0,a.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,a.jsx)(h.A,{className:"h-6 w-6 animate-spin text-[#9A9A9A]"})}):(0,a.jsxs)(X.z,{value:v,onValueChange:e=>f(e),className:"space-y-3",children:[(0,a.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors cursor-pointer ".concat("self"===v?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8] hover:border-[#C67A52]/50"),onClick:()=>f("self"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(X.C,{value:"self",id:"self",className:"border-[#C67A52] text-[#C67A52]"}),(0,a.jsx)(_.J,{htmlFor:"self",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:x("assign.assignToMyself")})]}),(0,a.jsx)("p",{className:"mt-2 ml-6 text-xs text-[#6B6B6B] leading-relaxed",children:x("assign.assignToMyselfDesc")})]}),(0,a.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors ".concat("agent"===v?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8]"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>f("agent"),children:[(0,a.jsx)(X.C,{value:"agent",id:"agent",className:"border-[#C67A52] text-[#C67A52]"}),(0,a.jsx)(_.J,{htmlFor:"agent",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:x("assign.orAssignToAgent")})]}),(0,a.jsx)("p",{className:"mt-2 ml-6 text-xs text-[#6B6B6B] leading-relaxed",children:x("tasks.onlySelectedAgentCanWork")}),"agent"===v&&(0,a.jsx)("div",{className:"mt-3 ml-6",children:(0,a.jsxs)(T.l6,{value:j,onValueChange:b,children:[(0,a.jsx)(T.bq,{className:"w-full border-[#E5E0D8]",children:(0,a.jsx)(T.yv,{placeholder:x("tasks.selectAgent")})}),(0,a.jsx)(T.gC,{children:y.length>0?y.map(e=>(0,a.jsx)(T.eb,{value:e.uuid,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(m.A,{className:"h-4 w-4 text-[#C67A52]"}),(0,a.jsx)("span",{children:e.name})]})},e.uuid)):(0,a.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:x("tasks.noAgentsAvailable")})})]})})]}),(0,a.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors ".concat("user"===v?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8]"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>f("user"),children:[(0,a.jsx)(X.C,{value:"user",id:"user",className:"border-[#C67A52] text-[#C67A52]"}),(0,a.jsx)(_.J,{htmlFor:"user",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:x("assign.orAssignToUser")})]}),"user"===v&&(0,a.jsx)("div",{className:"mt-3 ml-6",children:(0,a.jsxs)(T.l6,{value:A,onValueChange:C,children:[(0,a.jsx)(T.bq,{className:"w-full border-[#E5E0D8]",children:(0,a.jsx)(T.yv,{placeholder:x("tasks.selectUser")})}),(0,a.jsx)(T.gC,{children:k.length>0?k.map(e=>(0,a.jsx)(T.eb,{value:e.uuid,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(N.A,{className:"h-4 w-4 text-[#6B6B6B]"}),(0,a.jsx)("span",{children:e.name||e.email})]})},e.uuid)):(0,a.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:x("tasks.noUsersAvailable")})})]})})]}),U&&(0,a.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors cursor-pointer ".concat("release"===v?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8] hover:border-[#C67A52]/50"),onClick:()=>f("release"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(X.C,{value:"release",id:"release",className:"border-[#C67A52] text-[#C67A52]"}),(0,a.jsx)(_.J,{htmlFor:"release",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:x("assign.releaseAssignee")})]}),(0,a.jsx)("p",{className:"mt-2 ml-6 text-xs text-[#6B6B6B] leading-relaxed",children:x("assign.releaseAssigneeDesc")})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-4 rounded-b-2xl bg-white px-6 py-6 border-t border-[#E5E0D8]",children:[(0,a.jsx)(S.$,{variant:"outline",onClick:o,disabled:p,className:"border-[#E5E0D8]",children:x("common.cancel")}),(0,a.jsx)(S.$,{onClick:L,disabled:p||!P,className:"bg-[#C67A52] hover:bg-[#B56A42] text-white",children:p?(0,a.jsx)(h.A,{className:"h-4 w-4 animate-spin"}):x("release"===v?"common.release":"common.assign")})]})]})]})}let et=(0,P.createServerReference)("405851867c858db547dd452f0019918f1385e0ba82",P.callServer,void 0,P.findSourceMapURL,"getTaskDependenciesAction"),ea=(0,P.createServerReference)("404b290ebea3f0db599f51adffb8b083d3a8edcae5",P.callServer,void 0,P.findSourceMapURL,"getProjectTasksForDependencyAction");var ei=t(32872);let er=(0,P.createServerReference)("601df9f3e57fbab53bd868d240dd95e5e96a4f125b",P.callServer,void 0,P.findSourceMapURL,"removeTaskDependencyAction"),en=(0,P.createServerReference)("40587f04bba4020ab6512d4dfce1f1270f96030863",P.callServer,void 0,P.findSourceMapURL,"getTaskSessionsAction");var ec=t(38106),el=t(16544),ed=t(65626),eo=t(90795);let ex={open:"bg-[#FFF3E0] text-[#E65100]",assigned:"bg-[#E3F2FD] text-[#1976D2]",in_progress:"bg-[#E8F5E9] text-[#5A9E6F]",to_verify:"bg-[#F3E5F5] text-[#7B1FA2]",done:"bg-[#E0F2F1] text-[#00796B]",closed:"bg-[#F5F5F5] text-[#9A9A9A]"},em={open:"open",assigned:"assigned",in_progress:"inProgress",to_verify:"toVerify",done:"done",closed:"closed"},eu={low:"bg-[#F5F5F5] text-[#9A9A9A]",medium:"bg-[#FFF3E0] text-[#E65100]",high:"bg-[#FEE2E2] text-[#D32F2F]",critical:"bg-[#FFCDD2] text-[#B71C1C]"},eh={low:"lowPriority",medium:"mediumPriority",high:"highPriority",critical:"criticalPriority"};function ep(e,s){let t=new Date(e),a=new Date().getTime()-t.getTime(),i=Math.floor(a/6e4),r=Math.floor(a/36e5),n=Math.floor(a/864e5);return i<1?s("time.justNow"):i<60?s("time.minutesAgo",{minutes:i}):r<24?s("time.hoursAgo",{hours:r}):n<7?s("time.daysAgo",{days:n}):(0,ec.r)(t)}function eg(e){var s;let{task:t,projectUuid:f,currentUserUuid:P,mode:X="overlay",onClose:Z,onCreated:K,onDependencyChange:Q,onBack:Y}=e,ee=(0,n.c)(),eg=(0,r.useRouter)(),[ev,ef]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=setTimeout(()=>ef(!0),300);return()=>clearTimeout(e)},[]);let[ej,eb]=(0,i.useState)(!1),[eA,eN]=(0,i.useState)([]),[eC,ey]=(0,i.useState)(!0),[ew,ek]=(0,i.useState)(null),[eF,eE]=(0,i.useState)(!1),[eS,eD]=(0,i.useState)([]),[eB,e_]=(0,i.useState)([]),[eR,eT]=(0,i.useState)(!1),[eU,eL]=(0,i.useState)([]),[eP,eM]=(0,i.useState)(null),[eq,ez]=(0,i.useState)([]),[e$,eV]=(0,i.useState)([]),eW=null===t,[eJ,eO]=(0,i.useState)(eW),[eH,eI]=(0,i.useState)((null==t?void 0:t.title)||""),[eG,eX]=(0,i.useState)((null==t?void 0:t.description)||""),[eZ,eK]=(0,i.useState)((null==t?void 0:t.priority)||"medium"),[eQ,eY]=(0,i.useState)((null==t?void 0:t.storyPoints)!=null?String(t.storyPoints):""),[e0,e2]=(0,i.useState)((null==t?void 0:t.acceptanceCriteria)||""),[e1,e5]=(0,i.useState)(!1),[e6,e9]=(0,i.useState)(null),[e4,e3]=(0,i.useState)(!1),e7=(null==t||null==(s=t.assignee)?void 0:s.uuid)===P,e8=e7&&(null==t?void 0:t.status)==="assigned",se=e7&&(null==t?void 0:t.status)==="in_progress",ss=(null==t?void 0:t.status)==="to_verify";(0,i.useEffect)(()=>{async function e(){ey(!0),eN((await O(t.uuid)).activities),ey(!1)}async function s(){t.proposalUuid&&ek(await H(t.proposalUuid))}async function a(){eT(!0);let[e,s]=await Promise.all([et(t.uuid),ea(f)]);eD(e.dependsOn),e_(e.dependedBy),eL(s.tasks),eT(!1)}async function i(){let e=await en(t.uuid);e.success&&e.data&&ez(e.data)}t&&(e(),s(),a(),i())},[null==t?void 0:t.uuid,null==t?void 0:t.proposalUuid,f]),(0,i.useEffect)(()=>{eW&&e();async function e(){eL((await ea(f)).tasks)}},[eW,f]),(0,i.useEffect)(()=>{t&&(eO(!1),eI(t.title),eX(t.description||""),eK(t.priority),eY(null!=t.storyPoints?String(t.storyPoints):""),e2(t.acceptanceCriteria||""),e9(null))},[null==t?void 0:t.uuid,null==t?void 0:t.title,null==t?void 0:t.description,null==t?void 0:t.priority,null==t?void 0:t.storyPoints,null==t?void 0:t.acceptanceCriteria]);let st=async e=>{if(!t)return;eb(!0);let s=await M(t.uuid,e);eb(!1),s.success&&(Z(),eg.refresh())},sa=()=>{if(eW)return void Z();eO(!1),t&&(eI(t.title),eX(t.description||""),eK(t.priority),eY(null!=t.storyPoints?String(t.storyPoints):""),e2(t.acceptanceCriteria||"")),e9(null)},si=async()=>{if(!eH.trim())return void e9(ee("tasks.titleRequired"));e5(!0),e9(null);let e=eQ.trim()?parseFloat(eQ):null;if(eW){let s=await q({projectUuid:f,title:eH.trim(),description:eG.trim()||void 0,priority:eZ,storyPoints:e,acceptanceCriteria:e0.trim()||null});e5(!1),s.success?(e$.length>0&&s.taskUuid&&(await Promise.all(e$.map(e=>(0,ei.w)(s.taskUuid,e.uuid))),null==Q||Q()),null==K||K(),Z(),eg.refresh()):e9(s.error||ee("tasks.createFailed"))}else{let s=await z({taskUuid:t.uuid,projectUuid:f,title:eH.trim(),description:eG.trim()||null,priority:eZ,storyPoints:e,acceptanceCriteria:e0.trim()||null});e5(!1),s.success?(eO(!1),eg.refresh()):e9(s.error||ee("tasks.updateFailed"))}},sr=async()=>{if(!t)return;e3(!0);let e=await $(t.uuid,f);e3(!1),e.success&&(Z(),eg.refresh())},sn=async e=>{if(!t)return;eM(null);let s=await (0,ei.w)(t.uuid,e);if(s.success){let s=eU.find(s=>s.uuid===e);s&&eD(e=>[...e,s]),null==Q||Q()}else eM(s.error||ee("tasks.failedToAddDep"))},sc=async e=>{if(!t)return;eM(null);let s=await er(t.uuid,e);s.success?(eD(s=>s.filter(s=>s.uuid!==e)),null==Q||Q()):eM(s.error||ee("tasks.failedToRemoveDep"))},sl=async e=>{if(!t)return;eM(null);let s=await er(e,t.uuid);s.success?(e_(s=>s.filter(s=>s.uuid!==e)),null==Q||Q()):eM(s.error||ee("tasks.failedToRemoveDep"))},sd=eU.filter(e=>e.uuid!==(null==t?void 0:t.uuid)&&!eS.some(s=>s.uuid===e.uuid)),so=eU.filter(e=>!e$.some(s=>s.uuid===e.uuid)),sx="sidebyside"===X;return(0,a.jsxs)(a.Fragment,{children:[!sx&&(0,a.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:Z}),(0,a.jsxs)("div",{className:"fixed top-14 md:top-0 flex h-[calc(100%-3.5rem)] md:h-full w-full flex-col bg-white shadow-xl border-l border-[#E5E0D8] ".concat(sx?"z-40 ".concat(ev?"":"animate-in slide-in-from-right duration-300"):"z-50 right-0 ".concat(ev?"":"animate-in slide-in-from-right duration-300")),style:{maxWidth:"".concat(eo.L8,"px"),...sx?{right:"".concat(eo.L8,"px")}:{}},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-[#F5F2EC] px-6 py-5",children:[Y&&(0,a.jsx)(S.$,{variant:"ghost",size:"icon",className:"mr-2 h-8 w-8 shrink-0",onClick:Y,children:(0,a.jsx)(o.A,{className:"h-4 w-4 text-[#6B6B6B]"})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:eJ?(0,a.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C]",children:eW?ee("tasks.createTaskTitle"):ee("tasks.editTask")}):t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C] truncate",children:t.title}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,a.jsx)(F.E,{className:ex[t.status]||"",children:ee("status.".concat(em[t.status]||t.status))}),(0,a.jsx)(F.E,{className:eu[t.priority]||"",children:ee("priority.".concat(eh[t.priority]||t.priority))}),t.storyPoints&&(0,a.jsxs)("span",{className:"rounded bg-[#F5F2EC] px-2 py-0.5 text-xs font-medium text-[#6B6B6B]",children:[t.storyPoints,"h"]})]})]}):null}),(0,a.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[t&&!eJ&&(0,a.jsxs)(S.$,{variant:"outline",size:"sm",className:"h-8 gap-1.5 border-[#E5E0D8] text-[#2C2C2C]",onClick:()=>{t&&(eI(t.title),eX(t.description||""),eK(t.priority),eY(null!=t.storyPoints?String(t.storyPoints):""),e2(t.acceptanceCriteria||""),e9(null),eO(!0))},children:[(0,a.jsx)(x.A,{className:"h-3.5 w-3.5 text-[#6B6B6B]"}),(0,a.jsx)("span",{className:"text-xs",children:ee("common.edit")})]}),(0,a.jsx)(S.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-[#E5E0D8]",onClick:eJ&&!eW?sa:Z,children:(0,a.jsx)(l.A,{className:"h-4 w-4 text-[#6B6B6B]"})})]})]}),(0,a.jsx)(R.F,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:(0,a.jsx)("div",{className:"flex min-h-full flex-col px-6 py-5",children:eJ?(0,a.jsxs)("div",{className:"space-y-5",children:[e6&&(0,a.jsx)("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:e6}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{htmlFor:"edit-title",className:"text-[13px] font-medium text-[#2C2C2C]",children:ee("tasks.titleLabel")}),(0,a.jsx)(D.p,{id:"edit-title",value:eH,onChange:e=>eI(e.target.value),className:"border-[#E5E0D8] text-sm focus-visible:ring-[#C67A52]",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{htmlFor:"edit-description",className:"text-[13px] font-medium text-[#2C2C2C]",children:ee("tasks.descriptionLabel")}),(0,a.jsx)(B.T,{id:"edit-description",value:eG,onChange:e=>eX(e.target.value),rows:4,className:"border-[#E5E0D8] text-sm resize-none focus-visible:ring-[#C67A52]"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{htmlFor:"edit-priority",className:"text-[13px] font-medium text-[#2C2C2C]",children:ee("tasks.priorityLabel")}),(0,a.jsxs)(T.l6,{value:eZ,onValueChange:eK,children:[(0,a.jsx)(T.bq,{className:"border-[#E5E0D8] text-sm focus:ring-[#C67A52]",children:(0,a.jsx)(T.yv,{})}),(0,a.jsxs)(T.gC,{children:[(0,a.jsx)(T.eb,{value:"low",children:ee("priority.low")}),(0,a.jsx)(T.eb,{value:"medium",children:ee("priority.medium")}),(0,a.jsx)(T.eb,{value:"high",children:ee("priority.high")})]})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{htmlFor:"edit-story-points",className:"text-[13px] font-medium text-[#2C2C2C]",children:ee("tasks.storyPointsLabel")}),(0,a.jsx)(D.p,{id:"edit-story-points",type:"number",min:"0",step:"0.5",value:eQ,onChange:e=>eY(e.target.value),className:"border-[#E5E0D8] text-sm focus-visible:ring-[#C67A52]"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{htmlFor:"edit-acceptance-criteria",className:"text-[13px] font-medium text-[#2C2C2C]",children:ee("tasks.acceptanceCriteriaLabel")}),(0,a.jsx)(B.T,{id:"edit-acceptance-criteria",value:e0,onChange:e=>e2(e.target.value),rows:4,className:"border-[#E5E0D8] text-sm resize-none focus-visible:ring-[#C67A52]"})]}),eW&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(_.J,{className:"text-[13px] font-medium text-[#2C2C2C]",children:ee("tasks.dependencies")}),e$.length>0&&(0,a.jsx)("div",{className:"space-y-1.5",children:e$.map(e=>(0,a.jsxs)("div",{className:"group flex items-center justify-between rounded-lg bg-[#FAF8F4] p-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(c.A,{className:"h-3.5 w-3.5 shrink-0 text-[#C67A52]"}),(0,a.jsx)("span",{className:"text-xs text-[#2C2C2C] truncate",children:e.title}),(0,a.jsx)(F.E,{className:"shrink-0 text-[10px] ".concat(ex[e.status]||""),children:ee("status.".concat(em[e.status]||e.status))})]}),(0,a.jsx)(S.$,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity ml-2 shrink-0",onClick:()=>eV(s=>s.filter(s=>s.uuid!==e.uuid)),children:(0,a.jsx)(l.A,{className:"h-3.5 w-3.5 text-[#9A9A9A] hover:text-[#D32F2F]"})})]},e.uuid))}),so.length>0&&(0,a.jsxs)(T.l6,{onValueChange:e=>{let s=eU.find(s=>s.uuid===e);s&&eV(e=>[...e,s])},children:[(0,a.jsx)(T.bq,{className:"h-8 border-[#E5E0D8] text-xs text-[#6B6B6B] focus:ring-[#C67A52]",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(d.A,{className:"h-3 w-3"}),(0,a.jsx)(T.yv,{placeholder:ee("tasks.addDependency")})]})}),(0,a.jsx)(T.gC,{children:so.map(e=>(0,a.jsx)(T.eb,{value:e.uuid,children:(0,a.jsx)("span",{className:"truncate",children:e.title})},e.uuid))})]},e$.length)]})]}):t?(0,a.jsxs)(el.P.div,{variants:ed.qG,initial:"initial",animate:"animate",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:ee("common.assignee")}),(0,a.jsx)("div",{className:"mt-2 flex items-center gap-2.5 rounded-lg bg-[#FAF8F4] p-3",children:t.assignee?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L.eu,{className:"h-7 w-7",children:(0,a.jsx)(L.q5,{className:"agent"===t.assignee.type?"bg-[#C67A52] text-white":"bg-[#E5E0D8] text-[#6B6B6B]",children:"agent"===t.assignee.type?(0,a.jsx)(m.A,{className:"h-3.5 w-3.5"}):t.assignee.name.charAt(0).toUpperCase()})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium text-[#2C2C2C]",children:t.assignee.name}),(0,a.jsx)("div",{className:"text-xs text-[#6B6B6B]",children:"agent"===t.assignee.type?"".concat(ee("common.agent")," • ").concat(t.assignee.assignedAt?(0,ec.r)(t.assignee.assignedAt):""):ee("common.user")})]})]}):(0,a.jsx)("span",{className:"text-sm text-[#9A9A9A]",children:ee("common.unassigned")})})]}),eq.length>0&&(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:ee("sessions.activeWorkers")}),(0,a.jsx)("div",{className:"mt-2 space-y-1.5",children:eq.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2.5 rounded-lg bg-[#FAF8F4] p-2.5",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full bg-green-500 flex-shrink-0"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-[#2C2C2C] truncate",children:e.sessionName}),(0,a.jsxs)("div",{className:"text-[10px] text-[#9A9A9A]",children:[e.agentName," \xb7 ",ep(e.checkinAt,ee)]})]})]},e.sessionUuid))})]}),(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:ee("common.description")}),(0,a.jsx)("div",{className:"mt-2",children:t.description?(0,a.jsx)("div",{className:"prose prose-sm max-w-none text-[13px] leading-relaxed text-[#2C2C2C]",children:(0,a.jsx)(I.jH,{plugins:{code:G.a},children:t.description})}):(0,a.jsx)("p",{className:"text-sm italic text-[#9A9A9A]",children:ee("common.noDescription")})})]}),t.acceptanceCriteria&&!(t.acceptanceCriteriaItems&&t.acceptanceCriteriaItems.length>0)&&(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:ee("tasks.acceptanceCriteria")}),(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)("div",{className:"prose prose-sm max-w-none text-[13px] leading-relaxed text-[#2C2C2C]",children:(0,a.jsx)(I.jH,{plugins:{code:G.a},children:t.acceptanceCriteria})})})]}),ew&&(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:ee("common.source")}),(0,a.jsx)("a",{href:"/projects/".concat(f,"/proposals/").concat(ew.uuid),className:"mt-2 flex items-center justify-between rounded-lg bg-[#FAF8F4] p-3 hover:bg-[#F0EDE5] transition-colors",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(u.A,{className:"h-3.5 w-3.5 text-[#C67A52]"}),(0,a.jsx)("span",{className:"text-xs text-[#2C2C2C]",children:ew.title})]})})]}),(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:ee("tasks.dependencies")}),eP&&(0,a.jsx)("div",{className:"mt-2 rounded-lg bg-destructive/10 p-2.5 text-xs text-destructive",children:eP}),eR?(0,a.jsx)("div",{className:"mt-2 flex items-center justify-center py-4",children:(0,a.jsx)(h.A,{className:"h-4 w-4 animate-spin text-[#9A9A9A]"})}):(0,a.jsxs)(a.Fragment,{children:[eS.length>0&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,a.jsx)(p.A,{className:"h-3 w-3 text-[#9A9A9A]"}),(0,a.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:ee("tasks.dependsOn")})]}),(0,a.jsx)("div",{className:"space-y-1.5",children:eS.map(e=>(0,a.jsxs)("div",{className:"group flex items-center justify-between rounded-lg bg-[#FAF8F4] p-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(c.A,{className:"h-3.5 w-3.5 shrink-0 text-[#C67A52]"}),(0,a.jsx)("span",{className:"text-xs text-[#2C2C2C] truncate",children:e.title}),(0,a.jsx)(F.E,{className:"shrink-0 text-[10px] ".concat(ex[e.status]||""),children:ee("status.".concat(em[e.status]||e.status))})]}),(0,a.jsx)(S.$,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity ml-2 shrink-0",onClick:()=>sc(e.uuid),children:(0,a.jsx)(l.A,{className:"h-3.5 w-3.5 text-[#9A9A9A] hover:text-[#D32F2F]"})})]},e.uuid))})]}),eB.length>0&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,a.jsx)(p.A,{className:"h-3 w-3 rotate-180 text-[#9A9A9A]"}),(0,a.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:ee("tasks.blockedByThis")})]}),(0,a.jsx)("div",{className:"space-y-1.5",children:eB.map(e=>(0,a.jsxs)("div",{className:"group flex items-center justify-between rounded-lg bg-[#FAF8F4] p-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(c.A,{className:"h-3.5 w-3.5 shrink-0 text-[#6B6B6B]"}),(0,a.jsx)("span",{className:"text-xs text-[#2C2C2C] truncate",children:e.title}),(0,a.jsx)(F.E,{className:"shrink-0 text-[10px] ".concat(ex[e.status]||""),children:ee("status.".concat(em[e.status]||e.status))})]}),(0,a.jsx)(S.$,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity ml-2 shrink-0",onClick:()=>sl(e.uuid),children:(0,a.jsx)(l.A,{className:"h-3.5 w-3.5 text-[#9A9A9A] hover:text-[#D32F2F]"})})]},e.uuid))})]}),0===eS.length&&0===eB.length&&(0,a.jsx)("p",{className:"mt-2 text-sm italic text-[#9A9A9A]",children:ee("tasks.noDependencies")}),sd.length>0&&(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(T.l6,{onValueChange:e=>sn(e),children:[(0,a.jsx)(T.bq,{className:"h-8 border-[#E5E0D8] text-xs text-[#6B6B6B] focus:ring-[#C67A52]",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(d.A,{className:"h-3 w-3"}),(0,a.jsx)(T.yv,{placeholder:ee("tasks.addDependency")})]})}),(0,a.jsx)(T.gC,{children:sd.map(e=>(0,a.jsx)(T.eb,{value:e.uuid,children:(0,a.jsx)("span",{className:"truncate",children:e.title})},e.uuid))})]},eS.length)})]})]}),t&&t.acceptanceCriteriaItems&&t.acceptanceCriteriaItems.length>0&&(()=>{let e=t.acceptanceCriteriaItems,s=t.acceptanceSummary,i=e=>"passed"===e?(0,a.jsx)(g.A,{className:"h-4 w-4 text-green-600"}):"failed"===e?(0,a.jsx)(v.A,{className:"h-4 w-4 text-red-600"}):(0,a.jsx)(j,{className:"h-4 w-4 text-yellow-600"}),r=e=>"passed"===e?"bg-green-50 text-green-700":"failed"===e?"bg-red-50 text-red-700":"bg-yellow-50 text-yellow-700",n=async(e,s)=>{(await V(t.uuid,[{uuid:e,status:s}])).success&&eg.refresh()};return(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:ee("acceptanceCriteria.title")}),s&&(0,a.jsx)(F.E,{className:r(t.acceptanceStatus||"pending"),variant:"secondary",children:ee("acceptanceCriteria.progress",{passed:s.passed,total:s.total})})]}),(0,a.jsxs)("div",{className:"mt-2 space-y-2",children:[e.map(e=>(0,a.jsx)(E.Zp,{className:"p-3",children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("div",{className:"mt-0.5 shrink-0",children:i(e.status)}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"text-xs text-[#2C2C2C]",children:e.description}),(0,a.jsx)(F.E,{variant:"outline",className:"text-[10px] shrink-0",children:e.required?ee("acceptanceCriteria.required"):ee("acceptanceCriteria.optional")})]}),(0,a.jsxs)("div",{className:"mt-2 space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[10px]",children:[(0,a.jsx)("span",{className:"text-[#9A9A9A] w-20 shrink-0",children:ee("acceptanceCriteria.devSelfCheck")}),(0,a.jsxs)(F.E,{className:"text-[10px] ".concat(r(e.devStatus)),variant:"secondary",children:[i(e.devStatus),(0,a.jsx)("span",{className:"ml-1",children:ee("acceptanceCriteria.status.".concat(e.devStatus))})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[10px]",children:[(0,a.jsx)("span",{className:"text-[#9A9A9A] w-20 shrink-0",children:ee("acceptanceCriteria.verification")}),(0,a.jsxs)(F.E,{className:"text-[10px] ".concat(r(e.status)),variant:"secondary",children:[i(e.status),(0,a.jsx)("span",{className:"ml-1",children:ee("acceptanceCriteria.status.".concat(e.status))})]})]})]}),e.devEvidence&&(0,a.jsxs)("div",{className:"mt-2 rounded bg-[#FAF8F4] p-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium text-[#9A9A9A]",children:ee("acceptanceCriteria.devEvidence")}),(0,a.jsx)("p",{className:"text-[11px] text-[#2C2C2C] mt-0.5",children:e.devEvidence})]}),e.evidence&&(0,a.jsxs)("div",{className:"mt-2 rounded bg-[#FAF8F4] p-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium text-[#9A9A9A]",children:ee("acceptanceCriteria.verifyEvidence")}),(0,a.jsx)("p",{className:"text-[11px] text-[#2C2C2C] mt-0.5",children:e.evidence})]}),"pending"===e.status?(0,a.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,a.jsxs)(S.$,{size:"sm",variant:"outline",className:"h-8 min-h-[44px] sm:min-h-0 flex-1 sm:flex-none text-xs text-green-700 border-green-200 hover:bg-green-50",onClick:()=>n(e.uuid,"passed"),children:[(0,a.jsx)(g.A,{className:"h-3.5 w-3.5 mr-1"}),ee("acceptanceCriteria.pass")]}),(0,a.jsxs)(S.$,{size:"sm",variant:"outline",className:"h-8 min-h-[44px] sm:min-h-0 flex-1 sm:flex-none text-xs text-red-700 border-red-200 hover:bg-red-50",onClick:()=>n(e.uuid,"failed"),children:[(0,a.jsx)(v.A,{className:"h-3.5 w-3.5 mr-1"}),ee("acceptanceCriteria.fail")]})]}):(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(S.$,{size:"sm",variant:"ghost",className:"h-7 min-h-[44px] sm:min-h-0 text-xs text-[#9A9A9A] hover:text-[#2C2C2C]",onClick:async()=>{(await W(t.uuid,e.uuid)).success&&eg.refresh()},children:ee("acceptanceCriteria.undoVerification")})})]})]})},e.uuid)),s&&(s.requiredPending>0||s.requiredFailed>0)&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-yellow-50 p-3 mt-2",children:[(0,a.jsx)(b.A,{className:"h-4 w-4 text-yellow-600 shrink-0"}),(0,a.jsx)("span",{className:"text-xs text-yellow-700",children:ee("acceptanceCriteria.gateBlocked",{count:s.requiredPending+s.requiredFailed})})]}),s&&0===s.requiredPending&&0===s.requiredFailed&&s.required>0&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-green-50 p-3 mt-2",children:[(0,a.jsx)(g.A,{className:"h-4 w-4 text-green-600 shrink-0"}),(0,a.jsx)("span",{className:"text-xs text-green-700",children:ee("acceptanceCriteria.gateReady")})]})]})]})})(),(0,a.jsxs)("div",{className:"mt-5 flex-1",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:ee("common.activity")}),(0,a.jsx)("div",{className:"mt-2 space-y-3",children:eC?(0,a.jsx)("div",{className:"flex items-center justify-center py-4",children:(0,a.jsx)(h.A,{className:"h-4 w-4 animate-spin text-[#9A9A9A]"})}):0===eA.length?(0,a.jsx)("p",{className:"text-sm text-[#9A9A9A] italic",children:ee("common.noActivity")}):eA.map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,a.jsx)("div",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-[#F5F2EC]",children:(0,a.jsx)("div",{className:"h-2 w-2 rounded-full ".concat(function(e){switch(e){case"task_created":return"bg-[#C67A52]";case"task_assigned":case"task_claimed":return"bg-[#1976D2]";case"task_started":return"bg-[#5A9E6F]";case"task_submitted":return"bg-[#7B1FA2]";case"task_completed":case"task_verified":return"bg-[#00796B]";case"task_released":return"bg-[#E65100]";default:return"bg-[#6B6B6B]"}}(e.action))})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-xs text-[#2C2C2C]",children:function(e,s){let t=e.sessionName?"".concat(e.actorName," / ").concat(e.sessionName):e.actorName,{action:a}=e;switch(a){case"task_created":return s("activity.taskCreated",{actor:t});case"task_assigned":return s("activity.taskAssigned",{actor:t});case"task_claimed":return s("activity.taskClaimed",{actor:t});case"task_started":return s("activity.taskStarted",{actor:t});case"task_submitted":return s("activity.taskSubmitted",{actor:t});case"task_completed":case"task_verified":return s("activity.taskCompleted",{actor:t});case"task_released":return s("activity.taskReleased",{actor:t});case"task_status_changed":return s("activity.taskStatusChanged",{actor:t});default:return"".concat(t,": ").concat(a)}}(e,ee)}),(0,a.jsx)("p",{className:"text-[10px] text-[#9A9A9A]",children:ep(e.createdAt,ee)})]})]},e.uuid))})]}),(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:ee("comments.title")}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(J.$,{targetType:"task",targetUuid:t.uuid,currentUserUuid:P,compact:!0})})]})]}):null})}),(0,a.jsx)("div",{className:"border-t border-[#F5F2EC] px-6 py-4",children:(0,a.jsx)("div",{className:"flex items-center gap-3",children:eJ?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.$,{variant:"outline",className:"border-[#E5E0D8]",onClick:sa,disabled:e1,children:ee("common.cancel")}),(0,a.jsx)(S.$,{className:"bg-[#C67A52] hover:bg-[#B56A42] text-white",onClick:si,disabled:e1||!eH.trim(),children:e1?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.A,{className:"mr-2 h-4 w-4 animate-spin"}),ee("common.saving")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(A.A,{className:"mr-2 h-4 w-4"}),eW?ee("common.create"):ee("tasks.saveChanges")]})})]}):t?(0,a.jsxs)(a.Fragment,{children:["done"!==t.status&&"closed"!==t.status&&(0,a.jsxs)(S.$,{variant:"outline",className:"border-[#E5E0D8]",onClick:()=>eE(!0),disabled:ej,children:[(0,a.jsx)(N.A,{className:"mr-2 h-4 w-4"}),ee("common.assign")]}),e8&&(0,a.jsxs)(S.$,{className:"flex-1 bg-[#1976D2] hover:bg-[#1565C0] text-white",onClick:()=>st("in_progress"),disabled:ej,children:[(0,a.jsx)(C.A,{className:"mr-2 h-4 w-4"}),ee("tasks.startWork")]}),se&&(0,a.jsxs)(S.$,{className:"flex-1 bg-[#7B1FA2] hover:bg-[#6A1B9A] text-white",onClick:()=>st("to_verify"),disabled:ej,children:[(0,a.jsx)(y.A,{className:"mr-2 h-4 w-4"}),ee("tasks.submitForReview")]}),ss&&(0,a.jsxs)(S.$,{className:"flex-1 bg-[#22C55E] hover:bg-[#16A34A] text-white",onClick:()=>st("done"),disabled:ej,children:[(0,a.jsx)(w,{className:"mr-2 h-4 w-4"}),ee("tasks.markAsVerified")]}),("done"===t.status||"closed"===t.status)&&(0,a.jsx)("div",{className:"text-sm text-[#9A9A9A] text-center w-full",children:ee("tasks.taskCompleted")}),(0,a.jsx)("div",{className:"ml-auto",children:(0,a.jsxs)(U.Lt,{children:[(0,a.jsx)(U.tv,{asChild:!0,children:(0,a.jsx)(S.$,{variant:"outline",size:"icon",className:"h-9 w-9 border-[#E5E0D8] text-[#D32F2F] hover:bg-[#FFEBEE] hover:text-[#D32F2F] hover:border-[#D32F2F]",children:(0,a.jsx)(k.A,{className:"h-4 w-4"})})}),(0,a.jsxs)(U.EO,{children:[(0,a.jsxs)(U.wd,{children:[(0,a.jsx)(U.r7,{children:ee("tasks.deleteTask")}),(0,a.jsx)(U.$v,{children:ee("tasks.deleteTaskConfirm",{title:t.title})})]}),(0,a.jsxs)(U.ck,{children:[(0,a.jsx)(U.Zr,{children:ee("common.cancel")}),(0,a.jsx)(U.Rx,{variant:"destructive",onClick:sr,disabled:e4,children:e4?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.A,{className:"mr-2 h-4 w-4 animate-spin"}),ee("common.delete")]}):ee("common.delete")})]})]})]})})]}):null})})]}),t&&eF&&(0,a.jsx)(es,{task:t,projectUuid:f,currentUserUuid:P,onClose:()=>eE(!1)})]})}},81531:(e,s,t)=>{t.d(s,{T:()=>i});var a=t(1856);function i(e,s){let[t,i]=(0,a.useState)(null!=s?s:null),[r,n]=(0,a.useState)(()=>new URLSearchParams(window.location.search).get("tab")),c=(0,a.useCallback)((s,t)=>{let a=new URLSearchParams(window.location.search);s?a.set("panel",s):a.delete("panel"),t?a.set("tab",t):a.delete("tab");let i=a.toString();return i?"".concat(e,"?").concat(i):e},[e]),l=(0,a.useCallback)((e,s)=>{let t=c(e,s);window.history.replaceState(null,"",t),i(e),n(null!=s?s:null)},[c]),d=(0,a.useCallback)(()=>{let e=c(null);window.history.replaceState(null,"",e),i(null),n(null)},[c]),o=(0,a.useCallback)(e=>{if(!t)return;let s=c(t,e);window.history.replaceState(null,"",s),n(e)},[c,t]);return(0,a.useEffect)(()=>{function e(){let e=new URLSearchParams(window.location.search),s=e.get("panel");s?(i(s),n(e.get("tab"))):(i(null),n(null))}return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),{selectedId:t,selectedTab:r,openPanel:l,closePanel:d,switchTab:o}}},90795:(e,s,t)=>{t.d(s,{Bj:()=>l,L8:()=>i,Wl:()=>d,_5:()=>c,eT:()=>r,fw:()=>n});var a=t(38106);let i=480;function r(e){switch(e){case"done":return"bg-[#00796B]";case"in_progress":return"bg-[#1976D2]";case"to_verify":return"bg-[#7B1FA2]";case"open":case"assigned":return"bg-[#E65100]";case"closed":return"bg-[#9A9A9A]";default:return"bg-[#D9D9D9]"}}function n(e,s){let t=new Date(e),i=new Date().getTime()-t.getTime(),r=Math.floor(i/6e4),n=Math.floor(i/36e5),c=Math.floor(i/864e5);return r<1?s("time.justNow"):r<60?s("time.minutesAgo",{minutes:r}):n<24?s("time.hoursAgo",{hours:n}):c<7?s("time.daysAgo",{days:c}):(0,a.r)(t)}let c={todo:"bg-[#FFF3E0] text-[#E65100]",in_progress:"bg-[#E3F2FD] text-[#1976D2]",human_conduct_required:"bg-[#F3E5F5] text-[#7B1FA2]",done:"bg-[#E0F2F1] text-[#00796B]"},l={todo:"todo",in_progress:"inProgress",human_conduct_required:"humanConductRequired",done:"done"},d={open:"open",researching:"researching",answer_questions:"answerQuestions",planning:"planning",review_proposal:"reviewProposal",building:"building",verify_work:"verifyWork",done:"done"}},92745:(e,s,t)=>{t.d(s,{_u:()=>N,c_:()=>g,nF:()=>A,qK:()=>j});var a=t(90508),i=t(1856),r=t(26145),n=t(75380);t(33805);var c=t(10196),l=t.n(c),d=t(39268),o=t(57731);let x={open:"bg-[#FFF3E0] text-[#E65100]",assigned:"bg-[#E3F2FD] text-[#1976D2]",in_progress:"bg-[#E8F5E9] text-[#5A9E6F]",to_verify:"bg-[#F3E5F5] text-[#7B1FA2]",done:"bg-[#E0F2F1] text-[#00796B]",closed:"bg-[#F5F5F5] text-[#9A9A9A]"},m={open:"#E65100",assigned:"#1976D2",in_progress:"#5A9E6F",to_verify:"#7B1FA2",done:"#00796B",closed:"#9A9A9A"},u={low:"priority.low",medium:"priority.medium",high:"priority.high",critical:"priority.critical"},h={open:"status.open",assigned:"status.assigned",in_progress:"status.inProgress",to_verify:"status.toVerify",done:"status.done",closed:"status.closed"},p={low:"bg-[#9A9A9A]",medium:"bg-[#E65100]",high:"bg-[#D32F2F]",critical:"bg-[#B71C1C]"},g={taskNode:function(e){let{data:s}=e,t=(0,d.c)();return(0,a.jsxs)("div",{className:"rounded-lg border-2 border-[#E5E2DC] bg-white px-4 py-3 shadow-sm min-w-[200px] max-w-[260px] cursor-pointer hover:border-[#C67A52] transition-colors",children:[(0,a.jsx)(r.h7,{type:"target",position:n.yX.Top,className:"!bg-[#C67A52] !w-2 !h-2"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,a.jsx)(o.E,{className:"text-[10px] ".concat(x[s.status]||""),children:t(h[s.status]||s.status)}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("div",{className:"h-1.5 w-1.5 rounded-full ".concat(p[s.priority]||"")}),(0,a.jsx)("span",{className:"text-[10px] text-[#9A9A9A]",children:t(u[s.priority]||s.priority)})]})]}),(0,a.jsx)("p",{className:"text-xs font-medium text-[#2C2C2C] leading-snug line-clamp-2",children:s.title}),(0,a.jsx)(r.h7,{type:"source",position:n.yX.Bottom,className:"!bg-[#C67A52] !w-2 !h-2"})]})}},v={taskNode:function(e){let{data:s}=e,t=m[s.status]||"#E5E0D8";return(0,a.jsxs)("div",{className:"rounded-md border-[1.5px] bg-white px-2.5 py-1.5 shadow-sm",style:{borderColor:t,width:f},children:[(0,a.jsx)(r.h7,{type:"target",position:n.yX.Top,className:"!bg-[#C67A52] !w-1.5 !h-1.5"}),(0,a.jsx)("p",{className:"text-[10px] font-medium text-[#2C2C2C] leading-tight line-clamp-2",children:s.title}),(0,a.jsx)(r.h7,{type:"source",position:n.yX.Bottom,className:"!bg-[#C67A52] !w-1.5 !h-1.5"})]})}},f=150,j={animated:!0,style:{stroke:"#C67A52",strokeWidth:2},markerEnd:{type:"arrowclosed",color:"#C67A52"}},b={animated:!0,style:{stroke:"#C67A52",strokeWidth:1.5},markerEnd:{type:"arrowclosed",color:"#C67A52"}};function A(e,s,t){var a,i,r,n;let c=null!=(a=null==t?void 0:t.nodeWidth)?a:240,d=null!=(i=null==t?void 0:t.nodeHeight)?i:80,o=new(l()).graphlib.Graph;return o.setDefaultEdgeLabel(()=>({})),o.setGraph({rankdir:"TB",nodesep:null!=(r=null==t?void 0:t.nodesep)?r:50,ranksep:null!=(n=null==t?void 0:t.ranksep)?n:80}),e.forEach(e=>{o.setNode(e.id,{width:c,height:d})}),s.forEach(e=>{o.setEdge(e.source,e.target)}),l().layout(o),{nodes:e.map(e=>{let s=o.node(e.id);return{...e,position:{x:s.x-c/2,y:s.y-d/2}}}),edges:s}}function N(e){let{tasks:s,edges:t,readonly:n=!1,compact:c=!1,height:l,onNodeClick:o,className:x}=e,m=(0,d.c)(),{layoutedNodes:u,layoutedEdges:h}=(0,i.useMemo)(()=>{let e=s.map(e=>{var s;return{id:e.uuid,type:"taskNode",position:{x:0,y:0},data:{title:e.title,status:e.status,priority:e.priority,proposalUuid:null!=(s=e.proposalUuid)?s:null}}}),a=A(e,t.map((e,s)=>({id:"e-".concat(s),source:e.to,target:e.from,...c?b:j})),c?{nodeWidth:f,nodeHeight:50,nodesep:20,ranksep:40}:void 0);return{layoutedNodes:a.nodes,layoutedEdges:a.edges}},[s,t,c]);return 0===s.length?(0,a.jsx)("div",{className:"flex items-center justify-center text-sm text-[#9A9A9A] ".concat(x||""),style:l?{height:l}:void 0,children:m("tasks.noTasksToDisplay")}):(0,a.jsx)("div",{className:"rounded-[10px] border border-[#E5E0D8] bg-[#F7F6F3] ".concat(x||""),style:l?{height:l}:void 0,children:(0,a.jsxs)(r.Gc,{nodes:u,edges:h,nodeTypes:c?v:g,onNodeClick:o?(e,s)=>o(s.id):void 0,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:1.5,proOptions:{hideAttribution:!0},nodesDraggable:!n,nodesConnectable:!n,elementsSelectable:!n,panOnDrag:!0,zoomOnScroll:!0,children:[(0,a.jsx)(r.VS,{color:"#E5E0D8",gap:20}),!n&&(0,a.jsx)(r.H2,{className:"[&>button]:border-[#E5E0D8] [&>button]:bg-white [&>button]:text-[#2C2C2C] [&>button:hover]:bg-[#FAF8F4]"})]})})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39611],{4365:(e,t,a)=>{a.d(t,{G7:()=>o,L$:()=>u,h_:()=>x,oI:()=>d,uB:()=>l,xL:()=>c});var s=a(90508);a(1856);var r=a(64731),n=a(30044),i=a(24377);function l(e){let{className:t,...a}=e;return(0,s.jsx)(r.uB,{"data-slot":"command",className:(0,i.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...a})}function o(e){let{className:t,...a}=e;return(0,s.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,s.jsx)(n.A,{className:"size-4 shrink-0 opacity-50"}),(0,s.jsx)(r.uB.Input,{"data-slot":"command-input",className:(0,i.cn)("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...a})]})}function d(e){let{className:t,...a}=e;return(0,s.jsx)(r.uB.List,{"data-slot":"command-list",className:(0,i.cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...a})}function c(e){let{...t}=e;return(0,s.jsx)(r.uB.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function u(e){let{className:t,...a}=e;return(0,s.jsx)(r.uB.Group,{"data-slot":"command-group",className:(0,i.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...a})}function x(e){let{className:t,...a}=e;return(0,s.jsx)(r.uB.Item,{"data-slot":"command-item",className:(0,i.cn)("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...a})}},14554:(e,t,a)=>{a.d(t,{p:()=>n});var s=a(90508);a(1856);var r=a(24377);function n(e){let{className:t,type:a,...n}=e;return(0,s.jsx)("input",{type:a,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}},15972:(e,t,a)=>{a.d(t,{T:()=>n});var s=a(90508);a(1856);var r=a(24377);function n(e){let{className:t,...a}=e;return(0,s.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...a})}},18885:(e,t,a)=>{a.d(t,{Z:()=>r});var s=a(52217);let r=(0,s.createServerReference)("60ee487b6ee7a95212d187583976479e92aeff9d5f",s.callServer,void 0,s.findSourceMapURL,"deleteIdeaAction")},37915:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(66206).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},41033:(e,t,a)=>{a.d(t,{C:()=>o,z:()=>l});var s=a(90508);a(1856);var r=a(97964),n=a(63197),i=a(24377);function l(e){let{className:t,...a}=e;return(0,s.jsx)(n.Root,{"data-slot":"radio-group",className:(0,i.cn)("grid gap-3",t),...a})}function o(e){let{className:t,...a}=e;return(0,s.jsx)(n.Item,{"data-slot":"radio-group-item",className:(0,i.cn)("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:(0,s.jsx)(n.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:(0,s.jsx)(r.A,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}},42641:(e,t,a)=>{a.d(t,{R:()=>j});var s=a(90508),r=a(1856),n=a(23675),i=a(39268),l=a(17730),o=a(78948),d=a(37915),c=a(62898),u=a(57893),x=a(85226),m=a(22922),p=a(14554),f=a(81750),g=a(52217);let h=(0,g.createServerReference)("702f319e2077ad37c4270562c100077fcbf2c67fa3",g.callServer,void 0,g.findSourceMapURL,"submitElaborationAnswersAction"),b="__other__",v={functional:"functional",non_functional:"nonFunctional",business_context:"businessContext",technical_context:"technicalContext",user_scenario:"userScenario",scope:"scope"};function j(e){let{ideaUuid:t,elaboration:a,onRefresh:r}=e,l=(0,i.c)("elaboration"),o=(0,n.useRouter)();if(!a||0===a.rounds.length)return null;let{summary:d,rounds:c}=a;return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wide text-[#9A9A9A]",children:l("title")}),(0,s.jsx)("span",{className:"text-xs font-medium text-[#C67A52]",children:l("answeredCounter",{answered:d.answeredQuestions,total:d.totalQuestions})})]}),(0,s.jsx)("div",{className:"space-y-2.5",children:c.map(e=>(0,s.jsx)(N,{round:e,ideaUuid:t,onAnswered:async()=>{await (null==r?void 0:r()),o.refresh()}},e.uuid))})]})}function N(e){let{round:t,ideaUuid:a,onAnswered:n}=e,d=(0,i.c)("elaboration"),c="pending_answers"===t.status,u="answered"===t.status||"validated"===t.status||"needs_followup"===t.status,[x,m]=(0,r.useState)(c);return(0,s.jsx)(f.Nt,{open:x,onOpenChange:m,children:(0,s.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#E5E0D8] bg-white",children:[(0,s.jsx)(f.R6,{asChild:!0,children:(0,s.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between px-4 py-3 text-left transition-colors cursor-pointer hover:bg-[#FAF8F4] ".concat(x?"bg-[#F7F6F3] border-b border-[#E5E0D8]":""),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[x?(0,s.jsx)(l.A,{className:"h-4 w-4 text-[#6B6B6B]"}):(0,s.jsx)(o.A,{className:"h-4 w-4 text-[#6B6B6B]"}),(0,s.jsx)("span",{className:"flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-full text-[11px] font-semibold text-white ".concat(c?"bg-[#C67A52]":"bg-[#888780]"),children:t.roundNumber}),(0,s.jsx)("span",{className:"text-[13px] font-semibold text-[#2C2C2C]",children:d("roundLabel",{number:t.roundNumber})}),!x&&(0,s.jsxs)("span",{className:"text-xs text-[#9A9A9A]",children:["\xb7 ",d("questionCount",{count:t.questions.length})]})]}),u?(0,s.jsx)("span",{className:"rounded bg-[#E8F5E9] px-2 py-0.5 text-[10px] font-medium text-[#2E7D32]",children:d("statusAnswered")}):(0,s.jsx)("span",{className:"rounded bg-[#FFF3E0] px-2 py-0.5 text-[10px] font-medium text-[#E65100]",children:d("pendingAnswers")})]})}),(0,s.jsx)(f.Ke,{children:c?(0,s.jsx)(y,{round:t,ideaUuid:a,onAnswered:n}):(0,s.jsx)(w,{round:t})})]})})}function w(e){let{round:t}=e,a=(0,i.c)("elaboration");return(0,s.jsx)("div",{className:"space-y-4 px-4 py-4",children:t.questions.map((e,r)=>{var n,i;let l=(null==(n=e.answer)?void 0:n.selectedOptionId)?e.options.find(t=>{var a;return t.id===(null==(a=e.answer)?void 0:a.selectedOptionId)}):null,o=(null==(i=e.answer)?void 0:i.customText)||(null==l?void 0:l.label)||a("noAnswer"),d=v[e.category]||e.category;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("span",{className:"text-xs leading-relaxed text-[#6B6B6B]",children:["Q: ",e.text]}),(0,s.jsx)("span",{className:"shrink-0 text-[11px] italic text-[#B0B0B0]",children:a("category.".concat(d))})]}),(0,s.jsxs)("p",{className:"mt-1 text-xs font-medium leading-relaxed text-[#2C2C2C]",children:["A: ",o]}),r<t.questions.length-1&&(0,s.jsx)("div",{className:"mt-4 h-px bg-[#F0EEEA]"})]},e.uuid)})})}function y(e){var t;let{round:a,ideaUuid:n,onAnswered:l}=e,f=(0,i.c)("elaboration"),[g,j]=(0,r.useState)(0),N=(0,r.useRef)(g),[w,y]=(0,r.useState)("right"),[A,C]=(0,r.useState)({}),[k,B]=(0,r.useState)(!1),[E,F]=(0,r.useState)(null);(0,r.useEffect)(()=>{N.current=g},[g]);let z=(0,r.useCallback)((e,t)=>{y("left"===t?"right":"left"),j(e)},[]),S=a.questions,_=S[g],I=v[_.category]||_.category,R=(0,r.useCallback)((e,t)=>{if(C(a=>{var s;return{...a,[e]:{questionId:e,selectedOptionId:t===b?null:t,customText:t===b?(null==(s=a[e])?void 0:s.customText)||"":null}}}),t!==b){let e=Math.min(S.length-1,N.current+1);e!==N.current&&setTimeout(()=>z(e,"left"),200)}},[S.length,z]),D=(0,r.useCallback)((e,t)=>{C(a=>({...a,[e]:{...a[e],questionId:e,selectedOptionId:null,customText:t}}))},[]),T=S.filter(e=>e.required).every(e=>{let t=A[e.questionId];return!!t&&!!(t.selectedOptionId||t.customText&&t.customText.trim())}),O=async()=>{B(!0),F(null);let e=Object.values(A),t=await h(n,a.uuid,e);t.success?(await l(),B(!1)):(B(!1),F(t.error||f("submitFailed")))},q=(e=>{let t=A[e];return t?null===t.selectedOptionId&&null!==t.customText&&void 0!==t.customText?b:t.selectedOptionId||null:null})(_.questionId),L=q===b;return(0,s.jsxs)("div",{className:"overflow-hidden p-3.5",children:[(0,s.jsxs)("div",{className:"right"===w?"animate-in slide-in-from-right-4 duration-200":"animate-in slide-in-from-left-4 duration-200",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsx)("div",{className:"flex-1 text-sm text-[#6B6B6B]",children:_.text}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,s.jsx)(m.$,{variant:"ghost",size:"icon",onClick:()=>z(g-1,"right"),disabled:0===g,className:"h-7 w-7 text-[#6B6B6B] disabled:opacity-30",children:(0,s.jsx)(d.A,{className:"h-4 w-4"})}),(0,s.jsx)("span",{className:"text-xs text-[#9A9A9A]",children:f("navCounter",{current:g+1,total:S.length})}),(0,s.jsx)(m.$,{variant:"ghost",size:"icon",onClick:()=>z(g+1,"left"),disabled:g===S.length-1,className:"h-7 w-7 text-[#6B6B6B] disabled:opacity-30",children:(0,s.jsx)(o.A,{className:"h-4 w-4"})})]})]}),(0,s.jsxs)("div",{className:"mt-3",children:[_.options.map((e,t)=>{let a=q===e.id;return(0,s.jsxs)("div",{children:[(0,s.jsxs)(m.$,{variant:"ghost",onClick:()=>R(_.questionId,e.id),className:"flex w-full items-center justify-between px-3.5 py-3 h-auto text-left transition-colors rounded-none ".concat(a?"bg-[#F7F6F3]":"hover:bg-[#FAF8F4]"),children:[(0,s.jsxs)("span",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-[#E5E0D8] text-xs font-medium text-[#5F5E5A]",children:t+1}),(0,s.jsxs)("span",{className:"flex flex-col items-start",children:[(0,s.jsx)("span",{className:"text-[13px] text-[#2C2C2A]",children:e.label}),e.description&&(0,s.jsx)("span",{className:"text-[11px] text-[#9A9A9A]",children:e.description})]})]}),a&&(0,s.jsx)(c.A,{className:"h-4 w-4 text-[#888780]"})]}),t<_.options.length-1&&(0,s.jsx)("div",{className:"h-px bg-[#F0EEEA]"})]},e.id)}),(0,s.jsx)("div",{className:"h-px bg-[#F0EEEA]"}),(0,s.jsxs)("div",{className:"flex w-full items-center gap-2.5 px-3.5 py-3 transition-colors ".concat(L?"bg-[#F7F6F3]":"hover:bg-[#FAF8F4]"),children:[(0,s.jsx)("span",{className:"flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md bg-[#E5E0D8]",onClick:()=>R(_.questionId,b),children:(0,s.jsx)(u.A,{className:"h-3.5 w-3.5 text-[#B4B2A9]"})}),L?(0,s.jsx)(p.p,{type:"text",value:(null==(t=A[_.questionId])?void 0:t.customText)||"",onChange:e=>D(_.questionId,e.target.value),placeholder:f("somethingElse"),className:"flex-1 border-none bg-transparent text-[13px] text-[#2C2C2A] placeholder:italic placeholder:text-[#B4B2A9] shadow-none focus-visible:ring-0",autoFocus:!0}):(0,s.jsx)(m.$,{variant:"ghost",onClick:()=>R(_.questionId,b),className:"flex-1 justify-start text-left text-[13px] italic text-[#B4B2A9] h-auto p-0 hover:bg-transparent",children:f("somethingElse")})]})]})]},g),E&&(0,s.jsx)("div",{className:"mt-3 rounded-lg bg-destructive/10 p-2.5 text-[12px] text-destructive",children:E}),(0,s.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1.5 text-[11px] text-[#B0B0B0]",children:[(0,s.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-[#C67A52]"}),f("category.".concat(I))]}),(0,s.jsx)(m.$,{onClick:O,disabled:!T||k,className:"bg-[#C67A52] hover:bg-[#B56A42] text-white text-[13px]",children:k?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}),f("submitting")]}):f("submitAnswers")})]})]})}},51817:(e,t,a)=>{a.d(t,{$v:()=>f,EO:()=>u,Lt:()=>l,Rx:()=>g,Zr:()=>h,ck:()=>m,r7:()=>p,tv:()=>o,wd:()=>x});var s=a(90508);a(1856);var r=a(90299),n=a(24377),i=a(22922);function l(e){let{...t}=e;return(0,s.jsx)(r.Root,{"data-slot":"alert-dialog",...t})}function o(e){let{...t}=e;return(0,s.jsx)(r.Trigger,{"data-slot":"alert-dialog-trigger",...t})}function d(e){let{...t}=e;return(0,s.jsx)(r.Portal,{"data-slot":"alert-dialog-portal",...t})}function c(e){let{className:t,...a}=e;return(0,s.jsx)(r.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,n.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function u(e){let{className:t,size:a="default",...i}=e;return(0,s.jsxs)(d,{children:[(0,s.jsx)(c,{}),(0,s.jsx)(r.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,n.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg",t),...i})]})}function x(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,n.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",t),...a})}function m(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,n.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",t),...a})}function p(e){let{className:t,...a}=e;return(0,s.jsx)(r.Title,{"data-slot":"alert-dialog-title",className:(0,n.cn)("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",t),...a})}function f(e){let{className:t,...a}=e;return(0,s.jsx)(r.Description,{"data-slot":"alert-dialog-description",className:(0,n.cn)("text-muted-foreground text-sm",t),...a})}function g(e){let{className:t,variant:a="default",size:l="default",...o}=e;return(0,s.jsx)(i.$,{variant:a,size:l,asChild:!0,children:(0,s.jsx)(r.Action,{"data-slot":"alert-dialog-action",className:(0,n.cn)(t),...o})})}function h(e){let{className:t,variant:a="outline",size:l="default",...o}=e;return(0,s.jsx)(i.$,{variant:a,size:l,asChild:!0,children:(0,s.jsx)(r.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,n.cn)(t),...o})})}},57731:(e,t,a)=>{a.d(t,{E:()=>o});var s=a(90508);a(1856);var r=a(49499),n=a(54154),i=a(24377);let l=(0,r.F)("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline",success:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100",warning:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:a="default",asChild:r=!1,...o}=e,d=r?n.bL:"span";return(0,s.jsx)(d,{"data-slot":"badge","data-variant":a,className:(0,i.cn)(l({variant:a}),t),...o})}},59809:(e,t,a)=>{a.d(t,{i:()=>N});var s=a(90508),r=a(1856),n=a(23675),i=a(39268),l=a(9160),o=a(85226),d=a(5425),c=a(94903),u=a(22922),x=a(88064),m=a(41033),p=a(91846),f=a(52217);let g=(0,f.createServerReference)("0001960bafd749f60c5daf5bf3ba30b546ed920c71",f.callServer,void 0,f.findSourceMapURL,"getPmAgentsAction"),h=(0,f.createServerReference)("4004515421cee66239801b5c67f258475b249ba1ea",f.callServer,void 0,f.findSourceMapURL,"claimIdeaAction"),b=(0,f.createServerReference)("6033e1b95a65f202a52a6c893ef6879a5ea6d41f3f",f.callServer,void 0,f.findSourceMapURL,"claimIdeaToAgentAction"),v=(0,f.createServerReference)("60c8e7782eaba4568e3c087b3714fa32c4ced85ddf",f.callServer,void 0,f.findSourceMapURL,"claimIdeaToUserAction"),j=(0,f.createServerReference)("4061a070c7e88c5985f3e622263de70c08970d9483",f.callServer,void 0,f.findSourceMapURL,"releaseIdeaAction");function N(e){var t;let{idea:a,projectUuid:f,currentUserUuid:N,onClose:w}=e,y=(0,i.c)(),A=(0,n.useRouter)(),[C,k]=(0,r.useState)(!1),[B,E]=(0,r.useState)("self"),[F,z]=(0,r.useState)(""),[S,_]=(0,r.useState)(""),[I,R]=(0,r.useState)([]),[D,T]=(0,r.useState)([]),[O,q]=(0,r.useState)(!0),L=!!a.assignee;(0,r.useEffect)(()=>{!async function(){q(!0);let e=await g();R(e.agents||[]),T((e.users||[]).filter(e=>e.uuid!==N)),q(!1)}()},[N]);let U=async()=>{let e;if(k(!0),"self"===B)e=await h(a.uuid);else if("agent"===B&&F)e=await b(a.uuid,F);else if("user"===B&&S)e=await v(a.uuid,S);else{if("release"!==B)return void k(!1);e=await j(a.uuid)}k(!1),(null==e?void 0:e.success)&&(A.refresh(),w())},M="self"===B||"agent"===B&&F||"user"===B&&S||"release"===B&&L;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-50 bg-black/40",onClick:w}),(0,s.jsxs)("div",{className:"fixed left-1/2 top-1/2 z-50 w-[400px] -translate-x-1/2 -translate-y-1/2 rounded-2xl bg-white shadow-xl border border-[#E5E0D8]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-[#E5E0D8] px-6 py-5",children:[(0,s.jsx)("h2",{className:"text-base font-semibold text-[#2C2C2C]",children:y("ideas.assignIdea")}),(0,s.jsx)("button",{onClick:w,className:"text-[#9A9A9A] hover:text-[#6B6B6B] transition-colors",children:(0,s.jsx)(l.A,{className:"h-5 w-5"})})]}),(0,s.jsxs)("div",{className:"p-6 space-y-4",children:[(0,s.jsxs)("div",{className:"rounded-lg bg-[#FAF8F4] p-3",children:[(0,s.jsx)("p",{className:"text-[13px] font-medium text-[#2C2C2C]",children:a.title}),a.content&&(0,s.jsx)("p",{className:"mt-1 text-[11px] text-[#6B6B6B] line-clamp-2",children:a.content})]}),L&&(0,s.jsx)("div",{className:"rounded-lg bg-[#E3F2FD] p-3",children:(0,s.jsxs)("p",{className:"text-xs text-[#1976D2]",children:[y("common.currentAssignee"),": ",(0,s.jsx)("span",{className:"font-medium",children:null==(t=a.assignee)?void 0:t.name})]})}),(0,s.jsx)("p",{className:"text-[13px] text-[#6B6B6B]",children:y("ideas.selectIdeaAssignee")}),O?(0,s.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,s.jsx)(o.A,{className:"h-6 w-6 animate-spin text-[#9A9A9A]"})}):(0,s.jsxs)(m.z,{value:B,onValueChange:e=>E(e),className:"space-y-3",children:[(0,s.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors cursor-pointer ".concat("self"===B?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8] hover:border-[#C67A52]/50"),onClick:()=>E("self"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)(m.C,{value:"self",id:"idea-self",className:"border-[#C67A52] text-[#C67A52]"}),(0,s.jsx)(x.J,{htmlFor:"idea-self",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:y("assign.assignToMyself")})]}),(0,s.jsx)("p",{className:"mt-2 ml-6 text-xs text-[#6B6B6B] leading-relaxed",children:y("ideas.assignToMyselfIdeaDesc")})]}),(0,s.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors ".concat("agent"===B?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8]"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>E("agent"),children:[(0,s.jsx)(m.C,{value:"agent",id:"idea-agent",className:"border-[#C67A52] text-[#C67A52]"}),(0,s.jsx)(x.J,{htmlFor:"idea-agent",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:y("ideas.orAssignToPmAgent")})]}),(0,s.jsx)("p",{className:"mt-2 ml-6 text-xs text-[#6B6B6B] leading-relaxed",children:y("ideas.onlySelectedPmAgentCanWork")}),"agent"===B&&(0,s.jsx)("div",{className:"mt-3 ml-6",children:(0,s.jsxs)(p.l6,{value:F,onValueChange:z,children:[(0,s.jsx)(p.bq,{className:"w-full border-[#E5E0D8]",children:(0,s.jsx)(p.yv,{placeholder:y("ideas.selectPmAgent")})}),(0,s.jsx)(p.gC,{children:I.length>0?I.map(e=>(0,s.jsx)(p.eb,{value:e.uuid,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(d.A,{className:"h-4 w-4 text-[#C67A52]"}),(0,s.jsx)("span",{children:e.name})]})},e.uuid)):(0,s.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:y("ideas.noPmAgentsAvailable")})})]})})]}),(0,s.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors ".concat("user"===B?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8]"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>E("user"),children:[(0,s.jsx)(m.C,{value:"user",id:"idea-user",className:"border-[#C67A52] text-[#C67A52]"}),(0,s.jsx)(x.J,{htmlFor:"idea-user",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:y("assign.orAssignToUser")})]}),"user"===B&&(0,s.jsx)("div",{className:"mt-3 ml-6",children:(0,s.jsxs)(p.l6,{value:S,onValueChange:_,children:[(0,s.jsx)(p.bq,{className:"w-full border-[#E5E0D8]",children:(0,s.jsx)(p.yv,{placeholder:y("tasks.selectUser")})}),(0,s.jsx)(p.gC,{children:D.length>0?D.map(e=>(0,s.jsx)(p.eb,{value:e.uuid,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(c.A,{className:"h-4 w-4 text-[#6B6B6B]"}),(0,s.jsx)("span",{children:e.name||e.email})]})},e.uuid)):(0,s.jsx)("div",{className:"px-3 py-2 text-xs text-[#9A9A9A]",children:y("tasks.noUsersAvailable")})})]})})]}),L&&(0,s.jsxs)("div",{className:"rounded-[10px] p-4 transition-colors cursor-pointer ".concat("release"===B?"bg-[#FDF8F6] border-2 border-[#C67A52]":"bg-white border border-[#E5E0D8] hover:border-[#C67A52]/50"),onClick:()=>E("release"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)(m.C,{value:"release",id:"idea-release",className:"border-[#C67A52] text-[#C67A52]"}),(0,s.jsx)(x.J,{htmlFor:"idea-release",className:"text-sm font-medium text-[#2C2C2C] cursor-pointer",children:y("assign.releaseAssignee")})]}),(0,s.jsx)("p",{className:"mt-2 ml-6 text-xs text-[#6B6B6B] leading-relaxed",children:y("ideas.releaseIdeaAssigneeDesc")})]})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-end gap-4 rounded-b-2xl bg-white px-6 py-6 border-t border-[#E5E0D8]",children:[(0,s.jsx)(u.$,{variant:"outline",onClick:w,disabled:C,className:"border-[#E5E0D8]",children:y("common.cancel")}),(0,s.jsx)(u.$,{onClick:U,disabled:C||!M,className:"bg-[#C67A52] hover:bg-[#B56A42] text-white",children:C?(0,s.jsx)(o.A,{className:"h-4 w-4 animate-spin"}):y("release"===B?"common.release":"common.assign")})]})]})]})}},64847:(e,t,a)=>{a.d(t,{J:()=>r});var s=a(52217);let r=(0,s.createServerReference)("40efa334cd5378fdd2735cdbdc9b23b5f566211461",s.callServer,void 0,s.findSourceMapURL,"updateIdeaAction")},64993:(e,t,a)=>{a.d(t,{F:()=>i});var s=a(90508);a(1856);var r=a(65326),n=a(24377);function i(e){let{className:t,children:a,...i}=e;return(0,s.jsxs)(r.Root,{"data-slot":"scroll-area",className:(0,n.cn)("relative",t),...i,children:[(0,s.jsx)(r.Viewport,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:a}),(0,s.jsx)(l,{}),(0,s.jsx)(r.Corner,{})]})}function l(e){let{className:t,orientation:a="vertical",...i}=e;return(0,s.jsx)(r.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:a,className:(0,n.cn)("flex touch-none p-px transition-colors select-none","vertical"===a&&"h-full w-2.5 border-l border-l-transparent","horizontal"===a&&"h-2.5 flex-col border-t border-t-transparent",t),...i,children:(0,s.jsx)(r.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}},65626:(e,t,a)=>{a.d(t,{K5:()=>o,Rf:()=>l,Yv:()=>s,bK:()=>i,qG:()=>n,tE:()=>r});let s={fast:.15,normal:.2,slow:.3,easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],stagger:.04,staggerFast:.03,spring:{type:"spring",stiffness:500,damping:30},tween:{type:"tween",duration:.2,ease:[0,0,.2,1]}},r={initial:{opacity:0,y:8},animate:{opacity:1,y:0,transition:{duration:s.normal,ease:s.easeOut}},exit:{opacity:0,y:-4,transition:{duration:s.fast,ease:s.easeOut}}},n={initial:{opacity:0},animate:{opacity:1,transition:{duration:s.normal,ease:s.easeOut}},exit:{opacity:0,transition:{duration:s.fast,ease:s.easeOut}}};s.normal,s.easeOut,s.fast,s.easeOut;let i={initial:{},animate:{transition:{staggerChildren:s.stagger}}},l={initial:{opacity:0,y:8},animate:{opacity:1,y:0,transition:{duration:s.normal,ease:s.easeOut}}},o={initial:{opacity:0,scale:.95,y:-4},animate:{opacity:1,scale:1,y:0,transition:{duration:s.fast,ease:s.easeOut}},exit:{opacity:0,scale:.95,y:-4,transition:{duration:s.fast,ease:s.easeOut}}}},77247:(e,t,a)=>{a.d(t,{x:()=>r});var s=a(52217);let r=(0,s.createServerReference)("4046bd6d9d24b5c05b8e7465ad674fd309a5e165c9",s.callServer,void 0,s.findSourceMapURL,"getIdeaActivitiesAction")},78948:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(66206).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},80439:(e,t,a)=>{a.d(t,{z:()=>r});var s=a(52217);let r=(0,s.createServerReference)("409c7e2e848a704785745d8b3cd8498d2e2630bca0",s.callServer,void 0,s.findSourceMapURL,"getElaborationAction")},81750:(e,t,a)=>{a.d(t,{Ke:()=>o,Nt:()=>i,R6:()=>l});var s=a(90508),r=a(38476),n=a(24377);function i(e){let{...t}=e;return(0,s.jsx)(r.Root,{"data-slot":"collapsible",...t})}function l(e){let{...t}=e;return(0,s.jsx)(r.Trigger,{"data-slot":"collapsible-trigger",...t})}function o(e){let{className:t,...a}=e;return(0,s.jsx)(r.Content,{"data-slot":"collapsible-content",className:(0,n.cn)("overflow-hidden data-[state=open]:animate-[collapsible-down_250ms_ease-in-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-in-out]",t),...a})}},88064:(e,t,a)=>{a.d(t,{J:()=>i});var s=a(90508);a(1856);var r=a(58057),n=a(24377);function i(e){let{className:t,...a}=e;return(0,s.jsx)(r.Root,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...a})}},91846:(e,t,a)=>{a.d(t,{bq:()=>u,eb:()=>m,gC:()=>x,l6:()=>d,yv:()=>c});var s=a(90508);a(1856);var r=a(17730),n=a(60532),i=a(89967),l=a(48218),o=a(24377);function d(e){let{...t}=e;return(0,s.jsx)(l.Root,{"data-slot":"select",...t})}function c(e){let{...t}=e;return(0,s.jsx)(l.Value,{"data-slot":"select-value",...t})}function u(e){let{className:t,size:a="default",children:n,...i}=e;return(0,s.jsxs)(l.Trigger,{"data-slot":"select-trigger","data-size":a,className:(0,o.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...i,children:[n,(0,s.jsx)(l.Icon,{asChild:!0,children:(0,s.jsx)(r.A,{className:"size-4 opacity-50"})})]})}function x(e){let{className:t,children:a,position:r="item-aligned",align:n="center",...i}=e;return(0,s.jsx)(l.Portal,{children:(0,s.jsxs)(l.Content,{"data-slot":"select-content",className:(0,o.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,align:n,...i,children:[(0,s.jsx)(p,{}),(0,s.jsx)(l.Viewport,{className:(0,o.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:a}),(0,s.jsx)(f,{})]})})}function m(e){let{className:t,children:a,...r}=e;return(0,s.jsxs)(l.Item,{"data-slot":"select-item",className:(0,o.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...r,children:[(0,s.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,s.jsx)(l.ItemIndicator,{children:(0,s.jsx)(n.A,{className:"size-4"})})}),(0,s.jsx)(l.ItemText,{children:a})]})}function p(e){let{className:t,...a}=e;return(0,s.jsx)(l.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(i.A,{className:"size-4"})})}function f(e){let{className:t,...a}=e;return(0,s.jsx)(l.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(r.A,{className:"size-4"})})}},95900:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(66206).A)("arrow-right-left",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]])},97438:(e,t,a)=>{a.d(t,{Cf:()=>x,Es:()=>p,L3:()=>f,c7:()=>m,lG:()=>o,rr:()=>g,zM:()=>d});var s=a(90508);a(1856);var r=a(9160),n=a(71350),i=a(24377),l=a(22922);function o(e){let{...t}=e;return(0,s.jsx)(n.Root,{"data-slot":"dialog",...t})}function d(e){let{...t}=e;return(0,s.jsx)(n.Trigger,{"data-slot":"dialog-trigger",...t})}function c(e){let{...t}=e;return(0,s.jsx)(n.Portal,{"data-slot":"dialog-portal",...t})}function u(e){let{className:t,...a}=e;return(0,s.jsx)(n.Overlay,{"data-slot":"dialog-overlay",className:(0,i.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function x(e){let{className:t,children:a,showCloseButton:l=!0,...o}=e;return(0,s.jsxs)(c,{"data-slot":"dialog-portal",children:[(0,s.jsx)(u,{}),(0,s.jsxs)(n.Content,{"data-slot":"dialog-content",className:(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",t),...o,children:[a,l&&(0,s.jsxs)(n.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,s.jsx)(r.A,{}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function m(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"dialog-header",className:(0,i.cn)("flex flex-col gap-2 text-center sm:text-left",t),...a})}function p(e){let{className:t,showCloseButton:a=!1,children:r,...o}=e;return(0,s.jsxs)("div",{"data-slot":"dialog-footer",className:(0,i.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...o,children:[r,a&&(0,s.jsx)(n.Close,{asChild:!0,children:(0,s.jsx)(l.$,{variant:"outline",children:"Close"})})]})}function f(e){let{className:t,...a}=e;return(0,s.jsx)(n.Title,{"data-slot":"dialog-title",className:(0,i.cn)("text-lg leading-none font-semibold",t),...a})}function g(e){let{className:t,...a}=e;return(0,s.jsx)(n.Description,{"data-slot":"dialog-description",className:(0,i.cn)("text-muted-foreground text-sm",t),...a})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[96919],{1868:(e,t,n)=>{n.d(t,{d:()=>a});var r=n(52217);let a=(0,r.createServerReference)("607d2caeb9721178dd2c04ee76b961254a265c6262",r.callServer,void 0,r.findSourceMapURL,"getCommentsAction")},22922:(e,t,n)=>{n.d(t,{$:()=>i});var r=n(90508);n(1856);var a=n(49499),c=n(54154),s=n(24377);let o=(0,a.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function i(e){let{className:t,variant:n="default",size:a="default",asChild:i=!1,...l}=e,u=i?c.bL:"button";return(0,r.jsx)(u,{"data-slot":"button","data-variant":n,"data-size":a,className:(0,s.cn)(o({variant:n,size:a,className:t})),...l})}},24377:(e,t,n)=>{n.d(t,{cn:()=>c});var r=n(49251),a=n(58849);function c(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,a.QP)((0,r.$)(t))}},30423:(e,t,n)=>{n.d(t,{j:()=>a});let r=["#E06C75","#E5C07B","#98C379","#56B6C2","#61AFEF","#C678DD","#D19A66","#BE5046","#7EC8E3","#C3E88D","#F78C6C","#A9DC76"];function a(e){let t=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return Math.abs(t)}(e)%r.length;return r[t]}},37486:(e,t,n)=>{n.d(t,{$:()=>U});var r=n(90508),a=n(1856),c=n(39268),s=n(94903),o=n(85226),i=n(95886),l=n(36755),u=n(5425),d=n(22922),m=n(73693),p=n(42242),f=n(85783),x=n(99783),h=n(24377);let g=x.A.extend({addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),mentionType:{default:"user",parseHTML:e=>e.getAttribute("data-mention-type")||"user",renderHTML:e=>({"data-mention-type":e.mentionType||"user"})}}}});function v(e){let t=e.getJSON();return t.content?t.content.map(e=>(function e(t){if("mention"===t.type){let e=t.attrs;return e?"@[".concat(e.label||e.id,"](").concat(e.mentionType||"user",":").concat(e.id,")"):""}if("text"===t.type)return t.text||"";if("hardBreak"===t.type)return"\n";let n=t.content;return n?n.map(e).join(""):""})(e)).join("\n"):""}function y(e){if(!e)return{type:"doc",content:[{type:"paragraph"}]};let t=/@\[([^\]]+)\]\((user|agent):([a-f0-9-]+)\)/g;return{type:"doc",content:e.split("\n").map(e=>{let n,r=[],a=0,c=RegExp(t.source,"g");for(;null!==(n=c.exec(e));)n.index>a&&r.push({type:"text",text:e.slice(a,n.index)}),r.push({type:"mention",attrs:{id:n[3],label:n[1],mentionType:n[2]}}),a=n.index+n[0].length;return a<e.length&&r.push({type:"text",text:e.slice(a)}),{type:"paragraph",content:r.length>0?r:void 0}})}}function b(e,t,n,r,a){if(a.innerHTML="",t){let e=document.createElement("div");e.className="flex items-center justify-center py-3 px-4",e.innerHTML='<div class="h-4 w-4 animate-spin rounded-full border-2 border-[#9A9A9A] border-t-transparent"></div>',a.appendChild(e);return}if(0===e.length){let e=document.createElement("div");e.className="py-2 px-3 text-xs text-[#9A9A9A]",e.textContent="No results",a.appendChild(e);return}let c=document.createElement("div");c.className="py-1";let s=0,o=e=>{n({id:e.uuid,label:e.name,mentionType:e.type})},i=()=>{c.innerHTML="",e.forEach((e,t)=>{let n=document.createElement("button");n.type="button",n.className="flex w-full items-center gap-2.5 px-3 py-1.5 text-left text-sm transition-colors ".concat(t===s?"bg-[#FAF8F4] text-[#2C2C2C]":"text-[#6B6B6B] hover:bg-[#FAF8F4]"),n.onclick=()=>o(e);let r=document.createElement("div");r.className="flex h-6 w-6 shrink-0 items-center justify-center rounded-full ".concat("agent"===e.type?"bg-[#C67A52] text-white":"bg-[#E5E0D8] text-[#6B6B6B]"),r.innerHTML="agent"===e.type?'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/></svg>':'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>';let a=document.createElement("div");a.className="min-w-0 flex-1";let i=document.createElement("div");if(i.className="truncate text-xs font-medium",i.textContent=e.name,a.appendChild(i),e.email){let t=document.createElement("div");t.className="truncate text-[10px] text-[#9A9A9A]",t.textContent=e.email,a.appendChild(t)}if("agent"===e.type&&e.roles&&e.roles.length>0){let t=document.createElement("div");t.className="truncate text-[10px] text-[#9A9A9A]",t.textContent=e.roles.join(", "),a.appendChild(t)}n.appendChild(r),n.appendChild(a),c.appendChild(n)})};i(),a.appendChild(c),r.current={onKeyDown:t=>{let{event:n}=t;return"ArrowUp"===n.key?(s=s<=0?e.length-1:s-1,i(),!0):"ArrowDown"===n.key?(s=s>=e.length-1?0:s+1,i(),!0):"Enter"===n.key?(e[s]&&o(e[s]),!0):"Escape"===n.key}}}let w=(0,a.forwardRef)((e,t)=>{let{value:n,onChange:c,placeholder:s,className:o,disabled:i,onSubmit:l}=e,u=(0,a.useRef)([]),d=(0,a.useRef)(!1),m=(0,a.useRef)(null),x=(0,a.useRef)(null),w=(0,a.useRef)(null),[,j]=(0,a.useState)(0),N=(0,a.useRef)(!1),E=function(e,t){let n=(0,a.useRef)(null),r=(0,a.useRef)(e);r.current=e;let c=(0,a.useCallback)(e=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>r.current(e),250)},[250]);return(0,a.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),c}((0,a.useCallback)(async e=>{d.current=!0,j(e=>e+1);try{let t=await fetch("/api/mentionables?q=".concat(encodeURIComponent(e),"&limit=10"));if(t.ok){let e=await t.json();e.success&&(u.current=e.data)}}catch(e){u.current=[]}finally{d.current=!1,j(e=>e+1)}},[]),250);(0,a.useEffect)(()=>{x.current&&w.current&&b(u.current,d.current,w.current,m,x.current)});let C=(0,p.hG)({immediatelyRender:!1,extensions:[f.A.configure({heading:!1,blockquote:!1,codeBlock:!1,bulletList:!1,orderedList:!1,listItem:!1,horizontalRule:!1}),g.configure({HTMLAttributes:{class:"text-blue-600 font-medium"},renderText(e){var t;let{node:n}=e;return"@".concat(null!=(t=n.attrs.label)?t:n.attrs.id)},suggestion:{char:"@",allowSpaces:!0,items:e=>{let{query:t}=e;return E(t),u.current},render:()=>({onStart:e=>{let t=document.createElement("div");if(t.className="z-[100] rounded-md border border-[#E5E0D8] bg-white shadow-md min-w-[200px] max-w-[300px] overflow-hidden",x.current=t,w.current=e.command,e.clientRect){let n="function"==typeof e.clientRect?e.clientRect():e.clientRect;n&&(t.style.position="fixed",t.style.left="".concat(n.left,"px"),window.innerHeight-n.bottom<220?t.style.bottom="".concat(window.innerHeight-n.top+4,"px"):t.style.top="".concat(n.bottom+4,"px"))}document.body.appendChild(t),b(u.current,d.current,e.command,m,t)},onUpdate:e=>{if(w.current=e.command,x.current&&e.clientRect){let t="function"==typeof e.clientRect?e.clientRect():e.clientRect;t&&(x.current.style.left="".concat(t.left,"px"),window.innerHeight-t.bottom<220?(x.current.style.top="",x.current.style.bottom="".concat(window.innerHeight-t.top+4,"px")):(x.current.style.bottom="",x.current.style.top="".concat(t.bottom+4,"px")))}x.current&&b(u.current,d.current,e.command,m,x.current)},onKeyDown:e=>!!m.current&&m.current.onKeyDown(e),onExit:()=>{var e;null==(e=x.current)||e.remove(),x.current=null,w.current=null,u.current=[],d.current=!1}})}})],content:y(n),editable:!i,editorProps:{attributes:{class:(0,h.cn)("min-h-[36px] max-h-[120px] overflow-y-auto px-3 py-2 text-sm outline-none","prose prose-sm max-w-none [&_p]:my-0"),"data-placeholder":s||""},handleKeyDown:(e,t)=>"Enter"===t.key&&!t.shiftKey&&!x.current&&!!l&&(t.preventDefault(),l(),!0)},onUpdate:e=>{let{editor:t}=e;N.current=!0,c(v(t))}});return(0,a.useEffect)(()=>{if(!C||N.current){N.current=!1;return}v(C)!==n&&C.commands.setContent(y(n))},[n,C]),(0,a.useEffect)(()=>{C&&C.setEditable(!i)},[i,C]),(0,a.useImperativeHandle)(t,()=>({focus:()=>null==C?void 0:C.commands.focus(),clear:()=>{null==C||C.commands.clearContent(),c("")}})),(0,r.jsxs)("div",{className:(0,h.cn)("relative rounded-md border border-input bg-transparent shadow-xs transition-[color,box-shadow]","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",i&&"cursor-not-allowed opacity-50",o),children:[(0,r.jsx)(p.$Z,{editor:C}),(0,r.jsx)("style",{children:"\n .tiptap p.is-editor-empty:first-child::before {\n content: attr(data-placeholder);\n color: #9A9A9A;\n float: left;\n height: 0;\n pointer-events: none;\n }\n .tiptap .mention {\n color: #2563eb;\n font-weight: 500;\n }\n "})]})});w.displayName="MentionEditor";var j=n(1868),N=n(52217);let E=(0,N.createServerReference)("7042e4bd4e748b78e5378f1256a7824a4a64be3935",N.callServer,void 0,N.findSourceMapURL,"createCommentAction");var C=n(37021),A=n(51708);let k=/@\[([^\]]+)\]\((user|agent):([a-f0-9-]+)\)/g,T=/\u200B\u200BMENTION_(\d+)\u200B\u200B/g;function S(e){let{children:t}=e;if(!t||"string"!=typeof t)return null;if(!new RegExp(k.source).test(t))return(0,r.jsx)("div",{className:"overflow-hidden [&_pre]:overflow-x-auto",children:(0,r.jsx)(C.jH,{plugins:{code:A.a},children:t})});let{processed:n,mentions:a}=function(e){let t=[],n=RegExp(k.source,"g");return{processed:e.replace(n,(e,n,r,a)=>{let c=t.length;return t.push({displayName:n,type:r,uuid:a}),"".concat("​​MENTION_").concat(c).concat("​​")}),mentions:t}}(t);return(0,r.jsx)(R,{mentions:a,children:(0,r.jsx)(C.jH,{plugins:{code:A.a},children:n})})}function R(e){let{children:t,mentions:n}=e,c=a.useRef(null);return a.useEffect(()=>{let e;if(!c.current||0===n.length)return;let t=document.createTreeWalker(c.current,NodeFilter.SHOW_TEXT,null),r=[];for(;e=t.nextNode();)T.test(e.textContent||"")&&r.push(e),T.lastIndex=0;for(let e of r){var a;let t,r=e.textContent||"",c=document.createDocumentFragment(),s=0,o=RegExp(T.source,"g");for(;null!==(t=o.exec(r));){t.index>s&&c.appendChild(document.createTextNode(r.slice(s,t.index)));let e=n[parseInt(t[1],10)];if(e){let t=document.createElement("span");t.className="text-blue-600 font-medium",t.title="".concat(e.type,": ").concat(e.uuid),t.textContent="@".concat(e.displayName),c.appendChild(t)}else c.appendChild(document.createTextNode(t[0]));s=t.index+t[0].length}s<r.length&&c.appendChild(document.createTextNode(r.slice(s))),null==(a=e.parentNode)||a.replaceChild(c,e)}},[n]),(0,r.jsx)("div",{ref:c,className:"overflow-hidden [&_pre]:overflow-x-auto",children:t})}var D=n(63964),_=n(96213),B=n(30423),M=n(38106),z=n(67587);function U(e){let{targetType:t,targetUuid:n,currentUserUuid:u,onCountChange:p,compact:f=!1}=e,x=(0,c.c)(),[h,g]=(0,a.useState)(""),[v,y]=(0,a.useState)([]),[b,N]=(0,a.useState)(!0),[C,A]=(0,a.useState)(null),[k,T]=(0,a.useState)(!1),S=(0,a.useRef)(null),R=f?"h-6 w-6":"h-[30px] w-[30px]",B=f?"gap-2":"gap-2.5",M=f?"h-3 w-3":"h-[15px] w-[15px]";(0,a.useEffect)(()=>{null==p||p(v.length)},[v.length,p]);let U=(0,a.useCallback)(async()=>{N(!0),A(null);let e=await (0,j.d)(t,n);e.success?y(e.comments):A(e.error),N(!1)},[t,n]);(0,a.useEffect)(()=>{U()},[U]),(0,D.w0)(t,n,e=>{u&&e.actorUuid===u||(0,j.d)(t,n).then(e=>{e.success&&y(e.comments)})});let H=async()=>{if(!h.trim()||k)return;T(!0);let e=await E(t,n,h);if(T(!1),e.success){var r;y(t=>[...t,e.comment]),g(""),null==(r=S.current)||r.clear()}else z.oR.error(e.error)},L=[...v].reverse();return(0,r.jsx)(_.D,{entityType:t,entityUuid:n,subEntityType:"comment",children:(0,r.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,r.jsxs)("div",{className:"flex items-center ".concat(B," pb-3 border-b border-[#F0EDE8]"),children:[(0,r.jsx)(m.eu,{className:"".concat(f?"h-6 w-6":"h-7 w-7"," shrink-0"),children:(0,r.jsx)(m.q5,{className:"bg-[#E5E0D8] text-[#6B6B6B]",children:(0,r.jsx)(s.A,{className:"".concat(f?"h-3 w-3":"h-3.5 w-3.5")})})}),(0,r.jsx)("div",{className:"flex-1 min-w-0",children:(0,r.jsx)(w,{ref:S,value:h,onChange:g,onSubmit:H,placeholder:x("comments.addComment"),className:"border border-[#E5E0D8] bg-white text-sm rounded-lg",disabled:k})}),(0,r.jsx)(d.$,{size:"sm",className:"shrink-0 gap-1 bg-[#E07A5F] text-white hover:bg-[#D06A4F]",disabled:!h.trim()||k,onClick:H,children:k?(0,r.jsx)(o.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,r.jsx)(i.A,{className:"h-3.5 w-3.5"})})]}),(0,r.jsx)("div",{children:b?(0,r.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,r.jsx)(o.A,{className:"h-4 w-4 animate-spin text-[#9A9A9A]"})}):C?(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2 py-8 text-sm text-[#9A9A9A]",children:[(0,r.jsx)(l.A,{className:"h-4 w-4"}),(0,r.jsx)("p",{children:x("comments.loadError")}),(0,r.jsx)(d.$,{variant:"outline",size:"sm",onClick:U,children:x("comments.retry")})]}):0===L.length?(0,r.jsx)("p",{className:"py-8 text-center text-sm text-[#9A9A9A] italic",children:x("comments.noComments")}):L.map(e=>(0,r.jsx)(F,{comment:e,compact:f,avatarSize:R,gap:B,iconSize:M,t:x},e.uuid))})]})})}function F(e){let{comment:t,compact:n,avatarSize:c,gap:s,iconSize:o,t:i}=e,[l,p]=(0,a.useState)(!1),f="agent"===t.author.type,x=f?(0,B.j)(t.author.name):null,h=t.content.length>200,g=x?"".concat(x,"18"):void 0;return(0,r.jsxs)("div",{className:"flex ".concat(s," py-3 border-b border-[#F0EDE8] last:border-b-0"),children:[(0,r.jsx)(m.eu,{className:"".concat(c," shrink-0"),children:(0,r.jsx)(m.q5,{style:f?{backgroundColor:g,color:null!=x?x:void 0}:void 0,className:f?"":"bg-[#E5E0D8] text-[#6B6B6B] text-[11px] font-medium",children:f?(0,r.jsx)(u.A,{className:o}):t.author.name.charAt(0).toUpperCase()})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,r.jsx)("span",{className:"".concat(n?"text-xs":"text-[13px]"," font-semibold text-[#1A1A1A]"),children:t.author.name}),(0,r.jsx)("span",{style:f?{backgroundColor:g,color:null!=x?x:void 0}:void 0,className:"inline-flex items-center rounded px-1.5 py-px text-[9px] font-medium ".concat(f?"":"bg-[#F0EDE8] text-[#6B6B6B]"),children:i(f?"comments.roleAgent":"comments.roleHuman")}),(0,r.jsx)("span",{className:"text-[11px] text-[#BFBFBF]",children:function(e,t){let n=new Date(e),r=new Date().getTime()-n.getTime(),a=Math.floor(r/6e4),c=Math.floor(r/36e5),s=Math.floor(r/864e5);return a<1?t("time.justNow"):a<60?t("time.minutesAgo",{minutes:a}):c<24?t("time.hoursAgo",{hours:c}):s<7?t("time.daysAgo",{days:s}):(0,M.r)(n)}(t.createdAt,i)})]}),f&&t.author.owner&&(0,r.jsx)("div",{className:"flex items-center gap-1 mt-0.5",children:(0,r.jsx)("span",{className:"text-[11px] text-[#A3A3A3] italic",children:i("comments.onBehalfOf",{name:t.author.owner.name})})}),(0,r.jsx)("div",{className:"mt-1 ".concat(n?"text-xs":"text-[13px]"," leading-relaxed text-[#3D3D3D] max-w-none [&_h1]:text-sm [&_h1]:font-semibold [&_h1]:mt-2 [&_h1]:mb-1 [&_h2]:text-[13px] [&_h2]:font-semibold [&_h2]:mt-2 [&_h2]:mb-1 [&_h3]:text-[13px] [&_h3]:font-semibold [&_h3]:mt-1.5 [&_h3]:mb-0.5 [&_p]:my-1 [&_ul]:my-1 [&_ol]:my-1 [&_li]:my-0.5"),children:h&&!l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S,{children:t.content.slice(0,200)+"..."}),(0,r.jsx)(d.$,{variant:"link",size:"sm",onClick:()=>p(!0),className:"h-auto p-0 text-[#E07A5F] text-xs font-medium mt-1",children:i("comments.showMore")})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S,{children:t.content}),h&&(0,r.jsx)(d.$,{variant:"link",size:"sm",onClick:()=>p(!1),className:"h-auto p-0 text-[#E07A5F] text-xs font-medium mt-1",children:i("comments.showLess")})]})})]})]})}},38106:(e,t,n)=>{function r(e){let t="string"==typeof e?new Date(e):e;if(isNaN(t.getTime()))return"";let n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),c=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0");return"".concat(n,"-").concat(r,"-").concat(a," ").concat(c,":").concat(s)}function a(e,t){let n="string"==typeof e?new Date(e):e;return isNaN(n.getTime())?"":n.toLocaleDateString(t,{month:"short",day:"numeric"})}n.d(t,{r:()=>r,s:()=>a})},47754:(e,t,n)=>{n.d(t,{fv:()=>x,xQ:()=>h});var r=n(1856),a=n(63964);let c=new Map,s=new Map,o=new Map,i=new Set,l=0;function u(e,t,n,r){return n?r?"".concat(e,":").concat(t,":").concat(n,":").concat(r):"".concat(e,":").concat(t,":").concat(n):"".concat(e,":").concat(t)}function d(){l++,i.forEach(e=>e())}function m(e){var t;let n=e.subEntityType,r=e.subEntityUuid,a=u(e.entityType,e.entityUuid,n,r),i=function(e,t,n,r,a){let c=u(e,t,r,a);return"".concat(c,":").concat(n)}(e.entityType,e.entityUuid,e.agentUuid,n,r),l=s.get(i);if(l&&Date.now()-l<3e3)return;s.set(i,Date.now());let m={agentUuid:e.agentUuid,agentName:e.agentName,action:e.action,timestamp:Date.now()},p=(null!=(t=c.get(a))?t:[]).filter(t=>t.agentUuid!==e.agentUuid);p.push(m),c.set(a,p);let f=o.get(i);f&&clearTimeout(f);let x=setTimeout(()=>{let t=c.get(a);if(t){let n=t.filter(t=>t.agentUuid!==e.agentUuid);0===n.length?c.delete(a):c.set(a,n)}s.delete(i),o.delete(i),d()},3e3);o.set(i,x),d()}function p(){return l}function f(e){return i.add(e),()=>{i.delete(e)}}function x(e){m({type:"presence",companyUuid:"",projectUuid:"",...e,timestamp:Date.now()})}function h(){return(0,r.useSyncExternalStore)(f,p,p),(0,a.S2)(m),{getPresence:(e,t,n,r)=>{if(n){var a;return null!=(a=c.get(u(e,t,n,r)))?a:[]}let s="".concat(e,":").concat(t),o=new Map;for(let[e,t]of c)if(e===s||e.startsWith(s+":"))for(let e of t){let t=o.get(e.agentUuid);(!t||e.timestamp>t.timestamp)&&o.set(e.agentUuid,e)}return[...o.values()]}}}},48416:(e,t,n)=>{n.d(t,{BT:()=>i,Wu:()=>u,X9:()=>l,ZB:()=>o,Zp:()=>c,aR:()=>s,wL:()=>d});var r=n(90508);n(1856);var a=n(24377);function c(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"card",className:(0,a.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...n})}function s(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...n})}function o(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("leading-none font-semibold",t),...n})}function i(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-muted-foreground text-sm",t),...n})}function l(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),...n})}function u(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-6",t),...n})}function d(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"card-footer",className:(0,a.cn)("flex items-center px-6 [.border-t]:pt-6",t),...n})}},63964:(e,t,n)=>{n.d(t,{S2:()=>l,eV:()=>i,l9:()=>o,tS:()=>s,w0:()=>u});var r=n(90508),a=n(1856);n(23675);let c=(0,a.createContext)(null);function s(e){let{projectUuid:t,children:n}=e,s=(0,a.useRef)(new Set),o=(0,a.useRef)(new Set),i=(0,a.useRef)(new Set),l=(0,a.useCallback)(()=>{s.current.forEach(e=>e())},[]),u=(0,a.useCallback)(e=>{o.current.forEach(t=>t(e))},[]);(0,a.useEffect)(()=>{let e,n=null,r=0,a={};function c(){s(),(n=new EventSource(t?"/api/events?projectUuid=".concat(t):"/api/events")).onmessage=t=>{let n=null;try{n=JSON.parse(t.data)}catch(e){return}if(!n)return;if("presence"===n.type)return void i.current.forEach(e=>e(n));let c=n;clearTimeout(e);let s=Date.now(),o=s-r;o>=3e3?(r=s,l()):e=setTimeout(()=>{r=Date.now(),l()},Math.max(1e3,3e3-o));let d=c.entityType;clearTimeout(a[d]),a[d]=setTimeout(()=>{u(c)},300)},n.onerror=()=>{}}function s(){n&&(n.close(),n=null)}function o(){if("visible"===document.visibilityState&&(!n||n.readyState===EventSource.CLOSED))for(let e of(c(),l(),["task","idea","proposal","document","project","project_group"]))u({companyUuid:"",projectUuid:"",entityType:e,entityUuid:"",action:"updated"})}return c(),document.addEventListener("visibilitychange",o),()=>{for(let t in s(),clearTimeout(e),a)clearTimeout(a[t]);document.removeEventListener("visibilitychange",o)}},[t,l,u]);let d=(0,a.useCallback)(e=>(s.current.add(e),()=>{s.current.delete(e)}),[]),m=(0,a.useCallback)(e=>(o.current.add(e),()=>{o.current.delete(e)}),[]),p=(0,a.useCallback)(e=>(i.current.add(e),()=>{i.current.delete(e)}),[]),f=(0,a.useMemo)(()=>({subscribe:d,subscribeEntity:m,subscribePresence:p}),[d,m,p]);return(0,r.jsx)(c.Provider,{value:f,children:n})}function o(e){let t=(0,a.useContext)(c),n=(0,a.useRef)(e);n.current=e,(0,a.useEffect)(()=>{if(!t)return;let e=()=>n.current();return e(),t.subscribe(e)},[t])}function i(e,t){let n=(0,a.useContext)(c),r=(0,a.useRef)(t);r.current=t;let s=(0,a.useRef)(e);s.current=e,(0,a.useEffect)(()=>{if(n)return n.subscribeEntity(e=>{let t=s.current;(Array.isArray(t)?t.includes(e.entityType):e.entityType===t)&&r.current(e)})},[n])}function l(e){let t=(0,a.useContext)(c),n=(0,a.useRef)(e);n.current=e,(0,a.useEffect)(()=>{if(t)return t.subscribePresence(e=>n.current(e))},[t])}function u(e,t,n){let r=(0,a.useContext)(c),s=(0,a.useRef)(n);s.current=n,(0,a.useEffect)(()=>{if(r)return r.subscribeEntity(n=>{n.entityType===e&&n.entityUuid===t&&s.current(n)})},[r,e,t])}},73693:(e,t,n)=>{n.d(t,{eu:()=>s,q5:()=>o});var r=n(90508);n(1856);var a=n(65514),c=n(24377);function s(e){let{className:t,size:n="default",...s}=e;return(0,r.jsx)(a.Root,{"data-slot":"avatar","data-size":n,className:(0,c.cn)("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",t),...s})}function o(e){let{className:t,...n}=e;return(0,r.jsx)(a.Fallback,{"data-slot":"avatar-fallback",className:(0,c.cn)("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs",t),...n})}},96213:(e,t,n)=>{n.d(t,{D:()=>o});var r=n(90508),a=n(47754),c=n(30423),s=n(5425);function o(e){let{entityType:t,entityUuid:n,subEntityType:s,subEntityUuid:o,children:l,badgeInside:u}=e,{getPresence:d}=(0,a.xQ)(),m=d(t,n,s,o),p=m.length>0,f=p&&m.some(e=>"mutate"===e.action),x=p?f?m.find(e=>"mutate"===e.action):m[m.length-1]:null,h=x?(0,c.j)(x.agentName):"transparent";return(0,r.jsxs)("div",{className:"relative",style:p?{outline:"2px ".concat(f?"solid":"dashed"," ").concat(h),outlineOffset:"-2px",borderRadius:"var(--radius)"}:void 0,children:[p&&(0,r.jsxs)("div",{className:"absolute flex gap-1 z-10 justify-end ".concat(u?"top-0.5 right-1.5 max-w-[70%]":"-top-2.5 right-2 max-w-[80%]"),children:[m.slice(0,3).map(e=>(0,r.jsx)(i,{entry:e},e.agentUuid)),m.length>3&&(0,r.jsxs)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-[10px] font-medium text-white bg-gray-500 whitespace-nowrap",children:["+",m.length-3]})]}),l]})}function i(e){let{entry:t}=e,n=(0,c.j)(t.agentName);return(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[10px] font-medium text-white whitespace-nowrap animate-in fade-in duration-300 ease-out sm:text-[11px] sm:px-2",style:{backgroundColor:n},children:[(0,r.jsx)(s.A,{className:"h-2.5 w-2.5"}),t.agentName]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[99513],{14554:(e,t,a)=>{a.d(t,{p:()=>n});var s=a(90508);a(1856);var r=a(24377);function n(e){let{className:t,type:a,...n}=e;return(0,s.jsx)("input",{type:a,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}},15972:(e,t,a)=>{a.d(t,{T:()=>n});var s=a(90508);a(1856);var r=a(24377);function n(e){let{className:t,...a}=e;return(0,s.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...a})}},21323:(e,t,a)=>{a.d(t,{I:()=>r});var s=a(52217);let r=(0,s.createServerReference)("4068b2fd6444238f60f22b80c2ba2d7324b889c046",s.callServer,void 0,s.findSourceMapURL,"createAgentAndKeyAction")},22922:(e,t,a)=>{a.d(t,{$:()=>d});var s=a(90508);a(1856);var r=a(49499),n=a(54154),i=a(24377);let o=(0,r.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function d(e){let{className:t,variant:a="default",size:r="default",asChild:d=!1,...l}=e,c=d?n.bL:"button";return(0,s.jsx)(c,{"data-slot":"button","data-variant":a,"data-size":r,className:(0,i.cn)(o({variant:a,size:r,className:t})),...l})}},24377:(e,t,a)=>{a.d(t,{cn:()=>n});var s=a(49251),r=a(58849);function n(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,r.QP)((0,s.$)(t))}},26965:(e,t,a)=>{a.d(t,{L:()=>j});var s=a(90508),r=a(1856),n=a(39268),i=a(14554),o=a(88064),d=a(15972),l=a(60532),c=a(98861),u=a(24377);function m(e){let{className:t,...a}=e;return(0,s.jsx)(c.Root,{"data-slot":"checkbox",className:(0,u.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:(0,s.jsx)(c.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:(0,s.jsx)(l.A,{className:"size-3.5"})})})}var p=a(91846),g=a(44775),x=a(93810);let f={admin_agent:"agent.permissions.presetAdmin",pm_agent:"agent.permissions.presetPm",developer_agent:"agent.permissions.presetDev",custom:"agent.permissions.presetCustom"},v={admin_agent:"agent.permissions.help.admin",pm_agent:"agent.permissions.help.pm",developer_agent:"agent.permissions.help.dev",custom:"agent.permissions.help.custom"},h=["admin_agent","pm_agent","developer_agent","custom"];function b(e){let{preset:t,permissions:a,onChange:r,readOnly:i=!1}=e,d=(0,n.c)(),l=null!=t?t:"custom",c=new Set("custom"===l?a:g.o[l]);return(0,s.jsxs)("div",{"data-testid":"agent-permission-picker",className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(o.J,{className:"text-[13px] font-medium",children:d("agent.permissions.title")}),(0,s.jsx)("p",{className:"text-muted-foreground text-xs",children:d("agent.permissions.description")})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(o.J,{htmlFor:"agent-permission-preset",children:d("agent.permissions.presetLabel")}),(0,s.jsxs)(p.l6,{value:l,onValueChange:function(e){if("custom"===e)return void r({preset:"custom",roles:[],permissions:Array.from(c)});e in g.o&&r({preset:e,roles:[e],permissions:[]})},disabled:i,children:[(0,s.jsx)(p.bq,{id:"agent-permission-preset",className:"w-full","aria-label":d("agent.permissions.presetLabel"),children:(0,s.jsx)(p.yv,{placeholder:d(f[l]),children:d(f[l])})}),(0,s.jsx)(p.gC,{children:h.map(e=>(0,s.jsx)(p.eb,{value:e,textValue:d(f[e]),children:(0,s.jsxs)("div",{className:"flex flex-col gap-0.5 py-0.5",children:[(0,s.jsx)("span",{className:"text-sm font-semibold",children:d(f[e])}),(0,s.jsx)("span",{className:"text-muted-foreground text-xs",children:d(v[e])})]})},e))})]})]}),(0,s.jsxs)("div",{role:"grid","aria-label":d("agent.permissions.title"),className:"overflow-hidden rounded-md border",children:[(0,s.jsxs)("div",{role:"row",className:"bg-muted/50 text-muted-foreground grid grid-cols-[1.5fr_repeat(3,1fr)] items-center gap-2 px-4 py-2 text-xs font-medium",children:[(0,s.jsx)("div",{role:"columnheader",children:d("agent.permissions.resourceHeader")}),x.kl.map(e=>(0,s.jsx)("div",{role:"columnheader",className:"text-center",children:d("agent.permissions.actions.".concat(e))},e))]}),x.eZ.map(e=>(0,s.jsxs)("div",{role:"row",className:"border-t grid grid-cols-[1.5fr_repeat(3,1fr)] items-center gap-2 px-4 py-2 text-sm",children:[(0,s.jsx)("div",{role:"rowheader",className:"font-medium",children:d("agent.permissions.resources.".concat(e))}),x.kl.map(t=>{let a="".concat(e,":").concat(t),n="perm-".concat(e,"-").concat(t);return(0,s.jsx)("div",{role:"gridcell",className:"flex items-center justify-center",children:(0,s.jsx)(m,{id:n,checked:c.has(a),disabled:i,"aria-label":"".concat(d("agent.permissions.resources.".concat(e))," ").concat(d("agent.permissions.actions.".concat(t))),onCheckedChange:e=>{if(!i){let t=new Set(c);!0===e?t.add(a):t.delete(a),r({preset:"custom",roles:[],permissions:Array.from(t)})}}})},t)})]},e))]})]})]})}function j(e){let{name:t,onNameChange:a,preset:l,permissions:c,onPermissionsChange:u,persona:m,onPersonaChange:p,nameInputId:x="agent-form-name",personaInputId:f="agent-form-persona",readOnly:v=!1}=e,h=(0,n.c)(),j=(0,r.useMemo)(()=>"custom"===l?c:[...g.o[l]],[l,c]);return(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(o.J,{htmlFor:x,className:"text-[13px]",children:h("settings.name")}),(0,s.jsx)(i.p,{id:x,value:t,onChange:e=>a(e.target.value),placeholder:h("settings.namePlaceholder"),className:"border-[#E5E0D8]",required:!0,disabled:v})]}),(0,s.jsx)(b,{preset:l,permissions:j,onChange:u,readOnly:v}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(o.J,{htmlFor:f,className:"text-[13px]",children:h("settings.agentPersona")}),(0,s.jsx)(d.T,{id:f,value:m,onChange:e=>p(e.target.value),placeholder:h("settings.personaPlaceholder"),rows:4,disabled:v}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:h("settings.personaHint")})]})]})}},37750:(e,t,a)=>{a.d(t,{Y:()=>u});var s=a(90508),r=a(1856),n=a(39268),i=a(22922),o=a(60532),d=a(9160),l=a(67712),c=a(26965);function u(e){let{onAgentCreated:t,createAgentAndKey:a,onClose:u,embedded:m=!1,submitLabel:p,submittingLabel:g}=e,x=(0,n.c)(),[f,v]=(0,r.useState)(""),[h,b]=(0,r.useState)("admin_agent"),[j,y]=(0,r.useState)(["admin_agent"]),[w,N]=(0,r.useState)([]),[k,_]=(0,r.useState)(""),[z,C]=(0,r.useState)(!1),[A,S]=(0,r.useState)(null),[I,L]=(0,r.useState)(!1),P=async e=>{if((e.preventDefault(),f)&&("custom"!==h||0!==w.length)){C(!0);try{let e=await a({name:f,roles:j,permissions:"custom"===h?w:[],persona:k||null});e.success&&e.key?(m||S(e.key),t({uuid:e.agentUuid||"",name:f,roles:j,permissions:"custom"===h?w:[]},e.key)):l.q.error("Failed to create API key:",e.error)}catch(e){l.q.error("Failed to create API key:",e)}finally{C(!1)}}},T=async e=>{try{await navigator.clipboard.writeText(e),L(!0),setTimeout(()=>L(!1),2e3)}catch(e){l.q.error("Failed to copy to clipboard:",e)}},q=()=>{v(""),b("admin_agent"),y(["admin_agent"]),N([]),_(""),S(null),null==u||u()};return A&&!m?(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsxs)("div",{className:"mb-4 flex items-center gap-2 text-green-600",children:[(0,s.jsx)(o.A,{className:"h-5 w-5"}),(0,s.jsx)("span",{className:"font-medium",children:x("settings.apiKeyCreated")})]}),(0,s.jsx)("p",{className:"mb-4 text-sm text-muted-foreground",children:x("settings.apiKeyCreatedDesc")}),(0,s.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,s.jsx)("code",{className:"flex-1 rounded bg-foreground px-3 py-2 font-mono text-sm text-background",children:A}),(0,s.jsx)(i.$,{variant:"outline",size:"sm",onClick:()=>T(A),children:x(I?"common.copied":"common.copy")})]}),(0,s.jsx)(i.$,{onClick:q,className:"w-full",children:x("common.done")})]}):(0,s.jsxs)("form",{onSubmit:P,children:[!m&&(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-6 py-5",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold text-foreground",children:x("settings.createApiKey")}),u&&(0,s.jsx)(i.$,{type:"button",variant:"ghost",size:"icon",onClick:q,className:"h-8 w-8",children:(0,s.jsx)(d.A,{className:"h-4 w-4"})})]}),(0,s.jsx)("div",{className:m?void 0:"p-6",children:(0,s.jsx)(c.L,{name:f,onNameChange:v,preset:h,permissions:w,onPermissionsChange:function(e){b(e.preset),y(e.roles),N(e.permissions)},persona:k,onPersonaChange:_,nameInputId:"keyName",personaInputId:"create-agent-persona"})}),(0,s.jsxs)("div",{className:m?"flex justify-end gap-3 pt-2":"flex justify-end gap-3 border-t border-border px-6 py-4",children:[!m&&u&&(0,s.jsx)(i.$,{type:"button",variant:"outline",onClick:q,children:x("common.cancel")}),(0,s.jsx)(i.$,{type:"submit",disabled:!f||"custom"===h&&0===w.length||z,className:m?"w-full":void 0,size:m?"lg":"default",children:z?null!=g?g:x("settings.creating"):null!=p?p:x("settings.createApiKey")})]})]})}},44775:(e,t,a)=>{a.d(t,{o:()=>s});let s={developer_agent:["idea:read","proposal:read","document:read","project:read","task:read","task:write"],pm_agent:["idea:read","idea:write","proposal:read","proposal:write","document:read","document:write","task:read","task:write","project:read","project:write"],admin_agent:["idea:read","idea:write","idea:admin","proposal:read","proposal:write","proposal:admin","document:read","document:write","document:admin","task:read","task:write","task:admin","project:read","project:write","project:admin"]}},48416:(e,t,a)=>{a.d(t,{BT:()=>d,Wu:()=>c,X9:()=>l,ZB:()=>o,Zp:()=>n,aR:()=>i,wL:()=>u});var s=a(90508);a(1856);var r=a(24377);function n(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card",className:(0,r.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...a})}function i(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...a})}function o(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("leading-none font-semibold",t),...a})}function d(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-muted-foreground text-sm",t),...a})}function l(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),...a})}function c(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-6",t),...a})}function u(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center px-6 [.border-t]:pt-6",t),...a})}},67712:(e,t,a)=>{a.d(t,{q:()=>o});var s=a(55036);let r={debug:0,info:1,warn:2,error:3},n=s.env.NEXT_PUBLIC_LOG_LEVEL||"warn";function i(e){return r[e]>=r[n]}let o={debug:function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),s=1;s<t;s++)a[s-1]=arguments[s];i("debug")&&console.debug("[Chorus] ".concat(e),...a)},info:function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),s=1;s<t;s++)a[s-1]=arguments[s];i("info")&&console.info("[Chorus] ".concat(e),...a)},warn:function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),s=1;s<t;s++)a[s-1]=arguments[s];i("warn")&&console.warn("[Chorus] ".concat(e),...a)},error:function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),s=1;s<t;s++)a[s-1]=arguments[s];i("error")&&console.error("[Chorus] ".concat(e),...a)}}},88064:(e,t,a)=>{a.d(t,{J:()=>i});var s=a(90508);a(1856);var r=a(58057),n=a(24377);function i(e){let{className:t,...a}=e;return(0,s.jsx)(r.Root,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...a})}},91846:(e,t,a)=>{a.d(t,{bq:()=>u,eb:()=>p,gC:()=>m,l6:()=>l,yv:()=>c});var s=a(90508);a(1856);var r=a(17730),n=a(60532),i=a(89967),o=a(48218),d=a(24377);function l(e){let{...t}=e;return(0,s.jsx)(o.Root,{"data-slot":"select",...t})}function c(e){let{...t}=e;return(0,s.jsx)(o.Value,{"data-slot":"select-value",...t})}function u(e){let{className:t,size:a="default",children:n,...i}=e;return(0,s.jsxs)(o.Trigger,{"data-slot":"select-trigger","data-size":a,className:(0,d.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...i,children:[n,(0,s.jsx)(o.Icon,{asChild:!0,children:(0,s.jsx)(r.A,{className:"size-4 opacity-50"})})]})}function m(e){let{className:t,children:a,position:r="item-aligned",align:n="center",...i}=e;return(0,s.jsx)(o.Portal,{children:(0,s.jsxs)(o.Content,{"data-slot":"select-content",className:(0,d.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,align:n,...i,children:[(0,s.jsx)(g,{}),(0,s.jsx)(o.Viewport,{className:(0,d.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:a}),(0,s.jsx)(x,{})]})})}function p(e){let{className:t,children:a,...r}=e;return(0,s.jsxs)(o.Item,{"data-slot":"select-item",className:(0,d.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...r,children:[(0,s.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,s.jsx)(o.ItemIndicator,{children:(0,s.jsx)(n.A,{className:"size-4"})})}),(0,s.jsx)(o.ItemText,{children:a})]})}function g(e){let{className:t,...a}=e;return(0,s.jsx)(o.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(i.A,{className:"size-4"})})}function x(e){let{className:t,...a}=e;return(0,s.jsx)(o.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(r.A,{className:"size-4"})})}},93810:(e,t,a)=>{a.d(t,{eZ:()=>s,kl:()=>r,lp:()=>n});let s=["idea","proposal","document","task","project"],r=["read","write","admin"],n=s.flatMap(e=>r.map(t=>"".concat(e,":").concat(t)))}}]);