tower-studio 0.2.37 → 0.2.38
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 +2 -2
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +30 -30
- 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/browse-fs/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/missions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +65 -65
- 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 +2 -2
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +30 -30
- 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 +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +30 -30
- 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 +2 -2
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +47 -47
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +101 -101
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +84 -84
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +69 -69
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +74 -74
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +30 -30
- 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 +2 -2
- 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.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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +81 -81
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +48 -48
- 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 +5 -5
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00llstz._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01n7exm._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01yu.gw._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qif839._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~foo~5._.js +2 -2
- package/.next/standalone/.next/server/chunks/src_0bkvm8c._.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]__0-tolks._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0rzkdlf._.js → [root-of-the-server]__046-2.-._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0oy9qt7._.js → [root-of-the-server]__04p5fnx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05sv58d._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__062b.yt._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__093tt4a._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vjz4a4._.js → [root-of-the-server]__0dixwk_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0guqcva._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gzafdq._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__05b5dyi._.js → [root-of-the-server]__0i97rbw._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0kdfgja._.js → [root-of-the-server]__0mbvmq1._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p0te97._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0csj88a._.js → [root-of-the-server]__0rlar2j._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0siyg1p._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t6f4lq._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0th-t1a._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_00t6138._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0r1f9zc._.js → _00vn2qb._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_07_.oek._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_09ri_be._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0_q.4.i._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0cxhub8._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0.-xze1._.js → _0ght75u._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0ub.iem._.js → _0j84cn0._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0mpce0d._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0muaopo._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0n1l7yo._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0nk7qd4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0no6nrx._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0v0y2s~._.js → _0qkt.3y._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0r_ch71._.js → _0t53a7_._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0vqyl_~._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0pp8emp._.js → _13glpna._.js} +2 -2
- 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]_notes_notes-page-client_tsx_10gyo3v._.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_components_ui_select_tsx_0d2ra01._.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 +294 -294
- package/.next/standalone/.next/static/chunks/0.nk_89kz3j6c.js +1 -0
- package/.next/standalone/.next/static/chunks/01.g0gvh6h11a.js +2 -0
- package/.next/standalone/.next/static/chunks/03zzmb3y7kpxl.js +1 -0
- package/.next/standalone/.next/static/chunks/04t77qlr4-sw7.js +1 -0
- package/.next/standalone/.next/static/chunks/097rglx2_e2oo.js +1 -0
- package/.next/standalone/.next/static/chunks/{0950xt.ix3j1q.js → 0a234qgxmvbfu.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0o3eu9q3qnvi..js → 0bsigqvr2-qcp.js} +1 -1
- package/.next/standalone/.next/static/chunks/{03tc~x4m3si-p.js → 0c0u4it7gyb1..js} +1 -1
- package/.next/standalone/.next/static/chunks/0jlzko424.5et.js +1 -0
- package/.next/standalone/.next/static/chunks/{0o0ngxu962xwu.js → 0khxfvo-tgpbc.js} +1 -1
- package/.next/standalone/.next/static/chunks/0nfwp8f87wok1.js +1 -0
- package/.next/standalone/.next/static/chunks/{0qfx4.vrc9a9n.js → 0qu5zm6k.e_de.js} +1 -1
- package/.next/standalone/.next/static/chunks/0rbykdrqih-0t.js +1 -0
- package/.next/standalone/.next/static/chunks/0w7_~s93hxxkk.js +1 -0
- package/.next/standalone/.next/static/chunks/0wbzgoyu4~g4x.js +1 -0
- package/.next/standalone/.next/static/chunks/0yl2smjfz2bzk.js +1 -0
- package/.next/standalone/.next/static/chunks/10q75vl~mg7vy.js +1 -0
- package/.next/standalone/.next/static/chunks/11pivwhywsmj9.js +1 -0
- package/.next/standalone/.next/static/chunks/13ipvyn1q8z4y.js +1 -0
- package/.next/standalone/.next/static/chunks/13qts-1uv7-ee.js +1 -0
- package/.next/standalone/.next/static/chunks/14bii1nj2yewi.js +1 -0
- package/.next/standalone/.next/static/chunks/{08ewy5rmh_n_s.js → 14man4i21otxe.js} +1 -1
- package/.next/standalone/.next/static/chunks/{00_-_qcmfqtqx.js → 151eqj4g7bidp.js} +1 -1
- package/.next/standalone/.next/static/chunks/15_ulpp1r-6ra.js +1 -0
- package/.next/standalone/.next/static/chunks/17ldo-bezxis..js +1 -0
- package/.next/standalone/.next/static/chunks/{01f6i88h8guls.js → 183k6undfylp5.js} +1 -1
- package/.next/standalone/package.json +1 -1
- package/package.json +1 -1
- package/skills/tower/SKILL.md +81 -2
- package/.next/standalone/.next/server/chunks/ssr/_00z0339._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0_r-f5a._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0gzdrnf._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0lqxllh._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0z7hp2l._.js +0 -3
- package/.next/standalone/.next/static/chunks/00.kucs-nzw72.js +0 -1
- package/.next/standalone/.next/static/chunks/014cs5ykpuy3m.js +0 -1
- package/.next/standalone/.next/static/chunks/034x~85_u-f26.js +0 -1
- package/.next/standalone/.next/static/chunks/03v.cnuy3h3rb.js +0 -1
- package/.next/standalone/.next/static/chunks/05dlhgy_00kj1.js +0 -1
- package/.next/standalone/.next/static/chunks/05p_suay02eo1.js +0 -1
- package/.next/standalone/.next/static/chunks/08cuzj12jsob5.js +0 -1
- package/.next/standalone/.next/static/chunks/09a43rligfn_v.js +0 -1
- package/.next/standalone/.next/static/chunks/0c.6n7.lv8~10.js +0 -1
- package/.next/standalone/.next/static/chunks/0ckcff42.pa_j.js +0 -1
- package/.next/standalone/.next/static/chunks/0kuz7yd.6hpd1.js +0 -1
- package/.next/standalone/.next/static/chunks/0m227i3p__4qz.js +0 -2
- package/.next/standalone/.next/static/chunks/0mk6~akqfc05t.js +0 -1
- package/.next/standalone/.next/static/chunks/0oaelsx9hpsxi.js +0 -1
- package/.next/standalone/.next/static/chunks/0p.-6dhm_nm9f.js +0 -1
- package/.next/standalone/.next/static/chunks/0qc.bnyy68-yh.js +0 -1
- package/.next/standalone/.next/static/chunks/0s46.9vyvnj99.js +0 -1
- package/.next/standalone/.next/static/chunks/0u~0j4_f3gwi2.js +0 -1
- /package/.next/standalone/.next/static/{FO1_JUKAw5Zm07Nlq0G6X → 08PQLn-tnfP4XX6HBzxZ7}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{FO1_JUKAw5Zm07Nlq0G6X → 08PQLn-tnfP4XX6HBzxZ7}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{FO1_JUKAw5Zm07Nlq0G6X → 08PQLn-tnfP4XX6HBzxZ7}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},882651,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let s=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,s],181209)},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},673984,e=>{"use strict";let t=(0,e.i(572989).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],673984)},566606,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),l=e.i(821957),i=e.i(519455),n=e.i(793479),r=e.i(905455),o=e.i(746798),d=e.i(224277),c=e.i(975157);function m({className:e,size:s="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":s,className:(0,c.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})}function x({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-4 group-data-[size=sm]/card:px-3",e),...s})}var h=e.i(400355),u=e.i(597746),p=e.i(657153),g=e.i(567860),f=e.i(882651),b=e.i(181209),j=e.i(533499);function v({adapterType:e,adapterLabel:a,provider:l,hideHeader:n,onResult:r}){let[o,d]=(0,s.useState)(!1),[N,y]=(0,s.useState)(null),{t:k}=(0,j.useI18n)();async function w(){if(!o){d(!0),y(null);try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e,provider:l})}),s=await t.json();y(s),r?.(s)}catch{let e={ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]};y(e),r?.(e)}finally{d(!1)}}}return(0,t.jsxs)("div",{className:"space-y-4",children:[!n&&(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-emerald-100 dark:bg-emerald-900/30 p-2",children:(0,t.jsx)(g.Terminal,{className:"h-5 w-5 text-emerald-600 dark:text-emerald-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold",children:k("settings.aiTools.cliVerification")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:k("settings.aiTools.cliVerificationDesc")})]})]}),(0,t.jsx)(m,{children:(0,t.jsxs)(x,{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:a&&(0,t.jsx)("p",{className:"font-medium",children:a})}),(0,t.jsx)(i.Button,{onClick:w,disabled:o,variant:"outline",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-4 w-4 animate-spin mr-2"}),k("settings.aiTools.testing")]}):k("settings.aiTools.testConnection")})]}),N&&(0,t.jsxs)("div",{className:(0,c.cn)("rounded-lg border p-4 space-y-3",N.ok?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[N.ok?(0,t.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):(0,t.jsx)(b.XCircle,{className:"h-4 w-4 text-red-600 dark:text-red-400"}),(0,t.jsx)("span",{className:(0,c.cn)("text-sm font-medium",N.ok?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:k(N.ok?"settings.aiTools.testPassed":"settings.aiTools.testFailed")})]}),(0,t.jsx)("div",{className:"space-y-2",children:N.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[s.passed?(0,t.jsx)(u.Check,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}):(0,t.jsx)(p.X,{className:"h-4 w-4 text-red-500 mt-0.5 shrink-0"}),(0,t.jsx)("span",{className:(0,c.cn)(s.passed?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:s.message})]},`${e}-${s.name}`))})]})]})})]})}var N=e.i(163241),y=e.i(673984),k=e.i(226145),w=e.i(245697),C=e.i(19671),T=e.i(368490),S=e.i(387091),L=e.i(15299);let P=(0,e.i(572989).default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var B=e.i(769757),M=e.i(232545),R=e.i(998626),$=e.i(453889),z=e.i(475958),I=e.i(887911),U=e.i(225499),H=e.i(514798);let F=(0,H.createServerReference)("607e5b0ab5c7347c5bb81b3b5287be85ede70be100",H.callServer,void 0,H.findSourceMapURL,"completeOnboarding"),O=(0,H.createServerReference)("601e524262fb3b53183989aa4f2e0243f166dfec7f",H.callServer,void 0,H.findSourceMapURL,"setOnboardingExtensions");function E({username:e,onComplete:a}){let{t:l}=(0,j.useI18n)(),n=(0,I.listExtensionMetadata)(),[r,o]=(0,s.useState)(()=>new Set(n.map(e=>e.id))),[d,c]=(0,s.useState)(!1),m=n.length,x=r.size;async function u(){c(!0);let t=Array.from(r),s=[];if(t.length>0)for(let e of(await Promise.all(t.map(async e=>{try{let t=await (0,U.installExtension)(e);return{id:e,success:t.success}}catch{return{id:e,success:!1}}}))))e.success&&s.push(e.id);await O(t,s),await F(e),c(!1),a()}return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:l("onboarding.step4.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:l("onboarding.step4.desc")})]}),(0,t.jsx)("div",{className:"space-y-2",children:n.map(e=>{let s=e.icon,a=r.has(e.id);return(0,t.jsxs)("label",{className:"flex items-start gap-3 rounded-lg border border-border bg-background p-3 cursor-pointer hover:bg-accent/50 transition-colors",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{var t;return t=e.id,void o(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},disabled:d,className:"mt-0.5 h-4 w-4 cursor-pointer accent-primary"}),(0,t.jsxs)("div",{className:"flex flex-1 items-start gap-3 min-w-0",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:(0,t.jsx)(s,{className:"h-4 w-4 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:["~",e.sizeMB," MB"]})]}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description}),(0,t.jsxs)("a",{href:e.homepageUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(z.ExternalLink,{className:"h-3 w-3"}),l("settings.extensions.visitHomepage")]})]})]})]},e.id)})}),x<m&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground italic",children:l("onboarding.step4.skipHint")}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(i.Button,{onClick:u,disabled:d,children:d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),l("onboarding.step4.installing")]}):0===x?l("onboarding.step4.continueWithoutInstall"):l("onboarding.step4.continue")})})]})}function q({step:e}){let s=[y.User,g.Terminal,k.GitBranch,w.Package][e-1]??y.User,a=["Profile","Connect","Configure","Extensions"][e-1]??"";return(0,t.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,t.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,t.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,t.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,t.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,t.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,t.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,t.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,t.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,t.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,t.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,t.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,t.jsx)(s,{className:"h-7 w-7 text-amber-400"})})}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,t.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:a})})]})}let D={host:"",ownerMatch:"*",localPathTemplate:""};e.s(["default",0,function(){let e,c,m,x=(0,a.useRouter)(),{t:h,locale:p,setLocale:f}=(0,j.useI18n)(),{theme:b,setTheme:z}=(0,l.useTheme)(),[I,U]=(0,s.useState)(!1),[H,F]=(0,s.useState)(1),[O,V]=(0,s.useState)(""),[_,A]=(0,s.useState)({}),G=Object.values(_).some(e=>e.ok),[W,X]=(0,s.useState)([]),[K,Z]=(0,s.useState)({...D}),[J,Q]=(0,s.useState)(!0),[Y,ee]=(0,s.useState)(0),[et,es]=(0,s.useState)(!1),[ea,el]=(0,s.useState)(!1);(0,s.useEffect)(()=>U(!0),[]);let ei=[{value:"light",label:(0,t.jsx)(S.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,t.jsx)(L.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,t.jsx)(P,{className:"h-4 w-4"})}];function en(){F(e=>e+1)}function er(){F(e=>Math.max(1,e-1))}let eo=[{icon:y.User,label:h("onboarding.step1.title")},{icon:g.Terminal,label:h("onboarding.step2.title")},{icon:k.GitBranch,label:h("onboarding.step3.title")},{icon:w.Package,label:h("onboarding.step4.title")}];return(0,t.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,t.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,t.jsx)(q,{step:H})}),(0,t.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,t.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,t.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:eo.map((e,s)=>{let a=s+1,l=a===H,i=a<H,n=e.icon;return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[s>0&&(0,t.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${i?"bg-primary":"bg-border"}`}),(0,t.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${l?"bg-primary text-primary-foreground shadow-sm":i?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[i?(0,t.jsx)(u.Check,{className:"h-3 w-3 shrink-0"}):(0,t.jsx)(n,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:e.label})]})]},s)})})]}),(0,t.jsxs)("div",{children:[1===H&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step1.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step1.desc")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:h("onboarding.step1.usernameLabel")}),(0,t.jsx)("input",{id:"onboarding-username",type:"text",value:O,onChange:e=>V(e.target.value),placeholder:h("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B.Languages,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:h("settings.language")})]}),(0,t.jsx)(r.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(e=>({value:e.value,label:e.label})),value:p,onChange:e=>f(e)})]}),(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:h("settings.theme")})]}),I?(0,t.jsx)(r.SegmentedControl,{options:ei.map(e=>({value:e.value,label:e.label})),value:b??"system",onChange:e=>z(e)}):(0,t.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,t.jsx)("div",{className:"flex justify-end pt-3",children:(0,t.jsxs)(i.Button,{onClick:en,disabled:0===O.trim().length,className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===H&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step2.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step2.desc")})]}),(0,t.jsx)(v,{adapterType:"claude_code",adapterLabel:"Claude CLI",provider:"claude",onResult:e=>A(t=>({...t,claude:e}))}),(0,t.jsx)(v,{adapterType:"codex_cli",adapterLabel:"Codex CLI",provider:"codex",hideHeader:!0,onResult:e=>A(t=>({...t,codex:e}))}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"text-muted-foreground",onClick:er,children:[(0,t.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),h("onboarding.back")]}),(0,t.jsxs)(i.Button,{onClick:en,disabled:!G,className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===H&&(0,t.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step3.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step3.desc")})]}),W.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:h("onboarding.step3.added").replace("{count}",String(W.length))}),W.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"text-sm font-medium truncate",children:[e.host,(0,t.jsx)("span",{className:"text-muted-foreground",children:"*"!==e.ownerMatch?` / ${e.ownerMatch}`:""})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:e.localPathTemplate})]}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void X(e=>e.filter(e=>e.id!==t))},children:(0,t.jsx)(R.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))]}),J?(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.hostLabel")}),(0,t.jsx)(n.Input,{value:K.host,onChange:e=>Z(t=>({...t,host:e.target.value})),placeholder:h("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.ownerLabel")}),(0,t.jsx)(n.Input,{value:K.ownerMatch,onChange:e=>Z(t=>({...t,ownerMatch:e.target.value})),placeholder:h("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:h("onboarding.step3.pathLabel")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Input,{value:K.localPathTemplate,onChange:e=>Z(t=>({...t,localPathTemplate:e.target.value})),placeholder:h("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)(i.Button,{variant:et?"default":"outline",size:"sm",type:"button",onClick:()=>{es(e=>(e||ee(2),!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:h("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:h("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)(i.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>el(!0),children:(0,t.jsx)($.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(o.TooltipContent,{children:h("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:h(et?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),K.localPathTemplate&&(e=K.localPathTemplate.trim().replace(/\/+$/,""),c=et?`${e}/{path}`:e,m=[{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:"space-y-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1 flex-wrap",children:m.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>ee(s),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${Y===s?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e.label},s))}),(0,t.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:m[Y].url}),(0,t.jsxs)("p",{className:"font-mono text-xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-primary",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],l=s.match(/^git@[^:]+:(.+)$/);if(l)a=l[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],n=a[a.length-1],r=a.join("/");if(e.includes("{path}"))return e.replace("{path}",r).replace("{owner}",i).replace("{repo}",n).replace(/\/+$/,"");let o=e.replace("{owner}",i).replace("{repo}","").replace(/\/+$/,"");return`${o}/${n}`}(c,m[Y].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[W.length>0&&(0,t.jsx)(i.Button,{variant:"ghost",onClick:()=>Q(!1),children:h("settings.config.git.cancel")}),(0,t.jsxs)(i.Button,{onClick:function(){if(!K.host.trim()||!K.localPathTemplate.trim())return;let e=K.localPathTemplate.trim().replace(/\/+$/,""),t=et?`${e}/{path}`:e,s={id:crypto.randomUUID(),host:K.host.trim(),ownerMatch:K.ownerMatch.trim()||"*",localPathTemplate:t,priority:W.length};X(e=>[...e,s]),Z({...D}),es(!1),Q(!1)},disabled:!K.host.trim()||!K.localPathTemplate.trim(),children:[(0,t.jsx)(u.Check,{className:"h-4 w-4 mr-1"}),h("settings.config.git.save")]})]})]}):(0,t.jsxs)(i.Button,{variant:"outline",onClick:()=>{Z({...D}),Q(!0)},children:[(0,t.jsx)(M.Plus,{className:"h-4 w-4 mr-1"}),h("settings.config.git.addRule")]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"text-muted-foreground",onClick:er,children:[(0,t.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),h("onboarding.back")]}),(0,t.jsxs)(i.Button,{onClick:async()=>{W.length>0&&await (0,N.setConfigValue)("git.pathMappingRules",W),F(e=>e+1)},className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),4===H&&(0,t.jsx)(E,{username:O,onComplete:()=>x.replace("/workspaces")})]}),(0,t.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:h("onboarding.stepIndicator").replace("{current}",String(H)).replace("{total}",String(4))})]})}),(0,t.jsx)(d.FolderBrowserDialog,{open:ea,onOpenChange:el,onSelect:e=>{Z(t=>({...t,localPathTemplate:e})),el(!1)}})]})}],566606)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},882651,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let s=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,s],181209)},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},673984,e=>{"use strict";let t=(0,e.i(572989).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],673984)},566606,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),l=e.i(821957),i=e.i(519455),n=e.i(793479),r=e.i(905455),o=e.i(746798),d=e.i(224277),c=e.i(975157);function m({className:e,size:s="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":s,className:(0,c.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})}function x({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-4 group-data-[size=sm]/card:px-3",e),...s})}var h=e.i(400355),u=e.i(597746),p=e.i(657153),g=e.i(567860),f=e.i(882651),b=e.i(181209),j=e.i(533499);function v({adapterType:e,adapterLabel:a,provider:l,hideHeader:n,onResult:r}){let[o,d]=(0,s.useState)(!1),[N,y]=(0,s.useState)(null),{t:k}=(0,j.useI18n)();async function w(){if(!o){d(!0),y(null);try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e,provider:l})}),s=await t.json();y(s),r?.(s)}catch{let e={ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]};y(e),r?.(e)}finally{d(!1)}}}return(0,t.jsxs)("div",{className:"space-y-4",children:[!n&&(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-emerald-100 dark:bg-emerald-900/30 p-2",children:(0,t.jsx)(g.Terminal,{className:"h-5 w-5 text-emerald-600 dark:text-emerald-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold",children:k("settings.aiTools.cliVerification")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:k("settings.aiTools.cliVerificationDesc")})]})]}),(0,t.jsx)(m,{children:(0,t.jsxs)(x,{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:a&&(0,t.jsx)("p",{className:"font-medium",children:a})}),(0,t.jsx)(i.Button,{onClick:w,disabled:o,variant:"outline",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-4 w-4 animate-spin mr-2"}),k("settings.aiTools.testing")]}):k("settings.aiTools.testConnection")})]}),N&&(0,t.jsxs)("div",{className:(0,c.cn)("rounded-lg border p-4 space-y-3",N.ok?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[N.ok?(0,t.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):(0,t.jsx)(b.XCircle,{className:"h-4 w-4 text-red-600 dark:text-red-400"}),(0,t.jsx)("span",{className:(0,c.cn)("text-sm font-medium",N.ok?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:k(N.ok?"settings.aiTools.testPassed":"settings.aiTools.testFailed")})]}),(0,t.jsx)("div",{className:"space-y-2",children:N.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[s.passed?(0,t.jsx)(u.Check,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}):(0,t.jsx)(p.X,{className:"h-4 w-4 text-red-500 mt-0.5 shrink-0"}),(0,t.jsx)("span",{className:(0,c.cn)(s.passed?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:s.message})]},`${e}-${s.name}`))})]})]})})]})}var N=e.i(882831),y=e.i(673984),k=e.i(226145),w=e.i(245697),C=e.i(19671),T=e.i(368490),S=e.i(387091),L=e.i(15299);let P=(0,e.i(572989).default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var B=e.i(769757),M=e.i(232545),R=e.i(998626),$=e.i(453889),z=e.i(475958),I=e.i(887911),U=e.i(970995),H=e.i(514798);let F=(0,H.createServerReference)("6022565280345647acafc879d6697aabada2ec392f",H.callServer,void 0,H.findSourceMapURL,"completeOnboarding"),O=(0,H.createServerReference)("6003b9bf4e05e9d923ec7aa8ed47b1d2e8b1806cb7",H.callServer,void 0,H.findSourceMapURL,"setOnboardingExtensions");function E({username:e,onComplete:a}){let{t:l}=(0,j.useI18n)(),n=(0,I.listExtensionMetadata)(),[r,o]=(0,s.useState)(()=>new Set(n.map(e=>e.id))),[d,c]=(0,s.useState)(!1),m=n.length,x=r.size;async function u(){c(!0);let t=Array.from(r),s=[];if(t.length>0)for(let e of(await Promise.all(t.map(async e=>{try{let t=await (0,U.installExtension)(e);return{id:e,success:t.success}}catch{return{id:e,success:!1}}}))))e.success&&s.push(e.id);await O(t,s),await F(e),c(!1),a()}return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:l("onboarding.step4.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:l("onboarding.step4.desc")})]}),(0,t.jsx)("div",{className:"space-y-2",children:n.map(e=>{let s=e.icon,a=r.has(e.id);return(0,t.jsxs)("label",{className:"flex items-start gap-3 rounded-lg border border-border bg-background p-3 cursor-pointer hover:bg-accent/50 transition-colors",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{var t;return t=e.id,void o(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},disabled:d,className:"mt-0.5 h-4 w-4 cursor-pointer accent-primary"}),(0,t.jsxs)("div",{className:"flex flex-1 items-start gap-3 min-w-0",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:(0,t.jsx)(s,{className:"h-4 w-4 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:["~",e.sizeMB," MB"]})]}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description}),(0,t.jsxs)("a",{href:e.homepageUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(z.ExternalLink,{className:"h-3 w-3"}),l("settings.extensions.visitHomepage")]})]})]})]},e.id)})}),x<m&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground italic",children:l("onboarding.step4.skipHint")}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(i.Button,{onClick:u,disabled:d,children:d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),l("onboarding.step4.installing")]}):0===x?l("onboarding.step4.continueWithoutInstall"):l("onboarding.step4.continue")})})]})}function q({step:e}){let s=[y.User,g.Terminal,k.GitBranch,w.Package][e-1]??y.User,a=["Profile","Connect","Configure","Extensions"][e-1]??"";return(0,t.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,t.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,t.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,t.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,t.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,t.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,t.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,t.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,t.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,t.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,t.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,t.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,t.jsx)(s,{className:"h-7 w-7 text-amber-400"})})}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,t.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:a})})]})}let D={host:"",ownerMatch:"*",localPathTemplate:""};e.s(["default",0,function(){let e,c,m,x=(0,a.useRouter)(),{t:h,locale:p,setLocale:f}=(0,j.useI18n)(),{theme:b,setTheme:z}=(0,l.useTheme)(),[I,U]=(0,s.useState)(!1),[H,F]=(0,s.useState)(1),[O,V]=(0,s.useState)(""),[_,A]=(0,s.useState)({}),G=Object.values(_).some(e=>e.ok),[W,X]=(0,s.useState)([]),[K,Z]=(0,s.useState)({...D}),[J,Q]=(0,s.useState)(!0),[Y,ee]=(0,s.useState)(0),[et,es]=(0,s.useState)(!1),[ea,el]=(0,s.useState)(!1);(0,s.useEffect)(()=>U(!0),[]);let ei=[{value:"light",label:(0,t.jsx)(S.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,t.jsx)(L.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,t.jsx)(P,{className:"h-4 w-4"})}];function en(){F(e=>e+1)}function er(){F(e=>Math.max(1,e-1))}let eo=[{icon:y.User,label:h("onboarding.step1.title")},{icon:g.Terminal,label:h("onboarding.step2.title")},{icon:k.GitBranch,label:h("onboarding.step3.title")},{icon:w.Package,label:h("onboarding.step4.title")}];return(0,t.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,t.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,t.jsx)(q,{step:H})}),(0,t.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,t.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,t.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:eo.map((e,s)=>{let a=s+1,l=a===H,i=a<H,n=e.icon;return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[s>0&&(0,t.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${i?"bg-primary":"bg-border"}`}),(0,t.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${l?"bg-primary text-primary-foreground shadow-sm":i?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[i?(0,t.jsx)(u.Check,{className:"h-3 w-3 shrink-0"}):(0,t.jsx)(n,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:e.label})]})]},s)})})]}),(0,t.jsxs)("div",{children:[1===H&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step1.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step1.desc")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:h("onboarding.step1.usernameLabel")}),(0,t.jsx)("input",{id:"onboarding-username",type:"text",value:O,onChange:e=>V(e.target.value),placeholder:h("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B.Languages,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:h("settings.language")})]}),(0,t.jsx)(r.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(e=>({value:e.value,label:e.label})),value:p,onChange:e=>f(e)})]}),(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:h("settings.theme")})]}),I?(0,t.jsx)(r.SegmentedControl,{options:ei.map(e=>({value:e.value,label:e.label})),value:b??"system",onChange:e=>z(e)}):(0,t.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,t.jsx)("div",{className:"flex justify-end pt-3",children:(0,t.jsxs)(i.Button,{onClick:en,disabled:0===O.trim().length,className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===H&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step2.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step2.desc")})]}),(0,t.jsx)(v,{adapterType:"claude_code",adapterLabel:"Claude CLI",provider:"claude",onResult:e=>A(t=>({...t,claude:e}))}),(0,t.jsx)(v,{adapterType:"codex_cli",adapterLabel:"Codex CLI",provider:"codex",hideHeader:!0,onResult:e=>A(t=>({...t,codex:e}))}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"text-muted-foreground",onClick:er,children:[(0,t.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),h("onboarding.back")]}),(0,t.jsxs)(i.Button,{onClick:en,disabled:!G,className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===H&&(0,t.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step3.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step3.desc")})]}),W.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:h("onboarding.step3.added").replace("{count}",String(W.length))}),W.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"text-sm font-medium truncate",children:[e.host,(0,t.jsx)("span",{className:"text-muted-foreground",children:"*"!==e.ownerMatch?` / ${e.ownerMatch}`:""})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:e.localPathTemplate})]}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void X(e=>e.filter(e=>e.id!==t))},children:(0,t.jsx)(R.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))]}),J?(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.hostLabel")}),(0,t.jsx)(n.Input,{value:K.host,onChange:e=>Z(t=>({...t,host:e.target.value})),placeholder:h("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.ownerLabel")}),(0,t.jsx)(n.Input,{value:K.ownerMatch,onChange:e=>Z(t=>({...t,ownerMatch:e.target.value})),placeholder:h("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:h("onboarding.step3.pathLabel")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Input,{value:K.localPathTemplate,onChange:e=>Z(t=>({...t,localPathTemplate:e.target.value})),placeholder:h("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)(i.Button,{variant:et?"default":"outline",size:"sm",type:"button",onClick:()=>{es(e=>(e||ee(2),!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:h("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:h("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)(i.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>el(!0),children:(0,t.jsx)($.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(o.TooltipContent,{children:h("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:h(et?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),K.localPathTemplate&&(e=K.localPathTemplate.trim().replace(/\/+$/,""),c=et?`${e}/{path}`:e,m=[{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:"space-y-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1 flex-wrap",children:m.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>ee(s),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${Y===s?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e.label},s))}),(0,t.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:m[Y].url}),(0,t.jsxs)("p",{className:"font-mono text-xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-primary",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],l=s.match(/^git@[^:]+:(.+)$/);if(l)a=l[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],n=a[a.length-1],r=a.join("/");if(e.includes("{path}"))return e.replace("{path}",r).replace("{owner}",i).replace("{repo}",n).replace(/\/+$/,"");let o=e.replace("{owner}",i).replace("{repo}","").replace(/\/+$/,"");return`${o}/${n}`}(c,m[Y].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[W.length>0&&(0,t.jsx)(i.Button,{variant:"ghost",onClick:()=>Q(!1),children:h("settings.config.git.cancel")}),(0,t.jsxs)(i.Button,{onClick:function(){if(!K.host.trim()||!K.localPathTemplate.trim())return;let e=K.localPathTemplate.trim().replace(/\/+$/,""),t=et?`${e}/{path}`:e,s={id:crypto.randomUUID(),host:K.host.trim(),ownerMatch:K.ownerMatch.trim()||"*",localPathTemplate:t,priority:W.length};X(e=>[...e,s]),Z({...D}),es(!1),Q(!1)},disabled:!K.host.trim()||!K.localPathTemplate.trim(),children:[(0,t.jsx)(u.Check,{className:"h-4 w-4 mr-1"}),h("settings.config.git.save")]})]})]}):(0,t.jsxs)(i.Button,{variant:"outline",onClick:()=>{Z({...D}),Q(!0)},children:[(0,t.jsx)(M.Plus,{className:"h-4 w-4 mr-1"}),h("settings.config.git.addRule")]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"text-muted-foreground",onClick:er,children:[(0,t.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),h("onboarding.back")]}),(0,t.jsxs)(i.Button,{onClick:async()=>{W.length>0&&await (0,N.setConfigValue)("git.pathMappingRules",W),F(e=>e+1)},className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),4===H&&(0,t.jsx)(E,{username:O,onComplete:()=>x.replace("/workspaces")})]}),(0,t.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:h("onboarding.stepIndicator").replace("{current}",String(H)).replace("{total}",String(4))})]})}),(0,t.jsx)(d.FolderBrowserDialog,{open:ea,onOpenChange:el,onSelect:e=>{Z(t=>({...t,localPathTemplate:e})),el(!1)}})]})}],566606)}]);
|
package/package.json
CHANGED
package/skills/tower/SKILL.md
CHANGED
|
@@ -78,8 +78,9 @@ it means your previous turn produced no tool call — issue the tool call now.
|
|
|
78
78
|
- **Pasted images with known paths**: if the platform provides file paths for pasted media (e.g. OpenClaw's `{{MediaPaths}}`, Claude Code temp files), pass those paths directly — they are local files
|
|
79
79
|
- **Base64 only (no file path)**: if you only have base64 data with no local path, upload first via `manage_assets` with `action: "upload"`, `projectId`, `base64`, `mimeType`. Get back `{ id: assetId, path }`. Then pass the returned `path` in `references` — `create_task` will automatically copy and link the asset, no separate `link_task` needed
|
|
80
80
|
- **`link_task` only for retroactive linking**: use `manage_assets` with `action: "link_task"` only when you need to associate existing assets with an already-created task (e.g. user wants to add references after task creation)
|
|
81
|
-
8.
|
|
82
|
-
9.
|
|
81
|
+
8. **Source (`## 来源`)** — ALWAYS append a `## 来源` section to the task `description` (see **Task Source** below for the full spec). If the incoming prompt carries no source info, it is literally `## 来源\n无`. If it does (especially a `<task-source>` block injected by a bridge like Feishu), standardize it into a detailed, traceable record.
|
|
82
|
+
9. Call `create_task` with projectId, title, and optional description/priority/labelIds/subPath/versionId/useWorktree/baseBranch/references
|
|
83
|
+
10. After creating: if `autoStart` resolved to true the task starts immediately (check the response's `execution` field — `autoStart` intent does not guarantee it actually started); otherwise the task stays TODO.
|
|
83
84
|
|
|
84
85
|
### "Start a task" / "Run this task" / "Execute task ..."
|
|
85
86
|
|
|
@@ -232,6 +233,80 @@ Note: the response does not include workspace name. Use the workspace name from
|
|
|
232
233
|
| {id (first 8 chars)} | {title} | {status} | {priority} | {labels} |
|
|
233
234
|
```
|
|
234
235
|
|
|
236
|
+
### Task Source (`## 来源`)
|
|
237
|
+
|
|
238
|
+
Every task created through this skill MUST end its `description` with a `## 来源`
|
|
239
|
+
section so we can always trace **why** a task exists and **who** asked for it.
|
|
240
|
+
|
|
241
|
+
**No source info in the prompt** → write exactly:
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
## 来源
|
|
245
|
+
无
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Source info present** → standardize it into a human-readable record. Keep the
|
|
249
|
+
hard locators (chat id / message id / link) verbatim — they are what makes the
|
|
250
|
+
task traceable later.
|
|
251
|
+
|
|
252
|
+
#### Bridge metadata contract (`<task-source>` block)
|
|
253
|
+
|
|
254
|
+
External bridges (Feishu/Lark, etc.) inject a machine-readable block into the
|
|
255
|
+
message. When you see it, parse it, render the standardized `## 来源`, and then
|
|
256
|
+
DROP the raw block from the description (don't store the tags):
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
<task-source>
|
|
260
|
+
channel: feishu # 渠道 (feishu | openclaw | manual | ...)
|
|
261
|
+
chat_name: 南京招生报名讨论群 # 群显示名
|
|
262
|
+
chat_id: oc_xxxxxxxx # 群 ID(硬定位符,必带)
|
|
263
|
+
occurred_at: 2026-06-16 17:49 +08:00 # 讨论/触发时间,带时区(用于进群后定位到具体那条)
|
|
264
|
+
chat_link: https://applink.feishu.cn/client/chat/open?openChatId=oc_xxxxxxxx # 打开「群」的链接(群级,飞书无法精确到单条消息)
|
|
265
|
+
trigger_message_id: om_xxxxxxxx # 触发那条消息的 ID(不可点,但唯一绑定该消息,必带;用于程序回读/去重/兜底)
|
|
266
|
+
thread_root_id: om_yyyyyyyy # (可选)话题根消息 ID
|
|
267
|
+
participants: # 参与者:显示名 + open_id + 角色
|
|
268
|
+
- name: 张斯佳, open_id: ou_aaa, role: 讨论
|
|
269
|
+
- name: 张瑶, open_id: ou_bbb, role: 讨论
|
|
270
|
+
- name: 刘俊平, open_id: ou_ccc, role: 确认
|
|
271
|
+
transcript: | # 相关消息原文(按时间)—— 人真正要看的内容,必带
|
|
272
|
+
17:49 张斯佳:有线下核验点,但无可预约时间,这里需要加提示么?
|
|
273
|
+
17:5x 张瑶:建议合并提示语「目前暂无线下审核点或没有可预约的时间…」
|
|
274
|
+
17:5x 刘俊平:可以处理
|
|
275
|
+
summary: 线下核验点无可预约时间,确认合并提示语后处理 # (可选)一句话结论;缺省时由模型从 transcript 推
|
|
276
|
+
</task-source>
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Roles are not required to be pre-computed by the bridge — if `role` is missing,
|
|
280
|
+
infer it from the `transcript` (谁提出 / 谁讨论 / 谁拍板"可以处理"). If a
|
|
281
|
+
`summary` is absent, derive it from the `transcript`.
|
|
282
|
+
|
|
283
|
+
**Feishu reality** — `chat_link` only opens the **group**, not a single message.
|
|
284
|
+
So the practical "go back and find it" combo is **群链接 + occurred_at + transcript**:
|
|
285
|
+
open the group, jump to that time, the transcript is the actual content. Label the
|
|
286
|
+
link line **打开群** (never "原始消息") so nobody expects a one-click jump to the
|
|
287
|
+
exact message. `trigger_message_id` is kept as the only hard anchor to that
|
|
288
|
+
message (not clickable — for programmatic re-read / dedup / fallback).
|
|
289
|
+
|
|
290
|
+
#### Rendered `## 来源` format
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
## 来源
|
|
294
|
+
|
|
295
|
+
- 渠道:飞书群「{chat_name}」
|
|
296
|
+
- 时间:{occurred_at}
|
|
297
|
+
- 参与者:{讨论者们}(讨论),{确认者}(确认可处理)
|
|
298
|
+
- 讨论要点:{summary}
|
|
299
|
+
- 打开群:{chat_link}
|
|
300
|
+
- 溯源 ID:chat={chat_id} · msg={trigger_message_id}{ thread_root_id 时追加 · thread={thread_root_id}}
|
|
301
|
+
|
|
302
|
+
讨论摘录(按时间):
|
|
303
|
+
{transcript}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Only render lines whose data is present (e.g. omit `打开群` if there is no
|
|
307
|
+
`chat_link`). Always keep `chat_id` + `trigger_message_id` (hard anchors) and the
|
|
308
|
+
`讨论摘录`/`transcript` (the content humans actually read).
|
|
309
|
+
|
|
235
310
|
### Task Creation Confirmation
|
|
236
311
|
|
|
237
312
|
After `create_task` succeeds, render based on the **response** (not the input
|
|
@@ -244,9 +319,13 @@ parameter — `autoStart: true` does NOT mean execution actually started; check
|
|
|
244
319
|
- Priority: {priority}
|
|
245
320
|
- Status: {status}
|
|
246
321
|
- Worktree: {yes/no}
|
|
322
|
+
{worktree yes ? "- Base branch: " + response.baseBranch : ""}
|
|
247
323
|
{response.execution ? "⚡ Execution started" : response.executionError ? "⚠️ Auto-start failed: " + response.executionError : ""}
|
|
248
324
|
```
|
|
249
325
|
|
|
326
|
+
`response.baseBranch` is non-null only when worktree isolation applies — show the
|
|
327
|
+
`- Base branch:` line only then (omit it entirely for direct-mode tasks).
|
|
328
|
+
|
|
250
329
|
If `executionError` is present, surface it verbatim — common causes are server
|
|
251
330
|
not running, concurrency limit hit, or project missing localPath. Do not say
|
|
252
331
|
"Execution started" when the response only shows `executionError`.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[2197,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("407c9406a33e464626e42425b0c56de3c72e98a1c4",b.callServer,void 0,b.findSourceMapURL,"createTask");a.s(["createTask",0,c])},846485,259714,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("402a3832911ad498ab74ac3988c9585666dd257251",b.callServer,void 0,b.findSourceMapURL,"getTaskNotes");a.s(["getTaskNotes",0,c],846485);let d=(0,b.createServerReference)("40080aba13506281aa713298cee0a07c6cc703ea03",b.callServer,void 0,b.findSourceMapURL,"getTaskAssets");a.s(["getTaskAssets",0,d],259714)},113047,455417,454562,a=>{"use strict";let b=(0,a.i(711796).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);a.s(["ChevronsUpDown",0,b],113047);var c=a.i(780410);let d=(0,c.createServerReference)("408ad60a045f2bf21691c4a3da0c2e5c0df46aeeb6",c.callServer,void 0,c.findSourceMapURL,"getProjectBranches");a.s(["getProjectBranches",0,d],455417);let e=(0,c.createServerReference)("40da2575ef47b9d6d5e7ec17b605f4f79ccd703eb0",c.callServer,void 0,c.findSourceMapURL,"fetchRemoteBranches");a.s(["fetchRemoteBranches",0,e],454562)},445798,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(814574),e=a.i(699570),f=a.i(866718),g=a.i(429246),h=a.i(412783),i=a.i(577565),j=a.i(668116),k=a.i(113047),l=a.i(580701),m=a.i(599209),n=a.i(419622),o=a.i(951192),p=a.i(455417),q=a.i(454562),r=a.i(780410);let s=(0,r.createServerReference)("40a368c55ee0fb0de5e50278d7780112639bb8d02a",r.callServer,void 0,r.findSourceMapURL,"getCurrentBranch");var t=a.i(500744);a.s(["CreateTaskDialog",0,function({open:a,onOpenChange:r,onSubmit:u,onUpdate:v,defaultStatus:w="TODO",editTask:x,editTaskLabelIds:y,prefillFromTask:z,labels:A,projectType:B,projectLocalPath:C,versions:D,defaultVersionId:E}){let F,[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(""),[K,L]=(0,c.useState)("MEDIUM"),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)([]),[Q,R]=(0,c.useState)([]),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(""),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(!0),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)(null),{t:ac}=(0,o.useI18n)();(0,c.useEffect)(()=>{if(!a||x)return;let b=!1;return(0,t.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(a=>{if(b)return;let c=a["task.defaultUseWorktree"],d=a["task.defaultAutoStart"];"boolean"==typeof c&&Z(c),"boolean"==typeof d&&_(d)}).catch(()=>{}),()=>{b=!0}},[a,x]);let ad=!!x,ae=!!C;return(0,c.useEffect)(()=>{x?(H(x.title),J(x.description??""),L(x.priority),N(x.subPath??""),P(y??[]),ab(x.versionId??null)):(z?(H(z.title??""),J(z.description??""),L(z.priority??"MEDIUM"),N(z.subPath??""),P(z.labelIds??[])):(H(""),J(""),L("MEDIUM"),N(""),P([])),ab(E??null))},[x,y,z,E]),(0,c.useEffect)(()=>{a||x||(H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),X(!1),ab(E??null))},[a,x,E]),(0,c.useEffect)(()=>{a&&ae&&!x&&(T(!0),Promise.all([(0,p.getProjectBranches)(C),s(C)]).then(([a,b])=>{R(a);let c=z?.baseBranch??null;c&&a.includes(c)?V(c):V(b&&a.includes(b)?b:a[0]??""),T(!1),(0,q.fetchRemoteBranches)(C).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(C).then(a=>{R(a),V(b=>a.includes(b)?b:a[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{R([]),V(""),T(!1)}))},[a,ae,C,x,z]),(0,b.jsx)(d.Dialog,{open:a,onOpenChange:r,disablePointerDismissal:!0,children:(0,b.jsxs)(d.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(d.DialogHeader,{children:(0,b.jsx)(d.DialogTitle,{children:ad?ac("task.edit"):ac("task.create")})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"title",children:ac("task.title")}),(0,b.jsx)(f.Input,{id:"title","data-testid":"task-title",placeholder:ac("task.titlePlaceholder"),value:G,onChange:a=>H(a.target.value),onKeyDown:a=>"Enter"===a.key&&a.preventDefault()})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"description",children:ac("task.description")}),(0,b.jsx)(g.Textarea,{id:"description",placeholder:ac("task.descPlaceholder"),rows:4,value:I,onChange:a=>J(a.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"subPath",children:ac("task.subPath")}),(0,b.jsx)(f.Input,{id:"subPath",placeholder:ac("task.subPathPlaceholder"),value:M,onChange:a=>N(a.target.value)}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:ac("task.subPathHint")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.priority")}),(0,b.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(a=>{let c={LOW:{label:ac("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ac("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ac("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ac("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[a];return(0,b.jsx)("button",{type:"button",onClick:()=>L(a),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${K===a?`${c.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:c.label},a)})})]}),ae&&!ad&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.baseBranch")}),S?(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchLoading")}):Q.length>0?(0,b.jsxs)(m.Popover,{open:W,onOpenChange:X,children:[(0,b.jsxs)(m.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,b.jsx)(i.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:U||void 0,children:U||ac("task.branchNone")}),(0,b.jsx)(k.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,b.jsx)(m.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,b.jsxs)(n.Command,{children:[(0,b.jsx)(n.CommandInput,{placeholder:ac("task.branchSearch")}),(0,b.jsxs)(n.CommandList,{children:[(0,b.jsx)(n.CommandEmpty,{children:ac("task.branchNone")}),(0,b.jsx)(n.CommandGroup,{children:Q.map(a=>(0,b.jsxs)(n.CommandItem,{value:a,onSelect:()=>{V(a),X(!1)},children:[(0,b.jsx)(i.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,b.jsx)("span",{className:"flex-1 truncate font-mono",title:a,children:a}),a===U&&(0,b.jsx)(j.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},a))})]})]})})]}):(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchNone")}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.worktreeLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>Z(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Y===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.worktreeYes"):ac("task.worktreeNo")},String(a)))})]}),(0,b.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.autoStartLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>_(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${$===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.autoStartYes"):ac("task.autoStartNo")},String(a)))})]})]}),A.length>0&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.labels")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:A.map(a=>{let c=O.includes(a.id);return(0,b.jsx)("button",{type:"button",onClick:()=>{P(b=>c?b.filter(b=>b!==a.id):[...b,a.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${c?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:a.color+"20",color:a.color,borderColor:c?a.color+"40":"transparent",borderWidth:"1px"},children:a.name},a.id)})})]}),(!ad||D&&D.length>0)&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("version.picker.label")}),D&&D.length>0?(0,b.jsxs)(l.Select,{value:aa??"__none__",onValueChange:a=>ab("__none__"===a?null:a),children:[(0,b.jsx)(l.SelectTrigger,{children:(0,b.jsx)("span",{className:"truncate text-sm",children:aa&&(F=D.find(a=>a.id===aa))?F.isCurrent?`${F.number} \xb7 ${F.name} \xb7 ${ac("version.currentShort")}`:`${F.number} \xb7 ${F.name}`:ac("version.picker.none")})}),(0,b.jsxs)(l.SelectContent,{children:[(0,b.jsx)(l.SelectItem,{value:"__none__",children:ac("version.picker.none")}),D.map(a=>(0,b.jsx)(l.SelectItem,{value:a.id,children:a.isCurrent?`${a.number} \xb7 ${a.name} \xb7 ${ac("version.currentShort")}`:`${a.number} \xb7 ${a.name}`},a.id))]})]}):(0,b.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ac("version.picker.empty")})]})]}),(0,b.jsxs)(d.DialogFooter,{children:[(0,b.jsx)(e.Button,{variant:"outline",onClick:()=>r(!1),children:ac("common.cancel")}),(0,b.jsx)(e.Button,{onClick:()=>{G.trim()&&(ad&&v?v(x.id,{title:G,description:I,priority:K,labelIds:O,subPath:M.trim()||"",versionId:aa}):u({title:G,description:I,priority:K,status:w,labelIds:O,...ae&&Y&&U?{baseBranch:U}:{},...M.trim()?{subPath:M.trim()}:{},versionId:aa,autoStart:$}),H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),Z(!0),ab(null),r(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:ad?ac("common.save"):ac("common.create")})]})]})})}],445798)},757942,950314,a=>{"use strict";var b=a.i(90393);a.s([],757942),a.s(["Streamdown",()=>b.C],950314)},510650,a=>{"use strict";var b=a.i(728778);a.i(757942);var c=a.i(950314),d=a.i(814574),e=a.i(951192);a.s(["NotePreviewDialog",0,function({note:a,open:f,onOpenChange:g}){let{t:h}=(0,e.useI18n)();return(0,b.jsx)(d.Dialog,{open:f,onOpenChange:g,children:(0,b.jsxs)(d.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:a?.title}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:a&&a.content.trim()?(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(c.Streamdown,{children:a.content})}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:h("taskPage.noteEmpty")})})]})})}])},532615,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(986099),e=a.i(54384),f=a.i(912868),g=a.i(10390),h=a.i(91756);let i=(0,a.i(711796).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var j=a.i(747798),k=a.i(951192);function l({children:a,onClick:c,title:d,disabled:e,...f}){return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||c()},title:d,disabled:e,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...f,children:a})}a.s(["ImageLightbox",0,function({imageUrl:a,filename:m,open:n,onOpenChange:o,assets:p,currentIndex:q,onIndexChange:r}){let{t:s}=(0,k.useI18n)(),[t,u]=(0,c.useState)(1),[v,w]=(0,c.useState)({x:0,y:0}),[x,y]=(0,c.useState)(!1),z=(0,c.useRef)(null),[A,B]=(0,c.useState)(!1),C=!!p&&p.length>1&&"number"==typeof q&&!!r,D=C&&q>0,E=C&&q<p.length-1,F=C?p.length:0,G=F>0?Math.ceil(F/10):0,H=C?Math.floor(q/10):0,I=10*H,J=Math.min(I+10,F),K=G>1,L=C&&H>0,M=C&&H<G-1;(0,c.useEffect)(()=>{B(!0)},[]),(0,c.useEffect)(()=>{u(1),w({x:0,y:0})},[a]),(0,c.useEffect)(()=>{if(!n)return;let a=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=a}},[n]);let N=(0,c.useCallback)(()=>o(!1),[o]),O=(0,c.useCallback)(()=>{C&&D&&r(q-1)},[C,D,r,q]),P=(0,c.useCallback)(()=>{C&&E&&r(q+1)},[C,E,r,q]),Q=(0,c.useCallback)(()=>{C&&L&&r((H-1)*10)},[C,L,r,H]),R=(0,c.useCallback)(()=>{C&&M&&r(Math.min((H+1)*10,F-1))},[C,M,r,H,F]),S=(0,c.useCallback)(()=>{u(a=>Math.min(8,1.25*a))},[]),T=(0,c.useCallback)(()=>{u(a=>{let b=Math.max(.1,a/1.25);return b<=1&&w({x:0,y:0}),b})},[]),U=(0,c.useCallback)(()=>{u(1),w({x:0,y:0})},[]);(0,c.useEffect)(()=>{if(!n)return;let a=a=>{switch(a.key){case"Escape":a.preventDefault(),N();break;case"ArrowLeft":C&&(a.preventDefault(),O());break;case"ArrowRight":C&&(a.preventDefault(),P());break;case"+":case"=":a.preventDefault(),S();break;case"-":case"_":a.preventDefault(),T();break;case"0":a.preventDefault(),U()}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n,C,N,O,P,S,T,U]);let V=(0,c.useRef)(!1),W=()=>{x&&y(!1),z.current=null},X=x?"cursor-grabbing":"cursor-grab";if(!n||!A)return null;let Y=(0,b.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":s("assets.lightbox.zoomFit"),children:[(0,b.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[m,C?` \xb7 ${q+1} / ${p.length}`:""]}),(0,b.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${X}`,onClick:a=>{a.target===a.currentTarget&&N()},onWheel:a=>{a.preventDefault();let b=-a.deltaY>0?1.25:.8;u(a=>{let c=Math.min(8,Math.max(.1,a*b));return c<=1&&w({x:0,y:0}),c})},children:a&&(0,b.jsx)("img",{src:a,alt:m,onClick:a=>{a.stopPropagation(),V.current&&(V.current=!1)},onPointerDown:a=>{0===a.button&&(a.stopPropagation(),V.current=!1,a.target.setPointerCapture?.(a.pointerId),z.current={x:a.clientX,y:a.clientY,panX:v.x,panY:v.y},y(!0))},onPointerMove:a=>{if(!z.current)return;let b=a.clientX-z.current.x,c=a.clientY-z.current.y;Math.abs(b)+Math.abs(c)>5&&(V.current=!0),x&&w({x:z.current.panX+b,y:z.current.panY+c})},onPointerUp:W,onPointerLeave:W,onPointerCancel:W,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${v.x}px, ${v.y}px, 0) scale(${t})`,transformOrigin:"center center",transition:x?"none":"transform 120ms ease-out",willChange:x?"transform":"auto"},draggable:!1})}),(0,b.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:a=>a.stopPropagation(),children:[C&&(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[K&&(0,b.jsx)(l,{onClick:Q,title:`${s("assets.lightbox.prev")} (-10)`,"aria-label":`${s("assets.lightbox.prev")} (-10)`,disabled:!L,children:(0,b.jsx)(h.ChevronsLeft,{className:"h-4 w-4"})}),(0,b.jsx)(l,{onClick:O,title:s("assets.lightbox.prev"),"aria-label":s("assets.lightbox.prev"),disabled:!D,children:(0,b.jsx)(f.ChevronLeft,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(I,J).map((a,c)=>{let d=I+c,e=d===q;return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||r(d)},title:a.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${e?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,b.jsx)("img",{src:a.url,alt:a.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},a.url+d)})}),(0,b.jsx)(l,{onClick:P,title:s("assets.lightbox.next"),"aria-label":s("assets.lightbox.next"),disabled:!E,children:(0,b.jsx)(g.ChevronRight,{className:"h-4 w-4"})}),K&&(0,b.jsx)(l,{onClick:R,title:`${s("assets.lightbox.next")} (+10)`,"aria-label":`${s("assets.lightbox.next")} (+10)`,disabled:!M,children:(0,b.jsx)(i,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,b.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*t),"%"]}),(0,b.jsx)(l,{onClick:U,title:s("assets.lightbox.reset"),"aria-label":s("assets.lightbox.reset"),disabled:1===t&&0===v.x&&0===v.y,children:(0,b.jsx)(j.RotateCcw,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,b.jsx)(l,{onClick:N,title:s("assets.lightbox.close"),"aria-label":s("assets.lightbox.close"),children:(0,b.jsx)(e.X,{className:"h-4 w-4"})})]})]})]});return(0,d.createPortal)(Y,document.body)}],532615)},894148,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(704494);a.i(757942);var e=a.i(950314),f=a.i(814574),g=a.i(951192);a.s(["TextPreviewDialog",0,function({url:a,filename:h,open:i,onOpenChange:j}){let{t:k}=(0,g.useI18n)(),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(null);(0,c.useEffect)(()=>{if(!i||!a){m(null),q(null);return}let b=!1;return o(!0),q(null),m(null),fetch(a).then(a=>{let b=a.headers.get("content-length");if(b&&parseInt(b,10)>1048576)throw Error("FILE_TOO_LARGE");return a.text()}).then(a=>{if(a.length>1048576)throw Error("FILE_TOO_LARGE");b||(m(a),o(!1))}).catch(a=>{b||(a instanceof Error&&"FILE_TOO_LARGE"===a.message?q(k("assets.fileTooLarge")):q(k("assets.previewError")),o(!1))}),()=>{b=!0}},[i,a,k]);let r=h.split(".").pop()?.toLowerCase();return(0,b.jsx)(f.Dialog,{open:i,onOpenChange:j,children:(0,b.jsxs)(f.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:h}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(n)return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,b.jsx)(d.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:k("assets.loadingPreview")})]});if(p)return(0,b.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===l)return null;if("md"===r)return(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(e.Streamdown,{children:l})});if("json"===r){let a;try{a=JSON.stringify(JSON.parse(l),null,2)}catch{a=l}return(0,b.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:a})}return(0,b.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:l})})()})]})})}])},161181,a=>{"use strict";let b=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);a.s(["isImageAsset",0,function(a,c){if(c?.startsWith("image/"))return!0;let d=a.split(".").pop()?.toLowerCase();return!!d&&b.has(d)},"localPathToApiUrl",0,function(a){let b=a.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return b?`/api/files/assets/${b[1]}/${b[2]}`:a}])},521007,a=>{"use strict";a.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},87339,a=>{"use strict";let b=(0,a.i(711796).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);a.s(["Paperclip",0,b],87339)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_00z0339._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[161181,a=>{"use strict";let b=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);a.s(["isImageAsset",0,function(a,c){if(c?.startsWith("image/"))return!0;let d=a.split(".").pop()?.toLowerCase();return!!d&&b.has(d)},"localPathToApiUrl",0,function(a){let b=a.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return b?`/api/files/assets/${b[1]}/${b[2]}`:a}])},532615,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(986099),e=a.i(54384),f=a.i(912868),g=a.i(10390),h=a.i(91756);let i=(0,a.i(711796).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var j=a.i(747798),k=a.i(951192);function l({children:a,onClick:c,title:d,disabled:e,...f}){return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||c()},title:d,disabled:e,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...f,children:a})}a.s(["ImageLightbox",0,function({imageUrl:a,filename:m,open:n,onOpenChange:o,assets:p,currentIndex:q,onIndexChange:r}){let{t:s}=(0,k.useI18n)(),[t,u]=(0,c.useState)(1),[v,w]=(0,c.useState)({x:0,y:0}),[x,y]=(0,c.useState)(!1),z=(0,c.useRef)(null),[A,B]=(0,c.useState)(!1),C=!!p&&p.length>1&&"number"==typeof q&&!!r,D=C&&q>0,E=C&&q<p.length-1,F=C?p.length:0,G=F>0?Math.ceil(F/10):0,H=C?Math.floor(q/10):0,I=10*H,J=Math.min(I+10,F),K=G>1,L=C&&H>0,M=C&&H<G-1;(0,c.useEffect)(()=>{B(!0)},[]),(0,c.useEffect)(()=>{u(1),w({x:0,y:0})},[a]),(0,c.useEffect)(()=>{if(!n)return;let a=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=a}},[n]);let N=(0,c.useCallback)(()=>o(!1),[o]),O=(0,c.useCallback)(()=>{C&&D&&r(q-1)},[C,D,r,q]),P=(0,c.useCallback)(()=>{C&&E&&r(q+1)},[C,E,r,q]),Q=(0,c.useCallback)(()=>{C&&L&&r((H-1)*10)},[C,L,r,H]),R=(0,c.useCallback)(()=>{C&&M&&r(Math.min((H+1)*10,F-1))},[C,M,r,H,F]),S=(0,c.useCallback)(()=>{u(a=>Math.min(8,1.25*a))},[]),T=(0,c.useCallback)(()=>{u(a=>{let b=Math.max(.1,a/1.25);return b<=1&&w({x:0,y:0}),b})},[]),U=(0,c.useCallback)(()=>{u(1),w({x:0,y:0})},[]);(0,c.useEffect)(()=>{if(!n)return;let a=a=>{switch(a.key){case"Escape":a.preventDefault(),N();break;case"ArrowLeft":C&&(a.preventDefault(),O());break;case"ArrowRight":C&&(a.preventDefault(),P());break;case"+":case"=":a.preventDefault(),S();break;case"-":case"_":a.preventDefault(),T();break;case"0":a.preventDefault(),U()}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n,C,N,O,P,S,T,U]);let V=(0,c.useRef)(!1),W=()=>{x&&y(!1),z.current=null},X=x?"cursor-grabbing":"cursor-grab";if(!n||!A)return null;let Y=(0,b.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":s("assets.lightbox.zoomFit"),children:[(0,b.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[m,C?` \xb7 ${q+1} / ${p.length}`:""]}),(0,b.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${X}`,onClick:a=>{a.target===a.currentTarget&&N()},onWheel:a=>{a.preventDefault();let b=-a.deltaY>0?1.25:.8;u(a=>{let c=Math.min(8,Math.max(.1,a*b));return c<=1&&w({x:0,y:0}),c})},children:a&&(0,b.jsx)("img",{src:a,alt:m,onClick:a=>{a.stopPropagation(),V.current&&(V.current=!1)},onPointerDown:a=>{0===a.button&&(a.stopPropagation(),V.current=!1,a.target.setPointerCapture?.(a.pointerId),z.current={x:a.clientX,y:a.clientY,panX:v.x,panY:v.y},y(!0))},onPointerMove:a=>{if(!z.current)return;let b=a.clientX-z.current.x,c=a.clientY-z.current.y;Math.abs(b)+Math.abs(c)>5&&(V.current=!0),x&&w({x:z.current.panX+b,y:z.current.panY+c})},onPointerUp:W,onPointerLeave:W,onPointerCancel:W,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${v.x}px, ${v.y}px, 0) scale(${t})`,transformOrigin:"center center",transition:x?"none":"transform 120ms ease-out",willChange:x?"transform":"auto"},draggable:!1})}),(0,b.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:a=>a.stopPropagation(),children:[C&&(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[K&&(0,b.jsx)(l,{onClick:Q,title:`${s("assets.lightbox.prev")} (-10)`,"aria-label":`${s("assets.lightbox.prev")} (-10)`,disabled:!L,children:(0,b.jsx)(h.ChevronsLeft,{className:"h-4 w-4"})}),(0,b.jsx)(l,{onClick:O,title:s("assets.lightbox.prev"),"aria-label":s("assets.lightbox.prev"),disabled:!D,children:(0,b.jsx)(f.ChevronLeft,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(I,J).map((a,c)=>{let d=I+c,e=d===q;return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||r(d)},title:a.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${e?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,b.jsx)("img",{src:a.url,alt:a.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},a.url+d)})}),(0,b.jsx)(l,{onClick:P,title:s("assets.lightbox.next"),"aria-label":s("assets.lightbox.next"),disabled:!E,children:(0,b.jsx)(g.ChevronRight,{className:"h-4 w-4"})}),K&&(0,b.jsx)(l,{onClick:R,title:`${s("assets.lightbox.next")} (+10)`,"aria-label":`${s("assets.lightbox.next")} (+10)`,disabled:!M,children:(0,b.jsx)(i,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,b.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*t),"%"]}),(0,b.jsx)(l,{onClick:U,title:s("assets.lightbox.reset"),"aria-label":s("assets.lightbox.reset"),disabled:1===t&&0===v.x&&0===v.y,children:(0,b.jsx)(j.RotateCcw,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,b.jsx)(l,{onClick:N,title:s("assets.lightbox.close"),"aria-label":s("assets.lightbox.close"),children:(0,b.jsx)(e.X,{className:"h-4 w-4"})})]})]})]});return(0,d.createPortal)(Y,document.body)}],532615)},757942,950314,a=>{"use strict";var b=a.i(90393);a.s([],757942),a.s(["Streamdown",()=>b.C],950314)},894148,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(704494);a.i(757942);var e=a.i(950314),f=a.i(814574),g=a.i(951192);a.s(["TextPreviewDialog",0,function({url:a,filename:h,open:i,onOpenChange:j}){let{t:k}=(0,g.useI18n)(),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(null);(0,c.useEffect)(()=>{if(!i||!a){m(null),q(null);return}let b=!1;return o(!0),q(null),m(null),fetch(a).then(a=>{let b=a.headers.get("content-length");if(b&&parseInt(b,10)>1048576)throw Error("FILE_TOO_LARGE");return a.text()}).then(a=>{if(a.length>1048576)throw Error("FILE_TOO_LARGE");b||(m(a),o(!1))}).catch(a=>{b||(a instanceof Error&&"FILE_TOO_LARGE"===a.message?q(k("assets.fileTooLarge")):q(k("assets.previewError")),o(!1))}),()=>{b=!0}},[i,a,k]);let r=h.split(".").pop()?.toLowerCase();return(0,b.jsx)(f.Dialog,{open:i,onOpenChange:j,children:(0,b.jsxs)(f.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:h}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(n)return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,b.jsx)(d.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:k("assets.loadingPreview")})]});if(p)return(0,b.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===l)return null;if("md"===r)return(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(e.Streamdown,{children:l})});if("json"===r){let a;try{a=JSON.stringify(JSON.parse(l),null,2)}catch{a=l}return(0,b.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:a})}return(0,b.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:l})})()})]})})}])},2197,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("407c9406a33e464626e42425b0c56de3c72e98a1c4",b.callServer,void 0,b.findSourceMapURL,"createTask");a.s(["createTask",0,c])},846485,259714,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("402a3832911ad498ab74ac3988c9585666dd257251",b.callServer,void 0,b.findSourceMapURL,"getTaskNotes");a.s(["getTaskNotes",0,c],846485);let d=(0,b.createServerReference)("40080aba13506281aa713298cee0a07c6cc703ea03",b.callServer,void 0,b.findSourceMapURL,"getTaskAssets");a.s(["getTaskAssets",0,d],259714)},113047,455417,454562,a=>{"use strict";let b=(0,a.i(711796).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);a.s(["ChevronsUpDown",0,b],113047);var c=a.i(780410);let d=(0,c.createServerReference)("408ad60a045f2bf21691c4a3da0c2e5c0df46aeeb6",c.callServer,void 0,c.findSourceMapURL,"getProjectBranches");a.s(["getProjectBranches",0,d],455417);let e=(0,c.createServerReference)("40da2575ef47b9d6d5e7ec17b605f4f79ccd703eb0",c.callServer,void 0,c.findSourceMapURL,"fetchRemoteBranches");a.s(["fetchRemoteBranches",0,e],454562)},445798,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(814574),e=a.i(699570),f=a.i(866718),g=a.i(429246),h=a.i(412783),i=a.i(577565),j=a.i(668116),k=a.i(113047),l=a.i(580701),m=a.i(599209),n=a.i(419622),o=a.i(951192),p=a.i(455417),q=a.i(454562),r=a.i(780410);let s=(0,r.createServerReference)("40a368c55ee0fb0de5e50278d7780112639bb8d02a",r.callServer,void 0,r.findSourceMapURL,"getCurrentBranch");var t=a.i(500744);a.s(["CreateTaskDialog",0,function({open:a,onOpenChange:r,onSubmit:u,onUpdate:v,defaultStatus:w="TODO",editTask:x,editTaskLabelIds:y,prefillFromTask:z,labels:A,projectType:B,projectLocalPath:C,versions:D,defaultVersionId:E}){let F,[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(""),[K,L]=(0,c.useState)("MEDIUM"),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)([]),[Q,R]=(0,c.useState)([]),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(""),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(!0),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)(null),{t:ac}=(0,o.useI18n)();(0,c.useEffect)(()=>{if(!a||x)return;let b=!1;return(0,t.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(a=>{if(b)return;let c=a["task.defaultUseWorktree"],d=a["task.defaultAutoStart"];"boolean"==typeof c&&Z(c),"boolean"==typeof d&&_(d)}).catch(()=>{}),()=>{b=!0}},[a,x]);let ad=!!x,ae=!!C;return(0,c.useEffect)(()=>{x?(H(x.title),J(x.description??""),L(x.priority),N(x.subPath??""),P(y??[]),ab(x.versionId??null)):(z?(H(z.title??""),J(z.description??""),L(z.priority??"MEDIUM"),N(z.subPath??""),P(z.labelIds??[])):(H(""),J(""),L("MEDIUM"),N(""),P([])),ab(E??null))},[x,y,z,E]),(0,c.useEffect)(()=>{a||x||(H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),X(!1),ab(E??null))},[a,x,E]),(0,c.useEffect)(()=>{a&&ae&&!x&&(T(!0),Promise.all([(0,p.getProjectBranches)(C),s(C)]).then(([a,b])=>{R(a);let c=z?.baseBranch??null;c&&a.includes(c)?V(c):V(b&&a.includes(b)?b:a[0]??""),T(!1),(0,q.fetchRemoteBranches)(C).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(C).then(a=>{R(a),V(b=>a.includes(b)?b:a[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{R([]),V(""),T(!1)}))},[a,ae,C,x,z]),(0,b.jsx)(d.Dialog,{open:a,onOpenChange:r,disablePointerDismissal:!0,children:(0,b.jsxs)(d.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(d.DialogHeader,{children:(0,b.jsx)(d.DialogTitle,{children:ad?ac("task.edit"):ac("task.create")})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"title",children:ac("task.title")}),(0,b.jsx)(f.Input,{id:"title","data-testid":"task-title",placeholder:ac("task.titlePlaceholder"),value:G,onChange:a=>H(a.target.value),onKeyDown:a=>"Enter"===a.key&&a.preventDefault()})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"description",children:ac("task.description")}),(0,b.jsx)(g.Textarea,{id:"description",placeholder:ac("task.descPlaceholder"),rows:4,value:I,onChange:a=>J(a.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"subPath",children:ac("task.subPath")}),(0,b.jsx)(f.Input,{id:"subPath",placeholder:ac("task.subPathPlaceholder"),value:M,onChange:a=>N(a.target.value)}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:ac("task.subPathHint")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.priority")}),(0,b.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(a=>{let c={LOW:{label:ac("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ac("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ac("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ac("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[a];return(0,b.jsx)("button",{type:"button",onClick:()=>L(a),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${K===a?`${c.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:c.label},a)})})]}),ae&&!ad&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.baseBranch")}),S?(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchLoading")}):Q.length>0?(0,b.jsxs)(m.Popover,{open:W,onOpenChange:X,children:[(0,b.jsxs)(m.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,b.jsx)(i.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:U||void 0,children:U||ac("task.branchNone")}),(0,b.jsx)(k.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,b.jsx)(m.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,b.jsxs)(n.Command,{children:[(0,b.jsx)(n.CommandInput,{placeholder:ac("task.branchSearch")}),(0,b.jsxs)(n.CommandList,{children:[(0,b.jsx)(n.CommandEmpty,{children:ac("task.branchNone")}),(0,b.jsx)(n.CommandGroup,{children:Q.map(a=>(0,b.jsxs)(n.CommandItem,{value:a,onSelect:()=>{V(a),X(!1)},children:[(0,b.jsx)(i.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,b.jsx)("span",{className:"flex-1 truncate font-mono",title:a,children:a}),a===U&&(0,b.jsx)(j.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},a))})]})]})})]}):(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchNone")}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.worktreeLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>Z(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Y===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.worktreeYes"):ac("task.worktreeNo")},String(a)))})]}),(0,b.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.autoStartLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>_(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${$===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.autoStartYes"):ac("task.autoStartNo")},String(a)))})]})]}),A.length>0&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.labels")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:A.map(a=>{let c=O.includes(a.id);return(0,b.jsx)("button",{type:"button",onClick:()=>{P(b=>c?b.filter(b=>b!==a.id):[...b,a.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${c?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:a.color+"20",color:a.color,borderColor:c?a.color+"40":"transparent",borderWidth:"1px"},children:a.name},a.id)})})]}),(!ad||D&&D.length>0)&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("version.picker.label")}),D&&D.length>0?(0,b.jsxs)(l.Select,{value:aa??"__none__",onValueChange:a=>ab("__none__"===a?null:a),children:[(0,b.jsx)(l.SelectTrigger,{children:(0,b.jsx)("span",{className:"truncate text-sm",children:aa&&(F=D.find(a=>a.id===aa))?F.isCurrent?`${F.number} \xb7 ${F.name} \xb7 ${ac("version.currentShort")}`:`${F.number} \xb7 ${F.name}`:ac("version.picker.none")})}),(0,b.jsxs)(l.SelectContent,{children:[(0,b.jsx)(l.SelectItem,{value:"__none__",children:ac("version.picker.none")}),D.map(a=>(0,b.jsx)(l.SelectItem,{value:a.id,children:a.isCurrent?`${a.number} \xb7 ${a.name} \xb7 ${ac("version.currentShort")}`:`${a.number} \xb7 ${a.name}`},a.id))]})]}):(0,b.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ac("version.picker.empty")})]})]}),(0,b.jsxs)(d.DialogFooter,{children:[(0,b.jsx)(e.Button,{variant:"outline",onClick:()=>r(!1),children:ac("common.cancel")}),(0,b.jsx)(e.Button,{onClick:()=>{G.trim()&&(ad&&v?v(x.id,{title:G,description:I,priority:K,labelIds:O,subPath:M.trim()||"",versionId:aa}):u({title:G,description:I,priority:K,status:w,labelIds:O,...ae&&Y&&U?{baseBranch:U}:{},...M.trim()?{subPath:M.trim()}:{},versionId:aa,autoStart:$}),H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),Z(!0),ab(null),r(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:ad?ac("common.save"):ac("common.create")})]})]})})}],445798)},510650,a=>{"use strict";var b=a.i(728778);a.i(757942);var c=a.i(950314),d=a.i(814574),e=a.i(951192);a.s(["NotePreviewDialog",0,function({note:a,open:f,onOpenChange:g}){let{t:h}=(0,e.useI18n)();return(0,b.jsx)(d.Dialog,{open:f,onOpenChange:g,children:(0,b.jsxs)(d.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:a?.title}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:a&&a.content.trim()?(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(c.Streamdown,{children:a.content})}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:h("taskPage.noteEmpty")})})]})})}])},521007,a=>{"use strict";a.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},87339,a=>{"use strict";let b=(0,a.i(711796).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);a.s(["Paperclip",0,b],87339)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_0_r-f5a._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[521007,a=>{"use strict";a.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},113047,455417,454562,a=>{"use strict";let b=(0,a.i(711796).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);a.s(["ChevronsUpDown",0,b],113047);var c=a.i(780410);let d=(0,c.createServerReference)("408ad60a045f2bf21691c4a3da0c2e5c0df46aeeb6",c.callServer,void 0,c.findSourceMapURL,"getProjectBranches");a.s(["getProjectBranches",0,d],455417);let e=(0,c.createServerReference)("40da2575ef47b9d6d5e7ec17b605f4f79ccd703eb0",c.callServer,void 0,c.findSourceMapURL,"fetchRemoteBranches");a.s(["fetchRemoteBranches",0,e],454562)},2197,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("407c9406a33e464626e42425b0c56de3c72e98a1c4",b.callServer,void 0,b.findSourceMapURL,"createTask");a.s(["createTask",0,c])},846485,259714,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("402a3832911ad498ab74ac3988c9585666dd257251",b.callServer,void 0,b.findSourceMapURL,"getTaskNotes");a.s(["getTaskNotes",0,c],846485);let d=(0,b.createServerReference)("40080aba13506281aa713298cee0a07c6cc703ea03",b.callServer,void 0,b.findSourceMapURL,"getTaskAssets");a.s(["getTaskAssets",0,d],259714)},445798,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(814574),e=a.i(699570),f=a.i(866718),g=a.i(429246),h=a.i(412783),i=a.i(577565),j=a.i(668116),k=a.i(113047),l=a.i(580701),m=a.i(599209),n=a.i(419622),o=a.i(951192),p=a.i(455417),q=a.i(454562),r=a.i(780410);let s=(0,r.createServerReference)("40a368c55ee0fb0de5e50278d7780112639bb8d02a",r.callServer,void 0,r.findSourceMapURL,"getCurrentBranch");var t=a.i(500744);a.s(["CreateTaskDialog",0,function({open:a,onOpenChange:r,onSubmit:u,onUpdate:v,defaultStatus:w="TODO",editTask:x,editTaskLabelIds:y,prefillFromTask:z,labels:A,projectType:B,projectLocalPath:C,versions:D,defaultVersionId:E}){let F,[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(""),[K,L]=(0,c.useState)("MEDIUM"),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)([]),[Q,R]=(0,c.useState)([]),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(""),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(!0),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)(null),{t:ac}=(0,o.useI18n)();(0,c.useEffect)(()=>{if(!a||x)return;let b=!1;return(0,t.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(a=>{if(b)return;let c=a["task.defaultUseWorktree"],d=a["task.defaultAutoStart"];"boolean"==typeof c&&Z(c),"boolean"==typeof d&&_(d)}).catch(()=>{}),()=>{b=!0}},[a,x]);let ad=!!x,ae=!!C;return(0,c.useEffect)(()=>{x?(H(x.title),J(x.description??""),L(x.priority),N(x.subPath??""),P(y??[]),ab(x.versionId??null)):(z?(H(z.title??""),J(z.description??""),L(z.priority??"MEDIUM"),N(z.subPath??""),P(z.labelIds??[])):(H(""),J(""),L("MEDIUM"),N(""),P([])),ab(E??null))},[x,y,z,E]),(0,c.useEffect)(()=>{a||x||(H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),X(!1),ab(E??null))},[a,x,E]),(0,c.useEffect)(()=>{a&&ae&&!x&&(T(!0),Promise.all([(0,p.getProjectBranches)(C),s(C)]).then(([a,b])=>{R(a);let c=z?.baseBranch??null;c&&a.includes(c)?V(c):V(b&&a.includes(b)?b:a[0]??""),T(!1),(0,q.fetchRemoteBranches)(C).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(C).then(a=>{R(a),V(b=>a.includes(b)?b:a[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{R([]),V(""),T(!1)}))},[a,ae,C,x,z]),(0,b.jsx)(d.Dialog,{open:a,onOpenChange:r,disablePointerDismissal:!0,children:(0,b.jsxs)(d.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(d.DialogHeader,{children:(0,b.jsx)(d.DialogTitle,{children:ad?ac("task.edit"):ac("task.create")})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"title",children:ac("task.title")}),(0,b.jsx)(f.Input,{id:"title","data-testid":"task-title",placeholder:ac("task.titlePlaceholder"),value:G,onChange:a=>H(a.target.value),onKeyDown:a=>"Enter"===a.key&&a.preventDefault()})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"description",children:ac("task.description")}),(0,b.jsx)(g.Textarea,{id:"description",placeholder:ac("task.descPlaceholder"),rows:4,value:I,onChange:a=>J(a.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"subPath",children:ac("task.subPath")}),(0,b.jsx)(f.Input,{id:"subPath",placeholder:ac("task.subPathPlaceholder"),value:M,onChange:a=>N(a.target.value)}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:ac("task.subPathHint")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.priority")}),(0,b.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(a=>{let c={LOW:{label:ac("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ac("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ac("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ac("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[a];return(0,b.jsx)("button",{type:"button",onClick:()=>L(a),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${K===a?`${c.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:c.label},a)})})]}),ae&&!ad&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.baseBranch")}),S?(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchLoading")}):Q.length>0?(0,b.jsxs)(m.Popover,{open:W,onOpenChange:X,children:[(0,b.jsxs)(m.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,b.jsx)(i.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:U||void 0,children:U||ac("task.branchNone")}),(0,b.jsx)(k.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,b.jsx)(m.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,b.jsxs)(n.Command,{children:[(0,b.jsx)(n.CommandInput,{placeholder:ac("task.branchSearch")}),(0,b.jsxs)(n.CommandList,{children:[(0,b.jsx)(n.CommandEmpty,{children:ac("task.branchNone")}),(0,b.jsx)(n.CommandGroup,{children:Q.map(a=>(0,b.jsxs)(n.CommandItem,{value:a,onSelect:()=>{V(a),X(!1)},children:[(0,b.jsx)(i.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,b.jsx)("span",{className:"flex-1 truncate font-mono",title:a,children:a}),a===U&&(0,b.jsx)(j.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},a))})]})]})})]}):(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchNone")}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.worktreeLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>Z(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Y===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.worktreeYes"):ac("task.worktreeNo")},String(a)))})]}),(0,b.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.autoStartLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>_(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${$===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.autoStartYes"):ac("task.autoStartNo")},String(a)))})]})]}),A.length>0&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.labels")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:A.map(a=>{let c=O.includes(a.id);return(0,b.jsx)("button",{type:"button",onClick:()=>{P(b=>c?b.filter(b=>b!==a.id):[...b,a.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${c?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:a.color+"20",color:a.color,borderColor:c?a.color+"40":"transparent",borderWidth:"1px"},children:a.name},a.id)})})]}),(!ad||D&&D.length>0)&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("version.picker.label")}),D&&D.length>0?(0,b.jsxs)(l.Select,{value:aa??"__none__",onValueChange:a=>ab("__none__"===a?null:a),children:[(0,b.jsx)(l.SelectTrigger,{children:(0,b.jsx)("span",{className:"truncate text-sm",children:aa&&(F=D.find(a=>a.id===aa))?F.isCurrent?`${F.number} \xb7 ${F.name} \xb7 ${ac("version.currentShort")}`:`${F.number} \xb7 ${F.name}`:ac("version.picker.none")})}),(0,b.jsxs)(l.SelectContent,{children:[(0,b.jsx)(l.SelectItem,{value:"__none__",children:ac("version.picker.none")}),D.map(a=>(0,b.jsx)(l.SelectItem,{value:a.id,children:a.isCurrent?`${a.number} \xb7 ${a.name} \xb7 ${ac("version.currentShort")}`:`${a.number} \xb7 ${a.name}`},a.id))]})]}):(0,b.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ac("version.picker.empty")})]})]}),(0,b.jsxs)(d.DialogFooter,{children:[(0,b.jsx)(e.Button,{variant:"outline",onClick:()=>r(!1),children:ac("common.cancel")}),(0,b.jsx)(e.Button,{onClick:()=>{G.trim()&&(ad&&v?v(x.id,{title:G,description:I,priority:K,labelIds:O,subPath:M.trim()||"",versionId:aa}):u({title:G,description:I,priority:K,status:w,labelIds:O,...ae&&Y&&U?{baseBranch:U}:{},...M.trim()?{subPath:M.trim()}:{},versionId:aa,autoStart:$}),H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),Z(!0),ab(null),r(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:ad?ac("common.save"):ac("common.create")})]})]})})}],445798)},757942,950314,a=>{"use strict";var b=a.i(90393);a.s([],757942),a.s(["Streamdown",()=>b.C],950314)},510650,a=>{"use strict";var b=a.i(728778);a.i(757942);var c=a.i(950314),d=a.i(814574),e=a.i(951192);a.s(["NotePreviewDialog",0,function({note:a,open:f,onOpenChange:g}){let{t:h}=(0,e.useI18n)();return(0,b.jsx)(d.Dialog,{open:f,onOpenChange:g,children:(0,b.jsxs)(d.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:a?.title}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:a&&a.content.trim()?(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(c.Streamdown,{children:a.content})}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:h("taskPage.noteEmpty")})})]})})}])},532615,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(986099),e=a.i(54384),f=a.i(912868),g=a.i(10390),h=a.i(91756);let i=(0,a.i(711796).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var j=a.i(747798),k=a.i(951192);function l({children:a,onClick:c,title:d,disabled:e,...f}){return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||c()},title:d,disabled:e,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...f,children:a})}a.s(["ImageLightbox",0,function({imageUrl:a,filename:m,open:n,onOpenChange:o,assets:p,currentIndex:q,onIndexChange:r}){let{t:s}=(0,k.useI18n)(),[t,u]=(0,c.useState)(1),[v,w]=(0,c.useState)({x:0,y:0}),[x,y]=(0,c.useState)(!1),z=(0,c.useRef)(null),[A,B]=(0,c.useState)(!1),C=!!p&&p.length>1&&"number"==typeof q&&!!r,D=C&&q>0,E=C&&q<p.length-1,F=C?p.length:0,G=F>0?Math.ceil(F/10):0,H=C?Math.floor(q/10):0,I=10*H,J=Math.min(I+10,F),K=G>1,L=C&&H>0,M=C&&H<G-1;(0,c.useEffect)(()=>{B(!0)},[]),(0,c.useEffect)(()=>{u(1),w({x:0,y:0})},[a]),(0,c.useEffect)(()=>{if(!n)return;let a=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=a}},[n]);let N=(0,c.useCallback)(()=>o(!1),[o]),O=(0,c.useCallback)(()=>{C&&D&&r(q-1)},[C,D,r,q]),P=(0,c.useCallback)(()=>{C&&E&&r(q+1)},[C,E,r,q]),Q=(0,c.useCallback)(()=>{C&&L&&r((H-1)*10)},[C,L,r,H]),R=(0,c.useCallback)(()=>{C&&M&&r(Math.min((H+1)*10,F-1))},[C,M,r,H,F]),S=(0,c.useCallback)(()=>{u(a=>Math.min(8,1.25*a))},[]),T=(0,c.useCallback)(()=>{u(a=>{let b=Math.max(.1,a/1.25);return b<=1&&w({x:0,y:0}),b})},[]),U=(0,c.useCallback)(()=>{u(1),w({x:0,y:0})},[]);(0,c.useEffect)(()=>{if(!n)return;let a=a=>{switch(a.key){case"Escape":a.preventDefault(),N();break;case"ArrowLeft":C&&(a.preventDefault(),O());break;case"ArrowRight":C&&(a.preventDefault(),P());break;case"+":case"=":a.preventDefault(),S();break;case"-":case"_":a.preventDefault(),T();break;case"0":a.preventDefault(),U()}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n,C,N,O,P,S,T,U]);let V=(0,c.useRef)(!1),W=()=>{x&&y(!1),z.current=null},X=x?"cursor-grabbing":"cursor-grab";if(!n||!A)return null;let Y=(0,b.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":s("assets.lightbox.zoomFit"),children:[(0,b.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[m,C?` \xb7 ${q+1} / ${p.length}`:""]}),(0,b.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${X}`,onClick:a=>{a.target===a.currentTarget&&N()},onWheel:a=>{a.preventDefault();let b=-a.deltaY>0?1.25:.8;u(a=>{let c=Math.min(8,Math.max(.1,a*b));return c<=1&&w({x:0,y:0}),c})},children:a&&(0,b.jsx)("img",{src:a,alt:m,onClick:a=>{a.stopPropagation(),V.current&&(V.current=!1)},onPointerDown:a=>{0===a.button&&(a.stopPropagation(),V.current=!1,a.target.setPointerCapture?.(a.pointerId),z.current={x:a.clientX,y:a.clientY,panX:v.x,panY:v.y},y(!0))},onPointerMove:a=>{if(!z.current)return;let b=a.clientX-z.current.x,c=a.clientY-z.current.y;Math.abs(b)+Math.abs(c)>5&&(V.current=!0),x&&w({x:z.current.panX+b,y:z.current.panY+c})},onPointerUp:W,onPointerLeave:W,onPointerCancel:W,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${v.x}px, ${v.y}px, 0) scale(${t})`,transformOrigin:"center center",transition:x?"none":"transform 120ms ease-out",willChange:x?"transform":"auto"},draggable:!1})}),(0,b.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:a=>a.stopPropagation(),children:[C&&(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[K&&(0,b.jsx)(l,{onClick:Q,title:`${s("assets.lightbox.prev")} (-10)`,"aria-label":`${s("assets.lightbox.prev")} (-10)`,disabled:!L,children:(0,b.jsx)(h.ChevronsLeft,{className:"h-4 w-4"})}),(0,b.jsx)(l,{onClick:O,title:s("assets.lightbox.prev"),"aria-label":s("assets.lightbox.prev"),disabled:!D,children:(0,b.jsx)(f.ChevronLeft,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(I,J).map((a,c)=>{let d=I+c,e=d===q;return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||r(d)},title:a.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${e?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,b.jsx)("img",{src:a.url,alt:a.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},a.url+d)})}),(0,b.jsx)(l,{onClick:P,title:s("assets.lightbox.next"),"aria-label":s("assets.lightbox.next"),disabled:!E,children:(0,b.jsx)(g.ChevronRight,{className:"h-4 w-4"})}),K&&(0,b.jsx)(l,{onClick:R,title:`${s("assets.lightbox.next")} (+10)`,"aria-label":`${s("assets.lightbox.next")} (+10)`,disabled:!M,children:(0,b.jsx)(i,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,b.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*t),"%"]}),(0,b.jsx)(l,{onClick:U,title:s("assets.lightbox.reset"),"aria-label":s("assets.lightbox.reset"),disabled:1===t&&0===v.x&&0===v.y,children:(0,b.jsx)(j.RotateCcw,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,b.jsx)(l,{onClick:N,title:s("assets.lightbox.close"),"aria-label":s("assets.lightbox.close"),children:(0,b.jsx)(e.X,{className:"h-4 w-4"})})]})]})]});return(0,d.createPortal)(Y,document.body)}],532615)},894148,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(704494);a.i(757942);var e=a.i(950314),f=a.i(814574),g=a.i(951192);a.s(["TextPreviewDialog",0,function({url:a,filename:h,open:i,onOpenChange:j}){let{t:k}=(0,g.useI18n)(),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(null);(0,c.useEffect)(()=>{if(!i||!a){m(null),q(null);return}let b=!1;return o(!0),q(null),m(null),fetch(a).then(a=>{let b=a.headers.get("content-length");if(b&&parseInt(b,10)>1048576)throw Error("FILE_TOO_LARGE");return a.text()}).then(a=>{if(a.length>1048576)throw Error("FILE_TOO_LARGE");b||(m(a),o(!1))}).catch(a=>{b||(a instanceof Error&&"FILE_TOO_LARGE"===a.message?q(k("assets.fileTooLarge")):q(k("assets.previewError")),o(!1))}),()=>{b=!0}},[i,a,k]);let r=h.split(".").pop()?.toLowerCase();return(0,b.jsx)(f.Dialog,{open:i,onOpenChange:j,children:(0,b.jsxs)(f.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:h}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(n)return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,b.jsx)(d.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:k("assets.loadingPreview")})]});if(p)return(0,b.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===l)return null;if("md"===r)return(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(e.Streamdown,{children:l})});if("json"===r){let a;try{a=JSON.stringify(JSON.parse(l),null,2)}catch{a=l}return(0,b.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:a})}return(0,b.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:l})})()})]})})}])},161181,a=>{"use strict";let b=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);a.s(["isImageAsset",0,function(a,c){if(c?.startsWith("image/"))return!0;let d=a.split(".").pop()?.toLowerCase();return!!d&&b.has(d)},"localPathToApiUrl",0,function(a){let b=a.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return b?`/api/files/assets/${b[1]}/${b[2]}`:a}])},87339,a=>{"use strict";let b=(0,a.i(711796).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);a.s(["Paperclip",0,b],87339)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_0gzdrnf._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[521007,a=>{"use strict";a.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},113047,455417,454562,a=>{"use strict";let b=(0,a.i(711796).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);a.s(["ChevronsUpDown",0,b],113047);var c=a.i(780410);let d=(0,c.createServerReference)("408ad60a045f2bf21691c4a3da0c2e5c0df46aeeb6",c.callServer,void 0,c.findSourceMapURL,"getProjectBranches");a.s(["getProjectBranches",0,d],455417);let e=(0,c.createServerReference)("40da2575ef47b9d6d5e7ec17b605f4f79ccd703eb0",c.callServer,void 0,c.findSourceMapURL,"fetchRemoteBranches");a.s(["fetchRemoteBranches",0,e],454562)},445798,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(814574),e=a.i(699570),f=a.i(866718),g=a.i(429246),h=a.i(412783),i=a.i(577565),j=a.i(668116),k=a.i(113047),l=a.i(580701),m=a.i(599209),n=a.i(419622),o=a.i(951192),p=a.i(455417),q=a.i(454562),r=a.i(780410);let s=(0,r.createServerReference)("40a368c55ee0fb0de5e50278d7780112639bb8d02a",r.callServer,void 0,r.findSourceMapURL,"getCurrentBranch");var t=a.i(500744);a.s(["CreateTaskDialog",0,function({open:a,onOpenChange:r,onSubmit:u,onUpdate:v,defaultStatus:w="TODO",editTask:x,editTaskLabelIds:y,prefillFromTask:z,labels:A,projectType:B,projectLocalPath:C,versions:D,defaultVersionId:E}){let F,[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(""),[K,L]=(0,c.useState)("MEDIUM"),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)([]),[Q,R]=(0,c.useState)([]),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(""),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(!0),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)(null),{t:ac}=(0,o.useI18n)();(0,c.useEffect)(()=>{if(!a||x)return;let b=!1;return(0,t.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(a=>{if(b)return;let c=a["task.defaultUseWorktree"],d=a["task.defaultAutoStart"];"boolean"==typeof c&&Z(c),"boolean"==typeof d&&_(d)}).catch(()=>{}),()=>{b=!0}},[a,x]);let ad=!!x,ae=!!C;return(0,c.useEffect)(()=>{x?(H(x.title),J(x.description??""),L(x.priority),N(x.subPath??""),P(y??[]),ab(x.versionId??null)):(z?(H(z.title??""),J(z.description??""),L(z.priority??"MEDIUM"),N(z.subPath??""),P(z.labelIds??[])):(H(""),J(""),L("MEDIUM"),N(""),P([])),ab(E??null))},[x,y,z,E]),(0,c.useEffect)(()=>{a||x||(H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),X(!1),ab(E??null))},[a,x,E]),(0,c.useEffect)(()=>{a&&ae&&!x&&(T(!0),Promise.all([(0,p.getProjectBranches)(C),s(C)]).then(([a,b])=>{R(a);let c=z?.baseBranch??null;c&&a.includes(c)?V(c):V(b&&a.includes(b)?b:a[0]??""),T(!1),(0,q.fetchRemoteBranches)(C).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(C).then(a=>{R(a),V(b=>a.includes(b)?b:a[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{R([]),V(""),T(!1)}))},[a,ae,C,x,z]),(0,b.jsx)(d.Dialog,{open:a,onOpenChange:r,disablePointerDismissal:!0,children:(0,b.jsxs)(d.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(d.DialogHeader,{children:(0,b.jsx)(d.DialogTitle,{children:ad?ac("task.edit"):ac("task.create")})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"title",children:ac("task.title")}),(0,b.jsx)(f.Input,{id:"title","data-testid":"task-title",placeholder:ac("task.titlePlaceholder"),value:G,onChange:a=>H(a.target.value),onKeyDown:a=>"Enter"===a.key&&a.preventDefault()})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"description",children:ac("task.description")}),(0,b.jsx)(g.Textarea,{id:"description",placeholder:ac("task.descPlaceholder"),rows:4,value:I,onChange:a=>J(a.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"subPath",children:ac("task.subPath")}),(0,b.jsx)(f.Input,{id:"subPath",placeholder:ac("task.subPathPlaceholder"),value:M,onChange:a=>N(a.target.value)}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:ac("task.subPathHint")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.priority")}),(0,b.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(a=>{let c={LOW:{label:ac("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ac("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ac("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ac("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[a];return(0,b.jsx)("button",{type:"button",onClick:()=>L(a),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${K===a?`${c.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:c.label},a)})})]}),ae&&!ad&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.baseBranch")}),S?(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchLoading")}):Q.length>0?(0,b.jsxs)(m.Popover,{open:W,onOpenChange:X,children:[(0,b.jsxs)(m.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,b.jsx)(i.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:U||void 0,children:U||ac("task.branchNone")}),(0,b.jsx)(k.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,b.jsx)(m.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,b.jsxs)(n.Command,{children:[(0,b.jsx)(n.CommandInput,{placeholder:ac("task.branchSearch")}),(0,b.jsxs)(n.CommandList,{children:[(0,b.jsx)(n.CommandEmpty,{children:ac("task.branchNone")}),(0,b.jsx)(n.CommandGroup,{children:Q.map(a=>(0,b.jsxs)(n.CommandItem,{value:a,onSelect:()=>{V(a),X(!1)},children:[(0,b.jsx)(i.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,b.jsx)("span",{className:"flex-1 truncate font-mono",title:a,children:a}),a===U&&(0,b.jsx)(j.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},a))})]})]})})]}):(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchNone")}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.worktreeLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>Z(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Y===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.worktreeYes"):ac("task.worktreeNo")},String(a)))})]}),(0,b.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.autoStartLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>_(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${$===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.autoStartYes"):ac("task.autoStartNo")},String(a)))})]})]}),A.length>0&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.labels")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:A.map(a=>{let c=O.includes(a.id);return(0,b.jsx)("button",{type:"button",onClick:()=>{P(b=>c?b.filter(b=>b!==a.id):[...b,a.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${c?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:a.color+"20",color:a.color,borderColor:c?a.color+"40":"transparent",borderWidth:"1px"},children:a.name},a.id)})})]}),(!ad||D&&D.length>0)&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("version.picker.label")}),D&&D.length>0?(0,b.jsxs)(l.Select,{value:aa??"__none__",onValueChange:a=>ab("__none__"===a?null:a),children:[(0,b.jsx)(l.SelectTrigger,{children:(0,b.jsx)("span",{className:"truncate text-sm",children:aa&&(F=D.find(a=>a.id===aa))?F.isCurrent?`${F.number} \xb7 ${F.name} \xb7 ${ac("version.currentShort")}`:`${F.number} \xb7 ${F.name}`:ac("version.picker.none")})}),(0,b.jsxs)(l.SelectContent,{children:[(0,b.jsx)(l.SelectItem,{value:"__none__",children:ac("version.picker.none")}),D.map(a=>(0,b.jsx)(l.SelectItem,{value:a.id,children:a.isCurrent?`${a.number} \xb7 ${a.name} \xb7 ${ac("version.currentShort")}`:`${a.number} \xb7 ${a.name}`},a.id))]})]}):(0,b.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ac("version.picker.empty")})]})]}),(0,b.jsxs)(d.DialogFooter,{children:[(0,b.jsx)(e.Button,{variant:"outline",onClick:()=>r(!1),children:ac("common.cancel")}),(0,b.jsx)(e.Button,{onClick:()=>{G.trim()&&(ad&&v?v(x.id,{title:G,description:I,priority:K,labelIds:O,subPath:M.trim()||"",versionId:aa}):u({title:G,description:I,priority:K,status:w,labelIds:O,...ae&&Y&&U?{baseBranch:U}:{},...M.trim()?{subPath:M.trim()}:{},versionId:aa,autoStart:$}),H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),Z(!0),ab(null),r(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:ad?ac("common.save"):ac("common.create")})]})]})})}],445798)},87339,a=>{"use strict";let b=(0,a.i(711796).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);a.s(["Paperclip",0,b],87339)},846485,259714,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("402a3832911ad498ab74ac3988c9585666dd257251",b.callServer,void 0,b.findSourceMapURL,"getTaskNotes");a.s(["getTaskNotes",0,c],846485);let d=(0,b.createServerReference)("40080aba13506281aa713298cee0a07c6cc703ea03",b.callServer,void 0,b.findSourceMapURL,"getTaskAssets");a.s(["getTaskAssets",0,d],259714)},532615,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(986099),e=a.i(54384),f=a.i(912868),g=a.i(10390),h=a.i(91756);let i=(0,a.i(711796).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var j=a.i(747798),k=a.i(951192);function l({children:a,onClick:c,title:d,disabled:e,...f}){return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||c()},title:d,disabled:e,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...f,children:a})}a.s(["ImageLightbox",0,function({imageUrl:a,filename:m,open:n,onOpenChange:o,assets:p,currentIndex:q,onIndexChange:r}){let{t:s}=(0,k.useI18n)(),[t,u]=(0,c.useState)(1),[v,w]=(0,c.useState)({x:0,y:0}),[x,y]=(0,c.useState)(!1),z=(0,c.useRef)(null),[A,B]=(0,c.useState)(!1),C=!!p&&p.length>1&&"number"==typeof q&&!!r,D=C&&q>0,E=C&&q<p.length-1,F=C?p.length:0,G=F>0?Math.ceil(F/10):0,H=C?Math.floor(q/10):0,I=10*H,J=Math.min(I+10,F),K=G>1,L=C&&H>0,M=C&&H<G-1;(0,c.useEffect)(()=>{B(!0)},[]),(0,c.useEffect)(()=>{u(1),w({x:0,y:0})},[a]),(0,c.useEffect)(()=>{if(!n)return;let a=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=a}},[n]);let N=(0,c.useCallback)(()=>o(!1),[o]),O=(0,c.useCallback)(()=>{C&&D&&r(q-1)},[C,D,r,q]),P=(0,c.useCallback)(()=>{C&&E&&r(q+1)},[C,E,r,q]),Q=(0,c.useCallback)(()=>{C&&L&&r((H-1)*10)},[C,L,r,H]),R=(0,c.useCallback)(()=>{C&&M&&r(Math.min((H+1)*10,F-1))},[C,M,r,H,F]),S=(0,c.useCallback)(()=>{u(a=>Math.min(8,1.25*a))},[]),T=(0,c.useCallback)(()=>{u(a=>{let b=Math.max(.1,a/1.25);return b<=1&&w({x:0,y:0}),b})},[]),U=(0,c.useCallback)(()=>{u(1),w({x:0,y:0})},[]);(0,c.useEffect)(()=>{if(!n)return;let a=a=>{switch(a.key){case"Escape":a.preventDefault(),N();break;case"ArrowLeft":C&&(a.preventDefault(),O());break;case"ArrowRight":C&&(a.preventDefault(),P());break;case"+":case"=":a.preventDefault(),S();break;case"-":case"_":a.preventDefault(),T();break;case"0":a.preventDefault(),U()}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n,C,N,O,P,S,T,U]);let V=(0,c.useRef)(!1),W=()=>{x&&y(!1),z.current=null},X=x?"cursor-grabbing":"cursor-grab";if(!n||!A)return null;let Y=(0,b.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":s("assets.lightbox.zoomFit"),children:[(0,b.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[m,C?` \xb7 ${q+1} / ${p.length}`:""]}),(0,b.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${X}`,onClick:a=>{a.target===a.currentTarget&&N()},onWheel:a=>{a.preventDefault();let b=-a.deltaY>0?1.25:.8;u(a=>{let c=Math.min(8,Math.max(.1,a*b));return c<=1&&w({x:0,y:0}),c})},children:a&&(0,b.jsx)("img",{src:a,alt:m,onClick:a=>{a.stopPropagation(),V.current&&(V.current=!1)},onPointerDown:a=>{0===a.button&&(a.stopPropagation(),V.current=!1,a.target.setPointerCapture?.(a.pointerId),z.current={x:a.clientX,y:a.clientY,panX:v.x,panY:v.y},y(!0))},onPointerMove:a=>{if(!z.current)return;let b=a.clientX-z.current.x,c=a.clientY-z.current.y;Math.abs(b)+Math.abs(c)>5&&(V.current=!0),x&&w({x:z.current.panX+b,y:z.current.panY+c})},onPointerUp:W,onPointerLeave:W,onPointerCancel:W,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${v.x}px, ${v.y}px, 0) scale(${t})`,transformOrigin:"center center",transition:x?"none":"transform 120ms ease-out",willChange:x?"transform":"auto"},draggable:!1})}),(0,b.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:a=>a.stopPropagation(),children:[C&&(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[K&&(0,b.jsx)(l,{onClick:Q,title:`${s("assets.lightbox.prev")} (-10)`,"aria-label":`${s("assets.lightbox.prev")} (-10)`,disabled:!L,children:(0,b.jsx)(h.ChevronsLeft,{className:"h-4 w-4"})}),(0,b.jsx)(l,{onClick:O,title:s("assets.lightbox.prev"),"aria-label":s("assets.lightbox.prev"),disabled:!D,children:(0,b.jsx)(f.ChevronLeft,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(I,J).map((a,c)=>{let d=I+c,e=d===q;return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||r(d)},title:a.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${e?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,b.jsx)("img",{src:a.url,alt:a.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},a.url+d)})}),(0,b.jsx)(l,{onClick:P,title:s("assets.lightbox.next"),"aria-label":s("assets.lightbox.next"),disabled:!E,children:(0,b.jsx)(g.ChevronRight,{className:"h-4 w-4"})}),K&&(0,b.jsx)(l,{onClick:R,title:`${s("assets.lightbox.next")} (+10)`,"aria-label":`${s("assets.lightbox.next")} (+10)`,disabled:!M,children:(0,b.jsx)(i,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,b.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*t),"%"]}),(0,b.jsx)(l,{onClick:U,title:s("assets.lightbox.reset"),"aria-label":s("assets.lightbox.reset"),disabled:1===t&&0===v.x&&0===v.y,children:(0,b.jsx)(j.RotateCcw,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,b.jsx)(l,{onClick:N,title:s("assets.lightbox.close"),"aria-label":s("assets.lightbox.close"),children:(0,b.jsx)(e.X,{className:"h-4 w-4"})})]})]})]});return(0,d.createPortal)(Y,document.body)}],532615)},757942,950314,a=>{"use strict";var b=a.i(90393);a.s([],757942),a.s(["Streamdown",()=>b.C],950314)},894148,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(704494);a.i(757942);var e=a.i(950314),f=a.i(814574),g=a.i(951192);a.s(["TextPreviewDialog",0,function({url:a,filename:h,open:i,onOpenChange:j}){let{t:k}=(0,g.useI18n)(),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(null);(0,c.useEffect)(()=>{if(!i||!a){m(null),q(null);return}let b=!1;return o(!0),q(null),m(null),fetch(a).then(a=>{let b=a.headers.get("content-length");if(b&&parseInt(b,10)>1048576)throw Error("FILE_TOO_LARGE");return a.text()}).then(a=>{if(a.length>1048576)throw Error("FILE_TOO_LARGE");b||(m(a),o(!1))}).catch(a=>{b||(a instanceof Error&&"FILE_TOO_LARGE"===a.message?q(k("assets.fileTooLarge")):q(k("assets.previewError")),o(!1))}),()=>{b=!0}},[i,a,k]);let r=h.split(".").pop()?.toLowerCase();return(0,b.jsx)(f.Dialog,{open:i,onOpenChange:j,children:(0,b.jsxs)(f.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:h}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(n)return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,b.jsx)(d.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:k("assets.loadingPreview")})]});if(p)return(0,b.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===l)return null;if("md"===r)return(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(e.Streamdown,{children:l})});if("json"===r){let a;try{a=JSON.stringify(JSON.parse(l),null,2)}catch{a=l}return(0,b.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:a})}return(0,b.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:l})})()})]})})}])},510650,a=>{"use strict";var b=a.i(728778);a.i(757942);var c=a.i(950314),d=a.i(814574),e=a.i(951192);a.s(["NotePreviewDialog",0,function({note:a,open:f,onOpenChange:g}){let{t:h}=(0,e.useI18n)();return(0,b.jsx)(d.Dialog,{open:f,onOpenChange:g,children:(0,b.jsxs)(d.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:a?.title}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:a&&a.content.trim()?(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(c.Streamdown,{children:a.content})}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:h("taskPage.noteEmpty")})})]})})}])},161181,a=>{"use strict";let b=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);a.s(["isImageAsset",0,function(a,c){if(c?.startsWith("image/"))return!0;let d=a.split(".").pop()?.toLowerCase();return!!d&&b.has(d)},"localPathToApiUrl",0,function(a){let b=a.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return b?`/api/files/assets/${b[1]}/${b[2]}`:a}])},2197,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("407c9406a33e464626e42425b0c56de3c72e98a1c4",b.callServer,void 0,b.findSourceMapURL,"createTask");a.s(["createTask",0,c])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_0lqxllh._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[521007,a=>{"use strict";a.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},757942,950314,a=>{"use strict";var b=a.i(90393);a.s([],757942),a.s(["Streamdown",()=>b.C],950314)},510650,a=>{"use strict";var b=a.i(728778);a.i(757942);var c=a.i(950314),d=a.i(814574),e=a.i(951192);a.s(["NotePreviewDialog",0,function({note:a,open:f,onOpenChange:g}){let{t:h}=(0,e.useI18n)();return(0,b.jsx)(d.Dialog,{open:f,onOpenChange:g,children:(0,b.jsxs)(d.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:a?.title}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:a&&a.content.trim()?(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(c.Streamdown,{children:a.content})}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:h("taskPage.noteEmpty")})})]})})}])},2197,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("407c9406a33e464626e42425b0c56de3c72e98a1c4",b.callServer,void 0,b.findSourceMapURL,"createTask");a.s(["createTask",0,c])},846485,259714,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("402a3832911ad498ab74ac3988c9585666dd257251",b.callServer,void 0,b.findSourceMapURL,"getTaskNotes");a.s(["getTaskNotes",0,c],846485);let d=(0,b.createServerReference)("40080aba13506281aa713298cee0a07c6cc703ea03",b.callServer,void 0,b.findSourceMapURL,"getTaskAssets");a.s(["getTaskAssets",0,d],259714)},113047,455417,454562,a=>{"use strict";let b=(0,a.i(711796).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);a.s(["ChevronsUpDown",0,b],113047);var c=a.i(780410);let d=(0,c.createServerReference)("408ad60a045f2bf21691c4a3da0c2e5c0df46aeeb6",c.callServer,void 0,c.findSourceMapURL,"getProjectBranches");a.s(["getProjectBranches",0,d],455417);let e=(0,c.createServerReference)("40da2575ef47b9d6d5e7ec17b605f4f79ccd703eb0",c.callServer,void 0,c.findSourceMapURL,"fetchRemoteBranches");a.s(["fetchRemoteBranches",0,e],454562)},445798,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(814574),e=a.i(699570),f=a.i(866718),g=a.i(429246),h=a.i(412783),i=a.i(577565),j=a.i(668116),k=a.i(113047),l=a.i(580701),m=a.i(599209),n=a.i(419622),o=a.i(951192),p=a.i(455417),q=a.i(454562),r=a.i(780410);let s=(0,r.createServerReference)("40a368c55ee0fb0de5e50278d7780112639bb8d02a",r.callServer,void 0,r.findSourceMapURL,"getCurrentBranch");var t=a.i(500744);a.s(["CreateTaskDialog",0,function({open:a,onOpenChange:r,onSubmit:u,onUpdate:v,defaultStatus:w="TODO",editTask:x,editTaskLabelIds:y,prefillFromTask:z,labels:A,projectType:B,projectLocalPath:C,versions:D,defaultVersionId:E}){let F,[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(""),[K,L]=(0,c.useState)("MEDIUM"),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)([]),[Q,R]=(0,c.useState)([]),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(""),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(!0),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)(null),{t:ac}=(0,o.useI18n)();(0,c.useEffect)(()=>{if(!a||x)return;let b=!1;return(0,t.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(a=>{if(b)return;let c=a["task.defaultUseWorktree"],d=a["task.defaultAutoStart"];"boolean"==typeof c&&Z(c),"boolean"==typeof d&&_(d)}).catch(()=>{}),()=>{b=!0}},[a,x]);let ad=!!x,ae=!!C;return(0,c.useEffect)(()=>{x?(H(x.title),J(x.description??""),L(x.priority),N(x.subPath??""),P(y??[]),ab(x.versionId??null)):(z?(H(z.title??""),J(z.description??""),L(z.priority??"MEDIUM"),N(z.subPath??""),P(z.labelIds??[])):(H(""),J(""),L("MEDIUM"),N(""),P([])),ab(E??null))},[x,y,z,E]),(0,c.useEffect)(()=>{a||x||(H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),X(!1),ab(E??null))},[a,x,E]),(0,c.useEffect)(()=>{a&&ae&&!x&&(T(!0),Promise.all([(0,p.getProjectBranches)(C),s(C)]).then(([a,b])=>{R(a);let c=z?.baseBranch??null;c&&a.includes(c)?V(c):V(b&&a.includes(b)?b:a[0]??""),T(!1),(0,q.fetchRemoteBranches)(C).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(C).then(a=>{R(a),V(b=>a.includes(b)?b:a[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{R([]),V(""),T(!1)}))},[a,ae,C,x,z]),(0,b.jsx)(d.Dialog,{open:a,onOpenChange:r,disablePointerDismissal:!0,children:(0,b.jsxs)(d.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(d.DialogHeader,{children:(0,b.jsx)(d.DialogTitle,{children:ad?ac("task.edit"):ac("task.create")})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"title",children:ac("task.title")}),(0,b.jsx)(f.Input,{id:"title","data-testid":"task-title",placeholder:ac("task.titlePlaceholder"),value:G,onChange:a=>H(a.target.value),onKeyDown:a=>"Enter"===a.key&&a.preventDefault()})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"description",children:ac("task.description")}),(0,b.jsx)(g.Textarea,{id:"description",placeholder:ac("task.descPlaceholder"),rows:4,value:I,onChange:a=>J(a.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"subPath",children:ac("task.subPath")}),(0,b.jsx)(f.Input,{id:"subPath",placeholder:ac("task.subPathPlaceholder"),value:M,onChange:a=>N(a.target.value)}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:ac("task.subPathHint")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.priority")}),(0,b.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(a=>{let c={LOW:{label:ac("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ac("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ac("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ac("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[a];return(0,b.jsx)("button",{type:"button",onClick:()=>L(a),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${K===a?`${c.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:c.label},a)})})]}),ae&&!ad&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.baseBranch")}),S?(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchLoading")}):Q.length>0?(0,b.jsxs)(m.Popover,{open:W,onOpenChange:X,children:[(0,b.jsxs)(m.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,b.jsx)(i.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:U||void 0,children:U||ac("task.branchNone")}),(0,b.jsx)(k.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,b.jsx)(m.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,b.jsxs)(n.Command,{children:[(0,b.jsx)(n.CommandInput,{placeholder:ac("task.branchSearch")}),(0,b.jsxs)(n.CommandList,{children:[(0,b.jsx)(n.CommandEmpty,{children:ac("task.branchNone")}),(0,b.jsx)(n.CommandGroup,{children:Q.map(a=>(0,b.jsxs)(n.CommandItem,{value:a,onSelect:()=>{V(a),X(!1)},children:[(0,b.jsx)(i.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,b.jsx)("span",{className:"flex-1 truncate font-mono",title:a,children:a}),a===U&&(0,b.jsx)(j.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},a))})]})]})})]}):(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchNone")}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.worktreeLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>Z(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Y===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.worktreeYes"):ac("task.worktreeNo")},String(a)))})]}),(0,b.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.autoStartLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>_(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${$===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.autoStartYes"):ac("task.autoStartNo")},String(a)))})]})]}),A.length>0&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.labels")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:A.map(a=>{let c=O.includes(a.id);return(0,b.jsx)("button",{type:"button",onClick:()=>{P(b=>c?b.filter(b=>b!==a.id):[...b,a.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${c?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:a.color+"20",color:a.color,borderColor:c?a.color+"40":"transparent",borderWidth:"1px"},children:a.name},a.id)})})]}),(!ad||D&&D.length>0)&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("version.picker.label")}),D&&D.length>0?(0,b.jsxs)(l.Select,{value:aa??"__none__",onValueChange:a=>ab("__none__"===a?null:a),children:[(0,b.jsx)(l.SelectTrigger,{children:(0,b.jsx)("span",{className:"truncate text-sm",children:aa&&(F=D.find(a=>a.id===aa))?F.isCurrent?`${F.number} \xb7 ${F.name} \xb7 ${ac("version.currentShort")}`:`${F.number} \xb7 ${F.name}`:ac("version.picker.none")})}),(0,b.jsxs)(l.SelectContent,{children:[(0,b.jsx)(l.SelectItem,{value:"__none__",children:ac("version.picker.none")}),D.map(a=>(0,b.jsx)(l.SelectItem,{value:a.id,children:a.isCurrent?`${a.number} \xb7 ${a.name} \xb7 ${ac("version.currentShort")}`:`${a.number} \xb7 ${a.name}`},a.id))]})]}):(0,b.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ac("version.picker.empty")})]})]}),(0,b.jsxs)(d.DialogFooter,{children:[(0,b.jsx)(e.Button,{variant:"outline",onClick:()=>r(!1),children:ac("common.cancel")}),(0,b.jsx)(e.Button,{onClick:()=>{G.trim()&&(ad&&v?v(x.id,{title:G,description:I,priority:K,labelIds:O,subPath:M.trim()||"",versionId:aa}):u({title:G,description:I,priority:K,status:w,labelIds:O,...ae&&Y&&U?{baseBranch:U}:{},...M.trim()?{subPath:M.trim()}:{},versionId:aa,autoStart:$}),H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),Z(!0),ab(null),r(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:ad?ac("common.save"):ac("common.create")})]})]})})}],445798)},532615,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(986099),e=a.i(54384),f=a.i(912868),g=a.i(10390),h=a.i(91756);let i=(0,a.i(711796).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var j=a.i(747798),k=a.i(951192);function l({children:a,onClick:c,title:d,disabled:e,...f}){return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||c()},title:d,disabled:e,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...f,children:a})}a.s(["ImageLightbox",0,function({imageUrl:a,filename:m,open:n,onOpenChange:o,assets:p,currentIndex:q,onIndexChange:r}){let{t:s}=(0,k.useI18n)(),[t,u]=(0,c.useState)(1),[v,w]=(0,c.useState)({x:0,y:0}),[x,y]=(0,c.useState)(!1),z=(0,c.useRef)(null),[A,B]=(0,c.useState)(!1),C=!!p&&p.length>1&&"number"==typeof q&&!!r,D=C&&q>0,E=C&&q<p.length-1,F=C?p.length:0,G=F>0?Math.ceil(F/10):0,H=C?Math.floor(q/10):0,I=10*H,J=Math.min(I+10,F),K=G>1,L=C&&H>0,M=C&&H<G-1;(0,c.useEffect)(()=>{B(!0)},[]),(0,c.useEffect)(()=>{u(1),w({x:0,y:0})},[a]),(0,c.useEffect)(()=>{if(!n)return;let a=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=a}},[n]);let N=(0,c.useCallback)(()=>o(!1),[o]),O=(0,c.useCallback)(()=>{C&&D&&r(q-1)},[C,D,r,q]),P=(0,c.useCallback)(()=>{C&&E&&r(q+1)},[C,E,r,q]),Q=(0,c.useCallback)(()=>{C&&L&&r((H-1)*10)},[C,L,r,H]),R=(0,c.useCallback)(()=>{C&&M&&r(Math.min((H+1)*10,F-1))},[C,M,r,H,F]),S=(0,c.useCallback)(()=>{u(a=>Math.min(8,1.25*a))},[]),T=(0,c.useCallback)(()=>{u(a=>{let b=Math.max(.1,a/1.25);return b<=1&&w({x:0,y:0}),b})},[]),U=(0,c.useCallback)(()=>{u(1),w({x:0,y:0})},[]);(0,c.useEffect)(()=>{if(!n)return;let a=a=>{switch(a.key){case"Escape":a.preventDefault(),N();break;case"ArrowLeft":C&&(a.preventDefault(),O());break;case"ArrowRight":C&&(a.preventDefault(),P());break;case"+":case"=":a.preventDefault(),S();break;case"-":case"_":a.preventDefault(),T();break;case"0":a.preventDefault(),U()}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n,C,N,O,P,S,T,U]);let V=(0,c.useRef)(!1),W=()=>{x&&y(!1),z.current=null},X=x?"cursor-grabbing":"cursor-grab";if(!n||!A)return null;let Y=(0,b.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":s("assets.lightbox.zoomFit"),children:[(0,b.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[m,C?` \xb7 ${q+1} / ${p.length}`:""]}),(0,b.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${X}`,onClick:a=>{a.target===a.currentTarget&&N()},onWheel:a=>{a.preventDefault();let b=-a.deltaY>0?1.25:.8;u(a=>{let c=Math.min(8,Math.max(.1,a*b));return c<=1&&w({x:0,y:0}),c})},children:a&&(0,b.jsx)("img",{src:a,alt:m,onClick:a=>{a.stopPropagation(),V.current&&(V.current=!1)},onPointerDown:a=>{0===a.button&&(a.stopPropagation(),V.current=!1,a.target.setPointerCapture?.(a.pointerId),z.current={x:a.clientX,y:a.clientY,panX:v.x,panY:v.y},y(!0))},onPointerMove:a=>{if(!z.current)return;let b=a.clientX-z.current.x,c=a.clientY-z.current.y;Math.abs(b)+Math.abs(c)>5&&(V.current=!0),x&&w({x:z.current.panX+b,y:z.current.panY+c})},onPointerUp:W,onPointerLeave:W,onPointerCancel:W,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${v.x}px, ${v.y}px, 0) scale(${t})`,transformOrigin:"center center",transition:x?"none":"transform 120ms ease-out",willChange:x?"transform":"auto"},draggable:!1})}),(0,b.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:a=>a.stopPropagation(),children:[C&&(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[K&&(0,b.jsx)(l,{onClick:Q,title:`${s("assets.lightbox.prev")} (-10)`,"aria-label":`${s("assets.lightbox.prev")} (-10)`,disabled:!L,children:(0,b.jsx)(h.ChevronsLeft,{className:"h-4 w-4"})}),(0,b.jsx)(l,{onClick:O,title:s("assets.lightbox.prev"),"aria-label":s("assets.lightbox.prev"),disabled:!D,children:(0,b.jsx)(f.ChevronLeft,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(I,J).map((a,c)=>{let d=I+c,e=d===q;return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||r(d)},title:a.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${e?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,b.jsx)("img",{src:a.url,alt:a.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},a.url+d)})}),(0,b.jsx)(l,{onClick:P,title:s("assets.lightbox.next"),"aria-label":s("assets.lightbox.next"),disabled:!E,children:(0,b.jsx)(g.ChevronRight,{className:"h-4 w-4"})}),K&&(0,b.jsx)(l,{onClick:R,title:`${s("assets.lightbox.next")} (+10)`,"aria-label":`${s("assets.lightbox.next")} (+10)`,disabled:!M,children:(0,b.jsx)(i,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,b.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*t),"%"]}),(0,b.jsx)(l,{onClick:U,title:s("assets.lightbox.reset"),"aria-label":s("assets.lightbox.reset"),disabled:1===t&&0===v.x&&0===v.y,children:(0,b.jsx)(j.RotateCcw,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,b.jsx)(l,{onClick:N,title:s("assets.lightbox.close"),"aria-label":s("assets.lightbox.close"),children:(0,b.jsx)(e.X,{className:"h-4 w-4"})})]})]})]});return(0,d.createPortal)(Y,document.body)}],532615)},894148,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(704494);a.i(757942);var e=a.i(950314),f=a.i(814574),g=a.i(951192);a.s(["TextPreviewDialog",0,function({url:a,filename:h,open:i,onOpenChange:j}){let{t:k}=(0,g.useI18n)(),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(null);(0,c.useEffect)(()=>{if(!i||!a){m(null),q(null);return}let b=!1;return o(!0),q(null),m(null),fetch(a).then(a=>{let b=a.headers.get("content-length");if(b&&parseInt(b,10)>1048576)throw Error("FILE_TOO_LARGE");return a.text()}).then(a=>{if(a.length>1048576)throw Error("FILE_TOO_LARGE");b||(m(a),o(!1))}).catch(a=>{b||(a instanceof Error&&"FILE_TOO_LARGE"===a.message?q(k("assets.fileTooLarge")):q(k("assets.previewError")),o(!1))}),()=>{b=!0}},[i,a,k]);let r=h.split(".").pop()?.toLowerCase();return(0,b.jsx)(f.Dialog,{open:i,onOpenChange:j,children:(0,b.jsxs)(f.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:h}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(n)return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,b.jsx)(d.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:k("assets.loadingPreview")})]});if(p)return(0,b.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===l)return null;if("md"===r)return(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(e.Streamdown,{children:l})});if("json"===r){let a;try{a=JSON.stringify(JSON.parse(l),null,2)}catch{a=l}return(0,b.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:a})}return(0,b.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:l})})()})]})})}])},161181,a=>{"use strict";let b=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);a.s(["isImageAsset",0,function(a,c){if(c?.startsWith("image/"))return!0;let d=a.split(".").pop()?.toLowerCase();return!!d&&b.has(d)},"localPathToApiUrl",0,function(a){let b=a.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return b?`/api/files/assets/${b[1]}/${b[2]}`:a}])},87339,a=>{"use strict";let b=(0,a.i(711796).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);a.s(["Paperclip",0,b],87339)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_0z7hp2l._.js.map
|