tower-studio 0.2.45 → 0.2.46

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 (494) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/routes-manifest.json +8 -0
  6. package/.next/standalone/.next/server/app/_global-error/page.js +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  8. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
  17. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +129 -81
  18. package/.next/standalone/.next/server/app/_not-found/page.js +7 -8
  19. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/api/adapters/test/route.js +2 -2
  22. package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/browse-fs/route.js +1 -1
  24. package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/git/route.js +1 -1
  27. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +2 -4
  31. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +2 -2
  33. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/internal/assistant/route.js +5 -4
  35. package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +3 -5
  38. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/internal/harness/ask/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/internal/harness/notify/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/internal/harness/pending/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/internal/harness/reply/route.js +4 -4
  44. package/.next/standalone/.next/server/app/api/internal/harness/reply/route.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +1 -1
  48. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js +1 -1
  50. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js +1 -1
  53. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js +1 -1
  55. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js +4 -4
  58. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js.nft.json +1 -1
  59. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +4 -4
  60. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  61. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js +4 -4
  62. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js.nft.json +1 -1
  63. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js +1 -1
  64. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js +1 -1
  66. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js.nft.json +1 -1
  67. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +5 -3
  68. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  69. package/.next/standalone/.next/server/app/harness/page/react-loadable-manifest.json +3 -3
  70. package/.next/standalone/.next/server/app/harness/page/server-reference-manifest.json +152 -104
  71. package/.next/standalone/.next/server/app/harness/page.js +7 -8
  72. package/.next/standalone/.next/server/app/harness/page.js.nft.json +1 -1
  73. package/.next/standalone/.next/server/app/harness/page_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +3 -2
  75. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +246 -162
  76. package/.next/standalone/.next/server/app/missions/page.js +10 -10
  77. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +3 -3
  80. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +129 -81
  81. package/.next/standalone/.next/server/app/onboarding/page.js +7 -8
  82. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  83. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +3 -3
  85. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +129 -81
  86. package/.next/standalone/.next/server/app/page.js +7 -8
  87. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  88. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  89. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
  90. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +225 -141
  91. package/.next/standalone/.next/server/app/settings/page.js +9 -11
  92. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +3 -3
  95. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +258 -222
  96. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +8 -9
  97. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +3 -3
  100. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +231 -195
  101. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +8 -9
  102. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  103. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  104. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/app-paths-manifest.json +3 -0
  105. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/build-manifest.json +18 -0
  106. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/next-font-manifest.json +11 -0
  107. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/react-loadable-manifest.json +18 -0
  108. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/server-reference-manifest.json +401 -0
  109. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js +24 -0
  110. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js.nft.json +1 -0
  111. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page_client-reference-manifest.js +3 -0
  112. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +3 -3
  113. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +216 -180
  114. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +8 -9
  115. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  116. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  117. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +3 -3
  118. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +243 -195
  119. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +9 -11
  120. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  121. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +3 -3
  123. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +129 -81
  124. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +8 -9
  125. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +3 -3
  128. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +215 -167
  129. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +8 -9
  130. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  131. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  132. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +4 -4
  133. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +269 -221
  134. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +10 -12
  135. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  136. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +3 -3
  138. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +159 -123
  139. package/.next/standalone/.next/server/app/workspaces/page.js +7 -8
  140. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  141. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  142. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  143. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_09ikw5j.js +5 -0
  144. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +9 -5
  145. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0gr2wxq.js +1 -1
  146. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-1~xqo._.js +3 -0
  147. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.3n3t.._.js +3 -0
  148. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.wsvr6._.js +4 -0
  149. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0y3adwk._.js → [root-of-the-server]__0.yf1mx._.js} +2 -2
  150. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0o6i1wy._.js → [root-of-the-server]__00xe-t8._.js} +2 -2
  151. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0vh3112._.js → [root-of-the-server]__02yvm55._.js} +2 -2
  152. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__09arklv._.js → [root-of-the-server]__04-ty51._.js} +2 -2
  153. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0v98a~t._.js → [root-of-the-server]__065hi6e._.js} +2 -2
  154. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0k9rz_z._.js → [root-of-the-server]__06iuq17._.js} +2 -2
  155. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06x1zwj._.js +1 -1
  156. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06~wmlx._.js +3 -0
  157. package/.next/standalone/.next/server/chunks/[root-of-the-server]__092475e._.js +3 -0
  158. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0atap--._.js +3 -0
  159. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c3je91._.js +3 -0
  160. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dz.knv._.js +3 -0
  161. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ehwsa1._.js +4 -0
  162. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0esywxf._.js +3 -0
  163. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fd9z.r._.js +30 -0
  164. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gcg7i.._.js +3 -0
  165. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iyp~.k._.js +2 -2
  166. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__07xsu6m._.js → [root-of-the-server]__0j7565a._.js} +2 -2
  167. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kkrbn-._.js +4 -0
  168. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0m8t3vi._.js +3 -0
  169. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0nv83.p._.js +4 -0
  170. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0squ613._.js +3 -0
  171. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0u8tl88._.js +2 -2
  172. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wugb-9._.js +3 -0
  173. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0yeg1kp._.js +4 -0
  174. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zchqv1._.js +43 -0
  175. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0_~s0z4._.js → [root-of-the-server]__0zcy11y._.js} +2 -2
  176. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~1-i5h._.js +3 -0
  177. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~ju4-d._.js +1 -1
  178. package/.next/standalone/.next/server/chunks/[root-of-the-server]__10qclz-._.js +3 -0
  179. package/.next/standalone/.next/server/chunks/_02hac5p._.js +25 -2
  180. package/.next/standalone/.next/server/chunks/_0_w835g._.js +4 -0
  181. package/.next/standalone/.next/server/chunks/_0je3dz2._.js +25 -2
  182. package/.next/standalone/.next/server/chunks/_0tidm8l._.js +25 -2
  183. package/.next/standalone/.next/server/chunks/_0zok2an._.js +25 -2
  184. package/.next/standalone/.next/server/chunks/src_05balzk._.js +1 -1
  185. package/.next/standalone/.next/server/chunks/src_0aygchu._.js +1 -1
  186. package/.next/standalone/.next/server/chunks/src_0gif-f5._.js +1 -1
  187. package/.next/standalone/.next/server/chunks/src_0pg9w-x._.js +3 -0
  188. package/.next/standalone/.next/server/chunks/src_0vp6.co._.js +1 -1
  189. package/.next/standalone/.next/server/chunks/src_11k6i~l._.js +1 -1
  190. package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +3 -3
  191. package/.next/standalone/.next/server/chunks/src_lib_0d~1~wz._.js +1 -1
  192. package/.next/standalone/.next/server/chunks/src_lib_0ylel_1._.js +1 -1
  193. package/.next/standalone/.next/server/chunks/src_lib_ai_0xx6y51._.js +1 -1
  194. package/.next/standalone/.next/server/chunks/src_lib_ai_providers_index_ts_0.y.3vp._.js +1 -1
  195. package/.next/standalone/.next/server/chunks/src_lib_config-defaults_ts_10ayktg._.js +1 -1
  196. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  197. package/.next/standalone/.next/server/chunks/ssr/0se9_next_dist_0i5qmqd._.js +1 -1
  198. package/.next/standalone/.next/server/chunks/ssr/0se9_next_dist_esm_build_templates_app-page_04~dhws.js +4 -0
  199. package/.next/standalone/.next/server/chunks/ssr/{0ws9_lucide-react_dist_esm_icons_0r~ty--._.js → 0ws9_lucide-react_dist_esm_icons_0gv_cwy._.js} +2 -2
  200. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-geq20._.js +3 -0
  201. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__051tpij._.js → [root-of-the-server]__0.0m12b._.js} +1 -1
  202. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__096w7g2._.js → [root-of-the-server]__00qzvly._.js} +3 -3
  203. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01bz3_g._.js +3 -0
  204. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02~hdzx._.js +3 -0
  205. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lau3k_._.js → [root-of-the-server]__06sew6r._.js} +3 -3
  206. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dmjt7o._.js → [root-of-the-server]__07rk6ic._.js} +1 -1
  207. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__090y_.y._.js +3 -0
  208. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b.ej5q._.js +1 -1
  209. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0fl0l82._.js → [root-of-the-server]__0b6fbjv._.js} +1 -1
  210. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0tb.1li._.js → [root-of-the-server]__0b6hugs._.js} +3 -3
  211. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vi-5xg._.js → [root-of-the-server]__0br5e7w._.js} +3 -3
  212. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bx_h2u._.js +4 -0
  213. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dfqa5a._.js → [root-of-the-server]__0dhq_gl._.js} +1 -1
  214. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e79g0v._.js +3 -0
  215. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0g2wrd2._.js → [root-of-the-server]__0esg88l._.js} +1 -1
  216. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h_pt4a._.js +3 -0
  217. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ixgha6._.js → [root-of-the-server]__0hzwoy5._.js} +1 -1
  218. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0iaw1ms._.js +3 -0
  219. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0idkp76._.js +3 -0
  220. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j4m.1s._.js +3 -0
  221. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  222. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kmonje._.js +3 -0
  223. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0i0k_zi._.js → [root-of-the-server]__0kqp70x._.js} +1 -1
  224. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0l0~scn._.js +1 -1
  225. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lh3mlq._.js +3 -0
  226. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0~s8otw._.js → [root-of-the-server]__0m8m7vc._.js} +1 -1
  227. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0muf4wq._.js +49 -0
  228. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dv.-zu._.js → [root-of-the-server]__0n02kfa._.js} +1 -1
  229. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n3uc.v._.js +3 -0
  230. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0o5ohqy._.js +47 -0
  231. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ydiu_y._.js → [root-of-the-server]__0s_q09t._.js} +1 -1
  232. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s~4y3y._.js +1 -1
  233. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s~ak20._.js +3 -0
  234. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ta_mpj._.js +30 -0
  235. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0t_zq~v._.js → [root-of-the-server]__0trmndk._.js} +1 -1
  236. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__08etd~v._.js → [root-of-the-server]__0u3~-.g._.js} +1 -1
  237. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vyl8to._.js +3 -0
  238. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ws0_c1._.js +3 -0
  239. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0x7br99._.js +3 -0
  240. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xnuz05._.js +5 -0
  241. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zsnp~d._.js +5 -0
  242. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__06s-_gx._.js → [root-of-the-server]__0~edc3d._.js} +1 -1
  243. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~mhv4m._.js +3 -0
  244. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1013v_g._.js +47 -0
  245. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11fp64w._.js +1 -1
  246. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__123rmn-._.js +30 -0
  247. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0o9jkew._.js → [root-of-the-server]__12viys4._.js} +2 -2
  248. package/.next/standalone/.next/server/chunks/ssr/_0-5.hgb._.js +3 -0
  249. package/.next/standalone/.next/server/chunks/ssr/{_0dye20y._.js → _0-wp_zu._.js} +2 -2
  250. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  251. package/.next/standalone/.next/server/chunks/ssr/_0..h3hk._.js +1 -1
  252. package/.next/standalone/.next/server/chunks/ssr/{_08bq4g8._.js → _00_h2nx._.js} +2 -2
  253. package/.next/standalone/.next/server/chunks/ssr/_02p-udo._.js +3 -0
  254. package/.next/standalone/.next/server/chunks/ssr/_05~lqg-._.js +4 -0
  255. package/.next/standalone/.next/server/chunks/ssr/_0771b4a._.js +47 -0
  256. package/.next/standalone/.next/server/chunks/ssr/{_078cdw~._.js → _0ak77.u._.js} +3 -3
  257. package/.next/standalone/.next/server/chunks/ssr/{_0ljrvyt._.js → _0ami9yt._.js} +2 -2
  258. package/.next/standalone/.next/server/chunks/ssr/{_12la163._.js → _0awn2mm._.js} +2 -2
  259. package/.next/standalone/.next/server/chunks/ssr/{_09rq08e._.js → _0b660g4._.js} +1 -1
  260. package/.next/standalone/.next/server/chunks/ssr/{_0~6pqk.._.js → _0czsddm._.js} +1 -1
  261. package/.next/standalone/.next/server/chunks/ssr/_0fmko25._.js +3 -0
  262. package/.next/standalone/.next/server/chunks/ssr/_0gomvsp._.js +3 -0
  263. package/.next/standalone/.next/server/chunks/ssr/_0g~p9_x._.js +3 -0
  264. package/.next/standalone/.next/server/chunks/ssr/_0hg~.4w._.js +6 -0
  265. package/.next/standalone/.next/server/chunks/ssr/_0hsuip_._.js +3 -0
  266. package/.next/standalone/.next/server/chunks/ssr/_0hx2o_8._.js +3 -0
  267. package/.next/standalone/.next/server/chunks/ssr/{_0xnn~jq._.js → _0j7m~u6._.js} +1 -1
  268. package/.next/standalone/.next/server/chunks/ssr/{_13_b8hh._.js → _0l6byg1._.js} +1 -1
  269. package/.next/standalone/.next/server/chunks/ssr/_0mmy~98._.js +3 -0
  270. package/.next/standalone/.next/server/chunks/ssr/_0nrxhfb._.js +47 -0
  271. package/.next/standalone/.next/server/chunks/ssr/_0o_c3b2._.js +3 -0
  272. package/.next/standalone/.next/server/chunks/ssr/_0os43sb._.js +1 -1
  273. package/.next/standalone/.next/server/chunks/ssr/{_0h0b46r._.js → _0p5ft59._.js} +1 -1
  274. package/.next/standalone/.next/server/chunks/ssr/_0q2pep_._.js +3 -0
  275. package/.next/standalone/.next/server/chunks/ssr/{_01fdzzv._.js → _0snv7nt._.js} +1 -1
  276. package/.next/standalone/.next/server/chunks/ssr/_0ty4xe6._.js +43 -0
  277. package/.next/standalone/.next/server/chunks/ssr/_0vkl7.h._.js +47 -0
  278. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  279. package/.next/standalone/.next/server/chunks/ssr/_0x09t_o._.js +47 -0
  280. package/.next/standalone/.next/server/chunks/ssr/_0z5~opf._.js +3 -0
  281. package/.next/standalone/.next/server/chunks/ssr/_0zn.4bi._.js +47 -0
  282. package/.next/standalone/.next/server/chunks/ssr/_1086w4p._.js +47 -0
  283. package/.next/standalone/.next/server/chunks/ssr/{_09z-55_._.js → _10q2mbe._.js} +2 -2
  284. package/.next/standalone/.next/server/chunks/ssr/_11.knhq._.js +3 -0
  285. package/.next/standalone/.next/server/chunks/ssr/_1118hto._.js +43 -0
  286. package/.next/standalone/.next/server/chunks/ssr/{_0ytcm0j._.js → _12s8n8g._.js} +1 -1
  287. package/.next/standalone/.next/server/chunks/ssr/src_11j0qlp._.js +3 -0
  288. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  289. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  290. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  291. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  292. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  293. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  294. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  295. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  296. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  297. package/.next/standalone/.next/server/chunks/ssr/src_components_0rowjw~._.js +2 -2
  298. package/.next/standalone/.next/server/chunks/ssr/{_0bndp1~._.js → src_components_ui_popover_tsx_0a78wqo._.js} +2 -2
  299. package/.next/standalone/.next/server/chunks/ssr/{src_lib_04y-65j._.js → src_lib_04nzvfd._.js} +1 -1
  300. package/.next/standalone/.next/server/chunks/ssr/{src_lib_03xtona._.js → src_lib_0_px2pz._.js} +2 -2
  301. package/.next/standalone/.next/server/chunks/ssr/src_lib_0a.zy31._.js +3 -0
  302. package/.next/standalone/.next/server/chunks/ssr/src_lib_0b73q0a._.js +3 -0
  303. package/.next/standalone/.next/server/chunks/ssr/src_lib_0cld9rt._.js +3 -0
  304. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0-x.wbd._.js → src_lib_0dbf2qa._.js} +1 -1
  305. package/.next/standalone/.next/server/chunks/ssr/src_lib_0er7rzd._.js +3 -0
  306. package/.next/standalone/.next/server/chunks/ssr/src_lib_0f0v8_~._.js +3 -0
  307. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fr6fzy._.js +3 -0
  308. package/.next/standalone/.next/server/chunks/ssr/{src_lib_00p-ir2._.js → src_lib_0h2u7a0._.js} +1 -1
  309. package/.next/standalone/.next/server/chunks/ssr/src_lib_0k04rl3._.js +3 -0
  310. package/.next/standalone/.next/server/chunks/ssr/src_lib_0lpxsj~._.js +3 -0
  311. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sq6aqm._.js +3 -0
  312. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ui-~7g._.js +3 -0
  313. package/.next/standalone/.next/server/chunks/ssr/src_lib_0y5zzg-._.js +3 -0
  314. package/.next/standalone/.next/server/chunks/ssr/src_lib_0z-gn78._.js +3 -0
  315. package/.next/standalone/.next/server/chunks/ssr/src_lib_13c4a4g._.js +3 -0
  316. package/.next/standalone/.next/server/chunks/ssr/src_lib_pty_11~ojr2._.js +3 -0
  317. package/.next/standalone/.next/server/chunks/ssr/src_lib_pty_orphan-reaper_ts_0a0qmlo._.js +3 -0
  318. package/.next/standalone/.next/server/chunks/ssr/{_0ng0eku._.js → src_lib_schemas_ts_0ph~1ak._.js} +3 -3
  319. package/.next/standalone/.next/server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js +1 -1
  320. package/.next/standalone/.next/server/functions-config-manifest.json +1 -0
  321. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  322. package/.next/standalone/.next/server/next-font-manifest.js +1 -1
  323. package/.next/standalone/.next/server/next-font-manifest.json +4 -0
  324. package/.next/standalone/.next/server/pages/500.html +1 -1
  325. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  326. package/.next/standalone/.next/server/server-reference-manifest.json +2174 -1586
  327. package/.next/standalone/.next/static/chunks/0-kkc.ibted8y.js +1 -0
  328. package/.next/standalone/.next/static/chunks/0.2y9uc38xso-.js +1 -0
  329. package/.next/standalone/.next/static/chunks/{0c4-6qdhi645s.js → 0.gedys.tq.~k.js} +1 -1
  330. package/.next/standalone/.next/static/chunks/00g58.es_hxli.js +1 -0
  331. package/.next/standalone/.next/static/chunks/00o_eiv12t~.1.js +1 -0
  332. package/.next/standalone/.next/static/chunks/01qtgj0xv1fsm.js +2 -0
  333. package/.next/standalone/.next/static/chunks/024euw7po0d0w.js +1 -0
  334. package/.next/standalone/.next/static/chunks/02v-9v~885t9c.js +1 -0
  335. package/.next/standalone/.next/static/chunks/03ct4d8znb7tp.js +1 -0
  336. package/.next/standalone/.next/static/chunks/03uix~1ru.ovv.js +1 -0
  337. package/.next/standalone/.next/static/chunks/04.2m8l~ws19v.js +1 -0
  338. package/.next/standalone/.next/static/chunks/{0bvhkgitn__gl.js → 06x7oq8_iu~9d.js} +1 -1
  339. package/.next/standalone/.next/static/chunks/07c4b1kp_85qg.js +1 -0
  340. package/.next/standalone/.next/static/chunks/07qijq9o5jccu.js +1 -0
  341. package/.next/standalone/.next/static/chunks/{09bezwcb__18t.js → 09om2gfwimh7k.js} +1 -1
  342. package/.next/standalone/.next/static/chunks/0alhq.h4~iogi.js +1 -0
  343. package/.next/standalone/.next/static/chunks/{02xqrfqu.s8-i.js → 0cf7e1scao3zk.js} +1 -1
  344. package/.next/standalone/.next/static/chunks/0ck~sr0nkabl~.js +1 -0
  345. package/.next/standalone/.next/static/chunks/0d1ok-v-u-xe~.js +1 -0
  346. package/.next/standalone/.next/static/chunks/0d9u2xspag~4h.js +5 -0
  347. package/.next/standalone/.next/static/chunks/0ftptcpntzaux.js +1 -0
  348. package/.next/standalone/.next/static/chunks/0gk~m5bwgoafi.js +1 -0
  349. package/.next/standalone/.next/static/chunks/0in_7s8n4lmfr.js +1 -0
  350. package/.next/standalone/.next/static/chunks/0ix28r65.7o_r.js +12 -0
  351. package/.next/standalone/.next/static/chunks/{0c.t.evwah_m4.js → 0j5olwb~d3~3j.js} +1 -1
  352. package/.next/standalone/.next/static/chunks/0mtrtl-jl46in.js +2 -0
  353. package/.next/standalone/.next/static/chunks/0ov_akpudbv96.js +5 -0
  354. package/.next/standalone/.next/static/chunks/0oyskd~8~j.j7.js +1 -0
  355. package/.next/standalone/.next/static/chunks/0q1872yhybt55.js +1 -0
  356. package/.next/standalone/.next/static/chunks/0seo-lerjdkbn.js +1 -0
  357. package/.next/standalone/.next/static/chunks/0t1awv68pnn-e.js +1 -0
  358. package/.next/standalone/.next/static/chunks/0wl8cpmvyhv0l.js +1 -0
  359. package/.next/standalone/.next/static/chunks/0~2l3wz-gxs2j.js +1 -0
  360. package/.next/standalone/.next/static/chunks/0~7h_a_dofg-4.js +1 -0
  361. package/.next/standalone/.next/static/chunks/11yhe31en~dvt.js +1 -0
  362. package/.next/standalone/.next/static/chunks/12-mlz2vukuga.js +1 -0
  363. package/.next/standalone/.next/static/chunks/14fch6~swodjf.css +1 -0
  364. package/.next/standalone/.next/static/chunks/15gztq9f12uhe.js +1 -0
  365. package/.next/standalone/.next/static/chunks/15ue90qe1sh-9.js +1 -0
  366. package/.next/standalone/.next/static/chunks/17z9uivez~kp3.js +1 -0
  367. package/.next/standalone/package.json +1 -2
  368. package/dist/mcp-server.cjs +1199 -4330
  369. package/package.json +1 -2
  370. package/prisma/schema.prisma +46 -5
  371. package/scripts/migrations/0006-project-knowledge.ts +58 -0
  372. package/scripts/migrations/0007-product-group.ts +67 -0
  373. package/skills/tower/SKILL.md +22 -92
  374. package/skills/tower/references/task-source.md +80 -0
  375. package/.next/standalone/.next/server/chunks/[externals]__0x_wqa7._.js +0 -3
  376. package/.next/standalone/.next/server/chunks/[root-of-the-server]__034jopu._.js +0 -4
  377. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08-s.nv._.js +0 -4
  378. package/.next/standalone/.next/server/chunks/[root-of-the-server]__098.3z2._.js +0 -3
  379. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ehx6q.._.js +0 -3
  380. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iggiij._.js +0 -3
  381. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pmamzv._.js +0 -3
  382. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pzyjqf._.js +0 -20
  383. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0tplo5s._.js +0 -3
  384. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0tpzojh._.js +0 -3
  385. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xasom7._.js +0 -4
  386. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xy1t4x._.js +0 -4
  387. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0y~y6sh._.js +0 -3
  388. package/.next/standalone/.next/server/chunks/[root-of-the-server]__10jnn26._.js +0 -3
  389. package/.next/standalone/.next/server/chunks/[root-of-the-server]__116v_bx._.js +0 -4
  390. package/.next/standalone/.next/server/chunks/[root-of-the-server]__119rbly._.js +0 -3
  391. package/.next/standalone/.next/server/chunks/_0qk_esg._.js +0 -4
  392. package/.next/standalone/.next/server/chunks/_0t31z6q._.js +0 -5
  393. package/.next/standalone/.next/server/chunks/src_0aqjfcv._.js +0 -3
  394. package/.next/standalone/.next/server/chunks/src_lib_0nw5n~t._.js +0 -3
  395. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.q~~2p._.js +0 -3
  396. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01zrinc._.js +0 -3
  397. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__03x8axh._.js +0 -47
  398. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +0 -3
  399. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +0 -3
  400. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06t.cx~._.js +0 -47
  401. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0__klx0._.js +0 -47
  402. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ccy_gg._.js +0 -3
  403. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cjmeyl._.js +0 -3
  404. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dx9sp-._.js +0 -47
  405. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0f57j8r._.js +0 -47
  406. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j1dx6p._.js +0 -47
  407. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kn~asi._.js +0 -47
  408. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0m.hayd._.js +0 -47
  409. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mpjat-._.js +0 -3
  410. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0sg4fde._.js +0 -4
  411. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w24qox._.js +0 -47
  412. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wq~4aj._.js +0 -30
  413. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0yihqy6._.js +0 -3
  414. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +0 -5
  415. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zouyfp._.js +0 -3
  416. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1184s~q._.js +0 -3
  417. package/.next/standalone/.next/server/chunks/ssr/_0.iq8t8._.js +0 -4
  418. package/.next/standalone/.next/server/chunks/ssr/_00.myc6._.js +0 -3
  419. package/.next/standalone/.next/server/chunks/ssr/_00eymu8._.js +0 -3
  420. package/.next/standalone/.next/server/chunks/ssr/_03-we0p._.js +0 -47
  421. package/.next/standalone/.next/server/chunks/ssr/_04szgc6._.js +0 -3
  422. package/.next/standalone/.next/server/chunks/ssr/_0kd_tda._.js +0 -47
  423. package/.next/standalone/.next/server/chunks/ssr/_0ktexki._.js +0 -47
  424. package/.next/standalone/.next/server/chunks/ssr/_0lo1nei._.js +0 -6
  425. package/.next/standalone/.next/server/chunks/ssr/_0mdd702._.js +0 -3
  426. package/.next/standalone/.next/server/chunks/ssr/_0n0q6~9._.js +0 -3
  427. package/.next/standalone/.next/server/chunks/ssr/_0pab_al._.js +0 -3
  428. package/.next/standalone/.next/server/chunks/ssr/_0pg6-.y._.js +0 -3
  429. package/.next/standalone/.next/server/chunks/ssr/_0pvp63a._.js +0 -47
  430. package/.next/standalone/.next/server/chunks/ssr/_0qi4x-5._.js +0 -3
  431. package/.next/standalone/.next/server/chunks/ssr/_0qnobd-._.js +0 -43
  432. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +0 -3
  433. package/.next/standalone/.next/server/chunks/ssr/_0ts~td3._.js +0 -3
  434. package/.next/standalone/.next/server/chunks/ssr/_0y0_4zs._.js +0 -3
  435. package/.next/standalone/.next/server/chunks/ssr/_0yva1-.._.js +0 -3
  436. package/.next/standalone/.next/server/chunks/ssr/_0yz5dmq._.js +0 -47
  437. package/.next/standalone/.next/server/chunks/ssr/_11w13--._.js +0 -3
  438. package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_09eeb85._.js +0 -3
  439. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +0 -3
  440. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +0 -3
  441. package/.next/standalone/.next/server/chunks/ssr/src_0vv366l._.js +0 -3
  442. package/.next/standalone/.next/server/chunks/ssr/src_lib_03x1i~1._.js +0 -5
  443. package/.next/standalone/.next/server/chunks/ssr/src_lib_08gthaz._.js +0 -3
  444. package/.next/standalone/.next/server/chunks/ssr/src_lib_090~6pq._.js +0 -3
  445. package/.next/standalone/.next/server/chunks/ssr/src_lib_0k8dkbn._.js +0 -3
  446. package/.next/standalone/.next/server/chunks/ssr/src_lib_0knbpxk._.js +0 -3
  447. package/.next/standalone/.next/server/chunks/ssr/src_lib_0p_iehl._.js +0 -3
  448. package/.next/standalone/.next/server/chunks/ssr/src_lib_0qve1ri._.js +0 -3
  449. package/.next/standalone/.next/server/chunks/ssr/src_lib_0s35u~4._.js +0 -3
  450. package/.next/standalone/.next/server/chunks/ssr/src_lib_0x2ui80._.js +0 -3
  451. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ypc5_d._.js +0 -3
  452. package/.next/standalone/.next/server/chunks/ssr/src_lib_10jh2mz._.js +0 -3
  453. package/.next/standalone/.next/static/chunks/0-nppzqp-r.9c.js +0 -1
  454. package/.next/standalone/.next/static/chunks/0-te2tg6~a23u.js +0 -1
  455. package/.next/standalone/.next/static/chunks/0.64.6c1mh7d2.js +0 -1
  456. package/.next/standalone/.next/static/chunks/0.8n1ce9lggg4.js +0 -1
  457. package/.next/standalone/.next/static/chunks/0.nsmn6shzidu.js +0 -2
  458. package/.next/standalone/.next/static/chunks/0.zgqz~m3sjej.js +0 -1
  459. package/.next/standalone/.next/static/chunks/00.eotegra08r.js +0 -1
  460. package/.next/standalone/.next/static/chunks/01j9m895w64zn.js +0 -1
  461. package/.next/standalone/.next/static/chunks/03y272e6e9o8i.js +0 -1
  462. package/.next/standalone/.next/static/chunks/08eyd7sq064r0.js +0 -1
  463. package/.next/standalone/.next/static/chunks/09b33znj4m__c.js +0 -1
  464. package/.next/standalone/.next/static/chunks/0d0zm8viq3ol4.js +0 -12
  465. package/.next/standalone/.next/static/chunks/0dktl5t_dtxu..js +0 -1
  466. package/.next/standalone/.next/static/chunks/0e5~nzt657k92.js +0 -1
  467. package/.next/standalone/.next/static/chunks/0erwxvpb9w29_.js +0 -1
  468. package/.next/standalone/.next/static/chunks/0gf~0e3xpa0fj.js +0 -5
  469. package/.next/standalone/.next/static/chunks/0gy79dfi~lnig.js +0 -1
  470. package/.next/standalone/.next/static/chunks/0gz3xwb5_8xwv.js +0 -1
  471. package/.next/standalone/.next/static/chunks/0i75~pu.bp20..js +0 -1
  472. package/.next/standalone/.next/static/chunks/0jn_w5b9r~beu.js +0 -1
  473. package/.next/standalone/.next/static/chunks/0l59z2mf1ouxu.js +0 -1
  474. package/.next/standalone/.next/static/chunks/0m4xd-ie7j.hx.js +0 -1
  475. package/.next/standalone/.next/static/chunks/0mx9ebe6we4z0.js +0 -1
  476. package/.next/standalone/.next/static/chunks/0nsggimu5je3g.js +0 -1
  477. package/.next/standalone/.next/static/chunks/0nw8nx8kafy79.js +0 -1
  478. package/.next/standalone/.next/static/chunks/0pzjryav9pm7p.js +0 -1
  479. package/.next/standalone/.next/static/chunks/0q-rl50zskr35.js +0 -1
  480. package/.next/standalone/.next/static/chunks/0qqy2x-fsmmmx.js +0 -1
  481. package/.next/standalone/.next/static/chunks/0t59wpux0g1~l.js +0 -1
  482. package/.next/standalone/.next/static/chunks/0uezq8wiwkq8d.js +0 -1
  483. package/.next/standalone/.next/static/chunks/0vrc~7m1_cuvl.js +0 -1
  484. package/.next/standalone/.next/static/chunks/0xbh24-hxrt~m.css +0 -1
  485. package/.next/standalone/.next/static/chunks/0xkkmruo8p.l_.js +0 -1
  486. package/.next/standalone/.next/static/chunks/0xx0pe_j2kmr9.js +0 -2
  487. package/.next/standalone/.next/static/chunks/0zqjqiqmorenw.js +0 -5
  488. package/.next/standalone/.next/static/chunks/136l78utn~v08.js +0 -1
  489. package/.next/standalone/.next/static/chunks/171x9kw9wcyk4.js +0 -1
  490. package/.next/standalone/.next/static/chunks/17m4o~gdsvuo3.js +0 -1
  491. package/next.config.ts +0 -18
  492. /package/.next/standalone/.next/static/{f1860bJqnbYj-1WLMj7F- → Pf_z-PYy0CJhvcyPEi-LM}/_buildManifest.js +0 -0
  493. /package/.next/standalone/.next/static/{f1860bJqnbYj-1WLMj7F- → Pf_z-PYy0CJhvcyPEi-LM}/_clientMiddlewareManifest.js +0 -0
  494. /package/.next/standalone/.next/static/{f1860bJqnbYj-1WLMj7F- → Pf_z-PYy0CJhvcyPEi-LM}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,882651,960995,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let s=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",0,s],960995),e.s(["XCircle",0,s],181209)},236967,e=>{"use strict";var t=e.i(289721),s=e.i(210702),a=e.i(538059),r=e.i(259846),i=e.i(645378),n=e.i(453889),l=e.i(487278),o=e.i(911219),c=e.i(533499);let d=[{key:"notes",icon:i.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:l.Archive},{key:"groups",icon:o.Boxes}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:i}=(0,c.useI18n)(),n=(0,a.usePathname)(),l=d.find(e=>n.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,t.jsxs)(s.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(r.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:i("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),d.map(a=>{let r=a.icon,n=l===a.key;return(0,t.jsxs)(s.default,{href:`/workspaces/${e}/${a.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${n?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:i(`sidebar.${a.key}`)})]},a.key)})]})}])},245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},980376,20836,e=>{"use strict";var t=e.i(289721),s=e.i(225061),a=e.i(975157),r=e.i(519455),i=e.i(670123);function n({...e}){return(0,t.jsx)(s.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function l({className:e,...r}){return(0,t.jsx)(s.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,a.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...r})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(s.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:c="right",showCloseButton:d=!0,...x}){return(0,t.jsxs)(n,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(s.Dialog.Popup,{"data-slot":"sheet-content","data-side":c,className:(0,a.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...x,children:[o,d&&(0,t.jsxs)(s.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(r.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(i.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...r}){return(0,t.jsx)(s.Dialog.Description,{"data-slot":"sheet-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r})},"SheetHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,a.cn)("flex flex-col gap-0.5 p-4",e),...s})},"SheetTitle",0,function({className:e,...r}){return(0,t.jsx)(s.Dialog.Title,{"data-slot":"sheet-title",className:(0,a.cn)("font-heading text-base font-medium text-foreground",e),...r})}],980376);var o=e.i(514798);let c=(0,o.createServerReference)("403a7d2c9bb7cb0a78ee046f71013ad11077222cc0",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,c],20836)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},605005,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(980376),r=e.i(759684),i=e.i(487486),n=e.i(519455),l=e.i(533499),o=e.i(28725),c=e.i(20836),d=e.i(242407),x=e.i(445522),m=e.i(554057),u=e.i(950481),h=e.i(938238),p=e.i(184331),g=e.i(744798),f=e.i(997025),j=e.i(235357),b=e.i(144640),v=e.i(937304),y=e.i(685149),N=e.i(606393),k=e.i(875840),w=e.i(245697),C=e.i(12659),S=e.i(736061),D=e.i(460707),T=e.i(567860),I=e.i(645378),P=e.i(867533),A=e.i(297338),$=e.i(453889);function F({added:e,removed:s}){let{t:a}=(0,l.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:a("diff.filesChanged",{count:String(e+s)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),s>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",s]})]})}var O=e.i(35967),B=e.i(360112);let E=/\.(txt|md|json)$/i;function M({text:e}){let{t:a}=(0,l.useI18n)(),[r,i]=(0,s.useState)(!1),[n,o]=(0,s.useState)(!1),c=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let e=c.current;e&&o(e.scrollHeight>e.clientHeight+1)},[]),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{ref:c,className:`text-sm text-foreground whitespace-pre-wrap ${r?"":"line-clamp-5"}`,children:e}),n&&(0,t.jsx)("button",{type:"button",onClick:()=>i(e=>!e),className:"mt-1 text-xs font-medium text-sky-600 hover:underline dark:text-sky-400",children:a(r?"taskDrawer.collapseDescription":"taskDrawer.expandDescription")})]})}e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:z,taskId:L,hideEnvActions:R=!1}){let{t:U}=(0,l.useI18n)(),[H,V]=(0,s.useState)(null),[_,K]=(0,s.useTransition)(),[X,q]=(0,s.useState)(!1),[G,J]=(0,s.useState)([]),[W,Y]=(0,s.useState)([]),[Q,Z]=(0,s.useState)(null),[ee,et]=(0,s.useState)([]),[es,ea]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(!L||!e){V(null),Y([]),et([]);return}(0,x.getTaskNotes)(L).then(e=>Y(e.map(e=>({id:e.id,title:e.title,content:e.content,category:e.category})))).catch(()=>Y([])),(0,m.getTaskAssets)(L).then(e=>et(e.map(e=>({id:e.id,filename:e.filename,path:e.path,mimeType:e.mimeType,size:e.size})))).catch(()=>et([])),K(async()=>{let e=await (0,c.getTaskOverview)(L);e&&(V(e),e.project?.workspaceId&&(0,d.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{J(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>J([])))})},[L,e]);let er=H?y.BOARD_COLUMNS.find(e=>e.id===H.status):null,ei=H?y.PRIORITY_CONFIG[H.priority]:null,en=H?.executions?.[0]??null,el=(()=>{if(en?.worktreePath)return en.worktreePath;let e=H?.project?.localPath;return e?H?.subPath?`${e}/${H.subPath}`:e:null})(),eo=(()=>{let e=en?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),ec=e=>(0,v.isImageAsset)(e.filename,e.mimeType)||E.test(e.filename),ed=e=>{ec(e)?ea(e):B.toast.info(U("assets.previewNotSupported"))},ex=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));B.toast.error(e.error||U("git.openInFileManagerFailed"))}}catch{B.toast.error(U("git.openInFileManagerFailed"))}},em=es?(0,v.isImageAsset)(es.filename,es.mimeType)?"image":E.test(es.filename)?"text":null:null,eu=ee.filter(e=>(0,v.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,v.localPathToApiUrl)(e.path),filename:e.filename})),eh=es?eu.findIndex(e=>e.id===es.id):-1,ep=async e=>{if(H?.project)try{let{autoStart:t,...s}=e;await (0,o.createTask)({...s,projectId:H.project.id}),B.toast.success(U("taskDrawer.duplicateSuccess")),q(!1),z(!1)}catch{B.toast.error(U("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(a.Sheet,{open:e,onOpenChange:z,children:[(0,t.jsxs)(a.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(a.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(a.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:H?.title??""}),(0,t.jsx)(a.SheetDescription,{className:"sr-only",children:U("taskDrawer.title")}),H&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[er&&(0,t.jsxs)(i.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${er.color}`}),er.label]}),ei&&(0,t.jsx)(i.Badge,{variant:"secondary",className:`text-xs ${ei.color}`,children:ei.label}),H.version&&(0,t.jsx)(O.TaskVersionTag,{number:H.version.number,name:H.version.name,showName:!0})]})]}),(0,t.jsx)(r.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:_&&!H?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:U("assets.loading")}):H?(0,t.jsxs)("div",{className:"p-4 pb-8 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:U("taskDrawer.description")}),H.description?(0,t.jsx)(M,{text:H.description},H.id):(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:U("taskDrawer.noDescription")})]}),H.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:U("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:H.labels.map(e=>(0,t.jsx)(i.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(N.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:U("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(H.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(w.Package,{className:"h-3.5 w-3.5"}),U("taskDrawer.resources"),(0,t.jsx)("span",{className:"text-foreground",children:H._count.assets})]}),ee.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:ee.map(e=>{var s;let a=ec(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border px-2 py-1.5",children:[(0,t.jsx)(A.Paperclip,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("button",{type:"button",onClick:()=>ed(e),disabled:!a,className:`min-w-0 flex-1 truncate text-left text-sm ${a?"cursor-pointer hover:underline":"cursor-default"}`,title:a?U("assets.preview"):e.filename,children:e.filename}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:(s=e.size)?s<1024?`${s} B`:s<1048576?`${(s/1024).toFixed(1)} KB`:`${(s/1024/1024).toFixed(1)} MB`:""}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[a&&(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-xs",onClick:()=>ed(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:U("assets.preview"),children:(0,t.jsx)(P.Eye,{className:"h-3 w-3"})}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-xs",onClick:()=>ex(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:U("assets.revealInFinder"),children:(0,t.jsx)($.FolderOpen,{className:"h-3 w-3"})})]})]},e.id)})}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:U("taskDrawer.noResources")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(I.FileText,{className:"h-3.5 w-3.5"}),U("taskDrawer.notes")]}),W.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:W.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>Z(e),className:"group/note flex w-full items-start gap-2 rounded-md border border-border p-2 text-left transition-colors hover:bg-accent/40",title:U("taskDrawer.previewNote"),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:e.title}),e.content&&(0,t.jsx)("p",{className:"mt-0.5 line-clamp-2 whitespace-pre-wrap text-xs text-muted-foreground",children:e.content})]}),(0,t.jsx)(P.Eye,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/note:opacity-100"})]},e.id))}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:U("taskDrawer.noNotes")})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:U("taskDrawer.fileChanges")}),eo?(0,t.jsx)(F,{added:eo.added,removed:eo.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:U("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(C.PlayCircle,{className:"h-3.5 w-3.5"}),U("taskDrawer.lastExecution")]}),en?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(i.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:en.status}),en.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:en.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:U("taskDrawer.noExecution")})]}),el&&!R&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,u.openInFileManager)(el)}catch(e){console.error("openInFileManager failed:",e),B.toast.error(U("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(S.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),U("git.openInFileManager")]}),(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,h.openInEditor)(el)}catch(e){console.error("openInEditor failed:",e),B.toast.error(U("git.openInEditorFailed"))}},children:[(0,t.jsx)(D.Code,{className:"h-3.5 w-3.5 shrink-0"}),U("git.openInEditor")]}),(0,t.jsxs)(n.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,p.openInTerminal)(el)}catch(e){console.error("openInTerminal failed:",e),B.toast.error(U("git.openInTerminalFailed"))}},children:[(0,t.jsx)(T.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),U("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(n.Button,{variant:"default",className:"w-full",onClick:()=>{H&&q(!0)},disabled:!H,children:[(0,t.jsx)(k.Copy,{className:"h-4 w-4"}),U("taskDrawer.duplicate")]})})]}):null})]}),H?.project&&(0,t.jsx)(g.CreateTaskDialog,{open:X,onOpenChange:q,onSubmit:ep,labels:G,projectType:H.project.type,projectLocalPath:H.project.localPath,prefillFromTask:{title:H.title,description:H.description,priority:H.priority,subPath:H.subPath,labelIds:H.labels.map(e=>e.label.id),baseBranch:H.baseBranch}}),(0,t.jsx)(f.NotePreviewDialog,{note:Q,open:null!==Q,onOpenChange:e=>{e||Z(null)}}),(0,t.jsx)(j.ImageLightbox,{imageUrl:"image"===em&&eh>=0?eu[eh].url:null,filename:"image"===em&&eh>=0?eu[eh].filename:"",open:"image"===em,onOpenChange:e=>{e||ea(null)},assets:eu.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:eh>=0?eh:void 0,onIndexChange:e=>{let t=eu[e];if(!t)return;let s=ee.find(e=>e.id===t.id);s&&ea(s)}}),(0,t.jsx)(b.TextPreviewDialog,{url:"text"===em&&es?(0,v.localPathToApiUrl)(es.path):null,filename:es?.filename??"",open:"text"===em,onOpenChange:e=>{e||ea(null)}})]})}],605005)},107830,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(487278),r=e.i(882651),i=e.i(181209),n=e.i(400355),l=e.i(738690),o=e.i(967489),c=e.i(533499),d=e.i(236967),x=e.i(514798);let m=(0,x.createServerReference)("402ad17793fc99949e1a4d611602a7fc06c5ad0fb5",x.callServer,void 0,x.findSourceMapURL,"getArchivedTasks");var u=e.i(605005),h=e.i(35967);function p(e){return new Date(e).toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function g({priority:e}){return(0,t.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${{LOW:"bg-slate-400",MEDIUM:"bg-amber-400",HIGH:"bg-orange-500",CRITICAL:"bg-rose-500"}[e]??"bg-slate-400"}`})}e.s(["ArchivePageClient",0,function({allWorkspaces:e,initialWorkspaceId:x,initialProjectId:f,initialTasks:j}){let b,{t:v}=(0,c.useI18n)(),[y,N]=(0,s.useTransition)(),[k,w]=(0,s.useState)(x),[C,S]=(0,s.useState)(f),[D,T]=(0,s.useState)(j),[I,P]=(0,s.useState)(null),[A,$]=(0,s.useState)(""),F=e.find(e=>e.id===k),O=F?.projects??[],B=A.trim().toLowerCase(),E=B?D.filter(e=>e.title.toLowerCase().includes(B)):D,M=(0,s.useCallback)(e=>{e?N(async()=>{T(await m(e))}):T([])},[N]);return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(d.SubPageNav,{workspaceId:k}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(o.Select,{value:k,onValueChange:t=>t&&(t=>{if(t===k)return;w(t);let s=e.find(e=>e.id===t),a=s?.projects[0]??null;S(a?.id??null),M(a?.id??null)})(t),children:[(0,t.jsx)(o.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:F?.name??k})}),(0,t.jsx)(o.SelectContent,{children:e.map(e=>(0,t.jsx)(o.SelectItem,{value:e.id,children:e.name},e.id))})]}),O.length>0&&(0,t.jsxs)(o.Select,{value:C??"",onValueChange:e=>e&&void(e!==C&&(S(e),M(e))),children:[(0,t.jsx)(o.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(b=O.find(e=>e.id===C))?b.alias?`${b.name} (${b.alias})`:b.name:""})}),(0,t.jsx)(o.SelectContent,{children:O.map(e=>(0,t.jsxs)(o.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,t.jsxs)("div",{className:"relative ml-auto",children:[(0,t.jsx)(l.Search,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)("input",{type:"text",value:A,onChange:e=>$(e.target.value),placeholder:v("archive.searchPlaceholder"),className:"h-8 w-48 rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),(0,t.jsxs)("span",{className:"rounded-full bg-muted px-2.5 py-0.5 text-[11px] text-muted-foreground",children:[E.length," ",v("archive.tasksCount")]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,t.jsxs)("div",{className:`relative ${y?"opacity-40 pointer-events-none":""} transition-opacity`,children:[y&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(n.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===E.length?(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)(a.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:B?v("archive.noSearchResults"):v("archive.noTasks")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:B?v("archive.noSearchResultsDesc"):v("archive.noTasksDesc")})]}):(0,t.jsx)("div",{className:"space-y-2",children:E.map(e=>{let s="DONE"===e.status,a=e.executions[0];return(0,t.jsx)("div",{role:"button",tabIndex:0,onClick:()=>P(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),P(e.id))},className:"group cursor-pointer rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:border-border/80 hover:bg-accent/30 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"mt-0.5 shrink-0",children:s?(0,t.jsx)(r.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):(0,t.jsx)(i.XCircle,{className:"h-4 w-4 text-rose-500"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g,{priority:e.priority}),(0,t.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:e.title}),(0,t.jsx)("span",{className:`ml-1 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ${s?"bg-emerald-500/10 text-emerald-400 ring-1 ring-emerald-500/20":"bg-rose-500/10 text-rose-400 ring-1 ring-rose-500/20"}`,children:s?v("archive.status.done"):v("archive.status.cancelled")}),e.version&&(0,t.jsx)(h.TaskVersionTag,{number:e.version.number,name:e.version.name,showName:!0,className:"shrink-0"})]}),e.labels.length>0&&(0,t.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:e.labels.map(e=>(0,t.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,outline:`1px solid ${e.label.color}40`},children:e.label.name},e.label.id))}),(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,t.jsxs)("span",{children:[v("archive.createdAt"),": ",p(e.createdAt)]}),(0,t.jsxs)("span",{children:[s?v("archive.completedAt"):v("archive.cancelledAt"),": ",p(e.updatedAt)]}),a&&(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[v("archive.lastExecution"),":"," ",(0,t.jsx)("span",{className:`rounded px-1 py-0.5 font-mono text-[10px] ${"COMPLETED"===a.status?"bg-emerald-500/10 text-emerald-400":"FAILED"===a.status?"bg-rose-500/10 text-rose-400":"bg-amber-500/10 text-amber-400"}`,children:a.status})]})]})]})]})},e.id)})})]})}),(0,t.jsx)(u.TaskOverviewDrawer,{open:!!I,onOpenChange:e=>{e||P(null)},taskId:I,hideEnvActions:!0})]})}],107830)},244455,e=>{e.v(t=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(t=>e.l(t))).then(()=>t(629495)))},800307,e=>{e.v(t=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(t=>e.l(t))).then(()=>t(267483)))}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,113399,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),n=e.i(821957),i=e.i(533499),r=e.i(360112),l=e.i(519455),o=e.i(793479),c=e.i(624687),d=e.i(110204),m=e.i(487486),u=e.i(699375),x=e.i(776639),g=e.i(975157),h=e.i(591540),p=e.i(386343),f=e.i(572989);let b=(0,f.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var j=e.i(645378);let v=(0,f.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var N=e.i(125177),y=e.i(256753),w=e.i(245697),k=e.i(360325),C=e.i(657153),S=e.i(232545);let T=(0,f.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var D=e.i(998626);let M=(0,f.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);var B=e.i(867533);let R=(0,f.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var L=e.i(400355),P=e.i(882651),I=e.i(181209),U=e.i(453889),F=e.i(19671),E=e.i(368490),H=e.i(240095),V=e.i(206781),z=e.i(404122),A=e.i(514798);let $=(0,A.createServerReference)("00e0f4165c3e26131b17fe500b9750040c3067f2f6",A.callServer,void 0,A.findSourceMapURL,"getAvailableTerminalApps"),K=(0,A.createServerReference)("002440c9e28ab94cdd90b58bafb6f601dc41d8d108",A.callServer,void 0,A.findSourceMapURL,"getAvailableEditors");var O=e.i(779570);let W=(0,A.createServerReference)("40e19466379d9cfbf66fdbf7fcc53b5b163b8ff584",A.callServer,void 0,A.findSourceMapURL,"createPrompt"),q=(0,A.createServerReference)("609e6d93185ca81f068f317bfa22b1a7fe0845458e",A.callServer,void 0,A.findSourceMapURL,"updatePrompt"),_=(0,A.createServerReference)("40f8a1d8e3cecafa1c8b48ae6239f0bdcedae2a59f",A.callServer,void 0,A.findSourceMapURL,"deletePrompt"),G=(0,A.createServerReference)("00012b5880c4b1b33865bea388958a7000a857741d",A.callServer,void 0,A.findSourceMapURL,"getBuiltinPrompts"),X=(0,A.createServerReference)("403a4190ffbd80617b45fc61d8a8a67e4b4a3964f6",A.callServer,void 0,A.findSourceMapURL,"saveSystemDirective"),Y=(0,A.createServerReference)("008a8f1239f29f473c63c1473a711f5e37ebd37efc",A.callServer,void 0,A.findSourceMapURL,"resetSystemDirective"),Z=(0,A.createServerReference)("00f503ecee8173ce949d0761132e2a3a885d3bf37d",A.callServer,void 0,A.findSourceMapURL,"getAvailableProviders");var J=e.i(567860);let Q=(0,f.default)("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 ee=e.i(967489);let et=(0,A.createServerReference)("00a34ff6f66d445bf99f60140f51595ec919dea805",A.callServer,void 0,A.findSourceMapURL,"getAiCapabilityConfigs"),es=(0,A.createServerReference)("6093814f04e7639e043f113c26dad5ed3b42dcf4db",A.callServer,void 0,A.findSourceMapURL,"updateAiCapabilityConfig"),ea=(0,A.createServerReference)("009c9ba31d33414315e6ebce045ad942596592deeb",A.callServer,void 0,A.findSourceMapURL,"getConnectedProviders"),en=[{slot:"summary",key:"settings.capabilitySlots.summary"},{slot:"dreaming",key:"settings.capabilitySlots.dreaming"},{slot:"analysis",key:"settings.capabilitySlots.analysis"},{slot:"assistant",key:"settings.capabilitySlots.assistant"}];function ei(){let{t:e}=(0,i.useI18n)(),[a,n]=(0,s.useState)([]),[l,o]=(0,s.useState)([]),[c,d]=(0,s.useState)([]),[m,u]=(0,s.useState)(!0),[x,g]=(0,s.useTransition)();(0,s.useEffect)(()=>{let e=!0;return Promise.all([Z(),ea(),et()]).then(([t,s,a])=>{e&&(n(t),o(s),d(a))}).catch(t=>{e&&r.toast.error(t instanceof Error?t.message:String(t))}).finally(()=>{e&&u(!1)}),()=>{e=!1}},[]);let h=c.find(e=>"terminal"===e.slot),p=h?.provider??(l.includes("claude")?"claude":l[0]??"claude"),f=e=>a.find(t=>t.name===e)?.displayName??e;return m?(0,t.jsx)("div",{className:"h-32 rounded-xl bg-muted animate-pulse"}):(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-card p-4 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h3",{className:"text-sm font-medium flex items-center gap-2",children:[(0,t.jsx)(J.Terminal,{className:"h-4 w-4"}),e("settings.capabilitySlots.title")]}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e("settings.capabilitySlots.desc")})]}),(0,t.jsxs)("div",{className:`flex items-center justify-between gap-4 ${x?"opacity-40 pointer-events-none":""}`,children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:e("settings.capabilitySlots.terminal")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:e("settings.capabilitySlots.terminalDesc")})]}),0===l.length?(0,t.jsx)("span",{className:"text-xs text-muted-foreground shrink-0",children:e("settings.capabilitySlots.noConnected")}):(0,t.jsxs)(ee.Select,{value:p,onValueChange:function(t){t&&g(async()=>{try{await es("terminal",{provider:t,mode:"cli",model:null}),d(e=>{let s=e.filter(e=>"terminal"!==e.slot),a=h??{id:"",slot:"terminal",mode:"cli",model:null,createdAt:new Date,updatedAt:new Date};return[...s,{...a,slot:"terminal",provider:t,mode:"cli",model:null}]}),r.toast.success(e("settings.capabilitySlots.updated"))}catch(e){r.toast.error(e instanceof Error?e.message:String(e))}})},children:[(0,t.jsx)(ee.SelectTrigger,{className:"w-44 shrink-0",children:(0,t.jsx)("span",{className:"truncate",children:f(p)})}),(0,t.jsx)(ee.SelectContent,{children:l.map(e=>(0,t.jsx)(ee.SelectItem,{value:e,children:f(e)},e))})]})]}),(0,t.jsx)("div",{className:"space-y-2.5 border-t border-border/50 pt-3",children:en.map(s=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 opacity-60",children:[(0,t.jsxs)("div",{className:"text-sm font-medium flex items-center gap-1.5",children:[(0,t.jsx)(Q,{className:"h-3 w-3"}),e(s.key)]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground shrink-0",children:e("settings.capabilitySlots.claudeFixed")})]},s.slot))})]})}var er=e.i(746798),el=e.i(224277);let eo=(0,f.default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);var ec=e.i(631675);let ed=(0,f.default)("folder-up",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);var em=e.i(922541),eu=e.i(759686),ex=e.i(487278);let eg=(0,A.createServerReference)("4091d1c52370bebd3e8d05e3278bd1ded41ec00821",A.callServer,void 0,A.findSourceMapURL,"createBackup"),eh=(0,A.createServerReference)("0095fe412d0e2677a5878a74f6a466ce8a44748d5d",A.callServer,void 0,A.findSourceMapURL,"listBackupFiles"),ep=(0,A.createServerReference)("406eb017fe97e1b8836c2d0ff73008ccb33b575bbd",A.callServer,void 0,A.findSourceMapURL,"deleteBackupFile"),ef=(0,A.createServerReference)("40833100ffb6bde731d9bc18b245a88d9bf2245ee4",A.callServer,void 0,A.findSourceMapURL,"restoreBackup"),eb=(0,A.createServerReference)("40373451bfef2452a397c143599c7c33dda0f69565",A.callServer,void 0,A.findSourceMapURL,"resetSystem"),ej=(0,A.createServerReference)("002b67095ad05477f1e9b1dc42e035b0013aa032cf",A.callServer,void 0,A.findSourceMapURL,"getBackupDir"),ev=(0,A.createServerReference)("40fb517cffb715373e30718ed55eba58e6c3a0f041",A.callServer,void 0,A.findSourceMapURL,"setBackupDir"),eN=(0,A.createServerReference)("00242e8c0e654809a46e6a5f57040da49ea7d1a25c",A.callServer,void 0,A.findSourceMapURL,"getStorageLocation"),ey=(0,A.createServerReference)("40f82f35215d57c64e195348a95941d90ac7e90cb1",A.callServer,void 0,A.findSourceMapURL,"setStorageLocation");function ew(){let{t:e,locale:n}=(0,i.useI18n)(),c=(0,a.useRouter)(),[d,m]=(0,s.useState)([]),[u,g]=(0,s.useState)(""),[h,p]=(0,s.useState)(!1),[f,b]=(0,s.useState)(null),[j,v]=(0,s.useState)(!1),[N,y]=(0,s.useState)(!0),[w,k]=(0,s.useState)(null),[C,S]=(0,s.useState)(!1),[T,M]=(0,s.useState)(""),B=(0,s.useRef)(null),[R,P]=(0,s.useState)(!1),[I,U]=(0,s.useState)(""),F=(0,s.useCallback)(async()=>{y(!0);try{let[e,t,s]=await Promise.all([eh(),ej(),eN()]);m(e),g(t),b(s)}finally{y(!1)}},[]);(0,s.useEffect)(()=>{F()},[F]);let E=async()=>{let t=T.trim()||void 0;S(!1),M(""),k("create");try{await eg(t),r.toast.success(e("settings.backup.createSuccess")),await F()}catch{r.toast.error(e("settings.backup.createError"))}finally{k(null)}},H=async t=>{if(confirm(e("settings.backup.restoreConfirm"))){k("restore");try{await ef(t),r.toast.success(e("settings.backup.restoreSuccess"),{action:{label:e("settings.backup.reload"),onClick:()=>window.location.reload()},duration:15e3}),await F()}catch{r.toast.error(e("settings.backup.restoreError"))}finally{k(null)}}},V=async t=>{if(confirm(e("settings.backup.deleteConfirm")))try{await ep(t),r.toast.success(e("settings.backup.deleteSuccess")),m(e=>e.filter(e=>e.filename!==t))}catch{r.toast.error(e("settings.backup.deleteError"))}},z=async t=>{p(!1);try{await ev(t),g(t),r.toast.success(e("settings.backup.dirSaved")),await F()}catch{r.toast.error(e("settings.backup.dirError"))}},A=async t=>{k("storage");try{let s=await ey({newPath:t});if(!s.ok)return void r.toast.error(s.error||e("settings.storage.moveError"));r.toast.success(e("settings.storage.moveSuccess",{count:String(s.moved??0)})),await F()}catch(t){r.toast.error(t instanceof Error?t.message:e("settings.storage.moveError"))}finally{k(null)}},$=async t=>{v(!1),confirm(e("settings.storage.moveConfirm"))&&await A(t)},K=async()=>{!f||f.isDefault||confirm(e("settings.storage.resetConfirm"))&&await A(f.default)},O=async t=>{let s=t.target.files?.[0];if(s){t.target.value="",k("import");try{let t=new FormData;t.append("file",s);let a=await fetch("/api/internal/backup/import",{method:"POST",body:t});if(!a.ok){let t=await a.json();r.toast.error("Invalid backup archive"===t.error?e("settings.backup.importInvalid"):(t.error,e("settings.backup.importError")));return}r.toast.success(e("settings.backup.importSuccess")),await F()}catch{r.toast.error(e("settings.backup.importError"))}finally{k(null)}}},W=async()=>{if("RESET"===I){P(!1),U(""),k("reset");try{await eb("RESET"),r.toast.success(e("settings.backup.resetSuccess")),c.push("/")}catch{r.toast.error(e("settings.backup.resetError"))}finally{k(null)}}},q=null!==w;return(0,t.jsxs)("div",{className:"space-y-6",children:[("restore"===w||"reset"===w)&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,t.jsx)(L.Loader2,{className:"h-8 w-8 animate-spin text-muted-foreground"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"restore"===w?e("settings.backup.restoring"):e("settings.backup.resetting")})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold",children:e("settings.storage.sectionTitle")}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e("settings.storage.hint")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{children:[e("settings.storage.current"),":"]}),(0,t.jsx)("code",{className:"rounded bg-muted px-2 py-0.5 text-xs",children:f?.current??"…"}),f?.isDefault&&(0,t.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:e("settings.storage.defaultBadge")}),(0,t.jsx)(l.Button,{variant:"ghost",onClick:()=>v(!0),disabled:"storage"===w,className:"text-xs text-muted-foreground",children:"storage"===w?(0,t.jsx)(L.Loader2,{className:"h-3 w-3 animate-spin"}):e("settings.storage.change")}),f&&!f.isDefault&&(0,t.jsx)(l.Button,{variant:"ghost",onClick:K,disabled:"storage"===w,className:"text-xs text-muted-foreground",children:e("settings.storage.reset")})]}),(0,t.jsx)(el.FolderBrowserDialog,{open:j,onOpenChange:v,onSelect:$})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold",children:e("settings.backup.sectionTitle")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{children:[e("settings.backup.dir"),":"]}),(0,t.jsx)("code",{className:"rounded bg-muted px-2 py-0.5 text-xs",children:u}),(0,t.jsx)(l.Button,{variant:"ghost",onClick:()=>p(!0),className:"text-xs text-muted-foreground",children:e("settings.backup.dirChange")})]}),(0,t.jsx)(el.FolderBrowserDialog,{open:h,onOpenChange:p,onSelect:z})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Button,{onClick:()=>{M(""),S(!0)},disabled:q,className:"gap-2",children:"create"===w?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L.Loader2,{className:"h-4 w-4 animate-spin"})," ",e("settings.backup.creating")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eo,{className:"h-4 w-4"})," ",e("settings.backup.create")]})}),(0,t.jsxs)(er.Tooltip,{children:[(0,t.jsxs)(er.TooltipTrigger,{render:(0,t.jsx)(l.Button,{variant:"outline",disabled:q,onClick:()=>B.current?.click(),className:"gap-2"}),children:[(0,t.jsx)(ed,{className:"h-4 w-4"}),e("settings.backup.import")]}),(0,t.jsx)(er.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.importHint")})]}),(0,t.jsx)("input",{ref:B,type:"file",accept:".tar.gz,.gz",className:"hidden",onChange:O})]}),(0,t.jsx)(x.Dialog,{open:C,onOpenChange:S,children:(0,t.jsxs)(x.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(x.DialogHeader,{children:(0,t.jsx)(x.DialogTitle,{children:e("settings.backup.create")})}),(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:e("settings.backup.createLabel")}),(0,t.jsx)(o.Input,{value:T,onChange:e=>M(e.target.value),onKeyDown:e=>"Enter"===e.key&&E(),placeholder:e("settings.backup.createLabelPlaceholder"),className:"mt-1.5",autoFocus:!0})]}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>S(!1),children:e("common.cancel")}),(0,t.jsx)(l.Button,{onClick:E,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:e("settings.backup.create")})]})]})}),N?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(L.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):0===d.length?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-12 text-center",children:[(0,t.jsx)(ex.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("settings.backup.empty")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e("settings.backup.emptyDesc")})]}):(0,t.jsx)("div",{className:"space-y-3",children:d.map(s=>{var a,i;return(0,t.jsx)("div",{className:"group rounded-lg border border-border bg-card p-4 transition-colors hover:bg-accent/30",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s.label?(0,t.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:s.label}):(0,t.jsx)("span",{className:"truncate text-sm font-medium font-mono text-foreground",children:s.filename}),s.autoBackup&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-500 ring-1 ring-amber-500/20",children:e("settings.backup.autoLabel")})]}),s.label&&(0,t.jsx)("div",{className:"mt-0.5 text-[11px] font-mono text-muted-foreground/60",children:s.filename}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground",children:[(a=s.size)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`," · ",(i=s.createdAt,new Date(i).toLocaleString("zh"===n?"zh-CN":"en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}))]}),s.preview.length>0&&(0,t.jsxs)("div",{className:"mt-1.5 text-xs text-muted-foreground",children:[s.preview.map((e,s)=>(0,t.jsxs)("span",{children:[s>0&&" ",e.workspace,"(",e.projects.join(", "),")"]},s)),s.stats.workspaces>s.preview.length&&(0,t.jsxs)("span",{children:[" ",e("settings.backup.workspaces",{count:String(s.stats.workspaces)})]})]}),(0,t.jsxs)("div",{className:"mt-0.5 text-xs text-muted-foreground",children:[e("settings.backup.projects",{count:String(s.stats.projects)})," · ",e("settings.backup.tasks",{count:String(s.stats.tasks)})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsxs)(er.Tooltip,{children:[(0,t.jsx)(er.TooltipTrigger,{render:(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>H(s.filename),disabled:q,className:"text-muted-foreground hover:text-foreground"}),children:(0,t.jsx)(ec.Upload,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(er.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.restore")})]}),(0,t.jsxs)(er.Tooltip,{children:[(0,t.jsx)(er.TooltipTrigger,{render:(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>V(s.filename),disabled:q,className:"text-muted-foreground hover:text-rose-400"}),children:(0,t.jsx)(D.Trash2,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(er.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.delete")})]})]})]})},s.filename)})}),(0,t.jsxs)("div",{className:"border-t border-border pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-rose-400",children:[(0,t.jsx)(eu.AlertTriangle,{className:"h-4 w-4"}),e("settings.backup.dangerZone")]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground leading-relaxed",children:e("settings.backup.resetDesc")}),(0,t.jsxs)(l.Button,{variant:"outline",onClick:()=>{U(""),P(!0)},disabled:q,className:"mt-3 border-rose-500/30 text-rose-400 hover:bg-rose-500/10 hover:text-rose-400",children:[(0,t.jsx)(em.RotateCcw,{className:"mr-2 h-3.5 w-3.5"}),e("settings.backup.reset")]})]}),(0,t.jsx)(x.Dialog,{open:R,onOpenChange:P,children:(0,t.jsxs)(x.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsxs)(x.DialogHeader,{children:[(0,t.jsx)(x.DialogTitle,{children:e("settings.backup.resetConfirmTitle")}),(0,t.jsx)(x.DialogDescription,{children:e("settings.backup.resetConfirmDesc")})]}),(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:e("settings.backup.resetConfirmInput")}),(0,t.jsx)(o.Input,{value:I,onChange:e=>U(e.target.value),placeholder:"RESET",className:"mt-1.5 font-mono"})]}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>P(!1),children:e("common.cancel")}),(0,t.jsx)(l.Button,{disabled:"RESET"!==I,onClick:W,className:"border-rose-500/30 bg-rose-500/10 text-rose-400 hover:bg-rose-500/20",children:e("settings.backup.reset")})]})]})})]})}var ek=e.i(887911),eC=e.i(597746);let eS=(0,f.default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var eT=e.i(875840),eD=e.i(475958),eM=e.i(194358),eB=e.i(337822),eR=e.i(991838);let eL=[{os:"macOS",cmd:"brew install ripgrep"},{os:"Windows",cmd:"winget install BurntSushi.ripgrep"},{os:"Linux",cmd:"sudo apt install ripgrep"}];function eP({cmd:e}){let{t:a}=(0,i.useI18n)(),[n,o]=(0,s.useState)(!1),c=async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}o(!0),r.toast.success(a("common.copied")),setTimeout(()=>o(!1),1500)}catch{r.toast.error(a("common.copyFailed"))}};return(0,t.jsxs)("div",{className:"flex items-start gap-1 rounded-md bg-background/60 pl-2 pr-1 py-1 ring-1 ring-border/60",children:[(0,t.jsx)("code",{className:"min-w-0 flex-1 break-all font-mono text-[11px] leading-relaxed",children:e}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",className:"shrink-0 text-muted-foreground","aria-label":a("common.copy"),onClick:c,children:n?(0,t.jsx)(eC.Check,{className:"h-3 w-3 text-emerald-400"}):(0,t.jsx)(eT.Copy,{className:"h-3 w-3"})})]})}function eI({extension:e}){let{t:a}=(0,i.useI18n)(),{status:n,loading:o,isInstalling:c,install:d,uninstall:m,refresh:u}=(0,eR.useExtension)(e.id),[x,g]=(0,s.useState)(!1),h=e.icon,p=n.installed,f=async()=>{let t=await d();t.success?r.toast.success(a("settings.extensions.installSuccess").replace("{name}",e.name)):r.toast.error(a("settings.extensions.installFailed").replace("{name}",e.name)+(t.error?`: ${t.error.slice(0,200)}`:""))},b=async()=>{let t=await m();t.success?r.toast.success(a("settings.extensions.uninstallSuccess").replace("{name}",e.name)):r.toast.error(a("settings.extensions.uninstallFailed").replace("{name}",e.name)+(t.error?`: ${t.error.slice(0,200)}`:""))},j=async()=>{g(!0);try{await u()}finally{g(!1)}},v=()=>{window.open(e.homepageUrl,"_blank","noopener,noreferrer")};return(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-background ring-1 ring-border",children:(0,t.jsx)(h,{className:"h-5 w-5 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:e.name}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description})]})]}),(0,t.jsxs)("span",{className:"shrink-0 rounded-md bg-background px-2 py-0.5 text-xs text-muted-foreground ring-1 ring-border",children:["~",e.sizeMB," MB"]})]}),(0,t.jsx)("div",{className:"mt-4 flex items-center gap-2 text-xs",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L.Loader2,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:a("common.loading")})]}):p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.CheckCircle2,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,t.jsxs)("span",{className:"text-foreground",children:[a("settings.extensions.installed"),n.version?` v${n.version}`:""]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eS,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:a("settings.extensions.notInstalledShort")})]})}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Button,{variant:"default",onClick:f,disabled:c,children:c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.reinstalling")]}):a("settings.extensions.reinstall")}),(0,t.jsx)(l.Button,{variant:"outline",onClick:b,disabled:c,children:c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.uninstalling")]}):a("settings.extensions.uninstall")})]}):e.manualInstall?(0,t.jsxs)(eB.Popover,{children:[(0,t.jsx)(eB.PopoverTrigger,{render:e=>(0,t.jsxs)(l.Button,{variant:"default",...e,children:[(0,t.jsx)(eo,{className:"h-3.5 w-3.5"}),a("settings.extensions.installViaHomepage")]})}),(0,t.jsxs)(eB.PopoverContent,{align:"start",className:"w-80 max-w-[90vw] gap-2 text-xs leading-relaxed",children:[(0,t.jsx)("p",{children:a("settings.extensions.manualInstallHintIntro")}),(0,t.jsx)("div",{className:"space-y-2",children:eL.map(({os:e,cmd:s})=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[11px] font-medium text-muted-foreground",children:e}),(0,t.jsx)(eP,{cmd:s})]},e))}),(0,t.jsx)("p",{className:"text-muted-foreground",children:a("settings.extensions.manualInstallHintAfter")}),(0,t.jsxs)("button",{type:"button",onClick:v,className:"flex items-center gap-1 self-start text-[11px] text-primary underline-offset-2 hover:underline",children:[(0,t.jsx)(eD.ExternalLink,{className:"h-3 w-3"}),a("settings.extensions.visitHomepage")]})]})]}):(0,t.jsx)(l.Button,{variant:"default",onClick:f,disabled:c,children:c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.installing")]}):a("settings.extensions.install")}),(0,t.jsxs)(l.Button,{variant:"ghost",onClick:j,disabled:x,children:[(0,t.jsx)(eM.RefreshCw,{className:`h-3.5 w-3.5 ${x?"animate-spin":""}`}),a("settings.extensions.recheck")]}),(0,t.jsxs)(l.Button,{variant:"ghost",onClick:v,children:[(0,t.jsx)(eD.ExternalLink,{className:"h-3.5 w-3.5"}),a("settings.extensions.visitHomepage")]})]})]})}function eU(){let{t:e}=(0,i.useI18n)(),s=(0,ek.listExtensionMetadata)();return(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("header",{children:[(0,t.jsx)("h2",{className:"text-base font-semibold",children:e("settings.extensions.title")}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e("settings.extensions.desc")})]}),(0,t.jsx)("div",{className:"space-y-3",children:s.map(e=>(0,t.jsx)(eI,{extension:e},e.id))})]})}e.i(508271);var eF=e.i(371385),eE=e.i(158956),eH=e.i(75566),eV=e.i(851289);let ez=["global","panels","missions"],eA=new Set(["missions.cycleBack"]);function e$({keys:e}){return(0,t.jsx)(eV.KeyCombo,{keys:e})}function eK(){let e,{t:a}=(0,i.useI18n)(),n=(0,eH.useKeymapStore)(e=>e.overrides),o=(0,eH.useKeymapStore)(e=>e.setBinding),c=(0,eH.useKeymapStore)(e=>e.resetBinding),d=(0,eH.useKeymapStore)(e=>e.resetAll),[u,g]=(0,s.useState)(null),[h,p]=(0,s.useState)(null),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(u){let e=requestAnimationFrame(()=>f.current?.focus());return()=>cancelAnimationFrame(e)}},[u]);let b=(0,s.useMemo)(()=>{let e=new Map;for(let t of eF.SHORTCUT_ACTIONS)for(let s of n[t.id]??[...t.defaultKeys])e.has(s)||e.set(s,t.id);return e},[n]),j=(0,s.useMemo)(()=>ez.map(e=>({group:e,actions:eF.SHORTCUT_ACTIONS.filter(t=>t.group===e&&!eA.has(t.id))})).filter(e=>e.actions.length>0),[]),v=u?(0,eF.getAction)(u):null,N=h&&u&&(e=b.get(h))&&e!==u?e:null;function y(){g(null),p(null)}return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-base font-semibold",children:a("settings.keyboardShortcuts")}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a("settings.keyboardShortcutsDesc")})]}),(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",onClick:function(){d(),r.toast.success(a("settings.shortcuts.resetAllDone"))},children:[(0,t.jsx)(em.RotateCcw,{className:"h-3.5 w-3.5"}),a("settings.shortcuts.resetAll")]})]}),(0,t.jsx)("div",{className:"space-y-6",children:j.map(({group:e,actions:s})=>(0,t.jsxs)("section",{children:[(0,t.jsx)("h3",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:a(`shortcuts.group.${e}`)}),(0,t.jsx)("ul",{className:"divide-y divide-border/50 rounded-xl border border-border bg-card",children:s.map(e=>{let s,i=e.id in n;return(0,t.jsxs)("li",{className:"flex items-center justify-between gap-4 px-5 py-3.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 text-sm",children:a(e.descriptionKey)}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)(e$,{keys:n[s=e.id]??[...(0,eF.getAction)(s).defaultKeys]}),e.configurable?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Button,{variant:"outline",size:"sm",onClick:()=>{var t;return t=e.id,void(p(null),g(t))},children:a("settings.shortcuts.rebind")}),i&&(0,t.jsxs)(er.Tooltip,{children:[(0,t.jsx)(er.TooltipTrigger,{render:(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>c(e.id),children:(0,t.jsx)(em.RotateCcw,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(er.TooltipContent,{children:a("settings.shortcuts.reset")})]})]}):(0,t.jsx)(m.Badge,{variant:"outline",className:"text-muted-foreground",children:a("settings.shortcuts.fixed")})]})]},e.id)})})]},e))}),(0,t.jsx)(x.Dialog,{open:null!==u,onOpenChange:e=>!e&&y(),children:(0,t.jsxs)(x.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsxs)(x.DialogHeader,{children:[(0,t.jsx)(x.DialogTitle,{children:v?a(v.descriptionKey):a("settings.shortcuts.rebind")}),(0,t.jsx)(x.DialogDescription,{children:a("settings.shortcuts.pressKey")})]}),(0,t.jsx)("textarea",{ref:f,readOnly:!0,tabIndex:0,"aria-label":a("settings.shortcuts.pressKey"),onKeyDown:e=>{e.preventDefault(),e.stopPropagation();let t=(0,eE.serializeKeyEvent)(e.nativeEvent);t&&p(t)},className:"flex h-20 w-full cursor-pointer resize-none items-center justify-center rounded-lg border border-dashed border-border bg-muted/30 text-center text-sm outline-none focus:border-ring focus:ring-1 focus:ring-ring"}),(0,t.jsx)("div",{className:"flex min-h-8 items-center justify-center",children:h?(0,t.jsx)(e$,{keys:[h]}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:a("settings.shortcuts.pressKey")})}),N&&(0,t.jsx)("p",{className:"text-center text-xs text-amber-600 dark:text-amber-400",children:a("settings.shortcuts.conflict",{name:a((0,eF.getAction)(N).descriptionKey)})}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:y,children:a("settings.shortcuts.cancel")}),(0,t.jsx)(l.Button,{variant:"default",onClick:function(){u&&h&&(o(u,[h]),y(),r.toast.success(a("settings.shortcuts.saved")))},disabled:!h,children:a("settings.shortcuts.saveBtn")})]})]})})]})}var eO=e.i(464249),eW=e.i(579157),eq=e.i(205829),e_=e.i(59737),e_=e_,eG=e.i(960995),eG=eG;let eX=(0,f.default)("circle-dot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]),eY=(0,A.createServerReference)("40dc9fc2c9c0b69d14fc779a0bb51b34232d5f18d5",A.callServer,void 0,A.findSourceMapURL,"testHarnessTarget"),eZ=["feishu","openclaw","hermes"],eJ={feishu:["feishu"],openclaw:["telegram","signal","whatsapp","discord","slack","imessage"],hermes:["telegram","discord","slack","whatsapp","signal","feishu","wechat","wecom","dingtalk","qq","matrix","email"]},eQ=[...new Set(Object.values(eJ).flat())],e0="__custom__",e1=e=>eJ[e]??[],e5={feishu:"https://open.feishu.cn/",openclaw:"https://docs.openclaw.ai/",hermes:"https://hermes-agent.nousresearch.com/docs/"};function e2(){let{t:e}=(0,i.useI18n)(),[a,n]=(0,s.useState)([]),[c,d]=(0,s.useState)(null),[m,u]=(0,s.useState)(new Set),[x,g]=(0,s.useState)(!0),[h,p]=(0,s.useTransition)(),[f,b]=(0,s.useState)(""),[j,v]=(0,s.useState)(!1),[N,y]=(0,s.useState)(null);(0,s.useEffect)(()=>{(0,H.getConfigValue)("harness.targets",[]).then(e=>{let t=(Array.isArray(e)?e:[]).map(e=>({id:e.id??crypto.randomUUID(),gateway:eZ.includes(e.gateway)?e.gateway:"feishu",downstream:e.downstream??"feishu",active:!!e.active}));t.length>0&&!t.some(e=>e.active)&&(t[0].active=!0),n(t),u(new Set(t.filter(e=>e.downstream&&!eQ.includes(e.downstream)).map(e=>e.id)))}).finally(()=>g(!1))},[]);let w=(e,t)=>n(s=>s.map(s=>s.id===e?{...s,...t}:s)),k=e=>{n(t=>{let s=t.find(t=>t.id===e)?.active,a=t.filter(t=>t.id!==e);return s&&a.length>0&&!a.some(e=>e.active)&&(a[0].active=!0),a}),c===e&&d(null)},C=(e,t)=>u(s=>{let a=new Set(s);return t?a.add(e):a.delete(e),a}),T=async()=>{try{await navigator.clipboard.writeText("你有 Playwright(浏览器自动化)能力。帮我在飞书创建一个自建应用(机器人),用于 Tower 的无人值守通知与飞书助理。请一步步来;遇到需要我登录/扫码/人工确认的地方,停下来让我操作,我弄好再继续。\n\n平台地址:公网飞书 https://open.feishu.cn/ (公司/私有化飞书换成你们自己的内网开放平台地址)。用 Playwright 打开它,让我登录(企业管理员或开发者账号)。控制台页面可能有 WAF,但你是真实浏览器,正常访问即可。\n\n步骤:\n1. 创建企业自建应用:名字填「Tower 助理」,随便传个图标。\n2. 开启机器人能力:应用内「添加应用能力」→ 启用「机器人」。(不开这个,机器人进不了群、发不了消息。)\n3. 开通权限(「权限管理」逐个搜索并勾选,名称各版本略有差异,按含义找):\n 必需:im:message(读写单聊/群消息)、im:message.group_msg(读群里全部消息,机器人收到 @ 靠它)、im:chat(获取群信息)、im:chat.members:read(读群成员、识别「谁 @ 我」)。\n 可选:task:task、wiki:wiki:readonly / wiki:node:read / wiki:node:retrieve、docx:document:readonly、drive:drive:readonly(要建飞书待办、读飞书文档/知识库才需要)。\n4. 发布版本:改完权限必须「创建版本 → 申请发布 / 上线」,否则权限不生效(最容易忘的一步)。等发布成功。\n5. 取凭据:到「凭证与基础信息」,复制 App ID(cli_ 开头)和 App Secret;并取机器人自己的 open_id(botOpenId,拿不到就标「待补」)。\n6. 建议新建一个唯一名称的专属群(如「Tower 通知」),把机器人加进去,记下群 id —— 避免同名群/人导致发错。\n7. 把 appId / appSecret / domain 配到飞书 MCP,并在 Tower「设置 → 通知 → 无人值守发送渠道」加一条渠道,点「测试」验证能收到消息。\n\n避坑:① 域名别搞反 —— 公司飞书和公网飞书是两套、凭据不通用;② 只「建了应用」不等于能用,必须开机器人能力 + 发布版本 + 拉进群三样齐;③ 别用 curl 直接抓控制台页面(有 WAF 会 403),用浏览器(Playwright)操作。\n\n(换 OpenClaw / Hermes 等其它网关:参考各自文档 https://docs.openclaw.ai/ · https://hermes-agent.nousresearch.com/docs/ ,拿到 token / webhook 后同样在 Tower 加渠道并测试。)"),r.toast.success(e("settings.harness.copied"))}catch{r.toast.error("复制失败")}},M=async e=>{if(f.trim()){v(!0),y(null);try{let t=await eY({gateway:e.gateway,downstream:e.downstream,dest:f.trim()});y(t)}catch(e){y({ok:!1,output:e instanceof Error?e.message:String(e)})}finally{v(!1)}}},B=t=>eQ.includes(t)?e(`settings.harness.ds.${t}`):t,R=({label:e,children:s})=>(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:e}),s]});return(0,t.jsxs)("div",{className:"rounded-xl border bg-card p-4 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:e("settings.harness.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e("settings.harness.desc")})]}),(0,t.jsxs)("div",{className:"space-y-2 rounded-lg bg-muted/30 px-3 py-2",children:[(0,t.jsxs)("div",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[(0,t.jsx)(eW.Info,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{children:e("settings.harness.notice")})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 pl-5 text-xs",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e("settings.harness.docsLabel"),":"]}),eZ.map(s=>e5[s]?(0,t.jsxs)("a",{href:e5[s],target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 text-primary hover:underline",children:[e(`settings.harness.gateway.${s}`),(0,t.jsx)(eD.ExternalLink,{className:"h-3 w-3"})]},s):null),(0,t.jsxs)("button",{type:"button",onClick:T,className:"inline-flex items-center gap-1 text-primary hover:underline",children:[(0,t.jsx)(eT.Copy,{className:"h-3 w-3"}),e("settings.harness.copyPrompt")]})]})]}),x&&(0,t.jsx)(L.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"}),(0,t.jsx)("div",{className:"space-y-2",children:a.map(s=>{var a;let i,r=m.has(s.id);return c===s.id?(0,t.jsxs)("div",{className:"rounded-lg border bg-muted/30 p-3 space-y-3",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsx)(R,{label:e("settings.harness.gatewayLabel"),children:(0,t.jsxs)(ee.Select,{value:s.gateway,onValueChange:e=>{let t=e??"feishu",a=e1(t);w(s.id,{gateway:t,downstream:a.includes(s.downstream)?s.downstream:a[0]??""}),C(s.id,!1)},children:[(0,t.jsx)(ee.SelectTrigger,{className:"w-full",children:(0,t.jsx)("span",{className:"truncate",children:e(`settings.harness.gateway.${s.gateway}`)})}),(0,t.jsx)(ee.SelectContent,{children:eZ.map(s=>(0,t.jsx)(ee.SelectItem,{value:s,children:e(`settings.harness.gateway.${s}`)},s))})]})}),(0,t.jsx)(R,{label:e("settings.harness.downstreamLabel"),children:(0,t.jsxs)(ee.Select,{value:r?e0:s.downstream,onValueChange:e=>{e===e0?(C(s.id,!0),w(s.id,{downstream:""})):(C(s.id,!1),w(s.id,{downstream:e??""}))},children:[(0,t.jsx)(ee.SelectTrigger,{className:"w-full",children:(0,t.jsx)("span",{className:"truncate",children:r?e("settings.harness.ds.custom"):s.downstream?B(s.downstream):e("settings.harness.downstreamPlaceholder")})}),(0,t.jsxs)(ee.SelectContent,{children:[e1(s.gateway).map(s=>(0,t.jsx)(ee.SelectItem,{value:s,children:e(`settings.harness.ds.${s}`)},s)),"feishu"!==s.gateway&&(0,t.jsx)(ee.SelectItem,{value:e0,children:e("settings.harness.ds.custom")})]})]})})]}),r&&(0,t.jsx)(R,{label:e("settings.harness.customLabel"),children:(0,t.jsx)(o.Input,{value:s.downstream,onChange:e=>w(s.id,{downstream:e.target.value}),placeholder:e("settings.harness.customPlaceholder")})}),(0,t.jsx)(R,{label:e("settings.harness.test"),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{value:f,onChange:e=>b(e.target.value),placeholder:e("settings.harness.testDestPlaceholder"),className:"flex-1"}),(0,t.jsxs)(l.Button,{variant:"outline",onClick:()=>M(s),disabled:j||!f.trim(),children:[j?(0,t.jsx)(L.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(eq.Send,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:j?e("settings.harness.testing"):e("settings.harness.testSend")})]})]}),N&&(0,t.jsxs)("div",{className:`flex items-start gap-1.5 rounded bg-muted/40 px-2 py-1 text-xs ${N.ok?"text-emerald-500":"text-rose-400"}`,children:[N.ok?(0,t.jsx)(e_.default,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}):(0,t.jsx)(eG.default,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"whitespace-pre-wrap break-words",children:N.ok?e("settings.harness.testOk"):`${e("settings.harness.testFail")}:${N.output}`})]})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,t.jsxs)(l.Button,{onClick:()=>{d(null),y(null)},children:[(0,t.jsx)(eC.Check,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:e("settings.harness.done")})]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"text-muted-foreground",onClick:()=>k(s.id),children:[(0,t.jsx)(D.Trash2,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:e("settings.harness.remove")})]})]})]},s.id):(0,t.jsxs)("div",{className:`flex items-center gap-2.5 rounded-lg border px-3 py-2 ${s.active?"border-primary/40 bg-primary/5":"bg-muted/20"}`,children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let e;return e=s.id,n(t=>t.map(t=>({...t,active:t.id===e})))},title:e("settings.harness.setActive"),className:s.active?"text-primary":"text-muted-foreground hover:text-foreground",children:s.active?(0,t.jsx)(eX,{className:"h-4 w-4"}):(0,t.jsx)(eS,{className:"h-4 w-4"})}),(0,t.jsx)("span",{className:"truncate text-sm text-foreground",children:(a=s,i=e(`settings.harness.gateway.${a.gateway}`),a.downstream?`${i} \xb7 ${B(a.downstream)}`:i)}),s.active&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-primary/15 px-2 py-0.5 text-[10px] font-medium text-primary ring-1 ring-primary/25",children:e("settings.harness.active")}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,t.jsx)(l.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:()=>{d(s.id),y(null),b("")},title:e("settings.harness.edit"),children:(0,t.jsx)(eO.Pencil,{className:"h-4 w-4"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:()=>k(s.id),title:e("settings.harness.remove"),children:(0,t.jsx)(D.Trash2,{className:"h-4 w-4"})})]})]},s.id)})}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(l.Button,{variant:"outline",onClick:()=>{let e=crypto.randomUUID();n(t=>[...t,{id:e,gateway:"feishu",downstream:"feishu",active:0===t.length}]),d(e),y(null)},className:"text-muted-foreground",children:[(0,t.jsx)(S.Plus,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:e("settings.harness.addTarget")})]}),(0,t.jsx)(l.Button,{onClick:()=>p(async()=>{await (0,V.setConfigValue)("harness.targets",a),d(null),r.toast.success(e("settings.harness.saved"))}),disabled:h,className:"rounded-lg",children:e("common.save")})]})]})}function e3({options:e,value:s,onChange:a}){return(0,t.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>a(e.value),className:(0,g.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",s===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}function e4({label:e,description:s,children:a,className:n}){return(0,t.jsxs)("div",{className:(0,g.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",n),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:e}),s&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:s})]}),(0,t.jsx)("div",{className:"shrink-0",children:a})]})}let e8=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:p.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:b,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:j.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:v,accent:"amber"},{id:"extensions",labelKey:"settings.extensions.title",descKey:"settings.extensions.navDesc",icon:w.Package,accent:"indigo"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:N.Bell,accent:"rose"},{id:"backup",labelKey:"settings.backup.title",descKey:"settings.backup.navDesc",icon:y.HardDrive,accent:"cyan"},{id:"keyboard-shortcuts",labelKey:"settings.keyboardShortcuts",descKey:"settings.keyboardShortcutsDesc",icon:k.Keyboard,accent:"violet"}],e7={blue:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},emerald:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},violet:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},amber:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},cyan:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},rose:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},indigo:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"}},e6="ai-manager:default-cli-adapter",e9={host:"",ownerMatch:"*",localPathTemplate:"",priority:0},te=e=>e.replace(/\\/g,"/").replace(/\/+$/,"");function tt(){let e=(0,a.useRouter)(),{t:p}=(0,i.useI18n)(),{theme:f,setTheme:b}=(0,n.useTheme)(),{locale:j,setLocale:v}=(0,i.useI18n)(),[N,y]=(0,s.useState)("general"),w=(0,s.useRef)(null),[k,A]=(0,s.useState)({left:0,width:0}),[J,Q]=(0,s.useState)(!1),[ee,et]=(0,s.useState)("Terminal"),[es,ea]=(0,s.useState)([]),[en,eo]=(0,s.useState)(""),[ec,ed]=(0,s.useState)([]),[em,eu]=(0,s.useState)(13),[ex,eg]=(0,s.useState)("Menlo, Monaco, 'Courier New', monospace"),[eh,ep]=(0,s.useState)([]),[ef,eb]=(0,s.useState)("claude"),[ej,ev]=(0,s.useState)(null),[eN,ey]=(0,s.useState)({}),[ek,eC]=(0,s.useState)([]),[eS,eT]=(0,s.useState)(!1),[eD,eM]=(0,s.useState)(null),[eB,eR]=(0,s.useState)(null),[eL,eP]=(0,s.useState)(""),[eI,eF]=(0,s.useState)(""),[eE,eH]=(0,s.useState)(""),[eV,ez]=(0,s.useState)(null),[eA,e$]=(0,s.useState)(""),[eO,eW]=(0,s.useState)(!1),[eq,e_]=(0,s.useState)(!1),[eG,eX]=(0,s.useState)(!1),[eY,eZ]=(0,s.useState)([]),[eJ,eQ]=(0,s.useState)(null),[e0,e1]=(0,s.useState)({...e9}),[e5,tt]=(0,s.useState)(!1),[ts,ta]=(0,s.useState)({...e9}),[tn,ti]=(0,s.useState)(!1),[tr,tl]=(0,s.useState)(!1),[to,tc]=(0,s.useState)(0),[td,tm]=(0,s.useState)(null),[tu,tx]=(0,s.useState)(null),[tg,th]=(0,s.useState)({maxUploadMb:50,maxConcurrent:3,maxReadableMb:5,archiveDelayDays:7,taskDefaultUseWorktree:!0,taskDefaultAutoStart:!1}),[tp,tf]=(0,s.useState)({timeoutSec:30}),[tb,tj]=(0,s.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80,codeTimeoutSec:30}),[tv,tN]=(0,s.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[ty,tw]=(0,s.useState)(null),[tk,tC]=(0,s.useState)(!1),[tS,tT]=(0,s.useState)(""),[tD,tM]=(0,s.useState)(!0);(0,s.useEffect)(()=>Q(!0),[]),(0,s.useEffect)(()=>{(0,H.getConfigValue)("terminal.app","Terminal").then(et),$().then(ea),(0,H.getConfigValue)("editor.command","").then(eo),K().then(ed),(0,H.getConfigValue)("terminal.fontSize",13).then(eu),(0,H.getConfigValue)("terminal.fontFamily","Menlo, Monaco, 'Courier New', monospace").then(eg)},[]),(0,s.useEffect)(()=>{if(0===es.length||!ee||es.some(e=>e.value===ee))return;let e=es.find(e=>e.name===ee);e&&(et(e.value),(0,V.setConfigValue)("terminal.app",e.value))},[es,ee]),(0,s.useEffect)(()=>{if(0===ec.length||!en||ec.some(e=>e.command===en))return;let e=ec.find(e=>e.name===en);e&&(eo(e.command),(0,V.setConfigValue)("editor.command",e.command))},[ec,en]),(0,s.useEffect)(()=>{Z().then(ep);let e=localStorage.getItem(e6);e&&eb(e)},[]),(0,s.useEffect)(()=>{(0,O.getPrompts)().then(eC)},[]),(0,s.useEffect)(()=>{G().then(e=>{ez(e),e$(e.systemDirective)})},[]);let tB=async()=>{try{let e=await fetch("/api/internal/hooks/install");if(e.ok){let t=await e.json();tw(t)}}catch{}};async function tR(e){if(!ej){ev(e),ey(t=>{let s={...t};return delete s[e],s});try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})}),s=await t.json();ey(t=>({...t,[e]:s}))}catch{ey(t=>({...t,[e]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{ev(null)}}}(0,s.useEffect)(()=>{(0,H.getConfigValue)("git.pathMappingRules",[]).then(e=>{let t=new Set,s=!1,a=e.map(e=>{if(!e.id||t.has(e.id)){s=!0;let a={...e,id:crypto.randomUUID()};return t.add(a.id),a}return t.add(e.id),e});eZ(a),s&&(0,V.setConfigValue)("git.pathMappingRules",a)}),(0,H.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(e=>{tT(e.join(", "))}),tB(),(0,z.getConfigValues)(["system.maxUploadBytes","system.maxConcurrentExecutions","system.maxReadableFileBytes","board.archiveDelayDays","task.defaultUseWorktree","task.defaultAutoStart","git.timeoutSec","search.resultLimit","search.allModeCap","search.debounceMs","search.snippetLength","search.codeTimeoutSec","missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(e=>{let t=e["system.maxUploadBytes"]??0x3200000,s=e["system.maxReadableFileBytes"]??5242880;th({maxUploadMb:Math.round(t/1024/1024),maxConcurrent:e["system.maxConcurrentExecutions"]??3,maxReadableMb:Math.round(s/1024/1024),archiveDelayDays:e["board.archiveDelayDays"]??7,taskDefaultUseWorktree:"boolean"!=typeof e["task.defaultUseWorktree"]||e["task.defaultUseWorktree"],taskDefaultAutoStart:"boolean"==typeof e["task.defaultAutoStart"]&&e["task.defaultAutoStart"]}),tf({timeoutSec:e["git.timeoutSec"]??30}),tj({resultLimit:e["search.resultLimit"]??20,allModeCap:e["search.allModeCap"]??5,debounceMs:e["search.debounceMs"]??250,snippetLength:e["search.snippetLength"]??80,codeTimeoutSec:e["search.codeTimeoutSec"]??30}),tN({minCols:e["missions.grid.minCols"]??1,maxCols:e["missions.grid.maxCols"]??5,minRows:e["missions.grid.minRows"]??1,maxRows:e["missions.grid.maxRows"]??5})})},[]),(0,s.useEffect)(()=>{(0,H.getConfigValue)("notification.enabled",!0).then(tM)},[]);let tL=(0,s.useCallback)(()=>{eM(null),eP(""),eF(""),eH(""),eT(!0)},[]),tP=(0,s.useCallback)(e=>{eM(e),eP(e.name),eF(e.description??""),eH(e.content),eT(!0)},[]),tI=(0,s.useCallback)(async()=>{eL.trim()&&eE.trim()&&(eD?await q(eD.id,{name:eL.trim(),description:eI.trim()||void 0,content:eE.trim()}):await W({name:eL.trim(),description:eI.trim()||void 0,content:eE.trim()}),eT(!1),eC(await (0,O.getPrompts)()),e.refresh())},[eL,eI,eE,eD,e]),tU=(0,s.useCallback)(async()=>{eB&&(await _(eB),eR(null),eC(await (0,O.getPrompts)()),e.refresh())},[eB,e]),tF=(0,s.useCallback)(async()=>{eW(!0);try{await X(eA);let e=await G();ez(e),e$(e.systemDirective),e_(!1),r.toast.success(p("settings.prompts.builtin.saved"))}finally{eW(!1)}},[eA,p]),tE=(0,s.useCallback)(async()=>{eW(!0);try{let e=await Y(),t=await G();ez(t),e$(e),r.toast.info(p("settings.prompts.builtin.resetDone"))}finally{eW(!1)}},[p]),tH=async()=>{await (0,V.setConfigValue)("system.maxUploadBytes",1024*tg.maxUploadMb*1024),await (0,V.setConfigValue)("system.maxConcurrentExecutions",tg.maxConcurrent),await (0,V.setConfigValue)("system.maxReadableFileBytes",1024*tg.maxReadableMb*1024),await (0,V.setConfigValue)("board.archiveDelayDays",tg.archiveDelayDays)},tV=async()=>{await (0,V.setConfigValue)("task.defaultUseWorktree",tg.taskDefaultUseWorktree),await (0,V.setConfigValue)("task.defaultAutoStart",tg.taskDefaultAutoStart),await (0,V.setConfigValue)("task.mcpDefaultsConfigured",!0)},tz=async()=>{await (0,V.setConfigValue)("git.timeoutSec",tp.timeoutSec)},tA=async()=>{await (0,V.setConfigValue)("search.resultLimit",tb.resultLimit),await (0,V.setConfigValue)("search.allModeCap",tb.allModeCap),await (0,V.setConfigValue)("search.debounceMs",tb.debounceMs),await (0,V.setConfigValue)("search.snippetLength",tb.snippetLength),await (0,V.setConfigValue)("search.codeTimeoutSec",tb.codeTimeoutSec)},t$=async()=>{let e=Math.min(tv.minCols,tv.maxCols),t=Math.max(tv.minCols,tv.maxCols),s=Math.min(tv.minRows,tv.maxRows),a=Math.max(tv.minRows,tv.maxRows);tN({minCols:e,maxCols:t,minRows:s,maxRows:a}),await (0,V.setConfigValue)("missions.grid.minCols",e),await (0,V.setConfigValue)("missions.grid.maxCols",t),await (0,V.setConfigValue)("missions.grid.minRows",s),await (0,V.setConfigValue)("missions.grid.maxRows",a)},tK=async()=>{let e=tS.split(",").map(e=>e.trim()).filter(Boolean);await (0,V.setConfigValue)("hooks.autoUploadTypes",e)},tO=async()=>{if(ty){tC(!0);try{let e=ty.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:e}),await tB()}finally{tC(!1)}}},tW=async()=>{if(!ts.host.trim()||!ts.localPathTemplate.trim())return;let e=te(ts.localPathTemplate.trim()),t=tn?`${e}/{path}`:e,s=[...eY,{id:crypto.randomUUID(),host:ts.host.trim(),ownerMatch:ts.ownerMatch.trim()||"*",localPathTemplate:t,priority:ts.priority}];await (0,V.setConfigValue)("git.pathMappingRules",s),eZ(s),ta({...e9}),ti(!1),tt(!1)},tq=async e=>{if(!e0.host.trim()||!e0.localPathTemplate.trim())return;let t=te(e0.localPathTemplate.trim()),s=tr?`${t}/{path}`:t,a=eY.map(t=>t.id===e?{...t,host:e0.host.trim(),ownerMatch:e0.ownerMatch.trim()||"*",localPathTemplate:s,priority:e0.priority}:t);await (0,V.setConfigValue)("git.pathMappingRules",a),eZ(a),eQ(null),tl(!1)},t_=async e=>{let t=eY.filter(t=>t.id!==e);await (0,V.setConfigValue)("git.pathMappingRules",t),eZ(t),tm(null)};async function tG(){let e=!tD;tM(e),await (0,V.setConfigValue)("notification.enabled",e)}let tX=(0,s.useCallback)(()=>{e.back()},[e]),tY=(0,s.useCallback)(e=>{let t=w.current;if(!t)return;let s=t.querySelector("[data-section]"),a=s?s.offsetWidth+4:140;t.scrollBy({left:"left"===e?-a:a,behavior:"smooth"})},[]);(0,s.useEffect)(()=>{let e=w.current;if(!e)return;let t=e.querySelector(`[data-section="${N}"]`);if(!t)return;let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();A({left:a.left-s.left,width:a.width})},[N]);let{canScrollLeft:tZ,canScrollRight:tJ}=(0,h.useScrollOverflow)(w,[j]),tQ=e8.find(e=>e.id===N),t0=tQ?e7[tQ.accent]:e7.blue;return(0,t.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,t.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:p("settings.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:p("settings.configDesc")})]}),(0,t.jsxs)(l.Button,{variant:"outline",onClick:tX,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,t.jsx)(C.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,t.jsxs)("div",{className:"relative flex items-center gap-1",children:[tZ&&(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>tY("left"),className:"shrink-0","aria-label":"scroll tabs left",children:(0,t.jsx)(F.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{ref:w,className:"relative flex flex-1 gap-1 overflow-x-auto [&::-webkit-scrollbar]:hidden",children:[e8.map(e=>{let s=e.icon,a=N===e.id,n=e7[e.accent];return(0,t.jsxs)("button",{"data-section":e.id,onClick:()=>y(e.id),className:(0,g.cn)("relative flex items-center gap-2 rounded-t-lg px-4 py-2.5","text-sm font-medium whitespace-nowrap cursor-pointer","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a?`${n.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,t.jsx)("span",{className:(0,g.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",a?n.bg:"bg-transparent"),children:(0,t.jsx)(s,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("span",{children:p(e.labelKey)})]},e.id)}),(0,t.jsx)("div",{className:(0,g.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",t0.indicator),style:{left:k.left,width:k.width}})]}),tJ&&(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>tY("right"),className:"shrink-0","aria-label":"scroll tabs right",children:(0,t.jsx)(E.ChevronRight,{className:"h-4 w-4"})})]})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[tQ&&(0,t.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,t.jsx)("div",{className:(0,g.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",t0.bg,t0.text,t0.ring),children:(0,t.jsx)(tQ.icon,{className:"h-5 w-5"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:p(tQ.labelKey)}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:p(tQ.descKey)})]})]}),(0,t.jsx)("div",{className:"mb-6 border-t"}),function(){switch(N){case"general":let e;return e=[{value:"light",label:p("settings.themeLight")},{value:"dark",label:p("settings.themeDark")},{value:"system",label:p("settings.themeSystem")}],(0,t.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,t.jsx)(e4,{label:p("settings.theme"),description:p("settings.themeDesc"),children:J?(0,t.jsx)(e3,{options:e,value:f??"system",onChange:e=>b(e)}):(0,t.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,t.jsx)(e4,{label:p("settings.language"),description:p("settings.languageDesc"),children:(0,t.jsx)(e3,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:j,onChange:e=>v(e)})}),(0,t.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:p("settings.terminal.label")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:p("settings.terminal.desc")})]}),es.length>0&&(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:es.map(e=>{let s=ee===e.value,a=(0,g.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",e.installed?s?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),n=()=>{e.installed&&(et(e.value),(0,V.setConfigValue)("terminal.app",e.value))};return e.installed?(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name},e.value):(0,t.jsxs)(er.Tooltip,{children:[(0,t.jsx)(er.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name})}),(0,t.jsx)(er.TooltipContent,{side:"top",children:p("settings.app.notInstalled")})]},e.value)})})]}),(0,t.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:p("settings.terminalFont.label")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:p("settings.terminalFont.desc")})]}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-4",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[p("settings.terminalFont.size"),(0,t.jsx)("input",{type:"number",min:8,max:40,value:em,onChange:e=>{let t=Math.max(8,Math.min(40,Math.round(Number(e.target.value)||13)));eu(t),(0,V.setConfigValue)("terminal.fontSize",t)},className:"h-8 w-20 rounded-md border border-border bg-background px-2 text-sm text-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]}),(0,t.jsxs)("label",{className:"flex min-w-0 flex-1 items-center gap-2 text-xs text-muted-foreground",children:[p("settings.terminalFont.family"),(0,t.jsx)("input",{type:"text",value:ex,placeholder:"Menlo, Monaco, 'Courier New', monospace",onChange:e=>eg(e.target.value),onBlur:e=>{let t=e.target.value.trim()||"Menlo, Monaco, 'Courier New', monospace";eg(t),(0,V.setConfigValue)("terminal.fontFamily",t)},className:"h-8 min-w-0 flex-1 rounded-md border border-border bg-background px-2 font-mono text-xs text-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]})]}),(0,t.jsx)("div",{className:"mt-1.5 text-[11px] text-muted-foreground/70",children:p("settings.terminalFont.hint")})]}),(0,t.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:p("settings.editor.label")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:p("settings.editor.desc")})]}),ec.length>0&&(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:ec.map(e=>{let s=en===e.command,a=(0,g.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",e.installed?s?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),n=()=>{e.installed&&(eo(e.command),(0,V.setConfigValue)("editor.command",e.command))};return e.installed?(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name},e.command):(0,t.jsxs)(er.Tooltip,{children:[(0,t.jsx)(er.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name})}),(0,t.jsx)(er.TooltipContent,{side:"top",children:p("settings.app.notInstalled")})]},e.command)})})]})]});case"ai-tools":return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:eh.map(e=>{let s=ef===e.name,a=ej===e.name,n=eN[e.name];return(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"px-5 py-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:e.displayName}),(0,t.jsx)(m.Badge,{variant:"outline",children:p("label.builtin")}),s&&(0,t.jsxs)(m.Badge,{variant:"secondary",className:"shrink-0",children:[(0,t.jsx)(T,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),p("settings.prompts.default")]}),n&&(0,t.jsx)(m.Badge,{variant:n.ok?"secondary":"destructive",className:(0,g.cn)("shrink-0",n.ok&&"bg-green-600 text-white hover:bg-green-700"),children:n.ok?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.CheckCircle2,{className:"h-3 w-3 mr-1"}),p("settings.aiTools.testPassed")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I.XCircle,{className:"h-3 w-3 mr-1"}),p("settings.aiTools.testFailed")]})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.cli.available&&e.cli.version?`${e.name} \xb7 ${e.cli.version}`:e.name})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!s&&(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",onClick:()=>{var t;eb(t=e.name),localStorage.setItem(e6,t)},children:[(0,t.jsx)(T,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),p("settings.prompts.setDefault")]}),(0,t.jsx)(l.Button,{variant:"outline",size:"sm",onClick:()=>tR(e.name),disabled:a,children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),p("settings.aiTools.testing")]}):p("settings.aiTools.testConnection")})]})]}),n&&(0,t.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,t.jsx)("div",{className:"space-y-1.5",children:n.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:(0,g.cn)("w-1.5 h-1.5 rounded-full shrink-0",s.passed?"bg-green-500":"bg-red-500")}),(0,t.jsx)("span",{className:(0,g.cn)(s.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:s.message})]},`${e.name}-${s.name}`))})})]})},e.name)})}),(0,t.jsx)(ei,{})]});case"prompts":return J?(0,t.jsxs)("div",{className:"space-y-4",children:[eV&&(0,t.jsxs)("div",{className:"space-y-4 rounded-xl border border-border/50 bg-card p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-medium",children:p("settings.prompts.builtin.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:p("settings.prompts.builtin.desc")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Label,{className:"text-sm",children:p("settings.prompts.builtin.systemTitle")}),eV.systemDirectiveIsCustom&&(0,t.jsx)(m.Badge,{variant:"secondary",className:"rounded-full text-xs",children:p("settings.prompts.builtin.modified")})]}),(0,t.jsxs)(l.Button,{variant:"outline",onClick:()=>{e$(eV.systemDirective),e_(!0)},children:[(0,t.jsx)(M,{className:"h-4 w-4"}),p("settings.prompts.builtin.edit")]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.prompts.builtin.systemDesc")}),(0,t.jsx)("div",{className:"rounded-lg border border-border/50 bg-muted/30 p-3",children:(0,t.jsx)("p",{className:"line-clamp-3 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:eV.systemDirective})})]}),(0,t.jsxs)("div",{className:"space-y-2 border-t border-border/50 pt-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Label,{className:"text-sm",children:p("settings.prompts.builtin.childTitle")}),(0,t.jsx)(m.Badge,{variant:"outline",className:"rounded-full text-xs",children:p("settings.prompts.builtin.readonly")})]}),(0,t.jsxs)(l.Button,{variant:"outline",onClick:()=>eX(!0),children:[(0,t.jsx)(B.Eye,{className:"h-4 w-4"}),p("settings.prompts.builtin.view")]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.prompts.builtin.childDesc")}),(0,t.jsx)("div",{className:"rounded-lg border border-border/50 bg-muted/30 p-3",children:(0,t.jsx)("p",{className:"line-clamp-3 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:eV.childReviewPrompt})})]})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium",children:p("settings.prompts.custom.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:p("settings.prompts.custom.desc")})]}),(0,t.jsxs)(l.Button,{onClick:tL,variant:"default",className:"shrink-0",children:[(0,t.jsx)(S.Plus,{className:"h-4 w-4 mr-2"}),p("settings.prompts.newPrompt")]})]}),0===ek.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:p("settings.prompts.empty")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:p("settings.prompts.emptyHint")})]}):(0,t.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:ek.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"text-sm font-medium truncate",children:e.name}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>tP(e),title:p("settings.prompts.editPrompt"),children:(0,t.jsx)(M,{className:"h-4 w-4"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>eR(e.id),className:"text-destructive",title:p("settings.prompts.delete"),children:(0,t.jsx)(D.Trash2,{className:"h-4 w-4"})})]})]},e.id))})]}),(0,t.jsx)(x.Dialog,{open:eq,onOpenChange:e_,children:(0,t.jsxs)(x.DialogContent,{className:"sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,t.jsxs)(x.DialogHeader,{children:[(0,t.jsx)(x.DialogTitle,{children:p("settings.prompts.builtin.systemTitle")}),(0,t.jsx)(x.DialogDescription,{children:p("settings.prompts.builtin.systemDesc")})]}),(0,t.jsx)(c.Textarea,{value:eA,onChange:e=>e$(e.target.value),className:"max-h-[60vh] min-h-[50vh] font-mono text-xs"}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:tE,disabled:eO||!eV?.systemDirectiveIsCustom,children:p("settings.prompts.builtin.resetDefault")}),(0,t.jsx)(l.Button,{variant:"default",onClick:tF,disabled:eO||eA===eV?.systemDirective,children:p("settings.prompts.save")})]})]})}),(0,t.jsx)(x.Dialog,{open:eG,onOpenChange:eX,children:(0,t.jsxs)(x.DialogContent,{className:"sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,t.jsxs)(x.DialogHeader,{children:[(0,t.jsx)(x.DialogTitle,{children:p("settings.prompts.builtin.childTitle")}),(0,t.jsx)(x.DialogDescription,{children:p("settings.prompts.builtin.childDesc")})]}),(0,t.jsx)(c.Textarea,{value:eV?.childReviewPrompt??"",readOnly:!0,className:"max-h-[60vh] min-h-[50vh] font-mono text-xs bg-muted/40 cursor-default"}),(0,t.jsx)(x.DialogFooter,{children:(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>eX(!1),children:p("settings.prompts.close")})})]})}),(0,t.jsx)(x.Dialog,{open:eS,onOpenChange:eT,children:(0,t.jsxs)(x.DialogContent,{className:"sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,t.jsxs)(x.DialogHeader,{children:[(0,t.jsx)(x.DialogTitle,{children:eD?p("settings.prompts.editPrompt"):p("settings.prompts.newPrompt")}),(0,t.jsx)(x.DialogDescription,{children:eD?p("settings.prompts.editPrompt"):p("settings.prompts.newPrompt")})]}),(0,t.jsxs)("div",{className:"space-y-4 py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Label,{htmlFor:"prompt-name",children:p("settings.prompts.promptName")}),(0,t.jsx)(o.Input,{id:"prompt-name",value:eL,onChange:e=>eP(e.target.value),placeholder:p("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Label,{htmlFor:"prompt-description",children:p("settings.prompts.promptDescription")}),(0,t.jsx)(o.Input,{id:"prompt-description",value:eI,onChange:e=>eF(e.target.value),placeholder:p("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Label,{htmlFor:"prompt-content",children:p("settings.prompts.promptContent")}),(0,t.jsx)(c.Textarea,{id:"prompt-content",value:eE,onChange:e=>eH(e.target.value),placeholder:p("settings.prompts.promptContentPlaceholder"),className:"mt-1.5 max-h-[55vh] min-h-[40vh] font-mono text-sm"})]})]}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>eT(!1),children:p("settings.prompts.cancel")}),(0,t.jsx)(l.Button,{onClick:tI,disabled:!eL.trim()||!eE.trim(),children:p("settings.prompts.save")})]})]})}),(0,t.jsx)(x.Dialog,{open:!!eB,onOpenChange:e=>!e&&eR(null),children:(0,t.jsxs)(x.DialogContent,{children:[(0,t.jsxs)(x.DialogHeader,{children:[(0,t.jsx)(x.DialogTitle,{children:p("settings.prompts.deleteConfirmTitle")}),(0,t.jsx)(x.DialogDescription,{children:p("settings.prompts.deleteConfirmMessage")})]}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>eR(null),children:p("settings.prompts.cancel")}),(0,t.jsx)(l.Button,{variant:"destructive",onClick:tU,children:p("settings.prompts.delete")})]})]})})]}):(0,t.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let s,a,n;return(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:p("settings.config.git.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:p("settings.config.git.desc")})]}),(0,t.jsxs)(l.Button,{onClick:()=>{ta({...e9}),tt(!0)},children:[(0,t.jsx)(S.Plus,{className:"mr-2 h-4 w-4"}),p("settings.config.git.addRule")]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[0!==eY.length||e5?(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:eY.map(e=>eJ===e.id?(0,t.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:p("settings.config.git.host")}),(0,t.jsx)(o.Input,{value:e0.host,onChange:e=>e1(t=>({...t,host:e.target.value})),placeholder:p("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:p("settings.config.git.ownerMatch")}),(0,t.jsx)(o.Input,{value:e0.ownerMatch,onChange:e=>e1(t=>({...t,ownerMatch:e.target.value})),placeholder:p("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5 col-span-2",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:p("settings.config.git.localPathTemplate")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{value:e0.localPathTemplate,onChange:e=>e1(t=>({...t,localPathTemplate:e.target.value})),placeholder:p("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,t.jsxs)(er.Tooltip,{children:[(0,t.jsx)(er.TooltipTrigger,{render:(0,t.jsx)(l.Button,{variant:tr?"default":"outline",size:"sm",type:"button",onClick:()=>tl(e=>!e),className:"shrink-0 font-mono",children:"{path}"})}),(0,t.jsx)(er.TooltipContent,{side:"top",className:"max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:p("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:p("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(er.Tooltip,{children:[(0,t.jsx)(er.TooltipTrigger,{render:(0,t.jsx)(l.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>tx("edit"),children:(0,t.jsx)(U.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(er.TooltipContent,{children:p("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:tr?p("onboarding.step3.pathHintFull"):p("onboarding.step3.pathHintRepo")})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:p("settings.config.git.priority")}),(0,t.jsx)(o.Input,{type:"number",value:e0.priority,onChange:e=>e1(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",onClick:()=>{eQ(null),tl(!1)},children:p("settings.config.git.cancel")}),(0,t.jsx)(l.Button,{size:"sm",onClick:()=>tq(e.id),children:p("settings.config.git.save")})]})]},e.id):(0,t.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e.host}),"*"!==e.ownerMatch&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",e.ownerMatch]}),(0,t.jsxs)(m.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[p("settings.config.git.priority")," ",e.priority]})]}),(0,t.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:e.localPathTemplate})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{let t,s,a;return t=e.localPathTemplate,a=(s=/\/\{path\}\/?$/.test(t))?t.replace(/\/?\{path\}\/?$/,"").replace(/\/+$/,""):t,void(eQ(e.id),e1({host:e.host,ownerMatch:e.ownerMatch,localPathTemplate:a,priority:e.priority}),tl(s))},title:p("settings.config.git.edit"),children:(0,t.jsx)(M,{className:"h-4 w-4"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>tm(e.id),className:"text-destructive",title:p("settings.config.git.delete"),children:(0,t.jsx)(D.Trash2,{className:"h-4 w-4"})})]})]})},e.id))}):(0,t.jsxs)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:p("settings.config.git.noRules")}),(0,t.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground/80",children:p("settings.config.git.noRulesFallback")})]}),e5&&(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:p("settings.config.git.host")}),(0,t.jsx)(o.Input,{value:ts.host,onChange:e=>ta(t=>({...t,host:e.target.value})),placeholder:p("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:p("settings.config.git.ownerMatch")}),(0,t.jsx)(o.Input,{value:ts.ownerMatch,onChange:e=>ta(t=>({...t,ownerMatch:e.target.value})),placeholder:p("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:p("settings.config.git.localPathTemplate")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{value:ts.localPathTemplate,onChange:e=>ta(t=>({...t,localPathTemplate:e.target.value})),placeholder:p("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,t.jsxs)(er.Tooltip,{children:[(0,t.jsx)(er.TooltipTrigger,{render:(0,t.jsx)(l.Button,{variant:tn?"default":"outline",size:"sm",type:"button",onClick:()=>ti(e=>!e),className:"shrink-0 font-mono",children:"{path}"})}),(0,t.jsx)(er.TooltipContent,{side:"top",className:"max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:p("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:p("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(er.Tooltip,{children:[(0,t.jsx)(er.TooltipTrigger,{render:(0,t.jsx)(l.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>tx("add"),children:(0,t.jsx)(U.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(er.TooltipContent,{children:p("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:tn?p("onboarding.step3.pathHintFull"):p("onboarding.step3.pathHintRepo")})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:p("settings.config.git.priority")}),(0,t.jsx)(o.Input,{type:"number",value:ts.priority,onChange:e=>ta(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]}),ts.localPathTemplate&&(s=ts.localPathTemplate.trim().replace(/\/+$/,""),a=tn?`${s}/{path}`:s,n=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,t.jsxs)("div",{className:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:p("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:n.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>tc(s),className:(0,g.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",to===s?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:e.label},s))})]}),(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:n[to].url}),(0,t.jsxs)("p",{className:"font-mono text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-foreground font-medium",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],n=s.match(/^git@[^:]+:(.+)$/);if(n)a=n[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let i=a[0],r=a[a.length-1],l=a.join("/");if(e.includes("{path}"))return e.replace("{path}",l).replace("{owner}",i).replace("{repo}",r).replace(/\/+$/,"");let o=e.replace("{owner}",i).replace("{repo}","").replace(/\/+$/,"");return`${o}/${r}`}(a,n[to].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",onClick:()=>tt(!1),children:p("settings.config.git.cancel")}),(0,t.jsxs)(l.Button,{size:"sm",onClick:tW,disabled:!ts.host.trim()||!ts.localPathTemplate.trim(),children:[(0,t.jsx)(R,{className:"h-3.5 w-3.5 mr-1.5"}),p("settings.config.git.save")]})]})]})]})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:p("settings.config.system.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:p("settings.config.system.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.system.maxUpload")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.system.maxUploadHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{type:"number",min:1,max:500,value:tg.maxUploadMb,onChange:e=>th(t=>({...t,maxUploadMb:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.system.maxConcurrent")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.system.maxConcurrentHint")})]}),(0,t.jsx)(o.Input,{type:"number",min:1,max:10,value:tg.maxConcurrent,onChange:e=>th(t=>({...t,maxConcurrent:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.system.maxReadable")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.system.maxReadableHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{type:"number",min:1,max:50,value:tg.maxReadableMb,onChange:e=>th(t=>({...t,maxReadableMb:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.system.archiveDelay")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.system.archiveDelayHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{type:"number",min:1,max:365,value:tg.archiveDelayDays,onChange:e=>th(t=>({...t,archiveDelayDays:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:p("settings.config.system.archiveDelayUnit")})]})]})]}),(0,t.jsx)(l.Button,{onClick:tH,className:"rounded-lg",children:p("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:p("settings.config.task.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:p("settings.config.task.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.system.taskDefaultWorktree")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.system.taskDefaultWorktreeHint")})]}),(0,t.jsx)("button",{type:"button",onClick:()=>th(e=>({...e,taskDefaultUseWorktree:!e.taskDefaultUseWorktree})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${tg.taskDefaultUseWorktree?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:tg.taskDefaultUseWorktree?p("task.worktreeYes"):p("task.worktreeNo")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.system.taskDefaultAutoStart")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.system.taskDefaultAutoStartHint")})]}),(0,t.jsx)("button",{type:"button",onClick:()=>th(e=>({...e,taskDefaultAutoStart:!e.taskDefaultAutoStart})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${tg.taskDefaultAutoStart?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:tg.taskDefaultAutoStart?p("task.autoStartYes"):p("task.autoStartNo")})]})]}),(0,t.jsx)(l.Button,{onClick:tV,className:"rounded-lg",children:p("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:p("settings.config.gitParams.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:p("settings.config.gitParams.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.gitParams.timeout")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.gitParams.timeoutHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{type:"number",min:5,max:300,value:tp.timeoutSec,onChange:e=>tf(t=>({...t,timeoutSec:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,t.jsx)(l.Button,{onClick:tz,className:"rounded-lg",children:p("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:p("settings.config.search.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:p("settings.config.search.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.search.resultLimit")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.search.resultLimitHint")})]}),(0,t.jsx)(o.Input,{type:"number",min:5,max:100,value:tb.resultLimit,onChange:e=>tj(t=>({...t,resultLimit:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.search.allModeCap")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.search.allModeCapHint")})]}),(0,t.jsx)(o.Input,{type:"number",min:1,max:20,value:tb.allModeCap,onChange:e=>tj(t=>({...t,allModeCap:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.search.debounceMs")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.search.debounceMsHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{type:"number",min:50,max:1e3,value:tb.debounceMs,onChange:e=>tj(t=>({...t,debounceMs:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.search.snippetLength")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.search.snippetLengthHint")})]}),(0,t.jsx)(o.Input,{type:"number",min:20,max:500,value:tb.snippetLength,onChange:e=>tj(t=>({...t,snippetLength:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.search.codeTimeout")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.search.codeTimeoutHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{type:"number",min:5,max:300,step:5,value:tb.codeTimeoutSec,onChange:e=>tj(t=>({...t,codeTimeoutSec:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]})]}),(0,t.jsx)(l.Button,{onClick:tA,className:"rounded-lg",children:p("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:p("settings.config.missions.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:p("settings.config.missions.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:p("settings.config.missions.minCols")}),(0,t.jsx)(o.Input,{type:"number",min:1,max:10,value:tv.minCols,onChange:e=>tN(t=>({...t,minCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:p("settings.config.missions.maxCols")}),(0,t.jsx)(o.Input,{type:"number",min:1,max:10,value:tv.maxCols,onChange:e=>tN(t=>({...t,maxCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:p("settings.config.missions.minRows")}),(0,t.jsx)(o.Input,{type:"number",min:1,max:10,value:tv.minRows,onChange:e=>tN(t=>({...t,minRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:p("settings.config.missions.maxRows")}),(0,t.jsx)(o.Input,{type:"number",min:1,max:10,value:tv.maxRows,onChange:e=>tN(t=>({...t,maxRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,t.jsx)(l.Button,{onClick:t$,className:"rounded-lg",children:p("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:p("settings.config.hooks.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:p("settings.config.hooks.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:p("settings.config.hooks.autoUploadTypes")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.hooks.autoUploadTypesHint")})]}),(0,t.jsx)(o.Input,{value:tS,onChange:e=>tT(e.target.value),placeholder:"png, jpg, jpeg, gif, webp, svg, pdf",className:"w-80 rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsx)(l.Button,{onClick:tK,className:"rounded-lg",children:p("common.save")}),(0,t.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:ty?.installed?p("settings.config.hooks.installed"):p("settings.config.hooks.notInstalled")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:p("settings.config.hooks.installHint")})]}),(0,t.jsx)(l.Button,{variant:ty?.installed?"destructive":"default",onClick:tO,disabled:tk||!ty,className:"rounded-lg",children:ty?.installed?p("settings.config.hooks.uninstall"):p("settings.config.hooks.install")})]})]}),(0,t.jsx)(x.Dialog,{open:!!td,onOpenChange:e=>!e&&tm(null),children:(0,t.jsxs)(x.DialogContent,{children:[(0,t.jsxs)(x.DialogHeader,{children:[(0,t.jsx)(x.DialogTitle,{children:p("settings.config.git.deleteConfirm")}),(0,t.jsx)(x.DialogDescription,{children:p("settings.config.git.deleteConfirmMessage")})]}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>tm(null),children:p("settings.config.git.cancel")}),(0,t.jsx)(l.Button,{variant:"destructive",onClick:()=>td&&t_(td),children:p("settings.config.git.delete")})]})]})})]});case"notifications":return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"rounded-xl border bg-card p-4 space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:p("settings.notifications.systemCategory")}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:p("settings.notifications.enable")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:p("settings.notifications.enableDesc")})]}),(0,t.jsx)(u.Switch,{checked:tD,onCheckedChange:tG})]})]}),(0,t.jsx)(e2,{})]});case"backup":return(0,t.jsx)(ew,{});case"extensions":return(0,t.jsx)(eU,{});case"keyboard-shortcuts":return(0,t.jsx)(eK,{})}}()]})}),(0,t.jsx)(el.FolderBrowserDialog,{open:null!==tu,onOpenChange:e=>{e||tx(null)},onSelect:e=>{let t=te(e);"add"===tu?ta(e=>({...e,localPathTemplate:t})):"edit"===tu&&e1(e=>({...e,localPathTemplate:t})),tx(null)}})]})}e.s(["default",0,function(){return(0,t.jsx)(tt,{})}],113399)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,486077,e=>{"use strict";let t=(0,e.i(572989).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);e.s(["Lightbulb",0,t],486077)},313029,e=>{"use strict";let t=(0,e.i(572989).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],313029)},960518,e=>{"use strict";let t=(0,e.i(572989).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);e.s(["GitCompare",0,t],960518)},340873,e=>{"use strict";let t=(0,e.i(572989).default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);e.s(["GitCommitHorizontal",0,t],340873)},41357,241077,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4021cffd826ce36203d99f6565f58863b9bc8a2727",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],41357);let s=(0,t.createServerReference)("40006718afe159ee057487702c0cb12c23f6bac540",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,s],241077)},127395,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("404cb0cdb388fc63f10c22dc497e72b00bb5c78d42",t.callServer,void 0,t.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,r])},768096,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40423169aa2508c9cd2bada9f65d9397112c0ea175",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,r])},882651,960995,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let r=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",0,r],960995),e.s(["XCircle",0,r],181209)},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},779570,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("404cffeebf9cd5b11929ed56c5dbcb3e79b820450e",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,r])},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},631675,e=>{"use strict";let t=(0,e.i(572989).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],631675)},591540,e=>{"use strict";var t=e.i(965652);e.s(["useScrollOverflow",0,function(e,r=[]){let[s,c]=(0,t.useState)({canScrollLeft:!1,canScrollRight:!1}),a=(0,t.useCallback)(()=>{let t=e.current;t&&c({canScrollLeft:t.scrollLeft>0,canScrollRight:t.scrollLeft<t.scrollWidth-t.clientWidth-1})},[e]);return(0,t.useEffect)(()=>{let t=e.current;if(!t)return;a(),t.addEventListener("scroll",a);let r=new ResizeObserver(a);return r.observe(t),window.addEventListener("resize",a),()=>{t.removeEventListener("scroll",a),r.disconnect(),window.removeEventListener("resize",a)}},[a,...r]),s}])},912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:s,description:c,action:a,className:i}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",i),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:s}),c&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:c}),a&&(0,t.jsx)("div",{className:"mt-2",children:a})]})}])},865514,e=>{"use strict";var t=e.i(289721),r=e.i(965652),s=e.i(538059),c=e.i(776639),a=e.i(519455);let i=(0,e.i(572989).default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var l=e.i(400355);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:d,taskId:n,taskTitle:o,baseBranch:u,fileCount:f,commitCount:x,commitLog:m=[],onMergeComplete:h}){let p=(0,s.useRouter)(),[v,g]=(0,r.useState)(!1),[y,b]=(0,r.useState)(null),k=async()=>{g(!0),b(null);try{let e=await fetch(`/api/tasks/${n}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){d(!1),h(),p.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?b(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):b(t.error??"Merge failed")}catch{b("Network error — merge failed")}finally{g(!1)}};return(0,t.jsx)(c.Dialog,{open:e,onOpenChange:d,children:(0,t.jsxs)(c.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(c.DialogHeader,{children:(0,t.jsxs)(c.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(i,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,t.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:u})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:f})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:x})]})]}),m.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:m.map((e,r)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},r))})]}),y&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,t.jsx)("p",{className:"text-xs text-red-400",children:y})})]}),(0,t.jsxs)(c.DialogFooter,{children:[(0,t.jsx)(a.Button,{variant:"outline",onClick:()=>d(!1),disabled:v,children:"Cancel"}),(0,t.jsx)(a.Button,{onClick:k,disabled:v,className:"gap-2",children:v?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},74593,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4062d13cdbe45c1cfb8386e810495e72befcfbec91",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r])},929127,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60efa135082b65911a52ff807ef8c96f9c3585f6a1",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,r])},483361,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60e4b2ed8000953c03639b7e7fbc5233720fd9370a",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,r])},58308,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("401acf2b7191c3fbfd39c3f254a5628d15465f16bb",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r])},100839,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6031d4644cd423486c800f9dcad4ed01df4562a880",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,r])},942213,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("7c3d6cd7e5e687f4f77510e3a770d804bec50e4336",t.callServer,void 0,t.findSourceMapURL,"startPtyExecution");e.s(["startPtyExecution",0,r])},244455,e=>{e.v(t=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(t=>e.l(t))).then(()=>t(629495)))},800307,e=>{e.v(t=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(t=>e.l(t))).then(()=>t(267483)))}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},235357,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(585012),s=e.i(657153),n=e.i(19671),l=e.i(368490),i=e.i(902539);let o=(0,e.i(572989).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var c=e.i(922541),d=e.i(533499);function u({children:e,onClick:r,title:a,disabled:s,...n}){return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||r()},title:a,disabled:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...n,children:e})}e.s(["ImageLightbox",0,function({imageUrl:e,filename:x,open:m,onOpenChange:h,assets:b,currentIndex:p,onIndexChange:g}){let{t:f}=(0,d.useI18n)(),[v,y]=(0,r.useState)(1),[k,j]=(0,r.useState)({x:0,y:0}),[w,N]=(0,r.useState)(!1),C=(0,r.useRef)(null),[S,I]=(0,r.useState)(!1),L=!!b&&b.length>1&&"number"==typeof p&&!!g,E=L&&p>0,M=L&&p<b.length-1,R=L?b.length:0,P=R>0?Math.ceil(R/10):0,T=L?Math.floor(p/10):0,D=10*T,$=Math.min(D+10,R),O=P>1,A=L&&T>0,U=L&&T<P-1;(0,r.useEffect)(()=>{I(!0)},[]),(0,r.useEffect)(()=>{y(1),j({x:0,y:0})},[e]),(0,r.useEffect)(()=>{if(!m)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[m]);let _=(0,r.useCallback)(()=>h(!1),[h]),B=(0,r.useCallback)(()=>{L&&E&&g(p-1)},[L,E,g,p]),z=(0,r.useCallback)(()=>{L&&M&&g(p+1)},[L,M,g,p]),H=(0,r.useCallback)(()=>{L&&A&&g((T-1)*10)},[L,A,g,T]),V=(0,r.useCallback)(()=>{L&&U&&g(Math.min((T+1)*10,R-1))},[L,U,g,T,R]),F=(0,r.useCallback)(()=>{y(e=>Math.min(8,1.25*e))},[]),G=(0,r.useCallback)(()=>{y(e=>{let t=Math.max(.1,e/1.25);return t<=1&&j({x:0,y:0}),t})},[]),W=(0,r.useCallback)(()=>{y(1),j({x:0,y:0})},[]);(0,r.useEffect)(()=>{if(!m)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),_();break;case"ArrowLeft":L&&(e.preventDefault(),B());break;case"ArrowRight":L&&(e.preventDefault(),z());break;case"+":case"=":e.preventDefault(),F();break;case"-":case"_":e.preventDefault(),G();break;case"0":e.preventDefault(),W()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[m,L,_,B,z,F,G,W]);let Y=(0,r.useRef)(!1),X=()=>{w&&N(!1),C.current=null},q=w?"cursor-grabbing":"cursor-grab";if(!m||!S)return null;let K=(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":f("assets.lightbox.zoomFit"),children:[(0,t.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[x,L?` \xb7 ${p+1} / ${b.length}`:""]}),(0,t.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${q}`,onClick:e=>{e.target===e.currentTarget&&_()},onWheel:e=>{e.preventDefault();let t=-e.deltaY>0?1.25:.8;y(e=>{let r=Math.min(8,Math.max(.1,e*t));return r<=1&&j({x:0,y:0}),r})},children:e&&(0,t.jsx)("img",{src:e,alt:x,onClick:e=>{e.stopPropagation(),Y.current&&(Y.current=!1)},onPointerDown:e=>{0===e.button&&(e.stopPropagation(),Y.current=!1,e.target.setPointerCapture?.(e.pointerId),C.current={x:e.clientX,y:e.clientY,panX:k.x,panY:k.y},N(!0))},onPointerMove:e=>{if(!C.current)return;let t=e.clientX-C.current.x,r=e.clientY-C.current.y;Math.abs(t)+Math.abs(r)>5&&(Y.current=!0),w&&j({x:C.current.panX+t,y:C.current.panY+r})},onPointerUp:X,onPointerLeave:X,onPointerCancel:X,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${k.x}px, ${k.y}px, 0) scale(${v})`,transformOrigin:"center center",transition:w?"none":"transform 120ms ease-out",willChange:w?"transform":"auto"},draggable:!1})}),(0,t.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:e=>e.stopPropagation(),children:[L&&(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[O&&(0,t.jsx)(u,{onClick:H,title:`${f("assets.lightbox.prev")} (-10)`,"aria-label":`${f("assets.lightbox.prev")} (-10)`,disabled:!A,children:(0,t.jsx)(i.ChevronsLeft,{className:"h-4 w-4"})}),(0,t.jsx)(u,{onClick:B,title:f("assets.lightbox.prev"),"aria-label":f("assets.lightbox.prev"),disabled:!E,children:(0,t.jsx)(n.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:b.slice(D,$).map((e,r)=>{let a=D+r,s=a===p;return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||g(a)},title:e.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${s?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,t.jsx)("img",{src:e.url,alt:e.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},e.url+a)})}),(0,t.jsx)(u,{onClick:z,title:f("assets.lightbox.next"),"aria-label":f("assets.lightbox.next"),disabled:!M,children:(0,t.jsx)(l.ChevronRight,{className:"h-4 w-4"})}),O&&(0,t.jsx)(u,{onClick:V,title:`${f("assets.lightbox.next")} (+10)`,"aria-label":`${f("assets.lightbox.next")} (+10)`,disabled:!U,children:(0,t.jsx)(o,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,t.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*v),"%"]}),(0,t.jsx)(u,{onClick:W,title:f("assets.lightbox.reset"),"aria-label":f("assets.lightbox.reset"),disabled:1===v&&0===k.x&&0===k.y,children:(0,t.jsx)(c.RotateCcw,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,t.jsx)(u,{onClick:_,title:f("assets.lightbox.close"),"aria-label":f("assets.lightbox.close"),children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]})]})]});return(0,a.createPortal)(K,document.body)}],235357)},144640,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(400355);e.i(254826);var s=e.i(309735),n=e.i(776639),l=e.i(533499);e.s(["TextPreviewDialog",0,function({url:e,filename:i,open:o,onOpenChange:c}){let{t:d}=(0,l.useI18n)(),[u,x]=(0,r.useState)(null),[m,h]=(0,r.useState)(!1),[b,p]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!o||!e){x(null),p(null);return}let t=!1;return h(!0),p(null),x(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(x(e),h(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?p(d("assets.fileTooLarge")):p(d("assets.previewError")),h(!1))}),()=>{t=!0}},[o,e,d]);let g=i.split(".").pop()?.toLowerCase();return(0,t.jsx)(n.Dialog,{open:o,onOpenChange:c,children:(0,t.jsxs)(n.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:i}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(m)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(a.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:d("assets.loadingPreview")})]});if(b)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:b});if(null===u)return null;if("md"===g)return(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(s.Streamdown,{children:u})});if("json"===g){let e;try{e=JSON.stringify(JSON.parse(u),null,2)}catch{e=u}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:u})})()})]})})}])},922541,e=>{"use strict";let t=(0,e.i(572989).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],922541)},487486,e=>{"use strict";var t=e.i(565455),r=e.i(581263),a=e.i(294237),s=e.i(975157);let n=(0,a.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:a="default",render:l,...i}){var o;return o={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,s.cn)(n({variant:a}),e)},i),render:l,state:{slot:"badge",variant:a}},(0,r.useRenderElement)(o.defaultTagName??"div",o,o)}],487486)},184331,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("404c5f6bb80cc0d10b604e5640d83816a765fc59f3",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,r])},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},950481,938238,12659,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("408215e48e1a623e4bbb685a78e3a3ada2ed9a5e8a",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,r],950481);let a=(0,t.createServerReference)("40a305711044d42074dc8b719a62360ee159d7fe96",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,a],938238);let s=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,s],12659)},736061,460707,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,r],736061);let a=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,a],460707)},35967,e=>{"use strict";var t=e.i(289721);let r=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var a=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function n(e){return s[function(e){let t=0;for(let r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)>>>0;return t}(e)%s.length]}let l={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:a,showName:s=!1,className:n="",title:l}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${n}`,title:l??(a?`${e} \xb7 ${a}`:e),children:[(0,t.jsx)(r,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&a?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:a}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:r}=(0,a.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l[e]}`,children:r(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:r}=(0,a.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:r("version.type.uncategorized")})},"typeBadgeColor",0,n],35967)},404122,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4075ec4df24bd89711034f15cca9eb240df9f3f473",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,r])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},867533,e=>{"use strict";let t=(0,e.i(572989).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],867533)},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},110204,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["Label",0,function({className:e,...a}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,r.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",e),...a})}])},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},997025,e=>{"use strict";var t=e.i(289721);e.i(254826);var r=e.i(309735),a=e.i(776639),s=e.i(533499);e.s(["NotePreviewDialog",0,function({note:e,open:n,onOpenChange:l}){let{t:i}=(0,s.useI18n)();return(0,t.jsx)(a.Dialog,{open:n,onOpenChange:l,children:(0,t.jsxs)(a.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:e?.title}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:e&&e.content.trim()?(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(r.Streamdown,{children:e.content})}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noteEmpty")})})]})})}])},28725,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("407e209030abeb6675e3ada470cba988bc50a35fd4",t.callServer,void 0,t.findSourceMapURL,"createTask");e.s(["createTask",0,r])},445522,554057,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40b2033149d12fdc47fc98d1590cd1043d0e262161",t.callServer,void 0,t.findSourceMapURL,"getTaskNotes");e.s(["getTaskNotes",0,r],445522);let a=(0,t.createServerReference)("40c4d22109803aff540f854a0d4cf141904829c308",t.callServer,void 0,t.findSourceMapURL,"getTaskAssets");e.s(["getTaskAssets",0,a],554057)},456346,686672,939993,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],456346);var r=e.i(514798);let a=(0,r.createServerReference)("404d73151acdbb426096c2c26a3806d03ea98d7d81",r.callServer,void 0,r.findSourceMapURL,"getProjectBranches");e.s(["getProjectBranches",0,a],686672);let s=(0,r.createServerReference)("40801c6bd3944fa5bac78a08de736f8bdc2afbc617",r.callServer,void 0,r.findSourceMapURL,"fetchRemoteBranches");e.s(["fetchRemoteBranches",0,s],939993)},744798,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(776639),s=e.i(519455),n=e.i(793479),l=e.i(624687),i=e.i(110204),o=e.i(226145),c=e.i(597746),d=e.i(456346),u=e.i(967489),x=e.i(337822),m=e.i(317056),h=e.i(533499),b=e.i(686672),p=e.i(939993),g=e.i(514798);let f=(0,g.createServerReference)("40c7a93795b41734e8b19cb43ad317ceb3b9a5e8f3",g.callServer,void 0,g.findSourceMapURL,"getCurrentBranch");var v=e.i(404122);e.s(["CreateTaskDialog",0,function({open:e,onOpenChange:g,onSubmit:y,onUpdate:k,defaultStatus:j="TODO",editTask:w,editTaskLabelIds:N,prefillFromTask:C,labels:S,projectType:I,projectLocalPath:L,versions:E,defaultVersionId:M}){let R,[P,T]=(0,r.useState)(""),[D,$]=(0,r.useState)(""),[O,A]=(0,r.useState)("MEDIUM"),[U,_]=(0,r.useState)(""),[B,z]=(0,r.useState)([]),[H,V]=(0,r.useState)([]),[F,G]=(0,r.useState)(!1),[W,Y]=(0,r.useState)(""),[X,q]=(0,r.useState)(!1),[K,J]=(0,r.useState)(!0),[Q,Z]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(null),{t:er}=(0,h.useI18n)();(0,r.useEffect)(()=>{if(!e||w)return;let t=!1;return(0,v.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(e=>{if(t)return;let r=e["task.defaultUseWorktree"],a=e["task.defaultAutoStart"];"boolean"==typeof r&&J(r),"boolean"==typeof a&&Z(a)}).catch(()=>{}),()=>{t=!0}},[e,w]);let ea=!!w,es=!!L;return(0,r.useEffect)(()=>{w?(T(w.title),$(w.description??""),A(w.priority),_(w.subPath??""),z(N??[]),et(w.versionId??null)):(C?(T(C.title??""),$(C.description??""),A(C.priority??"MEDIUM"),_(C.subPath??""),z(C.labelIds??[])):(T(""),$(""),A("MEDIUM"),_(""),z([])),et(M??null))},[w,N,C,M]),(0,r.useEffect)(()=>{e||w||(T(""),$(""),A("MEDIUM"),_(""),z([]),V([]),Y(""),q(!1),et(M??null))},[e,w,M]),(0,r.useEffect)(()=>{e&&es&&!w&&(G(!0),Promise.all([(0,b.getProjectBranches)(L),f(L)]).then(([e,t])=>{V(e);let r=C?.baseBranch??null;r&&e.includes(r)?Y(r):Y(t&&e.includes(t)?t:e[0]??""),G(!1),(0,p.fetchRemoteBranches)(L).then(()=>{setTimeout(()=>{(0,b.getProjectBranches)(L).then(e=>{V(e),Y(t=>e.includes(t)?t:e[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{V([]),Y(""),G(!1)}))},[e,es,L,w,C]),(0,t.jsx)(a.Dialog,{open:e,onOpenChange:g,disablePointerDismissal:!0,children:(0,t.jsxs)(a.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(a.DialogHeader,{children:(0,t.jsx)(a.DialogTitle,{children:ea?er("task.edit"):er("task.create")})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"title",children:er("task.title")}),(0,t.jsx)(n.Input,{id:"title","data-testid":"task-title",placeholder:er("task.titlePlaceholder"),value:P,onChange:e=>T(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"description",children:er("task.description")}),(0,t.jsx)(l.Textarea,{id:"description",placeholder:er("task.descPlaceholder"),rows:4,value:D,onChange:e=>$(e.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"subPath",children:er("task.subPath")}),(0,t.jsx)(n.Input,{id:"subPath",placeholder:er("task.subPathPlaceholder"),value:U,onChange:e=>_(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:er("task.subPathHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("task.priority")}),(0,t.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(e=>{let r={LOW:{label:er("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:er("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:er("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:er("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[e];return(0,t.jsx)("button",{type:"button",onClick:()=>A(e),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${O===e?`${r.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:r.label},e)})})]}),es&&!ea&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("task.baseBranch")}),F?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:er("task.branchLoading")}):H.length>0?(0,t.jsxs)(x.Popover,{open:X,onOpenChange:q,children:[(0,t.jsxs)(x.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,t.jsx)(o.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:W||void 0,children:W||er("task.branchNone")}),(0,t.jsx)(d.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(x.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(m.Command,{children:[(0,t.jsx)(m.CommandInput,{placeholder:er("task.branchSearch")}),(0,t.jsxs)(m.CommandList,{children:[(0,t.jsx)(m.CommandEmpty,{children:er("task.branchNone")}),(0,t.jsx)(m.CommandGroup,{children:H.map(e=>(0,t.jsxs)(m.CommandItem,{value:e,onSelect:()=>{Y(e),q(!1)},children:[(0,t.jsx)(o.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===W&&(0,t.jsx)(c.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},e))})]})]})})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:er("task.branchNone")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:er("task.worktreeLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>J(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${K===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?er("task.worktreeYes"):er("task.worktreeNo")},String(e)))})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:er("task.autoStartLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>Z(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Q===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?er("task.autoStartYes"):er("task.autoStartNo")},String(e)))})]})]}),S.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("task.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:S.map(e=>{let r=B.includes(e.id);return(0,t.jsx)("button",{type:"button",onClick:()=>{z(t=>r?t.filter(t=>t!==e.id):[...t,e.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${r?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:e.color+"20",color:e.color,borderColor:r?e.color+"40":"transparent",borderWidth:"1px"},children:e.name},e.id)})})]}),(!ea||E&&E.length>0)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:er("version.picker.label")}),E&&E.length>0?(0,t.jsxs)(u.Select,{value:ee??"__none__",onValueChange:e=>et("__none__"===e?null:e),children:[(0,t.jsx)(u.SelectTrigger,{children:(0,t.jsx)("span",{className:"truncate text-sm",children:ee&&(R=E.find(e=>e.id===ee))?R.isCurrent?`${R.number} \xb7 ${R.name} \xb7 ${er("version.currentShort")}`:`${R.number} \xb7 ${R.name}`:er("version.picker.none")})}),(0,t.jsxs)(u.SelectContent,{children:[(0,t.jsx)(u.SelectItem,{value:"__none__",children:er("version.picker.none")}),E.map(e=>(0,t.jsx)(u.SelectItem,{value:e.id,children:e.isCurrent?`${e.number} \xb7 ${e.name} \xb7 ${er("version.currentShort")}`:`${e.number} \xb7 ${e.name}`},e.id))]})]}):(0,t.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:er("version.picker.empty")})]})]}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>g(!1),children:er("common.cancel")}),(0,t.jsx)(s.Button,{onClick:()=>{P.trim()&&(ea&&k?k(w.id,{title:P,description:D,priority:O,labelIds:B,subPath:U.trim()||"",versionId:ee}):y({title:P,description:D,priority:O,status:j,labelIds:B,...es&&K&&W?{baseBranch:W}:{},...U.trim()?{subPath:U.trim()}:{},versionId:ee,autoStart:Q}),T(""),$(""),A("MEDIUM"),_(""),z([]),V([]),Y(""),J(!0),et(null),g(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:ea?er("common.save"):er("common.create")})]})]})})}],744798)},937304,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);e.s(["isImageAsset",0,function(e,r){if(r?.startsWith("image/"))return!0;let a=e.split(".").pop()?.toLowerCase();return!!a&&t.has(a)},"localPathToApiUrl",0,function(e){let t=e.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}])},297338,e=>{"use strict";let t=(0,e.i(572989).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",0,t],297338)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,337822,e=>{"use strict";var t,n=e.i(289721);e.s([],707132),e.i(707132);var r=e.i(965652),o=e.i(620163),i=e.i(528796),a=e.i(594640),s=e.i(306296),u=e.i(344478),l=e.i(205995),c=e.i(611008);e.i(708878);var p=e.i(462902);let d=r.createContext(void 0);function f(e){let t=r.useContext(d);if(void 0===t&&!e)throw Error((0,p.default)(47));return t}var g=e.i(585012),h=e.i(370161),v=e.i(596290),S=e.i(161476),m=e.i(903224),R=e.i(774641),y=e.i(586622),b=e.i(771326),E=e.i(87396),C=e.i(693354);let O={...b.popupStoreSelectors,disabled:(0,v.createSelector)(e=>e.disabled),instantType:(0,v.createSelector)(e=>e.instantType),openMethod:(0,v.createSelector)(e=>e.openMethod),openChangeReason:(0,v.createSelector)(e=>e.openChangeReason),modal:(0,v.createSelector)(e=>e.modal),stickIfOpen:(0,v.createSelector)(e=>e.stickIfOpen),titleElementId:(0,v.createSelector)(e=>e.titleElementId),descriptionElementId:(0,v.createSelector)(e=>e.descriptionElementId),openOnHover:(0,v.createSelector)(e=>e.openOnHover),closeDelay:(0,v.createSelector)(e=>e.closeDelay),hasViewport:(0,v.createSelector)(e=>e.hasViewport)};class T extends h.ReactStore{constructor(e){const t={...(0,b.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:r.createRef(),backdropRef:r.createRef(),internalBackdropRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),stickIfOpenTimeout:new S.Timeout,triggerElements:new E.PopupTriggerMap},O)}setOpen=(e,t)=>{let n=t.reason===y.REASONS.triggerHover,r=t.reason===y.REASONS.triggerPress&&0===t.event.detail,o=!e&&(t.reason===y.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},a=this.state.floatingRootContext.context.events;a?.emit("openchange",i);let s=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(C.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),g.flushSync(s)):s(),r||o?this.set("instantType",r?"click":"dismiss"):t.reason===y.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,m.useRefWithInit)(()=>new T(t)).current,r=e??n;return(0,R.useOnMount)(n.disposeEffect),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var x=e.i(67077),I=e.i(894621),P=e.i(892069);function M({props:e}){let{children:t,open:p,defaultOpen:f=!1,onOpenChange:g,onOpenChangeComplete:h,modal:v=!1,handle:S,triggerId:m,defaultTriggerId:R=null}=e,b=T.useStore(S?.store,{modal:v,open:f,openProp:p,activeTriggerId:R,triggerIdProp:m});(0,i.useOnFirstRender)(()=>{void 0===p&&!1===b.state.open&&!0===f&&b.update({open:!0,activeTriggerId:R})}),b.useControlledProp("openProp",p),b.useControlledProp("triggerIdProp",m);let E=b.useState("open"),C=b.useState("positionerElement"),O=b.useState("payload"),k=b.useState("openChangeReason");b.useContextCallback("onOpenChange",g),b.useContextCallback("onOpenChangeComplete",h);let{openMethod:j,triggerProps:A}=(0,P.useOpenInteractionType)(E);(0,I.useImplicitActiveTrigger)(b);let{forceUnmount:w}=(0,I.useOpenStateTransitions)(E,b,()=>{b.update({stickIfOpen:!0,openChangeReason:null})});(0,o.useScrollLock)(E&&!0===v&&k!==y.REASONS.triggerHover&&"touch"!==j,C),r.useEffect(()=>{E||b.context.stickIfOpenTimeout.clear()},[b,E]);let F=r.useCallback(e=>{let t=(0,x.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{b.set("preventUnmountingOnClose",!0)},t},[b]),_=r.useCallback(()=>{b.setOpen(!1,F(y.REASONS.imperativeAction))},[b,F]);r.useImperativeHandle(e.actionsRef,()=>({unmount:w,close:_}),[w,_]);let N=(0,c.useSyncedFloatingRootContext)({popupStore:b,onOpenChange:b.setOpen}),D=(0,a.useDismiss)(N,{outsidePressEvent:{mouse:"trap-focus"===v?"sloppy":"intentional",touch:"sloppy"}}),L=(0,u.useRole)(N),{getReferenceProps:U,getFloatingProps:B,getTriggerProps:H}=(0,s.useInteractions)([D,L]),K=r.useMemo(()=>U(A),[U,A]),V=r.useMemo(()=>H(A),[H,A]),G=r.useMemo(()=>B(),[B]);b.useSyncedValues({modal:v,openMethod:j,activeTriggerProps:K,inactiveTriggerProps:V,popupProps:G,floatingRootContext:N,nested:null!=(0,l.useFloatingParentNodeId)()});let $=r.useMemo(()=>({store:b}),[b]);return(0,n.jsx)(d.Provider,{value:$,children:"function"==typeof t?t({payload:O}):t})}var k=e.i(887642),j=e.i(282109),A=e.i(845756),w=e.i(581263),F=e.i(660272),_=e.i(430557),N=e.i(411657),D=e.i(207516),L=e.i(221732),U=e.i(682354),B=e.i(870541);let H=r.forwardRef(function(e,t){let{render:o,className:i,disabled:a=!1,nativeButton:u=!0,handle:l,payload:c,openOnHover:d=!1,delay:h=300,closeDelay:v=0,id:S,...m}=e,R=f(!0),b=l?.store??R?.store;if(!b)throw Error((0,p.default)(74));let E=(0,D.useBaseUiId)(S),O=b.useState("isTriggerActive",E),T=b.useState("floatingRootContext"),P=b.useState("isOpenedByTrigger",E),M=r.useRef(null),{registerTrigger:H,isMountedByThisTrigger:K}=(0,I.useTriggerDataForwarding)(E,M,b,{payload:c,disabled:a,openOnHover:d,closeDelay:v}),V=b.useState("openChangeReason"),G=b.useState("stickIfOpen"),$=b.useState("openMethod"),z=(0,N.useHoverReferenceInteraction)(T,{enabled:null!=T&&d&&("touch"!==$||V!==y.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,F.safePolygon)(),restMs:h,delay:{close:v},triggerElementRef:M,isActiveTrigger:O}),W=(0,_.useClick)(T,{enabled:null!=T,stickIfOpen:G}),q=(0,s.useInteractions)([W]),X=b.useState("triggerProps",K),{getButtonProps:J,buttonRef:Q}=(0,j.useButton)({disabled:a,native:u}),Y=r.useMemo(()=>({open:e=>e&&V===y.REASONS.triggerPress?A.pressableTriggerOpenStateMapping.open(e):A.triggerOpenStateMapping.open(e)}),[V]),Z=(0,w.useRenderElement)("button",e,{state:{disabled:a,open:P},ref:[Q,t,H,M],props:[q.getReferenceProps(),z,X,{[C.CLICK_TRIGGER_IDENTIFIER]:"",id:E},m,J],stateAttributesMapping:Y}),ee=r.useRef(null),et=(0,k.useStableCallback)(e=>{g.flushSync(()=>{b.setOpen(!1,(0,x.createChangeEventDetails)(y.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,B.getTabbableBeforeElement)(ee.current);t?.focus()}),en=(0,k.useStableCallback)(e=>{let t=b.select("positionerElement");if(t&&(0,B.isOutsideEvent)(e,t))b.context.beforeContentFocusGuardRef.current?.focus();else{g.flushSync(()=>{b.setOpen(!1,(0,x.createChangeEventDetails)(y.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,B.getTabbableAfterElement)(b.context.triggerFocusTargetRef.current||M.current);for(;null!==n&&(0,U.contains)(t,n);){let e=n;if((n=(0,B.getNextTabbable)(n))===e)break}n?.focus()}});return O?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(L.FocusGuard,{ref:ee,onFocus:et}),(0,n.jsx)(r.Fragment,{children:Z},E),(0,n.jsx)(L.FocusGuard,{ref:b.context.triggerFocusTargetRef,onFocus:en})]}):(0,n.jsx)(r.Fragment,{children:Z},E)});var K=e.i(888393);let V=r.createContext(void 0),G=r.forwardRef(function(e,t){let{keepMounted:r=!1,...o}=e,{store:i}=f();return i.useState("mounted")||r?(0,n.jsx)(V.Provider,{value:r,children:(0,n.jsx)(K.FloatingPortal,{ref:t,...o})}):null});var $=e.i(831766),z=e.i(804849);let W=r.createContext(void 0);function q(){let e=r.useContext(W);if(!e)throw Error((0,p.default)(46));return e}var X=e.i(887943),J=e.i(72287),Q=e.i(412522),Y=e.i(431362),Z=e.i(808754);let ee=r.forwardRef(function(e,t){let{render:o,className:i,anchor:a,positionMethod:s="absolute",side:u="bottom",align:c="center",sideOffset:d=0,alignOffset:g=0,collisionBoundary:h="clipping-ancestors",collisionPadding:v=5,arrowPadding:S=5,sticky:m=!1,disableAnchorTracking:R=!1,collisionAvoidance:b=C.POPUP_COLLISION_AVOIDANCE,...E}=e,{store:O}=f(),T=function(){let e=r.useContext(V);if(void 0===e)throw Error((0,p.default)(45));return e}(),x=(0,l.useFloatingNodeId)(),I=O.useState("floatingRootContext"),P=O.useState("mounted"),M=O.useState("open"),k=O.useState("openChangeReason"),j=O.useState("activeTriggerElement"),F=O.useState("modal"),_=O.useState("positionerElement"),N=O.useState("instantType"),D=O.useState("transitionStatus"),L=O.useState("hasViewport"),U=r.useRef(null),B=(0,Q.useAnimationsFinished)(_,!1,!1),H=(0,X.useAnchorPositioning)({anchor:a,floatingRootContext:I,positionMethod:s,mounted:P,side:u,sideOffset:d,align:c,alignOffset:g,arrowPadding:S,collisionBoundary:h,collisionPadding:v,sticky:m,disableAnchorTracking:R,keepMounted:T,nodeId:x,collisionAvoidance:b,adaptiveOrigin:L?Y.adaptiveOrigin:void 0}),K=r.useMemo(()=>{let e={};return M||(e.pointerEvents="none"),{role:"presentation",hidden:!P,style:{...H.positionerStyles,...e}}},[M,P,H.positionerStyles]),G=r.useMemo(()=>({props:K,...H}),[K,H]),q=I.useState("domReferenceElement");(0,z.useIsoLayoutEffect)(()=>{let e=U.current;if(q&&(U.current=q),e&&q&&q!==e){O.set("instantType",void 0);let e=new AbortController;return B(()=>{O.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[q,B,O]);let ee={open:M,side:G.side,align:G.align,anchorHidden:G.anchorHidden,instant:N},et=r.useCallback(e=>{O.set("positionerElement",e)},[O]),en=(0,w.useRenderElement)("div",e,{state:ee,props:[G.props,(0,Z.getDisabledMountTransitionStyles)(D),E],ref:[t,et],stateAttributesMapping:A.popupStateMapping});return(0,n.jsxs)(W.Provider,{value:G,children:[P&&!0===F&&k!==y.REASONS.triggerHover&&(0,n.jsx)(J.InternalBackdrop,{ref:O.context.internalBackdropRef,inert:(0,$.inertValue)(!M),cutout:j}),(0,n.jsx)(l.FloatingNode,{id:x,children:en})]})});var et=e.i(92615),en=e.i(11931),er=e.i(511980),eo=e.i(809058),ei=e.i(504068),ea=e.i(197920),es=e.i(196368);let eu=r.createContext(void 0);function el(e){let{value:t,children:r}=e;return(0,n.jsx)(eu.Provider,{value:t,children:r})}let ec={...A.popupStateMapping,...eo.transitionStatusMapping},ep=r.forwardRef(function(e,t){let{className:o,render:i,initialFocus:a,finalFocus:s,...u}=e,{store:l}=f(),c=q(),p=null!=(0,es.useToolbarRootContext)(!0),{context:d,hasClosePart:g}=function(){let[e,t]=r.useState(0),n=(0,k.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:r.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),h=l.useState("open"),v=l.useState("openMethod"),S=l.useState("instantType"),m=l.useState("transitionStatus"),R=l.useState("popupProps"),b=l.useState("titleElementId"),E=l.useState("descriptionElementId"),C=l.useState("modal"),O=l.useState("mounted"),T=l.useState("openChangeReason"),x=l.useState("activeTriggerElement"),I=l.useState("floatingRootContext");(0,ei.useOpenChangeComplete)({open:h,ref:l.context.popupRef,onComplete(){h&&l.context.onOpenChangeComplete?.(!0)}});let P=l.useState("disabled"),M=l.useState("openOnHover"),j=l.useState("closeDelay");(0,er.useHoverFloatingInteraction)(I,{enabled:M&&!P,closeDelay:j});let A=void 0===a?function(e){return"touch"!==e||l.context.popupRef.current}:a,F={open:h,side:c.side,align:c.align,instant:S,transitionStatus:m},_=r.useCallback(e=>{l.set("popupElement",e)},[l]),N=(0,w.useRenderElement)("div",e,{state:F,ref:[t,l.context.popupRef,_],props:[R,{"aria-labelledby":b,"aria-describedby":E,onKeyDown(e){p&&ea.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,Z.getDisabledMountTransitionStyles)(m),u],stateAttributesMapping:ec});return(0,n.jsx)(en.FloatingFocusManager,{context:I,openInteractionType:v,modal:!1!==C&&g,disabled:!O||T===y.REASONS.triggerHover,initialFocus:A,returnFocus:s,restoreFocus:"popup",previousFocusableElement:(0,et.isHTMLElement)(x)?x:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:(0,n.jsx)(el,{value:d,children:N})})}),ed=r.forwardRef(function(e,t){let{className:n,render:r,...o}=e,{store:i}=f(),a=i.useState("open"),{arrowRef:s,side:u,align:l,arrowUncentered:c,arrowStyles:p}=q();return(0,w.useRenderElement)("div",e,{state:{open:a,side:u,align:l,uncentered:c},ref:[t,s],props:[{style:p,"aria-hidden":!0},o],stateAttributesMapping:A.popupStateMapping})}),ef={...A.popupStateMapping,...eo.transitionStatusMapping},eg=r.forwardRef(function(e,t){let{className:n,render:r,...o}=e,{store:i}=f(),a=i.useState("open"),s=i.useState("mounted"),u=i.useState("transitionStatus"),l=i.useState("openChangeReason");return(0,w.useRenderElement)("div",e,{state:{open:a,transitionStatus:u},ref:[i.context.backdropRef,t],props:[{role:"presentation",hidden:!s,style:{pointerEvents:l===y.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},o],stateAttributesMapping:ef})}),eh=r.forwardRef(function(e,t){let{render:n,className:r,...o}=e,{store:i}=f(),a=(0,D.useBaseUiId)(o.id);return(0,z.useIsoLayoutEffect)(()=>(i.set("titleElementId",a),()=>{i.set("titleElementId",void 0)}),[i,a]),(0,w.useRenderElement)("h2",e,{ref:t,props:[{id:a},o]})}),ev=r.forwardRef(function(e,t){let{render:n,className:r,...o}=e,{store:i}=f(),a=(0,D.useBaseUiId)(o.id);return(0,z.useIsoLayoutEffect)(()=>(i.set("descriptionElementId",a),()=>{i.set("descriptionElementId",void 0)}),[i,a]),(0,w.useRenderElement)("p",e,{ref:t,props:[{id:a},o]})}),eS=r.forwardRef(function(e,t){let n,{render:o,className:i,disabled:a=!1,nativeButton:s=!0,...u}=e,{buttonRef:l,getButtonProps:c}=(0,j.useButton)({disabled:a,focusableWhenDisabled:!1,native:s}),{store:p}=f();return n=r.useContext(eu),(0,z.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,w.useRenderElement)("button",e,{ref:[t,l],props:[{onClick(e){p.setOpen(!1,(0,x.createChangeEventDetails)(y.REASONS.closePress,e.nativeEvent,e.currentTarget))}},u,c]})}),em=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var eR=e.i(203667);let ey={activationDirection:e=>e?{"data-activation-direction":e}:null},eb=r.forwardRef(function(e,t){let{render:n,className:r,children:o,...i}=e,{store:a}=f(),{side:s}=q(),u=a.useState("instantType"),{children:l,state:c}=(0,eR.usePopupViewport)({store:a,side:s,cssVars:em,children:o}),p={activationDirection:c.activationDirection,transitioning:c.transitioning,instant:u};return(0,w.useRenderElement)("div",e,{state:p,ref:t,props:[i,{children:l}],stateAttributesMapping:ey})});class eE{constructor(){this.store=new T}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,p.default)(80,e));this.store.setOpen(!0,(0,x.createChangeEventDetails)(y.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,x.createChangeEventDetails)(y.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,ed,"Backdrop",0,eg,"Close",0,eS,"Description",0,ev,"Handle",0,eE,"Popup",0,ep,"Portal",0,G,"Positioner",0,ee,"Root",0,function(e){return f(!0)?(0,n.jsx)(M,{props:e}):(0,n.jsx)(l.FloatingTree,{children:(0,n.jsx)(M,{props:e})})},"Title",0,eh,"Trigger",0,H,"Viewport",0,eb,"createHandle",0,function(){return new eE}],107641);var eC=e.i(107641),eC=eC,eO=e.i(975157);e.s(["Popover",0,function({...e}){return(0,n.jsx)(eC.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:r=0,side:o="bottom",sideOffset:i=4,...a}){return(0,n.jsx)(eC.Portal,{children:(0,n.jsx)(eC.Positioner,{align:t,alignOffset:r,side:o,sideOffset:i,className:"isolate z-50",children:(0,n.jsx)(eC.Popup,{"data-slot":"popover-content",className:(0,eO.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(eC.Trigger,{"data-slot":"popover-trigger",...e})}],337822)},226145,e=>{"use strict";let t=(0,e.i(572989).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",0,t],226145)},501244,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={formatUrl:function(){return s},formatWithValidation:function(){return l},urlObjectKeys:function(){return u}};for(var o in r)Object.defineProperty(n,o,{enumerable:!0,get:r[o]});let i=e.r(744066)._(e.r(565893)),a=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:n}=e,r=e.protocol||"",o=e.pathname||"",s=e.hash||"",u=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:n&&(l=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(l+=":"+e.port)),u&&"object"==typeof u&&(u=String(i.urlQueryToSearchParams(u)));let c=e.search||u&&`?${u}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||a.test(r))&&!1!==l?(l="//"+(l||""),o&&"/"!==o[0]&&(o="/"+o)):l||(l=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),o=o.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${r}${l}${o}${c}${s}`}let u=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return s(e)}},668649,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return o}});let r=e.r(965652);function o(e,t){let n=(0,r.useRef)(null),o=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(n.current=i(e,r)),t&&(o.current=i(t,r))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},927683,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return i}});let r=e.r(204575),o=e.r(394864);function i(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,o.hasBasePath)(n.pathname)}catch(e){return!1}}},573088,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},210702,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return S},useLinkStatus:function(){return R}};for(var o in r)Object.defineProperty(n,o,{enumerable:!0,get:r[o]});let i=e.r(744066),a=e.r(289721),s=i._(e.r(965652)),u=e.r(501244),l=e.r(74122),c=e.r(668649),p=e.r(204575),d=e.r(44204);e.r(619172);let f=e.r(840535),g=e.r(255397),h=e.r(927683),v=e.r(530620);function S(t){var n,r;let o,i,S,[R,y]=(0,s.useOptimistic)(g.IDLE_LINK_STATUS),b=(0,s.useRef)(null),{href:E,as:C,children:O,prefetch:T=null,passHref:x,replace:I,shallow:P,scroll:M,onClick:k,onMouseEnter:j,onTouchStart:A,legacyBehavior:w=!1,onNavigate:F,transitionTypes:_,ref:N,unstable_dynamicOnHover:D,...L}=t;o=O,w&&("string"==typeof o||"number"==typeof o)&&(o=(0,a.jsx)("a",{children:o}));let U=s.default.useContext(l.AppRouterContext),B=!1!==T,H=!1!==T?null===(r=T)||"auto"===r?v.FetchStrategy.PPR:v.FetchStrategy.Full:v.FetchStrategy.PPR,K="string"==typeof(n=C||E)?n:(0,u.formatUrl)(n);if(w){if(o?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=s.default.Children.only(o)}let V=w?i&&"object"==typeof i&&i.ref:N,G=s.default.useCallback(e=>(null!==U&&(b.current=(0,g.mountLinkInstance)(e,K,U,H,B,y)),()=>{b.current&&((0,g.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,g.unmountPrefetchableInstance)(e)}),[B,K,U,H,y]),$={ref:(0,c.useMergedRef)(G,V),onClick(t){w||"function"!=typeof k||k(t),w&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!U||t.defaultPrevented||function(t,n,r,o,i,a,u){if("u">typeof window){let l,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((l=t.currentTarget.getAttribute("target"))&&"_self"!==l||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(n)){o&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:p}=e.r(238105);s.default.startTransition(()=>{p(n,o?"replace":"push",!1===i?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,r.current,u)})}}(t,K,b,I,M,F,_)},onMouseEnter(e){w||"function"!=typeof j||j(e),w&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),U&&B&&(0,g.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){w||"function"!=typeof A||A(e),w&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),U&&B&&(0,g.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,p.isAbsoluteUrl)(K)?$.href=K:w&&!x&&("a"!==i.type||"href"in i.props)||($.href=(0,d.addBasePath)(K)),S=w?s.default.cloneElement(i,$):(0,a.jsx)("a",{...L,...$,children:o}),(0,a.jsx)(m.Provider,{value:R,children:S})}e.r(573088);let m=(0,s.createContext)(g.IDLE_LINK_STATUS),R=()=>(0,s.useContext)(m);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)}]);