tower-studio 0.2.38 → 0.2.39

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 (217) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +2 -2
  12. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +40 -28
  13. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  34. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +75 -63
  35. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  37. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +2 -2
  38. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +40 -28
  39. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  41. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +2 -2
  42. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +40 -28
  43. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +2 -2
  46. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +57 -45
  47. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +2 -2
  50. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +107 -95
  51. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +2 -2
  54. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +92 -80
  55. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +2 -2
  58. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +81 -69
  59. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +2 -2
  62. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +82 -70
  63. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +2 -2
  66. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +40 -28
  67. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +2 -2
  70. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +80 -68
  71. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +3 -3
  74. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +91 -79
  75. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +2 -2
  78. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +58 -46
  79. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  80. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +1 -1
  82. package/.next/standalone/.next/server/chunks/[root-of-the-server]__00llstz._.js +1 -1
  83. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01n7exm._.js +1 -1
  84. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01yu.gw._.js +1 -1
  85. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qif839._.js +1 -1
  86. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qijr4h._.js +1 -1
  87. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~foo~5._.js +1 -1
  88. package/.next/standalone/.next/server/chunks/src_0bkvm8c._.js +1 -1
  89. package/.next/standalone/.next/server/chunks/src_lib_0i2.v2d._.js +1 -1
  90. package/.next/standalone/.next/server/chunks/src_lib_12xey8u._.js +1 -1
  91. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/ssr/{0ws9_lucide-react_dist_esm_icons_0odx0ph._.js → 0ws9_lucide-react_dist_esm_icons_10_90yo._.js} +2 -2
  93. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-tolks._.js +2 -2
  94. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0i97rbw._.js → [root-of-the-server]__0.~z1-.._.js} +2 -2
  95. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05sv58d._.js +1 -1
  96. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
  97. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__062b.yt._.js +2 -2
  98. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__093tt4a._.js +2 -2
  99. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e-k-gl._.js +3 -0
  100. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0guqcva._.js +2 -2
  101. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gzafdq._.js +1 -1
  102. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0rlar2j._.js → [root-of-the-server]__0i0o7w5._.js} +2 -2
  103. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  104. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__04p5fnx._.js → [root-of-the-server]__0k1ivnj._.js} +2 -2
  105. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dixwk_._.js → [root-of-the-server]__0kgd-1s._.js} +2 -2
  106. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p0te97._.js +2 -2
  107. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0siyg1p._.js +2 -2
  108. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t6f4lq._.js +2 -2
  109. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0th-t1a._.js +2 -2
  110. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0mbvmq1._.js → [root-of-the-server]__0xte.35._.js} +2 -2
  111. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
  112. package/.next/standalone/.next/server/chunks/ssr/{_00vn2qb._.js → _0-qd2ss._.js} +2 -2
  113. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  114. package/.next/standalone/.next/server/chunks/ssr/{_13glpna._.js → _00kwrmr._.js} +2 -2
  115. package/.next/standalone/.next/server/chunks/ssr/_00t6138._.js +2 -2
  116. package/.next/standalone/.next/server/chunks/ssr/_05jv_cy._.js +3 -0
  117. package/.next/standalone/.next/server/chunks/ssr/{_0j84cn0._.js → _06nlsbw._.js} +2 -2
  118. package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
  119. package/.next/standalone/.next/server/chunks/ssr/_07c-9da._.js +3 -0
  120. package/.next/standalone/.next/server/chunks/ssr/_0_z-t6g._.js +3 -0
  121. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +2 -2
  122. package/.next/standalone/.next/server/chunks/ssr/_0cxhub8._.js +2 -2
  123. package/.next/standalone/.next/server/chunks/ssr/{_0qkt.3y._.js → _0gb8a9_._.js} +2 -2
  124. package/.next/standalone/.next/server/chunks/ssr/_0gxccup._.js +3 -0
  125. package/.next/standalone/.next/server/chunks/ssr/_0hh17jg._.js +1 -1
  126. package/.next/standalone/.next/server/chunks/ssr/_0m.34j8._.js +3 -0
  127. package/.next/standalone/.next/server/chunks/ssr/_0mpce0d._.js +2 -2
  128. package/.next/standalone/.next/server/chunks/ssr/_0muaopo._.js +2 -2
  129. package/.next/standalone/.next/server/chunks/ssr/_0n1l7yo._.js +2 -2
  130. package/.next/standalone/.next/server/chunks/ssr/_0ng0eku._.js +1 -1
  131. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
  132. package/.next/standalone/.next/server/chunks/ssr/{_0t53a7_._.js → _0t0oltj._.js} +3 -3
  133. package/.next/standalone/.next/server/chunks/ssr/{_0ght75u._.js → _0v66l8c._.js} +2 -2
  134. package/.next/standalone/.next/server/chunks/ssr/_0w9~m7o._.js +3 -0
  135. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0hhlpw6._.js → node_modules__pnpm_06f0dao._.js} +2 -2
  137. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
  139. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  140. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  141. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  143. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  146. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  147. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  148. package/.next/standalone/.next/server/chunks/ssr/src_components_ui_select_tsx_0d2ra01._.js +1 -1
  149. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sms4xl._.js +1 -1
  150. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  151. package/.next/standalone/.next/server/pages/500.html +1 -1
  152. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  153. package/.next/standalone/.next/server/server-reference-manifest.json +346 -262
  154. package/.next/standalone/.next/static/chunks/0.euy5rie4v3d.js +1 -0
  155. package/.next/standalone/.next/static/chunks/0.lqb7y9kz5z6.js +1 -0
  156. package/.next/standalone/.next/static/chunks/01.nidb8sf6bh.js +1 -0
  157. package/.next/standalone/.next/static/chunks/{151eqj4g7bidp.js → 01ijm9dpmm34q.js} +1 -1
  158. package/.next/standalone/.next/static/chunks/023v9juzhzc~d.js +1 -0
  159. package/.next/standalone/.next/static/chunks/02jsekc779t5~.js +1 -0
  160. package/.next/standalone/.next/static/chunks/0651zmy-w~saj.js +1 -0
  161. package/.next/standalone/.next/static/chunks/{0.nk_89kz3j6c.js → 0_-2es-r~03mg.js} +1 -1
  162. package/.next/standalone/.next/static/chunks/0a._hcvzq4ko7.js +2 -0
  163. package/.next/standalone/.next/static/chunks/{0khxfvo-tgpbc.js → 0dha37i1oc6z~.js} +1 -1
  164. package/.next/standalone/.next/static/chunks/{0wbzgoyu4~g4x.js → 0e9ykduz3_0e1.js} +1 -1
  165. package/.next/standalone/.next/static/chunks/0fy6w5d_zyro0.js +1 -0
  166. package/.next/standalone/.next/static/chunks/0g-gbdkcssn.g.js +1 -0
  167. package/.next/standalone/.next/static/chunks/{14man4i21otxe.js → 0h4k3cicu7g-w.js} +1 -1
  168. package/.next/standalone/.next/static/chunks/{0c0u4it7gyb1..js → 0h73q-9fyea0t.js} +1 -1
  169. package/.next/standalone/.next/static/chunks/0h7~fn.p-fxz_.js +1 -0
  170. package/.next/standalone/.next/static/chunks/0j2n.h0~von8h.js +1 -0
  171. package/.next/standalone/.next/static/chunks/0k.hp06ufx4yp.js +1 -0
  172. package/.next/standalone/.next/static/chunks/0lk-i0jm2ubea.css +1 -0
  173. package/.next/standalone/.next/static/chunks/0p5rare_o5zb1.js +5 -0
  174. package/.next/standalone/.next/static/chunks/0q~4dhw.phxg3.js +1 -0
  175. package/.next/standalone/.next/static/chunks/{0w7_~s93hxxkk.js → 0t_3wwd~mmc.1.js} +1 -1
  176. package/.next/standalone/.next/static/chunks/{0a234qgxmvbfu.js → 0u.3xek3m2ud..js} +1 -1
  177. package/.next/standalone/.next/static/chunks/{0jlzko424.5et.js → 0u.b0t7fueh-x.js} +1 -1
  178. package/.next/standalone/.next/static/chunks/{10mwqzqdpi9d5.js → 0v.l5.sqos562.js} +1 -1
  179. package/.next/standalone/.next/static/chunks/{0bsigqvr2-qcp.js → 0w14di5d0vw6-.js} +1 -1
  180. package/.next/standalone/.next/static/chunks/0z2blg_osfipv.js +1 -0
  181. package/.next/standalone/.next/static/chunks/{0yl2smjfz2bzk.js → 11.r6a56ss7qu.js} +1 -1
  182. package/.next/standalone/.next/static/chunks/{17ldo-bezxis..js → 112wpv9rqw4dp.js} +1 -1
  183. package/.next/standalone/.next/static/chunks/134c60acdsr_g.js +1 -0
  184. package/.next/standalone/.next/static/chunks/13rq33eiffqaz.js +1 -0
  185. package/.next/standalone/package.json +3 -2
  186. package/dist/mcp-server.cjs +6 -3
  187. package/package.json +3 -2
  188. package/scripts/migrations/0003-backfill-systemconfig-from-legacy-db.ts +113 -0
  189. package/scripts/run-migrations.ts +12 -0
  190. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__046-2.-._.js +0 -3
  191. package/.next/standalone/.next/server/chunks/ssr/_07_.oek._.js +0 -3
  192. package/.next/standalone/.next/server/chunks/ssr/_09ri_be._.js +0 -3
  193. package/.next/standalone/.next/server/chunks/ssr/_0_q.4.i._.js +0 -3
  194. package/.next/standalone/.next/server/chunks/ssr/_0nk7qd4._.js +0 -3
  195. package/.next/standalone/.next/server/chunks/ssr/_0no6nrx._.js +0 -3
  196. package/.next/standalone/.next/server/chunks/ssr/_0vqyl_~._.js +0 -3
  197. package/.next/standalone/.next/static/chunks/01.g0gvh6h11a.js +0 -2
  198. package/.next/standalone/.next/static/chunks/03zzmb3y7kpxl.js +0 -1
  199. package/.next/standalone/.next/static/chunks/04t77qlr4-sw7.js +0 -1
  200. package/.next/standalone/.next/static/chunks/097rglx2_e2oo.js +0 -1
  201. package/.next/standalone/.next/static/chunks/0dt3ljzz2pz0r.css +0 -1
  202. package/.next/standalone/.next/static/chunks/0nfwp8f87wok1.js +0 -1
  203. package/.next/standalone/.next/static/chunks/0qonpqhvpg-tt.js +0 -1
  204. package/.next/standalone/.next/static/chunks/0qu5zm6k.e_de.js +0 -5
  205. package/.next/standalone/.next/static/chunks/0rbykdrqih-0t.js +0 -1
  206. package/.next/standalone/.next/static/chunks/0~uo_7-sxehxf.js +0 -1
  207. package/.next/standalone/.next/static/chunks/10q75vl~mg7vy.js +0 -1
  208. package/.next/standalone/.next/static/chunks/11pivwhywsmj9.js +0 -1
  209. package/.next/standalone/.next/static/chunks/13ipvyn1q8z4y.js +0 -1
  210. package/.next/standalone/.next/static/chunks/13qts-1uv7-ee.js +0 -1
  211. package/.next/standalone/.next/static/chunks/14bii1nj2yewi.js +0 -1
  212. package/.next/standalone/.next/static/chunks/15_ulpp1r-6ra.js +0 -1
  213. package/.next/standalone/.next/static/chunks/15~2jg4z8h54~.js +0 -1
  214. package/.next/standalone/.next/static/chunks/183k6undfylp5.js +0 -1
  215. /package/.next/standalone/.next/static/{08PQLn-tnfP4XX6HBzxZ7 → JutVIyokVf-YrN6j2WEwG}/_buildManifest.js +0 -0
  216. /package/.next/standalone/.next/static/{08PQLn-tnfP4XX6HBzxZ7 → JutVIyokVf-YrN6j2WEwG}/_clientMiddlewareManifest.js +0 -0
  217. /package/.next/standalone/.next/static/{08PQLn-tnfP4XX6HBzxZ7 → JutVIyokVf-YrN6j2WEwG}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,14842,865514,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(368490),a=e.i(232280),n=e.i(759686),i=e.i(960518),l=e.i(340873),o=e.i(400355),c=e.i(519455),d=e.i(912505),h=e.i(487486),m=e.i(776639),x=e.i(624687),u=e.i(533499);function f({patchState:e,isLargeFold:s,onLoad:r}){let{t:a}=(0,u.useI18n)();return s?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,t.jsx)(c.Button,{variant:"link",onClick:r,className:"h-auto p-0 text-sm",children:a("diff.loadDiff")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:a("diff.foldedLarge")})]}):e&&"loading"!==e.kind?"error"===e.kind?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:a("diff.loadFailed")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:r,children:a("diff.retry")})]}):"binary"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.binaryNotShown")}):"empty"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.noChanges")}):(0,t.jsx)(p,{patch:e.patch??""}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(o.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function p({patch:e}){let{t:s}=(0,u.useI18n)(),r=e.split("\n"),a=r.length>500,n=a?r.slice(0,500):r;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:n.map((e,s)=>{let r=e.startsWith("+++")||e.startsWith("---")?"px-4 block text-muted-foreground":e.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:r,children:e||" "},s)})}),a&&(0,t.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:s("diff.patchTruncated",{n:String(500),total:String(r.length)})})]})}e.s(["TaskDiffView",0,function({taskId:e,files:o,totalAdded:p,totalRemoved:g,hasConflicts:j,conflictFiles:b,onCommit:w,hasUncommitted:N}){let{t:y}=(0,u.useI18n)(),[v,k]=(0,s.useState)(new Set),[C,S]=(0,s.useState)(new Map),[M,D]=(0,s.useState)(!1),[L,A]=(0,s.useState)(""),[F,T]=(0,s.useState)(!1),B=t=>{S(e=>new Map(e).set(t,{kind:"loading"})),fetch(`/api/tasks/${e}/diff-patch?file=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{S(s=>{let r=new Map(s);return"binary"===e.kind?r.set(t,{kind:"binary"}):"empty"===e.kind?r.set(t,{kind:"empty"}):r.set(t,{kind:"ready",patch:e.patch??""}),r})}).catch(()=>{S(e=>new Map(e).set(t,{kind:"error"}))})};return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[o.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",p]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",g]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:N&&w&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>D(!0),className:"gap-2",children:[(0,t.jsx)(l.GitCommitHorizontal,{className:"h-4 w-4"}),y("diff.commit")]})})]}),j&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(n.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",b.length," conflicting file",1!==b.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:b.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===o.length?(0,t.jsx)(d.EmptyState,{icon:i.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:o.map(e=>{let s=v.has(e.filename),n=C.get(e.filename),i=e.added+e.removed;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{let t;return t=v.has(e.filename),void(k(t=>{let s=new Set(t);return s.has(e.filename)?s.delete(e.filename):s.add(e.filename),s}),t||e.isBinary||C.has(e.filename)||e.added+e.removed<=200&&B(e.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[s?(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(r.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(h.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:y("diff.binary")}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),s&&!e.isBinary&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)(f,{filename:e.filename,patchState:n,isLargeFold:!n&&i>200,onLoad:()=>B(e.filename)})})]},e.filename)})})}),(0,t.jsx)(m.Dialog,{open:M,onOpenChange:D,children:(0,t.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsx)(m.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(x.Textarea,{value:L,onChange:e=>A(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>D(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(L.trim()&&w){T(!0);try{await w(L.trim()),A(""),D(!1)}finally{T(!1)}}},disabled:!L.trim()||F,children:F?"...":y("diff.commit")})]})]})})]})}],14842);var g=e.i(538059);let j=(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"}]]);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:r,taskId:a,taskTitle:n,baseBranch:i,fileCount:l,commitCount:d,commitLog:h=[],onMergeComplete:x}){let u=(0,g.useRouter)(),[f,p]=(0,s.useState)(!1),[b,w]=(0,s.useState)(null),N=async()=>{p(!0),w(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){r(!1),x(),u.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?w(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):w(t.error??"Merge failed")}catch{w("Network error — merge failed")}finally{p(!1)}};return(0,t.jsx)(m.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(m.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsxs)(m.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(j,{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:i})]}),(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:l})]}),(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:d})]})]}),h.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:h.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))})]}),b&&(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:b})})]}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>r(!1),disabled:f,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:N,disabled:f,className:"gap-2",children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},491911,314411,e=>{"use strict";let t=(0,e.i(572989).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["default",0,t],314411),e.s(["File",0,t],491911)},989383,769824,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,s],989383);let r=(0,t.default)("history",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,r],769824)},244354,e=>{"use strict";async function t(e,s,r={}){let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,path:e,...r})});if(!a.ok)throw Error((await a.json()).error||`${s} failed`);return a.json()}e.s(["gitAction",0,t])},48019,782516,755696,886156,586564,719493,436539,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,s],48019);let r=(0,t.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);e.s(["FileMinus",0,r],782516);let a=(0,t.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);e.s(["FileQuestion",0,a],755696);let n=(0,t.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,n],886156);let i=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,i],586564);let l=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,l],719493);let o=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,o],436539)},375306,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],375306)},515135,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(491911),a=e.i(48019),n=e.i(782516),i=e.i(755696),l=e.i(886156),o=e.i(400355),c=e.i(586564),d=e.i(719493),h=e.i(597746),m=e.i(368490),x=e.i(232280),u=e.i(977982),f=e.i(436539),p=e.i(232545),g=e.i(49007),j=e.i(194358),b=e.i(487278),w=e.i(375306);let N=(0,e.i(572989).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var y=e.i(226145),v=e.i(738690),k=e.i(242941),C=e.i(998626),S=e.i(519455),M=e.i(755146),D=e.i(759684),L=e.i(337822),A=e.i(746798),F=e.i(776639),T=e.i(793479),B=e.i(624687),I=e.i(533499);function E({open:e,onOpenChange:r,branches:a,currentBranch:n,localPath:i,onCreated:l,onError:c}){let{t:d}=(0,I.useI18n)(),[m,u]=(0,s.useState)(""),[f,p]=(0,s.useState)(n),[g,j]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),[C,M]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(u(""),p(n),j(""),k(""))},[e,n]);let D=[...new Set(a)].filter(e=>e.toLowerCase().includes(N.toLowerCase())),L=async()=>{if(m.trim()){w(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:i,branch:m.trim(),baseBranch:f})});if(e.ok)r(!1),l();else{let t=await e.json();c(t.error||"Unknown error")}}catch{c("Network error")}finally{w(!1)}}};return(0,t.jsx)(F.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(F.DialogHeader,{children:(0,t.jsx)(F.DialogTitle,{children:d("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchName")}),(0,t.jsx)(T.Input,{value:m,onChange:e=>u(e.target.value),placeholder:d("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&L()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>M(!C),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:f,children:f})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${C?"rotate-180":""}`})]}),C&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:D.map(e=>(0,t.jsxs)("button",{onClick:()=>{p(e),M(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===f?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),e===f&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchDesc")}),(0,t.jsx)(B.Textarea,{value:g,onChange:e=>j(e.target.value),placeholder:d("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(F.DialogFooter,{children:[(0,t.jsx)(S.Button,{variant:"outline",onClick:()=>r(!1),children:d("common.cancel")}),(0,t.jsxs)(S.Button,{onClick:L,disabled:!m.trim()||b,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[b?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,d("common.create")]})]})]})})}var $=e.i(360112),P=e.i(244354);let R={modified:l.FileEdit,added:a.FilePlus,deleted:n.FileMinus,untracked:i.FileQuestion,renamed:l.FileEdit},z={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},U={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function G(e){let t={name:"",path:"",isDir:!0,children:[]};for(let s of e){let e=s.file.split("/").filter(Boolean);if(0===e.length)continue;let r=t;for(let t=0;t<e.length;t++){let a=e[t],n=t===e.length-1,i=e.slice(0,t+1).join("/");if(n)r.children.push({name:a,path:i,isDir:!1,children:[],file:s});else{let e=r.children.find(e=>e.isDir&&e.name===a);e||(e={name:a,path:i,isDir:!0,children:[]},r.children.push(e)),r=e}}}return(function e(t){if(t.isDir&&(t.children=t.children.map(e),1===t.children.length&&t.children[0].isDir&&""!==t.name)){let e=t.children[0];return{...e,name:`${t.name}/${e.name}`}}return t})(t).children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name))}function O({scroll:e,children:s}){return e?(0,t.jsx)(D.ScrollArea,{className:"flex-1 min-h-0",children:s}):(0,t.jsx)("div",{children:s})}function H({label:e,count:r,labelColor:a,tree:n,batchAction:i,batchLabel:l,batchIcon:o,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g}){let[j,b]=(0,s.useState)(!0);return 0===r?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,t.jsxs)("button",{onClick:()=>b(!j),className:"flex items-center gap-1 flex-1 min-w-0",children:[j?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${a}`,children:[e," (",r,")"]})]}),(0,t.jsx)(S.Button,{variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":l,children:o})]}),j&&(0,t.jsx)("div",{className:"pb-1",children:n.map(e=>(0,t.jsx)(W,{node:e,depth:0,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g},e.path))})]})}function W({node:e,depth:a,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h}){let[f,p]=(0,s.useState)(!0),g={paddingLeft:`calc(${a} * 8px + 4px)`};if(e.isDir)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>p(!f),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:g,children:[f?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)(u.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:e.name})]}),f&&e.children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)).map(e=>(0,t.jsx)(W,{node:e,depth:a+1,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h},e.path))]});let j=e.file,b=R[j.status]||r.File,w=z[j.status]||"text-muted-foreground",N=U[j.status]||"?";return(0,t.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:g,onClick:()=>n(j),children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(b,{className:`h-3.5 w-3.5 shrink-0 ${w}`}),(0,t.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:e.name}),(0,t.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${w}`,children:N}),c&&(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),c(j.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":h??"",children:d}),h&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:h})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),i(j.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":o??"",children:l}),o&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:o})]})]})}e.s(["EditorGitPanel",0,function({localPath:e,onFileSelect:r,mode:a="project"}){let n="task"===a,{t:i}=(0,I.useI18n)(),[l,m]=(0,s.useState)(null),[u,D]=(0,s.useState)(!0),[F,T]=(0,s.useState)(""),[B,R]=(0,s.useState)(!1),[z,U]=(0,s.useState)(!1),[W,V]=(0,s.useState)(!1),[K,q]=(0,s.useState)(!1),[J,Q]=(0,s.useState)(!1),[X,Y]=(0,s.useState)(""),[Z,_]=(0,s.useState)(!1),ee=(0,s.useCallback)(async()=>{try{let t=await fetch(`/api/git?path=${encodeURIComponent(e)}`);if(t.ok){let s=await t.json();m({changedFiles:s.changedFiles??[],ahead:s.ahead??0,behind:s.behind??0,remoteUrl:s.remoteUrl??"",currentBranch:s.currentBranch??"",branches:s.branches??[],remoteBranches:s.remoteBranches??[],topLevel:s.topLevel??e})}}catch{}finally{D(!1)}},[e]);(0,s.useEffect)(()=>{ee();let e=setInterval(ee,5e3);return()=>clearInterval(e)},[ee]);let et=async t=>{try{await (0,P.gitAction)(e,"stage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},es=async t=>{try{await (0,P.gitAction)(e,"unstage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},er=async()=>{if(F.trim()){R(!0);try{await (0,P.gitAction)(e,"commit",{message:F}),T(""),$.toast.success(i("git.commitSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{R(!1)}}},ea=async t=>{U(!0);try{await (0,P.gitAction)(e,"pull",t?{branch:t}:{}),$.toast.success(i("git.pullSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{U(!1)}},en=async t=>{V(!0);try{await (0,P.gitAction)(e,"push",t?{branch:t}:{}),$.toast.success(i("git.pushSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{V(!1)}},ei=async()=>{q(!0);try{await (0,P.gitAction)(e,"fetch"),$.toast.success(i("git.fetchSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{q(!1)}},el=async t=>{try{await (0,P.gitAction)(e,"checkout",{branch:t}),Q(!1),$.toast.success(`${i("git.switchSuccess")} ${t}`),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eo=async()=>{try{await (0,P.gitAction)(e,"stash-save",{message:F||void 0}),T(""),$.toast.success(i("git.stashSaved")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ec=async()=>{try{await (0,P.gitAction)(e,"stash-pop",{index:0}),$.toast.success(i("git.stashApplied")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ed=async t=>{try{await (0,P.gitAction)(e,"discard-file",{file:t}),$.toast.success(i("git.discardFileSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eh=async()=>{try{await (0,P.gitAction)(e,"discard-all"),$.toast.success(i("git.discardSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},em=async t=>{if("deleted"===t.status)return;let s=l?.topLevel??e;try{let a=await (0,P.gitAction)(e,"show",{file:t.file});r?.(t.file,a.content??"",s)}catch{r?.(t.file,"",s)}},ex=l?.changedFiles.filter(e=>e.staged)??[],eu=l?.changedFiles.filter(e=>!e.staged)??[],ef=(0,s.useMemo)(()=>G(ex),[ex]),ep=(0,s.useMemo)(()=>G(eu),[eu]);if(u)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!l)return null;function eg(e){let t=[];for(let s of e)s.isDir?t.push(...eg(s.children)):s.file&&t.push(s.file.file);return t}let ej=[...l?.branches??[],...(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e))],eb=X?ej.filter(e=>e.toLowerCase().includes(X.toLowerCase())):ej;return(0,t.jsxs)("div",{className:n?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[n?(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{render:(0,t.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:l?.currentBranch||"—"})]})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:l?.currentBranch||"—"})]}):(0,t.jsxs)(L.Popover,{open:J,onOpenChange:e=>{Q(e),e&&Y("")},children:[(0,t.jsxs)(L.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l?.currentBranch||void 0,children:l?.currentBranch||"—"})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${J?"rotate-180":""}`})]}),(0,t.jsxs)(L.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:X,onChange:e=>Y(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.localBranches")}),(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>{let s=e===l?.currentBranch;return(0,t.jsxs)("button",{onClick:()=>{s?Q(!1):el(e)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${s?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),s&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${e}`)}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.remoteBranches")}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>(0,t.jsxs)("button",{onClick:()=>el(e),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,t.jsx)(k.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e})]},`remote-${e}`)),0===eb.length&&(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:ei,disabled:K,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 ${K?"animate-spin":""}`})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:()=>{Q(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":i("git.createBranch"),children:(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:i("git.createBranch")})]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,t.jsx)("textarea",{value:F,onChange:e=>T(e.target.value),placeholder:i("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&er()}}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(S.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:er,disabled:B||!F.trim()||0===ex.length,children:[B?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(h.Check,{className:"h-3 w-3"}),i("git.commit")]}),(0,t.jsxs)(M.DropdownMenu,{children:[(0,t.jsx)(M.DropdownMenuTrigger,{render:(0,t.jsx)(S.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,t.jsx)(g.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)(M.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.commit")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:er,disabled:!F.trim()||0===ex.length,children:[(0,t.jsx)(h.Check,{className:"h-3.5 w-3.5 mr-2"}),i("git.commit")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.changes")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>et(eg(ep)),disabled:0===eu.length,children:[(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5 mr-2"}),i("git.stageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>es(eg(ef)),disabled:0===ex.length,children:[(0,t.jsx)(f.Minus,{className:"h-3.5 w-3.5 mr-2"}),i("git.unstageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eh,disabled:0===eu.length,children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5 mr-2"}),i("git.discardAll")]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.sync")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pull")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.push")]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pullFrom"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.behind>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",l.behind]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.pushTo"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.ahead>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",l.ahead]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ei,disabled:K,children:[(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${K?"animate-spin":""}`}),i("git.fetchAll")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.stash")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eo,disabled:0===l.changedFiles.length,children:[(0,t.jsx)(b.Archive,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashSave")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ec,children:[(0,t.jsx)(w.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashPopLatest")]})]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,t.jsx)(y.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),l.currentBranch]})]})]})]})]}),(0,t.jsxs)(O,{scroll:n,children:[(0,t.jsx)(H,{label:i("git.stagedChanges"),count:ex.length,labelColor:"text-emerald-400",tree:ef,batchAction:()=>es(eg(ef)),batchLabel:i("git.unstageAll"),batchIcon:(0,t.jsx)(f.Minus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>es([e]),fileActionIcon:"−",fileActionLabel:i("git.unstageFile")}),(0,t.jsx)(H,{label:i("git.unstagedChanges"),count:eu.length,labelColor:"text-muted-foreground",tree:ep,batchAction:()=>et(eg(ep)),batchLabel:i("git.stageAll"),batchIcon:(0,t.jsx)(p.Plus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>et([e]),fileActionIcon:"+",fileActionLabel:i("git.stageFile"),onFileSecondaryAction:e=>ed(e),fileSecondaryIcon:(0,t.jsx)(C.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:i("git.discardFile")}),0===l.changedFiles.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,t.jsx)(h.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("git.noChanges")})]})]}),(0,t.jsx)(E,{open:Z,onOpenChange:_,branches:[...l?.branches??[],...l?.remoteBranches??[]],currentBranch:l?.currentBranch??"",localPath:e,onCreated:async()=>{$.toast.success(i("git.createSuccess")),await ee()},onError:e=>$.toast.error(`${i("git.createFailed")}: ${e}`)})]})}],515135)},557082,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("60b8e086436311cfc8d3cd29d47d42cc43cd016c8e",t.callServer,void 0,t.findSourceMapURL,"updateTask");e.s(["updateTask",0,s])},760264,267639,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("7c1e12d6aeb59bf8e240aa5902e48cd569ebcc127a",t.callServer,void 0,t.findSourceMapURL,"startPtyExecutionSafe");e.s(["startPtyExecutionSafe",0,s],760264);let r=(0,t.createServerReference)("401b19ed1de78cc49e951594c328f146e9f3b16d23",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r],267639)},457952,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40e35bb2d01b14eeccf0c46897d86399797ff36feb",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,s])},332739,265289,908006,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("60d6e7b79a52a7f8d9c05a2958d4ab5f6f8559f51a",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,s],332739);let r=(0,t.createServerReference)("40def74beab8ac4c567000df3bff092d0b29baef01",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r],265289);let a=(0,t.createServerReference)("60910320dd81c673865c275b5918d9dfcfbc61867f",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,a],908006)},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)},326883,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(232280),a=e.i(472074),n=e.i(882651),i=e.i(181209),l=e.i(400355),o=e.i(989383),c=e.i(12659),d=e.i(922541),h=e.i(486077),m=e.i(769824),x=e.i(519455),u=e.i(912505),f=e.i(533499);function p({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(n.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(i.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(l.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:n,onContinueLatest:i}){let{t:l,locale:o}=(0,f.useI18n)(),[g,j]=(0,s.useState)(null),[b,w]=(0,s.useState)(null);return 0===e.length?(0,t.jsx)(u.EmptyState,{icon:m.History,title:l("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("execution.history")}),e.map(s=>{let m=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(s.gitStats??null),u=function(e,t){if(!e||!t)return"";let s=new Date(t).getTime()-new Date(e).getTime();if(s<0)return"";let r=Math.floor(s/1e3);if(r<60)return`${r}s`;let a=Math.floor(r/60);if(a<60)return`${a}m ${r%60}s`;let n=Math.floor(a/60);return`${n}h ${a%60}m`}(s.startedAt??null,s.endedAt??null),f=g===s.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(p,{status:s.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(s.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(s.status,l)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let s=new Date(e),r=Math.floor((new Date().getTime()-s.getTime())/864e5),a="zh"===t?"zh-CN":"en-US",n=s.toLocaleTimeString(a,{hour:"2-digit",minute:"2-digit"});return 0===r?n:1===r?"zh"===t?`昨天 ${n}`:`Yesterday ${n}`:r<7?"zh"===t?`${r}天前 ${n}`:`${r}d ago ${n}`:s.toLocaleDateString(a,{month:"2-digit",day:"2-digit"})+" "+n}(s.startedAt??null,o)}),u&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",u,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:s.summary||l("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,t.jsxs)("span",{children:[m.commits," ",l("execution.commits")]}):null,m.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[m.filesChanged," ",l("execution.files")]})]}):null,m.insertions||m.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),m.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),s.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>w(b===s.id?null:s.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(h.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[l("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:s.insightNote.title}),b===s.id?(0,t.jsx)(a.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(r.ChevronDown,{className:"h-3 w-3"})]}),b===s.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:s.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[s.sessionId&&n?(0,t.jsxs)(x.Button,{size:"sm",onClick:()=>n(s.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),l("execution.resume")]}):!s.sessionId&&"FAILED"===s.status&&s.id===e[0]?.id&&i?(0,t.jsxs)(x.Button,{size:"sm",onClick:i,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),l("execution.tryRecover")]}):null,(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",onClick:()=>j(f?null:s.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(a.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(r.ChevronDown,{className:"h-3.5 w-3.5"}),f?l("execution.collapse"):l("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[s.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:s.gitLog.split("\n").slice(0,3).join("\n")})]}),s.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:s.terminalLog})]}),"FAILED"===s.status&&null!=s.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",s.exitCode]})]})]},s.id)})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,14842,865514,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(368490),a=e.i(232280),n=e.i(759686),i=e.i(960518),l=e.i(340873),o=e.i(400355),c=e.i(519455),d=e.i(912505),h=e.i(487486),m=e.i(776639),x=e.i(624687),u=e.i(533499);function f({patchState:e,isLargeFold:s,onLoad:r}){let{t:a}=(0,u.useI18n)();return s?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,t.jsx)(c.Button,{variant:"link",onClick:r,className:"h-auto p-0 text-sm",children:a("diff.loadDiff")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:a("diff.foldedLarge")})]}):e&&"loading"!==e.kind?"error"===e.kind?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:a("diff.loadFailed")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:r,children:a("diff.retry")})]}):"binary"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.binaryNotShown")}):"empty"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.noChanges")}):(0,t.jsx)(p,{patch:e.patch??""}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(o.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function p({patch:e}){let{t:s}=(0,u.useI18n)(),r=e.split("\n"),a=r.length>500,n=a?r.slice(0,500):r;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:n.map((e,s)=>{let r=e.startsWith("+++")||e.startsWith("---")?"px-4 block text-muted-foreground":e.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:r,children:e||" "},s)})}),a&&(0,t.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:s("diff.patchTruncated",{n:String(500),total:String(r.length)})})]})}e.s(["TaskDiffView",0,function({taskId:e,files:o,totalAdded:p,totalRemoved:g,hasConflicts:j,conflictFiles:b,onCommit:w,hasUncommitted:N}){let{t:y}=(0,u.useI18n)(),[v,k]=(0,s.useState)(new Set),[C,S]=(0,s.useState)(new Map),[M,D]=(0,s.useState)(!1),[L,A]=(0,s.useState)(""),[F,T]=(0,s.useState)(!1),B=t=>{S(e=>new Map(e).set(t,{kind:"loading"})),fetch(`/api/tasks/${e}/diff-patch?file=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{S(s=>{let r=new Map(s);return"binary"===e.kind?r.set(t,{kind:"binary"}):"empty"===e.kind?r.set(t,{kind:"empty"}):r.set(t,{kind:"ready",patch:e.patch??""}),r})}).catch(()=>{S(e=>new Map(e).set(t,{kind:"error"}))})};return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[o.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",p]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",g]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:N&&w&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>D(!0),className:"gap-2",children:[(0,t.jsx)(l.GitCommitHorizontal,{className:"h-4 w-4"}),y("diff.commit")]})})]}),j&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(n.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",b.length," conflicting file",1!==b.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:b.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===o.length?(0,t.jsx)(d.EmptyState,{icon:i.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:o.map(e=>{let s=v.has(e.filename),n=C.get(e.filename),i=e.added+e.removed;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{let t;return t=v.has(e.filename),void(k(t=>{let s=new Set(t);return s.has(e.filename)?s.delete(e.filename):s.add(e.filename),s}),t||e.isBinary||C.has(e.filename)||e.added+e.removed<=200&&B(e.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[s?(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(r.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(h.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:y("diff.binary")}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),s&&!e.isBinary&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)(f,{filename:e.filename,patchState:n,isLargeFold:!n&&i>200,onLoad:()=>B(e.filename)})})]},e.filename)})})}),(0,t.jsx)(m.Dialog,{open:M,onOpenChange:D,children:(0,t.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsx)(m.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(x.Textarea,{value:L,onChange:e=>A(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>D(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(L.trim()&&w){T(!0);try{await w(L.trim()),A(""),D(!1)}finally{T(!1)}}},disabled:!L.trim()||F,children:F?"...":y("diff.commit")})]})]})})]})}],14842);var g=e.i(538059);let j=(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"}]]);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:r,taskId:a,taskTitle:n,baseBranch:i,fileCount:l,commitCount:d,commitLog:h=[],onMergeComplete:x}){let u=(0,g.useRouter)(),[f,p]=(0,s.useState)(!1),[b,w]=(0,s.useState)(null),N=async()=>{p(!0),w(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){r(!1),x(),u.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?w(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):w(t.error??"Merge failed")}catch{w("Network error — merge failed")}finally{p(!1)}};return(0,t.jsx)(m.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(m.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsxs)(m.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(j,{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:i})]}),(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:l})]}),(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:d})]})]}),h.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:h.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))})]}),b&&(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:b})})]}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>r(!1),disabled:f,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:N,disabled:f,className:"gap-2",children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},491911,314411,e=>{"use strict";let t=(0,e.i(572989).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["default",0,t],314411),e.s(["File",0,t],491911)},989383,769824,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,s],989383);let r=(0,t.default)("history",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,r],769824)},244354,e=>{"use strict";async function t(e,s,r={}){let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,path:e,...r})});if(!a.ok)throw Error((await a.json()).error||`${s} failed`);return a.json()}e.s(["gitAction",0,t])},48019,782516,755696,886156,586564,719493,436539,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,s],48019);let r=(0,t.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);e.s(["FileMinus",0,r],782516);let a=(0,t.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);e.s(["FileQuestion",0,a],755696);let n=(0,t.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,n],886156);let i=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,i],586564);let l=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,l],719493);let o=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,o],436539)},375306,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],375306)},515135,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(491911),a=e.i(48019),n=e.i(782516),i=e.i(755696),l=e.i(886156),o=e.i(400355),c=e.i(586564),d=e.i(719493),h=e.i(597746),m=e.i(368490),x=e.i(232280),u=e.i(977982),f=e.i(436539),p=e.i(232545),g=e.i(49007),j=e.i(194358),b=e.i(487278),w=e.i(375306);let N=(0,e.i(572989).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var y=e.i(226145),v=e.i(738690),k=e.i(242941),C=e.i(998626),S=e.i(519455),M=e.i(755146),D=e.i(759684),L=e.i(337822),A=e.i(746798),F=e.i(776639),T=e.i(793479),B=e.i(624687),I=e.i(533499);function E({open:e,onOpenChange:r,branches:a,currentBranch:n,localPath:i,onCreated:l,onError:c}){let{t:d}=(0,I.useI18n)(),[m,u]=(0,s.useState)(""),[f,p]=(0,s.useState)(n),[g,j]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),[C,M]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(u(""),p(n),j(""),k(""))},[e,n]);let D=[...new Set(a)].filter(e=>e.toLowerCase().includes(N.toLowerCase())),L=async()=>{if(m.trim()){w(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:i,branch:m.trim(),baseBranch:f})});if(e.ok)r(!1),l();else{let t=await e.json();c(t.error||"Unknown error")}}catch{c("Network error")}finally{w(!1)}}};return(0,t.jsx)(F.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(F.DialogHeader,{children:(0,t.jsx)(F.DialogTitle,{children:d("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchName")}),(0,t.jsx)(T.Input,{value:m,onChange:e=>u(e.target.value),placeholder:d("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&L()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>M(!C),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:f,children:f})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${C?"rotate-180":""}`})]}),C&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:D.map(e=>(0,t.jsxs)("button",{onClick:()=>{p(e),M(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===f?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),e===f&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchDesc")}),(0,t.jsx)(B.Textarea,{value:g,onChange:e=>j(e.target.value),placeholder:d("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(F.DialogFooter,{children:[(0,t.jsx)(S.Button,{variant:"outline",onClick:()=>r(!1),children:d("common.cancel")}),(0,t.jsxs)(S.Button,{onClick:L,disabled:!m.trim()||b,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[b?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,d("common.create")]})]})]})})}var $=e.i(360112),P=e.i(244354);let R={modified:l.FileEdit,added:a.FilePlus,deleted:n.FileMinus,untracked:i.FileQuestion,renamed:l.FileEdit},z={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},U={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function G(e){let t={name:"",path:"",isDir:!0,children:[]};for(let s of e){let e=s.file.split("/").filter(Boolean);if(0===e.length)continue;let r=t;for(let t=0;t<e.length;t++){let a=e[t],n=t===e.length-1,i=e.slice(0,t+1).join("/");if(n)r.children.push({name:a,path:i,isDir:!1,children:[],file:s});else{let e=r.children.find(e=>e.isDir&&e.name===a);e||(e={name:a,path:i,isDir:!0,children:[]},r.children.push(e)),r=e}}}return(function e(t){if(t.isDir&&(t.children=t.children.map(e),1===t.children.length&&t.children[0].isDir&&""!==t.name)){let e=t.children[0];return{...e,name:`${t.name}/${e.name}`}}return t})(t).children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name))}function O({scroll:e,children:s}){return e?(0,t.jsx)(D.ScrollArea,{className:"flex-1 min-h-0",children:s}):(0,t.jsx)("div",{children:s})}function H({label:e,count:r,labelColor:a,tree:n,batchAction:i,batchLabel:l,batchIcon:o,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g}){let[j,b]=(0,s.useState)(!0);return 0===r?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,t.jsxs)("button",{onClick:()=>b(!j),className:"flex items-center gap-1 flex-1 min-w-0",children:[j?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${a}`,children:[e," (",r,")"]})]}),(0,t.jsx)(S.Button,{variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":l,children:o})]}),j&&(0,t.jsx)("div",{className:"pb-1",children:n.map(e=>(0,t.jsx)(W,{node:e,depth:0,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g},e.path))})]})}function W({node:e,depth:a,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h}){let[f,p]=(0,s.useState)(!0),g={paddingLeft:`calc(${a} * 8px + 4px)`};if(e.isDir)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>p(!f),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:g,children:[f?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)(u.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:e.name})]}),f&&e.children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)).map(e=>(0,t.jsx)(W,{node:e,depth:a+1,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h},e.path))]});let j=e.file,b=R[j.status]||r.File,w=z[j.status]||"text-muted-foreground",N=U[j.status]||"?";return(0,t.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:g,onClick:()=>n(j),children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(b,{className:`h-3.5 w-3.5 shrink-0 ${w}`}),(0,t.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:e.name}),(0,t.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${w}`,children:N}),c&&(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),c(j.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":h??"",children:d}),h&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:h})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),i(j.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":o??"",children:l}),o&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:o})]})]})}e.s(["EditorGitPanel",0,function({localPath:e,onFileSelect:r,mode:a="project"}){let n="task"===a,{t:i}=(0,I.useI18n)(),[l,m]=(0,s.useState)(null),[u,D]=(0,s.useState)(!0),[F,T]=(0,s.useState)(""),[B,R]=(0,s.useState)(!1),[z,U]=(0,s.useState)(!1),[W,V]=(0,s.useState)(!1),[K,q]=(0,s.useState)(!1),[J,Q]=(0,s.useState)(!1),[X,Y]=(0,s.useState)(""),[Z,_]=(0,s.useState)(!1),ee=(0,s.useCallback)(async()=>{try{let t=await fetch(`/api/git?path=${encodeURIComponent(e)}`);if(t.ok){let s=await t.json();m({changedFiles:s.changedFiles??[],ahead:s.ahead??0,behind:s.behind??0,remoteUrl:s.remoteUrl??"",currentBranch:s.currentBranch??"",branches:s.branches??[],remoteBranches:s.remoteBranches??[],topLevel:s.topLevel??e})}}catch{}finally{D(!1)}},[e]);(0,s.useEffect)(()=>{ee();let e=setInterval(ee,5e3);return()=>clearInterval(e)},[ee]);let et=async t=>{try{await (0,P.gitAction)(e,"stage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},es=async t=>{try{await (0,P.gitAction)(e,"unstage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},er=async()=>{if(F.trim()){R(!0);try{await (0,P.gitAction)(e,"commit",{message:F}),T(""),$.toast.success(i("git.commitSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{R(!1)}}},ea=async t=>{U(!0);try{await (0,P.gitAction)(e,"pull",t?{branch:t}:{}),$.toast.success(i("git.pullSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{U(!1)}},en=async t=>{V(!0);try{await (0,P.gitAction)(e,"push",t?{branch:t}:{}),$.toast.success(i("git.pushSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{V(!1)}},ei=async()=>{q(!0);try{await (0,P.gitAction)(e,"fetch"),$.toast.success(i("git.fetchSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{q(!1)}},el=async t=>{try{await (0,P.gitAction)(e,"checkout",{branch:t}),Q(!1),$.toast.success(`${i("git.switchSuccess")} ${t}`),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eo=async()=>{try{await (0,P.gitAction)(e,"stash-save",{message:F||void 0}),T(""),$.toast.success(i("git.stashSaved")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ec=async()=>{try{await (0,P.gitAction)(e,"stash-pop",{index:0}),$.toast.success(i("git.stashApplied")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ed=async t=>{try{await (0,P.gitAction)(e,"discard-file",{file:t}),$.toast.success(i("git.discardFileSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eh=async()=>{try{await (0,P.gitAction)(e,"discard-all"),$.toast.success(i("git.discardSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},em=async t=>{if("deleted"===t.status)return;let s=l?.topLevel??e;try{let a=await (0,P.gitAction)(e,"show",{file:t.file});r?.(t.file,a.content??"",s)}catch{r?.(t.file,"",s)}},ex=l?.changedFiles.filter(e=>e.staged)??[],eu=l?.changedFiles.filter(e=>!e.staged)??[],ef=(0,s.useMemo)(()=>G(ex),[ex]),ep=(0,s.useMemo)(()=>G(eu),[eu]);if(u)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!l)return null;function eg(e){let t=[];for(let s of e)s.isDir?t.push(...eg(s.children)):s.file&&t.push(s.file.file);return t}let ej=[...l?.branches??[],...(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e))],eb=X?ej.filter(e=>e.toLowerCase().includes(X.toLowerCase())):ej;return(0,t.jsxs)("div",{className:n?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[n?(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{render:(0,t.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:l?.currentBranch||"—"})]})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:l?.currentBranch||"—"})]}):(0,t.jsxs)(L.Popover,{open:J,onOpenChange:e=>{Q(e),e&&Y("")},children:[(0,t.jsxs)(L.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l?.currentBranch||void 0,children:l?.currentBranch||"—"})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${J?"rotate-180":""}`})]}),(0,t.jsxs)(L.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:X,onChange:e=>Y(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.localBranches")}),(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>{let s=e===l?.currentBranch;return(0,t.jsxs)("button",{onClick:()=>{s?Q(!1):el(e)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${s?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),s&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${e}`)}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.remoteBranches")}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>(0,t.jsxs)("button",{onClick:()=>el(e),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,t.jsx)(k.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e})]},`remote-${e}`)),0===eb.length&&(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:ei,disabled:K,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 ${K?"animate-spin":""}`})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:()=>{Q(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":i("git.createBranch"),children:(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:i("git.createBranch")})]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,t.jsx)("textarea",{value:F,onChange:e=>T(e.target.value),placeholder:i("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&er()}}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(S.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:er,disabled:B||!F.trim()||0===ex.length,children:[B?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(h.Check,{className:"h-3 w-3"}),i("git.commit")]}),(0,t.jsxs)(M.DropdownMenu,{children:[(0,t.jsx)(M.DropdownMenuTrigger,{render:(0,t.jsx)(S.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,t.jsx)(g.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)(M.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.commit")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:er,disabled:!F.trim()||0===ex.length,children:[(0,t.jsx)(h.Check,{className:"h-3.5 w-3.5 mr-2"}),i("git.commit")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.changes")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>et(eg(ep)),disabled:0===eu.length,children:[(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5 mr-2"}),i("git.stageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>es(eg(ef)),disabled:0===ex.length,children:[(0,t.jsx)(f.Minus,{className:"h-3.5 w-3.5 mr-2"}),i("git.unstageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eh,disabled:0===eu.length,children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5 mr-2"}),i("git.discardAll")]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.sync")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pull")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.push")]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pullFrom"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.behind>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",l.behind]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.pushTo"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.ahead>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",l.ahead]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ei,disabled:K,children:[(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${K?"animate-spin":""}`}),i("git.fetchAll")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.stash")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eo,disabled:0===l.changedFiles.length,children:[(0,t.jsx)(b.Archive,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashSave")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ec,children:[(0,t.jsx)(w.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashPopLatest")]})]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,t.jsx)(y.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),l.currentBranch]})]})]})]})]}),(0,t.jsxs)(O,{scroll:n,children:[(0,t.jsx)(H,{label:i("git.stagedChanges"),count:ex.length,labelColor:"text-emerald-400",tree:ef,batchAction:()=>es(eg(ef)),batchLabel:i("git.unstageAll"),batchIcon:(0,t.jsx)(f.Minus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>es([e]),fileActionIcon:"−",fileActionLabel:i("git.unstageFile")}),(0,t.jsx)(H,{label:i("git.unstagedChanges"),count:eu.length,labelColor:"text-muted-foreground",tree:ep,batchAction:()=>et(eg(ep)),batchLabel:i("git.stageAll"),batchIcon:(0,t.jsx)(p.Plus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>et([e]),fileActionIcon:"+",fileActionLabel:i("git.stageFile"),onFileSecondaryAction:e=>ed(e),fileSecondaryIcon:(0,t.jsx)(C.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:i("git.discardFile")}),0===l.changedFiles.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,t.jsx)(h.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("git.noChanges")})]})]}),(0,t.jsx)(E,{open:Z,onOpenChange:_,branches:[...l?.branches??[],...l?.remoteBranches??[]],currentBranch:l?.currentBranch??"",localPath:e,onCreated:async()=>{$.toast.success(i("git.createSuccess")),await ee()},onError:e=>$.toast.error(`${i("git.createFailed")}: ${e}`)})]})}],515135)},949501,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("6050f28de80d528de4b477e42d739ea1973c2eccc0",t.callServer,void 0,t.findSourceMapURL,"updateTask");e.s(["updateTask",0,s])},409320,352848,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("7c27667b5cdc151628b1ecdfed7dfbe1d135dcf2ad",t.callServer,void 0,t.findSourceMapURL,"startPtyExecutionSafe");e.s(["startPtyExecutionSafe",0,s],409320);let r=(0,t.createServerReference)("40fd5022e920c7b2a827882d57d69c7880353d7fd4",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r],352848)},365328,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40cef3a1f4a61d3cdd08d75fe43d2d12e9faed1603",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,s])},781712,661555,223664,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("60b3b43328be155fd4f8819a051590b0ec85cc81b6",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,s],781712);let r=(0,t.createServerReference)("40228e445431e260a8023f747f753ab8b95509a7b8",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r],661555);let a=(0,t.createServerReference)("6040de30641b812bf05c08ef9c69f5b22214305a4b",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,a],223664)},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)},326883,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(232280),a=e.i(472074),n=e.i(882651),i=e.i(181209),l=e.i(400355),o=e.i(989383),c=e.i(12659),d=e.i(922541),h=e.i(486077),m=e.i(769824),x=e.i(519455),u=e.i(912505),f=e.i(533499);function p({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(n.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(i.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(l.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:n,onContinueLatest:i}){let{t:l,locale:o}=(0,f.useI18n)(),[g,j]=(0,s.useState)(null),[b,w]=(0,s.useState)(null);return 0===e.length?(0,t.jsx)(u.EmptyState,{icon:m.History,title:l("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("execution.history")}),e.map(s=>{let m=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(s.gitStats??null),u=function(e,t){if(!e||!t)return"";let s=new Date(t).getTime()-new Date(e).getTime();if(s<0)return"";let r=Math.floor(s/1e3);if(r<60)return`${r}s`;let a=Math.floor(r/60);if(a<60)return`${a}m ${r%60}s`;let n=Math.floor(a/60);return`${n}h ${a%60}m`}(s.startedAt??null,s.endedAt??null),f=g===s.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(p,{status:s.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(s.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(s.status,l)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let s=new Date(e),r=Math.floor((new Date().getTime()-s.getTime())/864e5),a="zh"===t?"zh-CN":"en-US",n=s.toLocaleTimeString(a,{hour:"2-digit",minute:"2-digit"});return 0===r?n:1===r?"zh"===t?`昨天 ${n}`:`Yesterday ${n}`:r<7?"zh"===t?`${r}天前 ${n}`:`${r}d ago ${n}`:s.toLocaleDateString(a,{month:"2-digit",day:"2-digit"})+" "+n}(s.startedAt??null,o)}),u&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",u,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:s.summary||l("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,t.jsxs)("span",{children:[m.commits," ",l("execution.commits")]}):null,m.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[m.filesChanged," ",l("execution.files")]})]}):null,m.insertions||m.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),m.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),s.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>w(b===s.id?null:s.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(h.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[l("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:s.insightNote.title}),b===s.id?(0,t.jsx)(a.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(r.ChevronDown,{className:"h-3 w-3"})]}),b===s.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:s.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[s.sessionId&&n?(0,t.jsxs)(x.Button,{size:"sm",onClick:()=>n(s.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),l("execution.resume")]}):!s.sessionId&&"FAILED"===s.status&&s.id===e[0]?.id&&i?(0,t.jsxs)(x.Button,{size:"sm",onClick:i,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),l("execution.tryRecover")]}):null,(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",onClick:()=>j(f?null:s.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(a.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(r.ChevronDown,{className:"h-3.5 w-3.5"}),f?l("execution.collapse"):l("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[s.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:s.gitLog.split("\n").slice(0,3).join("\n")})]}),s.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:s.terminalLog})]}),"FAILED"===s.status&&null!=s.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",s.exitCode]})]})]},s.id)})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},340760,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("400e2fda1bae5acb01074e51d080a2be2a77bc34cd",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},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),a=e.i(975157);e.s(["Label",0,function({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.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),...s})}])},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)},882651,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let a=(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(["XCircle",0,a],181209)},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)},732700,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("404ced5321cafdbb940385d492c4abe7763919765c",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,a])},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},991838,e=>{"use strict";var t=e.i(965652),a=e.i(770303);e.s(["useExtension",0,function(e){let s=(0,t.useContext)(a.ExtensionContext);if(!s)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:s.statusMap[e],loading:s.loading,isInstalling:s.installing.has(e),install:()=>s.install(e),uninstall:()=>s.uninstall(e),refresh:()=>s.refresh(e)}}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},961404,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40bd6bd14273f742080b119c49ce1ae4226a0ea9ae",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},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),a=e.i(975157);e.s(["Label",0,function({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.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),...s})}])},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)},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)},882651,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let a=(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(["XCircle",0,a],181209)},59959,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("4024bacffbca9b35b0d1ef4babaae0b94556e89f0b",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,a])},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},991838,e=>{"use strict";var t=e.i(965652),a=e.i(770303);e.s(["useExtension",0,function(e){let s=(0,t.useContext)(a.ExtensionContext);if(!s)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:s.statusMap[e],loading:s.loading,isInstalling:s.installing.has(e),install:()=>s.install(e),uninstall:()=>s.uninstall(e),refresh:()=>s.refresh(e)}}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,196368,t=>{"use strict";var e=t.i(462902),a=t.i(965652);let r=a.createContext(void 0);t.s(["useToolbarRootContext",0,function(t){let o=a.useContext(r);if(void 0===o&&!t)throw Error((0,e.default)(69));return o}])},360112,t=>{"use strict";var e=t.i(965652),a=t.i(585012);let r=Array(12).fill(0),o=({visible:t,className:a})=>e.default.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":t},e.default.createElement("div",{className:"sonner-spinner"},r.map((t,a)=>e.default.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),n=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),s=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),i=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),l=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),d=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},e.default.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.default.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),u=1,c=new class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:a,...r}=t,o="number"==typeof(null==t?void 0:t.id)||(null==(e=t.id)?void 0:e.length)>0?t.id:u++,n=this.toasts.find(t=>t.id===o),s=void 0===t.dismissible||t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),n?this.toasts=this.toasts.map(e=>e.id===o?(this.publish({...e,...t,id:o,title:a}),{...e,...t,id:o,dismissible:s,title:a}):e):this.addToast({title:a,...r,dismissible:s,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:t,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(e=>e({id:t.id,dismiss:!0}))}),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,a)=>{let r,o;if(!a)return;void 0!==a.loading&&(o=this.create({...a,promise:t,type:"loading",message:a.loading,description:"function"!=typeof a.description?a.description:void 0}));let n=Promise.resolve(t instanceof Function?t():t),s=void 0!==o,i=n.then(async t=>{if(r=["resolve",t],e.default.isValidElement(t))s=!1,this.create({id:o,type:"default",message:t});else if(f(t)&&!t.ok){s=!1;let r="function"==typeof a.error?await a.error(`HTTP error! status: ${t.status}`):a.error,n="function"==typeof a.description?await a.description(`HTTP error! status: ${t.status}`):a.description,i="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:o,type:"error",description:n,...i})}else if(t instanceof Error){s=!1;let r="function"==typeof a.error?await a.error(t):a.error,n="function"==typeof a.description?await a.description(t):a.description,i="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:o,type:"error",description:n,...i})}else if(void 0!==a.success){s=!1;let r="function"==typeof a.success?await a.success(t):a.success,n="function"==typeof a.description?await a.description(t):a.description,i="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:o,type:"success",description:n,...i})}}).catch(async t=>{if(r=["reject",t],void 0!==a.error){s=!1;let r="function"==typeof a.error?await a.error(t):a.error,n="function"==typeof a.description?await a.description(t):a.description,i="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:o,type:"error",description:n,...i})}}).finally(()=>{s&&(this.dismiss(o),o=void 0),null==a.finally||a.finally.call(a)}),l=()=>new Promise((t,e)=>i.then(()=>"reject"===r[0]?e(r[1]):t(r[1])).catch(e));return"string"!=typeof o&&"number"!=typeof o?{unwrap:l}:Object.assign(o,{unwrap:l})},this.custom=(t,e)=>{let a=(null==e?void 0:e.id)||u++;return this.create({jsx:t(a),id:a,...e}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},f=t=>t&&"object"==typeof t&&"ok"in t&&"boolean"==typeof t.ok&&"status"in t&&"number"==typeof t.status,m=Object.assign((t,e)=>{let a=(null==e?void 0:e.id)||u++;return c.addToast({title:t,...e,id:a}),a},{success:c.success,info:c.info,warning:c.warning,error:c.error,custom:c.custom,message:c.message,promise:c.promise,dismiss:c.dismiss,loading:c.loading},{getHistory:()=>c.toasts,getToasts:()=>c.getActiveToasts()});function p(t){return void 0!==t.label}function h(...t){return t.filter(Boolean).join(" ")}!function(t){if(!t||"u"<typeof document)return;let e=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",e.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");let g=t=>{var a,r,u,c,f,m,g,b,v,y,x,w,k;let{invert:E,toast:M,unstyled:T,interacting:N,setHeights:S,visibleToasts:B,heights:C,index:z,toasts:j,expanded:R,removeToast:Y,defaultRichColors:A,closeButton:D,style:I,cancelButtonStyle:P,actionButtonStyle:$,className:L="",descriptionClassName:H="",duration:V,position:U,gap:X,expandByDefault:F,classNames:O,icons:K,closeButtonAriaLabel:q="Close toast"}=t,[W,G]=e.default.useState(null),[J,Q]=e.default.useState(null),[Z,_]=e.default.useState(!1),[tt,te]=e.default.useState(!1),[ta,tr]=e.default.useState(!1),[to,tn]=e.default.useState(!1),[ts,ti]=e.default.useState(!1),[tl,td]=e.default.useState(0),[tu,tc]=e.default.useState(0),tf=e.default.useRef(M.duration||V||4e3),tm=e.default.useRef(null),tp=e.default.useRef(null),th=0===z,tg=z+1<=B,tb=M.type,tv=!1!==M.dismissible,ty=M.className||"",tx=M.descriptionClassName||"",tw=e.default.useMemo(()=>C.findIndex(t=>t.toastId===M.id)||0,[C,M.id]),tk=e.default.useMemo(()=>{var t;return null!=(t=M.closeButton)?t:D},[M.closeButton,D]),tE=e.default.useMemo(()=>M.duration||V||4e3,[M.duration,V]),tM=e.default.useRef(0),tT=e.default.useRef(0),tN=e.default.useRef(0),tS=e.default.useRef(null),[tB,tC]=U.split("-"),tz=e.default.useMemo(()=>C.reduce((t,e,a)=>a>=tw?t:t+e.height,0),[C,tw]),tj=(()=>{let[t,a]=e.default.useState(document.hidden);return e.default.useEffect(()=>{let t=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),t})(),tR=M.invert||E,tY="loading"===tb;tT.current=e.default.useMemo(()=>tw*X+tz,[tw,tz]),e.default.useEffect(()=>{tf.current=tE},[tE]),e.default.useEffect(()=>{_(!0)},[]),e.default.useEffect(()=>{let t=tp.current;if(t){let e=t.getBoundingClientRect().height;return tc(e),S(t=>[{toastId:M.id,height:e,position:M.position},...t]),()=>S(t=>t.filter(t=>t.toastId!==M.id))}},[S,M.id]),e.default.useLayoutEffect(()=>{if(!Z)return;let t=tp.current,e=t.style.height;t.style.height="auto";let a=t.getBoundingClientRect().height;t.style.height=e,tc(a),S(t=>t.find(t=>t.toastId===M.id)?t.map(t=>t.toastId===M.id?{...t,height:a}:t):[{toastId:M.id,height:a,position:M.position},...t])},[Z,M.title,M.description,S,M.id,M.jsx,M.action,M.cancel]);let tA=e.default.useCallback(()=>{te(!0),td(tT.current),S(t=>t.filter(t=>t.toastId!==M.id)),setTimeout(()=>{Y(M)},200)},[M,Y,S,tT]);e.default.useEffect(()=>{let t;if((!M.promise||"loading"!==tb)&&M.duration!==1/0&&"loading"!==M.type){if(R||N||tj){if(tN.current<tM.current){let t=new Date().getTime()-tM.current;tf.current=tf.current-t}tN.current=new Date().getTime()}else tf.current!==1/0&&(tM.current=new Date().getTime(),t=setTimeout(()=>{null==M.onAutoClose||M.onAutoClose.call(M,M),tA()},tf.current));return()=>clearTimeout(t)}},[R,N,M,tb,tj,tA]),e.default.useEffect(()=>{M.delete&&(tA(),null==M.onDismiss||M.onDismiss.call(M,M))},[tA,M.delete]);let tD=M.icon||(null==K?void 0:K[tb])||(t=>{switch(t){case"success":return n;case"info":return i;case"warning":return s;case"error":return l;default:return null}})(tb);return e.default.createElement("li",{tabIndex:0,ref:tp,className:h(L,ty,null==O?void 0:O.toast,null==M||null==(a=M.classNames)?void 0:a.toast,null==O?void 0:O.default,null==O?void 0:O[tb],null==M||null==(r=M.classNames)?void 0:r[tb]),"data-sonner-toast":"","data-rich-colors":null!=(y=M.richColors)?y:A,"data-styled":!(M.jsx||M.unstyled||T),"data-mounted":Z,"data-promise":!!M.promise,"data-swiped":ts,"data-removed":tt,"data-visible":tg,"data-y-position":tB,"data-x-position":tC,"data-index":z,"data-front":th,"data-swiping":ta,"data-dismissible":tv,"data-type":tb,"data-invert":tR,"data-swipe-out":to,"data-swipe-direction":J,"data-expanded":!!(R||F&&Z),"data-testid":M.testId,style:{"--index":z,"--toasts-before":z,"--z-index":j.length-z,"--offset":`${tt?tl:tT.current}px`,"--initial-height":F?"auto":`${tu}px`,...I,...M.style},onDragEnd:()=>{tr(!1),G(null),tS.current=null},onPointerDown:t=>{2===t.button||tY||!tv||(tm.current=new Date,td(tT.current),t.target.setPointerCapture(t.pointerId),"BUTTON"!==t.target.tagName&&(tr(!0),tS.current={x:t.clientX,y:t.clientY}))},onPointerUp:()=>{var t,e,a,r,o;if(to||!tv)return;tS.current=null;let n=Number((null==(t=tp.current)?void 0:t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),s=Number((null==(e=tp.current)?void 0:e.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),i=new Date().getTime()-(null==(a=tm.current)?void 0:a.getTime()),l="x"===W?n:s,d=Math.abs(l)/i;if(Math.abs(l)>=45||d>.11){td(tT.current),null==M.onDismiss||M.onDismiss.call(M,M),"x"===W?Q(n>0?"right":"left"):Q(s>0?"down":"up"),tA(),tn(!0);return}null==(r=tp.current)||r.style.setProperty("--swipe-amount-x","0px"),null==(o=tp.current)||o.style.setProperty("--swipe-amount-y","0px"),ti(!1),tr(!1),G(null)},onPointerMove:e=>{var a,r,o,n;if(!tS.current||!tv||(null==(a=window.getSelection())?void 0:a.toString().length)>0)return;let s=e.clientY-tS.current.y,i=e.clientX-tS.current.x,l=null!=(n=t.swipeDirections)?n:function(t){let[e,a]=t.split("-"),r=[];return e&&r.push(e),a&&r.push(a),r}(U);!W&&(Math.abs(i)>1||Math.abs(s)>1)&&G(Math.abs(i)>Math.abs(s)?"x":"y");let d={x:0,y:0},u=t=>1/(1.5+Math.abs(t)/20);if("y"===W){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&s<0||l.includes("bottom")&&s>0)d.y=s;else{let t=s*u(s);d.y=Math.abs(t)<Math.abs(s)?t:s}}else if("x"===W&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&i<0||l.includes("right")&&i>0)d.x=i;else{let t=i*u(i);d.x=Math.abs(t)<Math.abs(i)?t:i}(Math.abs(d.x)>0||Math.abs(d.y)>0)&&ti(!0),null==(r=tp.current)||r.style.setProperty("--swipe-amount-x",`${d.x}px`),null==(o=tp.current)||o.style.setProperty("--swipe-amount-y",`${d.y}px`)}},tk&&!M.jsx&&"loading"!==tb?e.default.createElement("button",{"aria-label":q,"data-disabled":tY,"data-close-button":!0,onClick:tY||!tv?()=>{}:()=>{tA(),null==M.onDismiss||M.onDismiss.call(M,M)},className:h(null==O?void 0:O.closeButton,null==M||null==(u=M.classNames)?void 0:u.closeButton)},null!=(x=null==K?void 0:K.close)?x:d):null,(tb||M.icon||M.promise)&&null!==M.icon&&((null==K?void 0:K[tb])!==null||M.icon)?e.default.createElement("div",{"data-icon":"",className:h(null==O?void 0:O.icon,null==M||null==(c=M.classNames)?void 0:c.icon)},M.promise||"loading"===M.type&&!M.icon?M.icon||((null==K?void 0:K.loading)?e.default.createElement("div",{className:h(null==O?void 0:O.loader,null==M||null==(k=M.classNames)?void 0:k.loader,"sonner-loader"),"data-visible":"loading"===tb},K.loading):e.default.createElement(o,{className:h(null==O?void 0:O.loader,null==M||null==(w=M.classNames)?void 0:w.loader),visible:"loading"===tb})):null,"loading"!==M.type?tD:null):null,e.default.createElement("div",{"data-content":"",className:h(null==O?void 0:O.content,null==M||null==(f=M.classNames)?void 0:f.content)},e.default.createElement("div",{"data-title":"",className:h(null==O?void 0:O.title,null==M||null==(m=M.classNames)?void 0:m.title)},M.jsx?M.jsx:"function"==typeof M.title?M.title():M.title),M.description?e.default.createElement("div",{"data-description":"",className:h(H,tx,null==O?void 0:O.description,null==M||null==(g=M.classNames)?void 0:g.description)},"function"==typeof M.description?M.description():M.description):null),e.default.isValidElement(M.cancel)?M.cancel:M.cancel&&p(M.cancel)?e.default.createElement("button",{"data-button":!0,"data-cancel":!0,style:M.cancelButtonStyle||P,onClick:t=>{!p(M.cancel)||tv&&(null==M.cancel.onClick||M.cancel.onClick.call(M.cancel,t),tA())},className:h(null==O?void 0:O.cancelButton,null==M||null==(b=M.classNames)?void 0:b.cancelButton)},M.cancel.label):null,e.default.isValidElement(M.action)?M.action:M.action&&p(M.action)?e.default.createElement("button",{"data-button":!0,"data-action":!0,style:M.actionButtonStyle||$,onClick:t=>{!p(M.action)||(null==M.action.onClick||M.action.onClick.call(M.action,t),t.defaultPrevented||tA())},className:h(null==O?void 0:O.actionButton,null==M||null==(v=M.classNames)?void 0:v.actionButton)},M.action.label):null)};function b(){if("u"<typeof window||"u"<typeof document)return"ltr";let t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?t:window.getComputedStyle(document.documentElement).direction}let v=e.default.forwardRef(function(t,r){let{id:o,invert:n,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:d,className:u,offset:f,mobileOffset:m,theme:p="light",richColors:h,duration:v,style:y,visibleToasts:x=3,toastOptions:w,dir:k=b(),gap:E=14,icons:M,containerAriaLabel:T="Notifications"}=t,[N,S]=e.default.useState([]),B=e.default.useMemo(()=>o?N.filter(t=>t.toasterId===o):N.filter(t=>!t.toasterId),[N,o]),C=e.default.useMemo(()=>Array.from(new Set([s].concat(B.filter(t=>t.position).map(t=>t.position)))),[B,s]),[z,j]=e.default.useState([]),[R,Y]=e.default.useState(!1),[A,D]=e.default.useState(!1),[I,P]=e.default.useState("system"!==p?p:"u">typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=e.default.useRef(null),L=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=e.default.useRef(null),V=e.default.useRef(!1),U=e.default.useCallback(t=>{S(e=>{var a;return(null==(a=e.find(e=>e.id===t.id))?void 0:a.delete)||c.dismiss(t.id),e.filter(({id:e})=>e!==t.id)})},[]);return e.default.useEffect(()=>c.subscribe(t=>{t.dismiss?requestAnimationFrame(()=>{S(e=>e.map(e=>e.id===t.id?{...e,delete:!0}:e))}):setTimeout(()=>{a.default.flushSync(()=>{S(e=>{let a=e.findIndex(e=>e.id===t.id);return -1!==a?[...e.slice(0,a),{...e[a],...t},...e.slice(a+1)]:[t,...e]})})})}),[N]),e.default.useEffect(()=>{if("system"!==p)return void P(p);if("system"===p&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?P("dark"):P("light")),"u"<typeof window)return;let t=window.matchMedia("(prefers-color-scheme: dark)");try{t.addEventListener("change",({matches:t})=>{t?P("dark"):P("light")})}catch(e){t.addListener(({matches:t})=>{try{t?P("dark"):P("light")}catch(t){console.error(t)}})}},[p]),e.default.useEffect(()=>{N.length<=1&&Y(!1)},[N]),e.default.useEffect(()=>{let t=t=>{var e,a;i.every(e=>t[e]||t.code===e)&&(Y(!0),null==(a=$.current)||a.focus()),"Escape"===t.code&&(document.activeElement===$.current||(null==(e=$.current)?void 0:e.contains(document.activeElement)))&&Y(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[i]),e.default.useEffect(()=>{if($.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,V.current=!1)}},[$.current]),e.default.createElement("section",{ref:r,"aria-label":`${T} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((a,r)=>{var o;let s,[i,c]=a.split("-");return B.length?e.default.createElement("ol",{key:a,dir:"auto"===k?b():k,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":i,"data-x-position":c,style:{"--front-toast-height":`${(null==(o=z[0])?void 0:o.height)||0}px`,"--width":"356px","--gap":`${E}px`,...y,...(s={},[f,m].forEach((t,e)=>{let a=1===e,r=a?"--mobile-offset":"--offset",o=a?"16px":"24px";function n(t){["top","right","bottom","left"].forEach(e=>{s[`${r}-${e}`]="number"==typeof t?`${t}px`:t})}"number"==typeof t||"string"==typeof t?n(t):"object"==typeof t?["top","right","bottom","left"].forEach(e=>{void 0===t[e]?s[`${r}-${e}`]=o:s[`${r}-${e}`]="number"==typeof t[e]?`${t[e]}px`:t[e]}):n(o)}),s)},onBlur:t=>{V.current&&!t.currentTarget.contains(t.relatedTarget)&&(V.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:t=>{!(t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissible)&&(V.current||(V.current=!0,H.current=t.relatedTarget))},onMouseEnter:()=>Y(!0),onMouseMove:()=>Y(!0),onMouseLeave:()=>{A||Y(!1)},onDragEnd:()=>Y(!1),onPointerDown:t=>{t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissible||D(!0)},onPointerUp:()=>D(!1)},B.filter(t=>!t.position&&0===r||t.position===a).map((r,o)=>{var s,i;return e.default.createElement(g,{key:r.id,icons:M,index:o,toast:r,defaultRichColors:h,duration:null!=(s=null==w?void 0:w.duration)?s:v,className:null==w?void 0:w.className,descriptionClassName:null==w?void 0:w.descriptionClassName,invert:n,visibleToasts:x,closeButton:null!=(i=null==w?void 0:w.closeButton)?i:d,interacting:A,position:a,style:null==w?void 0:w.style,unstyled:null==w?void 0:w.unstyled,classNames:null==w?void 0:w.classNames,cancelButtonStyle:null==w?void 0:w.cancelButtonStyle,actionButtonStyle:null==w?void 0:w.actionButtonStyle,closeButtonAriaLabel:null==w?void 0:w.closeButtonAriaLabel,removeToast:U,toasts:B.filter(t=>t.position==r.position),heights:z.filter(t=>t.position==r.position),setHeights:j,expandByDefault:l,gap:E,expanded:R,swipeDirections:t.swipeDirections})})):null}))});t.s(["Toaster",0,v,"toast",0,m])},645378,t=>{"use strict";let e=(0,t.i(572989).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);t.s(["FileText",0,e],645378)},624687,t=>{"use strict";var e=t.i(289721),a=t.i(975157);t.s(["Textarea",0,function({className:t,...r}){return(0,e.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),...r})}])},487278,t=>{"use strict";let e=(0,t.i(572989).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);t.s(["Archive",0,e],487278)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,196368,t=>{"use strict";var e=t.i(462902),a=t.i(965652);let r=a.createContext(void 0);t.s(["useToolbarRootContext",0,function(t){let o=a.useContext(r);if(void 0===o&&!t)throw Error((0,e.default)(69));return o}])},360112,t=>{"use strict";var e=t.i(965652),a=t.i(585012);let r=Array(12).fill(0),o=({visible:t,className:a})=>e.default.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":t},e.default.createElement("div",{className:"sonner-spinner"},r.map((t,a)=>e.default.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),n=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),s=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),i=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),l=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.default.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),d=e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},e.default.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.default.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),u=1,c=new class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:a,...r}=t,o="number"==typeof(null==t?void 0:t.id)||(null==(e=t.id)?void 0:e.length)>0?t.id:u++,n=this.toasts.find(t=>t.id===o),s=void 0===t.dismissible||t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),n?this.toasts=this.toasts.map(e=>e.id===o?(this.publish({...e,...t,id:o,title:a}),{...e,...t,id:o,dismissible:s,title:a}):e):this.addToast({title:a,...r,dismissible:s,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:t,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(e=>e({id:t.id,dismiss:!0}))}),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,a)=>{let r,o;if(!a)return;void 0!==a.loading&&(o=this.create({...a,promise:t,type:"loading",message:a.loading,description:"function"!=typeof a.description?a.description:void 0}));let n=Promise.resolve(t instanceof Function?t():t),s=void 0!==o,i=n.then(async t=>{if(r=["resolve",t],e.default.isValidElement(t))s=!1,this.create({id:o,type:"default",message:t});else if(f(t)&&!t.ok){s=!1;let r="function"==typeof a.error?await a.error(`HTTP error! status: ${t.status}`):a.error,n="function"==typeof a.description?await a.description(`HTTP error! status: ${t.status}`):a.description,i="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:o,type:"error",description:n,...i})}else if(t instanceof Error){s=!1;let r="function"==typeof a.error?await a.error(t):a.error,n="function"==typeof a.description?await a.description(t):a.description,i="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:o,type:"error",description:n,...i})}else if(void 0!==a.success){s=!1;let r="function"==typeof a.success?await a.success(t):a.success,n="function"==typeof a.description?await a.description(t):a.description,i="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:o,type:"success",description:n,...i})}}).catch(async t=>{if(r=["reject",t],void 0!==a.error){s=!1;let r="function"==typeof a.error?await a.error(t):a.error,n="function"==typeof a.description?await a.description(t):a.description,i="object"!=typeof r||e.default.isValidElement(r)?{message:r}:r;this.create({id:o,type:"error",description:n,...i})}}).finally(()=>{s&&(this.dismiss(o),o=void 0),null==a.finally||a.finally.call(a)}),l=()=>new Promise((t,e)=>i.then(()=>"reject"===r[0]?e(r[1]):t(r[1])).catch(e));return"string"!=typeof o&&"number"!=typeof o?{unwrap:l}:Object.assign(o,{unwrap:l})},this.custom=(t,e)=>{let a=(null==e?void 0:e.id)||u++;return this.create({jsx:t(a),id:a,...e}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},f=t=>t&&"object"==typeof t&&"ok"in t&&"boolean"==typeof t.ok&&"status"in t&&"number"==typeof t.status,m=Object.assign((t,e)=>{let a=(null==e?void 0:e.id)||u++;return c.addToast({title:t,...e,id:a}),a},{success:c.success,info:c.info,warning:c.warning,error:c.error,custom:c.custom,message:c.message,promise:c.promise,dismiss:c.dismiss,loading:c.loading},{getHistory:()=>c.toasts,getToasts:()=>c.getActiveToasts()});function p(t){return void 0!==t.label}function h(...t){return t.filter(Boolean).join(" ")}!function(t){if(!t||"u"<typeof document)return;let e=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",e.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");let g=t=>{var a,r,u,c,f,m,g,b,v,y,x,w,k;let{invert:E,toast:M,unstyled:T,interacting:N,setHeights:S,visibleToasts:C,heights:B,index:z,toasts:j,expanded:R,removeToast:A,defaultRichColors:Y,closeButton:D,style:I,cancelButtonStyle:P,actionButtonStyle:$,className:H="",descriptionClassName:L="",duration:V,position:U,gap:X,expandByDefault:F,classNames:O,icons:K,closeButtonAriaLabel:q="Close toast"}=t,[W,G]=e.default.useState(null),[J,Q]=e.default.useState(null),[Z,_]=e.default.useState(!1),[tt,te]=e.default.useState(!1),[ta,tr]=e.default.useState(!1),[to,tn]=e.default.useState(!1),[ts,ti]=e.default.useState(!1),[tl,td]=e.default.useState(0),[tu,tc]=e.default.useState(0),tf=e.default.useRef(M.duration||V||4e3),tm=e.default.useRef(null),tp=e.default.useRef(null),th=0===z,tg=z+1<=C,tb=M.type,tv=!1!==M.dismissible,ty=M.className||"",tx=M.descriptionClassName||"",tw=e.default.useMemo(()=>B.findIndex(t=>t.toastId===M.id)||0,[B,M.id]),tk=e.default.useMemo(()=>{var t;return null!=(t=M.closeButton)?t:D},[M.closeButton,D]),tE=e.default.useMemo(()=>M.duration||V||4e3,[M.duration,V]),tM=e.default.useRef(0),tT=e.default.useRef(0),tN=e.default.useRef(0),tS=e.default.useRef(null),[tC,tB]=U.split("-"),tz=e.default.useMemo(()=>B.reduce((t,e,a)=>a>=tw?t:t+e.height,0),[B,tw]),tj=(()=>{let[t,a]=e.default.useState(document.hidden);return e.default.useEffect(()=>{let t=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),t})(),tR=M.invert||E,tA="loading"===tb;tT.current=e.default.useMemo(()=>tw*X+tz,[tw,tz]),e.default.useEffect(()=>{tf.current=tE},[tE]),e.default.useEffect(()=>{_(!0)},[]),e.default.useEffect(()=>{let t=tp.current;if(t){let e=t.getBoundingClientRect().height;return tc(e),S(t=>[{toastId:M.id,height:e,position:M.position},...t]),()=>S(t=>t.filter(t=>t.toastId!==M.id))}},[S,M.id]),e.default.useLayoutEffect(()=>{if(!Z)return;let t=tp.current,e=t.style.height;t.style.height="auto";let a=t.getBoundingClientRect().height;t.style.height=e,tc(a),S(t=>t.find(t=>t.toastId===M.id)?t.map(t=>t.toastId===M.id?{...t,height:a}:t):[{toastId:M.id,height:a,position:M.position},...t])},[Z,M.title,M.description,S,M.id,M.jsx,M.action,M.cancel]);let tY=e.default.useCallback(()=>{te(!0),td(tT.current),S(t=>t.filter(t=>t.toastId!==M.id)),setTimeout(()=>{A(M)},200)},[M,A,S,tT]);e.default.useEffect(()=>{let t;if((!M.promise||"loading"!==tb)&&M.duration!==1/0&&"loading"!==M.type){if(R||N||tj){if(tN.current<tM.current){let t=new Date().getTime()-tM.current;tf.current=tf.current-t}tN.current=new Date().getTime()}else tf.current!==1/0&&(tM.current=new Date().getTime(),t=setTimeout(()=>{null==M.onAutoClose||M.onAutoClose.call(M,M),tY()},tf.current));return()=>clearTimeout(t)}},[R,N,M,tb,tj,tY]),e.default.useEffect(()=>{M.delete&&(tY(),null==M.onDismiss||M.onDismiss.call(M,M))},[tY,M.delete]);let tD=M.icon||(null==K?void 0:K[tb])||(t=>{switch(t){case"success":return n;case"info":return i;case"warning":return s;case"error":return l;default:return null}})(tb);return e.default.createElement("li",{tabIndex:0,ref:tp,className:h(H,ty,null==O?void 0:O.toast,null==M||null==(a=M.classNames)?void 0:a.toast,null==O?void 0:O.default,null==O?void 0:O[tb],null==M||null==(r=M.classNames)?void 0:r[tb]),"data-sonner-toast":"","data-rich-colors":null!=(y=M.richColors)?y:Y,"data-styled":!(M.jsx||M.unstyled||T),"data-mounted":Z,"data-promise":!!M.promise,"data-swiped":ts,"data-removed":tt,"data-visible":tg,"data-y-position":tC,"data-x-position":tB,"data-index":z,"data-front":th,"data-swiping":ta,"data-dismissible":tv,"data-type":tb,"data-invert":tR,"data-swipe-out":to,"data-swipe-direction":J,"data-expanded":!!(R||F&&Z),"data-testid":M.testId,style:{"--index":z,"--toasts-before":z,"--z-index":j.length-z,"--offset":`${tt?tl:tT.current}px`,"--initial-height":F?"auto":`${tu}px`,...I,...M.style},onDragEnd:()=>{tr(!1),G(null),tS.current=null},onPointerDown:t=>{2===t.button||tA||!tv||(tm.current=new Date,td(tT.current),t.target.setPointerCapture(t.pointerId),"BUTTON"!==t.target.tagName&&(tr(!0),tS.current={x:t.clientX,y:t.clientY}))},onPointerUp:()=>{var t,e,a,r,o;if(to||!tv)return;tS.current=null;let n=Number((null==(t=tp.current)?void 0:t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),s=Number((null==(e=tp.current)?void 0:e.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),i=new Date().getTime()-(null==(a=tm.current)?void 0:a.getTime()),l="x"===W?n:s,d=Math.abs(l)/i;if(Math.abs(l)>=45||d>.11){td(tT.current),null==M.onDismiss||M.onDismiss.call(M,M),"x"===W?Q(n>0?"right":"left"):Q(s>0?"down":"up"),tY(),tn(!0);return}null==(r=tp.current)||r.style.setProperty("--swipe-amount-x","0px"),null==(o=tp.current)||o.style.setProperty("--swipe-amount-y","0px"),ti(!1),tr(!1),G(null)},onPointerMove:e=>{var a,r,o,n;if(!tS.current||!tv||(null==(a=window.getSelection())?void 0:a.toString().length)>0)return;let s=e.clientY-tS.current.y,i=e.clientX-tS.current.x,l=null!=(n=t.swipeDirections)?n:function(t){let[e,a]=t.split("-"),r=[];return e&&r.push(e),a&&r.push(a),r}(U);!W&&(Math.abs(i)>1||Math.abs(s)>1)&&G(Math.abs(i)>Math.abs(s)?"x":"y");let d={x:0,y:0},u=t=>1/(1.5+Math.abs(t)/20);if("y"===W){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&s<0||l.includes("bottom")&&s>0)d.y=s;else{let t=s*u(s);d.y=Math.abs(t)<Math.abs(s)?t:s}}else if("x"===W&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&i<0||l.includes("right")&&i>0)d.x=i;else{let t=i*u(i);d.x=Math.abs(t)<Math.abs(i)?t:i}(Math.abs(d.x)>0||Math.abs(d.y)>0)&&ti(!0),null==(r=tp.current)||r.style.setProperty("--swipe-amount-x",`${d.x}px`),null==(o=tp.current)||o.style.setProperty("--swipe-amount-y",`${d.y}px`)}},tk&&!M.jsx&&"loading"!==tb?e.default.createElement("button",{"aria-label":q,"data-disabled":tA,"data-close-button":!0,onClick:tA||!tv?()=>{}:()=>{tY(),null==M.onDismiss||M.onDismiss.call(M,M)},className:h(null==O?void 0:O.closeButton,null==M||null==(u=M.classNames)?void 0:u.closeButton)},null!=(x=null==K?void 0:K.close)?x:d):null,(tb||M.icon||M.promise)&&null!==M.icon&&((null==K?void 0:K[tb])!==null||M.icon)?e.default.createElement("div",{"data-icon":"",className:h(null==O?void 0:O.icon,null==M||null==(c=M.classNames)?void 0:c.icon)},M.promise||"loading"===M.type&&!M.icon?M.icon||((null==K?void 0:K.loading)?e.default.createElement("div",{className:h(null==O?void 0:O.loader,null==M||null==(k=M.classNames)?void 0:k.loader,"sonner-loader"),"data-visible":"loading"===tb},K.loading):e.default.createElement(o,{className:h(null==O?void 0:O.loader,null==M||null==(w=M.classNames)?void 0:w.loader),visible:"loading"===tb})):null,"loading"!==M.type?tD:null):null,e.default.createElement("div",{"data-content":"",className:h(null==O?void 0:O.content,null==M||null==(f=M.classNames)?void 0:f.content)},e.default.createElement("div",{"data-title":"",className:h(null==O?void 0:O.title,null==M||null==(m=M.classNames)?void 0:m.title)},M.jsx?M.jsx:"function"==typeof M.title?M.title():M.title),M.description?e.default.createElement("div",{"data-description":"",className:h(L,tx,null==O?void 0:O.description,null==M||null==(g=M.classNames)?void 0:g.description)},"function"==typeof M.description?M.description():M.description):null),e.default.isValidElement(M.cancel)?M.cancel:M.cancel&&p(M.cancel)?e.default.createElement("button",{"data-button":!0,"data-cancel":!0,style:M.cancelButtonStyle||P,onClick:t=>{!p(M.cancel)||tv&&(null==M.cancel.onClick||M.cancel.onClick.call(M.cancel,t),tY())},className:h(null==O?void 0:O.cancelButton,null==M||null==(b=M.classNames)?void 0:b.cancelButton)},M.cancel.label):null,e.default.isValidElement(M.action)?M.action:M.action&&p(M.action)?e.default.createElement("button",{"data-button":!0,"data-action":!0,style:M.actionButtonStyle||$,onClick:t=>{!p(M.action)||(null==M.action.onClick||M.action.onClick.call(M.action,t),t.defaultPrevented||tY())},className:h(null==O?void 0:O.actionButton,null==M||null==(v=M.classNames)?void 0:v.actionButton)},M.action.label):null)};function b(){if("u"<typeof window||"u"<typeof document)return"ltr";let t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?t:window.getComputedStyle(document.documentElement).direction}let v=e.default.forwardRef(function(t,r){let{id:o,invert:n,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:d,className:u,offset:f,mobileOffset:m,theme:p="light",richColors:h,duration:v,style:y,visibleToasts:x=3,toastOptions:w,dir:k=b(),gap:E=14,icons:M,containerAriaLabel:T="Notifications"}=t,[N,S]=e.default.useState([]),C=e.default.useMemo(()=>o?N.filter(t=>t.toasterId===o):N.filter(t=>!t.toasterId),[N,o]),B=e.default.useMemo(()=>Array.from(new Set([s].concat(C.filter(t=>t.position).map(t=>t.position)))),[C,s]),[z,j]=e.default.useState([]),[R,A]=e.default.useState(!1),[Y,D]=e.default.useState(!1),[I,P]=e.default.useState("system"!==p?p:"u">typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=e.default.useRef(null),H=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=e.default.useRef(null),V=e.default.useRef(!1),U=e.default.useCallback(t=>{S(e=>{var a;return(null==(a=e.find(e=>e.id===t.id))?void 0:a.delete)||c.dismiss(t.id),e.filter(({id:e})=>e!==t.id)})},[]);return e.default.useEffect(()=>c.subscribe(t=>{t.dismiss?requestAnimationFrame(()=>{S(e=>e.map(e=>e.id===t.id?{...e,delete:!0}:e))}):setTimeout(()=>{a.default.flushSync(()=>{S(e=>{let a=e.findIndex(e=>e.id===t.id);return -1!==a?[...e.slice(0,a),{...e[a],...t},...e.slice(a+1)]:[t,...e]})})})}),[N]),e.default.useEffect(()=>{if("system"!==p)return void P(p);if("system"===p&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?P("dark"):P("light")),"u"<typeof window)return;let t=window.matchMedia("(prefers-color-scheme: dark)");try{t.addEventListener("change",({matches:t})=>{t?P("dark"):P("light")})}catch(e){t.addListener(({matches:t})=>{try{t?P("dark"):P("light")}catch(t){console.error(t)}})}},[p]),e.default.useEffect(()=>{N.length<=1&&A(!1)},[N]),e.default.useEffect(()=>{let t=t=>{var e,a;i.every(e=>t[e]||t.code===e)&&(A(!0),null==(a=$.current)||a.focus()),"Escape"===t.code&&(document.activeElement===$.current||(null==(e=$.current)?void 0:e.contains(document.activeElement)))&&A(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[i]),e.default.useEffect(()=>{if($.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,V.current=!1)}},[$.current]),e.default.createElement("section",{ref:r,"aria-label":`${T} ${H}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},B.map((a,r)=>{var o;let s,[i,c]=a.split("-");return C.length?e.default.createElement("ol",{key:a,dir:"auto"===k?b():k,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":i,"data-x-position":c,style:{"--front-toast-height":`${(null==(o=z[0])?void 0:o.height)||0}px`,"--width":"356px","--gap":`${E}px`,...y,...(s={},[f,m].forEach((t,e)=>{let a=1===e,r=a?"--mobile-offset":"--offset",o=a?"16px":"24px";function n(t){["top","right","bottom","left"].forEach(e=>{s[`${r}-${e}`]="number"==typeof t?`${t}px`:t})}"number"==typeof t||"string"==typeof t?n(t):"object"==typeof t?["top","right","bottom","left"].forEach(e=>{void 0===t[e]?s[`${r}-${e}`]=o:s[`${r}-${e}`]="number"==typeof t[e]?`${t[e]}px`:t[e]}):n(o)}),s)},onBlur:t=>{V.current&&!t.currentTarget.contains(t.relatedTarget)&&(V.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:t=>{!(t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissible)&&(V.current||(V.current=!0,L.current=t.relatedTarget))},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{Y||A(!1)},onDragEnd:()=>A(!1),onPointerDown:t=>{t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissible||D(!0)},onPointerUp:()=>D(!1)},C.filter(t=>!t.position&&0===r||t.position===a).map((r,o)=>{var s,i;return e.default.createElement(g,{key:r.id,icons:M,index:o,toast:r,defaultRichColors:h,duration:null!=(s=null==w?void 0:w.duration)?s:v,className:null==w?void 0:w.className,descriptionClassName:null==w?void 0:w.descriptionClassName,invert:n,visibleToasts:x,closeButton:null!=(i=null==w?void 0:w.closeButton)?i:d,interacting:Y,position:a,style:null==w?void 0:w.style,unstyled:null==w?void 0:w.unstyled,classNames:null==w?void 0:w.classNames,cancelButtonStyle:null==w?void 0:w.cancelButtonStyle,actionButtonStyle:null==w?void 0:w.actionButtonStyle,closeButtonAriaLabel:null==w?void 0:w.closeButtonAriaLabel,removeToast:U,toasts:C.filter(t=>t.position==r.position),heights:z.filter(t=>t.position==r.position),setHeights:j,expandByDefault:l,gap:E,expanded:R,swipeDirections:t.swipeDirections})})):null}))});t.s(["Toaster",0,v,"toast",0,m])},645378,t=>{"use strict";let e=(0,t.i(572989).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);t.s(["FileText",0,e],645378)},624687,t=>{"use strict";var e=t.i(289721),a=t.i(975157);t.s(["Textarea",0,function({className:t,...r}){return(0,e.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),...r})}])},519587,t=>{"use strict";let e=(0,t.i(572989).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);t.s(["default",0,e])},400355,t=>{"use strict";var e=t.i(519587);t.s(["Loader2",()=>e.default])},597746,t=>{"use strict";var e=t.i(152279);t.s(["Check",()=>e.default])},453889,t=>{"use strict";let e=(0,t.i(572989).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);t.s(["FolderOpen",0,e],453889)},487278,t=>{"use strict";let e=(0,t.i(572989).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);t.s(["Archive",0,e],487278)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,882651,181209,e=>{"use strict";var s=e.i(59737);e.s(["CheckCircle2",()=>s.default],882651);let t=(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(["XCircle",0,t],181209)},236967,e=>{"use strict";var s=e.i(289721),t=e.i(210702),r=e.i(538059),a=e.i(259846),n=e.i(645378),l=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:n.FileText},{key:"assets",icon:l.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:n}=(0,c.useI18n)(),l=(0,r.usePathname)(),i=o.find(e=>l.includes(`/${e.key}`))?.key;return(0,s.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,s.jsxs)(t.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,s.jsx)(a.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:n("archive.backToBoard")})]}),(0,s.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(r=>{let a=r.icon,l=i===r.key;return(0,s.jsxs)(t.default,{href:`/workspaces/${e}/${r.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${l?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,s.jsx)(a,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:n(`sidebar.${r.key}`)})]},r.key)})]})}])},107830,e=>{"use strict";var s=e.i(289721),t=e.i(965652),r=e.i(487278),a=e.i(882651),n=e.i(181209),l=e.i(400355),i=e.i(738690),c=e.i(280027),o=e.i(533499),d=e.i(236967),u=e.i(514798);let m=(0,u.createServerReference)("405a35390832fec28d925d2751dde3fcd49242a483",u.callServer,void 0,u.findSourceMapURL,"getArchivedTasks");var x=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,s.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:u,initialProjectId:f,initialTasks:v}){let j,{t:b}=(0,o.useI18n)(),[N,k]=(0,t.useTransition)(),[y,w]=(0,t.useState)(u),[C,S]=(0,t.useState)(f),[T,A]=(0,t.useState)(v),[$,I]=(0,t.useState)(null),[D,L]=(0,t.useState)(""),P=e.find(e=>e.id===y),E=P?.projects??[],O=D.trim().toLowerCase(),z=O?T.filter(e=>e.title.toLowerCase().includes(O)):T,R=(0,t.useCallback)(e=>{e?k(async()=>{A(await m(e))}):A([])},[k]);return(0,s.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,s.jsx)(d.SubPageNav,{workspaceId:y}),(0,s.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,s.jsxs)(c.Select,{value:y,onValueChange:s=>s&&(s=>{if(s===y)return;w(s);let t=e.find(e=>e.id===s),r=t?.projects[0]??null;S(r?.id??null),R(r?.id??null)})(s),children:[(0,s.jsx)(c.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,s.jsx)("span",{className:"truncate",children:P?.name??y})}),(0,s.jsx)(c.SelectContent,{children:e.map(e=>(0,s.jsx)(c.SelectItem,{value:e.id,children:e.name},e.id))})]}),E.length>0&&(0,s.jsxs)(c.Select,{value:C??"",onValueChange:e=>e&&void(e!==C&&(S(e),R(e))),children:[(0,s.jsx)(c.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,s.jsx)("span",{className:"truncate",children:(j=E.find(e=>e.id===C))?j.alias?`${j.name} (${j.alias})`:j.name:""})}),(0,s.jsx)(c.SelectContent,{children:E.map(e=>(0,s.jsxs)(c.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,s.jsxs)("div",{className:"relative ml-auto",children:[(0,s.jsx)(i.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,s.jsx)("input",{type:"text",value:D,onChange:e=>L(e.target.value),placeholder:b("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,s.jsxs)("span",{className:"rounded-full bg-muted px-2.5 py-0.5 text-[11px] text-muted-foreground",children:[z.length," ",b("archive.tasksCount")]})]}),(0,s.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,s.jsxs)("div",{className:`relative ${N?"opacity-40 pointer-events-none":""} transition-opacity`,children:[N&&(0,s.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,s.jsx)(l.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===z.length?(0,s.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,s.jsx)(r.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,s.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:O?b("archive.noSearchResults"):b("archive.noTasks")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground/60",children:O?b("archive.noSearchResultsDesc"):b("archive.noTasksDesc")})]}):(0,s.jsx)("div",{className:"space-y-2",children:z.map(e=>{let t="DONE"===e.status,r=e.executions[0];return(0,s.jsx)("div",{role:"button",tabIndex:0,onClick:()=>I(e.id),onKeyDown:s=>{("Enter"===s.key||" "===s.key)&&(s.preventDefault(),I(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,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("div",{className:"mt-0.5 shrink-0",children:t?(0,s.jsx)(a.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):(0,s.jsx)(n.XCircle,{className:"h-4 w-4 text-rose-500"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(g,{priority:e.priority}),(0,s.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:e.title}),(0,s.jsx)("span",{className:`ml-1 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ${t?"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:t?b("archive.status.done"):b("archive.status.cancelled")}),e.version&&(0,s.jsx)(h.TaskVersionTag,{number:e.version.number,name:e.version.name,showName:!0,className:"shrink-0"})]}),e.labels.length>0&&(0,s.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:e.labels.map(e=>(0,s.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,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,s.jsxs)("span",{children:[b("archive.createdAt"),": ",p(e.createdAt)]}),(0,s.jsxs)("span",{children:[t?b("archive.completedAt"):b("archive.cancelledAt"),": ",p(e.updatedAt)]}),r&&(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[b("archive.lastExecution"),":"," ",(0,s.jsx)("span",{className:`rounded px-1 py-0.5 font-mono text-[10px] ${"COMPLETED"===r.status?"bg-emerald-500/10 text-emerald-400":"FAILED"===r.status?"bg-rose-500/10 text-rose-400":"bg-amber-500/10 text-amber-400"}`,children:r.status})]})]})]})]})},e.id)})})]})}),(0,s.jsx)(x.TaskOverviewDrawer,{open:!!$,onOpenChange:e=>{e||I(null)},taskId:$,hideEnvActions:!0})]})}],107830)},244455,e=>{e.v(s=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(s=>e.l(s))).then(()=>s(629495)))},800307,e=>{e.v(s=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(s=>e.l(s))).then(()=>s(267483)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,882651,181209,e=>{"use strict";var s=e.i(59737);e.s(["CheckCircle2",()=>s.default],882651);let t=(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(["XCircle",0,t],181209)},236967,e=>{"use strict";var s=e.i(289721),t=e.i(210702),a=e.i(538059),r=e.i(259846),n=e.i(645378),l=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:n.FileText},{key:"assets",icon:l.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:n}=(0,c.useI18n)(),l=(0,a.usePathname)(),i=o.find(e=>l.includes(`/${e.key}`))?.key;return(0,s.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,s.jsxs)(t.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,s.jsx)(r.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:n("archive.backToBoard")})]}),(0,s.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let r=a.icon,l=i===a.key;return(0,s.jsxs)(t.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 ${l?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,s.jsx)(r,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:n(`sidebar.${a.key}`)})]},a.key)})]})}])},107830,e=>{"use strict";var s=e.i(289721),t=e.i(965652),a=e.i(487278),r=e.i(882651),n=e.i(181209),l=e.i(400355),i=e.i(738690),c=e.i(280027),o=e.i(533499),d=e.i(236967),u=e.i(514798);let m=(0,u.createServerReference)("40f88754fa4ff3ba0a38dfd64e6cfd9a3687d71f26",u.callServer,void 0,u.findSourceMapURL,"getArchivedTasks");var x=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 f({priority:e}){return(0,s.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:u,initialProjectId:g,initialTasks:v}){let j,{t:b}=(0,o.useI18n)(),[N,k]=(0,t.useTransition)(),[y,w]=(0,t.useState)(u),[C,S]=(0,t.useState)(g),[T,A]=(0,t.useState)(v),[$,I]=(0,t.useState)(null),[D,L]=(0,t.useState)(""),P=e.find(e=>e.id===y),E=P?.projects??[],O=D.trim().toLowerCase(),z=O?T.filter(e=>e.title.toLowerCase().includes(O)):T,R=(0,t.useCallback)(e=>{e?k(async()=>{A(await m(e))}):A([])},[k]);return(0,s.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,s.jsx)(d.SubPageNav,{workspaceId:y}),(0,s.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,s.jsxs)(c.Select,{value:y,onValueChange:s=>s&&(s=>{if(s===y)return;w(s);let t=e.find(e=>e.id===s),a=t?.projects[0]??null;S(a?.id??null),R(a?.id??null)})(s),children:[(0,s.jsx)(c.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,s.jsx)("span",{className:"truncate",children:P?.name??y})}),(0,s.jsx)(c.SelectContent,{children:e.map(e=>(0,s.jsx)(c.SelectItem,{value:e.id,children:e.name},e.id))})]}),E.length>0&&(0,s.jsxs)(c.Select,{value:C??"",onValueChange:e=>e&&void(e!==C&&(S(e),R(e))),children:[(0,s.jsx)(c.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,s.jsx)("span",{className:"truncate",children:(j=E.find(e=>e.id===C))?j.alias?`${j.name} (${j.alias})`:j.name:""})}),(0,s.jsx)(c.SelectContent,{children:E.map(e=>(0,s.jsxs)(c.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,s.jsxs)("div",{className:"relative ml-auto",children:[(0,s.jsx)(i.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,s.jsx)("input",{type:"text",value:D,onChange:e=>L(e.target.value),placeholder:b("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,s.jsxs)("span",{className:"rounded-full bg-muted px-2.5 py-0.5 text-[11px] text-muted-foreground",children:[z.length," ",b("archive.tasksCount")]})]}),(0,s.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,s.jsxs)("div",{className:`relative ${N?"opacity-40 pointer-events-none":""} transition-opacity`,children:[N&&(0,s.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,s.jsx)(l.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===z.length?(0,s.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,s.jsx)(a.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,s.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:O?b("archive.noSearchResults"):b("archive.noTasks")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground/60",children:O?b("archive.noSearchResultsDesc"):b("archive.noTasksDesc")})]}):(0,s.jsx)("div",{className:"space-y-2",children:z.map(e=>{let t="DONE"===e.status,a=e.executions[0];return(0,s.jsx)("div",{role:"button",tabIndex:0,onClick:()=>I(e.id),onKeyDown:s=>{("Enter"===s.key||" "===s.key)&&(s.preventDefault(),I(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,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("div",{className:"mt-0.5 shrink-0",children:t?(0,s.jsx)(r.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):(0,s.jsx)(n.XCircle,{className:"h-4 w-4 text-rose-500"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(f,{priority:e.priority}),(0,s.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:e.title}),(0,s.jsx)("span",{className:`ml-1 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ${t?"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:t?b("archive.status.done"):b("archive.status.cancelled")}),e.version&&(0,s.jsx)(h.TaskVersionTag,{number:e.version.number,name:e.version.name,showName:!0,className:"shrink-0"})]}),e.labels.length>0&&(0,s.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:e.labels.map(e=>(0,s.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,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,s.jsxs)("span",{children:[b("archive.createdAt"),": ",p(e.createdAt)]}),(0,s.jsxs)("span",{children:[t?b("archive.completedAt"):b("archive.cancelledAt"),": ",p(e.updatedAt)]}),a&&(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[b("archive.lastExecution"),":"," ",(0,s.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,s.jsx)(x.TaskOverviewDrawer,{open:!!$,onOpenChange:e=>{e||I(null)},taskId:$,hideEnvActions:!0})]})}],107830)},244455,e=>{e.v(s=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(s=>e.l(s))).then(()=>s(629495)))},800307,e=>{e.v(s=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(s=>e.l(s))).then(()=>s(267483)))}]);