tower-studio 0.2.19 → 0.2.21
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 -3
- 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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +25 -25
- 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 +3 -2
- 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/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/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]/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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +59 -59
- package/.next/standalone/.next/server/app/missions/page.js +5 -5
- 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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +25 -25
- 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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +25 -25
- 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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +41 -41
- 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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +86 -86
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +3 -3
- 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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +78 -78
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +2 -2
- 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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +57 -57
- 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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +59 -59
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +5 -5
- 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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +25 -25
- 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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +66 -66
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +3 -3
- 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/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +76 -76
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +6 -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/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +45 -45
- 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_0eh8dj_.js +12 -0
- 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]__0iyp~.k._.js +10 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o3iihg._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ogh_qu._.js +10 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0q.piu~._.js +9 -1
- 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/[root-of-the-server]__02-6df-._.js +47 -0
- 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]__0fzkdjl._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07ns1z8._.js → [root-of-the-server]__0hy3~f.._.js} +2 -2
- 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]__0pu-v0l._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0sdt1y5._.js → [root-of-the-server]__0q-abig._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0q~lxnz._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0th0_fo._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ty1ao1._.js +1 -1
- 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]__0z7je5_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0y5wu~l._.js → [root-of-the-server]__10ol5vl._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__134_xv.._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13vgkq5._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/_00jadm8._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_05l656y._.js → _03.a~r1._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_053zyvm._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0gv9sv3._.js → _08x3jaa._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_08z-g~5._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0_zfpwh._.js → _09j4imi._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_09r0_z9._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0_vjay8._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0a554d8._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0dvltcf._.js → _0aw2qq6._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0jz8fv8._.js → _0bmywa6._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ghovf3._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_0jg.s-g._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0jyj~t3._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/_0ng0eku._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0r6gweb._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rt8jf_._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0unw1fq._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0uuzh5m._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0yakvlq._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/_0~aon4t._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_13r9dxk._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/src_075s.rk._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
- 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_worktree_ts_06cucy3._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +239 -239
- package/.next/standalone/.next/static/chunks/00fv~h4rni5hv.js +1 -0
- package/.next/standalone/.next/static/chunks/{096ysbmoa9qsb.js → 00p3.tda-56.l.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0hniqlgz6waea.js → 01tnwkggn5.s-.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0vu_cifxk7vfu.js → 02bobmiee9ss8.js} +1 -1
- package/.next/standalone/.next/static/chunks/039ntokp82-em.js +1 -0
- package/.next/standalone/.next/static/chunks/{0b6zhezopdbs2.js → 04yrp-8ps3q_-.js} +1 -1
- package/.next/standalone/.next/static/chunks/05.wfh773dxo9.js +1 -0
- package/.next/standalone/.next/static/chunks/{08x.ru6r_rz3k.js → 05qdpgnpb_7mk.js} +1 -1
- package/.next/standalone/.next/static/chunks/06~1n6of8ll__.js +5 -0
- package/.next/standalone/.next/static/chunks/0_n2l3jehwcsq.js +1 -0
- package/.next/standalone/.next/static/chunks/{0p7hamd-yspky.js → 0aq7ksckxr-8-.js} +2 -2
- package/.next/standalone/.next/static/chunks/{03og02bu96n.e.js → 0d4~4k4hv01ah.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0njf5husn6ovd.js → 0f1gk0.5slqqh.js} +1 -1
- package/.next/standalone/.next/static/chunks/0ip_37zz4f080.js +1 -0
- package/.next/standalone/.next/static/chunks/{1124-9qfcr70v.js → 0j16~sj50uq_m.js} +1 -1
- package/.next/standalone/.next/static/chunks/0o8jf4a30e_ri.js +5 -0
- package/.next/standalone/.next/static/chunks/0ol16355~utic.js +5 -0
- package/.next/standalone/.next/static/chunks/{10ght~j9wl9ab.js → 0pg_rf2cch5pv.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0esvyij44lvt6.js → 0pwe0m3i1rro1.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0izukvmui9f8m.js → 0rwca.wrfl3b9.js} +1 -1
- package/.next/standalone/.next/static/chunks/{06qwj~g0qwhey.js → 0srx~7bncp64q.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0s6ygn-alcm2d.js → 0vyvdsh1mkl5d.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0lv0zqg.f66eu.js → 10h~50kdsu5fx.js} +1 -1
- package/.next/standalone/.next/static/chunks/{162ec9.32dj73.js → 15esfko8asvh7.js} +1 -1
- package/.next/standalone/.next/static/chunks/16sn2ij01qrfz.js +1 -0
- package/.next/standalone/.next/static/chunks/{04wsku4m5~s1q.js → 17oxpxjm7_smn.js} +1 -1
- package/.next/standalone/package.json +1 -1
- package/dist/mcp-server.cjs +17 -1
- package/package.json +1 -1
- package/skills/tower/SKILL.md +9 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o3ggen._.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0313pct._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08xomvf._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0c7x0o9._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e82_jw._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0sk.itb._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0v7p~3.._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wjuu0z._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y.s5ax._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_01e47s2._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/_01yg50d._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_09qgmwg._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0_7d5_7._.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/_0djgo-u._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0n.xiu5._.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/_10ogq8w._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_13kwp85._.js +0 -7
- package/.next/standalone/.next/static/chunks/0._824vjqa-9k.js +0 -5
- package/.next/standalone/.next/static/chunks/08~85j56saf6q.js +0 -1
- package/.next/standalone/.next/static/chunks/0c7b_.6i4jef8.js +0 -1
- package/.next/standalone/.next/static/chunks/0hseznii2u-4n.js +0 -5
- package/.next/standalone/.next/static/chunks/0kycb80.t-7_-.js +0 -1
- package/.next/standalone/.next/static/chunks/0v66~34w9t3gz.js +0 -5
- package/.next/standalone/.next/static/chunks/0v_nmghra_n2q.js +0 -1
- package/.next/standalone/.next/static/chunks/0zf35xwv.l3l7.js +0 -1
- package/.next/standalone/.next/static/chunks/11.t9_o8cox8t.js +0 -1
- /package/.next/standalone/.next/static/{mLQP8o4ghKE2DGln7fL34 → zosKR5i2aA392qu0Ka1j9}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{mLQP8o4ghKE2DGln7fL34 → zosKR5i2aA392qu0Ka1j9}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{mLQP8o4ghKE2DGln7fL34 → zosKR5i2aA392qu0Ka1j9}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,113399,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),n=e.i(821957),i=e.i(533499),r=e.i(519455),l=e.i(793479),o=e.i(624687),c=e.i(110204),d=e.i(487486),m=e.i(699375),u=e.i(776639),x=e.i(975157),g=e.i(386343),p=e.i(572989);let h=(0,p.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var f=e.i(645378);let b=(0,p.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var j=e.i(125177),v=e.i(256753),N=e.i(245697),y=e.i(657153),k=e.i(232545);let w=(0,p.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var C=e.i(998626);let S=(0,p.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),T=(0,p.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var M=e.i(400355),D=e.i(301348),B=e.i(181209),R=e.i(453889),P=e.i(156744),L=e.i(631650),U=e.i(813138),I=e.i(514798);let F=(0,I.createServerReference)("00b3d8fea53673015521ca66ac38bb62a56f601e27",I.callServer,void 0,I.findSourceMapURL,"getAvailableTerminalApps"),H=(0,I.createServerReference)("0090e14da697e27a49091c35b442eff6fe9535e253",I.callServer,void 0,I.findSourceMapURL,"getAvailableEditors");var E=e.i(618435);let V=(0,I.createServerReference)("4047121b0078740c9cb690d69deb17c71ec0523775",I.callServer,void 0,I.findSourceMapURL,"createPrompt"),z=(0,I.createServerReference)("60d3833a6f7bd0dc6526332ad449c0ed66522c5ee8",I.callServer,void 0,I.findSourceMapURL,"updatePrompt"),$=(0,I.createServerReference)("401b13f5fd14f64200d8e2d4bd2f7c5d5ceb0b9b41",I.callServer,void 0,I.findSourceMapURL,"deletePrompt"),A=(0,I.createServerReference)("604ab94b79faa39110e5a0c574f00f95b580928935",I.callServer,void 0,I.findSourceMapURL,"setDefaultPrompt"),K=(0,I.createServerReference)("0035cf7c12294716136f077318eb7ee51edec82eb5",I.callServer,void 0,I.findSourceMapURL,"getAvailableProviders");var O=e.i(746798),W=e.i(224277);let q=(0,p.default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);var G=e.i(631675);let X=(0,p.default)("folder-up",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);var Y=e.i(922541),Z=e.i(759686),_=e.i(487278),J=e.i(360112);let Q=(0,I.createServerReference)("406ecbb6d9dd16c91f3b25b22f3f6ceb69c04298ab",I.callServer,void 0,I.findSourceMapURL,"createBackup"),ee=(0,I.createServerReference)("00201f61c92335d34395e7f5893388c386b417093f",I.callServer,void 0,I.findSourceMapURL,"listBackupFiles"),et=(0,I.createServerReference)("40625baab7ef183643904b67cb47753f21b046fcc0",I.callServer,void 0,I.findSourceMapURL,"deleteBackupFile"),es=(0,I.createServerReference)("407c6b6dc9474ebcd1e6d47a5a55f963fbd1997855",I.callServer,void 0,I.findSourceMapURL,"restoreBackup"),ea=(0,I.createServerReference)("40388d12856284bf52035509759a70c756871bd856",I.callServer,void 0,I.findSourceMapURL,"resetSystem"),en=(0,I.createServerReference)("0020495f424f54ab3cf135b68cea99b9759343d61c",I.callServer,void 0,I.findSourceMapURL,"getBackupDir"),ei=(0,I.createServerReference)("40e2ddaec2e06f3dcaf3f59f6d7772958ba066595b",I.callServer,void 0,I.findSourceMapURL,"setBackupDir");function er(){let{t:e,locale:n}=(0,i.useI18n)(),o=(0,a.useRouter)(),[c,d]=(0,s.useState)([]),[m,x]=(0,s.useState)(""),[g,p]=(0,s.useState)(!1),[h,f]=(0,s.useState)(!0),[b,j]=(0,s.useState)(null),[v,N]=(0,s.useState)(!1),[y,k]=(0,s.useState)(""),w=(0,s.useRef)(null),[S,T]=(0,s.useState)(!1),[D,B]=(0,s.useState)(""),R=(0,s.useCallback)(async()=>{f(!0);try{let[e,t]=await Promise.all([ee(),en()]);d(e),x(t)}finally{f(!1)}},[]);(0,s.useEffect)(()=>{R()},[R]);let P=async()=>{let t=y.trim()||void 0;N(!1),k(""),j("create");try{await Q(t),J.toast.success(e("settings.backup.createSuccess")),await R()}catch{J.toast.error(e("settings.backup.createError"))}finally{j(null)}},L=async t=>{if(confirm(e("settings.backup.restoreConfirm"))){j("restore");try{await es(t),J.toast.success(e("settings.backup.restoreSuccess"),{action:{label:e("settings.backup.reload"),onClick:()=>window.location.reload()},duration:15e3}),await R()}catch{J.toast.error(e("settings.backup.restoreError"))}finally{j(null)}}},U=async t=>{if(confirm(e("settings.backup.deleteConfirm")))try{await et(t),J.toast.success(e("settings.backup.deleteSuccess")),d(e=>e.filter(e=>e.filename!==t))}catch{J.toast.error(e("settings.backup.deleteError"))}},I=async t=>{p(!1);try{await ei(t),x(t),J.toast.success(e("settings.backup.dirSaved")),await R()}catch{J.toast.error(e("settings.backup.dirError"))}},F=async t=>{let s=t.target.files?.[0];if(s){t.target.value="",j("import");try{let t=new FormData;t.append("file",s);let a=await fetch("/api/internal/backup/import",{method:"POST",body:t});if(!a.ok){let t=await a.json();J.toast.error("Invalid backup archive"===t.error?e("settings.backup.importInvalid"):(t.error,e("settings.backup.importError")));return}J.toast.success(e("settings.backup.importSuccess")),await R()}catch{J.toast.error(e("settings.backup.importError"))}finally{j(null)}}},H=async()=>{if("RESET"===D){T(!1),B(""),j("reset");try{await ea("RESET"),J.toast.success(e("settings.backup.resetSuccess")),o.push("/")}catch{J.toast.error(e("settings.backup.resetError"))}finally{j(null)}}},E=null!==b;return(0,t.jsxs)("div",{className:"space-y-6",children:[("restore"===b||"reset"===b)&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,t.jsx)(M.Loader2,{className:"h-8 w-8 animate-spin text-muted-foreground"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"restore"===b?e("settings.backup.restoring"):e("settings.backup.resetting")})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold",children:e("settings.backup.sectionTitle")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{children:[e("settings.backup.dir"),":"]}),(0,t.jsx)("code",{className:"rounded bg-muted px-2 py-0.5 text-xs",children:m}),(0,t.jsx)(r.Button,{variant:"ghost",onClick:()=>p(!0),className:"text-xs text-muted-foreground",children:e("settings.backup.dirChange")})]}),(0,t.jsx)(W.FolderBrowserDialog,{open:g,onOpenChange:p,onSelect:I})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.Button,{onClick:()=>{k(""),N(!0)},disabled:E,className:"gap-2",children:"create"===b?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-4 w-4 animate-spin"})," ",e("settings.backup.creating")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q,{className:"h-4 w-4"})," ",e("settings.backup.create")]})}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsxs)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",disabled:E,onClick:()=>w.current?.click(),className:"gap-2"}),children:[(0,t.jsx)(X,{className:"h-4 w-4"}),e("settings.backup.import")]}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.importHint")})]}),(0,t.jsx)("input",{ref:w,type:"file",accept:".tar.gz,.gz",className:"hidden",onChange:F})]}),(0,t.jsx)(u.Dialog,{open:v,onOpenChange:N,children:(0,t.jsxs)(u.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(u.DialogHeader,{children:(0,t.jsx)(u.DialogTitle,{children:e("settings.backup.create")})}),(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:e("settings.backup.createLabel")}),(0,t.jsx)(l.Input,{value:y,onChange:e=>k(e.target.value),onKeyDown:e=>"Enter"===e.key&&P(),placeholder:e("settings.backup.createLabelPlaceholder"),className:"mt-1.5",autoFocus:!0})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>N(!1),children:e("common.cancel")}),(0,t.jsx)(r.Button,{onClick:P,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:e("settings.backup.create")})]})]})}),h?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(M.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):0===c.length?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-12 text-center",children:[(0,t.jsx)(_.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("settings.backup.empty")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e("settings.backup.emptyDesc")})]}):(0,t.jsx)("div",{className:"space-y-3",children:c.map(s=>{var a,i;return(0,t.jsx)("div",{className:"group rounded-lg border border-border bg-card p-4 transition-colors hover:bg-accent/30",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s.label?(0,t.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:s.label}):(0,t.jsx)("span",{className:"truncate text-sm font-medium font-mono text-foreground",children:s.filename}),s.autoBackup&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-500 ring-1 ring-amber-500/20",children:e("settings.backup.autoLabel")})]}),s.label&&(0,t.jsx)("div",{className:"mt-0.5 text-[11px] font-mono text-muted-foreground/60",children:s.filename}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground",children:[(a=s.size)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`," · ",(i=s.createdAt,new Date(i).toLocaleString("zh"===n?"zh-CN":"en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}))]}),s.preview.length>0&&(0,t.jsxs)("div",{className:"mt-1.5 text-xs text-muted-foreground",children:[s.preview.map((e,s)=>(0,t.jsxs)("span",{children:[s>0&&" ",e.workspace,"(",e.projects.join(", "),")"]},s)),s.stats.workspaces>s.preview.length&&(0,t.jsxs)("span",{children:[" ",e("settings.backup.workspaces",{count:String(s.stats.workspaces)})]})]}),(0,t.jsxs)("div",{className:"mt-0.5 text-xs text-muted-foreground",children:[e("settings.backup.projects",{count:String(s.stats.projects)})," · ",e("settings.backup.tasks",{count:String(s.stats.tasks)})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-xs",onClick:()=>L(s.filename),disabled:E,className:"text-muted-foreground hover:text-foreground"}),children:(0,t.jsx)(G.Upload,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.restore")})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-xs",onClick:()=>U(s.filename),disabled:E,className:"text-muted-foreground hover:text-rose-400"}),children:(0,t.jsx)(C.Trash2,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.delete")})]})]})]})},s.filename)})}),(0,t.jsxs)("div",{className:"border-t border-border pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-rose-400",children:[(0,t.jsx)(Z.AlertTriangle,{className:"h-4 w-4"}),e("settings.backup.dangerZone")]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground leading-relaxed",children:e("settings.backup.resetDesc")}),(0,t.jsxs)(r.Button,{variant:"outline",onClick:()=>{B(""),T(!0)},disabled:E,className:"mt-3 border-rose-500/30 text-rose-400 hover:bg-rose-500/10 hover:text-rose-400",children:[(0,t.jsx)(Y.RotateCcw,{className:"mr-2 h-3.5 w-3.5"}),e("settings.backup.reset")]})]}),(0,t.jsx)(u.Dialog,{open:S,onOpenChange:T,children:(0,t.jsxs)(u.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:e("settings.backup.resetConfirmTitle")}),(0,t.jsx)(u.DialogDescription,{children:e("settings.backup.resetConfirmDesc")})]}),(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:e("settings.backup.resetConfirmInput")}),(0,t.jsx)(l.Input,{value:D,onChange:e=>B(e.target.value),placeholder:"RESET",className:"mt-1.5 font-mono"})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>T(!1),children:e("common.cancel")}),(0,t.jsx)(r.Button,{disabled:"RESET"!==D,onClick:H,className:"border-rose-500/30 bg-rose-500/10 text-rose-400 hover:bg-rose-500/20",children:e("settings.backup.reset")})]})]})})]})}var el=e.i(887911),eo=e.i(597746);let ec=(0,p.default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var ed=e.i(875840),em=e.i(475958),eu=e.i(194358),ex=e.i(337822),eg=e.i(991838);let ep=[{os:"macOS",cmd:"brew install ripgrep"},{os:"Windows",cmd:"winget install BurntSushi.ripgrep"},{os:"Linux",cmd:"sudo apt install ripgrep"}];function eh({cmd:e}){let{t:a}=(0,i.useI18n)(),[n,l]=(0,s.useState)(!1),o=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),J.toast.success(a("common.copied")),setTimeout(()=>l(!1),1500)}catch{J.toast.error(a("common.copyFailed"))}};return(0,t.jsxs)("div",{className:"flex items-start gap-1 rounded-md bg-background/60 pl-2 pr-1 py-1 ring-1 ring-border/60",children:[(0,t.jsx)("code",{className:"min-w-0 flex-1 break-all font-mono text-[11px] leading-relaxed",children:e}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-xs",className:"shrink-0 text-muted-foreground","aria-label":a("common.copy"),onClick:o,children:n?(0,t.jsx)(eo.Check,{className:"h-3 w-3 text-emerald-400"}):(0,t.jsx)(ed.Copy,{className:"h-3 w-3"})})]})}function ef({extension:e}){let{t:a}=(0,i.useI18n)(),{status:n,loading:l,isInstalling:o,install:c,uninstall:d,refresh:m}=(0,eg.useExtension)(e.id),[u,x]=(0,s.useState)(!1),g=e.icon,p=n.installed,h=async()=>{let t=await c();t.success?J.toast.success(a("settings.extensions.installSuccess").replace("{name}",e.name)):J.toast.error(a("settings.extensions.installFailed").replace("{name}",e.name)+(t.error?`: ${t.error.slice(0,200)}`:""))},f=async()=>{let t=await d();t.success?J.toast.success(a("settings.extensions.uninstallSuccess").replace("{name}",e.name)):J.toast.error(a("settings.extensions.uninstallFailed").replace("{name}",e.name)+(t.error?`: ${t.error.slice(0,200)}`:""))},b=async()=>{x(!0);try{await m()}finally{x(!1)}},j=()=>{window.open(e.homepageUrl,"_blank","noopener,noreferrer")};return(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-background ring-1 ring-border",children:(0,t.jsx)(g,{className:"h-5 w-5 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:e.name}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description})]})]}),(0,t.jsxs)("span",{className:"shrink-0 rounded-md bg-background px-2 py-0.5 text-xs text-muted-foreground ring-1 ring-border",children:["~",e.sizeMB," MB"]})]}),(0,t.jsx)("div",{className:"mt-4 flex items-center gap-2 text-xs",children:l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:a("common.loading")})]}):p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.CheckCircle2,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,t.jsxs)("span",{className:"text-foreground",children:[a("settings.extensions.installed"),n.version?` v${n.version}`:""]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ec,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:a("settings.extensions.notInstalledShort")})]})}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"default",onClick:h,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.reinstalling")]}):a("settings.extensions.reinstall")}),(0,t.jsx)(r.Button,{variant:"outline",onClick:f,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.uninstalling")]}):a("settings.extensions.uninstall")})]}):e.manualInstall?(0,t.jsxs)(ex.Popover,{children:[(0,t.jsx)(ex.PopoverTrigger,{render:e=>(0,t.jsxs)(r.Button,{variant:"default",...e,children:[(0,t.jsx)(q,{className:"h-3.5 w-3.5"}),a("settings.extensions.installViaHomepage")]})}),(0,t.jsxs)(ex.PopoverContent,{align:"start",className:"w-80 max-w-[90vw] gap-2 text-xs leading-relaxed",children:[(0,t.jsx)("p",{children:a("settings.extensions.manualInstallHintIntro")}),(0,t.jsx)("div",{className:"space-y-2",children:ep.map(({os:e,cmd:s})=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[11px] font-medium text-muted-foreground",children:e}),(0,t.jsx)(eh,{cmd:s})]},e))}),(0,t.jsx)("p",{className:"text-muted-foreground",children:a("settings.extensions.manualInstallHintAfter")}),(0,t.jsxs)("button",{type:"button",onClick:j,className:"flex items-center gap-1 self-start text-[11px] text-primary underline-offset-2 hover:underline",children:[(0,t.jsx)(em.ExternalLink,{className:"h-3 w-3"}),a("settings.extensions.visitHomepage")]})]})]}):(0,t.jsx)(r.Button,{variant:"default",onClick:h,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.installing")]}):a("settings.extensions.install")}),(0,t.jsxs)(r.Button,{variant:"ghost",onClick:b,disabled:u,children:[(0,t.jsx)(eu.RefreshCw,{className:`h-3.5 w-3.5 ${u?"animate-spin":""}`}),a("settings.extensions.recheck")]}),(0,t.jsxs)(r.Button,{variant:"ghost",onClick:j,children:[(0,t.jsx)(em.ExternalLink,{className:"h-3.5 w-3.5"}),a("settings.extensions.visitHomepage")]})]})]})}function eb(){let{t:e}=(0,i.useI18n)(),s=(0,el.listExtensionMetadata)();return(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("header",{children:[(0,t.jsx)("h2",{className:"text-base font-semibold",children:e("settings.extensions.title")}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e("settings.extensions.desc")})]}),(0,t.jsx)("div",{className:"space-y-3",children:s.map(e=>(0,t.jsx)(ef,{extension:e},e.id))})]})}function ej({options:e,value:s,onChange:a}){return(0,t.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>a(e.value),className:(0,x.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",s===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}function ev({label:e,description:s,children:a,className:n}){return(0,t.jsxs)("div",{className:(0,x.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",n),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:e}),s&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:s})]}),(0,t.jsx)("div",{className:"shrink-0",children:a})]})}let eN=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:g.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:h,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:f.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:b,accent:"amber"},{id:"extensions",labelKey:"settings.extensions.title",descKey:"settings.extensions.navDesc",icon:N.Package,accent:"indigo"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:j.Bell,accent:"rose"},{id:"backup",labelKey:"settings.backup.title",descKey:"settings.backup.navDesc",icon:v.HardDrive,accent:"cyan"}],ey={blue:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},emerald:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},violet:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},amber:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},cyan:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},rose:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},indigo:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"}},ek="ai-manager:default-cli-adapter",ew={host:"",ownerMatch:"*",localPathTemplate:"",priority:0};function eC(){let e=(0,a.useRouter)(),{t:g}=(0,i.useI18n)(),{theme:p,setTheme:h}=(0,n.useTheme)(),{locale:f,setLocale:b}=(0,i.useI18n)(),[j,v]=(0,s.useState)("general"),N=(0,s.useRef)(null),[I,q]=(0,s.useState)({left:0,width:0}),[G,X]=(0,s.useState)(!1),[Y,Z]=(0,s.useState)("Terminal"),[_,J]=(0,s.useState)([]),[Q,ee]=(0,s.useState)(""),[et,es]=(0,s.useState)([]),[ea,en]=(0,s.useState)([]),[ei,el]=(0,s.useState)("claude"),[eo,ec]=(0,s.useState)(null),[ed,em]=(0,s.useState)({}),[eu,ex]=(0,s.useState)([]),[eg,ep]=(0,s.useState)(!1),[eh,ef]=(0,s.useState)(null),[eC,eS]=(0,s.useState)(null),[eT,eM]=(0,s.useState)(""),[eD,eB]=(0,s.useState)(""),[eR,eP]=(0,s.useState)(""),[eL,eU]=(0,s.useState)([]),[eI,eF]=(0,s.useState)(null),[eH,eE]=(0,s.useState)({...ew}),[eV,ez]=(0,s.useState)(!1),[e$,eA]=(0,s.useState)({...ew}),[eK,eO]=(0,s.useState)(!1),[eW,eq]=(0,s.useState)(!1),[eG,eX]=(0,s.useState)(0),[eY,eZ]=(0,s.useState)(null),[e_,eJ]=(0,s.useState)(null),[eQ,e0]=(0,s.useState)({maxUploadMb:50,maxConcurrent:3,maxReadableMb:5,taskDefaultUseWorktree:!0,taskDefaultAutoStart:!1}),[e1,e2]=(0,s.useState)({timeoutSec:30}),[e5,e3]=(0,s.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80,codeTimeoutSec:30}),[e4,e6]=(0,s.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[e7,e8]=(0,s.useState)(null),[e9,te]=(0,s.useState)(!1),[tt,ts]=(0,s.useState)(""),[ta,tn]=(0,s.useState)(!0);(0,s.useEffect)(()=>X(!0),[]),(0,s.useEffect)(()=>{(0,P.getConfigValue)("terminal.app","Terminal").then(Z),F().then(J),(0,P.getConfigValue)("editor.command","").then(ee),H().then(es)},[]),(0,s.useEffect)(()=>{if(0===_.length||!Y||_.some(e=>e.value===Y))return;let e=_.find(e=>e.name===Y);e&&(Z(e.value),(0,L.setConfigValue)("terminal.app",e.value))},[_,Y]),(0,s.useEffect)(()=>{if(0===et.length||!Q||et.some(e=>e.command===Q))return;let e=et.find(e=>e.name===Q);e&&(ee(e.command),(0,L.setConfigValue)("editor.command",e.command))},[et,Q]),(0,s.useEffect)(()=>{K().then(en);let e=localStorage.getItem(ek);e&&el(e)},[]),(0,s.useEffect)(()=>{(0,E.getPrompts)().then(ex)},[]);let ti=async()=>{try{let e=await fetch("/api/internal/hooks/install");if(e.ok){let t=await e.json();e8(t)}}catch{}};async function tr(e){if(!eo){ec(e),em(t=>{let s={...t};return delete s[e],s});try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})}),s=await t.json();em(t=>({...t,[e]:s}))}catch{em(t=>({...t,[e]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{ec(null)}}}(0,s.useEffect)(()=>{(0,P.getConfigValue)("git.pathMappingRules",[]).then(e=>{let t=new Set,s=!1,a=e.map(e=>{if(!e.id||t.has(e.id)){s=!0;let a={...e,id:crypto.randomUUID()};return t.add(a.id),a}return t.add(e.id),e});eU(a),s&&(0,L.setConfigValue)("git.pathMappingRules",a)}),(0,P.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(e=>{ts(e.join(", "))}),ti(),(0,U.getConfigValues)(["system.maxUploadBytes","system.maxConcurrentExecutions","system.maxReadableFileBytes","task.defaultUseWorktree","task.defaultAutoStart","git.timeoutSec","search.resultLimit","search.allModeCap","search.debounceMs","search.snippetLength","search.codeTimeoutSec","missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(e=>{let t=e["system.maxUploadBytes"]??0x3200000,s=e["system.maxReadableFileBytes"]??5242880;e0({maxUploadMb:Math.round(t/1024/1024),maxConcurrent:e["system.maxConcurrentExecutions"]??3,maxReadableMb:Math.round(s/1024/1024),taskDefaultUseWorktree:"boolean"!=typeof e["task.defaultUseWorktree"]||e["task.defaultUseWorktree"],taskDefaultAutoStart:"boolean"==typeof e["task.defaultAutoStart"]&&e["task.defaultAutoStart"]}),e2({timeoutSec:e["git.timeoutSec"]??30}),e3({resultLimit:e["search.resultLimit"]??20,allModeCap:e["search.allModeCap"]??5,debounceMs:e["search.debounceMs"]??250,snippetLength:e["search.snippetLength"]??80,codeTimeoutSec:e["search.codeTimeoutSec"]??30}),e6({minCols:e["missions.grid.minCols"]??1,maxCols:e["missions.grid.maxCols"]??5,minRows:e["missions.grid.minRows"]??1,maxRows:e["missions.grid.maxRows"]??5})})},[]),(0,s.useEffect)(()=>{(0,P.getConfigValue)("notification.enabled",!0).then(tn)},[]);let tl=(0,s.useCallback)(()=>{ef(null),eM(""),eB(""),eP(""),ep(!0)},[]),to=(0,s.useCallback)(e=>{ef(e),eM(e.name),eB(e.description??""),eP(e.content),ep(!0)},[]),tc=(0,s.useCallback)(async()=>{eT.trim()&&eR.trim()&&(eh?await z(eh.id,{name:eT.trim(),description:eD.trim()||void 0,content:eR.trim()}):await V({name:eT.trim(),description:eD.trim()||void 0,content:eR.trim()}),ep(!1),ex(await (0,E.getPrompts)()),e.refresh())},[eT,eD,eR,eh,e]),td=(0,s.useCallback)(async()=>{eC&&(await $(eC),eS(null),ex(await (0,E.getPrompts)()),e.refresh())},[eC,e]),tm=(0,s.useCallback)(async t=>{await A(t),ex(await (0,E.getPrompts)()),e.refresh()},[e]),tu=async()=>{await (0,L.setConfigValue)("system.maxUploadBytes",1024*eQ.maxUploadMb*1024),await (0,L.setConfigValue)("system.maxConcurrentExecutions",eQ.maxConcurrent),await (0,L.setConfigValue)("system.maxReadableFileBytes",1024*eQ.maxReadableMb*1024)},tx=async()=>{await (0,L.setConfigValue)("task.defaultUseWorktree",eQ.taskDefaultUseWorktree),await (0,L.setConfigValue)("task.defaultAutoStart",eQ.taskDefaultAutoStart),await (0,L.setConfigValue)("task.mcpDefaultsConfigured",!0)},tg=async()=>{await (0,L.setConfigValue)("git.timeoutSec",e1.timeoutSec)},tp=async()=>{await (0,L.setConfigValue)("search.resultLimit",e5.resultLimit),await (0,L.setConfigValue)("search.allModeCap",e5.allModeCap),await (0,L.setConfigValue)("search.debounceMs",e5.debounceMs),await (0,L.setConfigValue)("search.snippetLength",e5.snippetLength),await (0,L.setConfigValue)("search.codeTimeoutSec",e5.codeTimeoutSec)},th=async()=>{let e=Math.min(e4.minCols,e4.maxCols),t=Math.max(e4.minCols,e4.maxCols),s=Math.min(e4.minRows,e4.maxRows),a=Math.max(e4.minRows,e4.maxRows);e6({minCols:e,maxCols:t,minRows:s,maxRows:a}),await (0,L.setConfigValue)("missions.grid.minCols",e),await (0,L.setConfigValue)("missions.grid.maxCols",t),await (0,L.setConfigValue)("missions.grid.minRows",s),await (0,L.setConfigValue)("missions.grid.maxRows",a)},tf=async()=>{let e=tt.split(",").map(e=>e.trim()).filter(Boolean);await (0,L.setConfigValue)("hooks.autoUploadTypes",e)},tb=async()=>{if(e7){te(!0);try{let e=e7.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:e}),await ti()}finally{te(!1)}}},tj=async()=>{if(!e$.host.trim()||!e$.localPathTemplate.trim())return;let e=e$.localPathTemplate.trim().replace(/\/+$/,""),t=eK?`${e}/{path}`:e,s=[...eL,{id:crypto.randomUUID(),host:e$.host.trim(),ownerMatch:e$.ownerMatch.trim()||"*",localPathTemplate:t,priority:e$.priority}];await (0,L.setConfigValue)("git.pathMappingRules",s),eU(s),eA({...ew}),eO(!1),ez(!1)},tv=async e=>{if(!eH.host.trim()||!eH.localPathTemplate.trim())return;let t=eH.localPathTemplate.trim().replace(/\/+$/,""),s=eW?`${t}/{path}`:t,a=eL.map(t=>t.id===e?{...t,host:eH.host.trim(),ownerMatch:eH.ownerMatch.trim()||"*",localPathTemplate:s,priority:eH.priority}:t);await (0,L.setConfigValue)("git.pathMappingRules",a),eU(a),eF(null),eq(!1)},tN=async e=>{let t=eL.filter(t=>t.id!==e);await (0,L.setConfigValue)("git.pathMappingRules",t),eU(t),eZ(null)};async function ty(){let e=!ta;tn(e),await (0,L.setConfigValue)("notification.enabled",e)}let tk=(0,s.useCallback)(()=>{e.back()},[e]);(0,s.useEffect)(()=>{let e=N.current;if(!e)return;let t=e.querySelector(`[data-section="${j}"]`);if(!t)return;let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();q({left:a.left-s.left,width:a.width})},[j]);let tw=eN.find(e=>e.id===j),tC=tw?ey[tw.accent]:ey.blue;return(0,t.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,t.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:g("settings.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:g("settings.configDesc")})]}),(0,t.jsxs)(r.Button,{variant:"outline",onClick:tk,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,t.jsx)(y.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,t.jsxs)("div",{ref:N,className:"relative flex gap-1 overflow-x-auto",children:[eN.map(e=>{let s=e.icon,a=j===e.id,n=ey[e.accent];return(0,t.jsxs)("button",{"data-section":e.id,onClick:()=>v(e.id),className:(0,x.cn)("relative flex items-center gap-2 rounded-t-lg px-4 py-2.5","text-sm font-medium whitespace-nowrap cursor-pointer","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a?`${n.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,t.jsx)("span",{className:(0,x.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",a?n.bg:"bg-transparent"),children:(0,t.jsx)(s,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("span",{children:g(e.labelKey)})]},e.id)}),(0,t.jsx)("div",{className:(0,x.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",tC.indicator),style:{left:I.left,width:I.width}})]})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[tw&&(0,t.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,t.jsx)("div",{className:(0,x.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",tC.bg,tC.text,tC.ring),children:(0,t.jsx)(tw.icon,{className:"h-5 w-5"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:g(tw.labelKey)}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:g(tw.descKey)})]})]}),(0,t.jsx)("div",{className:"mb-6 border-t"}),function(){switch(j){case"general":let e;return e=[{value:"light",label:g("settings.themeLight")},{value:"dark",label:g("settings.themeDark")},{value:"system",label:g("settings.themeSystem")}],(0,t.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,t.jsx)(ev,{label:g("settings.theme"),description:g("settings.themeDesc"),children:G?(0,t.jsx)(ej,{options:e,value:p??"system",onChange:e=>h(e)}):(0,t.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,t.jsx)(ev,{label:g("settings.language"),description:g("settings.languageDesc"),children:(0,t.jsx)(ej,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:f,onChange:e=>b(e)})}),(0,t.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:g("settings.terminal.label")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:g("settings.terminal.desc")})]}),_.length>0&&(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:_.map(e=>{let s=Y===e.value,a=(0,x.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",e.installed?s?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),n=()=>{e.installed&&(Z(e.value),(0,L.setConfigValue)("terminal.app",e.value))};return e.installed?(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name},e.value):(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name})}),(0,t.jsx)(O.TooltipContent,{side:"top",children:g("settings.app.notInstalled")})]},e.value)})})]}),(0,t.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:g("settings.editor.label")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:g("settings.editor.desc")})]}),et.length>0&&(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:et.map(e=>{let s=Q===e.command,a=(0,x.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",e.installed?s?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),n=()=>{e.installed&&(ee(e.command),(0,L.setConfigValue)("editor.command",e.command))};return e.installed?(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name},e.command):(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name})}),(0,t.jsx)(O.TooltipContent,{side:"top",children:g("settings.app.notInstalled")})]},e.command)})})]})]});case"ai-tools":return(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:ea.map(e=>{let s=ei===e.name,a=eo===e.name,n=ed[e.name];return(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"px-5 py-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:e.displayName}),(0,t.jsx)(d.Badge,{variant:"outline",children:g("label.builtin")}),s&&(0,t.jsxs)(d.Badge,{variant:"secondary",className:"shrink-0",children:[(0,t.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),g("settings.prompts.default")]}),n&&(0,t.jsx)(d.Badge,{variant:n.ok?"secondary":"destructive",className:(0,x.cn)("shrink-0",n.ok&&"bg-green-600 text-white hover:bg-green-700"),children:n.ok?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.CheckCircle2,{className:"h-3 w-3 mr-1"}),g("settings.aiTools.testPassed")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.XCircle,{className:"h-3 w-3 mr-1"}),g("settings.aiTools.testFailed")]})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.cli.available&&e.cli.version?`${e.name} \xb7 ${e.cli.version}`:e.name})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!s&&(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",onClick:()=>{var t;el(t=e.name),localStorage.setItem(ek,t)},children:[(0,t.jsx)(w,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),g("settings.prompts.setDefault")]}),(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:()=>tr(e.name),disabled:a,children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),g("settings.aiTools.testing")]}):g("settings.aiTools.testConnection")})]})]}),n&&(0,t.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,t.jsx)("div",{className:"space-y-1.5",children:n.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:(0,x.cn)("w-1.5 h-1.5 rounded-full shrink-0",s.passed?"bg-green-500":"bg-red-500")}),(0,t.jsx)("span",{className:(0,x.cn)(s.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:s.message})]},`${e.name}-${s.name}`))})})]})},e.name)})});case"prompts":return G?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(r.Button,{onClick:tl,variant:"default",children:[(0,t.jsx)(k.Plus,{className:"h-4 w-4 mr-2"}),g("settings.prompts.newPrompt")]})}),0===eu.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:g("settings.prompts.empty")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:g("settings.prompts.emptyHint")})]}):(0,t.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:eu.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h4",{className:"text-sm font-medium truncate",children:e.name}),e.isDefault&&(0,t.jsxs)(d.Badge,{variant:"secondary",className:"shrink-0 rounded-full text-xs",children:[(0,t.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),g("settings.prompts.default")]})]}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>tm(e.id),title:g("settings.prompts.setDefault"),children:(0,t.jsx)(w,{className:(0,x.cn)("h-4 w-4",e.isDefault?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>to(e),title:g("settings.prompts.editPrompt"),children:(0,t.jsx)(S,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>eS(e.id),className:"text-destructive",title:g("settings.prompts.delete"),children:(0,t.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]},e.id))}),(0,t.jsx)(u.Dialog,{open:eg,onOpenChange:ep,children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:eh?g("settings.prompts.editPrompt"):g("settings.prompts.newPrompt")}),(0,t.jsx)(u.DialogDescription,{children:eh?g("settings.prompts.editPrompt"):g("settings.prompts.newPrompt")})]}),(0,t.jsxs)("div",{className:"space-y-4 py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-name",children:g("settings.prompts.promptName")}),(0,t.jsx)(l.Input,{id:"prompt-name",value:eT,onChange:e=>eM(e.target.value),placeholder:g("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-description",children:g("settings.prompts.promptDescription")}),(0,t.jsx)(l.Input,{id:"prompt-description",value:eD,onChange:e=>eB(e.target.value),placeholder:g("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-content",children:g("settings.prompts.promptContent")}),(0,t.jsx)(o.Textarea,{id:"prompt-content",value:eR,onChange:e=>eP(e.target.value),placeholder:g("settings.prompts.promptContentPlaceholder"),rows:8,className:"mt-1.5 font-mono text-sm"})]})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>ep(!1),children:g("settings.prompts.cancel")}),(0,t.jsx)(r.Button,{onClick:tc,disabled:!eT.trim()||!eR.trim(),children:g("settings.prompts.save")})]})]})}),(0,t.jsx)(u.Dialog,{open:!!eC,onOpenChange:e=>!e&&eS(null),children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:g("settings.prompts.deleteConfirmTitle")}),(0,t.jsx)(u.DialogDescription,{children:g("settings.prompts.deleteConfirmMessage")})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>eS(null),children:g("settings.prompts.cancel")}),(0,t.jsx)(r.Button,{variant:"destructive",onClick:td,children:g("settings.prompts.delete")})]})]})})]}):(0,t.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let s,a,n;return(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.git.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.git.desc")})]}),(0,t.jsxs)(r.Button,{onClick:()=>{eA({...ew}),ez(!0)},children:[(0,t.jsx)(k.Plus,{className:"mr-2 h-4 w-4"}),g("settings.config.git.addRule")]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[0!==eL.length||eV?(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:eL.map(e=>eI===e.id?(0,t.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.host")}),(0,t.jsx)(l.Input,{value:eH.host,onChange:e=>eE(t=>({...t,host:e.target.value})),placeholder:g("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.ownerMatch")}),(0,t.jsx)(l.Input,{value:eH.ownerMatch,onChange:e=>eE(t=>({...t,ownerMatch:e.target.value})),placeholder:g("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5 col-span-2",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.localPathTemplate")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{value:eH.localPathTemplate,onChange:e=>eE(t=>({...t,localPathTemplate:e.target.value})),placeholder:g("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:eW?"default":"outline",size:"sm",type:"button",onClick:()=>eq(e=>!e),className:"shrink-0 font-mono",children:"{path}"})}),(0,t.jsx)(O.TooltipContent,{side:"top",className:"max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:g("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:g("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>eJ("edit"),children:(0,t.jsx)(R.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(O.TooltipContent,{children:g("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:eW?g("onboarding.step3.pathHintFull"):g("onboarding.step3.pathHintRepo")})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.priority")}),(0,t.jsx)(l.Input,{type:"number",value:eH.priority,onChange:e=>eE(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>{eF(null),eq(!1)},children:g("settings.config.git.cancel")}),(0,t.jsx)(r.Button,{size:"sm",onClick:()=>tv(e.id),children:g("settings.config.git.save")})]})]},e.id):(0,t.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e.host}),"*"!==e.ownerMatch&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",e.ownerMatch]}),(0,t.jsxs)(d.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[g("settings.config.git.priority")," ",e.priority]})]}),(0,t.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:e.localPathTemplate})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{let t,s,a;return t=e.localPathTemplate,a=(s=/\/\{path\}\/?$/.test(t))?t.replace(/\/?\{path\}\/?$/,"").replace(/\/+$/,""):t,void(eF(e.id),eE({host:e.host,ownerMatch:e.ownerMatch,localPathTemplate:a,priority:e.priority}),eq(s))},title:g("settings.config.git.edit"),children:(0,t.jsx)(S,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>eZ(e.id),className:"text-destructive",title:g("settings.config.git.delete"),children:(0,t.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]})},e.id))}):(0,t.jsx)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:g("settings.config.git.noRules")})}),eV&&(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:g("settings.config.git.host")}),(0,t.jsx)(l.Input,{value:e$.host,onChange:e=>eA(t=>({...t,host:e.target.value})),placeholder:g("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:g("settings.config.git.ownerMatch")}),(0,t.jsx)(l.Input,{value:e$.ownerMatch,onChange:e=>eA(t=>({...t,ownerMatch:e.target.value})),placeholder:g("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:g("settings.config.git.localPathTemplate")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{value:e$.localPathTemplate,onChange:e=>eA(t=>({...t,localPathTemplate:e.target.value})),placeholder:g("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:eK?"default":"outline",size:"sm",type:"button",onClick:()=>eO(e=>!e),className:"shrink-0 font-mono",children:"{path}"})}),(0,t.jsx)(O.TooltipContent,{side:"top",className:"max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:g("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:g("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>eJ("add"),children:(0,t.jsx)(R.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(O.TooltipContent,{children:g("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:eK?g("onboarding.step3.pathHintFull"):g("onboarding.step3.pathHintRepo")})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:g("settings.config.git.priority")}),(0,t.jsx)(l.Input,{type:"number",value:e$.priority,onChange:e=>eA(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]}),e$.localPathTemplate&&(s=e$.localPathTemplate.trim().replace(/\/+$/,""),a=eK?`${s}/{path}`:s,n=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,t.jsxs)("div",{className:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:g("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:n.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>eX(s),className:(0,x.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",eG===s?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:e.label},s))})]}),(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:n[eG].url}),(0,t.jsxs)("p",{className:"font-mono text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-foreground font-medium",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],n=s.match(/^git@[^:]+:(.+)$/);if(n)a=n[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let i=a[0],r=a[a.length-1],l=a.join("/");if(e.includes("{path}"))return e.replace("{path}",l).replace("{owner}",i).replace("{repo}",r).replace(/\/+$/,"");let o=e.replace("{owner}",i).replace("{repo}","").replace(/\/+$/,"");return`${o}/${r}`}(a,n[eG].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>ez(!1),children:g("settings.config.git.cancel")}),(0,t.jsxs)(r.Button,{size:"sm",onClick:tj,disabled:!e$.host.trim()||!e$.localPathTemplate.trim(),children:[(0,t.jsx)(T,{className:"h-3.5 w-3.5 mr-1.5"}),g("settings.config.git.save")]})]})]})]})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.system.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.system.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxUpload")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxUploadHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:1,max:500,value:eQ.maxUploadMb,onChange:e=>e0(t=>({...t,maxUploadMb:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxConcurrent")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxConcurrentHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:eQ.maxConcurrent,onChange:e=>e0(t=>({...t,maxConcurrent:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxReadable")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxReadableHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:1,max:50,value:eQ.maxReadableMb,onChange:e=>e0(t=>({...t,maxReadableMb:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]})]}),(0,t.jsx)(r.Button,{onClick:tu,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.task.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.task.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.taskDefaultWorktree")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.taskDefaultWorktreeHint")})]}),(0,t.jsx)("button",{type:"button",onClick:()=>e0(e=>({...e,taskDefaultUseWorktree:!e.taskDefaultUseWorktree})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${eQ.taskDefaultUseWorktree?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:eQ.taskDefaultUseWorktree?g("task.worktreeYes"):g("task.worktreeNo")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.taskDefaultAutoStart")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.taskDefaultAutoStartHint")})]}),(0,t.jsx)("button",{type:"button",onClick:()=>e0(e=>({...e,taskDefaultAutoStart:!e.taskDefaultAutoStart})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${eQ.taskDefaultAutoStart?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:eQ.taskDefaultAutoStart?g("task.autoStartYes"):g("task.autoStartNo")})]})]}),(0,t.jsx)(r.Button,{onClick:tx,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.gitParams.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.gitParams.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.gitParams.timeout")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.gitParams.timeoutHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:5,max:300,value:e1.timeoutSec,onChange:e=>e2(t=>({...t,timeoutSec:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,t.jsx)(r.Button,{onClick:tg,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.search.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.search.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.resultLimit")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.resultLimitHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:5,max:100,value:e5.resultLimit,onChange:e=>e3(t=>({...t,resultLimit:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.allModeCap")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.allModeCapHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:1,max:20,value:e5.allModeCap,onChange:e=>e3(t=>({...t,allModeCap:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.debounceMs")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.debounceMsHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:50,max:1e3,value:e5.debounceMs,onChange:e=>e3(t=>({...t,debounceMs:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.snippetLength")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.snippetLengthHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:20,max:500,value:e5.snippetLength,onChange:e=>e3(t=>({...t,snippetLength:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.codeTimeout")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.codeTimeoutHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:5,max:300,step:5,value:e5.codeTimeoutSec,onChange:e=>e3(t=>({...t,codeTimeoutSec:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]})]}),(0,t.jsx)(r.Button,{onClick:tp,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.missions.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.missions.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.minCols")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.minCols,onChange:e=>e6(t=>({...t,minCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.maxCols")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.maxCols,onChange:e=>e6(t=>({...t,maxCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.minRows")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.minRows,onChange:e=>e6(t=>({...t,minRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.maxRows")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.maxRows,onChange:e=>e6(t=>({...t,maxRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,t.jsx)(r.Button,{onClick:th,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.hooks.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.hooks.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.hooks.autoUploadTypes")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.hooks.autoUploadTypesHint")})]}),(0,t.jsx)(l.Input,{value:tt,onChange:e=>ts(e.target.value),placeholder:"png, jpg, jpeg, gif, webp, svg, pdf",className:"w-80 rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsx)(r.Button,{onClick:tf,className:"rounded-lg",children:g("common.save")}),(0,t.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:e7?.installed?g("settings.config.hooks.installed"):g("settings.config.hooks.notInstalled")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.hooks.installHint")})]}),(0,t.jsx)(r.Button,{variant:e7?.installed?"destructive":"default",onClick:tb,disabled:e9||!e7,className:"rounded-lg",children:e7?.installed?g("settings.config.hooks.uninstall"):g("settings.config.hooks.install")})]})]}),(0,t.jsx)(u.Dialog,{open:!!eY,onOpenChange:e=>!e&&eZ(null),children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:g("settings.config.git.deleteConfirm")}),(0,t.jsx)(u.DialogDescription,{children:g("settings.config.git.deleteConfirmMessage")})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>eZ(null),children:g("settings.config.git.cancel")}),(0,t.jsx)(r.Button,{variant:"destructive",onClick:()=>eY&&tN(eY),children:g("settings.config.git.delete")})]})]})})]});case"notifications":return(0,t.jsx)("div",{className:"divide-y divide-border/50",children:(0,t.jsxs)("div",{className:"flex items-center justify-between py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:g("settings.notifications.enable")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:g("settings.notifications.enableDesc")})]}),(0,t.jsx)(m.Switch,{checked:ta,onCheckedChange:ty})]})});case"backup":return(0,t.jsx)(er,{});case"extensions":return(0,t.jsx)(eb,{})}}()]})}),(0,t.jsx)(W.FolderBrowserDialog,{open:null!==e_,onOpenChange:e=>{e||eJ(null)},onSelect:e=>{"add"===e_?eA(t=>({...t,localPathTemplate:e})):"edit"===e_&&eE(t=>({...t,localPathTemplate:e})),eJ(null)}})]})}e.s(["default",0,function(){return(0,t.jsx)(eC,{})}],113399)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,113399,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),n=e.i(821957),i=e.i(533499),r=e.i(519455),l=e.i(793479),o=e.i(624687),c=e.i(110204),d=e.i(487486),m=e.i(699375),u=e.i(776639),x=e.i(975157),g=e.i(386343),p=e.i(572989);let h=(0,p.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var f=e.i(645378);let b=(0,p.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var j=e.i(125177),v=e.i(256753),N=e.i(245697),y=e.i(657153),k=e.i(232545);let w=(0,p.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var C=e.i(998626);let S=(0,p.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),T=(0,p.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var M=e.i(400355),D=e.i(301348),B=e.i(181209),R=e.i(453889),P=e.i(715207),L=e.i(288285),U=e.i(200694),I=e.i(514798);let F=(0,I.createServerReference)("00a1cead187343d5168c4fd4e369d907515a6faa74",I.callServer,void 0,I.findSourceMapURL,"getAvailableTerminalApps"),H=(0,I.createServerReference)("005a06cc0d7f06dc6e024778e20be30a6d8ee3901a",I.callServer,void 0,I.findSourceMapURL,"getAvailableEditors");var E=e.i(436325);let V=(0,I.createServerReference)("40abff11f62507e94641e5bfbb49c01adcd12a45d3",I.callServer,void 0,I.findSourceMapURL,"createPrompt"),z=(0,I.createServerReference)("6060045bbf8c915448fb3f6cc34bdc320dfa044635",I.callServer,void 0,I.findSourceMapURL,"updatePrompt"),$=(0,I.createServerReference)("400df3667df21c9a48c89a463f1f80bf3122351c50",I.callServer,void 0,I.findSourceMapURL,"deletePrompt"),A=(0,I.createServerReference)("6015d584d79c9a518547354b76efe7027fd0222457",I.callServer,void 0,I.findSourceMapURL,"setDefaultPrompt"),K=(0,I.createServerReference)("00cfe9c54648d807cd2a05b279be0983752ad2d1d5",I.callServer,void 0,I.findSourceMapURL,"getAvailableProviders");var O=e.i(746798),W=e.i(224277);let q=(0,p.default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);var G=e.i(631675);let X=(0,p.default)("folder-up",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);var Y=e.i(922541),Z=e.i(759686),_=e.i(487278),J=e.i(360112);let Q=(0,I.createServerReference)("402c500c9c5b6b55b06685945404442a3e304e4f46",I.callServer,void 0,I.findSourceMapURL,"createBackup"),ee=(0,I.createServerReference)("008c16087e9059dc6346b9708b7d7df5d38f4898a1",I.callServer,void 0,I.findSourceMapURL,"listBackupFiles"),et=(0,I.createServerReference)("4060dff1430a16433a55b3abb784c483de29763367",I.callServer,void 0,I.findSourceMapURL,"deleteBackupFile"),es=(0,I.createServerReference)("409caf0fbe206cb3780809785e353bd7b24138ee41",I.callServer,void 0,I.findSourceMapURL,"restoreBackup"),ea=(0,I.createServerReference)("40e8ae6815d9b1efccb9499ac4168f46d5a8152656",I.callServer,void 0,I.findSourceMapURL,"resetSystem"),en=(0,I.createServerReference)("003e805ab61012118717ca7313a5a15a1cf0c651aa",I.callServer,void 0,I.findSourceMapURL,"getBackupDir"),ei=(0,I.createServerReference)("401c2813bf560faaee7f20b8bf8b9fe16d8895a941",I.callServer,void 0,I.findSourceMapURL,"setBackupDir");function er(){let{t:e,locale:n}=(0,i.useI18n)(),o=(0,a.useRouter)(),[c,d]=(0,s.useState)([]),[m,x]=(0,s.useState)(""),[g,p]=(0,s.useState)(!1),[h,f]=(0,s.useState)(!0),[b,j]=(0,s.useState)(null),[v,N]=(0,s.useState)(!1),[y,k]=(0,s.useState)(""),w=(0,s.useRef)(null),[S,T]=(0,s.useState)(!1),[D,B]=(0,s.useState)(""),R=(0,s.useCallback)(async()=>{f(!0);try{let[e,t]=await Promise.all([ee(),en()]);d(e),x(t)}finally{f(!1)}},[]);(0,s.useEffect)(()=>{R()},[R]);let P=async()=>{let t=y.trim()||void 0;N(!1),k(""),j("create");try{await Q(t),J.toast.success(e("settings.backup.createSuccess")),await R()}catch{J.toast.error(e("settings.backup.createError"))}finally{j(null)}},L=async t=>{if(confirm(e("settings.backup.restoreConfirm"))){j("restore");try{await es(t),J.toast.success(e("settings.backup.restoreSuccess"),{action:{label:e("settings.backup.reload"),onClick:()=>window.location.reload()},duration:15e3}),await R()}catch{J.toast.error(e("settings.backup.restoreError"))}finally{j(null)}}},U=async t=>{if(confirm(e("settings.backup.deleteConfirm")))try{await et(t),J.toast.success(e("settings.backup.deleteSuccess")),d(e=>e.filter(e=>e.filename!==t))}catch{J.toast.error(e("settings.backup.deleteError"))}},I=async t=>{p(!1);try{await ei(t),x(t),J.toast.success(e("settings.backup.dirSaved")),await R()}catch{J.toast.error(e("settings.backup.dirError"))}},F=async t=>{let s=t.target.files?.[0];if(s){t.target.value="",j("import");try{let t=new FormData;t.append("file",s);let a=await fetch("/api/internal/backup/import",{method:"POST",body:t});if(!a.ok){let t=await a.json();J.toast.error("Invalid backup archive"===t.error?e("settings.backup.importInvalid"):(t.error,e("settings.backup.importError")));return}J.toast.success(e("settings.backup.importSuccess")),await R()}catch{J.toast.error(e("settings.backup.importError"))}finally{j(null)}}},H=async()=>{if("RESET"===D){T(!1),B(""),j("reset");try{await ea("RESET"),J.toast.success(e("settings.backup.resetSuccess")),o.push("/")}catch{J.toast.error(e("settings.backup.resetError"))}finally{j(null)}}},E=null!==b;return(0,t.jsxs)("div",{className:"space-y-6",children:[("restore"===b||"reset"===b)&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,t.jsx)(M.Loader2,{className:"h-8 w-8 animate-spin text-muted-foreground"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"restore"===b?e("settings.backup.restoring"):e("settings.backup.resetting")})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold",children:e("settings.backup.sectionTitle")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{children:[e("settings.backup.dir"),":"]}),(0,t.jsx)("code",{className:"rounded bg-muted px-2 py-0.5 text-xs",children:m}),(0,t.jsx)(r.Button,{variant:"ghost",onClick:()=>p(!0),className:"text-xs text-muted-foreground",children:e("settings.backup.dirChange")})]}),(0,t.jsx)(W.FolderBrowserDialog,{open:g,onOpenChange:p,onSelect:I})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.Button,{onClick:()=>{k(""),N(!0)},disabled:E,className:"gap-2",children:"create"===b?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-4 w-4 animate-spin"})," ",e("settings.backup.creating")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q,{className:"h-4 w-4"})," ",e("settings.backup.create")]})}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsxs)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",disabled:E,onClick:()=>w.current?.click(),className:"gap-2"}),children:[(0,t.jsx)(X,{className:"h-4 w-4"}),e("settings.backup.import")]}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.importHint")})]}),(0,t.jsx)("input",{ref:w,type:"file",accept:".tar.gz,.gz",className:"hidden",onChange:F})]}),(0,t.jsx)(u.Dialog,{open:v,onOpenChange:N,children:(0,t.jsxs)(u.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(u.DialogHeader,{children:(0,t.jsx)(u.DialogTitle,{children:e("settings.backup.create")})}),(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:e("settings.backup.createLabel")}),(0,t.jsx)(l.Input,{value:y,onChange:e=>k(e.target.value),onKeyDown:e=>"Enter"===e.key&&P(),placeholder:e("settings.backup.createLabelPlaceholder"),className:"mt-1.5",autoFocus:!0})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>N(!1),children:e("common.cancel")}),(0,t.jsx)(r.Button,{onClick:P,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:e("settings.backup.create")})]})]})}),h?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(M.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):0===c.length?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-12 text-center",children:[(0,t.jsx)(_.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("settings.backup.empty")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e("settings.backup.emptyDesc")})]}):(0,t.jsx)("div",{className:"space-y-3",children:c.map(s=>{var a,i;return(0,t.jsx)("div",{className:"group rounded-lg border border-border bg-card p-4 transition-colors hover:bg-accent/30",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s.label?(0,t.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:s.label}):(0,t.jsx)("span",{className:"truncate text-sm font-medium font-mono text-foreground",children:s.filename}),s.autoBackup&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-500 ring-1 ring-amber-500/20",children:e("settings.backup.autoLabel")})]}),s.label&&(0,t.jsx)("div",{className:"mt-0.5 text-[11px] font-mono text-muted-foreground/60",children:s.filename}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground",children:[(a=s.size)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`," · ",(i=s.createdAt,new Date(i).toLocaleString("zh"===n?"zh-CN":"en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}))]}),s.preview.length>0&&(0,t.jsxs)("div",{className:"mt-1.5 text-xs text-muted-foreground",children:[s.preview.map((e,s)=>(0,t.jsxs)("span",{children:[s>0&&" ",e.workspace,"(",e.projects.join(", "),")"]},s)),s.stats.workspaces>s.preview.length&&(0,t.jsxs)("span",{children:[" ",e("settings.backup.workspaces",{count:String(s.stats.workspaces)})]})]}),(0,t.jsxs)("div",{className:"mt-0.5 text-xs text-muted-foreground",children:[e("settings.backup.projects",{count:String(s.stats.projects)})," · ",e("settings.backup.tasks",{count:String(s.stats.tasks)})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-xs",onClick:()=>L(s.filename),disabled:E,className:"text-muted-foreground hover:text-foreground"}),children:(0,t.jsx)(G.Upload,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.restore")})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-xs",onClick:()=>U(s.filename),disabled:E,className:"text-muted-foreground hover:text-rose-400"}),children:(0,t.jsx)(C.Trash2,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.delete")})]})]})]})},s.filename)})}),(0,t.jsxs)("div",{className:"border-t border-border pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-rose-400",children:[(0,t.jsx)(Z.AlertTriangle,{className:"h-4 w-4"}),e("settings.backup.dangerZone")]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground leading-relaxed",children:e("settings.backup.resetDesc")}),(0,t.jsxs)(r.Button,{variant:"outline",onClick:()=>{B(""),T(!0)},disabled:E,className:"mt-3 border-rose-500/30 text-rose-400 hover:bg-rose-500/10 hover:text-rose-400",children:[(0,t.jsx)(Y.RotateCcw,{className:"mr-2 h-3.5 w-3.5"}),e("settings.backup.reset")]})]}),(0,t.jsx)(u.Dialog,{open:S,onOpenChange:T,children:(0,t.jsxs)(u.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:e("settings.backup.resetConfirmTitle")}),(0,t.jsx)(u.DialogDescription,{children:e("settings.backup.resetConfirmDesc")})]}),(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:e("settings.backup.resetConfirmInput")}),(0,t.jsx)(l.Input,{value:D,onChange:e=>B(e.target.value),placeholder:"RESET",className:"mt-1.5 font-mono"})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>T(!1),children:e("common.cancel")}),(0,t.jsx)(r.Button,{disabled:"RESET"!==D,onClick:H,className:"border-rose-500/30 bg-rose-500/10 text-rose-400 hover:bg-rose-500/20",children:e("settings.backup.reset")})]})]})})]})}var el=e.i(887911),eo=e.i(597746);let ec=(0,p.default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var ed=e.i(875840),em=e.i(475958),eu=e.i(194358),ex=e.i(337822),eg=e.i(991838);let ep=[{os:"macOS",cmd:"brew install ripgrep"},{os:"Windows",cmd:"winget install BurntSushi.ripgrep"},{os:"Linux",cmd:"sudo apt install ripgrep"}];function eh({cmd:e}){let{t:a}=(0,i.useI18n)(),[n,l]=(0,s.useState)(!1),o=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),J.toast.success(a("common.copied")),setTimeout(()=>l(!1),1500)}catch{J.toast.error(a("common.copyFailed"))}};return(0,t.jsxs)("div",{className:"flex items-start gap-1 rounded-md bg-background/60 pl-2 pr-1 py-1 ring-1 ring-border/60",children:[(0,t.jsx)("code",{className:"min-w-0 flex-1 break-all font-mono text-[11px] leading-relaxed",children:e}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-xs",className:"shrink-0 text-muted-foreground","aria-label":a("common.copy"),onClick:o,children:n?(0,t.jsx)(eo.Check,{className:"h-3 w-3 text-emerald-400"}):(0,t.jsx)(ed.Copy,{className:"h-3 w-3"})})]})}function ef({extension:e}){let{t:a}=(0,i.useI18n)(),{status:n,loading:l,isInstalling:o,install:c,uninstall:d,refresh:m}=(0,eg.useExtension)(e.id),[u,x]=(0,s.useState)(!1),g=e.icon,p=n.installed,h=async()=>{let t=await c();t.success?J.toast.success(a("settings.extensions.installSuccess").replace("{name}",e.name)):J.toast.error(a("settings.extensions.installFailed").replace("{name}",e.name)+(t.error?`: ${t.error.slice(0,200)}`:""))},f=async()=>{let t=await d();t.success?J.toast.success(a("settings.extensions.uninstallSuccess").replace("{name}",e.name)):J.toast.error(a("settings.extensions.uninstallFailed").replace("{name}",e.name)+(t.error?`: ${t.error.slice(0,200)}`:""))},b=async()=>{x(!0);try{await m()}finally{x(!1)}},j=()=>{window.open(e.homepageUrl,"_blank","noopener,noreferrer")};return(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-background ring-1 ring-border",children:(0,t.jsx)(g,{className:"h-5 w-5 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:e.name}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description})]})]}),(0,t.jsxs)("span",{className:"shrink-0 rounded-md bg-background px-2 py-0.5 text-xs text-muted-foreground ring-1 ring-border",children:["~",e.sizeMB," MB"]})]}),(0,t.jsx)("div",{className:"mt-4 flex items-center gap-2 text-xs",children:l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:a("common.loading")})]}):p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.CheckCircle2,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,t.jsxs)("span",{className:"text-foreground",children:[a("settings.extensions.installed"),n.version?` v${n.version}`:""]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ec,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:a("settings.extensions.notInstalledShort")})]})}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"default",onClick:h,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.reinstalling")]}):a("settings.extensions.reinstall")}),(0,t.jsx)(r.Button,{variant:"outline",onClick:f,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.uninstalling")]}):a("settings.extensions.uninstall")})]}):e.manualInstall?(0,t.jsxs)(ex.Popover,{children:[(0,t.jsx)(ex.PopoverTrigger,{render:e=>(0,t.jsxs)(r.Button,{variant:"default",...e,children:[(0,t.jsx)(q,{className:"h-3.5 w-3.5"}),a("settings.extensions.installViaHomepage")]})}),(0,t.jsxs)(ex.PopoverContent,{align:"start",className:"w-80 max-w-[90vw] gap-2 text-xs leading-relaxed",children:[(0,t.jsx)("p",{children:a("settings.extensions.manualInstallHintIntro")}),(0,t.jsx)("div",{className:"space-y-2",children:ep.map(({os:e,cmd:s})=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[11px] font-medium text-muted-foreground",children:e}),(0,t.jsx)(eh,{cmd:s})]},e))}),(0,t.jsx)("p",{className:"text-muted-foreground",children:a("settings.extensions.manualInstallHintAfter")}),(0,t.jsxs)("button",{type:"button",onClick:j,className:"flex items-center gap-1 self-start text-[11px] text-primary underline-offset-2 hover:underline",children:[(0,t.jsx)(em.ExternalLink,{className:"h-3 w-3"}),a("settings.extensions.visitHomepage")]})]})]}):(0,t.jsx)(r.Button,{variant:"default",onClick:h,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.installing")]}):a("settings.extensions.install")}),(0,t.jsxs)(r.Button,{variant:"ghost",onClick:b,disabled:u,children:[(0,t.jsx)(eu.RefreshCw,{className:`h-3.5 w-3.5 ${u?"animate-spin":""}`}),a("settings.extensions.recheck")]}),(0,t.jsxs)(r.Button,{variant:"ghost",onClick:j,children:[(0,t.jsx)(em.ExternalLink,{className:"h-3.5 w-3.5"}),a("settings.extensions.visitHomepage")]})]})]})}function eb(){let{t:e}=(0,i.useI18n)(),s=(0,el.listExtensionMetadata)();return(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("header",{children:[(0,t.jsx)("h2",{className:"text-base font-semibold",children:e("settings.extensions.title")}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e("settings.extensions.desc")})]}),(0,t.jsx)("div",{className:"space-y-3",children:s.map(e=>(0,t.jsx)(ef,{extension:e},e.id))})]})}function ej({options:e,value:s,onChange:a}){return(0,t.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>a(e.value),className:(0,x.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",s===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}function ev({label:e,description:s,children:a,className:n}){return(0,t.jsxs)("div",{className:(0,x.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",n),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:e}),s&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:s})]}),(0,t.jsx)("div",{className:"shrink-0",children:a})]})}let eN=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:g.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:h,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:f.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:b,accent:"amber"},{id:"extensions",labelKey:"settings.extensions.title",descKey:"settings.extensions.navDesc",icon:N.Package,accent:"indigo"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:j.Bell,accent:"rose"},{id:"backup",labelKey:"settings.backup.title",descKey:"settings.backup.navDesc",icon:v.HardDrive,accent:"cyan"}],ey={blue:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},emerald:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},violet:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},amber:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},cyan:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},rose:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},indigo:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"}},ek="ai-manager:default-cli-adapter",ew={host:"",ownerMatch:"*",localPathTemplate:"",priority:0};function eC(){let e=(0,a.useRouter)(),{t:g}=(0,i.useI18n)(),{theme:p,setTheme:h}=(0,n.useTheme)(),{locale:f,setLocale:b}=(0,i.useI18n)(),[j,v]=(0,s.useState)("general"),N=(0,s.useRef)(null),[I,q]=(0,s.useState)({left:0,width:0}),[G,X]=(0,s.useState)(!1),[Y,Z]=(0,s.useState)("Terminal"),[_,J]=(0,s.useState)([]),[Q,ee]=(0,s.useState)(""),[et,es]=(0,s.useState)([]),[ea,en]=(0,s.useState)([]),[ei,el]=(0,s.useState)("claude"),[eo,ec]=(0,s.useState)(null),[ed,em]=(0,s.useState)({}),[eu,ex]=(0,s.useState)([]),[eg,ep]=(0,s.useState)(!1),[eh,ef]=(0,s.useState)(null),[eC,eS]=(0,s.useState)(null),[eT,eM]=(0,s.useState)(""),[eD,eB]=(0,s.useState)(""),[eR,eP]=(0,s.useState)(""),[eL,eU]=(0,s.useState)([]),[eI,eF]=(0,s.useState)(null),[eH,eE]=(0,s.useState)({...ew}),[eV,ez]=(0,s.useState)(!1),[e$,eA]=(0,s.useState)({...ew}),[eK,eO]=(0,s.useState)(!1),[eW,eq]=(0,s.useState)(!1),[eG,eX]=(0,s.useState)(0),[eY,eZ]=(0,s.useState)(null),[e_,eJ]=(0,s.useState)(null),[eQ,e0]=(0,s.useState)({maxUploadMb:50,maxConcurrent:3,maxReadableMb:5,taskDefaultUseWorktree:!0,taskDefaultAutoStart:!1}),[e1,e2]=(0,s.useState)({timeoutSec:30}),[e5,e3]=(0,s.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80,codeTimeoutSec:30}),[e4,e8]=(0,s.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[e6,e7]=(0,s.useState)(null),[e9,te]=(0,s.useState)(!1),[tt,ts]=(0,s.useState)(""),[ta,tn]=(0,s.useState)(!0);(0,s.useEffect)(()=>X(!0),[]),(0,s.useEffect)(()=>{(0,P.getConfigValue)("terminal.app","Terminal").then(Z),F().then(J),(0,P.getConfigValue)("editor.command","").then(ee),H().then(es)},[]),(0,s.useEffect)(()=>{if(0===_.length||!Y||_.some(e=>e.value===Y))return;let e=_.find(e=>e.name===Y);e&&(Z(e.value),(0,L.setConfigValue)("terminal.app",e.value))},[_,Y]),(0,s.useEffect)(()=>{if(0===et.length||!Q||et.some(e=>e.command===Q))return;let e=et.find(e=>e.name===Q);e&&(ee(e.command),(0,L.setConfigValue)("editor.command",e.command))},[et,Q]),(0,s.useEffect)(()=>{K().then(en);let e=localStorage.getItem(ek);e&&el(e)},[]),(0,s.useEffect)(()=>{(0,E.getPrompts)().then(ex)},[]);let ti=async()=>{try{let e=await fetch("/api/internal/hooks/install");if(e.ok){let t=await e.json();e7(t)}}catch{}};async function tr(e){if(!eo){ec(e),em(t=>{let s={...t};return delete s[e],s});try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})}),s=await t.json();em(t=>({...t,[e]:s}))}catch{em(t=>({...t,[e]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{ec(null)}}}(0,s.useEffect)(()=>{(0,P.getConfigValue)("git.pathMappingRules",[]).then(e=>{let t=new Set,s=!1,a=e.map(e=>{if(!e.id||t.has(e.id)){s=!0;let a={...e,id:crypto.randomUUID()};return t.add(a.id),a}return t.add(e.id),e});eU(a),s&&(0,L.setConfigValue)("git.pathMappingRules",a)}),(0,P.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(e=>{ts(e.join(", "))}),ti(),(0,U.getConfigValues)(["system.maxUploadBytes","system.maxConcurrentExecutions","system.maxReadableFileBytes","task.defaultUseWorktree","task.defaultAutoStart","git.timeoutSec","search.resultLimit","search.allModeCap","search.debounceMs","search.snippetLength","search.codeTimeoutSec","missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(e=>{let t=e["system.maxUploadBytes"]??0x3200000,s=e["system.maxReadableFileBytes"]??5242880;e0({maxUploadMb:Math.round(t/1024/1024),maxConcurrent:e["system.maxConcurrentExecutions"]??3,maxReadableMb:Math.round(s/1024/1024),taskDefaultUseWorktree:"boolean"!=typeof e["task.defaultUseWorktree"]||e["task.defaultUseWorktree"],taskDefaultAutoStart:"boolean"==typeof e["task.defaultAutoStart"]&&e["task.defaultAutoStart"]}),e2({timeoutSec:e["git.timeoutSec"]??30}),e3({resultLimit:e["search.resultLimit"]??20,allModeCap:e["search.allModeCap"]??5,debounceMs:e["search.debounceMs"]??250,snippetLength:e["search.snippetLength"]??80,codeTimeoutSec:e["search.codeTimeoutSec"]??30}),e8({minCols:e["missions.grid.minCols"]??1,maxCols:e["missions.grid.maxCols"]??5,minRows:e["missions.grid.minRows"]??1,maxRows:e["missions.grid.maxRows"]??5})})},[]),(0,s.useEffect)(()=>{(0,P.getConfigValue)("notification.enabled",!0).then(tn)},[]);let tl=(0,s.useCallback)(()=>{ef(null),eM(""),eB(""),eP(""),ep(!0)},[]),to=(0,s.useCallback)(e=>{ef(e),eM(e.name),eB(e.description??""),eP(e.content),ep(!0)},[]),tc=(0,s.useCallback)(async()=>{eT.trim()&&eR.trim()&&(eh?await z(eh.id,{name:eT.trim(),description:eD.trim()||void 0,content:eR.trim()}):await V({name:eT.trim(),description:eD.trim()||void 0,content:eR.trim()}),ep(!1),ex(await (0,E.getPrompts)()),e.refresh())},[eT,eD,eR,eh,e]),td=(0,s.useCallback)(async()=>{eC&&(await $(eC),eS(null),ex(await (0,E.getPrompts)()),e.refresh())},[eC,e]),tm=(0,s.useCallback)(async t=>{await A(t),ex(await (0,E.getPrompts)()),e.refresh()},[e]),tu=async()=>{await (0,L.setConfigValue)("system.maxUploadBytes",1024*eQ.maxUploadMb*1024),await (0,L.setConfigValue)("system.maxConcurrentExecutions",eQ.maxConcurrent),await (0,L.setConfigValue)("system.maxReadableFileBytes",1024*eQ.maxReadableMb*1024)},tx=async()=>{await (0,L.setConfigValue)("task.defaultUseWorktree",eQ.taskDefaultUseWorktree),await (0,L.setConfigValue)("task.defaultAutoStart",eQ.taskDefaultAutoStart),await (0,L.setConfigValue)("task.mcpDefaultsConfigured",!0)},tg=async()=>{await (0,L.setConfigValue)("git.timeoutSec",e1.timeoutSec)},tp=async()=>{await (0,L.setConfigValue)("search.resultLimit",e5.resultLimit),await (0,L.setConfigValue)("search.allModeCap",e5.allModeCap),await (0,L.setConfigValue)("search.debounceMs",e5.debounceMs),await (0,L.setConfigValue)("search.snippetLength",e5.snippetLength),await (0,L.setConfigValue)("search.codeTimeoutSec",e5.codeTimeoutSec)},th=async()=>{let e=Math.min(e4.minCols,e4.maxCols),t=Math.max(e4.minCols,e4.maxCols),s=Math.min(e4.minRows,e4.maxRows),a=Math.max(e4.minRows,e4.maxRows);e8({minCols:e,maxCols:t,minRows:s,maxRows:a}),await (0,L.setConfigValue)("missions.grid.minCols",e),await (0,L.setConfigValue)("missions.grid.maxCols",t),await (0,L.setConfigValue)("missions.grid.minRows",s),await (0,L.setConfigValue)("missions.grid.maxRows",a)},tf=async()=>{let e=tt.split(",").map(e=>e.trim()).filter(Boolean);await (0,L.setConfigValue)("hooks.autoUploadTypes",e)},tb=async()=>{if(e6){te(!0);try{let e=e6.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:e}),await ti()}finally{te(!1)}}},tj=async()=>{if(!e$.host.trim()||!e$.localPathTemplate.trim())return;let e=e$.localPathTemplate.trim().replace(/\/+$/,""),t=eK?`${e}/{path}`:e,s=[...eL,{id:crypto.randomUUID(),host:e$.host.trim(),ownerMatch:e$.ownerMatch.trim()||"*",localPathTemplate:t,priority:e$.priority}];await (0,L.setConfigValue)("git.pathMappingRules",s),eU(s),eA({...ew}),eO(!1),ez(!1)},tv=async e=>{if(!eH.host.trim()||!eH.localPathTemplate.trim())return;let t=eH.localPathTemplate.trim().replace(/\/+$/,""),s=eW?`${t}/{path}`:t,a=eL.map(t=>t.id===e?{...t,host:eH.host.trim(),ownerMatch:eH.ownerMatch.trim()||"*",localPathTemplate:s,priority:eH.priority}:t);await (0,L.setConfigValue)("git.pathMappingRules",a),eU(a),eF(null),eq(!1)},tN=async e=>{let t=eL.filter(t=>t.id!==e);await (0,L.setConfigValue)("git.pathMappingRules",t),eU(t),eZ(null)};async function ty(){let e=!ta;tn(e),await (0,L.setConfigValue)("notification.enabled",e)}let tk=(0,s.useCallback)(()=>{e.back()},[e]);(0,s.useEffect)(()=>{let e=N.current;if(!e)return;let t=e.querySelector(`[data-section="${j}"]`);if(!t)return;let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();q({left:a.left-s.left,width:a.width})},[j]);let tw=eN.find(e=>e.id===j),tC=tw?ey[tw.accent]:ey.blue;return(0,t.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,t.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:g("settings.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:g("settings.configDesc")})]}),(0,t.jsxs)(r.Button,{variant:"outline",onClick:tk,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,t.jsx)(y.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,t.jsxs)("div",{ref:N,className:"relative flex gap-1 overflow-x-auto",children:[eN.map(e=>{let s=e.icon,a=j===e.id,n=ey[e.accent];return(0,t.jsxs)("button",{"data-section":e.id,onClick:()=>v(e.id),className:(0,x.cn)("relative flex items-center gap-2 rounded-t-lg px-4 py-2.5","text-sm font-medium whitespace-nowrap cursor-pointer","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a?`${n.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,t.jsx)("span",{className:(0,x.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",a?n.bg:"bg-transparent"),children:(0,t.jsx)(s,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("span",{children:g(e.labelKey)})]},e.id)}),(0,t.jsx)("div",{className:(0,x.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",tC.indicator),style:{left:I.left,width:I.width}})]})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[tw&&(0,t.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,t.jsx)("div",{className:(0,x.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",tC.bg,tC.text,tC.ring),children:(0,t.jsx)(tw.icon,{className:"h-5 w-5"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:g(tw.labelKey)}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:g(tw.descKey)})]})]}),(0,t.jsx)("div",{className:"mb-6 border-t"}),function(){switch(j){case"general":let e;return e=[{value:"light",label:g("settings.themeLight")},{value:"dark",label:g("settings.themeDark")},{value:"system",label:g("settings.themeSystem")}],(0,t.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,t.jsx)(ev,{label:g("settings.theme"),description:g("settings.themeDesc"),children:G?(0,t.jsx)(ej,{options:e,value:p??"system",onChange:e=>h(e)}):(0,t.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,t.jsx)(ev,{label:g("settings.language"),description:g("settings.languageDesc"),children:(0,t.jsx)(ej,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:f,onChange:e=>b(e)})}),(0,t.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:g("settings.terminal.label")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:g("settings.terminal.desc")})]}),_.length>0&&(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:_.map(e=>{let s=Y===e.value,a=(0,x.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",e.installed?s?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),n=()=>{e.installed&&(Z(e.value),(0,L.setConfigValue)("terminal.app",e.value))};return e.installed?(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name},e.value):(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name})}),(0,t.jsx)(O.TooltipContent,{side:"top",children:g("settings.app.notInstalled")})]},e.value)})})]}),(0,t.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:g("settings.editor.label")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:g("settings.editor.desc")})]}),et.length>0&&(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:et.map(e=>{let s=Q===e.command,a=(0,x.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",e.installed?s?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),n=()=>{e.installed&&(ee(e.command),(0,L.setConfigValue)("editor.command",e.command))};return e.installed?(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name},e.command):(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:n,className:a,children:e.name})}),(0,t.jsx)(O.TooltipContent,{side:"top",children:g("settings.app.notInstalled")})]},e.command)})})]})]});case"ai-tools":return(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:ea.map(e=>{let s=ei===e.name,a=eo===e.name,n=ed[e.name];return(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"px-5 py-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:e.displayName}),(0,t.jsx)(d.Badge,{variant:"outline",children:g("label.builtin")}),s&&(0,t.jsxs)(d.Badge,{variant:"secondary",className:"shrink-0",children:[(0,t.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),g("settings.prompts.default")]}),n&&(0,t.jsx)(d.Badge,{variant:n.ok?"secondary":"destructive",className:(0,x.cn)("shrink-0",n.ok&&"bg-green-600 text-white hover:bg-green-700"),children:n.ok?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.CheckCircle2,{className:"h-3 w-3 mr-1"}),g("settings.aiTools.testPassed")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.XCircle,{className:"h-3 w-3 mr-1"}),g("settings.aiTools.testFailed")]})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.cli.available&&e.cli.version?`${e.name} \xb7 ${e.cli.version}`:e.name})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!s&&(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",onClick:()=>{var t;el(t=e.name),localStorage.setItem(ek,t)},children:[(0,t.jsx)(w,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),g("settings.prompts.setDefault")]}),(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:()=>tr(e.name),disabled:a,children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),g("settings.aiTools.testing")]}):g("settings.aiTools.testConnection")})]})]}),n&&(0,t.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,t.jsx)("div",{className:"space-y-1.5",children:n.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:(0,x.cn)("w-1.5 h-1.5 rounded-full shrink-0",s.passed?"bg-green-500":"bg-red-500")}),(0,t.jsx)("span",{className:(0,x.cn)(s.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:s.message})]},`${e.name}-${s.name}`))})})]})},e.name)})});case"prompts":return G?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(r.Button,{onClick:tl,variant:"default",children:[(0,t.jsx)(k.Plus,{className:"h-4 w-4 mr-2"}),g("settings.prompts.newPrompt")]})}),0===eu.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:g("settings.prompts.empty")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:g("settings.prompts.emptyHint")})]}):(0,t.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:eu.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h4",{className:"text-sm font-medium truncate",children:e.name}),e.isDefault&&(0,t.jsxs)(d.Badge,{variant:"secondary",className:"shrink-0 rounded-full text-xs",children:[(0,t.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),g("settings.prompts.default")]})]}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>tm(e.id),title:g("settings.prompts.setDefault"),children:(0,t.jsx)(w,{className:(0,x.cn)("h-4 w-4",e.isDefault?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>to(e),title:g("settings.prompts.editPrompt"),children:(0,t.jsx)(S,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>eS(e.id),className:"text-destructive",title:g("settings.prompts.delete"),children:(0,t.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]},e.id))}),(0,t.jsx)(u.Dialog,{open:eg,onOpenChange:ep,children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:eh?g("settings.prompts.editPrompt"):g("settings.prompts.newPrompt")}),(0,t.jsx)(u.DialogDescription,{children:eh?g("settings.prompts.editPrompt"):g("settings.prompts.newPrompt")})]}),(0,t.jsxs)("div",{className:"space-y-4 py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-name",children:g("settings.prompts.promptName")}),(0,t.jsx)(l.Input,{id:"prompt-name",value:eT,onChange:e=>eM(e.target.value),placeholder:g("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-description",children:g("settings.prompts.promptDescription")}),(0,t.jsx)(l.Input,{id:"prompt-description",value:eD,onChange:e=>eB(e.target.value),placeholder:g("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-content",children:g("settings.prompts.promptContent")}),(0,t.jsx)(o.Textarea,{id:"prompt-content",value:eR,onChange:e=>eP(e.target.value),placeholder:g("settings.prompts.promptContentPlaceholder"),rows:8,className:"mt-1.5 font-mono text-sm"})]})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>ep(!1),children:g("settings.prompts.cancel")}),(0,t.jsx)(r.Button,{onClick:tc,disabled:!eT.trim()||!eR.trim(),children:g("settings.prompts.save")})]})]})}),(0,t.jsx)(u.Dialog,{open:!!eC,onOpenChange:e=>!e&&eS(null),children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:g("settings.prompts.deleteConfirmTitle")}),(0,t.jsx)(u.DialogDescription,{children:g("settings.prompts.deleteConfirmMessage")})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>eS(null),children:g("settings.prompts.cancel")}),(0,t.jsx)(r.Button,{variant:"destructive",onClick:td,children:g("settings.prompts.delete")})]})]})})]}):(0,t.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let s,a,n;return(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.git.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.git.desc")})]}),(0,t.jsxs)(r.Button,{onClick:()=>{eA({...ew}),ez(!0)},children:[(0,t.jsx)(k.Plus,{className:"mr-2 h-4 w-4"}),g("settings.config.git.addRule")]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[0!==eL.length||eV?(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:eL.map(e=>eI===e.id?(0,t.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.host")}),(0,t.jsx)(l.Input,{value:eH.host,onChange:e=>eE(t=>({...t,host:e.target.value})),placeholder:g("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.ownerMatch")}),(0,t.jsx)(l.Input,{value:eH.ownerMatch,onChange:e=>eE(t=>({...t,ownerMatch:e.target.value})),placeholder:g("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5 col-span-2",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.localPathTemplate")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{value:eH.localPathTemplate,onChange:e=>eE(t=>({...t,localPathTemplate:e.target.value})),placeholder:g("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:eW?"default":"outline",size:"sm",type:"button",onClick:()=>eq(e=>!e),className:"shrink-0 font-mono",children:"{path}"})}),(0,t.jsx)(O.TooltipContent,{side:"top",className:"max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:g("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:g("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>eJ("edit"),children:(0,t.jsx)(R.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(O.TooltipContent,{children:g("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:eW?g("onboarding.step3.pathHintFull"):g("onboarding.step3.pathHintRepo")})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.priority")}),(0,t.jsx)(l.Input,{type:"number",value:eH.priority,onChange:e=>eE(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>{eF(null),eq(!1)},children:g("settings.config.git.cancel")}),(0,t.jsx)(r.Button,{size:"sm",onClick:()=>tv(e.id),children:g("settings.config.git.save")})]})]},e.id):(0,t.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e.host}),"*"!==e.ownerMatch&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",e.ownerMatch]}),(0,t.jsxs)(d.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[g("settings.config.git.priority")," ",e.priority]})]}),(0,t.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:e.localPathTemplate})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{let t,s,a;return t=e.localPathTemplate,a=(s=/\/\{path\}\/?$/.test(t))?t.replace(/\/?\{path\}\/?$/,"").replace(/\/+$/,""):t,void(eF(e.id),eE({host:e.host,ownerMatch:e.ownerMatch,localPathTemplate:a,priority:e.priority}),eq(s))},title:g("settings.config.git.edit"),children:(0,t.jsx)(S,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>eZ(e.id),className:"text-destructive",title:g("settings.config.git.delete"),children:(0,t.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]})},e.id))}):(0,t.jsx)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:g("settings.config.git.noRules")})}),eV&&(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:g("settings.config.git.host")}),(0,t.jsx)(l.Input,{value:e$.host,onChange:e=>eA(t=>({...t,host:e.target.value})),placeholder:g("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:g("settings.config.git.ownerMatch")}),(0,t.jsx)(l.Input,{value:e$.ownerMatch,onChange:e=>eA(t=>({...t,ownerMatch:e.target.value})),placeholder:g("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:g("settings.config.git.localPathTemplate")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{value:e$.localPathTemplate,onChange:e=>eA(t=>({...t,localPathTemplate:e.target.value})),placeholder:g("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:eK?"default":"outline",size:"sm",type:"button",onClick:()=>eO(e=>!e),className:"shrink-0 font-mono",children:"{path}"})}),(0,t.jsx)(O.TooltipContent,{side:"top",className:"max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:g("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:g("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>eJ("add"),children:(0,t.jsx)(R.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(O.TooltipContent,{children:g("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:eK?g("onboarding.step3.pathHintFull"):g("onboarding.step3.pathHintRepo")})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:g("settings.config.git.priority")}),(0,t.jsx)(l.Input,{type:"number",value:e$.priority,onChange:e=>eA(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]}),e$.localPathTemplate&&(s=e$.localPathTemplate.trim().replace(/\/+$/,""),a=eK?`${s}/{path}`:s,n=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,t.jsxs)("div",{className:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:g("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:n.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>eX(s),className:(0,x.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",eG===s?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:e.label},s))})]}),(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:n[eG].url}),(0,t.jsxs)("p",{className:"font-mono text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-foreground font-medium",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],n=s.match(/^git@[^:]+:(.+)$/);if(n)a=n[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let i=a[0],r=a[a.length-1],l=a.join("/");if(e.includes("{path}"))return e.replace("{path}",l).replace("{owner}",i).replace("{repo}",r).replace(/\/+$/,"");let o=e.replace("{owner}",i).replace("{repo}","").replace(/\/+$/,"");return`${o}/${r}`}(a,n[eG].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>ez(!1),children:g("settings.config.git.cancel")}),(0,t.jsxs)(r.Button,{size:"sm",onClick:tj,disabled:!e$.host.trim()||!e$.localPathTemplate.trim(),children:[(0,t.jsx)(T,{className:"h-3.5 w-3.5 mr-1.5"}),g("settings.config.git.save")]})]})]})]})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.system.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.system.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxUpload")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxUploadHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:1,max:500,value:eQ.maxUploadMb,onChange:e=>e0(t=>({...t,maxUploadMb:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxConcurrent")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxConcurrentHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:eQ.maxConcurrent,onChange:e=>e0(t=>({...t,maxConcurrent:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxReadable")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxReadableHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:1,max:50,value:eQ.maxReadableMb,onChange:e=>e0(t=>({...t,maxReadableMb:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]})]}),(0,t.jsx)(r.Button,{onClick:tu,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.task.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.task.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.taskDefaultWorktree")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.taskDefaultWorktreeHint")})]}),(0,t.jsx)("button",{type:"button",onClick:()=>e0(e=>({...e,taskDefaultUseWorktree:!e.taskDefaultUseWorktree})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${eQ.taskDefaultUseWorktree?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:eQ.taskDefaultUseWorktree?g("task.worktreeYes"):g("task.worktreeNo")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.taskDefaultAutoStart")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.taskDefaultAutoStartHint")})]}),(0,t.jsx)("button",{type:"button",onClick:()=>e0(e=>({...e,taskDefaultAutoStart:!e.taskDefaultAutoStart})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${eQ.taskDefaultAutoStart?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:eQ.taskDefaultAutoStart?g("task.autoStartYes"):g("task.autoStartNo")})]})]}),(0,t.jsx)(r.Button,{onClick:tx,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.gitParams.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.gitParams.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.gitParams.timeout")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.gitParams.timeoutHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:5,max:300,value:e1.timeoutSec,onChange:e=>e2(t=>({...t,timeoutSec:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,t.jsx)(r.Button,{onClick:tg,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.search.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.search.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.resultLimit")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.resultLimitHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:5,max:100,value:e5.resultLimit,onChange:e=>e3(t=>({...t,resultLimit:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.allModeCap")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.allModeCapHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:1,max:20,value:e5.allModeCap,onChange:e=>e3(t=>({...t,allModeCap:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.debounceMs")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.debounceMsHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:50,max:1e3,value:e5.debounceMs,onChange:e=>e3(t=>({...t,debounceMs:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.snippetLength")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.snippetLengthHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:20,max:500,value:e5.snippetLength,onChange:e=>e3(t=>({...t,snippetLength:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.codeTimeout")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.codeTimeoutHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:5,max:300,step:5,value:e5.codeTimeoutSec,onChange:e=>e3(t=>({...t,codeTimeoutSec:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]})]}),(0,t.jsx)(r.Button,{onClick:tp,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.missions.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.missions.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.minCols")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.minCols,onChange:e=>e8(t=>({...t,minCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.maxCols")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.maxCols,onChange:e=>e8(t=>({...t,maxCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.minRows")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.minRows,onChange:e=>e8(t=>({...t,minRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.maxRows")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e4.maxRows,onChange:e=>e8(t=>({...t,maxRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,t.jsx)(r.Button,{onClick:th,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.hooks.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.hooks.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.hooks.autoUploadTypes")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.hooks.autoUploadTypesHint")})]}),(0,t.jsx)(l.Input,{value:tt,onChange:e=>ts(e.target.value),placeholder:"png, jpg, jpeg, gif, webp, svg, pdf",className:"w-80 rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsx)(r.Button,{onClick:tf,className:"rounded-lg",children:g("common.save")}),(0,t.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:e6?.installed?g("settings.config.hooks.installed"):g("settings.config.hooks.notInstalled")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.hooks.installHint")})]}),(0,t.jsx)(r.Button,{variant:e6?.installed?"destructive":"default",onClick:tb,disabled:e9||!e6,className:"rounded-lg",children:e6?.installed?g("settings.config.hooks.uninstall"):g("settings.config.hooks.install")})]})]}),(0,t.jsx)(u.Dialog,{open:!!eY,onOpenChange:e=>!e&&eZ(null),children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:g("settings.config.git.deleteConfirm")}),(0,t.jsx)(u.DialogDescription,{children:g("settings.config.git.deleteConfirmMessage")})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>eZ(null),children:g("settings.config.git.cancel")}),(0,t.jsx)(r.Button,{variant:"destructive",onClick:()=>eY&&tN(eY),children:g("settings.config.git.delete")})]})]})})]});case"notifications":return(0,t.jsx)("div",{className:"divide-y divide-border/50",children:(0,t.jsxs)("div",{className:"flex items-center justify-between py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:g("settings.notifications.enable")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:g("settings.notifications.enableDesc")})]}),(0,t.jsx)(m.Switch,{checked:ta,onCheckedChange:ty})]})});case"backup":return(0,t.jsx)(er,{});case"extensions":return(0,t.jsx)(eb,{})}}()]})}),(0,t.jsx)(W.FolderBrowserDialog,{open:null!==e_,onOpenChange:e=>{e||eJ(null)},onSelect:e=>{"add"===e_?eA(t=>({...t,localPathTemplate:e})):"edit"===e_&&eE(t=>({...t,localPathTemplate:e})),eJ(null)}})]})}e.s(["default",0,function(){return(0,t.jsx)(eC,{})}],113399)}]);
|