tower-studio 0.2.18 → 0.2.20
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.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -100
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +40 -28
- package/.next/standalone/.next/server/app/_not-found/page.js +5 -4
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +87 -63
- package/.next/standalone/.next/server/app/missions/page.js +8 -6
- package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +40 -28
- package/.next/standalone/.next/server/app/onboarding/page.js +5 -4
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +40 -28
- package/.next/standalone/.next/server/app/page.js +5 -4
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +56 -44
- package/.next/standalone/.next/server/app/settings/page.js +5 -4
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +99 -87
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +7 -5
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +89 -77
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +7 -5
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +74 -62
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +5 -4
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +87 -63
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +8 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +40 -28
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +6 -5
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +79 -67
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +7 -5
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +108 -84
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +8 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +56 -44
- package/.next/standalone/.next/server/app/workspaces/page.js +5 -4
- package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-0gs-6._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03j20vp._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05se6yk._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06m1r8x._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__09p152b._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_6swdz._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0b-ib~7._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gmwjkc._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o3ggen._.js +5 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wuzc5o._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__12c9noi._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0bkvm8c._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_0aowbzy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[externals]_@vscode_ripgrep_0m7itqb._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.hrt0s._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0b~c--d._.js → [root-of-the-server]__01evhhc._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02-6df-._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0p4-t7d._.js → [root-of-the-server]__0261~vp._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08mkpqd._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__01vzmbg._.js → [root-of-the-server]__09rts_e._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b.ej5q._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e_-mj-._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0p_3kgh._.js → [root-of-the-server]__0eea3ta._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0eql-bn._.js → [root-of-the-server]__0f72pl_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0fzkdjl._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0_0box3._.js → [root-of-the-server]__0la1659._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0jvh8f3._.js → [root-of-the-server]__0m1tg3c._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ntdmyn._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0t46zla._.js → [root-of-the-server]__0oqhxfb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pu-v0l._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lxcgi4._.js → [root-of-the-server]__0qy0o3-._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0sc_a_d._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__06lecy.._.js → [root-of-the-server]__0sdd0qu._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10t-oa1._.js → [root-of-the-server]__0th0_fo._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0edxb4j._.js → [root-of-the-server]__0ty1ao1._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0um1ugs._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wt83kv._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0y.2qv_._.js → [root-of-the-server]__0z7je5_._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zq.n2w._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11zjs~k._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0zhkbm~._.js → [root-of-the-server]__12ktvsa._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0fvk61p._.js → [root-of-the-server]__13374-3._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__134_xv.._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13vgkq5._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0-m6pij._.js → _0-ez10.._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0-zk1xq._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0r2el9k._.js → _0574rlr._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_06-jig2._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_07~q7qs._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0wk5s-y._.js → _08z-g~5._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/_09b8zgw._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_0_2c7e0._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_05qfznq._.js → _0_vjay8._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0es22_y._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0fhds8v._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0jg.s-g._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0~dc49z._.js → _0kef0v6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ln8vj0._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/_0mqxe~e._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0gy-1oc._.js → _0nbufo.._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ng0eku._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0nzwk2y._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0f2quba._.js → _0qkxdkn._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_00vtpb1._.js → _0r6gweb._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0mg_44.._.js → _0rqf5w7._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0lgx4c3._.js → _0rt8jf_._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0s58zbp._.js → _0sbxdnc._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0tua.9p._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0ueyys5._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0unw1fq._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0y3bnq6._.js → _0uuzh5m._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/_0z-mopi._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0m2o_3.._.js → _0~aon4t._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/_10sx3n7._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/_12e_1hd._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_13esy08._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0hhlpw6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_075s.rk._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0.e1lk4._.js → src_lib_00tdjs9._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_08rw1cx._.js → src_lib_0153vha._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0a3sg-k._.js → src_lib_07bxr4y._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0hddinr._.js → src_lib_0dnn~ft._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0e.v07~._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0haj7_-._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0vp4mgz._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0wd-1.k._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0yvdojq._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0zfjhu1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0~cwhiw._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_127qa83._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_12h5txa._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js +1 -1
- package/.next/standalone/.next/server/functions-config-manifest.json +10 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/next-font-manifest.js +1 -1
- package/.next/standalone/.next/server/next-font-manifest.json +13 -13
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/pages-manifest.json +0 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +343 -235
- package/.next/standalone/.next/static/chunks/0-93a_ovah-e0.js +5 -0
- package/.next/standalone/.next/static/chunks/0.rw..0v.8a1-.js +5 -0
- package/.next/standalone/.next/static/chunks/{08x.ru6r_rz3k.js → 05qdpgnpb_7mk.js} +1 -1
- package/.next/standalone/.next/static/chunks/{123doanyjnwwq.css → 066jf0nk75nic.css} +1 -1
- package/.next/standalone/.next/static/chunks/{0_we-0tskn.or.js → 08q54xdtb58sp.js} +1 -1
- package/.next/standalone/.next/static/chunks/08rokhw7bg_zn.js +1 -0
- package/.next/standalone/.next/static/chunks/0bxz4rml4iaob.js +1 -0
- package/.next/standalone/.next/static/chunks/0gh2r0ji~m34y.js +1 -0
- package/.next/standalone/.next/static/chunks/0j157xr-bax~d.js +1 -0
- package/.next/standalone/.next/static/chunks/0m2o51rtidmxh.js +1 -0
- package/.next/standalone/.next/static/chunks/0m90vde-l0h1a.js +2 -0
- package/.next/standalone/.next/static/chunks/0mqdumoz_frlg.js +2 -0
- package/.next/standalone/.next/static/chunks/0odb2p6e7-8n8.js +1 -0
- package/.next/standalone/.next/static/chunks/0okjtk-a.5lz0.css +1 -0
- package/.next/standalone/.next/static/chunks/0t0.k0pugrmxt.js +1 -0
- package/.next/standalone/.next/static/chunks/0vykez3mijj6f.js +1 -0
- package/.next/standalone/.next/static/chunks/{15ugy0vmnfdus.js → 0wzn4nbo56gf3.js} +1 -1
- package/.next/standalone/.next/static/chunks/0xrhj92idqx72.js +5 -0
- package/.next/standalone/.next/static/chunks/0yj4qfp~pk5na.js +1 -0
- package/.next/standalone/.next/static/chunks/0yje2relcvr6r.js +1 -0
- package/.next/standalone/.next/static/chunks/0zk-aoc.g8t8h.js +1 -0
- package/.next/standalone/.next/static/chunks/0~7zlta-boej_.js +1 -0
- package/.next/standalone/.next/static/chunks/{1634ulzz-40pw.js → 1157qwl1lq-uv.js} +1 -1
- package/.next/standalone/.next/static/chunks/116ssnh5k8ad9.js +1 -0
- package/.next/standalone/.next/static/chunks/11~-fm76bj3r4.js +1 -0
- package/.next/standalone/.next/static/chunks/13wlh1lxhudv~.js +1 -0
- package/.next/standalone/.next/static/chunks/15nh9t21_9u6i.js +1 -0
- package/.next/standalone/.next/static/chunks/163o-5kdc6me5.js +1 -0
- package/.next/standalone/.next/static/chunks/16pnb9m-vqs75.js +5 -0
- package/.next/standalone/.next/static/chunks/18aqm8uawnpl3.js +1 -0
- package/.next/standalone/.next/static/media/4fa387ec64143e14-s.0wkzw~je483f-.woff2 +0 -0
- package/.next/standalone/.next/static/media/5ce348bf30bf5439-s.0zgw-jeven.3w.woff2 +0 -0
- package/.next/standalone/.next/static/media/6306c77e7c8268e4-s.0rhz0arwfsn~5.woff2 +0 -0
- package/.next/standalone/.next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2 +0 -0
- package/.next/standalone/.next/static/media/7d817b4c03b0c5f1-s.0l76wvqk9d84w.woff2 +0 -0
- package/.next/standalone/.next/static/media/bbc41e54d2fcbd21-s.0k4k9394f2q-k.woff2 +0 -0
- package/.next/standalone/package.json +2 -1
- package/dist/mcp-server.cjs +97 -28
- package/package.json +2 -1
- package/prisma/schema.prisma +1 -0
- package/scripts/fix-native-permissions.js +7 -0
- package/skills/tower/SKILL.md +12 -5
- package/.next/standalone/.next/server/app/_not-found.html +0 -1
- package/.next/standalone/.next/server/app/_not-found.meta +0 -16
- package/.next/standalone/.next/server/app/_not-found.rsc +0 -25
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +0 -25
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +0 -6
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +0 -13
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +0 -5
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +0 -5
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +0 -4
- package/.next/standalone/.next/server/app/index.html +0 -1
- package/.next/standalone/.next/server/app/index.meta +0 -16
- package/.next/standalone/.next/server/app/index.rsc +0 -26
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +0 -6
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +0 -26
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +0 -6
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +0 -13
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +0 -6
- package/.next/standalone/.next/server/app/onboarding.html +0 -1
- package/.next/standalone/.next/server/app/onboarding.meta +0 -15
- package/.next/standalone/.next/server/app/onboarding.rsc +0 -31
- package/.next/standalone/.next/server/app/onboarding.segments/_full.segment.rsc +0 -31
- package/.next/standalone/.next/server/app/onboarding.segments/_head.segment.rsc +0 -6
- package/.next/standalone/.next/server/app/onboarding.segments/_index.segment.rsc +0 -13
- package/.next/standalone/.next/server/app/onboarding.segments/_tree.segment.rsc +0 -6
- package/.next/standalone/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +0 -9
- package/.next/standalone/.next/server/app/onboarding.segments/onboarding.segment.rsc +0 -5
- package/.next/standalone/.next/server/app/settings.html +0 -1
- package/.next/standalone/.next/server/app/settings.meta +0 -15
- package/.next/standalone/.next/server/app/settings.rsc +0 -31
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +0 -31
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +0 -6
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +0 -13
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +0 -6
- package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +0 -9
- package/.next/standalone/.next/server/app/settings.segments/settings.segment.rsc +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06.muv_._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__083ia54._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ad6qqx._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cylhkc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hv-2bi._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hvqdy.._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jg4u05._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0k.hmw2._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ugi0gk._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z50.82._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11_h9vs._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12so59v._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/_0.3p35c._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_059-b~p._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0_z.pz4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0acdkk1._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/_0i8t39l._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0j7t3m6._.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/_0lwcwkm._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0rb.w9u._.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/_0tr1l6m._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0uj61lm._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0yt~8-p._.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/_112.xs5._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0lqfvhm._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0hysyqq._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0mre0hs._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0nokg1l._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0occbql._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0q1is-3._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0s.1_50._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0uof9w0._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0y99vkm._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_119inue._.js +0 -3
- package/.next/standalone/.next/server/pages/404.html +0 -1
- package/.next/standalone/.next/static/chunks/0-7jzlr9x_qsk.js +0 -5
- package/.next/standalone/.next/static/chunks/0.rmtqo0qf0kf.js +0 -1
- package/.next/standalone/.next/static/chunks/00nc85hwc2xj-.js +0 -1
- package/.next/standalone/.next/static/chunks/02rmsyvjctps8.js +0 -1
- package/.next/standalone/.next/static/chunks/03pleaq9wzi71.js +0 -1
- package/.next/standalone/.next/static/chunks/053~sxv8~uet5.js +0 -1
- package/.next/standalone/.next/static/chunks/0_._lea4kj-kf.js +0 -1
- package/.next/standalone/.next/static/chunks/0gs_-avkejs0n.js +0 -1
- package/.next/standalone/.next/static/chunks/0k65.io~ia9.a.js +0 -2
- package/.next/standalone/.next/static/chunks/0m-4oc7p23~5d.js +0 -5
- package/.next/standalone/.next/static/chunks/0o11wn9vopcqg.js +0 -1
- package/.next/standalone/.next/static/chunks/0qc~i8~pr2lr_.js +0 -2
- package/.next/standalone/.next/static/chunks/0v_-pz~6z5kwy.js +0 -1
- package/.next/standalone/.next/static/chunks/0y42pxoc9pqth.js +0 -1
- package/.next/standalone/.next/static/chunks/0y4t-yk9428ag.js +0 -1
- package/.next/standalone/.next/static/chunks/0z.p-s6d729o-.js +0 -1
- package/.next/standalone/.next/static/chunks/0~8mebeyo5uub.css +0 -1
- package/.next/standalone/.next/static/chunks/10_jn899omgp~.js +0 -1
- package/.next/standalone/.next/static/chunks/142u31.7x80ux.js +0 -5
- package/.next/standalone/.next/static/chunks/14ffa1fe.zktf.js +0 -5
- package/.next/standalone/.next/static/chunks/187ga_8mny0dq.js +0 -1
- package/.next/standalone/.next/static/media/4fa387ec64143e14-s.0.qu-9752pffj.woff2 +0 -0
- package/.next/standalone/.next/static/media/5ce348bf30bf5439-s.0ee55_hj9qcer.woff2 +0 -0
- package/.next/standalone/.next/static/media/6306c77e7c8268e4-s.0mao5jbfbduzp.woff2 +0 -0
- package/.next/standalone/.next/static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2 +0 -0
- package/.next/standalone/.next/static/media/7d817b4c03b0c5f1-s.0uzt.a6d44yda.woff2 +0 -0
- package/.next/standalone/.next/static/media/bbc41e54d2fcbd21-s.0mvwgmnhv29no.woff2 +0 -0
- /package/.next/standalone/.next/static/{dUfkElN2NF1kYx7TqxHtX → QK0JGDY3UZSvD1SQgyL-w}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{dUfkElN2NF1kYx7TqxHtX → QK0JGDY3UZSvD1SQgyL-w}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{dUfkElN2NF1kYx7TqxHtX → QK0JGDY3UZSvD1SQgyL-w}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,783426,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),r=e.i(340966),n=e.i(572989);let l=(0,n.default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var i=e.i(486077),o=e.i(533499);function c({totalTasks:e,runningTasks:s}){let{t:a}=(0,o.useI18n)();return(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3 px-6 py-4",children:[(0,t.jsx)("div",{className:"rounded-xl border border-border bg-card p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-sky-500/10 p-2 ring-1 ring-sky-500/20",children:(0,t.jsx)(r.ClipboardList,{className:"h-4 w-4 text-sky-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:a("board.overview")}),(0,t.jsx)("p",{className:"text-2xl font-bold font-mono tracking-tight text-foreground",children:e})]})]})}),(0,t.jsx)("div",{className:"rounded-xl border border-border bg-card p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-primary/10 p-2 ring-1 ring-primary/20",children:(0,t.jsx)(l,{className:"h-4 w-4 text-primary"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:a("board.running")}),(0,t.jsx)("p",{className:"text-2xl font-bold font-mono tracking-tight text-foreground",children:s})]})]})}),(0,t.jsx)("div",{className:"rounded-xl border border-border bg-card p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-emerald-500/10 p-2 ring-1 ring-emerald-500/20",children:(0,t.jsx)(i.Lightbulb,{className:"h-4 w-4 text-emerald-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:a("board.tip")}),(0,t.jsx)("p",{className:"text-xs font-medium text-foreground/80",children:a("board.tipText")})]})]})})]})}var d=e.i(210702),m=e.i(232545),x=e.i(738690),u=e.i(226145),h=e.i(519455),p=e.i(793479),g=e.i(280027);function f({searchQuery:e,onSearchChange:s,versions:a=[],versionFilter:r="all",onVersionFilterChange:n,versionsHref:l,onCreateTask:i}){let c,{t:j}=(0,o.useI18n)(),b="all"===r?j("board.allVersions"):"backlog"===r?j("board.backlogFilter"):(c=a.find(e=>e.id===r))?`${c.number} ${c.name}`:j("board.allVersions");return(0,t.jsxs)("div",{className:"flex items-center gap-2 px-6 py-2",children:[n&&(0,t.jsxs)(g.Select,{value:r,onValueChange:e=>n(e||"all"),children:[(0,t.jsxs)(g.SelectTrigger,{className:"h-8 w-44 shrink-0 gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(u.GitBranch,{className:"h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:b})]}),(0,t.jsxs)(g.SelectContent,{children:[(0,t.jsx)(g.SelectItem,{value:"all",children:j("board.allVersions")}),(0,t.jsx)(g.SelectItem,{value:"backlog",children:j("board.backlogFilter")}),a.map(e=>(0,t.jsxs)(g.SelectItem,{value:e.id,children:[(0,t.jsx)("span",{className:"font-mono",children:e.number})," ",e.name]},e.id))]})]}),(0,t.jsxs)("div",{className:"relative flex-1 max-w-xs",children:[(0,t.jsx)(x.Search,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(p.Input,{type:"text",value:e,onChange:e=>s(e.target.value),placeholder:j("board.searchPlaceholder"),className:"pl-8 pr-3 text-xs"})]}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[l&&(0,t.jsx)(d.default,{href:l,children:(0,t.jsxs)(h.Button,{variant:"outline",className:"h-8 gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(u.GitBranch,{className:"h-3.5 w-3.5"}),j("version.timeline")]})}),(0,t.jsxs)(h.Button,{"data-tour":"create-task",variant:"outline",className:"gap-1.5 border-border text-xs text-muted-foreground hover:border-primary/30 hover:text-primary",onClick:i,children:[(0,t.jsx)(m.Plus,{className:"h-3.5 w-3.5"}),j("board.newTask")]})]})]})}var j=e.i(585012),b=e.i(597746),N=e.i(685149);function v({x:e,y:r,taskId:n,currentStatus:l,hasExecutions:i,workspaceId:c,onClose:d,onStatusChange:m,onLaunch:x}){let{t:u}=(0,o.useI18n)(),h=(0,a.useRouter)(),p=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&d()},t=e=>{"Escape"===e.key&&d()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[d]);let g="flex items-center px-3 py-1.5 text-xs cursor-pointer hover:bg-accent rounded-sm w-full text-left",f=(0,t.jsxs)("div",{ref:p,style:{position:"fixed",top:r,left:e,zIndex:9999},className:"bg-popover border border-border rounded-md shadow-md py-1 min-w-[180px]",children:[(0,t.jsx)("div",{className:"px-3 py-1 text-[10px] text-muted-foreground uppercase tracking-wider",children:u("board.contextMenu.changeStatus")}),N.BOARD_COLUMNS.map(e=>(0,t.jsxs)("button",{type:"button",className:g,onClick:()=>{m(n,e.id),d()},children:[l===e.id?(0,t.jsx)(b.Check,{className:"h-3 w-3 mr-2 flex-shrink-0"}):(0,t.jsx)("span",{className:"w-5 flex-shrink-0"}),e.label]},e.id)),(0,t.jsx)("hr",{className:"my-1 border-border"}),(0,t.jsx)("button",{type:"button",className:`${g} ${i?"opacity-50 cursor-not-allowed":""}`,disabled:i,onClick:()=>{i||(x(n),d())},children:u("board.contextMenu.launch")}),"DONE"!==l&&"CANCELLED"!==l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{className:"my-1 border-border"}),(0,t.jsx)("button",{type:"button",className:g,onClick:()=>{h.push(`/workspaces/${c}/tasks/${n}`),d()},children:u("board.contextMenu.goToDetail")})]})]});return"u"<typeof document?null:(0,j.createPortal)(f,document.body)}var k=e.i(720247),y=e.i(775712);let w=(0,n.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);var C=e.i(67013),S=e.i(49007),T=e.i(464249),P=e.i(998626);let I=(0,n.default)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);var E=e.i(487486),D=e.i(746798),L=e.i(755146),B=e.i(35967);function F({task:e,onClick:s,onEdit:a,onDelete:r,onTogglePin:n,onContextMenu:l}){let{t:i}=(0,o.useI18n)(),{attributes:c,listeners:d,setNodeRef:m,transform:x,transition:p,isDragging:g}=(0,y.useSortable)({id:e.id,data:{type:"task",task:e}}),f={transform:C.CSS.Transform.toString(x),transition:p,opacity:g?.4:1},j=N.PRIORITY_CONFIG[e.priority],b=!!e.baseBranch;return(0,t.jsxs)("div",{ref:m,style:f,...c,...d,className:"group cursor-grab rounded-lg border border-border bg-card p-3 transition-all hover:border-primary/20 hover:bg-accent/50 active:cursor-grabbing",onClick:s,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),l?.(e,t.clientX,t.clientY)},"data-testid":"task-card",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-foreground",children:e.title}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",className:`transition-all ${e.pinned?"text-primary opacity-100":"text-muted-foreground opacity-0 group-hover:opacity-100"}`,onClick:t=>{t.stopPropagation(),n?.(e.id)},"aria-label":i(e.pinned?"board.unpin":"board.pin"),children:(0,t.jsx)(I,{className:`h-3.5 w-3.5 ${e.pinned?"-rotate-45":""}`})}),(0,t.jsxs)(L.DropdownMenu,{children:[(0,t.jsx)(L.DropdownMenuTrigger,{render:(0,t.jsx)("button",{className:"rounded-md p-0.5 text-muted-foreground opacity-0 transition-all hover:bg-background hover:text-foreground group-hover:opacity-100",onClick:e=>e.stopPropagation()}),children:(0,t.jsx)(S.MoreHorizontal,{className:"h-4 w-4"})}),(0,t.jsxs)(L.DropdownMenuContent,{align:"end",children:[(0,t.jsxs)(L.DropdownMenuItem,{onClick:t=>{t.stopPropagation(),a?.(e)},children:[(0,t.jsx)(T.Pencil,{className:"mr-2 h-3.5 w-3.5"}),i("common.edit")]}),(0,t.jsxs)(L.DropdownMenuItem,{className:"text-rose-400",onClick:t=>{t.stopPropagation(),r?.(e.id)},children:[(0,t.jsx)(P.Trash2,{className:"mr-2 h-3.5 w-3.5"}),i("common.delete")]})]})]})]})]}),e.description&&(0,t.jsx)("p",{className:"mt-1.5 line-clamp-3 text-xs leading-relaxed text-muted-foreground",children:e.description}),(0,t.jsxs)("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(E.Badge,{variant:"secondary",className:`text-[10px] font-semibold ${j.color}`,children:j.label}),e.labels?.map(e=>(0,t.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:e.label.color+"20",color:e.label.color},children:e.label.name},e.label.id)),(b||e.version)&&(0,t.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[b&&(0,t.jsxs)(D.Tooltip,{disableHoverablePopup:!0,children:[(0,t.jsx)(D.TooltipTrigger,{render:(0,t.jsx)("span",{className:"inline-flex cursor-default items-center rounded-md border border-border bg-muted px-1 py-0.5 text-muted-foreground",onPointerDown:e=>e.stopPropagation(),children:(0,t.jsx)(u.GitBranch,{className:"h-2.5 w-2.5 shrink-0"})})}),(0,t.jsx)(D.TooltipContent,{side:"top",children:i("board.card.worktree",{branch:e.baseBranch??""})})]}),e.version&&(0,t.jsxs)(D.Tooltip,{disableHoverablePopup:!0,children:[(0,t.jsx)(D.TooltipTrigger,{render:(0,t.jsx)("span",{className:"cursor-default",onPointerDown:e=>e.stopPropagation(),children:(0,t.jsx)(B.TaskVersionTag,{number:e.version.number,title:""})})}),(0,t.jsx)(D.TooltipContent,{side:"top",children:i("board.card.version",{number:e.version.number,name:e.version.name})})]})]})]})]})}var R=e.i(776639),A=e.i(759684);function O({open:e,onOpenChange:s,columnLabel:a,columnColor:r,tasks:n,onTaskClick:l}){let{t:i}=(0,o.useI18n)();return(0,t.jsx)(R.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(R.DialogContent,{className:"sm:max-w-6xl max-h-[80vh]",children:[(0,t.jsx)(R.DialogHeader,{children:(0,t.jsxs)(R.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:`h-2.5 w-2.5 rounded-full ${r}`}),(0,t.jsx)("span",{children:a}),(0,t.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-xs font-mono font-medium text-muted-foreground",children:n.length})]})}),(0,t.jsx)(A.ScrollArea,{className:"max-h-[680px]",children:(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-3 pr-3",children:[n.map(e=>{let a=N.PRIORITY_CONFIG[e.priority];return(0,t.jsxs)("div",{className:"cursor-pointer rounded-lg border border-border bg-card p-3 transition-all hover:border-primary/20 hover:bg-accent/50",onClick:()=>{l?.(e),s(!1)},children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-foreground line-clamp-2",children:e.title}),e.description&&(0,t.jsx)("p",{className:"mt-1.5 line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:e.description}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-1.5 flex-wrap",children:[(0,t.jsx)(E.Badge,{variant:"secondary",className:`text-[10px] font-semibold ${a.color}`,children:a.label}),e.labels?.map(e=>(0,t.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:e.label.color+"20",color:e.label.color},children:e.label.name},e.label.id))]})]},e.id)}),0===n.length&&(0,t.jsx)("div",{className:"col-span-4 py-8 text-center text-sm text-muted-foreground",children:i("board.noTasks")})]})})]})})}function M({id:e,label:a,color:r,tasks:n,onTaskClick:l,onEditTask:i,onAddTask:c,onDeleteTask:d,onTogglePin:x,onContextMenu:u}){let{setNodeRef:p,isOver:g}=(0,k.useDroppable)({id:e}),[f,j]=(0,s.useState)(!1),{t:b}=(0,o.useI18n)();return(0,t.jsxs)("div",{className:`flex w-0 min-w-[220px] flex-1 flex-col min-h-0 border-r border-border/50 last:border-r-0 transition-colors ${g?"bg-primary/[0.06]":""}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2.5 border-b border-border/30",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:`h-2 w-2 rounded-full ${r}`}),(0,t.jsx)("span",{className:"text-xs font-semibold tracking-wide text-secondary-foreground",children:a}),(0,t.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-mono font-medium text-muted-foreground",children:n.length})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>j(!0),className:"text-muted-foreground","aria-label":b("board.viewAll"),children:(0,t.jsx)(w,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:c,className:"text-muted-foreground","aria-label":"add",children:(0,t.jsx)(m.Plus,{className:"h-3.5 w-3.5"})})]})]}),(0,t.jsx)(O,{open:f,onOpenChange:j,columnLabel:a,columnColor:r,tasks:n,onTaskClick:l}),(0,t.jsx)(A.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)("div",{ref:p,className:"flex flex-col gap-2 p-2",children:(0,t.jsx)(y.SortableContext,{items:n.map(e=>e.id),strategy:y.verticalListSortingStrategy,children:n.map(e=>(0,t.jsx)(F,{task:e,onClick:()=>l?.(e),onEdit:i,onDelete:d,onTogglePin:x,onContextMenu:u},e.id))})})})]})}function $({initialTasks:e,onTaskMove:a,onTaskClick:r,onEditTask:n,onAddTask:l,onDeleteTask:i,onTogglePin:o,onContextMenuStatusChange:c,onContextMenuLaunch:d,workspaceId:m}){let[x,u]=(0,s.useState)(e),[h,p]=(0,s.useState)(null),[g,f]=(0,s.useState)(null);(0,s.useEffect)(()=>{u(e)},[e]);let j=(0,k.useSensors)((0,k.useSensor)(k.PointerSensor,{activationConstraint:{distance:8}})),b=(0,s.useCallback)((e,t,s)=>{f({task:e,x:t,y:s})},[]),y=(0,s.useCallback)(e=>{let t=x.find(t=>t.id===e.active.id);t&&p(t)},[x]),w=(0,s.useCallback)(e=>{let t,{active:s,over:r}=e;if(p(null),!r)return;let n=s.id,l=r.id;if(N.BOARD_COLUMNS.some(e=>e.id===l))t=l;else{let e=x.find(e=>e.id===l);t=e?.status}t&&(u(e=>e.map(e=>e.id===n?{...e,status:t}:e)),a?.(n,t))},[x,a]);return(0,t.jsxs)(k.DndContext,{id:"kanban-board",sensors:j,collisionDetection:k.closestCorners,onDragStart:y,onDragEnd:w,children:[(0,t.jsx)("div",{className:"mx-2 flex h-full overflow-x-auto rounded-xl border border-border bg-card/50",children:N.BOARD_COLUMNS.map(e=>(0,t.jsx)(M,{id:e.id,label:e.label,color:e.color,tasks:x.filter(t=>t.status===e.id),onTaskClick:r,onEditTask:n,onAddTask:()=>l?.(e.id),onDeleteTask:i,onTogglePin:o,onContextMenu:b},e.id))}),(0,t.jsx)(k.DragOverlay,{children:h?(0,t.jsx)("div",{className:"rotate-3 scale-105",children:(0,t.jsx)(F,{task:h})}):null}),g&&(0,t.jsx)(v,{x:g.x,y:g.y,taskId:g.task.id,currentStatus:g.task.status,hasExecutions:(g.task._count?.executions??0)>0,workspaceId:m??"",onClose:()=>f(null),onStatusChange:(e,t)=>{c?.(e,t),f(null)},onLaunch:e=>{d?.(e),f(null)}})]})}var z=e.i(744798),U=e.i(232280),G=e.i(368490),W=e.i(645378),V=e.i(453889);let _=(0,n.default)("git-commit-vertical",[["path",{d:"M12 3v6",key:"1holv5"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M12 15v6",key:"a9ows0"}]]);var H=e.i(938499),K=e.i(400355),Y=e.i(233274),q=e.i(736061),J=e.i(460707),X=e.i(567860),Q=e.i(875840),Z=e.i(624687),ee=e.i(514798);let et=(0,ee.createServerReference)("60d96729d37481304ce6156c227b593155e817f078",ee.callServer,void 0,ee.findSourceMapURL,"updateProject");var es=e.i(958735);let ea=(0,ee.createServerReference)("4082f3efb288761c5f251b36fc6721f7269ac6492a",ee.callServer,void 0,ee.findSourceMapURL,"deleteProject"),er=(0,ee.createServerReference)("40fe3aa7bc2326c6a4b056afc9ed7d44b6d1f2c0e9",ee.callServer,void 0,ee.findSourceMapURL,"getRecentLocalProjects"),en=(0,ee.createServerReference)("402f12a5c8befd86b1a80847c2c204acd1be2dc265",ee.callServer,void 0,ee.findSourceMapURL,"getOrCreateTowerTaskId");var el=e.i(453930),ei=e.i(977998),eo=e.i(786508),ec=e.i(21108),ed=e.i(360112),em=e.i(224277),ex=e.i(905455);function eu({commits:e}){let{t:a}=(0,o.useI18n)(),[r,n]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{onClick:()=>n(!r),className:"flex w-full items-center justify-between py-1",children:[(0,t.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:a("git.commitLog")}),r?(0,t.jsx)(U.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,t.jsx)(G.ChevronRight,{className:"h-3 w-3 text-muted-foreground"})]}),r&&(0,t.jsx)("div",{className:"mt-1.5 space-y-0.5 max-h-64 overflow-y-auto",children:e.map(e=>(0,t.jsxs)("div",{className:"group flex items-start gap-2 rounded-md px-2 py-1.5 hover:bg-accent transition-colors",children:[(0,t.jsx)(_,{className:"h-3 w-3 shrink-0 text-muted-foreground mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-xs text-foreground line-clamp-1",children:e.message}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText(e.shortHash),ed.toast.success(`Copied ${e.shortHash}`)},className:"flex items-center gap-0.5 font-mono text-[10px] text-primary/70 hover:text-primary transition-colors",children:[e.shortHash,(0,t.jsx)(Q.Copy,{className:"h-2.5 w-2.5 opacity-0 group-hover:opacity-100 transition-opacity"})]}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.author}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:function(e){let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m`;let s=Math.floor(t/60);if(s<24)return`${s}h`;let a=Math.floor(s/24);return a<30?`${a}d`:`${Math.floor(a/30)}mo`}(e.date)})]})]})]},e.hash))})]})}var eh=e.i(487278),ep=e.i(375306),eg=e.i(244354);function ef({localPath:e,stashes:a,hasChanges:r,onRefresh:n}){let{t:l}=(0,o.useI18n)(),[i,c]=(0,s.useState)(!1),[d,m]=(0,s.useState)(!1),[x,u]=(0,s.useState)(""),[g,f]=(0,s.useState)(null),j=async()=>{m(!0);try{await (0,eg.gitAction)(e,"stash-save",{message:x}),u(""),ed.toast.success(l("git.stashSaved")),await n()}catch(e){ed.toast.error(e instanceof Error?e.message:String(e))}finally{m(!1)}},b=async t=>{f(t);try{await (0,eg.gitAction)(e,"stash-pop",{index:t}),ed.toast.success(l("git.stashApplied")),await n()}catch(e){ed.toast.error(e instanceof Error?e.message:String(e))}finally{f(null)}},N=async t=>{f(t);try{await (0,eg.gitAction)(e,"stash-drop",{index:t}),ed.toast.success(l("git.stashDropped")),await n()}catch(e){ed.toast.error(e instanceof Error?e.message:String(e))}finally{f(null)}};return r||0!==a.length?(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{onClick:()=>c(!i),className:"flex w-full items-center justify-between py-1",children:[(0,t.jsxs)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:[l("git.stash")," ",a.length>0&&`(${a.length})`]}),i?(0,t.jsx)(U.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,t.jsx)(G.ChevronRight,{className:"h-3 w-3 text-muted-foreground"})]}),i&&(0,t.jsxs)("div",{className:"mt-1.5 space-y-2",children:[r&&(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)(p.Input,{value:x,onChange:e=>u(e.target.value),placeholder:l("git.stashMsgPlaceholder"),className:"h-7 text-xs flex-1",onKeyDown:e=>"Enter"===e.key&&j()}),(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:j,disabled:d,className:"shrink-0",children:d?(0,t.jsx)(K.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(eh.Archive,{className:"h-3 w-3"})})]}),a.length>0&&(0,t.jsx)("div",{className:"space-y-0.5",children:a.map(e=>(0,t.jsxs)("div",{className:"group flex items-center gap-2 rounded-md px-2 py-1.5 hover:bg-accent transition-colors",children:[(0,t.jsx)(eh.Archive,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 min-w-0 truncate text-xs text-foreground",children:e.message||`stash@{${e.index}}`}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>b(e.index),disabled:g===e.index,className:"text-muted-foreground","aria-label":l("git.stashApply"),children:g===e.index?(0,t.jsx)(K.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(ep.ArrowUpFromLine,{className:"h-3 w-3"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>N(e.index),disabled:g===e.index,className:"text-rose-400","aria-label":l("git.stashDrop"),children:(0,t.jsx)(P.Trash2,{className:"h-3 w-3"})})]})]},e.index))})]})]}):null}var ej=e.i(515135);function eb({value:e,ariaLabel:a}){let{t:r}=(0,o.useI18n)(),[n,l]=(0,s.useState)(!1),i=async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}l(!0),ed.toast.success(r("common.copied")),setTimeout(()=>l(!1),1500)}catch{ed.toast.error(r("common.copyFailed"))}};return(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-border bg-muted/50 pl-3 pr-1 py-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",title:e,children:e}),(0,t.jsxs)(D.Tooltip,{children:[(0,t.jsx)(D.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",className:"shrink-0 text-muted-foreground","aria-label":a,onClick:i,children:n?(0,t.jsx)(b.Check,{className:"h-3 w-3 text-emerald-400"}):(0,t.jsx)(Q.Copy,{className:"h-3 w-3"})})}),(0,t.jsx)(D.TooltipContent,{children:n?r("common.copied"):r("common.copy")})]})]})}function eN({project:e,workspaceId:r}){let{t:n,locale:l}=(0,o.useI18n)(),i=(0,a.useRouter)(),[c,d]=(0,s.useState)(!0),[m,x]=(0,s.useState)(!0),[g,f]=(0,s.useState)(!1),[j,b]=(0,s.useState)(!1),[N,v]=(0,s.useState)(""),[k,y]=(0,s.useState)(!1),[w,C]=(0,s.useState)(!1),[S,I]=(0,s.useState)(!1),[E,L]=(0,s.useState)(e.name),[B,F]=(0,s.useState)(e.alias??""),[A,O]=(0,s.useState)(e.description??""),[M,$]=(0,s.useState)(e.localPath??""),[z,Q]=(0,s.useState)(e.projectType??"FRONTEND"),[ee,eh]=(0,s.useState)([]);(0,s.useEffect)(()=>{er(100).then(eh)},[]);let[ep,eg]=(0,s.useState)(!1),[ev,ek]=(0,s.useState)(""),[ey,ew]=(0,s.useState)(""),[eC,eS]=(0,s.useState)(""),[eT,eP]=(0,s.useState)(""),[eI,eE]=(0,s.useState)("FRONTEND"),[eD,eL]=(0,s.useState)(!1),[eB,eF]=(0,s.useState)(!1),[eR,eA]=(0,s.useState)(null),[eO,eM]=(0,s.useState)(!1),[e$,ez]=(0,s.useState)(!1),eU=e=>{ed.toast.info(e)},eG=(0,s.useCallback)(async()=>{if(e.localPath){eM(!0);try{let t=await fetch(`/api/git?path=${encodeURIComponent(e.localPath)}`);t.ok&&eA(await t.json())}catch{}finally{eM(!1)}}},[e.localPath]);(0,s.useEffect)(()=>{eG()},[eG]);let eW=async()=>{if(e.localPath){ez(!0);try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"init",path:e.localPath})})).ok?(eU(n("git.initSuccess")),await eG()):eU(n("git.initFailed"))}catch{eU(n("git.initFailed"))}finally{ez(!1)}}},eV=(e,t)=>{i.push(`/workspaces/${e}?projectId=${t}`,{scroll:!1}),i.refresh()},e_=async()=>{if(ey.trim()){eL(!0);try{let e=await (0,es.createProject)({name:ey.trim(),alias:eC.trim()||void 0,description:eT.trim()||void 0,localPath:ev,projectType:eI,workspaceId:r});eg(!1),eV(r,e.id)}catch(e){ed.toast.error(e instanceof Error?e.message:String(e))}finally{eL(!1)}}},eH=async()=>{if(M&&!eB){eF(!0);try{let e=await (0,ec.analyzeProjectDirectory)(M.trim(),l);O(e)}catch{ed.toast.error(n("project.analyzeError"))}finally{eF(!1)}}},eK=async()=>{try{await et(e.id,{name:E.trim(),alias:B.trim()||void 0,description:A.trim()||void 0,localPath:M.trim()||void 0,projectType:z}),i.refresh(),f(!1)}catch(e){ed.toast.error(e instanceof Error?e.message:String(e))}};return(0,t.jsxs)("aside",{className:"relative w-72 flex-shrink-0 overflow-y-auto border-l border-border bg-sidebar",children:[(0,t.jsxs)("div",{className:"border-b border-border p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h2",{className:"text-base font-semibold text-foreground",children:e.name}),e.alias&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.alias})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{L(e.name),F(e.alias??""),O(e.description??""),$(e.localPath??""),f(!0)},className:"text-muted-foreground",children:(0,t.jsx)(T.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{v(""),b(!0)},className:"text-muted-foreground hover:text-rose-400",children:(0,t.jsx)(P.Trash2,{className:"h-3.5 w-3.5"})})]})]}),e.description&&(0,t.jsx)("p",{className:"mt-2 text-sm text-secondary-foreground leading-relaxed line-clamp-4",children:e.description}),(0,t.jsx)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:(0,t.jsx)("span",{className:`inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[11px] font-medium ${"GIT"===e.type?"bg-sky-500/15 text-sky-300 ring-1 ring-sky-500/20":"bg-muted text-muted-foreground ring-1 ring-border"}`,children:"GIT"===e.type?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.GitBranch,{className:"h-3 w-3"}),n("sidebar.right.gitType")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W.FileText,{className:"h-3 w-3"}),n("sidebar.right.normalType")]})})}),(e.localPath||e.gitUrl)&&(0,t.jsxs)("div",{className:"mt-3 space-y-1.5",children:[e.localPath&&(0,t.jsx)(eb,{value:e.localPath,ariaLabel:n("project.localPath")}),e.gitUrl&&(0,t.jsx)(eb,{value:e.gitUrl,ariaLabel:n("project.gitUrl")})]}),e.localPath&&(0,t.jsxs)("div",{className:"mt-3 space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(D.Tooltip,{children:[(0,t.jsx)(D.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:async()=>{try{await (0,el.openInFileManager)(e.localPath)}catch(e){console.error("openInFileManager failed:",e),ed.toast.error(n("git.openInFileManagerFailed"))}},children:(0,t.jsx)(q.FolderSearch,{className:"h-4 w-4"})})}),(0,t.jsx)(D.TooltipContent,{children:n("git.openInFileManager")})]}),(0,t.jsxs)(D.Tooltip,{children:[(0,t.jsx)(D.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:async()=>{try{await (0,ei.openInEditor)(e.localPath)}catch(e){console.error("openInEditor failed:",e),ed.toast.error(n("git.openInEditorFailed"))}},children:(0,t.jsx)(J.Code,{className:"h-4 w-4"})})}),(0,t.jsx)(D.TooltipContent,{children:n("git.openInEditor")})]}),(0,t.jsxs)(D.Tooltip,{children:[(0,t.jsx)(D.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:async()=>{try{await (0,eo.openInTerminal)(e.localPath)}catch(e){console.error("openInTerminal failed:",e),ed.toast.error(n("git.openInTerminalFailed"))}},children:(0,t.jsx)(X.Terminal,{className:"h-4 w-4"})})}),(0,t.jsx)(D.TooltipContent,{children:n("git.openInTerminal")})]})]}),(0,t.jsxs)(h.Button,{variant:"outline",className:"w-full h-9 gap-1.5 text-xs",disabled:w,onClick:async()=>{C(!0);try{let t=await en(e.id);i.push(`/workspaces/${r}/tasks/${t}`)}catch{ed.toast.error(n("git.openStudioFailed"))}finally{C(!1)}},children:[w?(0,t.jsx)(K.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(V.FolderOpen,{className:"h-3.5 w-3.5"}),n("git.openStudio")]})]})]}),(0,t.jsxs)("div",{className:"border-b border-border p-4",children:[(0,t.jsxs)(h.Button,{variant:"ghost",onClick:()=>d(!c),className:"flex w-full cursor-pointer justify-between px-2 py-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:n("git.section")}),c?(0,t.jsx)(U.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(G.ChevronRight,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),c&&(0,t.jsx)("div",{className:"mt-3",children:e.localPath?eO?(0,t.jsxs)("div",{className:"flex items-center justify-center py-4 text-muted-foreground",children:[(0,t.jsx)(K.Loader2,{className:"h-4 w-4 animate-spin"}),(0,t.jsx)("span",{className:"ml-2 text-xs",children:n("git.loading")})]}):eR&&!eR.isGit?(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/50 p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(H.AlertCircle,{className:"h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"text-xs",children:n("git.notInitialized")})]}),(0,t.jsxs)(h.Button,{className:"mt-3 h-7 w-full gap-1.5 bg-primary/10 text-xs text-primary ring-1 ring-primary/20 hover:bg-primary/15",onClick:eW,disabled:e$,children:[e$?(0,t.jsx)(K.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(_,{className:"h-3 w-3"}),n("git.initRepo")]})]}):eR?.isGit?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"overflow-hidden h-[560px] flex flex-col",children:(0,t.jsx)(ej.EditorGitPanel,{localPath:e.localPath,mode:"project"})}),(0,t.jsx)(eu,{commits:eR.commits??[]}),(0,t.jsx)(ef,{localPath:e.localPath,stashes:eR.stashes??[],hasChanges:(eR.changedFiles??[]).length>0,onRefresh:eG})]}):null:(0,t.jsx)("div",{className:"rounded-lg border border-border bg-muted/50 p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(H.AlertCircle,{className:"h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"text-xs",children:n("git.noLocalPath")})]})})})]}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)(h.Button,{variant:"ghost",onClick:()=>x(!m),className:"flex w-full cursor-pointer justify-between px-2 py-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:n("sidebar.right.browseRepo")}),m?(0,t.jsx)(U.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(G.ChevronRight,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),m&&(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,t.jsxs)(h.Button,{variant:"outline",className:"w-full h-8 gap-1.5 text-xs",onClick:()=>I(!0),children:[(0,t.jsx)(V.FolderOpen,{className:"h-3.5 w-3.5"}),n("sidebar.right.browseRepo")]}),ee.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5 px-1",children:n("sidebar.right.recent")}),(0,t.jsx)("div",{className:"space-y-0.5",children:ee.map(s=>(0,t.jsxs)("button",{onClick:()=>{s.id!==e.id&&eV(s.workspaceId,s.id)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left transition-colors ${s.id===e.id?"bg-primary/10 text-primary cursor-default":"hover:bg-accent cursor-pointer"}`,children:["GIT"===s.type?(0,t.jsx)(u.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}):(0,t.jsx)(V.FolderOpen,{className:"h-3 w-3 shrink-0 text-primary/70"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-xs font-medium text-foreground",children:s.name}),s.localPath&&(0,t.jsx)("p",{className:"truncate text-[10px] font-mono text-muted-foreground",children:s.localPath})]})]},s.id))})]})]})]}),(0,t.jsx)(R.Dialog,{open:g,onOpenChange:f,children:(0,t.jsxs)(R.DialogContent,{style:{maxWidth:"32rem"},children:[(0,t.jsx)(R.DialogHeader,{children:(0,t.jsx)(R.DialogTitle,{children:n("project.edit")})}),(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:n("project.name")}),(0,t.jsx)(p.Input,{value:E,onChange:e=>L(e.target.value),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.type.label")}),(0,t.jsx)("div",{className:"mt-1.5",children:(0,t.jsx)(ex.SegmentedControl,{options:[{value:"FRONTEND",label:n("project.type.frontend")},{value:"BACKEND",label:n("project.type.backend")}],value:z,onChange:Q})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.alias")}),(0,t.jsx)(p.Input,{value:B,onChange:e=>F(e.target.value),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.description")}),(0,t.jsxs)(h.Button,{type:"button",variant:"ghost",onClick:eH,className:`h-6 gap-1 px-2 text-[11px] text-muted-foreground hover:text-foreground ${!M||eB?"opacity-50":""}`,children:[eB?(0,t.jsx)(K.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(Y.Sparkles,{className:"h-3 w-3"}),eB?n("project.analyzing"):n("project.genDesc")]})]}),(0,t.jsx)(Z.Textarea,{value:A,onChange:e=>O(e.target.value),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 max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.localPath")}),(0,t.jsx)("div",{className:"mt-1.5 break-all rounded-md border border-border bg-muted/50 px-3 py-2 font-mono text-xs text-muted-foreground",children:M||"—"})]})]}),(0,t.jsxs)(R.DialogFooter,{children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>f(!1),children:n("common.cancel")}),(0,t.jsx)(h.Button,{onClick:eK,disabled:!E.trim()||eB,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:n("common.save")})]})]})}),(0,t.jsx)(em.FolderBrowserDialog,{open:S,onOpenChange:I,onSelect:e=>{g?$(e):(e=>{let t=ee.find(t=>t.localPath===e);if(t)return eV(t.workspaceId,t.id);let s=e.split("/").filter(Boolean).pop()??"";ek(e),ew(s),eS(""),eP(""),eg(!0)})(e)}}),(0,t.jsx)(R.Dialog,{open:ep,onOpenChange:eg,children:(0,t.jsxs)(R.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(R.DialogHeader,{children:(0,t.jsx)(R.DialogTitle,{children:n("topbar.newProject")})}),(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:n("project.localPath")}),(0,t.jsx)("div",{className:"mt-1.5 rounded-md border border-border bg-muted/50 px-3 py-2 font-mono text-xs text-muted-foreground",children:ev})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.name")}),(0,t.jsx)(p.Input,{value:ey,onChange:e=>ew(e.target.value),placeholder:n("project.namePlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.type.label")}),(0,t.jsx)("div",{className:"mt-1.5",children:(0,t.jsx)(ex.SegmentedControl,{options:[{value:"FRONTEND",label:n("project.type.frontend")},{value:"BACKEND",label:n("project.type.backend")}],value:eI,onChange:eE})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.alias")}),(0,t.jsx)(p.Input,{value:eC,onChange:e=>eS(e.target.value),placeholder:n("project.aliasPlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.description")}),(0,t.jsx)(Z.Textarea,{value:eT,onChange:e=>eP(e.target.value),placeholder:n("project.descPlaceholder"),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)(R.DialogFooter,{children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>eg(!1),children:n("common.cancel")}),(0,t.jsxs)(h.Button,{onClick:e_,disabled:!ey.trim()||eD,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[eD?(0,t.jsx)(K.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,n("common.create")]})]})]})}),(0,t.jsx)(R.Dialog,{open:j,onOpenChange:e=>{b(e),e||v("")},children:(0,t.jsxs)(R.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(R.DialogHeader,{children:(0,t.jsx)(R.DialogTitle,{className:"text-rose-400",children:n("project.deleteTitle")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("project.deleteWarning",{name:e.name})}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("project.deleteIrreversible")}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.deleteConfirmLabel")}),(0,t.jsx)(p.Input,{value:N,onChange:e=>v(e.target.value),placeholder:n("project.deleteConfirmPlaceholder"),className:"mt-1.5",autoFocus:!0})]})]}),(0,t.jsxs)(R.DialogFooter,{children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>b(!1),children:n("common.cancel")}),(0,t.jsxs)(h.Button,{variant:"destructive",disabled:N!==n("project.deleteConfirmText")||k,onClick:async()=>{y(!0);try{await ea(e.id),ed.toast.success(n("project.deleteSuccess")),i.push(`/workspaces/${r}`)}catch{ed.toast.error(n("project.deleteFailed"))}finally{y(!1),b(!1)}},children:[k&&(0,t.jsx)(K.Loader2,{className:"h-3 w-3 animate-spin mr-1"}),n("project.deleteButton")]})]})]})})]})}var ev=e.i(475958),ek=e.i(313029),ey=e.i(301348),ew=e.i(259846),eC=e.i(975157);function eS({title:e,description:s,branch:a,baseBranch:r,version:n,hasConversation:l,updatedAt:i,openDir:c,onBack:d}){let{t:m}=(0,o.useI18n)();return(0,t.jsxs)("div",{className:"border-b border-border px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Y.Sparkles,{className:"h-3.5 w-3.5 text-primary"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-primary",children:m("taskDetail.title")})]}),(0,t.jsxs)(h.Button,{variant:"ghost",onClick:d,className:"flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground h-auto px-2 py-1",children:[(0,t.jsx)(ew.ArrowLeft,{className:"h-3.5 w-3.5"}),m("taskDetail.back")]})]}),(0,t.jsx)("h2",{className:"mt-2.5 text-lg font-bold tracking-tight text-foreground",children:e}),s&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-2",children:s}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[r?(0,t.jsxs)(E.Badge,{variant:"secondary",className:"bg-muted text-muted-foreground text-[10px] font-mono border border-border",children:[(0,t.jsx)(u.GitBranch,{className:"mr-1 h-3 w-3"}),r," · worktree"]}):a?(0,t.jsx)(E.Badge,{variant:"secondary",className:"bg-muted text-muted-foreground text-[10px] font-mono border border-border",children:m("taskDetail.directMode")}):null,n&&(0,t.jsx)(B.TaskVersionTag,{number:n.number,name:n.name,showName:!0}),l&&(0,t.jsx)(E.Badge,{variant:"secondary",className:"bg-emerald-500/10 text-emerald-400 text-[10px] border border-emerald-500/20",children:m("taskDetail.hasConversation")}),(0,t.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:[m("taskDetail.updatedAt")," ",(0,eC.formatRelativeTime)(i)]}),c&&(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-0.5",children:[(0,t.jsxs)(D.Tooltip,{children:[(0,t.jsx)(D.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:async()=>{try{await (0,el.openInFileManager)(c)}catch(e){console.error("openInFileManager failed:",e),ed.toast.error(m("git.openInFileManagerFailed"))}},children:(0,t.jsx)(q.FolderSearch,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(D.TooltipContent,{side:"bottom",children:m("git.openInFileManager")})]}),(0,t.jsxs)(D.Tooltip,{children:[(0,t.jsx)(D.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:async()=>{try{await (0,ei.openInEditor)(c)}catch(e){console.error("openInEditor failed:",e),ed.toast.error(m("git.openInEditorFailed"))}},children:(0,t.jsx)(J.Code,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(D.TooltipContent,{side:"bottom",children:m("git.openInEditor")})]}),(0,t.jsxs)(D.Tooltip,{children:[(0,t.jsx)(D.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:async()=>{try{await (0,eo.openInTerminal)(c)}catch(e){console.error("openInTerminal failed:",e),ed.toast.error(m("git.openInTerminalFailed"))}},children:(0,t.jsx)(X.Terminal,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(D.TooltipContent,{side:"bottom",children:m("git.openInTerminal")})]})]})]})]})}var eT=e.i(14842),eP=e.i(865514),eI=e.i(83434),eE=e.i(849021),eD=e.i(752299),eL=e.i(420101),eB=e.i(695314),eF=e.i(753073),eR=e.i(974507),eA=e.i(905523),eO=e.i(619658),eM=e.i(719329),e$=e.i(326883),ez=e.i(631675);let eU=(0,n.default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);var eG=e.i(657153),eW=e.i(867533),eV=e.i(700116);let e_=(0,ee.createServerReference)("4066df49877116ac7cb3a8d3a38dbc5198056ab415",ee.callServer,void 0,ee.findSourceMapURL,"getTaskNotes");var eH=e.i(364931);let eK=(0,ee.createServerReference)("40385c786a7a133d7b81c4c068fb0d9c036374ccc2",ee.callServer,void 0,ee.findSourceMapURL,"getTaskAssets");var eY=e.i(292905),eq=e.i(956618),eJ=e.i(235357),eX=e.i(144640),eQ=e.i(937304);let eZ=/\.(txt|md|json)$/i;function e0({taskId:e,projectId:a}){let{t:r}=(0,o.useI18n)(),n=(0,s.useRef)(null),[l,i]=(0,s.useState)([]),[c,d]=(0,s.useState)([]),[x,u]=(0,s.useState)(!1),[p,g]=(0,s.useState)(""),[f,j]=(0,s.useState)(""),[b,N]=(0,s.useState)(!1),[v,k]=(0,s.useState)(null);async function y(){p.trim()&&(await (0,eV.createNote)({title:p.trim(),content:f.trim(),projectId:a,taskId:e,category:"task"}),g(""),j(""),u(!1),e_(e).then(i))}async function w(e){await (0,eH.deleteNote)(e),i(t=>t.filter(t=>t.id!==e))}async function C(t){let s=t.target.files?.[0];if(s){N(!0);try{let t=new FormData;t.set("file",s),t.set("projectId",a),t.set("taskId",e),await (0,eY.uploadAsset)(t),eK(e).then(d)}finally{N(!1),n.current&&(n.current.value="")}}}async function S(e){await (0,eq.deleteAsset)(e),d(t=>t.filter(t=>t.id!==e))}function T(e){return(0,eQ.isImageAsset)(e.filename,e.mimeType)||eZ.test(e.filename)}function I(e){T(e)?k(e):ed.toast.info(r("assets.previewNotSupported"))}async function E(e){try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));ed.toast.error(e.error||"Failed to reveal file")}}catch{ed.toast.error("Failed to reveal file")}}(0,s.useEffect)(()=>{e_(e).then(i),eK(e).then(d)},[e]);let D=v?(0,eQ.isImageAsset)(v.filename,v.mimeType)?"image":eZ.test(v.filename)?"text":null:null,L=c.filter(e=>(0,eQ.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,eQ.localPathToApiUrl)(e.path),filename:e.filename})),B=v?L.findIndex(e=>e.id===v.id):-1;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.ScrollArea,{className:"h-full",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"border-b border-border px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("h3",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[(0,t.jsx)(W.FileText,{className:"h-3.5 w-3.5"}),r("taskPage.notes")]}),(0,t.jsxs)(h.Button,{variant:"ghost",className:"h-6 gap-1 px-2 text-xs",onClick:()=>u(!x),children:[x?(0,t.jsx)(eG.X,{className:"h-3 w-3"}):(0,t.jsx)(m.Plus,{className:"h-3 w-3"}),x?"":r("taskPage.addNote")]})]}),x&&(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:r("taskPage.noteTitle"),className:"h-8 w-full rounded-md border border-border bg-background px-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary",autoFocus:!0}),(0,t.jsx)("textarea",{value:f,onChange:e=>j(e.target.value),placeholder:r("taskPage.noteContent"),rows:3,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-primary resize-none"}),(0,t.jsx)(h.Button,{className:"text-xs",onClick:y,disabled:!p.trim(),children:r("taskPage.addNote")})]}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[0===l.length&&!x&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground py-2",children:r("taskPage.noNotes")}),l.map(e=>(0,t.jsx)("div",{className:"group rounded-md border border-border bg-card p-3",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h4",{className:"text-sm font-medium truncate",children:e.title}),e.content&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-3 whitespace-pre-wrap",children:e.content}),(0,t.jsx)("p",{className:"mt-1 text-[10px] text-muted-foreground",children:new Date(e.createdAt).toLocaleString()})]}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>w(e.id),className:"shrink-0 text-muted-foreground opacity-0 hover:bg-destructive/10 hover:text-destructive group-hover:opacity-100",title:r("taskPage.deleteNote"),children:(0,t.jsx)(P.Trash2,{className:"h-3.5 w-3.5"})})]})},e.id))]})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("h3",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[(0,t.jsx)(eU,{className:"h-3.5 w-3.5"}),r("taskPage.attachments")]}),(0,t.jsxs)(h.Button,{variant:"ghost",className:"h-6 gap-1 px-2 text-xs",onClick:()=>n.current?.click(),disabled:b,children:[(0,t.jsx)(ez.Upload,{className:"h-3 w-3"}),r("taskPage.uploadFile")]}),(0,t.jsx)("input",{ref:n,type:"file",className:"hidden",onChange:C})]}),(0,t.jsxs)("div",{className:"mt-2 space-y-1.5",children:[0===c.length&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground py-2",children:r("taskPage.noAttachments")}),c.map(e=>{var s;let a=T(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-card px-3 py-2",children:[(0,t.jsx)(eU,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("button",{type:"button",onClick:()=>I(e),disabled:!a,className:`min-w-0 flex-1 truncate text-left text-sm ${a?"cursor-pointer hover:underline":"cursor-default"}`,title:a?r("assets.preview"):e.filename,children:e.filename}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:(s=e.size)?s<1024?`${s} B`:s<1048576?`${(s/1024).toFixed(1)} KB`:`${(s/1024/1024).toFixed(1)} MB`:""}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[a&&(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>I(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:r("assets.preview"),children:(0,t.jsx)(eW.Eye,{className:"h-3 w-3"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>E(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:r("assets.revealInFinder"),children:(0,t.jsx)(V.FolderOpen,{className:"h-3 w-3"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>S(e.id),className:"shrink-0 text-muted-foreground hover:bg-destructive/10 hover:text-destructive",title:r("taskPage.deleteAttachment"),children:(0,t.jsx)(P.Trash2,{className:"h-3 w-3"})})]})]},e.id)})]})]})]})}),(0,t.jsx)(eJ.ImageLightbox,{imageUrl:"image"===D&&B>=0?L[B].url:null,filename:"image"===D&&B>=0?L[B].filename:"",open:"image"===D,onOpenChange:e=>{e||k(null)},assets:L.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:B>=0?B:void 0,onIndexChange:e=>{let t=L[e];if(!t)return;let s=c.find(e=>e.id===t.id);s&&k(s)}}),(0,t.jsx)(eX.TextPreviewDialog,{url:"text"===D&&v?(0,eQ.localPathToApiUrl)(v.path):null,filename:v?.filename??"",open:"text"===D,onOpenChange:e=>{e||k(null)}})]})}function e1({task:e,workspaceId:r,projectLocalPath:n,onClose:l}){let{t:i}=(0,o.useI18n)(),c=(0,a.useRouter)(),{removePortal:d}=(0,eI.useTerminalPortal)(),[m,x]=(0,s.useState)("terminal"),[u,p]=(0,s.useState)(null),[f,j]=(0,s.useState)(!1),[b,N]=(0,s.useState)(e.status);(0,s.useEffect)(()=>{N(e.status)},[e.status]);let[v,k]=(0,s.useState)(null),[y,w]=(0,s.useState)(!1),[C,S]=(0,s.useState)(!1),[T,P]=(0,s.useState)([]);(0,s.useEffect)(()=>{k(null),w(!1),S(!1),P([]),p(null),x("terminal")},[e.id]);let[I,E]=(0,s.useState)([]),[L,B]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=!1;return(0,eM.getPrompts)().then(t=>{if(e)return;E(t.map(e=>({id:e.id,name:e.name,isDefault:e.isDefault})));let s=t.find(e=>e.isDefault);s&&B(s.id)}),()=>{e=!0}},[]),(0,s.useEffect)(()=>{k(null),S(!1);let t=!1;return(0,eE.getTaskExecutions)(e.id).then(e=>{if(t)return;let s=e[0];if(s?.status==="RUNNING"){let e=s.worktreePath||n||null;e&&k(e)}P(e.filter(e=>"RUNNING"!==e.status)),S(!0)}),()=>{t=!0}},[e.id]),(0,s.useEffect)(()=>{if("changes"!==m||"TODO"===b||"CANCELLED"===b)return;let t=!1;return j(!0),fetch(`/api/tasks/${e.id}/diff`).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>{t||p(e?.files||e?.branchDeleted?e:null)}).catch(()=>{t||p(null)}).finally(()=>{t||j(!1)}),()=>{t=!0}},[m,b,e.id]);let F=(0,s.useCallback)(async()=>{if(!y){w(!0),d(e.id);try{let t=await (0,eD.startPtyExecutionSafe)(e.id,"",L);if(!t.ok){w(!1),ed.toast.error(t.error||i("terminal.startFailed"));return}k(t.worktreePath??null),N("IN_PROGRESS")}catch(e){w(!1),ed.toast.error(e instanceof Error&&e.message?e.message:i("terminal.startFailed"))}}},[e.id,y,L,i]),R=(0,s.useCallback)(t=>{w(!1),k(null),d(e.id),0===t&&N("IN_REVIEW"),(0,eE.getTaskExecutions)(e.id).then(e=>{P(e.filter(e=>"RUNNING"!==e.status))}),c.refresh()},[c,e.id]),O=(0,s.useCallback)(async()=>{await (0,eL.stopPtyExecution)(e.id),w(!1),d(e.id),k(null),N("IN_REVIEW"),(0,eE.getTaskExecutions)(e.id).then(e=>{P(e.filter(e=>"RUNNING"!==e.status))}),c.refresh()},[e.id,c]),M=(0,s.useCallback)(async t=>{w(!0),d(e.id),k(null);try{let{worktreePath:s}=await (0,eB.resumePtyExecution)(e.id,t);k(s),N("IN_PROGRESS")}catch{w(!1)}},[e.id,d]),$=(0,s.useCallback)(async()=>{w(!0),d(e.id),k(null);try{let{worktreePath:t}=await (0,eF.continueLatestPtyExecution)(e.id);k(t),N("IN_PROGRESS")}catch(e){w(!1),ed.toast.error(e instanceof Error?e.message:String(e))}},[e.id,d]),[z,U]=(0,s.useState)(!1),[G,V]=(0,s.useState)([]),_=(0,s.useCallback)(async()=>{try{let t=await (0,eA.checkWorktreeClean)(e.id);if(t.hasWorktree&&!t.clean)return void ed.toast.error(i("taskPage.uncommittedChanges",{count:String(t.files.length)}));if(t.hasWorktree&&t.clean&&!t.hasCommits)return void ed.toast.error(i("taskPage.noChangesToComplete"),{action:{label:i("taskPage.markAsCancelled"),onClick:()=>{(0,eR.updateTaskStatus)(e.id,"CANCELLED").then(()=>{N("CANCELLED"),ed.toast.success(i("taskPage.taskCancelled")),c.refresh()}).catch(()=>ed.toast.error("Failed to cancel task"))}}});if(t.hasWorktree&&t.hasCommits){V(t.commitLog),U(!0);return}await (0,eR.updateTaskStatus)(e.id,"DONE"),N("DONE"),ed.toast.success(i("taskPage.taskCompleted")),c.refresh()}catch{ed.toast.error("Failed to complete task")}},[e.id,c,i]),H=(0,s.useCallback)(()=>{N("DONE"),U(!1),ed.toast.success(i("taskPage.taskCompleted")),c.refresh()},[c,i]),Y=(0,s.useCallback)(async t=>{try{let{hash:s}=await (0,eO.commitWorktreeChanges)(e.id,t);ed.toast.success(i("diff.commitSuccess",{hash:s})),c.refresh();let a=await fetch(`/api/tasks/${e.id}/diff`);if(a.ok){let e=await a.json();p(e?.files?e:null)}}catch(e){ed.toast.error(e instanceof Error?e.message:"Commit failed")}},[e.id,c,i]);return(0,t.jsxs)("div",{className:"flex h-full w-[600px] flex-shrink-0 flex-col border-l border-border bg-sidebar","data-testid":"task-detail-panel",children:[(0,t.jsx)(eS,{title:e.title,description:i("taskDetail.panelDescription"),branch:`task/${e.id}`,baseBranch:e.baseBranch,version:e.version??null,hasConversation:!1,updatedAt:e.updatedAt,openDir:v??(n?e.subPath?`${n}/${e.subPath}`:n:null),onBack:l}),(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-2",children:[(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsxs)("button",{onClick:()=>x("terminal"),className:`flex items-center gap-1.5 px-3 py-1 text-xs font-medium rounded-md ${"terminal"===m?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(X.Terminal,{className:"h-3 w-3"}),i("terminal.execute")]}),(0,t.jsx)("button",{onClick:()=>x("changes"),className:`px-3 py-1 text-xs font-medium rounded-md ${"changes"===m?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:i("taskPage.changes")}),(0,t.jsxs)("button",{onClick:()=>x("notes"),className:`flex items-center gap-1.5 px-3 py-1 text-xs font-medium rounded-md ${"notes"===m?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(W.FileText,{className:"h-3 w-3"}),i("taskPage.notes")]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:["IN_REVIEW"===b&&(0,t.jsxs)(h.Button,{size:"sm",onClick:_,className:"bg-emerald-500/15 text-emerald-400 ring-1 ring-emerald-500/20 hover:bg-emerald-500/25",children:[(0,t.jsx)(ey.CheckCircle2,{className:"h-3 w-3"}),i("taskPage.completeTask")]}),"DONE"!==b&&"CANCELLED"!==b&&(0,t.jsxs)(h.Button,{variant:"ghost",size:"sm",onClick:()=>c.push(`/workspaces/${r}/tasks/${e.id}`),className:"text-muted-foreground",children:[(0,t.jsx)(ev.ExternalLink,{className:"h-3 w-3"}),i("taskPage.viewDetails")]})]})]}),"terminal"===m?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:C?v?(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"shrink-0 flex items-center justify-between border-b border-neutral-800 px-3 py-2 bg-[#0f1419]",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-emerald-400",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"}),i("execution.running")]}),(0,t.jsxs)(D.Tooltip,{children:[(0,t.jsxs)(D.TooltipTrigger,{onClick:O,className:"flex items-center gap-1.5 rounded-md bg-red-500/15 px-3 py-1 text-xs font-medium text-red-400 hover:bg-red-500/25 transition-colors",children:[(0,t.jsx)(ek.Square,{className:"h-3 w-3"}),i("terminal.stopExecution")]}),(0,t.jsx)(D.TooltipContent,{side:"bottom",children:i("terminal.stopHint")})]})]}),(0,t.jsx)("div",{className:"flex-1 min-h-0",children:(0,t.jsx)(eI.TerminalOutlet,{taskId:e.id,worktreePath:v,onSessionEnd:R})})]}):"DONE"===b||"CANCELLED"===b?(0,t.jsx)("div",{className:"flex h-full flex-col overflow-hidden",children:(0,t.jsx)(A.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)(e$.ExecutionTimeline,{executions:T})})}):(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"shrink-0 flex items-center gap-2 border-b border-border px-4 py-3",children:[I.length>0&&(0,t.jsxs)(g.Select,{defaultValue:L??"none",onValueChange:e=>B("none"===e?null:e),children:[(0,t.jsx)(g.SelectTrigger,{size:"sm",className:"min-w-[120px]",children:(0,t.jsx)("span",{className:"text-left truncate",children:L?I.find(e=>e.id===L)?.name??i("terminal.noPrompt"):i("terminal.noPrompt")})}),(0,t.jsxs)(g.SelectContent,{className:"min-w-[200px]",children:[(0,t.jsx)(g.SelectItem,{value:"none",children:i("terminal.noPrompt")}),I.map(e=>(0,t.jsxs)(g.SelectItem,{value:e.id,children:[e.name,e.isDefault?" ★":""]},e.id))]})]},`prompt-${I.length}`),(0,t.jsxs)(h.Button,{onClick:F,disabled:y,size:"sm",className:"gap-2 px-4",children:[y?(0,t.jsx)(K.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(X.Terminal,{className:"h-3.5 w-3.5"}),y?i("terminal.executing"):i("terminal.launch")]})]}),(0,t.jsx)(A.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)(e$.ExecutionTimeline,{executions:T,onResume:M,onContinueLatest:$})})]}):(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 bg-[#0f1419]",children:[(0,t.jsx)(K.Loader2,{className:"size-5 animate-spin text-neutral-500"}),(0,t.jsx)("span",{className:"text-xs text-neutral-500",children:i("execution.loading")})]})}):"changes"===m?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:f?(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.loadingDiff")})}):u?.branchDeleted?(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.branchDeleted")})}):u?(0,t.jsx)(eT.TaskDiffView,{taskId:e.id,files:u.files,totalAdded:u.totalAdded,totalRemoved:u.totalRemoved,hasConflicts:u.hasConflicts,conflictFiles:u.conflictFiles,onCommit:Y,hasUncommitted:u.hasUncommitted}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noChanges")})})}):"notes"===m?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:(0,t.jsx)(e0,{taskId:e.id,projectId:e.projectId})}):null,(0,t.jsx)(eP.TaskMergeConfirmDialog,{open:z,onOpenChange:U,taskId:e.id,taskTitle:e.title,baseBranch:e.baseBranch??"main",fileCount:u?.files?.length??0,commitCount:u?.commitCount??0,commitLog:G,onMergeComplete:H})]})}var e5=e.i(938123),e3=e.i(852932);let e2=(0,ee.createServerReference)("40aa5b737a3c8b15f19d74784e47d3ec8be042714a",ee.callServer,void 0,ee.findSourceMapURL,"deleteTask"),e4=(0,ee.createServerReference)("406d2cdabab5795e4c05cfd5cfb944193885a68fd7",ee.callServer,void 0,ee.findSourceMapURL,"toggleTaskPinned");var e8=e.i(156075);let e7=(0,ee.createServerReference)("40e3150fc36b6ff94401f24846067b18788d1eaf37",ee.callServer,void 0,ee.findSourceMapURL,"getVersionsForPicker");var e6=e.i(19671);function e9({projects:e,activeProjectId:a,onSelect:r}){let n=(0,s.useRef)(null),[l,i]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),d=()=>{let e=n.current;e&&(i(e.scrollLeft>0),c(e.scrollLeft<e.scrollWidth-e.clientWidth-1))};(0,s.useEffect)(()=>{d();let e=n.current;if(e){e.addEventListener("scroll",d);let t=new ResizeObserver(d);return t.observe(e),()=>{e.removeEventListener("scroll",d),t.disconnect()}}},[e]);let m=e=>{let t=n.current;t&&t.scrollBy({left:"left"===e?-150:150,behavior:"smooth"})};return(0,t.jsxs)("div",{className:"relative flex items-center",children:[l&&(0,t.jsx)("button",{onClick:()=>m("left"),className:"absolute left-0 z-10 flex h-8 w-8 items-center justify-center rounded-md bg-background/90 text-muted-foreground shadow-sm ring-1 ring-border backdrop-blur-sm transition-colors hover:text-foreground",children:(0,t.jsx)(e6.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{ref:n,className:"flex items-center gap-1.5 overflow-x-auto scrollbar-none px-1 py-1",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map(e=>{let s=a===e.id;return(0,t.jsxs)("button",{onClick:()=>{s||r(e.id)},className:`shrink-0 rounded-lg border-b-2 px-4 py-2 text-sm font-medium transition-colors ${s?"border-primary bg-primary/10 text-primary ring-1 ring-primary/20 cursor-default":"border-transparent text-muted-foreground hover:bg-accent hover:text-foreground cursor-pointer"}`,children:[(0,t.jsx)("span",{children:e.name}),e.alias&&(0,t.jsx)("span",{className:"ml-1.5 text-xs text-muted-foreground font-normal",children:e.alias})]},e.id)})}),o&&(0,t.jsx)("button",{onClick:()=>m("right"),className:"absolute right-0 z-10 flex h-8 w-8 items-center justify-center rounded-md bg-background/90 text-muted-foreground shadow-sm ring-1 ring-border backdrop-blur-sm transition-colors hover:text-foreground",children:(0,t.jsx)(G.ChevronRight,{className:"h-4 w-4"})})]})}var te=e.i(759686);function tt({open:e,onOpenChange:s,taskTitle:a,uncommittedFiles:r,commitLog:n,onConfirm:l}){let{t:i}=(0,o.useI18n)(),c=r.length,d=n.length,m=0===c&&0===d;return(0,t.jsx)(R.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(R.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(R.DialogHeader,{children:(0,t.jsxs)(R.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(te.AlertTriangle,{className:"h-4 w-4 text-amber-400"}),i("taskCancel.title")]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-amber-500/20 bg-amber-500/10 p-3 space-y-1.5",children:[(0,t.jsx)("p",{className:"text-xs text-foreground",children:i("taskCancel.intro",{title:a})}),(0,t.jsx)("p",{className:"text-xs text-amber-300",children:i("taskCancel.irreversible")})]}),m?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("taskCancel.cleanNotice")}):(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:i("taskCancel.uncommittedFiles")}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:c})]}),(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:i("taskCancel.unmergedCommits")}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:d})]})]}),c>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:i("taskCancel.filesList")}),(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:r.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))})]}),d>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:i("taskCancel.commitsList")}),(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:n.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground mt-1.5",children:i("taskCancel.reflogHint")})]})]}),(0,t.jsxs)(R.DialogFooter,{children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>s(!1),children:i("taskCancel.keep")}),(0,t.jsxs)(h.Button,{variant:"destructive",onClick:l,className:"gap-2",children:[(0,t.jsx)(te.AlertTriangle,{className:"h-4 w-4"}),i("taskCancel.confirm")]})]})]})})}e.s(["BoardPageClient",0,function({workspaceId:e,projectId:r,project:n,projects:l,initialTasks:i,labels:d,openTaskId:m}){let x=(0,a.useRouter)(),{t:u}=(0,o.useI18n)(),[,h]=(0,s.useTransition)(),[p,g]=(0,s.useState)(""),[j,b]=(0,s.useState)("all"),[v,k]=(0,s.useState)(!1),[y,w]=(0,s.useState)("TODO"),[C,S]=(0,s.useState)(m??null),[T,P]=(0,s.useState)([]),I=C?i.find(e=>e.id===C)??null:null,[E,D]=(0,s.useState)(null),[L,B]=(0,s.useState)(null),[F,R]=(0,s.useState)(null);(0,s.useEffect)(()=>{e7(r).then(P).catch(()=>P([]))},[r]);let A=T.find(e=>e.isCurrent)?.id??null,O=(0,s.useCallback)(()=>{h(()=>{x.refresh()})},[x]);(0,s.useEffect)(()=>{if(v)return;let e=setInterval(()=>{h(()=>{x.refresh()})},5e3);return()=>clearInterval(e)},[x,v]);let M=(0,s.useCallback)(e=>{g(e)},[]),U=(0,s.useCallback)(async e=>{let t=i.find(t=>t.id===e);if(t)try{let s=await (0,eA.checkWorktreeClean)(e);if(s.hasWorktree&&!s.clean){ed.toast.error(u("taskPage.uncommittedChanges",{count:String(s.files.length)})),O();return}if(s.hasWorktree&&s.clean&&!s.hasCommits){ed.toast.error(u("taskPage.noChangesToComplete"),{action:{label:u("taskPage.markAsCancelled"),onClick:()=>{(0,eR.updateTaskStatus)(e,"CANCELLED").then(()=>{ed.toast.success(u("taskPage.taskCancelled")),O()}).catch(()=>ed.toast.error("Failed to cancel task"))}}}),O();return}if(s.hasWorktree&&s.hasCommits){B({task:t,commitLog:s.commitLog,commitCount:s.commitLog.length}),O();return}await (0,eR.updateTaskStatus)(e,"DONE"),ed.toast.success(u("taskPage.taskCompleted")),O()}catch{ed.toast.error("Failed to complete task"),O()}},[i,O,u]),G=(0,s.useCallback)(async e=>{let t=i.find(t=>t.id===e);if(t)try{let s=await (0,eA.checkWorktreeClean)(e);if(!s.hasWorktree){await (0,eR.updateTaskStatus)(e,"CANCELLED"),ed.toast.success(u("taskPage.taskCancelled")),O();return}R({task:t,files:s.files,commitLog:s.commitLog}),O()}catch{ed.toast.error("Failed to cancel task"),O()}},[i,O,u]),W=(0,s.useCallback)(async(e,t)=>{"DONE"===t?await U(e):"CANCELLED"===t?await G(e):(await (0,eR.updateTaskStatus)(e,t),O())},[O,U,G]),V=(0,s.useCallback)(async e=>{let t=await (0,e5.createTask)({title:e.title,description:e.description,projectId:r,priority:e.priority,status:e.status,labelIds:e.labelIds,baseBranch:e.baseBranch,subPath:e.subPath,versionId:e.versionId??void 0});if(e.autoStart&&t?.id)try{await (0,e8.startPtyExecution)(t.id,""),S(t.id)}catch(e){ed.toast.error(e instanceof Error?e.message:String(e))}O()},[r,O]),_=(0,s.useCallback)(async(e,t)=>{await (0,e3.updateTask)(e,{...t,labelIds:t.labelIds}),D(null),O()},[O]),H=(0,s.useCallback)(async e=>{await e2(e),C===e&&S(null),O()},[O,C]),K=(0,s.useCallback)(async e=>{await e4(e),O()},[O]),Y=(0,s.useCallback)(async t=>{try{await (0,e8.startPtyExecution)(t,"")}catch(e){ed.toast.error(e instanceof Error?e.message:String(e))}x.push(`/workspaces/${e}/tasks/${t}`)},[x,e]),q=(0,s.useCallback)(async(e,t)=>{"DONE"===t?await U(e):"CANCELLED"===t?await G(e):(await (0,eR.updateTaskStatus)(e,t),O())},[O,U,G]),J=(0,s.useCallback)(e=>{w(e),D(null),k(!0)},[]),X=(0,s.useCallback)(e=>{D(e),k(!0)},[]),Q=i.filter(e=>!e.labels?.some(e=>e.label.name===N.TOWER_LABEL_NAME&&e.label.isBuiltin)),Z=Q.filter(e=>{if("backlog"===j){if(e.versionId)return!1}else if("all"!==j&&e.versionId!==j)return!1;if(p.trim()){let t=p.toLowerCase();if(!e.title.toLowerCase().includes(t)&&!e.description?.toLowerCase().includes(t))return!1}return!0});return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,t.jsx)("div",{className:"px-6 pt-3 pb-1",children:(0,t.jsx)(e9,{projects:l,activeProjectId:r,onSelect:t=>x.push(`/workspaces/${e}?projectId=${t}`,{scroll:!1})})}),(0,t.jsx)(c,{totalTasks:Q.length,runningTasks:Q.filter(e=>"IN_PROGRESS"===e.status).length}),(0,t.jsx)(f,{searchQuery:p,onSearchChange:M,versions:T,versionFilter:j,onVersionFilterChange:b,versionsHref:`/workspaces/${e}/projects/${r}/versions`,onCreateTask:()=>{D(null),k(!0)}}),(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden p-4",children:(0,t.jsx)($,{initialTasks:Z,onTaskMove:W,onTaskClick:e=>{S(e.id)},onEditTask:X,onAddTask:J,onDeleteTask:H,onTogglePin:K,workspaceId:e,onContextMenuStatusChange:q,onContextMenuLaunch:Y})}),(0,t.jsx)(z.CreateTaskDialog,{open:v,onOpenChange:e=>{k(e),e||D(null)},onSubmit:V,onUpdate:_,defaultStatus:y,editTask:E,editTaskLabelIds:E?.labels?E.labels.map(e=>e.labelId):[],labels:d.filter(e=>!(e.name===N.TOWER_LABEL_NAME&&e.isBuiltin)),projectType:n.type,projectLocalPath:n.localPath,versions:T,defaultVersionId:A})]}),I?(0,t.jsx)(e1,{task:I,workspaceId:e,projectLocalPath:n.localPath,onClose:()=>S(null)}):(0,t.jsx)(eN,{project:n,workspaceId:e}),L&&(0,t.jsx)(eP.TaskMergeConfirmDialog,{open:!0,onOpenChange:e=>{e||B(null)},taskId:L.task.id,taskTitle:L.task.title,baseBranch:L.task.baseBranch??"main",fileCount:0,commitCount:L.commitCount,commitLog:L.commitLog,onMergeComplete:()=>{B(null),ed.toast.success(u("taskPage.taskCompleted")),O()}}),F&&(0,t.jsx)(tt,{open:!0,onOpenChange:e=>{e||R(null)},taskTitle:F.task.title,uncommittedFiles:F.files,commitLog:F.commitLog,onConfirm:()=>{let e=F.task.id;R(null),(0,eR.updateTaskStatus)(e,"CANCELLED").then(()=>{ed.toast.success(u("taskPage.taskCancelled")),O()}).catch(()=>ed.toast.error("Failed to cancel task"))}})]})}],783426)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:a,description:s,action:l,className:n}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:a}),s&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:s}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},236967,e=>{"use strict";var t=e.i(289721),r=e.i(210702),a=e.i(538059),s=e.i(259846),l=e.i(645378),n=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:l.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,c.useI18n)(),n=(0,a.usePathname)(),i=o.find(e=>n.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,t.jsxs)(r.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(s.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let s=a.icon,n=i===a.key;return(0,t.jsxs)(r.default,{href:`/workspaces/${e}/${a.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${n?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(s,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l(`sidebar.${a.key}`)})]},a.key)})]})}])},954777,555989,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40900294fd2745df36a860a6518b447578207ff361",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],954777);let a=(0,t.createServerReference)("40579fa5370beaa688b0b250cecb168b2b61c712ed",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,a],555989)},497732,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(232545),s=e.i(400355),l=e.i(236967),n=e.i(533499),i=e.i(685149),c=e.i(954777),o=e.i(514798);let d=(0,o.createServerReference)("606df7e4ec7a54595ae9411f7d17679c6a0f1f5fba",o.callServer,void 0,o.findSourceMapURL,"updateNote");var m=e.i(555989);let x=(0,o.createServerReference)("60e1a5ed0657fd8d4f4c2ab6dee78b16f0dd764a4e",o.callServer,void 0,o.findSourceMapURL,"getProjectNotes");var u=e.i(975157);function h({active:e,onSelect:r}){let{t:a}=(0,n.useI18n)();return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("button",{onClick:()=>r("all"),className:(0,u.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors","all"===e?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a("notes.allCategories")}),i.NOTE_CATEGORIES_PRESET.map(a=>(0,t.jsx)("button",{onClick:()=>r(a),className:(0,u.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors",e===a?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a},a))]})}var g=e.i(519455),p=e.i(918385),f=e.i(645378),j=e.i(912505),b=e.i(464249),v=e.i(998626);e.i(254826);var N=e.i(309735);function S({note:e,onEdit:r,onDelete:a}){let{t:s}=(0,n.useI18n)(),l=e.content.slice(0,300);return(0,t.jsxs)("div",{className:"group relative rounded-lg border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20",children:[(0,t.jsxs)("div",{className:"absolute right-3 top-3 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>r(e),className:"text-muted-foreground","aria-label":s("notes.edit"),children:(0,t.jsx)(b.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>a(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":s("notes.delete"),children:(0,t.jsx)(v.Trash2,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("div",{className:"mb-2 pr-16",children:(0,t.jsx)("h3",{className:"truncate text-sm font-semibold text-foreground",children:e.title})}),(0,t.jsx)("span",{className:"mb-3 inline-block rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:e.category}),(0,t.jsx)("div",{className:"max-h-24 overflow-hidden text-sm leading-relaxed text-muted-foreground",children:(0,t.jsx)(N.Streamdown,{children:l})})]})}function y({notes:e,onEdit:r,onDelete:a}){let{t:s}=(0,n.useI18n)();return 0===e.length?(0,t.jsx)(j.EmptyState,{icon:f.FileText,title:s("notes.empty"),description:s("notes.emptyHint")}):(0,t.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>(0,t.jsx)(S,{note:e,onEdit:r,onDelete:a},e.id))})}var w=e.i(624687);function C({value:e,onChange:r}){return(0,t.jsxs)("div",{className:"relative grid grid-cols-2 gap-4 flex-1 min-h-64",children:[(0,t.jsx)(w.Textarea,{value:e,onChange:e=>r(e.target.value),className:"absolute inset-0 w-1/2 pr-2 resize-none font-mono text-sm border rounded-md p-3 bg-background text-foreground border-border focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Write Markdown here..."}),(0,t.jsx)("div",{className:"absolute inset-0 left-1/2 pl-2",children:(0,t.jsx)("div",{className:"h-full overflow-y-auto border rounded-md p-3 border-border text-sm leading-relaxed",children:(0,t.jsx)(N.Streamdown,{children:e})})})]})}e.s(["NotesPageClient",0,function({allWorkspaces:e,initialWorkspaceId:o,initialProjectId:u,initialNotes:f}){let j,b,{t:v}=(0,n.useI18n)(),[N,S]=(0,r.useTransition)(),[w,E]=(0,r.useState)(o),[T,k]=(0,r.useState)(u),[I,R]=(0,r.useState)(f),[O,P]=(0,r.useState)("all"),[A,_]=(0,r.useState)(null),[L,$]=(0,r.useState)(!1),[D,B]=(0,r.useState)(""),[M,z]=(0,r.useState)(""),[G,U]=(0,r.useState)(i.NOTE_CATEGORIES_PRESET[3]),[V,H]=(0,r.useState)(o),[F,W]=(0,r.useState)(u),K=e.find(e=>e.id===w),Y=K?.projects??[],q=e.find(e=>e.id===V),J=q?.projects??[],Q=(0,r.useCallback)(e=>{e?S(async()=>{R(await x(e))}):R([])},[S]),X=async()=>{F&&D.trim()&&(await (0,c.createNote)({title:D.trim(),content:M,category:G,projectId:F}),$(!1),F===T&&Q(T))},Z=async()=>{A&&D.trim()&&(await d(A.id,{title:D.trim(),content:M,category:G}),_(null),Q(T))},ee=async e=>{let t=I.find(t=>t.id===e);!t||confirm(v("notes.deleteConfirm",{title:t.title}))&&(await (0,m.deleteNote)(e),Q(T))},et="all"===O?I.map(e=>({...e,updatedAt:new Date(e.updatedAt)})):I.filter(e=>e.category===O).map(e=>({...e,updatedAt:new Date(e.updatedAt)})),er=L||null!==A;return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(l.SubPageNav,{workspaceId:w}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(p.Select,{value:w,onValueChange:t=>t&&(t=>{if(t===w)return;E(t);let r=e.find(e=>e.id===t),a=r?.projects[0]??null;k(a?.id??null),P("all"),Q(a?.id??null)})(t),children:[(0,t.jsx)(p.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===w)?.name??w})}),(0,t.jsx)(p.SelectContent,{children:e.map(e=>(0,t.jsx)(p.SelectItem,{value:e.id,children:e.name},e.id))})]}),Y.length>0&&(0,t.jsxs)(p.Select,{value:T??"",onValueChange:e=>e&&void(e!==T&&(k(e),P("all"),Q(e))),children:[(0,t.jsx)(p.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(j=Y.find(e=>e.id===T))?j.alias?`${j.name} (${j.alias})`:j.name:""})}),(0,t.jsx)(p.SelectContent,{children:Y.map(e=>(0,t.jsxs)(p.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),!er&&(0,t.jsxs)(g.Button,{onClick:()=>{B(""),z(""),U(i.NOTE_CATEGORIES_PRESET[3]),H(w),W(T),_(null),$(!0)},className:"ml-auto bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(a.Plus,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:v("notes.newNote")})]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden px-6 py-4 flex flex-col",children:er?(0,t.jsxs)("div",{className:"flex flex-col gap-4 flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[!A&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v("notes.workspace")}),(0,t.jsxs)(p.Select,{value:V,onValueChange:t=>t&&(t=>{if(t===V)return;H(t);let r=e.find(e=>e.id===t),a=r?.projects[0]??null;W(a?.id??null)})(t),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[140px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===V)?.name??V})}),(0,t.jsx)(p.SelectContent,{children:e.map(e=>(0,t.jsx)(p.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),!A&&J.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v("notes.project")}),(0,t.jsxs)(p.Select,{value:F??"",onValueChange:e=>e&&W(e),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[160px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(b=J.find(e=>e.id===F))?b.alias?`${b.name} (${b.alias})`:b.name:""})}),(0,t.jsx)(p.SelectContent,{children:J.map(e=>(0,t.jsxs)(p.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v("notes.categoryLabel")}),(0,t.jsxs)(p.Select,{value:G,onValueChange:e=>e&&U(e),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[120px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:G})}),(0,t.jsx)(p.SelectContent,{children:i.NOTE_CATEGORIES_PRESET.map(e=>(0,t.jsx)(p.SelectItem,{value:e,children:e},e))})]})]})]}),(0,t.jsx)("input",{type:"text",value:D,onChange:e=>B(e.target.value),placeholder:v("notes.titlePlaceholder"),className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),(0,t.jsx)(C,{value:M,onChange:z}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,t.jsx)(g.Button,{variant:"outline",onClick:()=>{$(!1),_(null)},children:v("notes.cancel")}),(0,t.jsx)(g.Button,{onClick:A?Z:X,disabled:!D.trim()||!A&&!F,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:v("notes.save")})]})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(h,{active:O,onSelect:P}),(0,t.jsxs)("div",{className:`relative ${N?"opacity-40 pointer-events-none":""} transition-opacity`,children:[N&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(s.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===Y.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:v("notes.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:v("notes.noProjectHint")})]}):(0,t.jsx)(y,{notes:et,onEdit:e=>{B(e.title),z(e.content),U(e.category),_(e),$(!1)},onDelete:ee})]})]})})]})}],497732)},244455,e=>{e.v(t=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(t=>e.l(t))).then(()=>t(629495)))},800307,e=>{e.v(t=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(t=>e.l(t))).then(()=>t(267483)))}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:a,description:s,action:l,className:n}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:a}),s&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:s}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},236967,e=>{"use strict";var t=e.i(289721),r=e.i(210702),a=e.i(538059),s=e.i(259846),l=e.i(645378),n=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:l.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,c.useI18n)(),n=(0,a.usePathname)(),i=o.find(e=>n.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,t.jsxs)(r.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(s.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let s=a.icon,n=i===a.key;return(0,t.jsxs)(r.default,{href:`/workspaces/${e}/${a.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${n?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(s,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l(`sidebar.${a.key}`)})]},a.key)})]})}])},700116,364931,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40a8e280b75db53ba7bda0136ecc91c77059334657",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],700116);let a=(0,t.createServerReference)("40348aecd840ff75d957b0201b06bc4da6deeeba82",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,a],364931)},497732,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(232545),s=e.i(400355),l=e.i(236967),n=e.i(533499),i=e.i(685149),c=e.i(700116),o=e.i(514798);let d=(0,o.createServerReference)("60872962b102fae3c6971065280d930456bbdfd3b8",o.callServer,void 0,o.findSourceMapURL,"updateNote");var m=e.i(364931);let x=(0,o.createServerReference)("604d82b28f8f8d3eebb633c1274162295136d50ad3",o.callServer,void 0,o.findSourceMapURL,"getProjectNotes");var u=e.i(975157);function h({active:e,onSelect:r}){let{t:a}=(0,n.useI18n)();return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("button",{onClick:()=>r("all"),className:(0,u.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors","all"===e?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a("notes.allCategories")}),i.NOTE_CATEGORIES_PRESET.map(a=>(0,t.jsx)("button",{onClick:()=>r(a),className:(0,u.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors",e===a?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a},a))]})}var g=e.i(519455),p=e.i(280027),f=e.i(645378),j=e.i(912505),b=e.i(464249),v=e.i(998626);e.i(254826);var N=e.i(309735);function S({note:e,onEdit:r,onDelete:a}){let{t:s}=(0,n.useI18n)(),l=e.content.slice(0,300);return(0,t.jsxs)("div",{className:"group relative rounded-lg border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20",children:[(0,t.jsxs)("div",{className:"absolute right-3 top-3 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>r(e),className:"text-muted-foreground","aria-label":s("notes.edit"),children:(0,t.jsx)(b.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>a(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":s("notes.delete"),children:(0,t.jsx)(v.Trash2,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("div",{className:"mb-2 pr-16",children:(0,t.jsx)("h3",{className:"truncate text-sm font-semibold text-foreground",children:e.title})}),(0,t.jsx)("span",{className:"mb-3 inline-block rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:e.category}),(0,t.jsx)("div",{className:"max-h-24 overflow-hidden text-sm leading-relaxed text-muted-foreground",children:(0,t.jsx)(N.Streamdown,{children:l})})]})}function y({notes:e,onEdit:r,onDelete:a}){let{t:s}=(0,n.useI18n)();return 0===e.length?(0,t.jsx)(j.EmptyState,{icon:f.FileText,title:s("notes.empty"),description:s("notes.emptyHint")}):(0,t.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>(0,t.jsx)(S,{note:e,onEdit:r,onDelete:a},e.id))})}var w=e.i(624687);function C({value:e,onChange:r}){return(0,t.jsxs)("div",{className:"relative grid grid-cols-2 gap-4 flex-1 min-h-64",children:[(0,t.jsx)(w.Textarea,{value:e,onChange:e=>r(e.target.value),className:"absolute inset-0 w-1/2 pr-2 resize-none font-mono text-sm border rounded-md p-3 bg-background text-foreground border-border focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Write Markdown here..."}),(0,t.jsx)("div",{className:"absolute inset-0 left-1/2 pl-2",children:(0,t.jsx)("div",{className:"h-full overflow-y-auto border rounded-md p-3 border-border text-sm leading-relaxed",children:(0,t.jsx)(N.Streamdown,{children:e})})})]})}e.s(["NotesPageClient",0,function({allWorkspaces:e,initialWorkspaceId:o,initialProjectId:u,initialNotes:f}){let j,b,{t:v}=(0,n.useI18n)(),[N,S]=(0,r.useTransition)(),[w,E]=(0,r.useState)(o),[T,k]=(0,r.useState)(u),[I,R]=(0,r.useState)(f),[O,P]=(0,r.useState)("all"),[A,_]=(0,r.useState)(null),[L,$]=(0,r.useState)(!1),[D,B]=(0,r.useState)(""),[M,z]=(0,r.useState)(""),[G,U]=(0,r.useState)(i.NOTE_CATEGORIES_PRESET[3]),[V,H]=(0,r.useState)(o),[F,W]=(0,r.useState)(u),K=e.find(e=>e.id===w),Y=K?.projects??[],q=e.find(e=>e.id===V),J=q?.projects??[],Q=(0,r.useCallback)(e=>{e?S(async()=>{R(await x(e))}):R([])},[S]),X=async()=>{F&&D.trim()&&(await (0,c.createNote)({title:D.trim(),content:M,category:G,projectId:F}),$(!1),F===T&&Q(T))},Z=async()=>{A&&D.trim()&&(await d(A.id,{title:D.trim(),content:M,category:G}),_(null),Q(T))},ee=async e=>{let t=I.find(t=>t.id===e);!t||confirm(v("notes.deleteConfirm",{title:t.title}))&&(await (0,m.deleteNote)(e),Q(T))},et="all"===O?I.map(e=>({...e,updatedAt:new Date(e.updatedAt)})):I.filter(e=>e.category===O).map(e=>({...e,updatedAt:new Date(e.updatedAt)})),er=L||null!==A;return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(l.SubPageNav,{workspaceId:w}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(p.Select,{value:w,onValueChange:t=>t&&(t=>{if(t===w)return;E(t);let r=e.find(e=>e.id===t),a=r?.projects[0]??null;k(a?.id??null),P("all"),Q(a?.id??null)})(t),children:[(0,t.jsx)(p.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===w)?.name??w})}),(0,t.jsx)(p.SelectContent,{children:e.map(e=>(0,t.jsx)(p.SelectItem,{value:e.id,children:e.name},e.id))})]}),Y.length>0&&(0,t.jsxs)(p.Select,{value:T??"",onValueChange:e=>e&&void(e!==T&&(k(e),P("all"),Q(e))),children:[(0,t.jsx)(p.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(j=Y.find(e=>e.id===T))?j.alias?`${j.name} (${j.alias})`:j.name:""})}),(0,t.jsx)(p.SelectContent,{children:Y.map(e=>(0,t.jsxs)(p.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),!er&&(0,t.jsxs)(g.Button,{onClick:()=>{B(""),z(""),U(i.NOTE_CATEGORIES_PRESET[3]),H(w),W(T),_(null),$(!0)},className:"ml-auto bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(a.Plus,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:v("notes.newNote")})]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden px-6 py-4 flex flex-col",children:er?(0,t.jsxs)("div",{className:"flex flex-col gap-4 flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[!A&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v("notes.workspace")}),(0,t.jsxs)(p.Select,{value:V,onValueChange:t=>t&&(t=>{if(t===V)return;H(t);let r=e.find(e=>e.id===t),a=r?.projects[0]??null;W(a?.id??null)})(t),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[140px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===V)?.name??V})}),(0,t.jsx)(p.SelectContent,{children:e.map(e=>(0,t.jsx)(p.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),!A&&J.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v("notes.project")}),(0,t.jsxs)(p.Select,{value:F??"",onValueChange:e=>e&&W(e),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[160px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(b=J.find(e=>e.id===F))?b.alias?`${b.name} (${b.alias})`:b.name:""})}),(0,t.jsx)(p.SelectContent,{children:J.map(e=>(0,t.jsxs)(p.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v("notes.categoryLabel")}),(0,t.jsxs)(p.Select,{value:G,onValueChange:e=>e&&U(e),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[120px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:G})}),(0,t.jsx)(p.SelectContent,{children:i.NOTE_CATEGORIES_PRESET.map(e=>(0,t.jsx)(p.SelectItem,{value:e,children:e},e))})]})]})]}),(0,t.jsx)("input",{type:"text",value:D,onChange:e=>B(e.target.value),placeholder:v("notes.titlePlaceholder"),className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),(0,t.jsx)(C,{value:M,onChange:z}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,t.jsx)(g.Button,{variant:"outline",onClick:()=>{$(!1),_(null)},children:v("notes.cancel")}),(0,t.jsx)(g.Button,{onClick:A?Z:X,disabled:!D.trim()||!A&&!F,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:v("notes.save")})]})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(h,{active:O,onSelect:P}),(0,t.jsxs)("div",{className:`relative ${N?"opacity-40 pointer-events-none":""} transition-opacity`,children:[N&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(s.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===Y.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:v("notes.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:v("notes.noProjectHint")})]}):(0,t.jsx)(y,{notes:et,onEdit:e=>{B(e.title),z(e.content),U(e.category),_(e),$(!1)},onDelete:ee})]})]})})]})}],497732)},244455,e=>{e.v(t=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(t=>e.l(t))).then(()=>t(629495)))},800307,e=>{e.v(t=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(t=>e.l(t))).then(()=>t(267483)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,732649,e=>{"use strict";e.s(["mergeClasses",0,(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()])},346481,807283,e=>{"use strict";e.s(["default",0,{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}],346481),e.s(["hasA11yProp",0,e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1}],807283)},458464,e=>{"use strict";var t=e.i(965652),r=e.i(346481),n=e.i(807283),u=e.i(732649);let o=(0,t.createContext)({}),i=(0,t.forwardRef)(({color:e,size:i,strokeWidth:a,absoluteStrokeWidth:l,className:c="",children:s,iconNode:f,...d},h)=>{let{size:p=24,strokeWidth:v=2,absoluteStrokeWidth:g=!1,color:y="currentColor",className:m=""}=(0,t.useContext)(o)??{},b=l??g?24*Number(a??v)/Number(i??p):a??v;return(0,t.createElement)("svg",{ref:h,...r.default,width:i??p??r.default.width,height:i??p??r.default.height,stroke:e??y,strokeWidth:b,className:(0,u.mergeClasses)("lucide",m,c),...!s&&!(0,n.hasA11yProp)(d)&&{"aria-hidden":"true"},...d},[...f.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(s)?s:[s]])});e.s(["default",0,i],458464)},514798,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return o.callServer},createServerReference:function(){return a.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o=e.r(16587),i=e.r(233906),a=e.r(278793)},519587,e=>{"use strict";let t=(0,e.i(572989).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},400355,e=>{"use strict";var t=e.i(519587);e.s(["Loader2",()=>t.default])},597746,e=>{"use strict";var t=e.i(152279);e.s(["Check",()=>t.default])},226145,e=>{"use strict";let t=(0,e.i(572989).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",0,t],226145)},611893,e=>{"use strict";var t=e.i(965652);let r=t.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});e.s(["CompositeListContext",0,r,"useCompositeListContext",0,function(){return t.useContext(r)}])},655728,e=>{"use strict";var t,r=e.i(965652),n=e.i(804849),u=e.i(611893);let o=((t={})[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t);e.s(["IndexGuessBehavior",0,o,"useCompositeListItem",0,function(e={}){let{label:t,metadata:i,textRef:a,indexGuessBehavior:l,index:c}=e,{register:s,unregister:f,subscribeMapChange:d,elementsRef:h,labelsRef:p,nextIndexRef:v}=(0,u.useCompositeListContext)(),g=r.useRef(-1),[y,m]=r.useState(c??(l===o.GuessFromOrder?()=>{if(-1===g.current){let e=v.current;v.current+=1,g.current=e}return g.current}:-1)),b=r.useRef(null),R=r.useCallback(e=>{if(b.current=e,-1!==y&&null!==e&&(h.current[y]=e,p)){let r=void 0!==t;p.current[y]=r?t:a?.current?.textContent??e.textContent}},[y,h,p,t,a]);return(0,n.useIsoLayoutEffect)(()=>{if(null!=c)return;let e=b.current;if(e)return s(e,i),()=>{f(e)}},[c,s,f,i]),(0,n.useIsoLayoutEffect)(()=>{if(null==c)return d(e=>{let t=b.current?e.get(b.current)?.index:null;null!=t&&m(t)})},[c,d,m]),r.useMemo(()=>({ref:R,index:y}),[y,R])}])},579028,e=>{"use strict";var t=e.i(965652),r=e.i(903224),n=e.i(887642),u=e.i(804849),o=e.i(611893),i=e.i(289721);function a(){return new Map}function l(){return new Set}function c(e,t){let r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}e.s(["CompositeList",0,function(e){let{children:s,elementsRef:f,labelsRef:d,onMapChange:h}=e,p=(0,n.useStableCallback)(h),v=t.useRef(0),g=(0,r.useRefWithInit)(l).current,y=(0,r.useRefWithInit)(a).current,[m,b]=t.useState(0),R=t.useRef(m),E=(0,n.useStableCallback)((e,t)=>{y.set(e,t??null),R.current+=1,b(R.current)}),C=(0,n.useStableCallback)(e=>{y.delete(e),R.current+=1,b(R.current)}),x=t.useMemo(()=>{let e=new Map;return Array.from(y.keys()).filter(e=>e.isConnected).sort(c).forEach((t,r)=>{let n=y.get(t)??{};e.set(t,{...n,index:r})}),e},[y,m]);(0,u.useIsoLayoutEffect)(()=>{if("function"!=typeof MutationObserver||0===x.size)return;let e=new MutationObserver(e=>{let t=new Set,r=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(r),e.addedNodes.forEach(r)}),0===t.size&&(R.current+=1,b(R.current))});return x.forEach((t,r)=>{r.parentElement&&e.observe(r.parentElement,{childList:!0})}),()=>{e.disconnect()}},[x]),(0,u.useIsoLayoutEffect)(()=>{R.current===m&&(f.current.length!==x.size&&(f.current.length=x.size),d&&d.current.length!==x.size&&(d.current.length=x.size),v.current=x.size),p(x)},[p,x,f,d,m]),(0,u.useIsoLayoutEffect)(()=>()=>{f.current=[]},[f]),(0,u.useIsoLayoutEffect)(()=>()=>{d&&(d.current=[])},[d]);let O=(0,n.useStableCallback)(e=>(g.add(e),()=>{g.delete(e)}));(0,u.useIsoLayoutEffect)(()=>{g.forEach(e=>e(x))},[g,x]);let k=t.useMemo(()=>({register:E,unregister:C,subscribeMapChange:O,elementsRef:f,labelsRef:d,nextIndexRef:v}),[E,C,O,f,d,v]);return(0,i.jsx)(o.CompositeListContext.Provider,{value:k,children:s})}])},234951,471959,748299,e=>{"use strict";e.i(708878);var t=e.i(965652),r=e.i(92615),n=e.i(20746),u=e.i(887642),o=e.i(804849),i=e.i(102094),a=e.i(682354),l=e.i(447594),c=e.i(358527),s=e.i(205995),f=e.i(67077),d=e.i(586622),h=e.i(777321),p=e.i(331033);function v(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function g(e,t){return v(t,e===p.ARROW_UP||e===p.ARROW_DOWN,e===p.ARROW_LEFT||e===p.ARROW_RIGHT)}function y(e,t,r){return v(t,e===p.ARROW_DOWN,r?e===p.ARROW_LEFT:e===p.ARROW_RIGHT)||"Enter"===e||" "===e||""===e}e.s(["useListNavigation",0,function(e,m){let b="rootStore"in e?e.rootStore:e,R=b.useState("open"),E=b.useState("floatingElement"),C=b.useState("domReferenceElement"),x=b.context.dataRef,{listRef:O,activeIndex:k,onNavigate:I=()=>{},enabled:L=!0,selectedIndex:S=null,allowEscape:M=!1,loopFocus:T=!1,nested:_=!1,rtl:w=!1,virtual:N=!1,focusItemOnOpen:A="auto",focusItemOnHover:P=!0,openOnArrowKeyDown:D=!0,disabledIndices:j,orientation:W="vertical",parentOrientation:F,cols:U=1,id:z,resetOnPointerLeave:B=!0,externalTree:G}=m,K=(0,a.getFloatingFocusElement)(E),V=(0,n.useValueAsRef)(K),H=(0,s.useFloatingParentNodeId)(),$=(0,s.useFloatingTree)(G);(0,o.useIsoLayoutEffect)(()=>{x.current.orientation=W},[x,W]);let q=(0,a.isTypeableCombobox)(C),X=t.useRef(A),J=t.useRef(S??-1),Q=t.useRef(null),Y=t.useRef(!0),Z=(0,u.useStableCallback)(e=>{I(-1===J.current?null:J.current,e)}),ee=t.useRef(Z),et=t.useRef(!!E),er=t.useRef(R),en=t.useRef(!1),eu=t.useRef(!1),eo=(0,n.useValueAsRef)(j),ei=(0,n.useValueAsRef)(R),ea=(0,n.useValueAsRef)(S),el=(0,n.useValueAsRef)(B),ec=(0,u.useStableCallback)(()=>{function e(e){N?$?.events.emit("virtualfocus",e):(0,h.enqueueFocus)(e,{sync:en.current,preventScroll:!0})}let t=O.current[J.current],r=eu.current;t&&e(t),(en.current?e=>e():requestAnimationFrame)(()=>{let n=O.current[J.current]||t;!n||(t||e(n),ef&&(r||!Y.current)&&n.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});(0,o.useIsoLayoutEffect)(()=>{L&&(R&&E?(J.current=S??-1,X.current&&null!=S&&(eu.current=!0,Z())):et.current&&(J.current=-1,ee.current()))},[L,R,E,S,Z]),(0,o.useIsoLayoutEffect)(()=>{if(L){if(!R){en.current=!1;return}if(E)if(null==k){if(en.current=!1,null!=ea.current)return;if(et.current&&(J.current=-1,ec()),(!er.current||!et.current)&&X.current&&(null!=Q.current||!0===X.current&&null==Q.current)){let e=0,t=()=>{null==O.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(J.current=null==Q.current||y(Q.current,W,w)||_?(0,c.getMinListIndex)(O):(0,c.getMaxListIndex)(O),Q.current=null,Z())};t()}}else(0,c.isIndexOutOfListBounds)(O,k)||(J.current=k,ec(),eu.current=!1)}},[L,R,E,k,ea,_,O,W,w,Z,ec,eo]),(0,o.useIsoLayoutEffect)(()=>{if(!L||E||!$||N||!et.current)return;let e=$.nodesRef.current,t=e.find(e=>e.id===H)?.context?.elements.floating,r=(0,a.activeElement)((0,i.ownerDocument)(E)),n=e.some(e=>e.context&&(0,a.contains)(e.context.elements.floating,r));t&&!n&&Y.current&&t.focus({preventScroll:!0})},[L,E,$,H,N]),(0,o.useIsoLayoutEffect)(()=>{ee.current=Z,er.current=R,et.current=!!E}),(0,o.useIsoLayoutEffect)(()=>{R||(Q.current=null,X.current=A)},[R,A]);let es=null!=k,ef=t.useMemo(()=>{function e(e){if(!ei.current)return;let t=O.current.indexOf(e.currentTarget);-1!==t&&J.current!==t&&(J.current=t,Z(e))}return{onFocus(t){en.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){en.current=!0,eu.current=!1,P&&e(t)},onPointerLeave(e){if(!ei.current||!Y.current||"touch"===e.pointerType)return;en.current=!0;let t=e.relatedTarget;if(!(!P||O.current.includes(t))&&el.current&&((0,h.enqueueFocus)(null,{sync:!0}),J.current=-1,Z(e),!N)){let e=V.current,t=(0,a.activeElement)((0,i.ownerDocument)(e));e&&(0,a.contains)(e,t)&&e.focus({preventScroll:!0})}}}},[ei,V,P,O,Z,el,N]),ed=t.useCallback(()=>F??$?.nodesRef.current.find(e=>e.id===H)?.context?.dataRef?.current.orientation,[H,$,F]),eh=(0,u.useStableCallback)(e=>{var t;let n,u;if(Y.current=!1,en.current=!0,229===e.which||!ei.current&&e.currentTarget===V.current)return;if(_&&(t=e.key,n=w?t===p.ARROW_RIGHT:t===p.ARROW_LEFT,u=t===p.ARROW_UP,"both"===W||"horizontal"===W&&U&&U>1?"Escape"===t:v(W,n,u))){g(e.key,ed())||(0,l.stopEvent)(e),b.setOpen(!1,(0,f.createChangeEventDetails)(d.REASONS.listNavigation,e.nativeEvent)),(0,r.isHTMLElement)(C)&&(N?$?.events.emit("virtualfocus",C):C.focus());return}let o=J.current,i=(0,c.getMinListIndex)(O,j),s=(0,c.getMaxListIndex)(O,j);if(q||("Home"===e.key&&((0,l.stopEvent)(e),J.current=i,Z(e)),"End"===e.key&&((0,l.stopEvent)(e),J.current=s,Z(e))),U>1){let t=Array.from({length:O.current.length},()=>({width:1,height:1})),r=(0,c.createGridCellMap)(t,U,!1),n=r.findIndex(e=>null!=e&&!(0,c.isListIndexDisabled)(O,e,j)),u=r.reduce((e,t,r)=>null==t||(0,c.isListIndexDisabled)(O,t,j)?e:r,-1),o=r[(0,c.getGridNavigatedIndex)({current:r.map(e=>null!=e?O.current[e]:null)},{event:e,orientation:W,loopFocus:T,rtl:w,cols:U,disabledIndices:(0,c.getGridCellIndices)([...("function"!=typeof j?j:null)||O.current.map((e,t)=>(0,c.isListIndexDisabled)(O,t,j)?t:void 0),void 0],r),minIndex:n,maxIndex:u,prevIndex:(0,c.getGridCellIndexOfCorner)(J.current>s?i:J.current,t,r,U,e.key===p.ARROW_DOWN?"bl":e.key===(w?p.ARROW_LEFT:p.ARROW_RIGHT)?"tr":"tl"),stopEvent:!0})];if(null!=o&&(J.current=o,Z(e)),"both"===W)return}if(g(e.key,W)){if((0,l.stopEvent)(e),R&&!N&&(0,a.activeElement)(e.currentTarget.ownerDocument)===e.currentTarget){J.current=y(e.key,W,w)?i:s,Z(e);return}y(e.key,W,w)?T?o>=s?M&&o!==O.current.length?J.current=-1:(en.current=!1,J.current=i):J.current=(0,c.findNonDisabledListIndex)(O,{startingIndex:o,disabledIndices:j}):J.current=Math.min(s,(0,c.findNonDisabledListIndex)(O,{startingIndex:o,disabledIndices:j})):T?o<=i?M&&-1!==o?J.current=O.current.length:(en.current=!1,J.current=s):J.current=(0,c.findNonDisabledListIndex)(O,{startingIndex:o,decrement:!0,disabledIndices:j}):J.current=Math.max(i,(0,c.findNonDisabledListIndex)(O,{startingIndex:o,decrement:!0,disabledIndices:j})),(0,c.isIndexOutOfListBounds)(O,J.current)&&(J.current=-1),Z(e)}}),ep=t.useMemo(()=>N&&R&&es&&{"aria-activedescendant":`${z}-${k}`},[N,R,es,z,k]),ev=t.useMemo(()=>({"aria-orientation":"both"===W?void 0:W,...!q?ep:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&R&&!N){let t=(0,a.getTarget)(e.nativeEvent);if(t&&!(0,a.contains)(V.current,t))return;(0,l.stopEvent)(e),b.setOpen(!1,(0,f.createChangeEventDetails)(d.REASONS.focusOut,e.nativeEvent)),(0,r.isHTMLElement)(C)&&C.focus();return}eh(e)},onPointerMove(){Y.current=!0}}),[ep,eh,V,W,q,b,R,N,C]),eg=t.useMemo(()=>{function e(e){"auto"===A&&(0,l.isVirtualClick)(e.nativeEvent)&&(X.current=!N)}function t(e){X.current=A,"auto"===A&&(0,l.isVirtualPointerEvent)(e.nativeEvent)&&(X.current=!0)}return{onKeyDown(e){var t,r;let n=b.select("open");Y.current=!1;let u=e.key.startsWith("Arrow"),o=(t=e.key,r=ed(),v(r,w?t===p.ARROW_LEFT:t===p.ARROW_RIGHT,t===p.ARROW_DOWN)),i=g(e.key,W),a=(_?o:i)||"Enter"===e.key||""===e.key.trim();if(N&&n)return eh(e);if(n||D||!u){if(a){let t=g(e.key,ed());Q.current=_&&t?null:e.key}if(_){o&&((0,l.stopEvent)(e),n?(J.current=(0,c.getMinListIndex)(O,eo.current),Z(e)):b.setOpen(!0,(0,f.createChangeEventDetails)(d.REASONS.listNavigation,e.nativeEvent,e.currentTarget)));return}i&&(null!=ea.current&&(J.current=ea.current),(0,l.stopEvent)(e),!n&&D?b.setOpen(!0,(0,f.createChangeEventDetails)(d.REASONS.listNavigation,e.nativeEvent,e.currentTarget)):eh(e),n&&Z(e))}},onFocus(e){b.select("open")&&!N&&(J.current=-1,Z(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[eh,eo,A,O,_,Z,b,D,W,ed,w,ea,N]),ey=t.useMemo(()=>({...ep,...eg}),[ep,eg]);return t.useMemo(()=>L?{reference:ey,floating:ev,item:ef,trigger:eg}:{},[L,ey,ev,eg,ef])}],234951);var m=e.i(161476);e.s(["useTypeahead",0,function(e,r){let n="rootStore"in e?e.rootStore:e,i=n.context.dataRef,s=n.useState("open"),{listRef:f,elementsRef:d,activeIndex:h,onMatch:p,onTypingChange:v,enabled:g=!0,resetMs:y=750,selectedIndex:b=null}=r,R=(0,m.useTimeout)(),E=t.useRef(""),C=t.useRef(b??h??-1),x=t.useRef(null);(0,o.useIsoLayoutEffect)(()=>{(s||null===b)&&(R.clear(),x.current=null,""!==E.current&&(E.current=""))},[s,b,R]),(0,o.useIsoLayoutEffect)(()=>{s&&""===E.current&&(C.current=b??h??-1)},[s,b,h]);let O=(0,u.useStableCallback)(e=>{e?i.current.typing||(i.current.typing=e,v?.(e)):i.current.typing&&(i.current.typing=e,v?.(e))}),k=(0,u.useStableCallback)(e=>{function t(e,r,n=0){if(0===e.length)return -1;let u=(n%e.length+e.length)%e.length,o=r.toLocaleLowerCase();for(let t=0;t<e.length;t+=1){let r=(u+t)%e.length,n=e[r];if(n?.toLocaleLowerCase().startsWith(o)&&function(e){let t=d?.current[e];return!t||(0,c.isElementVisible)(t)}(r))return r}return -1}let r=f.current;if(E.current.length>0&&" "===e.key&&((0,l.stopEvent)(e),O(!0)),E.current.length>0&&" "!==E.current[0]&&-1===t(r,E.current)&&" "!==e.key&&O(!1),null==r||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;s&&" "!==e.key&&((0,l.stopEvent)(e),O(!0));let n=""===E.current;n&&(C.current=b??h??-1),r.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&E.current===e.key&&(E.current="",C.current=x.current),E.current+=e.key,R.start(y,()=>{E.current="",C.current=x.current,O(!1)});let u=n?b??h??-1:C.current,o=t(r,E.current,(u??0)+1);-1!==o?(p?.(o),x.current=o):" "!==e.key&&(E.current="",O(!1))}),I=(0,u.useStableCallback)(e=>{let t=e.relatedTarget,r=n.select("domReferenceElement"),u=n.select("floatingElement"),o=(0,a.contains)(r,t),i=(0,a.contains)(u,t);o||i||(R.clear(),E.current="",C.current=x.current,O(!1))}),L=t.useMemo(()=>({onKeyDown:k,onBlur:I}),[k,I]),S=t.useMemo(()=>({onKeyDown:k,onBlur:I}),[k,I]);return t.useMemo(()=>g?{reference:L,floating:S}:{},[g,L,S])}],471959),e.s(["getPseudoElementBounds",0,function(e){let t=e.getBoundingClientRect(),r=window.getComputedStyle(e,"::before"),n=window.getComputedStyle(e,"::after");if("none"===r.content&&"none"===n.content)return t;let u=parseFloat(r.width)||0,o=parseFloat(r.height)||0,i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,l=Math.max(t.width,u,i),c=Math.max(t.height,o,a),s=l-t.width,f=c-t.height;return{left:t.left-s/2,right:t.right+s/2,top:t.top-f/2,bottom:t.bottom+f/2}}],748299)},983640,e=>{"use strict";var t=e.i(965652),r=e.i(581263);let n=t.forwardRef(function(e,t){let{className:n,render:u,orientation:o="horizontal",...i}=e;return(0,r.useRenderElement)("div",e,{state:{orientation:o},ref:t,props:[{role:"separator","aria-orientation":o},i]})});e.s(["Separator",0,n])},533133,e=>{"use strict";var t=e.i(152279);e.s(["CheckIcon",()=>t.default])},314338,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},645378,e=>{"use strict";let t=(0,e.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"}]]);e.s(["FileText",0,t],645378)},624687,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["Textarea",0,function({className:e,...n}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.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",e),...n})}])},196368,e=>{"use strict";var t=e.i(462902),r=e.i(965652);let n=r.createContext(void 0);e.s(["useToolbarRootContext",0,function(e){let u=r.useContext(n);if(void 0===u&&!e)throw Error((0,t.default)(69));return u}])},487278,e=>{"use strict";let t=(0,e.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"}]]);e.s(["Archive",0,t],487278)},501244,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o=e.r(744066)._(e.r(565893)),i=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",u=e.pathname||"",a=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let s=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),u&&"/"!==u[0]&&(u="/"+u)):c||(c=""),a&&"#"!==a[0]&&(a="#"+a),s&&"?"!==s[0]&&(s="?"+s),u=u.replace(/[?#]/g,encodeURIComponent),s=s.replace("#","%23"),`${n}${c}${u}${s}${a}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return a(e)}},668649,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return u}});let n=e.r(965652);function u(e,t){let r=(0,n.useRef)(null),u=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=u.current;t&&(u.current=null,t())}else e&&(r.current=o(e,n)),t&&(u.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},927683,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(204575),u=e.r(394864);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,u.hasBasePath)(r.pathname)}catch(e){return!1}}},573088,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},210702,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o=e.r(744066),i=e.r(289721),a=o._(e.r(965652)),l=e.r(501244),c=e.r(74122),s=e.r(668649),f=e.r(204575),d=e.r(44204);e.r(619172);let h=e.r(840535),p=e.r(255397),v=e.r(927683),g=e.r(530620);function y(t){var r,n;let u,o,y,[b,R]=(0,a.useOptimistic)(p.IDLE_LINK_STATUS),E=(0,a.useRef)(null),{href:C,as:x,children:O,prefetch:k=null,passHref:I,replace:L,shallow:S,scroll:M,onClick:T,onMouseEnter:_,onTouchStart:w,legacyBehavior:N=!1,onNavigate:A,transitionTypes:P,ref:D,unstable_dynamicOnHover:j,...W}=t;u=O,N&&("string"==typeof u||"number"==typeof u)&&(u=(0,i.jsx)("a",{children:u}));let F=a.default.useContext(c.AppRouterContext),U=!1!==k,z=!1!==k?null===(n=k)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=x||C)?r:(0,l.formatUrl)(r);if(N){if(u?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=a.default.Children.only(u)}let G=N?o&&"object"==typeof o&&o.ref:D,K=a.default.useCallback(e=>(null!==F&&(E.current=(0,p.mountLinkInstance)(e,B,F,z,U,R)),()=>{E.current&&((0,p.unmountLinkForCurrentNavigation)(E.current),E.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,B,F,z,R]),V={ref:(0,s.useMergedRef)(K,G),onClick(t){N||"function"!=typeof T||T(t),N&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!F||t.defaultPrevented||function(t,r,n,u,o,i,l){if("u">typeof window){let c,{nodeName:s}=t.currentTarget;if("A"===s.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,v.isLocalURL)(r)){u&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(238105);a.default.startTransition(()=>{f(r,u?"replace":"push",!1===o?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,B,E,L,M,A,P)},onMouseEnter(e){N||"function"!=typeof _||_(e),N&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),F&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===j)},onTouchStart:function(e){N||"function"!=typeof w||w(e),N&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),F&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===j)}};return(0,f.isAbsoluteUrl)(B)?V.href=B:N&&!I&&("a"!==o.type||"href"in o.props)||(V.href=(0,d.addBasePath)(B)),y=N?a.default.cloneElement(o,V):(0,i.jsx)("a",{...W,...V,children:u}),(0,i.jsx)(m.Provider,{value:b,children:y})}e.r(573088);let m=(0,a.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,a.useContext)(m);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,301348,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],301348);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)},236967,e=>{"use strict";var t=e.i(289721),a=e.i(210702),r=e.i(538059),s=e.i(259846),n=e.i(645378),i=e.i(453889),l=e.i(487278),o=e.i(533499);let d=[{key:"notes",icon:n.FileText},{key:"assets",icon:i.FolderOpen},{key:"archive",icon:l.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:n}=(0,o.useI18n)(),i=(0,r.usePathname)(),l=d.find(e=>i.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,t.jsxs)(a.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(s.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),d.map(r=>{let s=r.icon,i=l===r.key;return(0,t.jsxs)(a.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 ${i?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(s,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n(`sidebar.${r.key}`)})]},r.key)})]})}])},245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},487486,e=>{"use strict";var t=e.i(565455),a=e.i(581263),r=e.i(294237),s=e.i(975157);let n=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",render:i,...l}){var o;return o={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,s.cn)(n({variant:r}),e)},l),render:i,state:{slot:"badge",variant:r}},(0,a.useRenderElement)(o.defaultTagName??"div",o,o)}],487486)},786508,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("403d1df8a142d93b5320c6f253ba669b1176f03d16",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,a])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},453930,977998,12659,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("4010962b6e3809e9ec6adcc5e4727e5afa521b684c",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,a],453930);let r=(0,t.createServerReference)("40ffbf43f53a51dbec34e07f44c777d2eac35a0385",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,r],977998);let s=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,s],12659)},736061,460707,e=>{"use strict";var t=e.i(572989);let a=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,a],736061);let r=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,r],460707)},35967,e=>{"use strict";var t=e.i(289721);let a=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var r=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function n(e){return s[function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e)%s.length]}let i={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:r,showName:s=!1,className:n="",title:i}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${n}`,title:i??(r?`${e} \xb7 ${r}`:e),children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&r?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:r}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:a}=(0,r.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${i[e]}`,children:a(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:a}=(0,r.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:a("version.type.uncategorized")})},"typeBadgeColor",0,n],35967)},980376,822305,e=>{"use strict";var t=e.i(289721),a=e.i(225061),r=e.i(975157),s=e.i(519455),n=e.i(670123);function i({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function l({className:e,...s}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:d="right",showCloseButton:c=!0,...u}){return(0,t.jsxs)(i,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":d,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[o,c&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...s})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...s})}],980376);var o=e.i(514798);let d=(0,o.createServerReference)("405fce19efb2cf0b35a9d14b1a7c8a55c28ea204f4",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,d],822305)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(980376),s=e.i(759684),n=e.i(487486),i=e.i(519455),l=e.i(533499),o=e.i(938123),d=e.i(822305),c=e.i(74908),u=e.i(453930),x=e.i(977998),m=e.i(786508),h=e.i(744798),p=e.i(685149),g=e.i(606393),f=e.i(875840),b=e.i(245697),v=e.i(12659),y=e.i(736061),j=e.i(460707),N=e.i(567860);function k({added:e,removed:a}){let{t:r}=(0,l.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:r("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var w=e.i(35967),S=e.i(360112);e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:C,taskId:I}){let{t:T}=(0,l.useI18n)(),[D,E]=(0,a.useState)(null),[A,M]=(0,a.useTransition)(),[O,R]=(0,a.useState)(!1),[P,$]=(0,a.useState)([]);(0,a.useEffect)(()=>{I&&e?M(async()=>{let e=await (0,d.getTaskOverview)(I);e&&(E(e),e.project?.workspaceId&&(0,c.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{$(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>$([])))}):E(null)},[I,e]);let L=D?p.BOARD_COLUMNS.find(e=>e.id===D.status):null,B=D?p.PRIORITY_CONFIG[D.priority]:null,F=D?.executions?.[0]??null,z=(()=>{if(F?.worktreePath)return F.worktreePath;let e=D?.project?.localPath;return e?D?.subPath?`${e}/${D.subPath}`:e:null})(),V=(()=>{let e=F?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),U=async e=>{if(D?.project)try{let{autoStart:t,...a}=e;await (0,o.createTask)({...a,projectId:D.project.id}),S.toast.success(T("taskDrawer.duplicateSuccess")),R(!1),C(!1)}catch{S.toast.error(T("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(r.Sheet,{open:e,onOpenChange:C,children:[(0,t.jsxs)(r.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(r.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:D?.title??""}),(0,t.jsx)(r.SheetDescription,{className:"sr-only",children:T("taskDrawer.title")}),D&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[L&&(0,t.jsxs)(n.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${L.color}`}),L.label]}),B&&(0,t.jsx)(n.Badge,{variant:"secondary",className:`text-xs ${B.color}`,children:B.label}),D.version&&(0,t.jsx)(w.TaskVersionTag,{number:D.version.number,name:D.version.name,showName:!0})]})]}),(0,t.jsx)(s.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:A&&!D?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:T("assets.loading")}):D?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:T("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:D.description||T("taskDrawer.noDescription")})]}),D.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:T("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:D.labels.map(e=>(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(g.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:T("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(D.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(b.Package,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:T("taskDrawer.resources")}),(0,t.jsx)("span",{className:"text-foreground",children:D._count.assets})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:T("taskDrawer.fileChanges")}),V?(0,t.jsx)(k,{added:V.added,removed:V.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(v.PlayCircle,{className:"h-3.5 w-3.5"}),T("taskDrawer.lastExecution")]}),F?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:F.status}),F.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:F.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("taskDrawer.noExecution")})]}),z&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,u.openInFileManager)(z)}catch(e){console.error("openInFileManager failed:",e),S.toast.error(T("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(y.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInFileManager")]}),(0,t.jsxs)(i.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,x.openInEditor)(z)}catch(e){console.error("openInEditor failed:",e),S.toast.error(T("git.openInEditorFailed"))}},children:[(0,t.jsx)(j.Code,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInEditor")]}),(0,t.jsxs)(i.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,m.openInTerminal)(z)}catch(e){console.error("openInTerminal failed:",e),S.toast.error(T("git.openInTerminalFailed"))}},children:[(0,t.jsx)(N.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),T("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(i.Button,{variant:"default",className:"w-full",onClick:()=>{D&&R(!0)},disabled:!D,children:[(0,t.jsx)(f.Copy,{className:"h-4 w-4"}),T("taskDrawer.duplicate")]})})]}):null})]}),D?.project&&(0,t.jsx)(h.CreateTaskDialog,{open:O,onOpenChange:R,onSubmit:U,labels:P,projectType:D.project.type,projectLocalPath:D.project.localPath,prefillFromTask:{title:D.title,description:D.description,priority:D.priority,subPath:D.subPath,labelIds:D.labels.map(e=>e.label.id),baseBranch:D.baseBranch}})]})}],605005)},107830,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(487278),s=e.i(301348),n=e.i(181209),i=e.i(400355),l=e.i(280027),o=e.i(533499),d=e.i(236967),c=e.i(514798);let u=(0,c.createServerReference)("4080354b674f4768e267ebd9cf353c32dfa42dcb03",c.callServer,void 0,c.findSourceMapURL,"getArchivedTasks");var x=e.i(605005),m=e.i(35967);function h(e){return new Date(e).toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function p({priority:e}){return(0,t.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${{LOW:"bg-slate-400",MEDIUM:"bg-amber-400",HIGH:"bg-orange-500",CRITICAL:"bg-rose-500"}[e]??"bg-slate-400"}`})}e.s(["ArchivePageClient",0,function({allWorkspaces:e,initialWorkspaceId:c,initialProjectId:g,initialTasks:f}){let b,{t:v}=(0,o.useI18n)(),[y,j]=(0,a.useTransition)(),[N,k]=(0,a.useState)(c),[w,S]=(0,a.useState)(g),[C,I]=(0,a.useState)(f),[T,D]=(0,a.useState)(null),E=e.find(e=>e.id===N),A=E?.projects??[],M=(0,a.useCallback)(e=>{e?j(async()=>{I(await u(e))}):I([])},[j]);return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(d.SubPageNav,{workspaceId:N}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(l.Select,{value:N,onValueChange:t=>t&&(t=>{if(t===N)return;k(t);let a=e.find(e=>e.id===t),r=a?.projects[0]??null;S(r?.id??null),M(r?.id??null)})(t),children:[(0,t.jsx)(l.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:E?.name??N})}),(0,t.jsx)(l.SelectContent,{children:e.map(e=>(0,t.jsx)(l.SelectItem,{value:e.id,children:e.name},e.id))})]}),A.length>0&&(0,t.jsxs)(l.Select,{value:w??"",onValueChange:e=>e&&void(e!==w&&(S(e),M(e))),children:[(0,t.jsx)(l.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(b=A.find(e=>e.id===w))?b.alias?`${b.name} (${b.alias})`:b.name:""})}),(0,t.jsx)(l.SelectContent,{children:A.map(e=>(0,t.jsxs)(l.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,t.jsxs)("span",{className:"ml-auto rounded-full bg-muted px-2.5 py-0.5 text-[11px] text-muted-foreground",children:[C.length," ",v("archive.tasksCount")]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,t.jsxs)("div",{className:`relative ${y?"opacity-40 pointer-events-none":""} transition-opacity`,children:[y&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(i.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===C.length?(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)(r.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:v("archive.noTasks")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:v("archive.noTasksDesc")})]}):(0,t.jsx)("div",{className:"space-y-2",children:C.map(e=>{let a="DONE"===e.status,r=e.executions[0];return(0,t.jsx)("div",{role:"button",tabIndex:0,onClick:()=>D(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),D(e.id))},className:"group cursor-pointer rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:border-border/80 hover:bg-accent/30 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"mt-0.5 shrink-0",children:a?(0,t.jsx)(s.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):(0,t.jsx)(n.XCircle,{className:"h-4 w-4 text-rose-500"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(p,{priority:e.priority}),(0,t.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:e.title}),(0,t.jsx)("span",{className:`ml-1 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ${a?"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:a?v("archive.status.done"):v("archive.status.cancelled")}),e.version&&(0,t.jsx)(m.TaskVersionTag,{number:e.version.number,name:e.version.name,showName:!0,className:"shrink-0"})]}),e.labels.length>0&&(0,t.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:e.labels.map(e=>(0,t.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,outline:`1px solid ${e.label.color}40`},children:e.label.name},e.label.id))}),(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,t.jsxs)("span",{children:[v("archive.createdAt"),": ",h(e.createdAt)]}),(0,t.jsxs)("span",{children:[a?v("archive.completedAt"):v("archive.cancelledAt"),": ",h(e.updatedAt)]}),r&&(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[v("archive.lastExecution"),":"," ",(0,t.jsx)("span",{className:`rounded px-1 py-0.5 font-mono text-[10px] ${"COMPLETED"===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,t.jsx)(x.TaskOverviewDrawer,{open:!!T,onOpenChange:e=>{e||D(null)},taskId:T})]})}],107830)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,565893,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return o},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return l}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});function s(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,i(e));else t.set(r,i(a));return t}function o(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},204575,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return v},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return y},PageNotFoundError:function(){return b},SP:function(){return p},ST:function(){return g},WEB_VITALS:function(){return s},execOnce:function(){return i},getDisplayName:function(){return u},getLocationOrigin:function(){return c},getURL:function(){return d},isAbsoluteUrl:function(){return o},isResSent:function(){return f},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return S}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>l.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function d(){let{href:e}=window.location,t=c();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&f(r))return a;if(!a)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let p="u">typeof performance,g=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class v extends Error{}class y extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function S(e){return JSON.stringify({message:e.message,stack:e.stack})}},619172,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},74908,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4035e735b1b22894193be485cb6a9524a54a795c4a",t.callServer,void 0,t.findSourceMapURL,"getLabelsForWorkspace");e.s(["getLabelsForWorkspace",0,r])},464249,e=>{"use strict";let t=(0,e.i(572989).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],464249)},821957,e=>{"use strict";var t=e.i(965652),r=(e,t,r,a,n,s,i,l)=>{let o=document.documentElement,c=["light","dark"];function d(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,a=r&&s?n.map(e=>s[e]||e):n;r?(o.classList.remove(...a),o.classList.add(s&&s[t]?s[t]:t)):o.setAttribute(e,t)}),r=t,l&&c.includes(r)&&(o.style.colorScheme=r)}if(a)d(a);else try{let e=localStorage.getItem(t)||r,a=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(a)}catch(e){}},a=["light","dark"],n="(prefers-color-scheme: dark)",s="u"<typeof window,i=t.createContext(void 0),l={setTheme:e=>{},themes:[]},o=["light","dark"],c=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:l=!0,storageKey:c="theme",themes:m=o,defaultTheme:p=s?"system":"light",attribute:g="data-theme",value:v,children:y,nonce:b,scriptProps:x})=>{let[k,S]=t.useState(()=>u(c,p)),[w,C]=t.useState(()=>"system"===k?h():k),j=v?Object.values(v):m,E=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&s&&(t=h());let n=v?v[t]:t,i=r?f(b):null,o=document.documentElement,c=e=>{"class"===e?(o.classList.remove(...j),n&&o.classList.add(n)):e.startsWith("data-")&&(n?o.setAttribute(e,n):o.removeAttribute(e))};if(Array.isArray(g)?g.forEach(c):c(g),l){let e=a.includes(p)?p:null,r=a.includes(t)?t:e;o.style.colorScheme=r}null==i||i()},[b]),N=t.useCallback(e=>{let t="function"==typeof e?e(k):e;S(t);try{localStorage.setItem(c,t)}catch(e){}},[k]),M=t.useCallback(t=>{C(h(t)),"system"===k&&s&&!e&&E("system")},[k,e]);t.useEffect(()=>{let e=window.matchMedia(n);return e.addListener(M),M(e),()=>e.removeListener(M)},[M]),t.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?S(e.newValue):N(p))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[N]),t.useEffect(()=>{E(null!=e?e:k)},[e,k]);let P=t.useMemo(()=>({theme:k,setTheme:N,forcedTheme:e,resolvedTheme:"system"===k?w:k,themes:s?[...m,"system"]:m,systemTheme:s?w:void 0}),[k,N,e,w,s,m]);return t.createElement(i.Provider,{value:P},t.createElement(d,{forcedTheme:e,storageKey:c,attribute:g,enableSystem:s,enableColorScheme:l,defaultTheme:p,value:v,themes:m,nonce:b,scriptProps:x}),y)},d=t.memo(({forcedTheme:e,storageKey:a,attribute:n,enableSystem:s,enableColorScheme:i,defaultTheme:l,value:o,themes:c,nonce:d,scriptProps:u})=>{let f=JSON.stringify([n,a,l,e,c,o,s,i]).slice(1,-1);return t.createElement("script",{...u,suppressHydrationWarning:!0,nonce:"u"<typeof window?d:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${f})`}})}),u=(e,t)=>{let r;if(!s){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},f=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},h=e=>(e||(e=window.matchMedia(n)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(i)?t.createElement(t.Fragment,null,e.children):t.createElement(c,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(i))?e:l}])},824480,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("00fbc689cb0a02219ea14de9ae0e6a836b6ccd9815",t.callServer,void 0,t.findSourceMapURL,"getActualWsPort");e.s(["getActualWsPort",0,r])},966001,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(938499),n=e.i(194358),s=e.i(519455);class i extends r.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("[ErrorBoundary]",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 p-8 text-center",children:[(0,t.jsx)(a.AlertCircle,{className:"h-8 w-8 text-destructive"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Something went wrong"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:this.state.error?.message??"An unexpected error occurred"})]}),(0,t.jsxs)(s.Button,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:[(0,t.jsx)(n.RefreshCw,{className:"mr-2 h-3.5 w-3.5"}),"Retry"]})]}):this.props.children}}e.s(["ErrorBoundary",0,i])},3730,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("408c8af808f6135a2406e34f132c3d198b9be882e3",t.callServer,void 0,t.findSourceMapURL,"installExtension");e.s(["installExtension",0,r])},812983,e=>{"use strict";let t=(0,e.i(572989).default)("file-code",[["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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]);e.s(["FileCode",0,t],812983)},887911,e=>{"use strict";var t=e.i(738690),r=e.i(812983);let a={rg:{id:"rg",name:"代码搜索 (ripgrep)",description:"基于 rg 的全文代码搜索",icon:t.Search,sizeMB:5,homepageUrl:"https://github.com/BurntSushi/ripgrep#installation",manualInstall:!0},monaco:{id:"monaco",name:"代码编辑器 (Monaco)",description:"VS Code 同款 Web 编辑器",icon:r.FileCode,sizeMB:15,homepageUrl:"https://microsoft.github.io/monaco-editor/"}},n=[a.rg,a.monaco];e.s(["listExtensionMetadata",0,function(){return n}])},919136,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6036b3b4879c62e8bbc7f6ec5b55c8eb61b230d299",t.callServer,void 0,t.findSourceMapURL,"setConfigValue");e.s(["setConfigValue",0,r])},387091,15299,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,r],387091);let a=(0,t.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,a],15299)},699375,e=>{"use strict";var t,r=e.i(289721);e.s([],159880),e.i(159880),e.i(708878);var a=e.i(965652),n=e.i(314757),s=e.i(887642),i=e.i(362891),l=e.i(804849),o=e.i(416369),c=e.i(954588),d=e.i(581263),u=e.i(565455),f=e.i(207516),h=e.i(282109),m=e.i(462902);let p=a.createContext(void 0);var g=e.i(551974);let v=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.disabled="data-disabled",t.readonly="data-readonly",t.required="data-required",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),y={...g.fieldValidityMapping,checked:e=>e?{[v.checked]:""}:{[v.unchecked]:""}};var b=e.i(421689),x=e.i(890514),k=e.i(571870),S=e.i(179279),w=e.i(103353),C=e.i(67077),j=e.i(586622),E=e.i(353052);let N=a.forwardRef(function(e,t){let{checked:m,className:g,defaultChecked:v,"aria-labelledby":N,id:M,inputRef:P,name:T,nativeButton:O=!1,onCheckedChange:I,readOnly:R=!1,required:L=!1,disabled:F=!1,render:A,uncheckedValue:z,value:D,...V}=e,{clearErrors:B}=(0,k.useFormContext)(),{state:U,setTouched:_,setDirty:H,validityData:$,setFilled:K,setFocused:J,shouldValidateOnChange:q,validationMode:W,disabled:G,name:Y,validation:Z}=(0,x.useFieldRootContext)(),{labelId:Q}=(0,S.useLabelableContext)(),X=G||F,ee=Y??T,et=(0,s.useStableCallback)(I),er=a.useRef(null),ea=(0,i.useMergedRefs)(er,P,Z.inputRef),en=a.useRef(null),es=(0,f.useBaseUiId)(),ei=(0,w.useLabelableId)({id:M,implicit:!1,controlRef:en}),el=O?void 0:ei,[eo,ec]=(0,n.useControlled)({controlled:m,default:!!v,name:"Switch",state:"checked"});(0,b.useField)({id:es,commit:Z.commit,value:eo,controlRef:en,name:ee,getValue:()=>eo}),(0,l.useIsoLayoutEffect)(()=>{er.current&&K(er.current.checked)},[er,K]),(0,E.useValueChanged)(eo,()=>{B(ee),H(eo!==$.initialValue),K(eo),q()?Z.commit(eo):Z.commit(eo,!0)});let{getButtonProps:ed,buttonRef:eu}=(0,h.useButton)({disabled:X,native:O}),ef=function(e,t,r,n=!0,s){let[i,o]=a.useState(),c=(0,f.useBaseUiId)(s?`${s}-label`:void 0),d=e??t??i;return(0,l.useIsoLayoutEffect)(()=>{let a=e||t||!n?void 0:function(e,t){let r=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let r=e.id;if(r){let t=e.nextElementSibling;if(t&&t.htmlFor===r)return t}let a=e.labels;return a&&a[0]}(e);if(r)return!r.id&&t&&(r.id=t),r.id||void 0}(r.current,c);i!==a&&o(a)}),d}(N,Q,er,!O,el),eh=a.useMemo(()=>(0,u.mergeProps)({checked:eo,disabled:X,id:el,name:ee,required:L,style:ee?o.visuallyHiddenInput:o.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ea,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,r=(0,C.createChangeEventDetails)(j.REASONS.none,e.nativeEvent);et?.(t,r),r.isCanceled||ec(t)},onFocus(){en.current?.focus()}},Z.getInputValidationProps,void 0!==D?{value:D}:c.EMPTY_OBJECT),[eo,X,ea,el,ee,et,L,ec,Z,D]),em=a.useMemo(()=>({...U,checked:eo,disabled:X,readOnly:R,required:L}),[U,eo,X,R,L]),ep=(0,d.useRenderElement)("span",e,{state:em,ref:[t,en,eu],props:[{id:O?ei:es,role:"switch","aria-checked":eo,"aria-readonly":R||void 0,"aria-required":L||void 0,"aria-labelledby":ef,onFocus(){X||J(!0)},onBlur(){let e=er.current;e&&!X&&(_(!0),J(!1),"onBlur"===W&&Z.commit(e.checked))},onClick(e){R||X||(e.preventDefault(),er.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},Z.getValidationProps,V,ed],stateAttributesMapping:y});return(0,r.jsxs)(p.Provider,{value:em,children:[ep,!eo&&ee&&void 0!==z&&(0,r.jsx)("input",{type:"hidden",name:ee,value:z}),(0,r.jsx)("input",{...eh})]})}),M=a.forwardRef(function(e,t){let{render:r,className:n,...s}=e,{state:i}=(0,x.useFieldRootContext)(),l=function(){let e=a.useContext(p);if(void 0===e)throw Error((0,m.default)(63));return e}(),o={...i,...l};return(0,d.useRenderElement)("span",e,{state:o,ref:t,stateAttributesMapping:y,props:s})});e.s(["Root",0,N,"Thumb",0,M],803205);var P=e.i(803205),P=P,T=e.i(975157);e.s(["Switch",0,function({className:e,size:t="default",...a}){return(0,r.jsx)(P.Root,{"data-slot":"switch","data-size":t,className:(0,T.cn)("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...a,children:(0,r.jsx)(P.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}],699375)},263938,e=>{"use strict";let t=(0,e.i(572989).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",0,t],263938)},989548,338187,e=>{"use strict";let t=(0,e.i(572989).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,t],989548);var r=e.i(289721),a=e.i(965652),n=e.i(797809);let s="tower-assistant-sessions",i="tower-assistant-active-session";function l(){try{let e=localStorage.getItem(s);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t}catch{return[]}}function o(){return localStorage.getItem(i)}function c(e){null===e?localStorage.removeItem(i):localStorage.setItem(i,e)}let d=(0,a.createContext)(null);function u(){return"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}let f="assistant-attachment-cache";function h(e,t,r){try{let a=sessionStorage.getItem(f),n=a?JSON.parse(a):{};n[e]||(n[e]={}),n[e][t]=r,sessionStorage.setItem(f,JSON.stringify(n))}catch{}}e.s(["AssistantProvider",0,function({children:e}){let[t,i]=(0,a.useState)(!1),[m,p]=(0,a.useState)(!1),[g,v]=(0,a.useState)("sidebar"),[y,b]=(0,a.useState)(null),[x,k]=(0,a.useState)([]),[S,w]=(0,a.useState)("idle"),[C,j]=(0,a.useState)(!1),E=(0,a.useRef)([]),N=(0,a.useRef)(null),M=(0,a.useRef)(null),[P,T]=(0,a.useState)([]),[O,I]=(0,a.useState)(null),R=(0,a.useRef)(!1),L=(0,a.useCallback)(()=>{k([...E.current])},[]),F=(0,a.useCallback)(async()=>{v("dialog"===await (0,n.getConfigValue)("assistant.displayMode","sidebar")?"dialog":"sidebar")},[]);(0,a.useEffect)(()=>{F()},[F]);let A=(0,a.useCallback)(async()=>{T(l())},[]),z=(0,a.useCallback)(async e=>{j(!0);try{let t=await fetch(`/api/internal/assistant/sessions?sessionId=${encodeURIComponent(e)}`);if(!t.ok)return;let r=await t.json();if(Array.isArray(r.messages)){E.current=r.messages;let t=function(e){try{let t=sessionStorage.getItem(f);if(!t)return{};return JSON.parse(t)[e]??{}}catch{return{}}}(e);if(Object.keys(t).length>0){let e=0;E.current=E.current.map(r=>{if("user"===r.role){let a=t[e];if(e++,a?.length)return{...r,attachmentFilenames:a}}return r})}k([...E.current])}}catch{}finally{j(!1)}},[]);(0,a.useEffect)(()=>{A();let e=o();e&&(I(e),N.current=e,z(e))},[A,z]);let D=(0,a.useCallback)(()=>{M.current?.abort(),N.current=null,R.current=!1,I(null),c(null),E.current=[],k([]),w("idle")},[]),V=(0,a.useCallback)(e=>{M.current?.abort(),N.current=e,R.current=!0,I(e),c(e),E.current=[],k([]),w("idle"),z(e)},[z]),B=(0,a.useCallback)(e=>{let t;t=l().filter(t=>t.id!==e),localStorage.setItem(s,JSON.stringify(t)),o()===e&&c(null),T(l()),O===e&&D()},[O,D]),U=(0,a.useCallback)(async()=>{p(!0);try{await F(),i(!0)}finally{p(!1)}},[F]),_=(0,a.useCallback)(()=>{i(!1),M.current?.abort()},[]),H=(0,a.useCallback)(()=>{t||m?_():U()},[t,m,_,U]);(0,a.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"l"===e.key&&(e.preventDefault(),H())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[H]);let $=(0,a.useCallback)(async(e,t)=>{if(!e.trim()&&!t?.attachmentFilenames?.length)return;M.current?.abort();let r=new AbortController;M.current=r;let a=0!==E.current.length||R.current?null:e,n=u();if(E.current=[...E.current,{id:u(),role:"user",content:e,attachmentFilenames:t?.attachmentFilenames?.length?t.attachmentFilenames:void 0},{id:n,role:"thinking",content:"",isStreaming:!0}],L(),t?.attachmentFilenames?.length&&N.current){let e=E.current.filter(e=>"user"===e.role).length-1;h(N.current,e,t.attachmentFilenames)}w("connecting");let i=null;try{let o=await fetch("/api/internal/assistant/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e,sessionId:N.current,attachmentFilenames:t?.attachmentFilenames??[]}),signal:r.signal});if(!o.ok||!o.body)throw Error(`HTTP ${o.status}`);w("streaming");let d=o.body.getReader(),f=new TextDecoder,m="";for(;;){let{done:e,value:r}=await d.read();if(e)break;let o=(m+=f.decode(r,{stream:!0})).split("\n");for(let e of(m=o.pop()??"",o)){let r;if(e.startsWith("data: ")){try{r=JSON.parse(e.slice(6).trim())}catch{continue}if(r.sessionId){let e=N.current;if(N.current=r.sessionId,a&&!R.current&&r.sessionId!==e){R.current=!0;let e=new Date().toISOString(),n={id:r.sessionId,title:function(e){let t=e.trim();return t?t.length>30?t.slice(0,30):t:"New Session"}(a),createdAt:e,updatedAt:e};!function(e){let t=[e,...l().filter(t=>t.id!==e.id)].slice(0,10);localStorage.setItem(s,JSON.stringify(t))}(n),T(l()),I(r.sessionId),c(r.sessionId),t?.attachmentFilenames?.length&&h(r.sessionId,0,t.attachmentFilenames)}}switch(r.type){case"text_delta":{let e=E.current.filter(e=>e.id!==n);i?E.current=e.map(e=>e.id===i?{...e,content:e.content+(r.content??""),isStreaming:!0}:e):(i=u(),E.current=[...e,{id:i,role:"assistant",content:r.content??"",isStreaming:!0}]),L();break}case"text":{let e=E.current.filter(e=>e.id!==n);i?E.current=e.map(e=>e.id===i?{...e,content:r.content??e.content,isStreaming:!0}:e):(i=u(),E.current=[...e,{id:i,role:"assistant",content:r.content??"",isStreaming:!0}]),L();break}case"tool_start":{let e=E.current.filter(e=>e.id!==n);i?(E.current=e.map(e=>e.id===i?{...e,isStreaming:!1}:e),i=null):E.current=e,E.current=[...E.current,{id:u(),role:"tool",content:`Calling ${r.content??"tool"}...`,toolName:r.content,isStreaming:!0}],L();break}case"tool_use":{let e=E.current.filter(e=>e.id!==n),t=i?e.map(e=>e.id===i?{...e,isStreaming:!1}:e):e;i=null,E.current=[...t,{id:u(),role:"tool",content:JSON.stringify(r.toolInput??{},null,2),toolName:r.content}],L();break}case"tool_result":E.current=[...E.current,{id:u(),role:"tool",content:String(r.toolOutput??""),toolName:`${r.content??"tool"} (result)`}],L();break;case"error":E.current=[...E.current.filter(e=>e.id!==n),{id:u(),role:"assistant",content:`Error: ${r.content??"Unknown error"}`}],L(),w("error");break;case"done":i&&(E.current=E.current.map(e=>e.id===i?{...e,isStreaming:!1}:e)),E.current=E.current.filter(e=>e.id!==n),L(),w("idle")}}}}E.current=E.current.filter(e=>e.id!==n),L(),w(e=>"streaming"===e?"idle":e),A()}catch(e){if("AbortError"===e.name)return;E.current=[...E.current.filter(e=>e.id!==n),{id:u(),role:"assistant",content:`Connection error: ${e.message??"Unknown error"}`}],L(),w("error")}},[L,A]),K=(0,a.useCallback)(()=>{M.current?.abort(),M.current=null;let e=[...E.current].reverse().find(e=>"user"===e.role),t=e?.content??null;if(e){let t=E.current.lastIndexOf(e);E.current=E.current.slice(0,t),k([...E.current])}return w("idle"),t},[]),J=x[x.length-1],q="connecting"===S||"streaming"===S||J?.role==="thinking"&&!0===J.isStreaming;return(0,r.jsx)(d.Provider,{value:{isOpen:t,isStarting:m,displayMode:g,worktreePath:y,toggleAssistant:H,closeAssistant:_,chatMessages:x,chatStatus:S,isChatThinking:q,isLoadingHistory:C,sendChatMessage:$,cancelChat:K,sessions:P,activeSessionId:O,createNewSession:D,switchSession:V,removeSession:B,refreshSessions:A},children:e})},"useAssistant",0,function(){let e=(0,a.useContext)(d);if(!e)throw Error("useAssistant must be used within an AssistantProvider");return e}],338187)},275360,e=>{"use strict";let t=(0,e.i(572989).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",0,t],275360)},431828,763131,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);e.s(["FolderGit2",0,r],431828);let a=(0,t.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);e.s(["Home",0,a],763131)},256753,e=>{"use strict";let t=(0,e.i(572989).default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);e.s(["HardDrive",0,t],256753)},224277,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(977982),n=e.i(431828),s=e.i(763131),i=e.i(472074),l=e.i(738690),o=e.i(256753),c=e.i(275360),d=e.i(597746),u=e.i(657153),f=e.i(776639),h=e.i(519455),m=e.i(793479),p=e.i(746798),g=e.i(533499),v=e.i(759684);e.s(["FolderBrowserDialog",0,function({open:e,onOpenChange:y,onSelect:b,gitOnly:x=!1}){let{t:k}=(0,g.useI18n)(),[S,w]=(0,r.useState)(null),[C,j]=(0,r.useState)(!1),[E,N]=(0,r.useState)(null),[M,P]=(0,r.useState)(""),[T,O]=(0,r.useState)(""),[I,R]=(0,r.useState)(!1),L=(0,r.useRef)(null),[F,A]=(0,r.useState)(!1),[z,D]=(0,r.useState)(""),V=(0,r.useRef)(null),B=(0,r.useCallback)(async e=>{j(!0),N(null),O(""),R(!1);try{let t=e?`/api/browse-fs?path=${encodeURIComponent(e)}`:"/api/browse-fs",r=await fetch(t);if(!r.ok){let e=await r.json();N(e.error||"Failed");return}let a=await r.json();w(a),P(a.currentPath)}catch{N("Failed to browse filesystem")}finally{j(!1)}},[]);(0,r.useEffect)(()=>{e&&(B(),setTimeout(()=>L.current?.focus(),200))},[e,B]);let U=()=>{M.trim()&&B(M.trim())},_=async()=>{let e=z.trim();if(e&&S?.currentPath)try{let t=await fetch("/api/browse-fs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:S.currentPath,name:e})});if(!t.ok){let e=await t.json();N(e.error||k("folder.newFolderError"));return}A(!1),D(""),B(S.currentPath)}catch{N(k("folder.newFolderError"))}},H=()=>{A(!1),D("")},$=S?.folders.filter(e=>e.name.toLowerCase().includes(T.toLowerCase()))??[];return(0,t.jsx)(f.Dialog,{open:e,onOpenChange:y,children:(0,t.jsx)(f.DialogContent,{className:"p-0 gap-0",style:{maxWidth:"36rem",overflow:"hidden"},children:(0,t.jsxs)("div",{className:"flex flex-col max-h-[60vh] overflow-hidden",children:[(0,t.jsxs)("div",{className:"px-5 pt-5 pb-3 shrink-0",children:[(0,t.jsx)(f.DialogTitle,{children:x?k("folder.selectGitRepo"):k("folder.selectFolder")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:k("folder.hint")})]}),(0,t.jsxs)("div",{className:"border-t border-border px-4 pt-3 pb-2 shrink-0",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("folder.manualInput")}),(0,t.jsxs)("div",{className:"mt-1.5 flex gap-2",children:[(0,t.jsx)(m.Input,{ref:L,value:M,onChange:e=>P(e.target.value),onKeyDown:e=>"Enter"===e.key&&U(),placeholder:"/path/to/your/project",title:M,className:"flex-1 min-w-0"}),(0,t.jsx)(h.Button,{variant:"outline",onClick:U,className:"h-8 px-3 shrink-0",children:k("folder.goTo")})]})]}),(0,t.jsxs)("div",{className:"px-4 py-2 shrink-0",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("folder.searchDir")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsx)(l.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("input",{value:T,onChange:e=>O(e.target.value),placeholder:"Filter folders and files...",className:"h-8 w-full rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder-muted-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 border-y border-border px-4 py-2 shrink-0 min-w-0",children:[(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>S?.homePath&&B(S.homePath),className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(s.Home,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:"Home"})]}),(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>{S&&("__DRIVES__"===S.parentPath?R(!0):(R(!1),B(S.parentPath)))},className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(i.ChevronUp,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:"Parent"})]}),S?.drives&&S.drives.length>0&&(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:I?"default":"outline",size:"icon-sm",onClick:()=>R(e=>!e),className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(o.HardDrive,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:"Drives"})]}),(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>{A(!0),D(""),setTimeout(()=>V.current?.focus(),50)},className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(c.FolderPlus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:k("folder.newFolder")})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground font-mono",title:S?.currentPath??"",children:S?.currentPath??"..."})]}),(0,t.jsxs)(v.ScrollArea,{className:"min-h-0 flex-1",children:[F&&(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-border/30 px-4 py-2",children:[(0,t.jsx)(a.Folder,{className:"h-4 w-4 text-primary/70 shrink-0"}),(0,t.jsx)("input",{ref:V,value:z,onChange:e=>D(e.target.value),onKeyDown:e=>{"Enter"===e.key&&_(),"Escape"===e.key&&H()},placeholder:k("folder.newFolderPlaceholder"),className:"h-7 flex-1 rounded-md border border-border bg-background px-2 text-sm text-foreground placeholder-muted-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:_,disabled:!z.trim(),className:"text-emerald-400 hover:text-emerald-300",children:(0,t.jsx)(d.Check,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:H,className:"text-muted-foreground",children:(0,t.jsx)(u.X,{className:"h-3.5 w-3.5"})})]}),C&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Loading..."}),E&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-rose-400",children:E}),I&&S?.drives&&S.drives.map(e=>(0,t.jsxs)("button",{onClick:()=>{var t;return t=e.path,void(R(!1),B(t))},className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[(0,t.jsx)(o.HardDrive,{className:"h-4 w-4 text-blue-400 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),(0,t.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:e.path})]},e.path)),!I&&!C&&!E&&0===$.length&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:k("folder.empty")}),!I&&!C&&!E&&$.map(e=>(0,t.jsxs)("button",{onClick:()=>{e.isGit||x?(b(e.path),y(!1)):B(e.path)},onDoubleClick:()=>B(e.path),className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[e.isGit?(0,t.jsx)(n.FolderGit2,{className:"h-4 w-4 text-emerald-400 shrink-0"}):(0,t.jsx)(a.Folder,{className:"h-4 w-4 text-primary/70 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),e.isGit&&(0,t.jsx)("span",{className:"shrink-0 rounded-md bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-400 ring-1 ring-emerald-500/20",children:"git"})]},e.path))]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 px-5 py-3 shrink-0 border-t border-border",children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>y(!1),children:k("common.cancel")}),(0,t.jsx)(h.Button,{onClick:()=>{S?.currentPath&&(b(S.currentPath),y(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:k("folder.selectPath")})]})]})})})}])},905455,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["SegmentedControl",0,function({options:e,value:a,onChange:n,className:s}){return(0,t.jsx)("div",{className:(0,r.cn)("inline-flex rounded-md border border-border bg-muted p-1 gap-1",s),children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>n(e.value),className:(0,r.cn)("rounded px-3 py-1 text-sm transition-colors",a===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}])},902539,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);e.s(["ChevronsLeft",0,t],902539)},233274,e=>{"use strict";let t=(0,e.i(572989).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],233274)},21108,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60d620deef0266f60fc86388756c6fa60282d23a29",t.callServer,void 0,t.findSourceMapURL,"analyzeProjectDirectory");e.s(["analyzeProjectDirectory",0,r])},958735,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("402d87b6ead0e5bae4b42b92c38d83853a147ec6dd",t.callServer,void 0,t.findSourceMapURL,"createProject");e.s(["createProject",0,r])},232545,e=>{"use strict";let t=(0,e.i(572989).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],232545)},538059,(e,t,r)=>{t.exports=e.r(322195)},314757,e=>{"use strict";var t=e.i(965652);e.s(["useControlled",0,function({controlled:e,default:r,name:a,state:n="value"}){let{current:s}=t.useRef(void 0!==e),[i,l]=t.useState(r),o=t.useCallback(e=>{s||l(e)},[]);return[s?e:i,o]}])},890514,551974,e=>{"use strict";e.i(708878);var t,r=e.i(462902),a=e.i(965652),n=e.i(954588);let s=((t={}).disabled="data-disabled",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),i={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},l={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},o={disabled:!1,...l};e.s(["DEFAULT_FIELD_ROOT_STATE",0,o,"DEFAULT_FIELD_STATE_ATTRIBUTES",0,l,"DEFAULT_VALIDITY_STATE",0,i,"fieldValidityMapping",0,{valid:e=>null===e?null:e?{[s.valid]:""}:{[s.invalid]:""}}],551974);let c=a.createContext({invalid:void 0,name:void 0,validityData:{state:i,errors:[],error:"",value:"",initialValue:null},setValidityData:n.NOOP,disabled:void 0,touched:l.touched,setTouched:n.NOOP,dirty:l.dirty,setDirty:n.NOOP,filled:l.filled,setFilled:n.NOOP,focused:l.focused,setFocused:n.NOOP,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:o,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=n.EMPTY_OBJECT)=>e,getInputValidationProps:(e=n.EMPTY_OBJECT)=>e,inputRef:{current:null},commit:async()=>{}}});e.s(["FieldRootContext",0,c,"useFieldRootContext",0,function(e=!0){let t=a.useContext(c);if(t.setValidityData===n.NOOP&&!e)throw Error((0,r.default)(28));return t}],890514)},571870,e=>{"use strict";var t=e.i(965652),r=e.i(954588);let a=t.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:r.NOOP,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});e.s(["useFormContext",0,function(){return t.useContext(a)}])},179279,e=>{"use strict";var t=e.i(965652),r=e.i(954588);let a=t.createContext({controlId:void 0,registerControlId:r.NOOP,labelId:void 0,setLabelId:r.NOOP,messageIds:[],setMessageIds:r.NOOP,getDescriptionProps:e=>e});e.s(["LabelableContext",0,a,"useLabelableContext",0,function(){return t.useContext(a)}])},956181,e=>{"use strict";e.s(["getCombinedFieldValidityData",0,function(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}])},397791,e=>{"use strict";var t=e.i(92615),r=e.i(102094),a=e.i(887642),n=e.i(682354),s=e.i(804849),i=e.i(207516),l=e.i(179279);e.s(["useLabel",0,function(e={}){let o,{id:c,fallbackControlId:d,native:u=!1,setLabelId:f,focusControl:h}=e,{controlId:m,setLabelId:p}=(0,l.useLabelableContext)(),g=(0,a.useStableCallback)(e=>{p(e),f?.(e)}),v=(o=(0,i.useBaseUiId)(c),(0,s.useIsoLayoutEffect)(()=>(g(o),()=>{g(void 0)}),[o,g]),o),y=m??d;function b(e){let a=(0,n.getTarget)(e.nativeEvent);a?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),u||function(e){if(h)return h(e,y);if(!y)return;let a=(0,r.ownerDocument)(e.currentTarget).getElementById(y);(0,t.isHTMLElement)(a)&&a.focus({focusVisible:!0})}(e))}return u?{id:v,htmlFor:y??void 0,onMouseDown:b}:{id:v,onClick:b,onPointerDown(e){e.preventDefault()}}}],397791)},103353,e=>{"use strict";var t=e.i(965652),r=e.i(804849),a=e.i(887642),n=e.i(903224),s=e.i(92615),i=e.i(954588),l=e.i(207516),o=e.i(179279);e.s(["useLabelableId",0,function(e={}){let{id:c,implicit:d=!1,controlRef:u}=e,{controlId:f,registerControlId:h}=(0,o.useLabelableContext)(),m=(0,l.useBaseUiId)(c),p=d?f:void 0,g=(0,n.useRefWithInit)(()=>Symbol("labelable-control")),v=t.useRef(!1),y=t.useRef(null!=c),b=(0,a.useStableCallback)(()=>{v.current&&h!==i.NOOP&&(v.current=!1,h(g.current,void 0))});return(0,r.useIsoLayoutEffect)(()=>{let e;if(h!==i.NOOP){if(d){let t=u?.current;e=(0,s.isElement)(t)&&null!=t.closest("label")?c??null:p??m}else if(null!=c)y.current=!0,e=c;else{if(!y.current)return void b();e=m}if(void 0===e)return void b();v.current=!0,h(g.current,e)}},[c,u,p,h,d,m,g,b]),t.useEffect(()=>b,[b]),f??m}])},421689,e=>{"use strict";var t=e.i(585012),r=e.i(804849),a=e.i(887642),n=e.i(956181),s=e.i(571870),i=e.i(890514);e.s(["useField",0,function(e){let{enabled:l=!0,value:o,id:c,name:d,controlRef:u,commit:f}=e,{formRef:h}=(0,s.useFormContext)(),{invalid:m,markedDirtyRef:p,validityData:g,setValidityData:v}=(0,i.useFieldRootContext)(),y=(0,a.useStableCallback)(e.getValue);(0,r.useIsoLayoutEffect)(()=>{if(!l)return;let e=o;void 0===e&&(e=y()),null===g.initialValue&&null!==e&&v(t=>({...t,initialValue:e}))},[l,v,o,g.initialValue,y]),(0,r.useIsoLayoutEffect)(()=>{l&&c&&h.current.fields.set(c,{getValue:y,name:d,controlRef:u,validityData:(0,n.getCombinedFieldValidityData)(g,m),validate(e=!0){let r=o;void 0===r&&(r=y()),p.current=!0,e?t.flushSync(()=>f(r)):f(r)}})},[f,u,l,h,y,c,m,p,d,g,o]),(0,r.useIsoLayoutEffect)(()=>{let e=h.current.fields;return()=>{c&&e.delete(c)}},[h,c])}])},792566,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},453889,e=>{"use strict";let t=(0,e.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"}]]);e.s(["FolderOpen",0,t],453889)},998626,e=>{"use strict";let t=(0,e.i(572989).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],998626)},59737,e=>{"use strict";let t=(0,e.i(572989).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,t])},977982,472074,e=>{"use strict";let t=(0,e.i(572989).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",0,t],977982);var r=e.i(792566);e.s(["ChevronUp",()=>r.default],472074)},194358,e=>{"use strict";let t=(0,e.i(572989).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],194358)},567098,e=>{"use strict";let t=(0,e.i(572989).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},770303,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(514798);let n=(0,a.createServerReference)("4008d181ffbd4615d32b560bd561eab2a62538ea7f",a.callServer,void 0,a.findSourceMapURL,"checkExtension");var s=e.i(3730);let i=(0,a.createServerReference)("40cd2b5cf265781af5b411618c378f7ba29ac89115",a.callServer,void 0,a.findSourceMapURL,"uninstallExtension");var l=e.i(887911);let o={installed:!1},c=(0,r.createContext)(null);e.s(["ExtensionContext",0,c,"ExtensionProvider",0,function({children:e,initialStatus:a}){let[d,u]=(0,r.useState)(()=>a??Object.fromEntries((0,l.listExtensionMetadata)().map(e=>[e.id,o]))),[f,h]=(0,r.useState)(new Set),m=(0,r.useRef)(new Set),p=(0,r.useCallback)(async e=>{let t=await n(e);u(r=>({...r,[e]:t}))},[]),g=(0,r.useCallback)(async e=>{if(m.current.has(e))return{success:!1,error:"install already in progress"};m.current.add(e),h(t=>{let r=new Set(t);return r.add(e),r});try{let t=await (0,s.installExtension)(e);return t.success&&await p(e),t}finally{m.current.delete(e),h(t=>{let r=new Set(t);return r.delete(e),r})}},[p]),v=(0,r.useCallback)(async e=>{if(m.current.has(e))return{success:!1,error:"operation already in progress"};m.current.add(e),h(t=>{let r=new Set(t);return r.add(e),r});try{let t=await i(e);return t.success&&await p(e),t}finally{m.current.delete(e),h(t=>{let r=new Set(t);return r.delete(e),r})}},[p]),y=(0,r.useMemo)(()=>({statusMap:d,loading:!1,installing:f,refresh:p,install:g,uninstall:v}),[d,f,p,g,v]);return(0,t.jsx)(c.Provider,{value:y,children:e})}],770303)},797809,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("601eafdd454c31272bbc215e55a26b5c6618f49b7b",t.callServer,void 0,t.findSourceMapURL,"getConfigValue");e.s(["getConfigValue",0,r])},386343,125177,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,r],386343);let a=(0,t.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);e.s(["Bell",0,a],125177)},243288,e=>{e.v(t=>Promise.all(["static/chunks/0wzn4nbo56gf3.js","static/chunks/0ep-qrl_zzch8.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(346069)))},427768,e=>{e.v(t=>Promise.all(["static/chunks/05lky664ou92k.js","static/chunks/0o6zqtzz_7ysr.js"].map(t=>e.l(t))).then(()=>t(103363)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},609216,e=>{"use strict";var t=e.i(514798);let n=(0,t.createServerReference)("40eaf8cb395a2d553073d5e4b45b5c7e67635a0408",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,n])},110204,337822,e=>{"use strict";var t,n=e.i(289721),o=e.i(975157);e.s(["Label",0,function({className:e,...t}){return(0,n.jsx)("label",{"data-slot":"label",className:(0,o.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),...t})}],110204),e.s([],707132),e.i(707132);var r=e.i(965652),i=e.i(620163),s=e.i(528796),a=e.i(594640),l=e.i(306296),u=e.i(344478),p=e.i(205995),c=e.i(611008);e.i(708878);var d=e.i(462902);let g=r.createContext(void 0);function f(e){let t=r.useContext(g);if(void 0===t&&!e)throw Error((0,d.default)(47));return t}var S=e.i(585012),v=e.i(370161),m=e.i(596290),h=e.i(161476),R=e.i(903224),E=e.i(774641),C=e.i(586622),O=e.i(771326),b=e.i(87396),x=e.i(693354);let T={...O.popupStoreSelectors,disabled:(0,m.createSelector)(e=>e.disabled),instantType:(0,m.createSelector)(e=>e.instantType),openMethod:(0,m.createSelector)(e=>e.openMethod),openChangeReason:(0,m.createSelector)(e=>e.openChangeReason),modal:(0,m.createSelector)(e=>e.modal),stickIfOpen:(0,m.createSelector)(e=>e.stickIfOpen),titleElementId:(0,m.createSelector)(e=>e.titleElementId),descriptionElementId:(0,m.createSelector)(e=>e.descriptionElementId),openOnHover:(0,m.createSelector)(e=>e.openOnHover),closeDelay:(0,m.createSelector)(e=>e.closeDelay),hasViewport:(0,m.createSelector)(e=>e.hasViewport)};class I extends v.ReactStore{constructor(e){const t={...(0,O.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:r.createRef(),backdropRef:r.createRef(),internalBackdropRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),stickIfOpenTimeout:new h.Timeout,triggerElements:new b.PopupTriggerMap},T)}setOpen=(e,t)=>{let n=t.reason===C.REASONS.triggerHover,o=t.reason===C.REASONS.triggerPress&&0===t.event.detail,r=!e&&(t.reason===C.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},s=this.state.floatingRootContext.context.events;s?.emit("openchange",i);let a=()=>{let n={open:e,openChangeReason:t.reason},o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(x.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),S.flushSync(a)):a(),o||r?this.set("instantType",o?"click":"dismiss"):t.reason===C.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,R.useRefWithInit)(()=>new I(t)).current,o=e??n;return(0,E.useOnMount)(n.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var y=e.i(67077),P=e.i(894621),A=e.i(892069);function M({props:e}){let{children:t,open:o,defaultOpen:d=!1,onOpenChange:f,onOpenChangeComplete:S,modal:v=!1,handle:m,triggerId:h,defaultTriggerId:R=null}=e,E=I.useStore(m?.store,{modal:v,open:d,openProp:o,activeTriggerId:R,triggerIdProp:h});(0,s.useOnFirstRender)(()=>{void 0===o&&!1===E.state.open&&!0===d&&E.update({open:!0,activeTriggerId:R})}),E.useControlledProp("openProp",o),E.useControlledProp("triggerIdProp",h);let O=E.useState("open"),b=E.useState("positionerElement"),x=E.useState("payload"),T=E.useState("openChangeReason");E.useContextCallback("onOpenChange",f),E.useContextCallback("onOpenChangeComplete",S);let{openMethod:k,triggerProps:w}=(0,A.useOpenInteractionType)(O);(0,P.useImplicitActiveTrigger)(E);let{forceUnmount:F}=(0,P.useOpenStateTransitions)(O,E,()=>{E.update({stickIfOpen:!0,openChangeReason:null})});(0,i.useScrollLock)(O&&!0===v&&T!==C.REASONS.triggerHover&&"touch"!==k,b),r.useEffect(()=>{O||E.context.stickIfOpenTimeout.clear()},[E,O]);let N=r.useCallback(e=>{let t=(0,y.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},t},[E]),j=r.useCallback(()=>{E.setOpen(!1,N(C.REASONS.imperativeAction))},[E,N]);r.useImperativeHandle(e.actionsRef,()=>({unmount:F,close:j}),[F,j]);let D=(0,c.useSyncedFloatingRootContext)({popupStore:E,onOpenChange:E.setOpen}),H=(0,a.useDismiss)(D,{outsidePressEvent:{mouse:"trap-focus"===v?"sloppy":"intentional",touch:"sloppy"}}),B=(0,u.useRole)(D),{getReferenceProps:L,getFloatingProps:V,getTriggerProps:U}=(0,l.useInteractions)([H,B]),G=r.useMemo(()=>L(w),[L,w]),K=r.useMemo(()=>U(w),[U,w]),_=r.useMemo(()=>V(),[V]);E.useSyncedValues({modal:v,openMethod:k,activeTriggerProps:G,inactiveTriggerProps:K,popupProps:_,floatingRootContext:D,nested:null!=(0,p.useFloatingParentNodeId)()});let z=r.useMemo(()=>({store:E}),[E]);return(0,n.jsx)(g.Provider,{value:z,children:"function"==typeof t?t({payload:x}):t})}var k=e.i(887642),w=e.i(282109),F=e.i(845756),N=e.i(581263),j=e.i(660272),D=e.i(430557),H=e.i(411657),B=e.i(207516),L=e.i(221732),V=e.i(682354),U=e.i(870541);let G=r.forwardRef(function(e,t){let{render:o,className:i,disabled:s=!1,nativeButton:a=!0,handle:u,payload:p,openOnHover:c=!1,delay:g=300,closeDelay:v=0,id:m,...h}=e,R=f(!0),E=u?.store??R?.store;if(!E)throw Error((0,d.default)(74));let O=(0,B.useBaseUiId)(m),b=E.useState("isTriggerActive",O),T=E.useState("floatingRootContext"),I=E.useState("isOpenedByTrigger",O),A=r.useRef(null),{registerTrigger:M,isMountedByThisTrigger:G}=(0,P.useTriggerDataForwarding)(O,A,E,{payload:p,disabled:s,openOnHover:c,closeDelay:v}),K=E.useState("openChangeReason"),_=E.useState("stickIfOpen"),z=E.useState("openMethod"),W=(0,H.useHoverReferenceInteraction)(T,{enabled:null!=T&&c&&("touch"!==z||K!==C.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,j.safePolygon)(),restMs:g,delay:{close:v},triggerElementRef:A,isActiveTrigger:b}),Y=(0,D.useClick)(T,{enabled:null!=T,stickIfOpen:_}),q=(0,l.useInteractions)([Y]),J=E.useState("triggerProps",G),{getButtonProps:Q,buttonRef:X}=(0,w.useButton)({disabled:s,native:a}),Z=r.useMemo(()=>({open:e=>e&&K===C.REASONS.triggerPress?F.pressableTriggerOpenStateMapping.open(e):F.triggerOpenStateMapping.open(e)}),[K]),$=(0,N.useRenderElement)("button",e,{state:{disabled:s,open:I},ref:[X,t,M,A],props:[q.getReferenceProps(),W,J,{[x.CLICK_TRIGGER_IDENTIFIER]:"",id:O},h,Q],stateAttributesMapping:Z}),ee=r.useRef(null),et=(0,k.useStableCallback)(e=>{S.flushSync(()=>{E.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,U.getTabbableBeforeElement)(ee.current);t?.focus()}),en=(0,k.useStableCallback)(e=>{let t=E.select("positionerElement");if(t&&(0,U.isOutsideEvent)(e,t))E.context.beforeContentFocusGuardRef.current?.focus();else{S.flushSync(()=>{E.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,U.getTabbableAfterElement)(E.context.triggerFocusTargetRef.current||A.current);for(;null!==n&&(0,V.contains)(t,n);){let e=n;if((n=(0,U.getNextTabbable)(n))===e)break}n?.focus()}});return b?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(L.FocusGuard,{ref:ee,onFocus:et}),(0,n.jsx)(r.Fragment,{children:$},O),(0,n.jsx)(L.FocusGuard,{ref:E.context.triggerFocusTargetRef,onFocus:en})]}):(0,n.jsx)(r.Fragment,{children:$},O)});var K=e.i(888393);let _=r.createContext(void 0),z=r.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e,{store:i}=f();return i.useState("mounted")||o?(0,n.jsx)(_.Provider,{value:o,children:(0,n.jsx)(K.FloatingPortal,{ref:t,...r})}):null});var W=e.i(831766),Y=e.i(804849);let q=r.createContext(void 0);function J(){let e=r.useContext(q);if(!e)throw Error((0,d.default)(46));return e}var Q=e.i(887943),X=e.i(72287),Z=e.i(412522),$=e.i(431362),ee=e.i(808754);let et=r.forwardRef(function(e,t){let{render:o,className:i,anchor:s,positionMethod:a="absolute",side:l="bottom",align:u="center",sideOffset:c=0,alignOffset:g=0,collisionBoundary:S="clipping-ancestors",collisionPadding:v=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:R=!1,collisionAvoidance:E=x.POPUP_COLLISION_AVOIDANCE,...O}=e,{store:b}=f(),T=function(){let e=r.useContext(_);if(void 0===e)throw Error((0,d.default)(45));return e}(),I=(0,p.useFloatingNodeId)(),y=b.useState("floatingRootContext"),P=b.useState("mounted"),A=b.useState("open"),M=b.useState("openChangeReason"),k=b.useState("activeTriggerElement"),w=b.useState("modal"),j=b.useState("positionerElement"),D=b.useState("instantType"),H=b.useState("transitionStatus"),B=b.useState("hasViewport"),L=r.useRef(null),V=(0,Z.useAnimationsFinished)(j,!1,!1),U=(0,Q.useAnchorPositioning)({anchor:s,floatingRootContext:y,positionMethod:a,mounted:P,side:l,sideOffset:c,align:u,alignOffset:g,arrowPadding:m,collisionBoundary:S,collisionPadding:v,sticky:h,disableAnchorTracking:R,keepMounted:T,nodeId:I,collisionAvoidance:E,adaptiveOrigin:B?$.adaptiveOrigin:void 0}),G=r.useMemo(()=>{let e={};return A||(e.pointerEvents="none"),{role:"presentation",hidden:!P,style:{...U.positionerStyles,...e}}},[A,P,U.positionerStyles]),K=r.useMemo(()=>({props:G,...U}),[G,U]),z=y.useState("domReferenceElement");(0,Y.useIsoLayoutEffect)(()=>{let e=L.current;if(z&&(L.current=z),e&&z&&z!==e){b.set("instantType",void 0);let e=new AbortController;return V(()=>{b.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[z,V,b]);let J={open:A,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:D},et=r.useCallback(e=>{b.set("positionerElement",e)},[b]),en=(0,N.useRenderElement)("div",e,{state:J,props:[K.props,(0,ee.getDisabledMountTransitionStyles)(H),O],ref:[t,et],stateAttributesMapping:F.popupStateMapping});return(0,n.jsxs)(q.Provider,{value:K,children:[P&&!0===w&&M!==C.REASONS.triggerHover&&(0,n.jsx)(X.InternalBackdrop,{ref:b.context.internalBackdropRef,inert:(0,W.inertValue)(!A),cutout:k}),(0,n.jsx)(p.FloatingNode,{id:I,children:en})]})});var en=e.i(92615),eo=e.i(11931),er=e.i(511980),ei=e.i(809058),es=e.i(504068),ea=e.i(197920),el=e.i(196368);let eu=r.createContext(void 0);function ep(e){let{value:t,children:o}=e;return(0,n.jsx)(eu.Provider,{value:t,children:o})}let ec={...F.popupStateMapping,...ei.transitionStatusMapping},ed=r.forwardRef(function(e,t){let{className:o,render:i,initialFocus:s,finalFocus:a,...l}=e,{store:u}=f(),p=J(),c=null!=(0,el.useToolbarRootContext)(!0),{context:d,hasClosePart:g}=function(){let[e,t]=r.useState(0),n=(0,k.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:r.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),S=u.useState("open"),v=u.useState("openMethod"),m=u.useState("instantType"),h=u.useState("transitionStatus"),R=u.useState("popupProps"),E=u.useState("titleElementId"),O=u.useState("descriptionElementId"),b=u.useState("modal"),x=u.useState("mounted"),T=u.useState("openChangeReason"),I=u.useState("activeTriggerElement"),y=u.useState("floatingRootContext");(0,es.useOpenChangeComplete)({open:S,ref:u.context.popupRef,onComplete(){S&&u.context.onOpenChangeComplete?.(!0)}});let P=u.useState("disabled"),A=u.useState("openOnHover"),M=u.useState("closeDelay");(0,er.useHoverFloatingInteraction)(y,{enabled:A&&!P,closeDelay:M});let w=void 0===s?function(e){return"touch"!==e||u.context.popupRef.current}:s,F={open:S,side:p.side,align:p.align,instant:m,transitionStatus:h},j=r.useCallback(e=>{u.set("popupElement",e)},[u]),D=(0,N.useRenderElement)("div",e,{state:F,ref:[t,u.context.popupRef,j],props:[R,{"aria-labelledby":E,"aria-describedby":O,onKeyDown(e){c&&ea.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,ee.getDisabledMountTransitionStyles)(h),l],stateAttributesMapping:ec});return(0,n.jsx)(eo.FloatingFocusManager,{context:y,openInteractionType:v,modal:!1!==b&&g,disabled:!x||T===C.REASONS.triggerHover,initialFocus:w,returnFocus:a,restoreFocus:"popup",previousFocusableElement:(0,en.isHTMLElement)(I)?I:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,n.jsx)(ep,{value:d,children:D})})}),eg=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),{arrowRef:a,side:l,align:u,arrowUncentered:p,arrowStyles:c}=J();return(0,N.useRenderElement)("div",e,{state:{open:s,side:l,align:u,uncentered:p},ref:[t,a],props:[{style:c,"aria-hidden":!0},r],stateAttributesMapping:F.popupStateMapping})}),ef={...F.popupStateMapping,...ei.transitionStatusMapping},eS=r.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=f(),s=i.useState("open"),a=i.useState("mounted"),l=i.useState("transitionStatus"),u=i.useState("openChangeReason");return(0,N.useRenderElement)("div",e,{state:{open:s,transitionStatus:l},ref:[i.context.backdropRef,t],props:[{role:"presentation",hidden:!a,style:{pointerEvents:u===C.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},r],stateAttributesMapping:ef})}),ev=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("titleElementId",s),()=>{i.set("titleElementId",void 0)}),[i,s]),(0,N.useRenderElement)("h2",e,{ref:t,props:[{id:s},r]})}),em=r.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=f(),s=(0,B.useBaseUiId)(r.id);return(0,Y.useIsoLayoutEffect)(()=>(i.set("descriptionElementId",s),()=>{i.set("descriptionElementId",void 0)}),[i,s]),(0,N.useRenderElement)("p",e,{ref:t,props:[{id:s},r]})}),eh=r.forwardRef(function(e,t){let n,{render:o,className:i,disabled:s=!1,nativeButton:a=!0,...l}=e,{buttonRef:u,getButtonProps:p}=(0,w.useButton)({disabled:s,focusableWhenDisabled:!1,native:a}),{store:c}=f();return n=r.useContext(eu),(0,Y.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,N.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){c.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.closePress,e.nativeEvent,e.currentTarget))}},l,p]})}),eR=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var eE=e.i(203667);let eC={activationDirection:e=>e?{"data-activation-direction":e}:null},eO=r.forwardRef(function(e,t){let{render:n,className:o,children:r,...i}=e,{store:s}=f(),{side:a}=J(),l=s.useState("instantType"),{children:u,state:p}=(0,eE.usePopupViewport)({store:s,side:a,cssVars:eR,children:r}),c={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:l};return(0,N.useRenderElement)("div",e,{state:c,ref:t,props:[i,{children:u}],stateAttributesMapping:eC})});class eb{constructor(){this.store=new I}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,d.default)(80,e));this.store.setOpen(!0,(0,y.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,y.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,eg,"Backdrop",0,eS,"Close",0,eh,"Description",0,em,"Handle",0,eb,"Popup",0,ed,"Portal",0,z,"Positioner",0,et,"Root",0,function(e){return f(!0)?(0,n.jsx)(M,{props:e}):(0,n.jsx)(p.FloatingTree,{children:(0,n.jsx)(M,{props:e})})},"Title",0,ev,"Trigger",0,G,"Viewport",0,eO,"createHandle",0,function(){return new eb}],107641);var ex=e.i(107641),ex=ex;e.s(["Popover",0,function({...e}){return(0,n.jsx)(ex.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:r=0,side:i="bottom",sideOffset:s=4,...a}){return(0,n.jsx)(ex.Portal,{children:(0,n.jsx)(ex.Positioner,{align:t,alignOffset:r,side:i,sideOffset:s,className:"isolate z-50",children:(0,n.jsx)(ex.Popup,{"data-slot":"popover-content",className:(0,o.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(ex.Trigger,{"data-slot":"popover-trigger",...e})}],337822)}]);
|