tower-studio 0.2.42 → 0.2.44
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/app-path-routes-manifest.json +1 -0
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +8 -0
- 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 +3 -3
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +35 -35
- package/.next/standalone/.next/server/app/_not-found/page.js +6 -6
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +3 -3
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js +2 -2
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js +3 -2
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +2 -2
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js +2 -2
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route.js +8 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js +3 -3
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +4 -4
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js +3 -3
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +4 -3
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +76 -76
- package/.next/standalone/.next/server/app/missions/page.js +6 -6
- package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +35 -35
- package/.next/standalone/.next/server/app/onboarding/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +35 -35
- package/.next/standalone/.next/server/app/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +52 -52
- package/.next/standalone/.next/server/app/settings/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +115 -115
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +98 -98
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +85 -85
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +81 -81
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +35 -35
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +7 -7
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +77 -77
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +6 -6
- 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 +4 -4
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +91 -91
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +58 -58
- package/.next/standalone/.next/server/app/workspaces/page.js +6 -6
- 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/app-paths-manifest.json +1 -0
- package/.next/standalone/.next/server/chunks/{_0keginv._.js → 0se9_next_0cuhhky._.js} +3 -3
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0gr2wxq.js +3 -0
- package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_terminal_[taskId]_paste-image_route_actions_0iegbi4.js +3 -0
- package/.next/standalone/.next/server/chunks/[externals]__0x_wqa7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.p6em~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.zmhk-._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0042hx5._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0b3m.jm._.js → [root-of-the-server]__03ufxqq._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04--bs7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04m2l8a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04r193~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0657y50._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06ndn7a._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08yqoti._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__098.3z2._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__09arklv._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0obk~80._.js → [root-of-the-server]__0_d.s7s._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0askhfg._.js → [root-of-the-server]__0_zfnj0._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0xswbi9._.js → [root-of-the-server]__0clptds._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ai09na._.js → [root-of-the-server]__0g.k9o~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0i34gbs._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iggiij._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0i~3dwq._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j1px8f._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0k-5ag7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l1-djp._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0-~q463._.js → [root-of-the-server]__0lvlooo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0otyifi._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pl.c5.._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0r~9.7c._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t31ba_._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_weyi._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__06qz5fz._.js → [root-of-the-server]__0uptkzd._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0x3kws1._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xot7fu._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0~6py0f._.js → [root-of-the-server]__0y8w5di._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zi3~a8._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~g6-c~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10fv6tt._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1189rd1._.js +4 -0
- package/.next/standalone/.next/server/chunks/{_06.mxka._.js → _0jmdgq~._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{_0aflzks._.js → _0q10iet._.js} +1 -1
- package/.next/standalone/.next/server/chunks/_0qk_esg._.js +1 -1
- package/.next/standalone/.next/server/chunks/{_0b~hjvi._.js → _12537g8._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{src_07gek7k._.js → src_0fq3zjg._.js} +2 -2
- package/.next/standalone/.next/server/chunks/src_0weytpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/{src_0mqkaid._.js → src_0wlyw0g._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{src_02ruq-1._.js → src_0~ey84y._.js} +2 -2
- package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +2 -2
- 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]__0mmypbn._.js → [root-of-the-server]__00ebsjb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dsaqeq._.js → [root-of-the-server]__01fmnse._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01vm_46._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__025ol9g._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__049n47u._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__094t44p._.js → [root-of-the-server]__04ednzb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.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]__0pmjob9._.js → [root-of-the-server]__06dfcgo._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__038u_kv._.js → [root-of-the-server]__07xkj1s._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0h-se8t._.js → [root-of-the-server]__081e5n~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08tzbfh._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.infp2._.js → [root-of-the-server]__0_z5hke._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ce3fpq._.js → [root-of-the-server]__0ecd_1d._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10s67lq._.js → [root-of-the-server]__0iln7n_._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09z_ddd._.js → [root-of-the-server]__0j_-qk5._.js} +1 -1
- 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]__0.u-t.1._.js → [root-of-the-server]__0k6oo0n._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0h589~0._.js → [root-of-the-server]__0lws68d._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0oq-j16._.js → [root-of-the-server]__0oamph.._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0pvaj~l._.js → [root-of-the-server]__0pnv7nd._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__03fujv7._.js → [root-of-the-server]__0tja~wz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0391jsv._.js → [root-of-the-server]__0ug022w._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ugledi._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0whlq2_._.js → [root-of-the-server]__0vxlsec._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w0.sdz._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0l6bt9t._.js → [root-of-the-server]__0x6k.ee._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__058rbx5._.js → [root-of-the-server]__0xwzk2.._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__12w35bx._.js → [root-of-the-server]__0yby8pl._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0rckee~._.js → [root-of-the-server]__0zxc81t._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02j1enz._.js → [root-of-the-server]__0zzqn5z._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0mq0f94._.js → [root-of-the-server]__10c.a3u._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.2h0ux._.js → [root-of-the-server]__10n3vn6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09t~p.u._.js → [root-of-the-server]__123rmyb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__124zb~p._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dux7x.._.js → [root-of-the-server]__127w3bm._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0odeai5._.js → [root-of-the-server]__13ce7v2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0axcfvf._.js → _02vz78l._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0c2gong._.js → _04~mjmb._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_03lt1_x._.js → _05a2u03._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_09z2zmm._.js → _060e1u.._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0n4bq0m._.js → _07lq-bp._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0p6p_68._.js → _07q06~v._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0mm~wxj._.js → _08-x_rp._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_08bq4g8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0~oc5bl._.js → _0_nhdgs._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_12ca88g._.js → _0_q41~z._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0u7c6bz._.js → _0dxbp89._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0rq68d8._.js → _0foto06._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0_5abui._.js → _0i4xdso._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0n5do.z._.js → _0j5.ig_._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0m.wslt._.js → _0kojxno._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0py1s-f._.js → _0nze-e6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0u.n7v8._.js → _0r4_qn~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0q2mf9q._.js → _0rtydyv._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rxeqmo._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_04bt0.3._.js → _0s.h4l2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0tvm5af._.js → _0s.ik0k._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0f~l8kv._.js → _0u3yt.5._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_04~zqvy._.js → _0wqcz3w._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0whlnt7._.js → _0ye1-r-._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_116-_2z._.js → _0zr81mw._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0rrzd20._.js → _113957g._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0o2tntr._.js → _11osha9._.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/chunks/ssr/{src_lib_0_9avpk._.js → src_lib_0.~.oo-._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_08wv1le._.js → src_lib_005uqbe._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_02~3_5t._.js → src_lib_00wjv6n._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_04d~c.c._.js → src_lib_01sr8_t._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_08jql1e._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0b~j-9d._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0eymyjf._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0fkv9z3._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0n-n0.a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0sgt~lv._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0x-iyl1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0yjmty1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_13aevv6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js +1 -1
- package/.next/standalone/.next/server/functions-config-manifest.json +1 -0
- 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 +327 -327
- package/.next/standalone/.next/static/chunks/0-tuek2jqf0el.js +1 -0
- package/.next/standalone/.next/static/chunks/0.-.jc~0b~hy0.js +1 -0
- package/.next/standalone/.next/static/chunks/{0.onaugl2w8ci.js → 0.~03w.uxge40.js} +1 -1
- package/.next/standalone/.next/static/chunks/01hdj_kw4z2zq.js +2 -0
- package/.next/standalone/.next/static/chunks/01j9m895w64zn.js +1 -0
- package/.next/standalone/.next/static/chunks/{040j8d.w8mkyn.js → 0346xrw6i2bwo.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0x-ug4iz~~qr2.js → 041o.dh2lc-k3.js} +1 -1
- package/.next/standalone/.next/static/chunks/07i9j5yyg4vs3.js +1 -0
- package/.next/standalone/.next/static/chunks/{0bdwzhoelky9-.js → 08ooaq~-.8fzu.js} +1 -1
- package/.next/standalone/.next/static/chunks/{13.3woq55msp..js → 0bylodlncwfpb.js} +1 -1
- package/.next/standalone/.next/static/chunks/0cpwtqzrjdgvs.js +1 -0
- package/.next/standalone/.next/static/chunks/0c~e1-nst-ze-.js +1 -0
- package/.next/standalone/.next/static/chunks/0ddt-snh45031.js +1 -0
- package/.next/standalone/.next/static/chunks/{0ypd9eqm_pj-o.js → 0dv4anj-j523o.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0.wxa05y455w7.js → 0gvfb.b8m_i8t.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0dewfthzwmcwb.js → 0h77-u2vvr-a1.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0_d04kox03m72.css → 0jrje~1gt6w85.css} +1 -1
- package/.next/standalone/.next/static/chunks/{0m~m1~si.ot17.js → 0lqp~-dlfenad.js} +1 -1
- package/.next/standalone/.next/static/chunks/0qkr26yz3bocs.js +1 -0
- package/.next/standalone/.next/static/chunks/{035a_v6g7ioyw.js → 0rcuiuax31_uh.js} +1 -1
- package/.next/standalone/.next/static/chunks/0uf~7eqel0zra.js +1 -0
- package/.next/standalone/.next/static/chunks/{0rozlwh3y46l0.js → 0uj-3ckujwaiy.js} +1 -1
- package/.next/standalone/.next/static/chunks/0w71r_sj_fibx.js +1 -0
- package/.next/standalone/.next/static/chunks/0xejm4ge9~cn..js +1 -0
- package/.next/standalone/.next/static/chunks/{02f8-ju2se8qw.js → 0xg6rcq6g4bbh.js} +1 -1
- package/.next/standalone/.next/static/chunks/0yff8rwmrl5m4.js +1 -0
- package/.next/standalone/.next/static/chunks/{0wcwdbtpm0~r6.js → 0ymipmkk2uqby.js} +1 -1
- package/.next/standalone/.next/static/chunks/0znfclapbniaa.js +1 -0
- package/.next/standalone/.next/static/chunks/{17fug-zaik-v~.js → 11pe3kpxuj33f.js} +1 -1
- package/.next/standalone/.next/static/chunks/172s9cg35qt7i.js +1 -0
- package/.next/standalone/.next/static/chunks/184-zu89wwa4u.js +1 -0
- package/.next/standalone/package.json +9 -9
- package/dist/mcp-server.cjs +152 -76
- package/next.config.ts +4 -0
- package/package.json +9 -9
- package/skills/tower/SKILL.md +6 -0
- package/.next/standalone/.next/server/chunks/[externals]__0izylsq._.js +0 -3
- package/.next/standalone/.next/server/chunks/[externals]__0m6hc.0._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.tbb~k._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__032d9pl._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04jduyo._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05zlbau._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05~g1fm._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__075f7rs._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08b~~wj._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bo_6v~._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c7z.~a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e~6fr~._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fey.8j._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fxmnch._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gr~8aq._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0hd.0to._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j3l3l4._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0r-6wmj._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rpck4h._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0skk0fd._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_yyy8._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0v2nkck._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z20rmt._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11l3gud._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__126b53k._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.-z9ts._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__045k323._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__087pocz._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0c2mh1c._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gt5dbj._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ni-_7_._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y~ooou._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0a60u40._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0fu5szn._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0gve57o._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0koe0p0._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0qdh-v4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0ramp4w._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0sn1z-s._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0x6grav._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_110am8v._.js +0 -3
- package/.next/standalone/.next/static/chunks/0-efd~h5j2ufi.js +0 -1
- package/.next/standalone/.next/static/chunks/0.z171pzeg-.7.js +0 -1
- package/.next/standalone/.next/static/chunks/01zlxs4rl~h_o.js +0 -1
- package/.next/standalone/.next/static/chunks/0af7afat3acfx.js +0 -1
- package/.next/standalone/.next/static/chunks/0ais32-8.3wlj.js +0 -1
- package/.next/standalone/.next/static/chunks/0f43x~jzb70f4.js +0 -1
- package/.next/standalone/.next/static/chunks/0i-x__600fys6.js +0 -1
- package/.next/standalone/.next/static/chunks/0l25d0nc5ygyd.js +0 -1
- package/.next/standalone/.next/static/chunks/0lyq0-a32.15m.js +0 -1
- package/.next/standalone/.next/static/chunks/0t8lz62rmr801.js +0 -2
- package/.next/standalone/.next/static/chunks/0utrquxfg25b2.js +0 -1
- package/.next/standalone/.next/static/chunks/0wcdxs4sl-gjf.js +0 -1
- package/.next/standalone/.next/static/chunks/0xj6v_80hlyv0.js +0 -1
- package/.next/standalone/.next/static/chunks/0xl7h5fsfc7zk.js +0 -1
- package/.next/standalone/.next/static/chunks/115ae91fq~slq.js +0 -1
- package/.next/standalone/.next/static/chunks/13rq33eiffqaz.js +0 -1
- /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → dinNvsaC6aoPK_B7ZTeBv}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → dinNvsaC6aoPK_B7ZTeBv}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → dinNvsaC6aoPK_B7ZTeBv}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,967489,338973,e=>{"use strict";var t=e.i(289721);e.s([],648333),e.i(648333);var r=e.i(965652),n=e.i(416369),l=e.i(362891),o=e.i(903224),i=e.i(528796),s=e.i(314757),a=e.i(804849),u=e.i(887642),c=e.i(20746),d=e.i(812901),p=e.i(956741),f=e.i(430557),m=e.i(594640),g=e.i(592604),h=e.i(306296),v=e.i(234951),S=e.i(471959);e.i(708878);var b=e.i(462902);let x=r.createContext(null),y=r.createContext(null);function w(){let e=r.useContext(x);if(null===e)throw Error((0,b.default)(60));return e}function E(){let e=r.useContext(y);if(null===e)throw Error((0,b.default)(61));return e}var R=e.i(890514),M=e.i(103353),I=e.i(193214),A=e.i(596290);let C=(e,t)=>Object.is(e,t);function T(e,t,r){return null==e||null==t?Object.is(e,t):r(e,t)}function P(e,t,r){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&T(e,t,r)):-1}function j(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function V(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function L(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?j(e.value):j(e)}function k(e,t,r){function n(){if(r&&null!=e)return r(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return j(e)}if(r&&null!=e)return r(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??n();if(Array.isArray(t)){let r=V(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:n()}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return n()}let O={id:(0,A.createSelector)(e=>e.id),labelId:(0,A.createSelector)(e=>e.labelId),modal:(0,A.createSelector)(e=>e.modal),multiple:(0,A.createSelector)(e=>e.multiple),items:(0,A.createSelector)(e=>e.items),itemToStringLabel:(0,A.createSelector)(e=>e.itemToStringLabel),itemToStringValue:(0,A.createSelector)(e=>e.itemToStringValue),isItemEqualToValue:(0,A.createSelector)(e=>e.isItemEqualToValue),value:(0,A.createSelector)(e=>e.value),hasSelectedValue:(0,A.createSelector)(e=>{let{value:t,multiple:r,itemToStringValue:n}=e;return null!=t&&(r&&Array.isArray(t)?t.length>0:""!==L(t,n))}),hasNullItemLabel:(0,A.createSelector)((e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(V(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}(e.items)),open:(0,A.createSelector)(e=>e.open),mounted:(0,A.createSelector)(e=>e.mounted),forceMount:(0,A.createSelector)(e=>e.forceMount),transitionStatus:(0,A.createSelector)(e=>e.transitionStatus),openMethod:(0,A.createSelector)(e=>e.openMethod),activeIndex:(0,A.createSelector)(e=>e.activeIndex),selectedIndex:(0,A.createSelector)(e=>e.selectedIndex),isActive:(0,A.createSelector)((e,t)=>e.activeIndex===t),isSelected:(0,A.createSelector)((e,t,r)=>{let n=e.isItemEqualToValue,l=e.value;return e.multiple?Array.isArray(l)&&l.some(e=>T(r,e,n)):e.selectedIndex===t&&null!==e.selectedIndex||T(r,l,n)}),isSelectedByFocus:(0,A.createSelector)((e,t)=>e.selectedIndex===t),popupProps:(0,A.createSelector)(e=>e.popupProps),triggerProps:(0,A.createSelector)(e=>e.triggerProps),triggerElement:(0,A.createSelector)(e=>e.triggerElement),positionerElement:(0,A.createSelector)(e=>e.positionerElement),listElement:(0,A.createSelector)(e=>e.listElement),scrollUpArrowVisible:(0,A.createSelector)(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:(0,A.createSelector)(e=>e.scrollDownArrowVisible),hasScrollArrows:(0,A.createSelector)(e=>e.hasScrollArrows)};var D=e.i(67077),U=e.i(586622),N=e.i(504068),H=e.i(571870),F=e.i(421689),B=e.i(954588),z=e.i(353052),_=e.i(892069),Y=e.i(565455),$=e.i(581263),q=e.i(551974),W=e.i(397791);let K=r.forwardRef(function(e,t){let{render:r,className:n,...l}=e;delete l.id;let o=(0,R.useFieldRootContext)(),{store:i}=w(),s=(0,d.useStore)(i,O.triggerElement),a=(0,d.useStore)(i,O.id),u=null==a?void 0:`${a}-label`,c=(0,W.useLabel)({id:u,fallbackControlId:s?.id??a,setLabelId(e){i.set("labelId",e)}});return(0,$.useRenderElement)("div",e,{ref:t,state:o.state,props:[c,l],stateAttributesMapping:q.fieldValidityMapping})});var X=e.i(102094),G=e.i(161476),J=e.i(179279),Q=e.i(845756),Z=e.i(748299),ee=e.i(682354),et=e.i(282109);let er={...Q.pressableTriggerOpenStateMapping,...q.fieldValidityMapping,value:()=>null},en=r.forwardRef(function(e,t){let{render:n,className:o,id:i,disabled:s=!1,nativeButton:a=!0,...p}=e,{setTouched:f,setFocused:m,validationMode:g,state:h,disabled:v}=(0,R.useFieldRootContext)(),{labelId:S}=(0,J.useLabelableContext)(),{store:b,setOpen:x,selectionRef:y,validation:E,readOnly:I,required:A,alignItemWithTriggerActiveRef:C,disabled:T,keyboardActiveRef:P}=w(),j=v||T||s,V=(0,d.useStore)(b,O.open),L=(0,d.useStore)(b,O.value),k=(0,d.useStore)(b,O.triggerProps),N=(0,d.useStore)(b,O.positionerElement),H=(0,d.useStore)(b,O.listElement),F=(0,d.useStore)(b,O.id),B=(0,d.useStore)(b,O.labelId),z=(0,d.useStore)(b,O.hasSelectedValue),_=!z&&V,q=(0,d.useStore)(b,O.hasNullItemLabel,_),W=i??F;(0,M.useLabelableId)({id:W});let K=(0,c.useValueAsRef)(N),Q=r.useRef(null),{getButtonProps:en,buttonRef:el}=(0,et.useButton)({disabled:j,native:a}),eo=(0,u.useStableCallback)(e=>{b.set("triggerElement",e)}),ei=(0,l.useMergedRefs)(t,Q,el,eo),es=(0,G.useTimeout)(),ea=(0,G.useTimeout)(),eu=(0,G.useTimeout)(),ec=(0,G.useTimeout)();r.useEffect(()=>{if(V)return z||q?ec.start(200,()=>{y.current.allowUnselectedMouseUp=!0,eu.start(200,()=>{y.current.allowSelectedMouseUp=!0})}):eu.start(400,()=>{y.current.allowUnselectedMouseUp=!0,y.current.allowSelectedMouseUp=!0}),()=>{eu.clear(),ec.clear()};y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ea.clear()},[V,z,q,y,ea,eu,ec]);let ed=r.useMemo(()=>H?.id??(0,ee.getFloatingFocusElement)(N)?.id,[H,N]),ep=(0,Y.mergeProps)(k,{id:W,role:"combobox","aria-expanded":V?"true":"false","aria-haspopup":"listbox","aria-controls":V?ed:void 0,"aria-labelledby":S??B,"aria-readonly":I||void 0,"aria-required":A||void 0,tabIndex:j?-1:0,ref:ei,onFocus(e){m(!0),V&&C.current&&x(!1,(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent)),es.start(0,()=>{b.set("forceMount",!0)})},onBlur(e){(0,ee.contains)(N,e.relatedTarget)||(f(!0),m(!1),"onBlur"===g&&E.commit(L))},onPointerMove(){P.current=!1},onKeyDown(){P.current=!0},onMouseDown(e){if(V)return;let t=(0,X.ownerDocument)(e.currentTarget);function r(e){if(!Q.current)return;let t=e.target;if((0,ee.contains)(Q.current,t)||(0,ee.contains)(K.current,t)||t===Q.current)return;let r=(0,Z.getPseudoElementBounds)(Q.current);e.clientX>=r.left-2&&e.clientX<=r.right+2&&e.clientY>=r.top-2&&e.clientY<=r.bottom+2||x(!1,(0,D.createChangeEventDetails)(U.REASONS.cancelOpen,e))}ea.start(0,()=>{t.addEventListener("mouseup",r,{once:!0})})}},E.getValidationProps,p,en);ep.role="combobox";let ef={...h,open:V,disabled:j,value:L,readOnly:I,placeholder:!z};return(0,$.useRenderElement)("button",e,{ref:[t,Q],state:ef,stateAttributesMapping:er,props:ep})}),el={value:()=>null},eo=r.forwardRef(function(e,n){let{className:l,render:o,children:i,placeholder:s,...a}=e,{store:u,valueRef:c}=w(),p=(0,d.useStore)(u,O.value),f=(0,d.useStore)(u,O.items),m=(0,d.useStore)(u,O.itemToStringLabel),g=(0,d.useStore)(u,O.hasSelectedValue),h=(0,d.useStore)(u,O.hasNullItemLabel,!g&&null!=s&&null==i),v=null;if("function"==typeof i)v=i(p);else if(null!=i)v=i;else if(g||null==s||h)if(Array.isArray(p))v=p.reduce((e,n,l)=>(l>0&&e.push(", "),e.push((0,t.jsx)(r.Fragment,{children:k(n,f,m)},l)),e),[]);else v=k(p,f,m);else v=s;return(0,$.useRenderElement)("span",e,{state:{value:p,placeholder:!g},ref:[n,c],props:[{children:v},a],stateAttributesMapping:el})}),ei=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open);return(0,$.useRenderElement)("span",e,{state:{open:i},ref:t,props:[{"aria-hidden":!0,children:"▼"},l],stateAttributesMapping:Q.triggerOpenStateMapping})});var es=e.i(888393);let ea=r.createContext(void 0),eu=r.forwardRef(function(e,r){let{store:n}=w(),l=(0,d.useStore)(n,O.mounted),o=(0,d.useStore)(n,O.forceMount);return l||o?(0,t.jsx)(ea.Provider,{value:!0,children:(0,t.jsx)(es.FloatingPortal,{ref:r,...e})}):null});var ec=e.i(809058);let ed={...Q.popupStateMapping,...ec.transitionStatusMapping},ep=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open),s=(0,d.useStore)(o,O.mounted),a=(0,d.useStore)(o,O.transitionStatus);return(0,$.useRenderElement)("div",e,{state:{open:i,transitionStatus:a},ref:t,props:[{role:"presentation",hidden:!s,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:ed})});var ef=e.i(831766),em=e.i(620163),eg=e.i(579028),eh=e.i(887943);let ev=r.createContext(void 0);function eS(){let e=r.useContext(ev);if(!e)throw Error((0,b.default)(59));return e}var eb=e.i(72287),ex=e.i(693354),ey=e.i(808754);function ew(e,t){e&&Object.assign(e.style,t)}let eE={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},eR={position:"fixed"},eM=r.forwardRef(function(e,n){let{anchor:l,positionMethod:o="absolute",className:i,render:s,side:c="bottom",align:p="center",sideOffset:f=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:h,arrowPadding:v=5,sticky:S=!1,disableAnchorTracking:b,alignItemWithTrigger:x=!0,collisionAvoidance:y=ex.DROPDOWN_COLLISION_AVOIDANCE,...R}=e,{store:M,listRef:I,labelsRef:A,alignItemWithTriggerActiveRef:C,selectedItemTextRef:j,valuesRef:V,initialValueRef:L,popupRef:k,setValue:N}=w(),H=E(),F=(0,d.useStore)(M,O.open),B=(0,d.useStore)(M,O.mounted),z=(0,d.useStore)(M,O.modal),_=(0,d.useStore)(M,O.value),Y=(0,d.useStore)(M,O.openMethod),q=(0,d.useStore)(M,O.positionerElement),W=(0,d.useStore)(M,O.triggerElement),K=(0,d.useStore)(M,O.isItemEqualToValue),X=(0,d.useStore)(M,O.transitionStatus),G=r.useRef(null),J=r.useRef(null),[Z,ee]=r.useState(x),et=B&&Z&&"touch"!==Y;B||Z===x||ee(x),(0,a.useIsoLayoutEffect)(()=>{!B&&(O.scrollUpArrowVisible(M.state)&&M.set("scrollUpArrowVisible",!1),O.scrollDownArrowVisible(M.state)&&M.set("scrollDownArrowVisible",!1))},[M,B]),r.useImperativeHandle(C,()=>et),(0,em.useScrollLock)((et||z)&&F&&"touch"!==Y,W);let er=(0,eh.useAnchorPositioning)({anchor:l,floatingRootContext:H,positionMethod:o,mounted:B,side:c,sideOffset:f,align:p,alignOffset:m,arrowPadding:v,collisionBoundary:g,collisionPadding:h,sticky:S,disableAnchorTracking:b??et,collisionAvoidance:y,keepMounted:!0}),en=et?"none":er.side,el=et?eR:er.positionerStyles,eo=r.useMemo(()=>{let e={};return F||(e.pointerEvents="none"),{role:"presentation",hidden:!B,style:{...el,...e}}},[F,B,el]),ei={open:F,side:en,align:er.align,anchorHidden:er.anchorHidden},es=(0,u.useStableCallback)(e=>{M.set("positionerElement",e)}),ea=(0,$.useRenderElement)("div",e,{ref:[n,es],state:ei,stateAttributesMapping:Q.popupStateMapping,props:[eo,(0,ey.getDisabledMountTransitionStyles)(X),R]}),eu=r.useRef(0),ec=(0,u.useStableCallback)(e=>{if(0===e.size&&0===eu.current||0===V.current.length)return;let t=eu.current;if(eu.current=e.size,e.size===t)return;let r=(0,D.createChangeEventDetails)(U.REASONS.none);if(0!==t&&!M.state.multiple&&null!==_&&-1===P(V.current,_,K)){let e=L.current,t=null!=e&&-1!==P(V.current,e,K)?e:null;N(t,r),null===t&&(M.set("selectedIndex",null),j.current=null)}if(0!==t&&M.state.multiple&&Array.isArray(_)){let e=_.filter(e=>-1!==P(V.current,e,K));(e.length!==_.length||e.some(e=>!(_&&0!==_.length&&_.some(t=>void 0!==t&&T(e,t,K)))))&&(N(e,r),0===e.length&&(M.set("selectedIndex",null),j.current=null))}if(F&&et){M.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:""};ew(q,e),ew(k.current,e)}}),ed=r.useMemo(()=>({...er,side:en,alignItemWithTriggerActive:et,setControlledAlignItemWithTrigger:ee,scrollUpArrowRef:G,scrollDownArrowRef:J}),[er,en,et,ee]);return(0,t.jsx)(eg.CompositeList,{elementsRef:I,labelsRef:A,onMapChange:ec,children:(0,t.jsxs)(ev.Provider,{value:ed,children:[B&&z&&(0,t.jsx)(eb.InternalBackdrop,{inert:(0,ef.inertValue)(!F),cutout:W}),ea]})})});var eI=e.i(585012),eA=e.i(641645),eC=e.i(442383),eT=e.i(285182);function eP(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var ej=e.i(946467),eV=e.i(11931),eL=e.i(278928),ek=e.i(685668),eO=e.i(196368),eD=e.i(197920),eU=e.i(867467),eN=e.i(743945);let eH={...Q.popupStateMapping,...ec.transitionStatusMapping},eF=r.forwardRef(function(e,n){let{render:l,className:o,finalFocus:i,...s}=e,{store:c,popupRef:p,onOpenChangeComplete:f,setOpen:m,valueRef:g,selectedItemTextRef:h,keyboardActiveRef:v,multiple:S,handleScrollArrowVisibility:b,scrollHandlerRef:x,highlightItemOnHover:y}=w(),{side:R,align:M,alignItemWithTriggerActive:I,setControlledAlignItemWithTrigger:A,scrollDownArrowRef:C,scrollUpArrowRef:T}=eS(),P=null!=(0,eO.useToolbarRootContext)(!0),j=E(),{nonce:V,disableStyleElements:L}=(0,eN.useCSPContext)(),k=(0,G.useTimeout)(),H=(0,d.useStore)(c,O.id),F=(0,d.useStore)(c,O.open),B=(0,d.useStore)(c,O.mounted),z=(0,d.useStore)(c,O.popupProps),_=(0,d.useStore)(c,O.transitionStatus),Y=(0,d.useStore)(c,O.triggerElement),q=(0,d.useStore)(c,O.positionerElement),W=(0,d.useStore)(c,O.listElement),K=r.useRef(0),J=r.useRef(!1),Q=r.useRef(0),Z=r.useRef(!1),ee=r.useRef({}),et=(0,ej.useAnimationFrame)(),er=(0,u.useStableCallback)(e=>{if(!q||!p.current||!Z.current)return;if(J.current||!I)return void b();let t="0px"===q.style.top,r="0px"===q.style.bottom,n=q.getBoundingClientRect().height,l=(0,X.ownerDocument)(q),o=getComputedStyle(q),i=parseFloat(o.marginTop),s=parseFloat(o.marginBottom),a=eB(getComputedStyle(p.current)),u=Math.min(l.documentElement.clientHeight-i-s,a),c=e.scrollTop,d=ez(e),f=0,m=null,g=!1,h=!1,v=e=>{q.style.height=`${e}px`},S=(t,r)=>{let l=(0,eU.clamp)(t,0,u-n);l>0&&v(n+l),e.scrollTop=r,u-(n+l)<=1&&(J.current=!0),b()};if(t){let e=d-c,t=Math.min(n+e,u);if(f=t,e<=1)return void S(e,d);u-t>1?h=!0:g=!0}else if(r){let e=n+c,t=Math.min(e,u);if(f=t,c<=1)return void S(c,0);u-t>1?m=0:(g=!0,c<d&&(m=c-(c-(e-u))))}if(0!==(f=Math.ceil(f))&&v(f),h||null!=m){let t=ez(e),r=h?t:(0,eU.clamp)(m,0,t);Math.abs(e.scrollTop-r)>1&&(e.scrollTop=r)}(g||f>=u-1)&&(J.current=!0),b()});r.useImperativeHandle(x,()=>er,[er]),(0,N.useOpenChangeComplete)({open:F,ref:p,onComplete(){F&&f?.(!0)}}),(0,a.useIsoLayoutEffect)(()=>{q&&p.current&&!Object.keys(ee.current).length&&(ee.current={top:q.style.top||"0",left:q.style.left||"0",right:q.style.right,height:q.style.height,bottom:q.style.bottom,minHeight:q.style.minHeight,maxHeight:q.style.maxHeight,marginTop:q.style.marginTop,marginBottom:q.style.marginBottom})},[p,q]),(0,a.useIsoLayoutEffect)(()=>{F||I||(Z.current=!1,J.current=!1,K.current=0,Q.current=0,ew(q,ee.current))},[F,I,q,p]),(0,a.useIsoLayoutEffect)(()=>{let e=p.current;if(F&&Y&&q&&e&&"ending"!==c.state.transitionStatus){if(!I){Z.current=!0,et.request(b),e.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{let t=function(e){let{style:t}=e,r={};for(let[e,n]of eY)r[e]=t.getPropertyValue(e),t.setProperty(e,n,"important");return()=>{for(let[e]of eY){let n=r[e];n?t.setProperty(e,n):t.removeProperty(e)}}}(e);e.style.removeProperty("--transform-origin");try{var r;let t,n=getComputedStyle(q),l=getComputedStyle(e),o=(0,X.ownerDocument)(Y),i=(0,eT.ownerWindow)(q),s=(r=Y,eL.platform.getScale(r)),a=e_(Y.getBoundingClientRect(),s),u=e_(q.getBoundingClientRect(),s),c=a.left,d=a.height,p=W||e,f=p.scrollHeight,m=parseFloat(l.borderBottomWidth),v=parseFloat(n.marginTop)||10,S=parseFloat(n.marginBottom)||10,x=parseFloat(n.minHeight)||100,y=eB(l),w=o.documentElement.clientHeight-v-S,E=o.documentElement.clientWidth,R=w-a.bottom+d,M=h.current,I=g.current,C=0,T=0;if(M&&I){let e=e_(I.getBoundingClientRect(),s);t=e_(M.getBoundingClientRect(),s);let r=e.left-c,n=t.left-u.left,l=e.top-a.top+e.height/2,o=t.top-u.top+t.height/2;C=r-n,T=o-l}let P=R+T+S+m,j=Math.min(w,P),V=w-v-S,L=P-j,k=Math.max(5,c+C),O=Math.max(0,k+u.width-(E-5));q.style.left=`${k-O}px`,q.style.height=`${j}px`,q.style.maxHeight="auto",q.style.marginTop=`${v}px`,q.style.marginBottom=`${S}px`,e.style.height="100%";let D=ez(p),U=L>=D-1;U&&(j=Math.min(w,u.height)-(L-D));let N=a.top<20||a.bottom>w-20||Math.ceil(j)+1<Math.min(f,x),H=(i.visualViewport?.scale??1)!==1&&eC.isWebKit;if(N||H){Z.current=!0,ew(q,ee.current),eI.flushSync(()=>A(!1));return}if(U){let e=Math.max(0,w-P);q.style.top=u.height>=V?"0":`${e}px`,q.style.height=`${j}px`,p.scrollTop=ez(p),K.current=Math.max(x,j)}else q.style.bottom="0",K.current=Math.max(x,j),p.scrollTop=L;if(t){let r=u.top,n=u.height,l=t.top+t.height/2,o=(0,eU.clamp)(n>0?(l-r)/n*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${o}%`)}(K.current===w||j>=y)&&(J.current=!0),b(),setTimeout(()=>{Z.current=!0})}finally{t()}})}},[c,F,q,Y,g,h,p,b,I,A,et,C,T,W]),r.useEffect(()=>{if(!I||!q||!F)return;let e=(0,eT.ownerWindow)(q);function t(e){m(!1,(0,D.createChangeEventDetails)(U.REASONS.windowResize,e))}return e.addEventListener("resize",t),()=>{e.removeEventListener("resize",t)}},[m,I,q,F]);let en={...W?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${H}-list`},onKeyDown(e){v.current=!0,P&&eD.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},onMouseMove(){v.current=!1},onPointerLeave(e){if(!y||eP(e)||"touch"===e.pointerType)return;let t=e.currentTarget;k.start(0,()=>{c.set("activeIndex",null),t.focus({preventScroll:!0})})},onScroll(e){W||er(e.currentTarget)},...I&&{style:W?{height:"100%"}:eE}},el=(0,$.useRenderElement)("div",e,{ref:[n,p],state:{open:F,transitionStatus:_,side:R,align:M},stateAttributesMapping:eH,props:[z,en,(0,ey.getDisabledMountTransitionStyles)(_),{className:!W&&I?ek.styleDisableScrollbar.className:void 0},s]});return(0,t.jsxs)(r.Fragment,{children:[!L&&ek.styleDisableScrollbar.getElement(V),(0,t.jsx)(eV.FloatingFocusManager,{context:j,modal:!1,disabled:!B,returnFocus:i,restoreFocus:!0,children:el})]})});function eB(e){let t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function ez(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function e_(e,t){return(0,eA.rectToClientRect)({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}let eY=[["transform","none"],["scale","1"],["translate","0 0"]],e$=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o,scrollHandlerRef:i}=w(),{alignItemWithTriggerActive:s}=eS(),a=(0,d.useStore)(o,O.hasScrollArrows),c=(0,d.useStore)(o,O.openMethod),p=(0,d.useStore)(o,O.multiple),f=(0,d.useStore)(o,O.id),m={id:`${f}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(e){i.current?.(e.currentTarget)},...s&&{style:eE},className:a&&"touch"!==c?ek.styleDisableScrollbar.className:void 0},g=(0,u.useStableCallback)(e=>{o.set("listElement",e)});return(0,$.useRenderElement)("div",e,{ref:[t,g],props:[m,l]})});var eq=e.i(655728);let eW=r.createContext(void 0);function eK(){let e=r.useContext(eW);if(!e)throw Error((0,b.default)(57));return e}let eX=r.memo(r.forwardRef(function(e,n){let{render:l,className:o,value:i=null,label:s,disabled:u=!1,nativeButton:p=!1,...f}=e,m=r.useRef(null),g=(0,eq.useCompositeListItem)({label:s,textRef:m,indexGuessBehavior:eq.IndexGuessBehavior.GuessFromOrder}),{store:h,getItemProps:v,setOpen:S,setValue:b,selectionRef:x,typingRef:y,valuesRef:E,keyboardActiveRef:R,multiple:M,highlightItemOnHover:I}=w(),A=(0,G.useTimeout)(),C=(0,d.useStore)(h,O.isActive,g.index),P=(0,d.useStore)(h,O.isSelected,g.index,i),j=(0,d.useStore)(h,O.isSelectedByFocus,g.index),V=(0,d.useStore)(h,O.isItemEqualToValue),L=g.index,k=-1!==L,N=r.useRef(null),H=(0,c.useValueAsRef)(L);(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=E.current;return e[L]=i,()=>{delete e[L]}},[k,L,i,E]),(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=h.state.value,t=e;M&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),void 0!==t&&T(i,t,V)&&h.set("selectedIndex",L)},[k,L,M,V,h,i]);let F=v({active:C,selected:P});F.onFocus=void 0,F.id=void 0;let B=r.useRef(null),z=r.useRef("mouse"),_=r.useRef(!1),{getButtonProps:Y,buttonRef:q}=(0,et.useButton)({disabled:u,focusableWhenDisabled:!0,native:p,composite:!0}),W=(0,$.useRenderElement)("div",e,{ref:[q,n,g.ref,N],state:{disabled:u,selected:P,highlighted:C},props:[F,{role:"option","aria-selected":P,tabIndex:C?0:-1,onFocus(){h.set("activeIndex",L)},onMouseEnter(){!R.current&&null===h.state.selectedIndex&&I&&h.set("activeIndex",L)},onMouseMove(){I&&h.set("activeIndex",L)},onMouseLeave(e){!I||R.current||eP(e)||A.start(0,()=>{h.state.activeIndex===L&&h.set("activeIndex",null)})},onTouchStart(){x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){B.current=e.key,h.set("activeIndex",L)," "===e.key&&y.current&&e.preventDefault()},onClick(e){_.current=!1,"keydown"===e.type&&null===B.current||u||"keydown"===e.type&&" "===B.current&&y.current||"touch"!==z.current&&!C||(B.current=null,function(e){let t=h.state.value;if(M){let r=Array.isArray(t)?t:[];b(P?r.filter(e=>!T(i,e,V)):[...r,i],(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}else b(i,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e)),S(!1,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}(e.nativeEvent))},onPointerEnter(e){z.current=e.pointerType},onPointerDown(e){z.current=e.pointerType,_.current=!0},onMouseUp(){if(u)return;if(_.current){_.current=!1;return}let e=!x.current.allowSelectedMouseUp&&P,t=!x.current.allowUnselectedMouseUp&&!P;e||t||"touch"!==z.current&&!C||N.current?.click()}},f,Y]}),K=r.useMemo(()=>({selected:P,indexRef:H,textRef:m,selectedByFocus:j,hasRegistered:k}),[P,H,m,j,k]);return(0,t.jsx)(eW.Provider,{value:K,children:W})})),eG=r.forwardRef(function(e,r){let n=e.keepMounted??!1,{selected:l}=eK();return n||l?(0,t.jsx)(eJ,{...e,ref:r}):null}),eJ=r.memo(r.forwardRef((e,t)=>{let{render:n,className:l,keepMounted:o,...i}=e,{selected:s}=eK(),a=r.useRef(null),{transitionStatus:u,setMounted:c}=(0,I.useTransitionStatus)(s),d=(0,$.useRenderElement)("span",e,{ref:[t,a],state:{selected:s,transitionStatus:u},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:ec.transitionStatusMapping});return(0,N.useOpenChangeComplete)({open:s,ref:a,onComplete(){s||c(!1)}}),d})),eQ=r.memo(r.forwardRef(function(e,t){let{indexRef:n,textRef:l,selectedByFocus:o,hasRegistered:i}=eK(),{selectedItemTextRef:s}=w(),{className:a,render:u,...c}=e,d=r.useCallback(e=>{if(!e||!i)return;let t=null===s.current||!s.current.isConnected;(o||t&&0===n.current)&&(s.current=e)},[s,n,o,i]);return(0,$.useRenderElement)("div",e,{ref:[d,t,l],props:c})})),eZ={...Q.popupStateMapping,...ec.transitionStatusMapping},e0=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),{side:i,align:s,arrowRef:a,arrowStyles:u,arrowUncentered:c,alignItemWithTriggerActive:p}=eS(),f=(0,d.useStore)(o,O.open,!0),m=(0,$.useRenderElement)("div",e,{state:{open:f,side:i,align:s,uncentered:c},ref:[a,t],props:[{style:u,"aria-hidden":!0},l],stateAttributesMapping:eZ});return p?null:m}),e1=r.forwardRef(function(e,t){let{render:r,className:n,direction:l,keepMounted:o=!1,...i}=e,{store:s,popupRef:u,listRef:c,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:f}=w(),{side:m,scrollDownArrowRef:g,scrollUpArrowRef:h}=eS(),v="up"===l?O.scrollUpArrowVisible:O.scrollDownArrowVisible,S=(0,d.useStore)(s,v),b=(0,d.useStore)(s,O.openMethod),x=S&&"touch"!==b,y=(0,G.useTimeout)(),E="up"===l?h:g,{transitionStatus:R,setMounted:M}=(0,I.useTransitionStatus)(x);(0,a.useIsoLayoutEffect)(()=>(f.current+=1,s.state.hasScrollArrows||s.set("hasScrollArrows",!0),()=>{f.current=Math.max(0,f.current-1),0===f.current&&s.state.hasScrollArrows&&s.set("hasScrollArrows",!1)}),[s,f]),(0,N.useOpenChangeComplete)({open:x,ref:E,onComplete(){x||M(!1)}});let A=(0,$.useRenderElement)("div",e,{ref:[t,E],state:{direction:l,visible:x,side:m,transitionStatus:R},props:[{"aria-hidden":!0,children:"up"===l?"▲":"▼",style:{position:"absolute"},onMouseMove(e){0===e.movementX&&0===e.movementY||y.isStarted()||(s.set("activeIndex",null),y.start(40,function e(){let t=s.state.listElement??u.current;if(!t)return;s.set("activeIndex",null),p();let r=0===t.scrollTop,n=Math.round(t.scrollTop+t.clientHeight)>=t.scrollHeight;if(0===c.current.length&&("up"===l?s.set("scrollUpArrowVisible",!r):s.set("scrollDownArrowVisible",!n)),"up"===l&&r||"down"===l&&n)return void y.clear();if((s.state.listElement||u.current)&&c.current&&c.current.length>0){let e=c.current,r=E.current?.offsetHeight||0;if("up"===l){let n=0,l=t.scrollTop+r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop>=l){n=t;break}}let o=Math.max(0,n-1);if(o<n){let n=e[o];n&&(t.scrollTop=Math.max(0,n.offsetTop-r))}else t.scrollTop=0}else{let n=e.length-1,l=t.scrollTop+t.clientHeight-r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop+r.offsetHeight>l){n=Math.max(0,t-1);break}}let o=Math.min(e.length-1,n+1);if(o>n){let n=e[o];n&&(t.scrollTop=n.offsetTop+n.offsetHeight-t.clientHeight+r)}else t.scrollTop=t.scrollHeight-t.clientHeight}}y.start(40,e)}))},onMouseLeave(){y.clear()}},i]});return x||o?A:null}),e2=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"down"})}),e5=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"up"})}),e8=r.createContext(void 0),e9=r.forwardRef(function(e,n){let{className:l,render:o,...i}=e,[s,a]=r.useState(),u=r.useMemo(()=>({labelId:s,setLabelId:a}),[s,a]),c=(0,$.useRenderElement)("div",e,{ref:n,props:[{role:"group","aria-labelledby":s},i]});return(0,t.jsx)(e8.Provider,{value:u,children:c})});var e6=e.i(207516);let e4=r.forwardRef(function(e,t){let{className:n,render:l,id:o,...i}=e,{setLabelId:s}=function(){let e=r.useContext(e8);if(void 0===e)throw Error((0,b.default)(56));return e}(),u=(0,e6.useBaseUiId)(o);return(0,a.useIsoLayoutEffect)(()=>{s(u)},[u,s]),(0,$.useRenderElement)("div",e,{ref:t,props:[{id:u},i]})});var e3=e.i(983640);e.s(["Arrow",0,e0,"Backdrop",0,ep,"Group",0,e9,"GroupLabel",0,e4,"Icon",0,ei,"Item",0,eX,"ItemIndicator",0,eG,"ItemText",0,eQ,"Label",0,K,"List",0,e$,"Popup",0,eF,"Portal",0,eu,"Positioner",0,eM,"Root",0,function(e){let{id:b,value:w,defaultValue:E=null,onValueChange:A,open:T,defaultOpen:j=!1,onOpenChange:V,name:k,autoComplete:$,disabled:q=!1,readOnly:W=!1,required:K=!1,modal:X=!0,actionsRef:G,inputRef:J,onOpenChangeComplete:Q,items:Z,multiple:ee=!1,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en=C,highlightItemOnHover:el=!0,children:eo}=e,{clearErrors:ei}=(0,H.useFormContext)(),{setDirty:es,setTouched:ea,setFocused:eu,shouldValidateOnChange:ec,validityData:ed,setFilled:ep,name:ef,disabled:em,validation:eg,validationMode:eh}=(0,R.useFieldRootContext)(),ev=(0,M.useLabelableId)({id:b}),eS=em||q,eb=ef??k,[ex,ey]=(0,s.useControlled)({controlled:w,default:ee?E??B.EMPTY_ARRAY:E,name:"Select",state:"value"}),[ew,eE]=(0,s.useControlled)({controlled:T,default:j,name:"Select",state:"open"}),eR=r.useRef([]),eM=r.useRef([]),eI=r.useRef(null),eA=r.useRef(null),eC=r.useRef(0),eT=r.useRef(null),eP=r.useRef([]),ej=r.useRef(!1),eV=r.useRef(!1),eL=r.useRef(null),ek=r.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),eO=r.useRef(!1),{mounted:eD,setMounted:eU,transitionStatus:eN}=(0,I.useTransitionStatus)(ew),{openMethod:eH,triggerProps:eF}=(0,_.useOpenInteractionType)(ew),eB=(0,o.useRefWithInit)(()=>new p.Store({id:ev,labelId:void 0,modal:X,multiple:ee,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,value:ex,open:ew,mounted:eD,transitionStatus:eN,items:Z,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ez=(0,d.useStore)(eB,O.activeIndex),e_=(0,d.useStore)(eB,O.selectedIndex),eY=(0,d.useStore)(eB,O.triggerElement),e$=(0,d.useStore)(eB,O.positionerElement),eq=r.useMemo(()=>ee&&Array.isArray(ex)&&0===ex.length?"":L(ex,er),[ee,ex,er]),eW=r.useMemo(()=>ee&&Array.isArray(ex)?ex.map(e=>L(e,er)):L(ex,er),[ee,ex,er]),eK=(0,c.useValueAsRef)(eB.state.triggerElement);(0,F.useField)({id:ev,commit:eg.commit,value:ex,controlRef:eK,name:eb,getValue:()=>eW});let eX=r.useRef(ex);(0,a.useIsoLayoutEffect)(()=>{ex!==eX.current&&eB.set("forceMount",!0)},[eB,ex]),(0,a.useIsoLayoutEffect)(()=>{ep(ee?Array.isArray(ex)&&ex.length>0:null!=ex)},[ee,ex,ep]),(0,a.useIsoLayoutEffect)(function(){if(ew)return;let e=eP.current;if(ee){let t=Array.isArray(ex)?ex:[];if(0===t.length)return void eB.set("selectedIndex",null);let r=P(e,t[t.length-1],en);return void eB.set("selectedIndex",-1===r?null:r)}let t=P(e,ex,en);eB.set("selectedIndex",-1===t?null:t)},[ee,ew,ex,eP,en,eB]),(0,z.useValueChanged)(ex,()=>{ei(eb),es(ex!==ed.initialValue),ec()?eg.commit(ex):eg.commit(ex,!0)});let eG=(0,u.useStableCallback)((e,t)=>{if(V?.(e,t),!t.isCanceled&&(eE(e),e||t.reason!==U.REASONS.focusOut&&t.reason!==U.REASONS.outsidePress||(ea(!0),eu(!1),"onBlur"===eh&&eg.commit(ex)),!e&&null!==eB.state.activeIndex)){let e=eR.current[eB.state.activeIndex];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}}),eJ=(0,u.useStableCallback)(()=>{eU(!1),eB.set("activeIndex",null),Q?.(!1)});(0,N.useOpenChangeComplete)({enabled:!G,open:ew,ref:eI,onComplete(){ew||eJ()}}),r.useImperativeHandle(G,()=>({unmount:eJ}),[eJ]);let eQ=(0,u.useStableCallback)((e,t)=>{A?.(e,t),t.isCanceled||ey(e)}),eZ=(0,u.useStableCallback)(()=>{let e=eB.state.listElement||eI.current;if(!e)return;let t=e.scrollTop,r=e.scrollTop+e.clientHeight,n=t>1,l=r<e.scrollHeight-1;eB.state.scrollUpArrowVisible!==n&&eB.set("scrollUpArrowVisible",n),eB.state.scrollDownArrowVisible!==l&&eB.set("scrollDownArrowVisible",l)}),e0=(0,g.useFloatingRootContext)({open:ew,onOpenChange:eG,elements:{reference:eY,floating:e$}}),e1=(0,f.useClick)(e0,{enabled:!W&&!eS,event:"mousedown"}),e2=(0,m.useDismiss)(e0,{bubbles:!1}),e5=(0,v.useListNavigation)(e0,{enabled:!W&&!eS,listRef:eR,activeIndex:ez,selectedIndex:e_,disabledIndices:B.EMPTY_ARRAY,onNavigate(e){(null!==e||ew)&&eB.set("activeIndex",e)},focusItemOnHover:!1}),e8=(0,S.useTypeahead)(e0,{enabled:!W&&!eS&&(ew||!ee),listRef:eM,activeIndex:ez,selectedIndex:e_,onMatch(e){ew?eB.set("activeIndex",e):eQ(eP.current[e],(0,D.createChangeEventDetails)("none"))},onTypingChange(e){ej.current=e}}),{getReferenceProps:e9,getFloatingProps:e6,getItemProps:e4}=(0,h.useInteractions)([e1,e2,e5,e8]),e3=r.useMemo(()=>(0,Y.mergeProps)(e9(),eF,ev?{id:ev}:B.EMPTY_OBJECT),[e9,eF,ev]);(0,i.useOnFirstRender)(()=>{eB.update({popupProps:e6(),triggerProps:e3})}),(0,a.useIsoLayoutEffect)(()=>{eB.update({id:ev,modal:X,multiple:ee,value:ex,open:ew,mounted:eD,transitionStatus:eN,popupProps:e6(),triggerProps:e3,items:Z,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,openMethod:eH})},[eB,ev,X,ee,ex,ew,eD,eN,e6,e3,Z,et,er,en,eH]);let e7=r.useMemo(()=>({store:eB,name:eb,required:K,disabled:eS,readOnly:W,multiple:ee,itemToStringLabel:et,itemToStringValue:er,highlightItemOnHover:el,setValue:eQ,setOpen:eG,listRef:eR,popupRef:eI,scrollHandlerRef:eA,handleScrollArrowVisibility:eZ,scrollArrowsMountedCountRef:eC,getItemProps:e4,events:e0.context.events,valueRef:eT,valuesRef:eP,labelsRef:eM,typingRef:ej,selectionRef:ek,selectedItemTextRef:eL,validation:eg,onOpenChangeComplete:Q,keyboardActiveRef:eV,alignItemWithTriggerActiveRef:eO,initialValueRef:eX}),[eB,eb,K,eS,W,ee,et,er,el,eQ,eG,e4,e0.context.events,eg,Q,eZ]),te=(0,l.useMergedRefs)(J,eg.inputRef),tt=ee&&Array.isArray(ex)&&ex.length>0,tr=ee?void 0:eb,tn=r.useMemo(()=>ee&&Array.isArray(ex)&&eb?ex.map(e=>{let r=L(e,er);return(0,t.jsx)("input",{type:"hidden",name:eb,value:r},r)}):null,[ee,ex,eb,er]);return(0,t.jsx)(x.Provider,{value:e7,children:(0,t.jsxs)(y.Provider,{value:e0,children:[eo,(0,t.jsx)("input",{...eg.getInputValidationProps({onFocus(){eB.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,r=(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent);eB.set("forceMount",!0),queueMicrotask(function(){if(ee)return;let e=eP.current.find(e=>L(e,er).toLowerCase()===t.toLowerCase());null!=e&&(es(e!==ed.initialValue),eQ(e,r),ec()&&eg.commit(e))})}}),id:ev&&null==tr?`${ev}-hidden-input`:void 0,name:tr,autoComplete:$,value:eq,disabled:eS,required:K&&!tt,readOnly:W,ref:te,style:eb?n.visuallyHiddenInput:n.visuallyHidden,tabIndex:-1,"aria-hidden":!0}),tn]})})},"ScrollDownArrow",0,e2,"ScrollUpArrow",0,e5,"Separator",()=>e3.Separator,"Trigger",0,en,"Value",0,eo],278289);var e7=e.i(278289),e7=e7,te=e.i(975157),tt=e.i(314338),tt=tt,tr=e.i(533133),tn=e.i(792566),tn=tn;function tl({className:e,...r}){return(0,t.jsx)(e7.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:(0,te.cn)("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tn.default,{})})}function to({className:e,...r}){return(0,t.jsx)(e7.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:(0,te.cn)("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tt.default,{})})}e.s(["Select",0,function(e){return(0,t.jsx)(e7.Root,{modal:!1,...e})},"SelectContent",0,function({className:e,children:r,side:n="bottom",sideOffset:l=4,align:o="start",alignOffset:i=0,alignItemWithTrigger:s=!1,...a}){return(0,t.jsxs)(e7.Portal,{children:[(0,t.jsx)(e7.Backdrop,{className:"fixed inset-0 z-50"}),(0,t.jsx)(e7.Positioner,{side:n,sideOffset:l,align:o,alignOffset:i,alignItemWithTrigger:s,className:"isolate z-50",children:(0,t.jsxs)(e7.Popup,{"data-slot":"select-content","data-align-trigger":s,className:(0,te.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a,children:[(0,t.jsx)(tl,{}),(0,t.jsx)(e7.List,{children:r}),(0,t.jsx)(to,{})]})})]})},"SelectItem",0,function({className:e,children:r,...n}){return(0,t.jsxs)(e7.Item,{"data-slot":"select-item",className:(0,te.cn)("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[(0,t.jsx)(e7.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:r}),(0,t.jsx)(e7.ItemIndicator,{render:(0,t.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,t.jsx)(tr.CheckIcon,{className:"pointer-events-none"})})]})},"SelectTrigger",0,function({className:e,size:r="default",children:n,...l}){return(0,t.jsxs)(e7.Trigger,{"data-slot":"select-trigger","data-size":r,className:(0,te.cn)("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...l,children:[n,(0,t.jsx)(e7.Icon,{render:(0,t.jsx)(tt.default,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}],967489);var ti=e.i(514798);let ts=(0,ti.createServerReference)("40118872f3d23c38466036d1df507ff3b1a2f96ba8",ti.callServer,void 0,ti.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,ts],338973)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,967489,107286,e=>{"use strict";var t=e.i(289721);e.s([],648333),e.i(648333);var r=e.i(965652),n=e.i(416369),l=e.i(362891),o=e.i(903224),i=e.i(528796),s=e.i(314757),a=e.i(804849),u=e.i(887642),c=e.i(20746),d=e.i(812901),p=e.i(956741),f=e.i(430557),m=e.i(594640),g=e.i(592604),h=e.i(306296),v=e.i(234951),S=e.i(471959);e.i(708878);var b=e.i(462902);let x=r.createContext(null),y=r.createContext(null);function w(){let e=r.useContext(x);if(null===e)throw Error((0,b.default)(60));return e}function E(){let e=r.useContext(y);if(null===e)throw Error((0,b.default)(61));return e}var R=e.i(890514),M=e.i(103353),I=e.i(193214),A=e.i(596290);let C=(e,t)=>Object.is(e,t);function T(e,t,r){return null==e||null==t?Object.is(e,t):r(e,t)}function P(e,t,r){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&T(e,t,r)):-1}function j(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function V(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function L(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?j(e.value):j(e)}function k(e,t,r){function n(){if(r&&null!=e)return r(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return j(e)}if(r&&null!=e)return r(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??n();if(Array.isArray(t)){let r=V(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:n()}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return n()}let O={id:(0,A.createSelector)(e=>e.id),labelId:(0,A.createSelector)(e=>e.labelId),modal:(0,A.createSelector)(e=>e.modal),multiple:(0,A.createSelector)(e=>e.multiple),items:(0,A.createSelector)(e=>e.items),itemToStringLabel:(0,A.createSelector)(e=>e.itemToStringLabel),itemToStringValue:(0,A.createSelector)(e=>e.itemToStringValue),isItemEqualToValue:(0,A.createSelector)(e=>e.isItemEqualToValue),value:(0,A.createSelector)(e=>e.value),hasSelectedValue:(0,A.createSelector)(e=>{let{value:t,multiple:r,itemToStringValue:n}=e;return null!=t&&(r&&Array.isArray(t)?t.length>0:""!==L(t,n))}),hasNullItemLabel:(0,A.createSelector)((e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(V(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}(e.items)),open:(0,A.createSelector)(e=>e.open),mounted:(0,A.createSelector)(e=>e.mounted),forceMount:(0,A.createSelector)(e=>e.forceMount),transitionStatus:(0,A.createSelector)(e=>e.transitionStatus),openMethod:(0,A.createSelector)(e=>e.openMethod),activeIndex:(0,A.createSelector)(e=>e.activeIndex),selectedIndex:(0,A.createSelector)(e=>e.selectedIndex),isActive:(0,A.createSelector)((e,t)=>e.activeIndex===t),isSelected:(0,A.createSelector)((e,t,r)=>{let n=e.isItemEqualToValue,l=e.value;return e.multiple?Array.isArray(l)&&l.some(e=>T(r,e,n)):e.selectedIndex===t&&null!==e.selectedIndex||T(r,l,n)}),isSelectedByFocus:(0,A.createSelector)((e,t)=>e.selectedIndex===t),popupProps:(0,A.createSelector)(e=>e.popupProps),triggerProps:(0,A.createSelector)(e=>e.triggerProps),triggerElement:(0,A.createSelector)(e=>e.triggerElement),positionerElement:(0,A.createSelector)(e=>e.positionerElement),listElement:(0,A.createSelector)(e=>e.listElement),scrollUpArrowVisible:(0,A.createSelector)(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:(0,A.createSelector)(e=>e.scrollDownArrowVisible),hasScrollArrows:(0,A.createSelector)(e=>e.hasScrollArrows)};var D=e.i(67077),U=e.i(586622),N=e.i(504068),H=e.i(571870),F=e.i(421689),B=e.i(954588),z=e.i(353052),_=e.i(892069),Y=e.i(565455),$=e.i(581263),q=e.i(551974),W=e.i(397791);let K=r.forwardRef(function(e,t){let{render:r,className:n,...l}=e;delete l.id;let o=(0,R.useFieldRootContext)(),{store:i}=w(),s=(0,d.useStore)(i,O.triggerElement),a=(0,d.useStore)(i,O.id),u=null==a?void 0:`${a}-label`,c=(0,W.useLabel)({id:u,fallbackControlId:s?.id??a,setLabelId(e){i.set("labelId",e)}});return(0,$.useRenderElement)("div",e,{ref:t,state:o.state,props:[c,l],stateAttributesMapping:q.fieldValidityMapping})});var X=e.i(102094),G=e.i(161476),J=e.i(179279),Q=e.i(845756),Z=e.i(748299),ee=e.i(682354),et=e.i(282109);let er={...Q.pressableTriggerOpenStateMapping,...q.fieldValidityMapping,value:()=>null},en=r.forwardRef(function(e,t){let{render:n,className:o,id:i,disabled:s=!1,nativeButton:a=!0,...p}=e,{setTouched:f,setFocused:m,validationMode:g,state:h,disabled:v}=(0,R.useFieldRootContext)(),{labelId:S}=(0,J.useLabelableContext)(),{store:b,setOpen:x,selectionRef:y,validation:E,readOnly:I,required:A,alignItemWithTriggerActiveRef:C,disabled:T,keyboardActiveRef:P}=w(),j=v||T||s,V=(0,d.useStore)(b,O.open),L=(0,d.useStore)(b,O.value),k=(0,d.useStore)(b,O.triggerProps),N=(0,d.useStore)(b,O.positionerElement),H=(0,d.useStore)(b,O.listElement),F=(0,d.useStore)(b,O.id),B=(0,d.useStore)(b,O.labelId),z=(0,d.useStore)(b,O.hasSelectedValue),_=!z&&V,q=(0,d.useStore)(b,O.hasNullItemLabel,_),W=i??F;(0,M.useLabelableId)({id:W});let K=(0,c.useValueAsRef)(N),Q=r.useRef(null),{getButtonProps:en,buttonRef:el}=(0,et.useButton)({disabled:j,native:a}),eo=(0,u.useStableCallback)(e=>{b.set("triggerElement",e)}),ei=(0,l.useMergedRefs)(t,Q,el,eo),es=(0,G.useTimeout)(),ea=(0,G.useTimeout)(),eu=(0,G.useTimeout)(),ec=(0,G.useTimeout)();r.useEffect(()=>{if(V)return z||q?ec.start(200,()=>{y.current.allowUnselectedMouseUp=!0,eu.start(200,()=>{y.current.allowSelectedMouseUp=!0})}):eu.start(400,()=>{y.current.allowUnselectedMouseUp=!0,y.current.allowSelectedMouseUp=!0}),()=>{eu.clear(),ec.clear()};y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ea.clear()},[V,z,q,y,ea,eu,ec]);let ed=r.useMemo(()=>H?.id??(0,ee.getFloatingFocusElement)(N)?.id,[H,N]),ep=(0,Y.mergeProps)(k,{id:W,role:"combobox","aria-expanded":V?"true":"false","aria-haspopup":"listbox","aria-controls":V?ed:void 0,"aria-labelledby":S??B,"aria-readonly":I||void 0,"aria-required":A||void 0,tabIndex:j?-1:0,ref:ei,onFocus(e){m(!0),V&&C.current&&x(!1,(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent)),es.start(0,()=>{b.set("forceMount",!0)})},onBlur(e){(0,ee.contains)(N,e.relatedTarget)||(f(!0),m(!1),"onBlur"===g&&E.commit(L))},onPointerMove(){P.current=!1},onKeyDown(){P.current=!0},onMouseDown(e){if(V)return;let t=(0,X.ownerDocument)(e.currentTarget);function r(e){if(!Q.current)return;let t=e.target;if((0,ee.contains)(Q.current,t)||(0,ee.contains)(K.current,t)||t===Q.current)return;let r=(0,Z.getPseudoElementBounds)(Q.current);e.clientX>=r.left-2&&e.clientX<=r.right+2&&e.clientY>=r.top-2&&e.clientY<=r.bottom+2||x(!1,(0,D.createChangeEventDetails)(U.REASONS.cancelOpen,e))}ea.start(0,()=>{t.addEventListener("mouseup",r,{once:!0})})}},E.getValidationProps,p,en);ep.role="combobox";let ef={...h,open:V,disabled:j,value:L,readOnly:I,placeholder:!z};return(0,$.useRenderElement)("button",e,{ref:[t,Q],state:ef,stateAttributesMapping:er,props:ep})}),el={value:()=>null},eo=r.forwardRef(function(e,n){let{className:l,render:o,children:i,placeholder:s,...a}=e,{store:u,valueRef:c}=w(),p=(0,d.useStore)(u,O.value),f=(0,d.useStore)(u,O.items),m=(0,d.useStore)(u,O.itemToStringLabel),g=(0,d.useStore)(u,O.hasSelectedValue),h=(0,d.useStore)(u,O.hasNullItemLabel,!g&&null!=s&&null==i),v=null;if("function"==typeof i)v=i(p);else if(null!=i)v=i;else if(g||null==s||h)if(Array.isArray(p))v=p.reduce((e,n,l)=>(l>0&&e.push(", "),e.push((0,t.jsx)(r.Fragment,{children:k(n,f,m)},l)),e),[]);else v=k(p,f,m);else v=s;return(0,$.useRenderElement)("span",e,{state:{value:p,placeholder:!g},ref:[n,c],props:[{children:v},a],stateAttributesMapping:el})}),ei=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open);return(0,$.useRenderElement)("span",e,{state:{open:i},ref:t,props:[{"aria-hidden":!0,children:"▼"},l],stateAttributesMapping:Q.triggerOpenStateMapping})});var es=e.i(888393);let ea=r.createContext(void 0),eu=r.forwardRef(function(e,r){let{store:n}=w(),l=(0,d.useStore)(n,O.mounted),o=(0,d.useStore)(n,O.forceMount);return l||o?(0,t.jsx)(ea.Provider,{value:!0,children:(0,t.jsx)(es.FloatingPortal,{ref:r,...e})}):null});var ec=e.i(809058);let ed={...Q.popupStateMapping,...ec.transitionStatusMapping},ep=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open),s=(0,d.useStore)(o,O.mounted),a=(0,d.useStore)(o,O.transitionStatus);return(0,$.useRenderElement)("div",e,{state:{open:i,transitionStatus:a},ref:t,props:[{role:"presentation",hidden:!s,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:ed})});var ef=e.i(831766),em=e.i(620163),eg=e.i(579028),eh=e.i(887943);let ev=r.createContext(void 0);function eS(){let e=r.useContext(ev);if(!e)throw Error((0,b.default)(59));return e}var eb=e.i(72287),ex=e.i(693354),ey=e.i(808754);function ew(e,t){e&&Object.assign(e.style,t)}let eE={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},eR={position:"fixed"},eM=r.forwardRef(function(e,n){let{anchor:l,positionMethod:o="absolute",className:i,render:s,side:c="bottom",align:p="center",sideOffset:f=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:h,arrowPadding:v=5,sticky:S=!1,disableAnchorTracking:b,alignItemWithTrigger:x=!0,collisionAvoidance:y=ex.DROPDOWN_COLLISION_AVOIDANCE,...R}=e,{store:M,listRef:I,labelsRef:A,alignItemWithTriggerActiveRef:C,selectedItemTextRef:j,valuesRef:V,initialValueRef:L,popupRef:k,setValue:N}=w(),H=E(),F=(0,d.useStore)(M,O.open),B=(0,d.useStore)(M,O.mounted),z=(0,d.useStore)(M,O.modal),_=(0,d.useStore)(M,O.value),Y=(0,d.useStore)(M,O.openMethod),q=(0,d.useStore)(M,O.positionerElement),W=(0,d.useStore)(M,O.triggerElement),K=(0,d.useStore)(M,O.isItemEqualToValue),X=(0,d.useStore)(M,O.transitionStatus),G=r.useRef(null),J=r.useRef(null),[Z,ee]=r.useState(x),et=B&&Z&&"touch"!==Y;B||Z===x||ee(x),(0,a.useIsoLayoutEffect)(()=>{!B&&(O.scrollUpArrowVisible(M.state)&&M.set("scrollUpArrowVisible",!1),O.scrollDownArrowVisible(M.state)&&M.set("scrollDownArrowVisible",!1))},[M,B]),r.useImperativeHandle(C,()=>et),(0,em.useScrollLock)((et||z)&&F&&"touch"!==Y,W);let er=(0,eh.useAnchorPositioning)({anchor:l,floatingRootContext:H,positionMethod:o,mounted:B,side:c,sideOffset:f,align:p,alignOffset:m,arrowPadding:v,collisionBoundary:g,collisionPadding:h,sticky:S,disableAnchorTracking:b??et,collisionAvoidance:y,keepMounted:!0}),en=et?"none":er.side,el=et?eR:er.positionerStyles,eo=r.useMemo(()=>{let e={};return F||(e.pointerEvents="none"),{role:"presentation",hidden:!B,style:{...el,...e}}},[F,B,el]),ei={open:F,side:en,align:er.align,anchorHidden:er.anchorHidden},es=(0,u.useStableCallback)(e=>{M.set("positionerElement",e)}),ea=(0,$.useRenderElement)("div",e,{ref:[n,es],state:ei,stateAttributesMapping:Q.popupStateMapping,props:[eo,(0,ey.getDisabledMountTransitionStyles)(X),R]}),eu=r.useRef(0),ec=(0,u.useStableCallback)(e=>{if(0===e.size&&0===eu.current||0===V.current.length)return;let t=eu.current;if(eu.current=e.size,e.size===t)return;let r=(0,D.createChangeEventDetails)(U.REASONS.none);if(0!==t&&!M.state.multiple&&null!==_&&-1===P(V.current,_,K)){let e=L.current,t=null!=e&&-1!==P(V.current,e,K)?e:null;N(t,r),null===t&&(M.set("selectedIndex",null),j.current=null)}if(0!==t&&M.state.multiple&&Array.isArray(_)){let e=_.filter(e=>-1!==P(V.current,e,K));(e.length!==_.length||e.some(e=>!(_&&0!==_.length&&_.some(t=>void 0!==t&&T(e,t,K)))))&&(N(e,r),0===e.length&&(M.set("selectedIndex",null),j.current=null))}if(F&&et){M.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:""};ew(q,e),ew(k.current,e)}}),ed=r.useMemo(()=>({...er,side:en,alignItemWithTriggerActive:et,setControlledAlignItemWithTrigger:ee,scrollUpArrowRef:G,scrollDownArrowRef:J}),[er,en,et,ee]);return(0,t.jsx)(eg.CompositeList,{elementsRef:I,labelsRef:A,onMapChange:ec,children:(0,t.jsxs)(ev.Provider,{value:ed,children:[B&&z&&(0,t.jsx)(eb.InternalBackdrop,{inert:(0,ef.inertValue)(!F),cutout:W}),ea]})})});var eI=e.i(585012),eA=e.i(641645),eC=e.i(442383),eT=e.i(285182);function eP(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var ej=e.i(946467),eV=e.i(11931),eL=e.i(278928),ek=e.i(685668),eO=e.i(196368),eD=e.i(197920),eU=e.i(867467),eN=e.i(743945);let eH={...Q.popupStateMapping,...ec.transitionStatusMapping},eF=r.forwardRef(function(e,n){let{render:l,className:o,finalFocus:i,...s}=e,{store:c,popupRef:p,onOpenChangeComplete:f,setOpen:m,valueRef:g,selectedItemTextRef:h,keyboardActiveRef:v,multiple:S,handleScrollArrowVisibility:b,scrollHandlerRef:x,highlightItemOnHover:y}=w(),{side:R,align:M,alignItemWithTriggerActive:I,setControlledAlignItemWithTrigger:A,scrollDownArrowRef:C,scrollUpArrowRef:T}=eS(),P=null!=(0,eO.useToolbarRootContext)(!0),j=E(),{nonce:V,disableStyleElements:L}=(0,eN.useCSPContext)(),k=(0,G.useTimeout)(),H=(0,d.useStore)(c,O.id),F=(0,d.useStore)(c,O.open),B=(0,d.useStore)(c,O.mounted),z=(0,d.useStore)(c,O.popupProps),_=(0,d.useStore)(c,O.transitionStatus),Y=(0,d.useStore)(c,O.triggerElement),q=(0,d.useStore)(c,O.positionerElement),W=(0,d.useStore)(c,O.listElement),K=r.useRef(0),J=r.useRef(!1),Q=r.useRef(0),Z=r.useRef(!1),ee=r.useRef({}),et=(0,ej.useAnimationFrame)(),er=(0,u.useStableCallback)(e=>{if(!q||!p.current||!Z.current)return;if(J.current||!I)return void b();let t="0px"===q.style.top,r="0px"===q.style.bottom,n=q.getBoundingClientRect().height,l=(0,X.ownerDocument)(q),o=getComputedStyle(q),i=parseFloat(o.marginTop),s=parseFloat(o.marginBottom),a=eB(getComputedStyle(p.current)),u=Math.min(l.documentElement.clientHeight-i-s,a),c=e.scrollTop,d=ez(e),f=0,m=null,g=!1,h=!1,v=e=>{q.style.height=`${e}px`},S=(t,r)=>{let l=(0,eU.clamp)(t,0,u-n);l>0&&v(n+l),e.scrollTop=r,u-(n+l)<=1&&(J.current=!0),b()};if(t){let e=d-c,t=Math.min(n+e,u);if(f=t,e<=1)return void S(e,d);u-t>1?h=!0:g=!0}else if(r){let e=n+c,t=Math.min(e,u);if(f=t,c<=1)return void S(c,0);u-t>1?m=0:(g=!0,c<d&&(m=c-(c-(e-u))))}if(0!==(f=Math.ceil(f))&&v(f),h||null!=m){let t=ez(e),r=h?t:(0,eU.clamp)(m,0,t);Math.abs(e.scrollTop-r)>1&&(e.scrollTop=r)}(g||f>=u-1)&&(J.current=!0),b()});r.useImperativeHandle(x,()=>er,[er]),(0,N.useOpenChangeComplete)({open:F,ref:p,onComplete(){F&&f?.(!0)}}),(0,a.useIsoLayoutEffect)(()=>{q&&p.current&&!Object.keys(ee.current).length&&(ee.current={top:q.style.top||"0",left:q.style.left||"0",right:q.style.right,height:q.style.height,bottom:q.style.bottom,minHeight:q.style.minHeight,maxHeight:q.style.maxHeight,marginTop:q.style.marginTop,marginBottom:q.style.marginBottom})},[p,q]),(0,a.useIsoLayoutEffect)(()=>{F||I||(Z.current=!1,J.current=!1,K.current=0,Q.current=0,ew(q,ee.current))},[F,I,q,p]),(0,a.useIsoLayoutEffect)(()=>{let e=p.current;if(F&&Y&&q&&e&&"ending"!==c.state.transitionStatus){if(!I){Z.current=!0,et.request(b),e.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{let t=function(e){let{style:t}=e,r={};for(let[e,n]of eY)r[e]=t.getPropertyValue(e),t.setProperty(e,n,"important");return()=>{for(let[e]of eY){let n=r[e];n?t.setProperty(e,n):t.removeProperty(e)}}}(e);e.style.removeProperty("--transform-origin");try{var r;let t,n=getComputedStyle(q),l=getComputedStyle(e),o=(0,X.ownerDocument)(Y),i=(0,eT.ownerWindow)(q),s=(r=Y,eL.platform.getScale(r)),a=e_(Y.getBoundingClientRect(),s),u=e_(q.getBoundingClientRect(),s),c=a.left,d=a.height,p=W||e,f=p.scrollHeight,m=parseFloat(l.borderBottomWidth),v=parseFloat(n.marginTop)||10,S=parseFloat(n.marginBottom)||10,x=parseFloat(n.minHeight)||100,y=eB(l),w=o.documentElement.clientHeight-v-S,E=o.documentElement.clientWidth,R=w-a.bottom+d,M=h.current,I=g.current,C=0,T=0;if(M&&I){let e=e_(I.getBoundingClientRect(),s);t=e_(M.getBoundingClientRect(),s);let r=e.left-c,n=t.left-u.left,l=e.top-a.top+e.height/2,o=t.top-u.top+t.height/2;C=r-n,T=o-l}let P=R+T+S+m,j=Math.min(w,P),V=w-v-S,L=P-j,k=Math.max(5,c+C),O=Math.max(0,k+u.width-(E-5));q.style.left=`${k-O}px`,q.style.height=`${j}px`,q.style.maxHeight="auto",q.style.marginTop=`${v}px`,q.style.marginBottom=`${S}px`,e.style.height="100%";let D=ez(p),U=L>=D-1;U&&(j=Math.min(w,u.height)-(L-D));let N=a.top<20||a.bottom>w-20||Math.ceil(j)+1<Math.min(f,x),H=(i.visualViewport?.scale??1)!==1&&eC.isWebKit;if(N||H){Z.current=!0,ew(q,ee.current),eI.flushSync(()=>A(!1));return}if(U){let e=Math.max(0,w-P);q.style.top=u.height>=V?"0":`${e}px`,q.style.height=`${j}px`,p.scrollTop=ez(p),K.current=Math.max(x,j)}else q.style.bottom="0",K.current=Math.max(x,j),p.scrollTop=L;if(t){let r=u.top,n=u.height,l=t.top+t.height/2,o=(0,eU.clamp)(n>0?(l-r)/n*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${o}%`)}(K.current===w||j>=y)&&(J.current=!0),b(),setTimeout(()=>{Z.current=!0})}finally{t()}})}},[c,F,q,Y,g,h,p,b,I,A,et,C,T,W]),r.useEffect(()=>{if(!I||!q||!F)return;let e=(0,eT.ownerWindow)(q);function t(e){m(!1,(0,D.createChangeEventDetails)(U.REASONS.windowResize,e))}return e.addEventListener("resize",t),()=>{e.removeEventListener("resize",t)}},[m,I,q,F]);let en={...W?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${H}-list`},onKeyDown(e){v.current=!0,P&&eD.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},onMouseMove(){v.current=!1},onPointerLeave(e){if(!y||eP(e)||"touch"===e.pointerType)return;let t=e.currentTarget;k.start(0,()=>{c.set("activeIndex",null),t.focus({preventScroll:!0})})},onScroll(e){W||er(e.currentTarget)},...I&&{style:W?{height:"100%"}:eE}},el=(0,$.useRenderElement)("div",e,{ref:[n,p],state:{open:F,transitionStatus:_,side:R,align:M},stateAttributesMapping:eH,props:[z,en,(0,ey.getDisabledMountTransitionStyles)(_),{className:!W&&I?ek.styleDisableScrollbar.className:void 0},s]});return(0,t.jsxs)(r.Fragment,{children:[!L&&ek.styleDisableScrollbar.getElement(V),(0,t.jsx)(eV.FloatingFocusManager,{context:j,modal:!1,disabled:!B,returnFocus:i,restoreFocus:!0,children:el})]})});function eB(e){let t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function ez(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function e_(e,t){return(0,eA.rectToClientRect)({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}let eY=[["transform","none"],["scale","1"],["translate","0 0"]],e$=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o,scrollHandlerRef:i}=w(),{alignItemWithTriggerActive:s}=eS(),a=(0,d.useStore)(o,O.hasScrollArrows),c=(0,d.useStore)(o,O.openMethod),p=(0,d.useStore)(o,O.multiple),f=(0,d.useStore)(o,O.id),m={id:`${f}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(e){i.current?.(e.currentTarget)},...s&&{style:eE},className:a&&"touch"!==c?ek.styleDisableScrollbar.className:void 0},g=(0,u.useStableCallback)(e=>{o.set("listElement",e)});return(0,$.useRenderElement)("div",e,{ref:[t,g],props:[m,l]})});var eq=e.i(655728);let eW=r.createContext(void 0);function eK(){let e=r.useContext(eW);if(!e)throw Error((0,b.default)(57));return e}let eX=r.memo(r.forwardRef(function(e,n){let{render:l,className:o,value:i=null,label:s,disabled:u=!1,nativeButton:p=!1,...f}=e,m=r.useRef(null),g=(0,eq.useCompositeListItem)({label:s,textRef:m,indexGuessBehavior:eq.IndexGuessBehavior.GuessFromOrder}),{store:h,getItemProps:v,setOpen:S,setValue:b,selectionRef:x,typingRef:y,valuesRef:E,keyboardActiveRef:R,multiple:M,highlightItemOnHover:I}=w(),A=(0,G.useTimeout)(),C=(0,d.useStore)(h,O.isActive,g.index),P=(0,d.useStore)(h,O.isSelected,g.index,i),j=(0,d.useStore)(h,O.isSelectedByFocus,g.index),V=(0,d.useStore)(h,O.isItemEqualToValue),L=g.index,k=-1!==L,N=r.useRef(null),H=(0,c.useValueAsRef)(L);(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=E.current;return e[L]=i,()=>{delete e[L]}},[k,L,i,E]),(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=h.state.value,t=e;M&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),void 0!==t&&T(i,t,V)&&h.set("selectedIndex",L)},[k,L,M,V,h,i]);let F=v({active:C,selected:P});F.onFocus=void 0,F.id=void 0;let B=r.useRef(null),z=r.useRef("mouse"),_=r.useRef(!1),{getButtonProps:Y,buttonRef:q}=(0,et.useButton)({disabled:u,focusableWhenDisabled:!0,native:p,composite:!0}),W=(0,$.useRenderElement)("div",e,{ref:[q,n,g.ref,N],state:{disabled:u,selected:P,highlighted:C},props:[F,{role:"option","aria-selected":P,tabIndex:C?0:-1,onFocus(){h.set("activeIndex",L)},onMouseEnter(){!R.current&&null===h.state.selectedIndex&&I&&h.set("activeIndex",L)},onMouseMove(){I&&h.set("activeIndex",L)},onMouseLeave(e){!I||R.current||eP(e)||A.start(0,()=>{h.state.activeIndex===L&&h.set("activeIndex",null)})},onTouchStart(){x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){B.current=e.key,h.set("activeIndex",L)," "===e.key&&y.current&&e.preventDefault()},onClick(e){_.current=!1,"keydown"===e.type&&null===B.current||u||"keydown"===e.type&&" "===B.current&&y.current||"touch"!==z.current&&!C||(B.current=null,function(e){let t=h.state.value;if(M){let r=Array.isArray(t)?t:[];b(P?r.filter(e=>!T(i,e,V)):[...r,i],(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}else b(i,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e)),S(!1,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}(e.nativeEvent))},onPointerEnter(e){z.current=e.pointerType},onPointerDown(e){z.current=e.pointerType,_.current=!0},onMouseUp(){if(u)return;if(_.current){_.current=!1;return}let e=!x.current.allowSelectedMouseUp&&P,t=!x.current.allowUnselectedMouseUp&&!P;e||t||"touch"!==z.current&&!C||N.current?.click()}},f,Y]}),K=r.useMemo(()=>({selected:P,indexRef:H,textRef:m,selectedByFocus:j,hasRegistered:k}),[P,H,m,j,k]);return(0,t.jsx)(eW.Provider,{value:K,children:W})})),eG=r.forwardRef(function(e,r){let n=e.keepMounted??!1,{selected:l}=eK();return n||l?(0,t.jsx)(eJ,{...e,ref:r}):null}),eJ=r.memo(r.forwardRef((e,t)=>{let{render:n,className:l,keepMounted:o,...i}=e,{selected:s}=eK(),a=r.useRef(null),{transitionStatus:u,setMounted:c}=(0,I.useTransitionStatus)(s),d=(0,$.useRenderElement)("span",e,{ref:[t,a],state:{selected:s,transitionStatus:u},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:ec.transitionStatusMapping});return(0,N.useOpenChangeComplete)({open:s,ref:a,onComplete(){s||c(!1)}}),d})),eQ=r.memo(r.forwardRef(function(e,t){let{indexRef:n,textRef:l,selectedByFocus:o,hasRegistered:i}=eK(),{selectedItemTextRef:s}=w(),{className:a,render:u,...c}=e,d=r.useCallback(e=>{if(!e||!i)return;let t=null===s.current||!s.current.isConnected;(o||t&&0===n.current)&&(s.current=e)},[s,n,o,i]);return(0,$.useRenderElement)("div",e,{ref:[d,t,l],props:c})})),eZ={...Q.popupStateMapping,...ec.transitionStatusMapping},e0=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),{side:i,align:s,arrowRef:a,arrowStyles:u,arrowUncentered:c,alignItemWithTriggerActive:p}=eS(),f=(0,d.useStore)(o,O.open,!0),m=(0,$.useRenderElement)("div",e,{state:{open:f,side:i,align:s,uncentered:c},ref:[a,t],props:[{style:u,"aria-hidden":!0},l],stateAttributesMapping:eZ});return p?null:m}),e1=r.forwardRef(function(e,t){let{render:r,className:n,direction:l,keepMounted:o=!1,...i}=e,{store:s,popupRef:u,listRef:c,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:f}=w(),{side:m,scrollDownArrowRef:g,scrollUpArrowRef:h}=eS(),v="up"===l?O.scrollUpArrowVisible:O.scrollDownArrowVisible,S=(0,d.useStore)(s,v),b=(0,d.useStore)(s,O.openMethod),x=S&&"touch"!==b,y=(0,G.useTimeout)(),E="up"===l?h:g,{transitionStatus:R,setMounted:M}=(0,I.useTransitionStatus)(x);(0,a.useIsoLayoutEffect)(()=>(f.current+=1,s.state.hasScrollArrows||s.set("hasScrollArrows",!0),()=>{f.current=Math.max(0,f.current-1),0===f.current&&s.state.hasScrollArrows&&s.set("hasScrollArrows",!1)}),[s,f]),(0,N.useOpenChangeComplete)({open:x,ref:E,onComplete(){x||M(!1)}});let A=(0,$.useRenderElement)("div",e,{ref:[t,E],state:{direction:l,visible:x,side:m,transitionStatus:R},props:[{"aria-hidden":!0,children:"up"===l?"▲":"▼",style:{position:"absolute"},onMouseMove(e){0===e.movementX&&0===e.movementY||y.isStarted()||(s.set("activeIndex",null),y.start(40,function e(){let t=s.state.listElement??u.current;if(!t)return;s.set("activeIndex",null),p();let r=0===t.scrollTop,n=Math.round(t.scrollTop+t.clientHeight)>=t.scrollHeight;if(0===c.current.length&&("up"===l?s.set("scrollUpArrowVisible",!r):s.set("scrollDownArrowVisible",!n)),"up"===l&&r||"down"===l&&n)return void y.clear();if((s.state.listElement||u.current)&&c.current&&c.current.length>0){let e=c.current,r=E.current?.offsetHeight||0;if("up"===l){let n=0,l=t.scrollTop+r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop>=l){n=t;break}}let o=Math.max(0,n-1);if(o<n){let n=e[o];n&&(t.scrollTop=Math.max(0,n.offsetTop-r))}else t.scrollTop=0}else{let n=e.length-1,l=t.scrollTop+t.clientHeight-r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop+r.offsetHeight>l){n=Math.max(0,t-1);break}}let o=Math.min(e.length-1,n+1);if(o>n){let n=e[o];n&&(t.scrollTop=n.offsetTop+n.offsetHeight-t.clientHeight+r)}else t.scrollTop=t.scrollHeight-t.clientHeight}}y.start(40,e)}))},onMouseLeave(){y.clear()}},i]});return x||o?A:null}),e5=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"down"})}),e2=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"up"})}),e8=r.createContext(void 0),e9=r.forwardRef(function(e,n){let{className:l,render:o,...i}=e,[s,a]=r.useState(),u=r.useMemo(()=>({labelId:s,setLabelId:a}),[s,a]),c=(0,$.useRenderElement)("div",e,{ref:n,props:[{role:"group","aria-labelledby":s},i]});return(0,t.jsx)(e8.Provider,{value:u,children:c})});var e4=e.i(207516);let e6=r.forwardRef(function(e,t){let{className:n,render:l,id:o,...i}=e,{setLabelId:s}=function(){let e=r.useContext(e8);if(void 0===e)throw Error((0,b.default)(56));return e}(),u=(0,e4.useBaseUiId)(o);return(0,a.useIsoLayoutEffect)(()=>{s(u)},[u,s]),(0,$.useRenderElement)("div",e,{ref:t,props:[{id:u},i]})});var e7=e.i(983640);e.s(["Arrow",0,e0,"Backdrop",0,ep,"Group",0,e9,"GroupLabel",0,e6,"Icon",0,ei,"Item",0,eX,"ItemIndicator",0,eG,"ItemText",0,eQ,"Label",0,K,"List",0,e$,"Popup",0,eF,"Portal",0,eu,"Positioner",0,eM,"Root",0,function(e){let{id:b,value:w,defaultValue:E=null,onValueChange:A,open:T,defaultOpen:j=!1,onOpenChange:V,name:k,autoComplete:$,disabled:q=!1,readOnly:W=!1,required:K=!1,modal:X=!0,actionsRef:G,inputRef:J,onOpenChangeComplete:Q,items:Z,multiple:ee=!1,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en=C,highlightItemOnHover:el=!0,children:eo}=e,{clearErrors:ei}=(0,H.useFormContext)(),{setDirty:es,setTouched:ea,setFocused:eu,shouldValidateOnChange:ec,validityData:ed,setFilled:ep,name:ef,disabled:em,validation:eg,validationMode:eh}=(0,R.useFieldRootContext)(),ev=(0,M.useLabelableId)({id:b}),eS=em||q,eb=ef??k,[ex,ey]=(0,s.useControlled)({controlled:w,default:ee?E??B.EMPTY_ARRAY:E,name:"Select",state:"value"}),[ew,eE]=(0,s.useControlled)({controlled:T,default:j,name:"Select",state:"open"}),eR=r.useRef([]),eM=r.useRef([]),eI=r.useRef(null),eA=r.useRef(null),eC=r.useRef(0),eT=r.useRef(null),eP=r.useRef([]),ej=r.useRef(!1),eV=r.useRef(!1),eL=r.useRef(null),ek=r.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),eO=r.useRef(!1),{mounted:eD,setMounted:eU,transitionStatus:eN}=(0,I.useTransitionStatus)(ew),{openMethod:eH,triggerProps:eF}=(0,_.useOpenInteractionType)(ew),eB=(0,o.useRefWithInit)(()=>new p.Store({id:ev,labelId:void 0,modal:X,multiple:ee,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,value:ex,open:ew,mounted:eD,transitionStatus:eN,items:Z,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ez=(0,d.useStore)(eB,O.activeIndex),e_=(0,d.useStore)(eB,O.selectedIndex),eY=(0,d.useStore)(eB,O.triggerElement),e$=(0,d.useStore)(eB,O.positionerElement),eq=r.useMemo(()=>ee&&Array.isArray(ex)&&0===ex.length?"":L(ex,er),[ee,ex,er]),eW=r.useMemo(()=>ee&&Array.isArray(ex)?ex.map(e=>L(e,er)):L(ex,er),[ee,ex,er]),eK=(0,c.useValueAsRef)(eB.state.triggerElement);(0,F.useField)({id:ev,commit:eg.commit,value:ex,controlRef:eK,name:eb,getValue:()=>eW});let eX=r.useRef(ex);(0,a.useIsoLayoutEffect)(()=>{ex!==eX.current&&eB.set("forceMount",!0)},[eB,ex]),(0,a.useIsoLayoutEffect)(()=>{ep(ee?Array.isArray(ex)&&ex.length>0:null!=ex)},[ee,ex,ep]),(0,a.useIsoLayoutEffect)(function(){if(ew)return;let e=eP.current;if(ee){let t=Array.isArray(ex)?ex:[];if(0===t.length)return void eB.set("selectedIndex",null);let r=P(e,t[t.length-1],en);return void eB.set("selectedIndex",-1===r?null:r)}let t=P(e,ex,en);eB.set("selectedIndex",-1===t?null:t)},[ee,ew,ex,eP,en,eB]),(0,z.useValueChanged)(ex,()=>{ei(eb),es(ex!==ed.initialValue),ec()?eg.commit(ex):eg.commit(ex,!0)});let eG=(0,u.useStableCallback)((e,t)=>{if(V?.(e,t),!t.isCanceled&&(eE(e),e||t.reason!==U.REASONS.focusOut&&t.reason!==U.REASONS.outsidePress||(ea(!0),eu(!1),"onBlur"===eh&&eg.commit(ex)),!e&&null!==eB.state.activeIndex)){let e=eR.current[eB.state.activeIndex];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}}),eJ=(0,u.useStableCallback)(()=>{eU(!1),eB.set("activeIndex",null),Q?.(!1)});(0,N.useOpenChangeComplete)({enabled:!G,open:ew,ref:eI,onComplete(){ew||eJ()}}),r.useImperativeHandle(G,()=>({unmount:eJ}),[eJ]);let eQ=(0,u.useStableCallback)((e,t)=>{A?.(e,t),t.isCanceled||ey(e)}),eZ=(0,u.useStableCallback)(()=>{let e=eB.state.listElement||eI.current;if(!e)return;let t=e.scrollTop,r=e.scrollTop+e.clientHeight,n=t>1,l=r<e.scrollHeight-1;eB.state.scrollUpArrowVisible!==n&&eB.set("scrollUpArrowVisible",n),eB.state.scrollDownArrowVisible!==l&&eB.set("scrollDownArrowVisible",l)}),e0=(0,g.useFloatingRootContext)({open:ew,onOpenChange:eG,elements:{reference:eY,floating:e$}}),e1=(0,f.useClick)(e0,{enabled:!W&&!eS,event:"mousedown"}),e5=(0,m.useDismiss)(e0,{bubbles:!1}),e2=(0,v.useListNavigation)(e0,{enabled:!W&&!eS,listRef:eR,activeIndex:ez,selectedIndex:e_,disabledIndices:B.EMPTY_ARRAY,onNavigate(e){(null!==e||ew)&&eB.set("activeIndex",e)},focusItemOnHover:!1}),e8=(0,S.useTypeahead)(e0,{enabled:!W&&!eS&&(ew||!ee),listRef:eM,activeIndex:ez,selectedIndex:e_,onMatch(e){ew?eB.set("activeIndex",e):eQ(eP.current[e],(0,D.createChangeEventDetails)("none"))},onTypingChange(e){ej.current=e}}),{getReferenceProps:e9,getFloatingProps:e4,getItemProps:e6}=(0,h.useInteractions)([e1,e5,e2,e8]),e7=r.useMemo(()=>(0,Y.mergeProps)(e9(),eF,ev?{id:ev}:B.EMPTY_OBJECT),[e9,eF,ev]);(0,i.useOnFirstRender)(()=>{eB.update({popupProps:e4(),triggerProps:e7})}),(0,a.useIsoLayoutEffect)(()=>{eB.update({id:ev,modal:X,multiple:ee,value:ex,open:ew,mounted:eD,transitionStatus:eN,popupProps:e4(),triggerProps:e7,items:Z,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,openMethod:eH})},[eB,ev,X,ee,ex,ew,eD,eN,e4,e7,Z,et,er,en,eH]);let e3=r.useMemo(()=>({store:eB,name:eb,required:K,disabled:eS,readOnly:W,multiple:ee,itemToStringLabel:et,itemToStringValue:er,highlightItemOnHover:el,setValue:eQ,setOpen:eG,listRef:eR,popupRef:eI,scrollHandlerRef:eA,handleScrollArrowVisibility:eZ,scrollArrowsMountedCountRef:eC,getItemProps:e6,events:e0.context.events,valueRef:eT,valuesRef:eP,labelsRef:eM,typingRef:ej,selectionRef:ek,selectedItemTextRef:eL,validation:eg,onOpenChangeComplete:Q,keyboardActiveRef:eV,alignItemWithTriggerActiveRef:eO,initialValueRef:eX}),[eB,eb,K,eS,W,ee,et,er,el,eQ,eG,e6,e0.context.events,eg,Q,eZ]),te=(0,l.useMergedRefs)(J,eg.inputRef),tt=ee&&Array.isArray(ex)&&ex.length>0,tr=ee?void 0:eb,tn=r.useMemo(()=>ee&&Array.isArray(ex)&&eb?ex.map(e=>{let r=L(e,er);return(0,t.jsx)("input",{type:"hidden",name:eb,value:r},r)}):null,[ee,ex,eb,er]);return(0,t.jsx)(x.Provider,{value:e3,children:(0,t.jsxs)(y.Provider,{value:e0,children:[eo,(0,t.jsx)("input",{...eg.getInputValidationProps({onFocus(){eB.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,r=(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent);eB.set("forceMount",!0),queueMicrotask(function(){if(ee)return;let e=eP.current.find(e=>L(e,er).toLowerCase()===t.toLowerCase());null!=e&&(es(e!==ed.initialValue),eQ(e,r),ec()&&eg.commit(e))})}}),id:ev&&null==tr?`${ev}-hidden-input`:void 0,name:tr,autoComplete:$,value:eq,disabled:eS,required:K&&!tt,readOnly:W,ref:te,style:eb?n.visuallyHiddenInput:n.visuallyHidden,tabIndex:-1,"aria-hidden":!0}),tn]})})},"ScrollDownArrow",0,e5,"ScrollUpArrow",0,e2,"Separator",()=>e7.Separator,"Trigger",0,en,"Value",0,eo],278289);var e3=e.i(278289),e3=e3,te=e.i(975157),tt=e.i(314338),tt=tt,tr=e.i(533133),tn=e.i(792566),tn=tn;function tl({className:e,...r}){return(0,t.jsx)(e3.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:(0,te.cn)("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tn.default,{})})}function to({className:e,...r}){return(0,t.jsx)(e3.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:(0,te.cn)("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tt.default,{})})}e.s(["Select",0,function(e){return(0,t.jsx)(e3.Root,{modal:!1,...e})},"SelectContent",0,function({className:e,children:r,side:n="bottom",sideOffset:l=4,align:o="start",alignOffset:i=0,alignItemWithTrigger:s=!1,...a}){return(0,t.jsxs)(e3.Portal,{children:[(0,t.jsx)(e3.Backdrop,{className:"fixed inset-0 z-50"}),(0,t.jsx)(e3.Positioner,{side:n,sideOffset:l,align:o,alignOffset:i,alignItemWithTrigger:s,className:"isolate z-50",children:(0,t.jsxs)(e3.Popup,{"data-slot":"select-content","data-align-trigger":s,className:(0,te.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a,children:[(0,t.jsx)(tl,{}),(0,t.jsx)(e3.List,{children:r}),(0,t.jsx)(to,{})]})})]})},"SelectItem",0,function({className:e,children:r,...n}){return(0,t.jsxs)(e3.Item,{"data-slot":"select-item",className:(0,te.cn)("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[(0,t.jsx)(e3.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:r}),(0,t.jsx)(e3.ItemIndicator,{render:(0,t.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,t.jsx)(tr.CheckIcon,{className:"pointer-events-none"})})]})},"SelectTrigger",0,function({className:e,size:r="default",children:n,...l}){return(0,t.jsxs)(e3.Trigger,{"data-slot":"select-trigger","data-size":r,className:(0,te.cn)("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...l,children:[n,(0,t.jsx)(e3.Icon,{render:(0,t.jsx)(tt.default,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}],967489);var ti=e.i(514798);let ts=(0,ti.createServerReference)("400ecb00dbd90175e6d01907545015c27a80e88391",ti.callServer,void 0,ti.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,ts],107286)}]);
|
|
@@ -0,0 +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])},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)},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)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},867533,e=>{"use strict";let t=(0,e.i(572989).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],867533)},910119,344083,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("401a0b53b020a460f0aed044a7c1bf9ac975a217b1",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,a],910119);let r=(0,t.createServerReference)("4004a88ffb826fc2973f7a4e6d046ea21a468a9e8f",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,r],344083)},12659,e=>{"use strict";let t=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],12659)},736061,460707,e=>{"use strict";var t=e.i(572989);let a=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,a],736061);let r=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,r],460707)},35967,e=>{"use strict";var t=e.i(289721);let a=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var r=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function n(e){return s[function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e)%s.length]}let l={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:r,showName:s=!1,className:n="",title:l}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${n}`,title:l??(r?`${e} \xb7 ${r}`:e),children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&r?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:r}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:a}=(0,r.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l[e]}`,children:a(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:a}=(0,r.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:a("version.type.uncategorized")})},"typeBadgeColor",0,n],35967)},540405,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("403fb9aba477474068caa46d6c3fa942de05b4edb6",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},110204,e=>{"use strict";var t=e.i(289721),a=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}])},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},937304,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);e.s(["isImageAsset",0,function(e,a){if(a?.startsWith("image/"))return!0;let r=e.split(".").pop()?.toLowerCase();return!!r&&t.has(r)},"localPathToApiUrl",0,function(e){let t=e.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}])},235357,144640,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(585012),s=e.i(657153),n=e.i(19671),l=e.i(368490),i=e.i(902539);let o=(0,e.i(572989).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var c=e.i(922541),d=e.i(533499);function u({children:e,onClick:a,title:r,disabled:s,...n}){return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||a()},title:r,disabled:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...n,children:e})}e.s(["ImageLightbox",0,function({imageUrl:e,filename:x,open:m,onOpenChange:h,assets:p,currentIndex:g,onIndexChange:f}){let{t:b}=(0,d.useI18n)(),[v,y]=(0,a.useState)(1),[j,k]=(0,a.useState)({x:0,y:0}),[w,N]=(0,a.useState)(!1),C=(0,a.useRef)(null),[S,I]=(0,a.useState)(!1),D=!!p&&p.length>1&&"number"==typeof g&&!!f,T=D&&g>0,P=D&&g<p.length-1,E=D?p.length:0,M=E>0?Math.ceil(E/10):0,L=D?Math.floor(g/10):0,R=10*L,O=Math.min(R+10,E),$=M>1,B=D&&L>0,A=D&&L<M-1;(0,a.useEffect)(()=>{I(!0)},[]),(0,a.useEffect)(()=>{y(1),k({x:0,y:0})},[e]),(0,a.useEffect)(()=>{if(!m)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[m]);let F=(0,a.useCallback)(()=>h(!1),[h]),U=(0,a.useCallback)(()=>{D&&T&&f(g-1)},[D,T,f,g]),_=(0,a.useCallback)(()=>{D&&P&&f(g+1)},[D,P,f,g]),z=(0,a.useCallback)(()=>{D&&B&&f((L-1)*10)},[D,B,f,L]),H=(0,a.useCallback)(()=>{D&&A&&f(Math.min((L+1)*10,E-1))},[D,A,f,L,E]),V=(0,a.useCallback)(()=>{y(e=>Math.min(8,1.25*e))},[]),G=(0,a.useCallback)(()=>{y(e=>{let t=Math.max(.1,e/1.25);return t<=1&&k({x:0,y:0}),t})},[]),W=(0,a.useCallback)(()=>{y(1),k({x:0,y:0})},[]);(0,a.useEffect)(()=>{if(!m)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),F();break;case"ArrowLeft":D&&(e.preventDefault(),U());break;case"ArrowRight":D&&(e.preventDefault(),_());break;case"+":case"=":e.preventDefault(),V();break;case"-":case"_":e.preventDefault(),G();break;case"0":e.preventDefault(),W()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[m,D,F,U,_,V,G,W]);let Y=(0,a.useRef)(!1),X=()=>{w&&N(!1),C.current=null},J=w?"cursor-grabbing":"cursor-grab";if(!m||!S)return null;let K=(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":b("assets.lightbox.zoomFit"),children:[(0,t.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[x,D?` \xb7 ${g+1} / ${p.length}`:""]}),(0,t.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${J}`,onClick:e=>{e.target===e.currentTarget&&F()},onWheel:e=>{e.preventDefault();let t=-e.deltaY>0?1.25:.8;y(e=>{let a=Math.min(8,Math.max(.1,e*t));return a<=1&&k({x:0,y:0}),a})},children:e&&(0,t.jsx)("img",{src:e,alt:x,onClick:e=>{e.stopPropagation(),Y.current&&(Y.current=!1)},onPointerDown:e=>{0===e.button&&(e.stopPropagation(),Y.current=!1,e.target.setPointerCapture?.(e.pointerId),C.current={x:e.clientX,y:e.clientY,panX:j.x,panY:j.y},N(!0))},onPointerMove:e=>{if(!C.current)return;let t=e.clientX-C.current.x,a=e.clientY-C.current.y;Math.abs(t)+Math.abs(a)>5&&(Y.current=!0),w&&k({x:C.current.panX+t,y:C.current.panY+a})},onPointerUp:X,onPointerLeave:X,onPointerCancel:X,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${j.x}px, ${j.y}px, 0) scale(${v})`,transformOrigin:"center center",transition:w?"none":"transform 120ms ease-out",willChange:w?"transform":"auto"},draggable:!1})}),(0,t.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:e=>e.stopPropagation(),children:[D&&(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[$&&(0,t.jsx)(u,{onClick:z,title:`${b("assets.lightbox.prev")} (-10)`,"aria-label":`${b("assets.lightbox.prev")} (-10)`,disabled:!B,children:(0,t.jsx)(i.ChevronsLeft,{className:"h-4 w-4"})}),(0,t.jsx)(u,{onClick:U,title:b("assets.lightbox.prev"),"aria-label":b("assets.lightbox.prev"),disabled:!T,children:(0,t.jsx)(n.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(R,O).map((e,a)=>{let r=R+a,s=r===g;return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||f(r)},title:e.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${s?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,t.jsx)("img",{src:e.url,alt:e.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},e.url+r)})}),(0,t.jsx)(u,{onClick:_,title:b("assets.lightbox.next"),"aria-label":b("assets.lightbox.next"),disabled:!P,children:(0,t.jsx)(l.ChevronRight,{className:"h-4 w-4"})}),$&&(0,t.jsx)(u,{onClick:H,title:`${b("assets.lightbox.next")} (+10)`,"aria-label":`${b("assets.lightbox.next")} (+10)`,disabled:!A,children:(0,t.jsx)(o,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,t.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*v),"%"]}),(0,t.jsx)(u,{onClick:W,title:b("assets.lightbox.reset"),"aria-label":b("assets.lightbox.reset"),disabled:1===v&&0===j.x&&0===j.y,children:(0,t.jsx)(c.RotateCcw,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,t.jsx)(u,{onClick:F,title:b("assets.lightbox.close"),"aria-label":b("assets.lightbox.close"),children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]})]})]});return(0,r.createPortal)(K,document.body)}],235357);var x=e.i(400355);e.i(254826);var m=e.i(309735),h=e.i(776639);e.s(["TextPreviewDialog",0,function({url:e,filename:r,open:s,onOpenChange:n}){let{t:l}=(0,d.useI18n)(),[i,o]=(0,a.useState)(null),[c,u]=(0,a.useState)(!1),[p,g]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!s||!e){o(null),g(null);return}let t=!1;return u(!0),g(null),o(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(o(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?g(l("assets.fileTooLarge")):g(l("assets.previewError")),u(!1))}),()=>{t=!0}},[s,e,l]);let f=r.split(".").pop()?.toLowerCase();return(0,t.jsx)(h.Dialog,{open:s,onOpenChange:n,children:(0,t.jsxs)(h.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:r}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(c)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(x.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:l("assets.loadingPreview")})]});if(p)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===i)return null;if("md"===f)return(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(m.Streamdown,{children:i})});if("json"===f){let e;try{e=JSON.stringify(JSON.parse(i),null,2)}catch{e=i}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:i})})()})]})})}],144640)},788147,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("401a8edde46c5000efe8ad48c7362805f155b29000",t.callServer,void 0,t.findSourceMapURL,"createTask");e.s(["createTask",0,a])},13517,727188,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40ca267cfc9bea6b8e39ed9929c2f6155c72a52450",t.callServer,void 0,t.findSourceMapURL,"getTaskNotes");e.s(["getTaskNotes",0,a],13517);let r=(0,t.createServerReference)("4044de41c35107216ec541819870d98be7659bd39c",t.callServer,void 0,t.findSourceMapURL,"getTaskAssets");e.s(["getTaskAssets",0,r],727188)},456346,419355,51517,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],456346);var a=e.i(514798);let r=(0,a.createServerReference)("400d6f299d957c2738b8385cf76acfa613b4e40c23",a.callServer,void 0,a.findSourceMapURL,"getProjectBranches");e.s(["getProjectBranches",0,r],419355);let s=(0,a.createServerReference)("405ea1a33bdc8d4de8dd77a7658e251d0c5ea666da",a.callServer,void 0,a.findSourceMapURL,"fetchRemoteBranches");e.s(["fetchRemoteBranches",0,s],51517)},744798,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(776639),s=e.i(519455),n=e.i(793479),l=e.i(624687),i=e.i(110204),o=e.i(226145),c=e.i(597746),d=e.i(456346),u=e.i(967489),x=e.i(337822),m=e.i(317056),h=e.i(533499),p=e.i(419355),g=e.i(51517),f=e.i(514798);let b=(0,f.createServerReference)("4004455e994abc095eb423df357e843bc62b614720",f.callServer,void 0,f.findSourceMapURL,"getCurrentBranch");var v=e.i(540405);e.s(["CreateTaskDialog",0,function({open:e,onOpenChange:f,onSubmit:y,onUpdate:j,defaultStatus:k="TODO",editTask:w,editTaskLabelIds:N,prefillFromTask:C,labels:S,projectType:I,projectLocalPath:D,versions:T,defaultVersionId:P}){let E,[M,L]=(0,a.useState)(""),[R,O]=(0,a.useState)(""),[$,B]=(0,a.useState)("MEDIUM"),[A,F]=(0,a.useState)(""),[U,_]=(0,a.useState)([]),[z,H]=(0,a.useState)([]),[V,G]=(0,a.useState)(!1),[W,Y]=(0,a.useState)(""),[X,J]=(0,a.useState)(!1),[K,q]=(0,a.useState)(!0),[Q,Z]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(null),{t:ea}=(0,h.useI18n)();(0,a.useEffect)(()=>{if(!e||w)return;let t=!1;return(0,v.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(e=>{if(t)return;let a=e["task.defaultUseWorktree"],r=e["task.defaultAutoStart"];"boolean"==typeof a&&q(a),"boolean"==typeof r&&Z(r)}).catch(()=>{}),()=>{t=!0}},[e,w]);let er=!!w,es=!!D;return(0,a.useEffect)(()=>{w?(L(w.title),O(w.description??""),B(w.priority),F(w.subPath??""),_(N??[]),et(w.versionId??null)):(C?(L(C.title??""),O(C.description??""),B(C.priority??"MEDIUM"),F(C.subPath??""),_(C.labelIds??[])):(L(""),O(""),B("MEDIUM"),F(""),_([])),et(P??null))},[w,N,C,P]),(0,a.useEffect)(()=>{e||w||(L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),J(!1),et(P??null))},[e,w,P]),(0,a.useEffect)(()=>{e&&es&&!w&&(G(!0),Promise.all([(0,p.getProjectBranches)(D),b(D)]).then(([e,t])=>{H(e);let a=C?.baseBranch??null;a&&e.includes(a)?Y(a):Y(t&&e.includes(t)?t:e[0]??""),G(!1),(0,g.fetchRemoteBranches)(D).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(D).then(e=>{H(e),Y(t=>e.includes(t)?t:e[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{H([]),Y(""),G(!1)}))},[e,es,D,w,C]),(0,t.jsx)(r.Dialog,{open:e,onOpenChange:f,disablePointerDismissal:!0,children:(0,t.jsxs)(r.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(r.DialogHeader,{children:(0,t.jsx)(r.DialogTitle,{children:er?ea("task.edit"):ea("task.create")})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"title",children:ea("task.title")}),(0,t.jsx)(n.Input,{id:"title","data-testid":"task-title",placeholder:ea("task.titlePlaceholder"),value:M,onChange:e=>L(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"description",children:ea("task.description")}),(0,t.jsx)(l.Textarea,{id:"description",placeholder:ea("task.descPlaceholder"),rows:4,value:R,onChange:e=>O(e.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"subPath",children:ea("task.subPath")}),(0,t.jsx)(n.Input,{id:"subPath",placeholder:ea("task.subPathPlaceholder"),value:A,onChange:e=>F(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:ea("task.subPathHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.priority")}),(0,t.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(e=>{let a={LOW:{label:ea("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ea("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ea("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ea("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[e];return(0,t.jsx)("button",{type:"button",onClick:()=>B(e),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${$===e?`${a.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:a.label},e)})})]}),es&&!er&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.baseBranch")}),V?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchLoading")}):z.length>0?(0,t.jsxs)(x.Popover,{open:X,onOpenChange:J,children:[(0,t.jsxs)(x.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,t.jsx)(o.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:W||void 0,children:W||ea("task.branchNone")}),(0,t.jsx)(d.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(x.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(m.Command,{children:[(0,t.jsx)(m.CommandInput,{placeholder:ea("task.branchSearch")}),(0,t.jsxs)(m.CommandList,{children:[(0,t.jsx)(m.CommandEmpty,{children:ea("task.branchNone")}),(0,t.jsx)(m.CommandGroup,{children:z.map(e=>(0,t.jsxs)(m.CommandItem,{value:e,onSelect:()=>{Y(e),J(!1)},children:[(0,t.jsx)(o.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===W&&(0,t.jsx)(c.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},e))})]})]})})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchNone")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.worktreeLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>q(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${K===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.worktreeYes"):ea("task.worktreeNo")},String(e)))})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.autoStartLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>Z(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Q===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.autoStartYes"):ea("task.autoStartNo")},String(e)))})]})]}),S.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:S.map(e=>{let a=U.includes(e.id);return(0,t.jsx)("button",{type:"button",onClick:()=>{_(t=>a?t.filter(t=>t!==e.id):[...t,e.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${a?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:e.color+"20",color:e.color,borderColor:a?e.color+"40":"transparent",borderWidth:"1px"},children:e.name},e.id)})})]}),(!er||T&&T.length>0)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("version.picker.label")}),T&&T.length>0?(0,t.jsxs)(u.Select,{value:ee??"__none__",onValueChange:e=>et("__none__"===e?null:e),children:[(0,t.jsx)(u.SelectTrigger,{children:(0,t.jsx)("span",{className:"truncate text-sm",children:ee&&(E=T.find(e=>e.id===ee))?E.isCurrent?`${E.number} \xb7 ${E.name} \xb7 ${ea("version.currentShort")}`:`${E.number} \xb7 ${E.name}`:ea("version.picker.none")})}),(0,t.jsxs)(u.SelectContent,{children:[(0,t.jsx)(u.SelectItem,{value:"__none__",children:ea("version.picker.none")}),T.map(e=>(0,t.jsx)(u.SelectItem,{value:e.id,children:e.isCurrent?`${e.number} \xb7 ${e.name} \xb7 ${ea("version.currentShort")}`:`${e.number} \xb7 ${e.name}`},e.id))]})]}):(0,t.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ea("version.picker.empty")})]})]}),(0,t.jsxs)(r.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>f(!1),children:ea("common.cancel")}),(0,t.jsx)(s.Button,{onClick:()=>{M.trim()&&(er&&j?j(w.id,{title:M,description:R,priority:$,labelIds:U,subPath:A.trim()||"",versionId:ee}):y({title:M,description:R,priority:$,status:k,labelIds:U,...es&&K&&W?{baseBranch:W}:{},...A.trim()?{subPath:A.trim()}:{},versionId:ee,autoStart:Q}),L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),q(!0),et(null),f(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:er?ea("common.save"):ea("common.create")})]})]})})}],744798)},997025,e=>{"use strict";var t=e.i(289721);e.i(254826);var a=e.i(309735),r=e.i(776639),s=e.i(533499);e.s(["NotePreviewDialog",0,function({note:e,open:n,onOpenChange:l}){let{t:i}=(0,s.useI18n)();return(0,t.jsx)(r.Dialog,{open:n,onOpenChange:l,children:(0,t.jsxs)(r.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:e?.title}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:e&&e.content.trim()?(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(a.Streamdown,{children:e.content})}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noteEmpty")})})]})})}])},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},297338,e=>{"use strict";let t=(0,e.i(572989).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",0,t],297338)},980376,52119,e=>{"use strict";var t=e.i(289721),a=e.i(225061),r=e.i(975157),s=e.i(519455),n=e.i(670123);function l({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function i({className:e,...s}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:c="right",showCloseButton:d=!0,...u}){return(0,t.jsxs)(l,{children:[(0,t.jsx)(i,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":c,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[o,d&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...s})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...s})}],980376);var o=e.i(514798);let c=(0,o.createServerReference)("406a761553f903b0d225d9d372bee72626c8d83b84",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,c],52119)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(980376),s=e.i(759684),n=e.i(487486),l=e.i(519455),i=e.i(533499),o=e.i(788147),c=e.i(52119),d=e.i(960793),u=e.i(13517),x=e.i(727188),m=e.i(910119),h=e.i(344083),p=e.i(107286),g=e.i(744798),f=e.i(997025),b=e.i(235357),v=e.i(144640),y=e.i(937304),j=e.i(685149),k=e.i(606393),w=e.i(875840),N=e.i(245697),C=e.i(12659),S=e.i(736061),I=e.i(460707),D=e.i(567860),T=e.i(645378),P=e.i(867533),E=e.i(297338),M=e.i(453889);function L({added:e,removed:a}){let{t:r}=(0,i.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:r("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var R=e.i(35967),O=e.i(360112);let $=/\.(txt|md|json)$/i;function B({text:e}){let{t:r}=(0,i.useI18n)(),[s,n]=(0,a.useState)(!1),[l,o]=(0,a.useState)(!1),c=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let e=c.current;e&&o(e.scrollHeight>e.clientHeight+1)},[]),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{ref:c,className:`text-sm text-foreground whitespace-pre-wrap ${s?"":"line-clamp-5"}`,children:e}),l&&(0,t.jsx)("button",{type:"button",onClick:()=>n(e=>!e),className:"mt-1 text-xs font-medium text-sky-600 hover:underline dark:text-sky-400",children:r(s?"taskDrawer.collapseDescription":"taskDrawer.expandDescription")})]})}e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:A,taskId:F,hideEnvActions:U=!1}){let{t:_}=(0,i.useI18n)(),[z,H]=(0,a.useState)(null),[V,G]=(0,a.useTransition)(),[W,Y]=(0,a.useState)(!1),[X,J]=(0,a.useState)([]),[K,q]=(0,a.useState)([]),[Q,Z]=(0,a.useState)(null),[ee,et]=(0,a.useState)([]),[ea,er]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!F||!e){H(null),q([]),et([]);return}(0,u.getTaskNotes)(F).then(e=>q(e.map(e=>({id:e.id,title:e.title,content:e.content,category:e.category})))).catch(()=>q([])),(0,x.getTaskAssets)(F).then(e=>et(e.map(e=>({id:e.id,filename:e.filename,path:e.path,mimeType:e.mimeType,size:e.size})))).catch(()=>et([])),G(async()=>{let e=await (0,c.getTaskOverview)(F);e&&(H(e),e.project?.workspaceId&&(0,d.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{J(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>J([])))})},[F,e]);let es=z?j.BOARD_COLUMNS.find(e=>e.id===z.status):null,en=z?j.PRIORITY_CONFIG[z.priority]:null,el=z?.executions?.[0]??null,ei=(()=>{if(el?.worktreePath)return el.worktreePath;let e=z?.project?.localPath;return e?z?.subPath?`${e}/${z.subPath}`:e:null})(),eo=(()=>{let e=el?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),ec=e=>(0,y.isImageAsset)(e.filename,e.mimeType)||$.test(e.filename),ed=e=>{ec(e)?er(e):O.toast.info(_("assets.previewNotSupported"))},eu=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));O.toast.error(e.error||_("git.openInFileManagerFailed"))}}catch{O.toast.error(_("git.openInFileManagerFailed"))}},ex=ea?(0,y.isImageAsset)(ea.filename,ea.mimeType)?"image":$.test(ea.filename)?"text":null:null,em=ee.filter(e=>(0,y.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,y.localPathToApiUrl)(e.path),filename:e.filename})),eh=ea?em.findIndex(e=>e.id===ea.id):-1,ep=async e=>{if(z?.project)try{let{autoStart:t,...a}=e;await (0,o.createTask)({...a,projectId:z.project.id}),O.toast.success(_("taskDrawer.duplicateSuccess")),Y(!1),A(!1)}catch{O.toast.error(_("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(r.Sheet,{open:e,onOpenChange:A,children:[(0,t.jsxs)(r.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(r.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:z?.title??""}),(0,t.jsx)(r.SheetDescription,{className:"sr-only",children:_("taskDrawer.title")}),z&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[es&&(0,t.jsxs)(n.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${es.color}`}),es.label]}),en&&(0,t.jsx)(n.Badge,{variant:"secondary",className:`text-xs ${en.color}`,children:en.label}),z.version&&(0,t.jsx)(R.TaskVersionTag,{number:z.version.number,name:z.version.name,showName:!0})]})]}),(0,t.jsx)(s.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:V&&!z?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:_("assets.loading")}):z?(0,t.jsxs)("div",{className:"p-4 pb-8 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:_("taskDrawer.description")}),z.description?(0,t.jsx)(B,{text:z.description},z.id):(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:_("taskDrawer.noDescription")})]}),z.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:_("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:z.labels.map(e=>(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(k.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:_("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(z.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(N.Package,{className:"h-3.5 w-3.5"}),_("taskDrawer.resources"),(0,t.jsx)("span",{className:"text-foreground",children:z._count.assets})]}),ee.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:ee.map(e=>{var a;let r=ec(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border px-2 py-1.5",children:[(0,t.jsx)(E.Paperclip,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("button",{type:"button",onClick:()=>ed(e),disabled:!r,className:`min-w-0 flex-1 truncate text-left text-sm ${r?"cursor-pointer hover:underline":"cursor-default"}`,title:r?_("assets.preview"):e.filename,children:e.filename}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:(a=e.size)?a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1024/1024).toFixed(1)} MB`:""}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[r&&(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>ed(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:_("assets.preview"),children:(0,t.jsx)(P.Eye,{className:"h-3 w-3"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>eu(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:_("assets.revealInFinder"),children:(0,t.jsx)(M.FolderOpen,{className:"h-3 w-3"})})]})]},e.id)})}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noResources")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(T.FileText,{className:"h-3.5 w-3.5"}),_("taskDrawer.notes")]}),K.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:K.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>Z(e),className:"group/note flex w-full items-start gap-2 rounded-md border border-border p-2 text-left transition-colors hover:bg-accent/40",title:_("taskDrawer.previewNote"),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:e.title}),e.content&&(0,t.jsx)("p",{className:"mt-0.5 line-clamp-2 whitespace-pre-wrap text-xs text-muted-foreground",children:e.content})]}),(0,t.jsx)(P.Eye,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/note:opacity-100"})]},e.id))}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noNotes")})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:_("taskDrawer.fileChanges")}),eo?(0,t.jsx)(L,{added:eo.added,removed:eo.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(C.PlayCircle,{className:"h-3.5 w-3.5"}),_("taskDrawer.lastExecution")]}),el?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:el.status}),el.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:el.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noExecution")})]}),ei&&!U&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,m.openInFileManager)(ei)}catch(e){console.error("openInFileManager failed:",e),O.toast.error(_("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(S.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInFileManager")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,h.openInEditor)(ei)}catch(e){console.error("openInEditor failed:",e),O.toast.error(_("git.openInEditorFailed"))}},children:[(0,t.jsx)(I.Code,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInEditor")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,p.openInTerminal)(ei)}catch(e){console.error("openInTerminal failed:",e),O.toast.error(_("git.openInTerminalFailed"))}},children:[(0,t.jsx)(D.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(l.Button,{variant:"default",className:"w-full",onClick:()=>{z&&Y(!0)},disabled:!z,children:[(0,t.jsx)(w.Copy,{className:"h-4 w-4"}),_("taskDrawer.duplicate")]})})]}):null})]}),z?.project&&(0,t.jsx)(g.CreateTaskDialog,{open:W,onOpenChange:Y,onSubmit:ep,labels:X,projectType:z.project.type,projectLocalPath:z.project.localPath,prefillFromTask:{title:z.title,description:z.description,priority:z.priority,subPath:z.subPath,labelIds:z.labels.map(e=>e.label.id),baseBranch:z.baseBranch}}),(0,t.jsx)(f.NotePreviewDialog,{note:Q,open:null!==Q,onOpenChange:e=>{e||Z(null)}}),(0,t.jsx)(b.ImageLightbox,{imageUrl:"image"===ex&&eh>=0?em[eh].url:null,filename:"image"===ex&&eh>=0?em[eh].filename:"",open:"image"===ex,onOpenChange:e=>{e||er(null)},assets:em.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:eh>=0?eh:void 0,onIndexChange:e=>{let t=em[e];if(!t)return;let a=ee.find(e=>e.id===t.id);a&&er(a)}}),(0,t.jsx)(v.TextPreviewDialog,{url:"text"===ex&&ea?(0,y.localPathToApiUrl)(ea.path):null,filename:ea?.filename??"",open:"text"===ex,onOpenChange:e=>{e||er(null)}})]})}],605005)}]);
|
|
@@ -63,4 +63,4 @@ out vec4 outColor;
|
|
|
63
63
|
|
|
64
64
|
void main() {
|
|
65
65
|
outColor = v_color;
|
|
66
|
-
}`,tu=8*Float32Array.BYTES_PER_ELEMENT,t_=class{constructor(){this.attributes=new Float32Array(160),this.count=0}},tf=0,tg=0,tv=0,tp=0,tm=0,tx=0,tw=0,tC=class extends R{constructor(e,t,i,s){super(),this._terminal=e,this._gl=t,this._dimensions=i,this._themeService=s,this._vertices=new t_,this._verticesCursor=new t_;let r=this._gl;this._program=ee(e7(r,tc,td)),this._register(S(()=>r.deleteProgram(this._program))),this._projectionLocation=ee(r.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=r.createVertexArray(),r.bindVertexArray(this._vertexArrayObject);let n=new Float32Array([0,0,1,0,0,1,1,1]),o=r.createBuffer();this._register(S(()=>r.deleteBuffer(o))),r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,n,r.STATIC_DRAW),r.enableVertexAttribArray(3),r.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let a=new Uint8Array([0,1,2,3]),h=r.createBuffer();this._register(S(()=>r.deleteBuffer(h))),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,h),r.bufferData(r.ELEMENT_ARRAY_BUFFER,a,r.STATIC_DRAW),this._attributesBuffer=ee(r.createBuffer()),this._register(S(()=>r.deleteBuffer(this._attributesBuffer))),r.bindBuffer(r.ARRAY_BUFFER,this._attributesBuffer),r.enableVertexAttribArray(0),r.vertexAttribPointer(0,2,r.FLOAT,!1,tu,0),r.vertexAttribDivisor(0,1),r.enableVertexAttribArray(1),r.vertexAttribPointer(1,2,r.FLOAT,!1,tu,2*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(1,1),r.enableVertexAttribArray(2),r.vertexAttribPointer(2,4,r.FLOAT,!1,tu,4*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(2,1),this._updateCachedColors(s.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,e6),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,i=this._vertices,s=1,r,n,o,a,h,l,c,d,u,_,f;for(r=0;r<t.rows;r++){for(o=-1,a=0,h=0,l=!1,n=0;n<t.cols;n++)c=(r*t.cols+n)*4,d=e.cells[c+1],_=!!(0x4000000&(u=e.cells[c+2])),(d!==a||u!==h&&(l||_))&&((0!==a||l&&0!==h)&&(f=8*s++,this._updateRectangle(i,f,h,a,o,n,r)),o=n,a=d,h=u,l=_);(0!==a||l&&0!==h)&&(f=8*s++,this._updateRectangle(i,f,h,a,o,t.cols,r))}i.count=s}updateCursor(e){let t=this._verticesCursor,i=e.cursor;if(!i||"block"===i.style){t.count=0;return}let s,r=0;("bar"===i.style||"outline"===i.style)&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,"bar"===i.style?i.dpr*i.cursorWidth:i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),("underline"===i.style||"outline"===i.style)&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,(i.y+1)*this._dimensions.device.cell.height-i.dpr,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat)),"outline"===i.style&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat),s=8*r++,this._addRectangleFloat(t.attributes,s,(i.x+i.width)*this._dimensions.device.cell.width-i.dpr,i.y*this._dimensions.device.cell.height,i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=r}_updateRectangle(e,t,i,s,r,n,o){if(0x4000000&i)switch(0x3000000&i){case 0x1000000:case 0x2000000:tf=this._themeService.colors.ansi[255&i].rgba;break;case 0x3000000:tf=(0xffffff&i)<<8;break;default:tf=this._themeService.colors.foreground.rgba}else switch(0x3000000&s){case 0x1000000:case 0x2000000:tf=this._themeService.colors.ansi[255&s].rgba;break;case 0x3000000:tf=(0xffffff&s)<<8;break;default:tf=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=function(e,t){let i=new Float32Array(Math.min(2*e.length,t));for(let t=0;t<e.length;t++)i[t]=e[t];return i}(e.attributes,this._terminal.rows*this._terminal.cols*8)),tg=r*this._dimensions.device.cell.width,tv=o*this._dimensions.device.cell.height,tp=(tf>>24&255)/255,tm=(tf>>16&255)/255,tx=(tf>>8&255)/255,tw=1,this._addRectangle(e.attributes,t,tg,tv,(n-r)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,tp,tm,tx,tw)}_addRectangle(e,t,i,s,r,n,o,a,h,l){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=a,e[t+6]=h,e[t+7]=l}_addRectangleFloat(e,t,i,s,r,n,o){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(255&e.rgba)/255])}},tb=class extends R{constructor(e,t,i,s,r,n,o,a){super(),this._container=t,this._alpha=r,this._coreBrowserService=n,this._optionsService=o,this._themeService=a,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${i}-layer`),this._canvas.style.zIndex=s.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(t=>{this._refreshCharAtlas(e,t),this.reset(e)})),this._register(S(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=ee(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,i){}handleSelectionChanged(e,t,i,s=!1){}_setTransparency(e,t){if(t===this._alpha)return;let i=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=e1(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,i=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,i*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,i,s){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight))}_fillCharTrueColor(e,t,i,s){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=ep,this._clipCell(i,s,t.getWidth()),this._ctx.fillText(t.getChars(),i*this._deviceCellWidth+this._deviceCharLeft,s*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,i){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,i){let s=t?e.options.fontWeightBold:e.options.fontWeight;return`${i?"italic":""} ${s} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},tL=class extends tb{constructor(e,t,i,s,r,n,o){super(i,e,"link",t,!0,r,n,o),this._register(s.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(s.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){var t;if(257===e.fg?this._ctx.fillStyle=this._themeService.colors.background.css:void 0!==e.fg&&((0x3000000&(t=e.fg))==0x1000000||(0x3000000&t)==0x2000000)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},ty="object"==typeof window?window:globalThis,tM=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new eV,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new eV,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let i=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(i,e),this._onDidChangeZoomLevel.fire(i)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let i=this.getWindowId(t);this.mapWindowIdToFullScreen.set(i,e),this._onDidChangeFullscreen.fire(i)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};tM.INSTANCE=new tM,tM.INSTANCE.onDidChangeZoomLevel,tM.INSTANCE.onDidChangeFullscreen;var tS="object"==typeof navigator?navigator.userAgent:"";tS.indexOf("Firefox"),tS.indexOf("AppleWebKit"),tS.indexOf("Chrome")>=0||tS.indexOf("Safari"),tS.indexOf("Electron/"),tS.indexOf("Android");var tA=!1;if("function"==typeof ty.matchMedia){let e=ty.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=ty.matchMedia("(display-mode: fullscreen)");tA=e.matches,tR=e,"string"==typeof tR&&(tR=ty.matchMedia(tR)),tR.addEventListener("change",({matches:e})=>{tA&&t.matches||(tA=e)})}var tR,tT,tk,tE=!1,tB=!1,tP="en",t$=globalThis;"u">typeof t$.vscode&&"u">typeof t$.vscode.process?tk=t$.vscode.process:"u">typeof _.default&&"string"==typeof _.default?.versions?.node&&(tk=_.default);var tD="string"==typeof tk?.versions?.electron&&tk?.type==="renderer";if("object"==typeof tk){tk.platform,tk.platform,"linux"===tk.platform&&tk.env.SNAP&&tk.env.SNAP_REVISION,tk.env.CI||tk.env.BUILD_ARTIFACTSTAGINGDIRECTORY,tP="en";let e=tk.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,tP=t.resolvedLanguage||"en",t.languagePack?.translationsConfigFile}catch{}tE=!0}else"object"!=typeof navigator||tD?console.error("Unable to resolve platform."):((tT=navigator.userAgent).indexOf("Windows"),tT.indexOf("Macintosh"),(tT.indexOf("Macintosh")>=0||tT.indexOf("iPad")>=0||tT.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,tT.indexOf("Linux"),tT?.indexOf("Mobi"),tB=!0,tP=globalThis._VSCODE_NLS_LANGUAGE||"en",navigator.language.toLowerCase());var tF=tE;tB&&"function"==typeof t$.importScripts&&t$.origin;var tW,tI=tT,tO=tP;(tY=tW||={}).value=function(){return tO},tY.isDefaultVariant=function(){return 2===tO.length?"en"===tO:tO.length>=3&&"e"===tO[0]&&"n"===tO[1]&&"-"===tO[2]},tY.isDefault=function(){return"en"===tO};var tz="function"==typeof t$.postMessage&&!t$.importScripts,tU=(()=>{if(tz){let e=[];t$.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,s=e.length;i<s;i++){let s=e[i];if(s.id===t.data.vscodeScheduleAsyncWork){e.splice(i,1),s.callback();return}}});let t=0;return i=>{let s=++t;e.push({id:s,callback:i}),t$.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})(),tN=!!(tI&&tI.indexOf("Chrome")>=0);tI&&tI.indexOf("Firefox"),!tN&&tI&&tI.indexOf("Safari"),tI&&tI.indexOf("Edg/"),tI&&tI.indexOf("Android");var tq="object"==typeof navigator?navigator:{};tF||document.queryCommandSupported&&document.queryCommandSupported("copy")||tq&&tq.clipboard&&tq.clipboard.writeText,tF||tq&&tq.clipboard&&tq.clipboard.readText,tF||tA||tq.keyboard,"ontouchstart"in ty||tq.maxTouchPoints,ty.PointerEvent&&("ontouchstart"in ty||navigator.maxTouchPoints);var tG=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},tH=new tG,tj=new tG,tV=new tG;(tX=tZ||={}).toString=function(e){return tH.keyCodeToStr(e)},tX.fromString=function(e){return tH.strToKeyCode(e)},tX.toUserSettingsUS=function(e){return tj.keyCodeToStr(e)},tX.toUserSettingsGeneral=function(e){return tV.keyCodeToStr(e)},tX.fromUserSettings=function(e){return tj.strToKeyCode(e)||tV.strToKeyCode(e)},tX.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return tH.keyCodeToStr(e)};var tY,tX,tZ,tQ,tK=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}});(o=tQ||={}).isCancellationToken=function(e){return e===o.None||e===o.Cancelled||e instanceof tJ||!!e&&"object"==typeof e&&"boolean"==typeof e.isCancellationRequested&&"function"==typeof e.onCancellationRequested},o.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:eO.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:tK});var tJ=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?tK:(this._emitter||(this._emitter=new eV),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};Symbol("MicrotaskDelay"),(a=h||={}).settled=async function(e){let t,i=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||(t=e)})));if("u">typeof t)throw t;return i},a.withAsyncBody=function(e){return new Promise(async(t,i)=>{try{await e(t,i)}catch(e){i(e)}})};var t0=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let i of t)e.emitOne(i)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new eV,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(1===this._state)return{done:!0,value:void 0};await eO.toPromise(this._onStateChanged.event)}},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,i){return new e(async e=>{for await(let s of t)e.emitOne(i(s))})}map(t){return e.map(this,t)}static filter(t,i){return new e(async e=>{for await(let s of t)i(s)&&e.emitOne(s)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let i of e)t.push(i);return t}toPromise(){return e.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}};t0.EMPTY=t0.fromArray([]);function t5(e,t){return(t<<5)-t+e|0}function t1(e,t){t=t5(149417,t);for(let i=0,s=e.length;i<s;i++)t=t5(e.charCodeAt(i),t);return t}new DataView(new ArrayBuffer(320));var{registerWindow:t2,getWindow:t3,getDocument:t4,getWindows:t8,getWindowsCount:t6,getWindowId:t7,getWindowById:t9,hasWindow:ie,onDidRegisterWindow:it,onWillUnregisterWindow:ii,onDidUnregisterWindow:is}=(t=new Map,i={window:ty,disposables:new A},t.set(ty.vscodeWindowId,i),s=new eV,r=new eV,n=new eV,{onDidRegisterWindow:s.event,onWillUnregisterWindow:n.event,onDidUnregisterWindow:r.event,registerWindow(e){var i,o;if(t.has(e.vscodeWindowId))return R.None;let a=new A,h={window:e,disposables:a.add(new A)};return t.set(e.vscodeWindowId,h),a.add(S(()=>{t.delete(e.vscodeWindowId),r.fire(e)})),a.add((i=e,o=ia.BEFORE_UNLOAD,new ir(i,o,()=>{n.fire(e)},void 0))),s.fire(h),a},getWindows:()=>t.values(),getWindowsCount:()=>t.size,getWindowId:e=>e.vscodeWindowId,hasWindow:e=>t.has(e),getWindowById:function(e,s){return("number"==typeof e?t.get(e):void 0)??(s?i:void 0)},getWindow:e=>e?.ownerDocument?.defaultView?e.ownerDocument.defaultView.window:e?.view?e.view.window:ty,getDocument:e=>t3(e).document}),ir=class{constructor(e,t,i,s){this._node=e,this._type=t,this._handler=i,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}},io=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,i=this.height){return t!==this.width||i!==this.height?new e(t,i):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t||!!e&&!!t&&e.width===t.width&&e.height===t.height}};io.None=new io(0,0),new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let s=this.mutationObservers.get(e);s||(s=new Map,this.mutationObservers.set(e,s));let r=function e(t,i){switch(typeof t){case"object":var s,r,n,o;return null===t?t5(349,i):Array.isArray(t)?(s=t,r=t5(104579,r=i),s.reduce((t,i)=>e(i,t),r)):(n=t,o=t5(181387,o=i),Object.keys(n).sort().reduce((t,i)=>(t=t1(i,t),e(n[i],t)),o));case"string":return t1(t,i);case"boolean":return t5(t?433:863,i);case"number":return t5(t,i);case"undefined":return t5(937,i);default:return t5(617,i)}}(i,0),n=s.get(r);if(n)n.users+=1;else{let o=new eV,a=new MutationObserver(e=>o.fire(e));a.observe(e,i);let h=n={users:1,observer:a,onDidMutate:o.event};t.add(S(()=>{h.users-=1,0===h.users&&(o.dispose(),a.disconnect(),s?.delete(r),s?.size===0&&this.mutationObservers.delete(e))})),s.set(r,n)}return n.onDidMutate}};var ia={BEFORE_UNLOAD:"beforeunload"},ih=class extends R{constructor(e,t,i,s,r,n,o,a,h){if(super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=i,this._coreBrowserService=s,this._coreService=r,this._decorationService=n,this._optionsService=o,this._themeService=a,this._cursorBlinkStateManager=new T,this._charAtlasDisposable=this._register(new T),this._observerDisposable=this._register(new T),this._model=new tl,this._workCell=new e8,this._workCell2=new e8,this._rectangleRenderer=this._register(new T),this._glyphRenderer=this._register(new T),this._onChangeTextureAtlas=this._register(new eV),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new eV),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new eV),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new eV),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new eV),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._gl=this._canvas.getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:h}),!this._gl)throw Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new ev(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new tL(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions={css:{canvas:es(),cell:es()},device:{canvas:es(),cell:es(),char:{width:0,height:0,left:0,top:0}}},this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(o.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(function(e,t,i){return new ir(e,t,i,void 0)}(this._canvas,"webglcontextlost",e=>{console.log("webglcontextlost event received"),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(e)},3e3)})),this._register(function(e,t,i){return new ir(e,t,i,void 0)}(this._canvas,"webglcontextrestored",e=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,e2(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=e4(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=e4(this._canvas,e,(e,t)=>this._setCanvasDevicePixelDimensions(e,t))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(S(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),e2(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){for(let e of(this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows),this._renderLayers))e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,i){for(let s of this._renderLayers)s.handleSelectionChanged(this._terminal,e,t,i);this._model.selection.update(this._core,e,t,i),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new tC(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new ta(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=e1(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=M(eO.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),eO.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){for(let e of(this._clearModel(!0),this._renderLayers))e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached)if(!this._core.screenElement?.isConnected||!this._charSizeService.width||!this._charSizeService.height)return;else this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;for(let i of this._renderLayers)i.handleGridChanged(this._terminal,e,t);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new e3(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let i=this._core,s=this._workCell,r,n,o,a,h,l,c=0,d=!0,u,_,f,g,v,p,m,x,w;e=ic(e,i.rows-1,0),t=ic(t,i.rows-1,0);let C=this._coreService.decPrivateModes.cursorStyle??i.options.cursorStyle??"block",b=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,L=b-i.buffer.ydisp,y=Math.min(this._terminal.buffer.active.cursorX,i.cols-1),M=-1,S=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let A=!1;for(n=e;n<=t;n++)for(o=n+i.buffer.ydisp,a=i.buffer.lines.get(o),this._model.lineLengths[n]=0,f=b===o,c=0,h=this._characterJoinerService.getJoinedCharacters(o),x=0;x<i.cols;x++){if(r=this._cellColorResolver.result.bg,a.loadCell(x,s),0===x&&(r=this._cellColorResolver.result.bg),l=!1,d=x>=c,u=x,h.length>0&&x===h[0][0]&&d){_=h.shift();let e=this._model.selection.isCellSelected(this._terminal,_[0],o);for(m=_[0]+1;m<_[1];m++)d&&=e===this._model.selection.isCellSelected(this._terminal,m,o);(d&&=!f||y<_[0]||y>=_[1])?(l=!0,s=new il(s,a.translateToString(!0,_[0],_[1]),_[1]-_[0]),u=_[1]-1):c=_[1]}if(g=s.getChars(),v=s.getCode(),m=(n*i.cols+x)*4,this._cellColorResolver.resolve(s,x,o,this.dimensions.device.cell.width),S&&o===b&&(x===y&&(this._model.cursor={x:y,y:L,width:s.getWidth(),style:this._coreBrowserService.isFocused?C:i.options.cursorInactiveStyle,cursorWidth:i.options.cursorWidth,dpr:this._devicePixelRatio},M=y+s.getWidth()-1),x>=y&&x<=M&&(this._coreBrowserService.isFocused&&"block"===C||!1===this._coreBrowserService.isFocused&&"block"===i.options.cursorInactiveStyle)&&(this._cellColorResolver.result.fg=0x3000000|this._themeService.colors.cursorAccent.rgba>>8&0xffffff,this._cellColorResolver.result.bg=0x3000000|this._themeService.colors.cursor.rgba>>8&0xffffff)),0!==v&&(this._model.lineLengths[n]=x+1),(this._model.cells[m]!==v||this._model.cells[m+1]!==this._cellColorResolver.result.bg||this._model.cells[m+2]!==this._cellColorResolver.result.fg||this._model.cells[m+3]!==this._cellColorResolver.result.ext)&&(A=!0,g.length>1&&(v|=0x80000000),this._model.cells[m]=v,this._model.cells[m+1]=this._cellColorResolver.result.bg,this._model.cells[m+2]=this._cellColorResolver.result.fg,this._model.cells[m+3]=this._cellColorResolver.result.ext,p=s.getWidth(),this._glyphRenderer.value.updateCell(x,n,v,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,g,p,r),l)){for(s=this._workCell,x++;x<=u;x++)w=(n*i.cols+x)*4,this._glyphRenderer.value.updateCell(x,n,0,0,0,0,"",0,0),this._model.cells[w]=0,this._model.cells[w+1]=this._cellColorResolver.result.bg,this._model.cells[w+2]=this._cellColorResolver.result.fg,this._model.cells[w+3]=this._cellColorResolver.result.ext;x--}}A&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=1===this._optionsService.rawOptions.lineHeight?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},il=class extends eB{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function ic(e,t,i=0){return Math.max(Math.min(e,t),i)}var id="di$target",iu="di$dependencies",i_=new Map;function ig(e){if(i_.has(e))return i_.get(e);let t=function(e,i,s){var r,n,o;if(3!=arguments.length)throw Error("@IServiceName-decorator can only be used to decorate a parameter");r=t,n=e,o=s,n[id]===n?n[iu].push({id:r,index:o}):(n[iu]=[{id:r,index:o}],n[id]=n)};return t._id=e,i_.set(e,t),t}ig("BufferService"),ig("CoreMouseService"),ig("CoreService"),ig("CharsetService"),ig("InstantiationService"),ig("LogService");var iv=ig("OptionsService");ig("OscLinkService"),ig("UnicodeService"),ig("DecorationService");var ip={trace:0,debug:1,info:2,warn:3,error:4,off:5},im=class extends R{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=ip[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)"function"==typeof e[t]&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+t,...i)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};im=((e,t,i,s)=>{for(var r,n=s>1?void 0:s?g(t,i):t,o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s?r(t,i,n):r(n))||n);return s&&n&&f(t,i,n),n})([(e,t)=>iv(e,t,0)],im);var ix=class extends R{constructor(e){if(D&&16>function(){if(!D)return 0;let e=E.match(/Version\/(\d+)/);return null===e||e.length<2?0:parseInt(e[1])}()&&!document.createElement("canvas").getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error("Webgl2 is only supported on Safari 16 and above");super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new eV),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new eV),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new eV),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new eV),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element)return void this._register(t.onWillOpen(()=>this.activate(e)));this._terminal=e;let i=t.coreService,s=t.optionsService,r=t._renderService,n=t._characterJoinerService,o=t._charSizeService,a=t._coreBrowserService,h=t._decorationService,l=t._logService,c=t._themeService;this._renderer=this._register(new ih(e,n,o,a,i,h,s,c,this._preserveDrawingBuffer)),this._register(eO.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(eO.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(eO.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(eO.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),r.setRenderer(this._renderer),this._register(S(()=>{if(this._terminal._core._store._isDisposed)return;let t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},iw=e.i(821957),iC=e.i(533499),ib=e.i(218526),iL=e.i(636121);e.s(["TaskTerminal",0,function({taskId:e,worktreePath:t,onSessionEnd:i,useCanvasRenderer:s=!1,onReady:r}){let{t:n}=(0,iC.useI18n)(),{resolvedTheme:o}=(0,iw.useTheme)(),a=(0,c.useRef)(null),h=(0,c.useRef)(null),_=(0,c.useRef)(null),f=(0,c.useRef)(null),g=(0,c.useRef)(i);g.current=i;let v=(0,c.useRef)(r);v.current=r;let[p,m]=(0,c.useState)("connecting"),[x,w]=(0,c.useState)(!1);if((0,c.useEffect)(()=>{if(!t||!a.current)return;let i="light"!==o,r=new d.Terminal({fontFamily:"Menlo, Monaco, 'Courier New', monospace",fontSize:13,scrollback:2e3,cursorBlink:!0,allowTransparency:!1,rescaleOverlappingGlyphs:!0,theme:i?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}}),n=new u.FitAddon;r.loadAddon(n),r.open(a.current);let l=a.current.querySelector(".xterm-helper-textarea");l&&(l.style.opacity="0");let c=null;if(!s)try{(c=new ix).onContextLoss(()=>{c?.dispose(),c=null}),r.loadAddon(c)}catch{}n.fit(),r.focus();let p=null,x=null,C=!1,b=null,L=!1;return(0,iL.getConfigValues)(["terminal.fontSize","terminal.fontFamily"]).then(e=>{if(C)return;let t=Number(e["terminal.fontSize"]),i=e["terminal.fontFamily"];Number.isFinite(t)&&t>0&&(r.options.fontSize=t),"string"==typeof i&&i.trim()&&(r.options.fontFamily=i);try{n.fit()}catch{}}).catch(()=>{}),(0,ib.getActualWsPort)().then(t=>{C||function t(i){if(C||L)return;m("connecting");let s=new WebSocket(`ws://localhost:${i}/terminal?taskId=${encodeURIComponent(e)}`);p=s,s.addEventListener("open",()=>{s.send(JSON.stringify({type:"resize",cols:r.cols,rows:r.rows})),r.focus(),m("connected"),w(!0),setTimeout(()=>w(!1),2e3)}),s.addEventListener("message",e=>{let t=e.data;"string"==typeof t?r.write(t):t instanceof Blob?t.text().then(e=>r.write(e)):t instanceof ArrayBuffer&&r.write(new Uint8Array(t))}),x?.dispose(),x=r.onData(e=>{s.readyState===WebSocket.OPEN&&s.send(e)}),s.addEventListener("close",e=>{if(e.code>=4e3){L=!0,m("disconnected"),g.current?.(e.code-4e3);return}m("disconnected"),C||L||(b=setTimeout(()=>t(i),3e3))}),s.addEventListener("error",()=>{}),_.current=s}(t)}),h.current=r,f.current=n,v.current?.({focus:()=>r.focus(),blur:()=>r.blur()}),()=>{C=!0,v.current?.(null),b&&clearTimeout(b),x?.dispose(),c?.dispose(),n.dispose(),r.dispose(),p?.close(),h.current=null,_.current=null,f.current=null}},[e,t]),(0,c.useEffect)(()=>{if(!t||!a.current)return;let e=f.current,i=_.current,s=h.current;e&&s&&requestAnimationFrame(()=>{e.fit(),i?.readyState===WebSocket.OPEN&&i.send(JSON.stringify({type:"resize",cols:s.cols,rows:s.rows}))});let r=null,n=a.current,o=new ResizeObserver(()=>{r&&clearTimeout(r),r=setTimeout(()=>{let e=f.current,t=_.current,i=h.current;e&&i&&(e.fit(),t?.readyState===WebSocket.OPEN&&t.send(JSON.stringify({type:"resize",cols:i.cols,rows:i.rows})))},100)});return o.observe(n),()=>{r&&clearTimeout(r),o.disconnect()}},[e,t]),(0,c.useEffect)(()=>{let e=h.current;if(!e)return;let t="light"!==o;e.options.theme=t?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}},[o]),!t)return(0,l.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center bg-[#fafafa] dark:bg-[#0a0a0a] text-center",children:[(0,l.jsx)("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:n("terminal.noWorktree")}),(0,l.jsx)("p",{className:"text-xs text-neutral-400 dark:text-neutral-600 mt-1",children:n("terminal.noWorktreeDesc")})]});let C=n("connected"===p?"terminal.connected":"connecting"===p?"terminal.connecting":"terminal.disconnected");return(0,l.jsxs)("div",{className:"relative h-full w-full bg-[#fafafa] dark:bg-[#0a0a0a]",children:[(0,l.jsxs)("div",{className:["absolute right-3 top-3 z-10 flex items-center gap-1.5 rounded px-2 py-0.5 text-xs transition-opacity duration-500","connected"===p&&!x?"opacity-0 pointer-events-none":"opacity-100","bg-white/60 dark:bg-black/40 backdrop-blur-sm"].join(" "),title:C,children:[(0,l.jsx)("span",{className:`h-2 w-2 rounded-full ${"connected"===p?"bg-green-500":"connecting"===p?"bg-yellow-500":"bg-red-500"}`}),(0,l.jsx)("span",{className:"text-neutral-600 dark:text-neutral-300",children:C})]}),(0,l.jsx)("div",{ref:a,className:"h-full w-full overflow-hidden"})]})}],85890)},346069,e=>{e.n(e.i(85890))}]);
|
|
66
|
+
}`,tu=8*Float32Array.BYTES_PER_ELEMENT,t_=class{constructor(){this.attributes=new Float32Array(160),this.count=0}},tf=0,tg=0,tv=0,tp=0,tm=0,tx=0,tw=0,tC=class extends R{constructor(e,t,i,s){super(),this._terminal=e,this._gl=t,this._dimensions=i,this._themeService=s,this._vertices=new t_,this._verticesCursor=new t_;let r=this._gl;this._program=ee(e7(r,tc,td)),this._register(S(()=>r.deleteProgram(this._program))),this._projectionLocation=ee(r.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=r.createVertexArray(),r.bindVertexArray(this._vertexArrayObject);let n=new Float32Array([0,0,1,0,0,1,1,1]),o=r.createBuffer();this._register(S(()=>r.deleteBuffer(o))),r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,n,r.STATIC_DRAW),r.enableVertexAttribArray(3),r.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let a=new Uint8Array([0,1,2,3]),h=r.createBuffer();this._register(S(()=>r.deleteBuffer(h))),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,h),r.bufferData(r.ELEMENT_ARRAY_BUFFER,a,r.STATIC_DRAW),this._attributesBuffer=ee(r.createBuffer()),this._register(S(()=>r.deleteBuffer(this._attributesBuffer))),r.bindBuffer(r.ARRAY_BUFFER,this._attributesBuffer),r.enableVertexAttribArray(0),r.vertexAttribPointer(0,2,r.FLOAT,!1,tu,0),r.vertexAttribDivisor(0,1),r.enableVertexAttribArray(1),r.vertexAttribPointer(1,2,r.FLOAT,!1,tu,2*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(1,1),r.enableVertexAttribArray(2),r.vertexAttribPointer(2,4,r.FLOAT,!1,tu,4*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(2,1),this._updateCachedColors(s.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,e6),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,i=this._vertices,s=1,r,n,o,a,h,l,c,d,u,_,f;for(r=0;r<t.rows;r++){for(o=-1,a=0,h=0,l=!1,n=0;n<t.cols;n++)c=(r*t.cols+n)*4,d=e.cells[c+1],_=!!(0x4000000&(u=e.cells[c+2])),(d!==a||u!==h&&(l||_))&&((0!==a||l&&0!==h)&&(f=8*s++,this._updateRectangle(i,f,h,a,o,n,r)),o=n,a=d,h=u,l=_);(0!==a||l&&0!==h)&&(f=8*s++,this._updateRectangle(i,f,h,a,o,t.cols,r))}i.count=s}updateCursor(e){let t=this._verticesCursor,i=e.cursor;if(!i||"block"===i.style){t.count=0;return}let s,r=0;("bar"===i.style||"outline"===i.style)&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,"bar"===i.style?i.dpr*i.cursorWidth:i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),("underline"===i.style||"outline"===i.style)&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,(i.y+1)*this._dimensions.device.cell.height-i.dpr,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat)),"outline"===i.style&&(s=8*r++,this._addRectangleFloat(t.attributes,s,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat),s=8*r++,this._addRectangleFloat(t.attributes,s,(i.x+i.width)*this._dimensions.device.cell.width-i.dpr,i.y*this._dimensions.device.cell.height,i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=r}_updateRectangle(e,t,i,s,r,n,o){if(0x4000000&i)switch(0x3000000&i){case 0x1000000:case 0x2000000:tf=this._themeService.colors.ansi[255&i].rgba;break;case 0x3000000:tf=(0xffffff&i)<<8;break;default:tf=this._themeService.colors.foreground.rgba}else switch(0x3000000&s){case 0x1000000:case 0x2000000:tf=this._themeService.colors.ansi[255&s].rgba;break;case 0x3000000:tf=(0xffffff&s)<<8;break;default:tf=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=function(e,t){let i=new Float32Array(Math.min(2*e.length,t));for(let t=0;t<e.length;t++)i[t]=e[t];return i}(e.attributes,this._terminal.rows*this._terminal.cols*8)),tg=r*this._dimensions.device.cell.width,tv=o*this._dimensions.device.cell.height,tp=(tf>>24&255)/255,tm=(tf>>16&255)/255,tx=(tf>>8&255)/255,tw=1,this._addRectangle(e.attributes,t,tg,tv,(n-r)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,tp,tm,tx,tw)}_addRectangle(e,t,i,s,r,n,o,a,h,l){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=a,e[t+6]=h,e[t+7]=l}_addRectangleFloat(e,t,i,s,r,n,o){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=s/this._dimensions.device.canvas.height,e[t+2]=r/this._dimensions.device.canvas.width,e[t+3]=n/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(255&e.rgba)/255])}},tb=class extends R{constructor(e,t,i,s,r,n,o,a){super(),this._container=t,this._alpha=r,this._coreBrowserService=n,this._optionsService=o,this._themeService=a,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${i}-layer`),this._canvas.style.zIndex=s.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(t=>{this._refreshCharAtlas(e,t),this.reset(e)})),this._register(S(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=ee(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,i){}handleSelectionChanged(e,t,i,s=!1){}_setTransparency(e,t){if(t===this._alpha)return;let i=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=e1(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,i=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,i*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,i,s){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,s*this._deviceCellHeight))}_fillCharTrueColor(e,t,i,s){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=ep,this._clipCell(i,s,t.getWidth()),this._ctx.fillText(t.getChars(),i*this._deviceCellWidth+this._deviceCharLeft,s*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,i){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,i){let s=t?e.options.fontWeightBold:e.options.fontWeight;return`${i?"italic":""} ${s} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},tL=class extends tb{constructor(e,t,i,s,r,n,o){super(i,e,"link",t,!0,r,n,o),this._register(s.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(s.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){var t;if(257===e.fg?this._ctx.fillStyle=this._themeService.colors.background.css:void 0!==e.fg&&((0x3000000&(t=e.fg))==0x1000000||(0x3000000&t)==0x2000000)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},ty="object"==typeof window?window:globalThis,tM=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new eV,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new eV,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let i=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(i,e),this._onDidChangeZoomLevel.fire(i)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let i=this.getWindowId(t);this.mapWindowIdToFullScreen.set(i,e),this._onDidChangeFullscreen.fire(i)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};tM.INSTANCE=new tM,tM.INSTANCE.onDidChangeZoomLevel,tM.INSTANCE.onDidChangeFullscreen;var tS="object"==typeof navigator?navigator.userAgent:"";tS.indexOf("Firefox"),tS.indexOf("AppleWebKit"),tS.indexOf("Chrome")>=0||tS.indexOf("Safari"),tS.indexOf("Electron/"),tS.indexOf("Android");var tA=!1;if("function"==typeof ty.matchMedia){let e=ty.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=ty.matchMedia("(display-mode: fullscreen)");tA=e.matches,tR=e,"string"==typeof tR&&(tR=ty.matchMedia(tR)),tR.addEventListener("change",({matches:e})=>{tA&&t.matches||(tA=e)})}var tR,tT,tk,tE=!1,tB=!1,tP="en",t$=globalThis;"u">typeof t$.vscode&&"u">typeof t$.vscode.process?tk=t$.vscode.process:"u">typeof _.default&&"string"==typeof _.default?.versions?.node&&(tk=_.default);var tD="string"==typeof tk?.versions?.electron&&tk?.type==="renderer";if("object"==typeof tk){tk.platform,tk.platform,"linux"===tk.platform&&tk.env.SNAP&&tk.env.SNAP_REVISION,tk.env.CI||tk.env.BUILD_ARTIFACTSTAGINGDIRECTORY,tP="en";let e=tk.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,tP=t.resolvedLanguage||"en",t.languagePack?.translationsConfigFile}catch{}tE=!0}else"object"!=typeof navigator||tD?console.error("Unable to resolve platform."):((tT=navigator.userAgent).indexOf("Windows"),tT.indexOf("Macintosh"),(tT.indexOf("Macintosh")>=0||tT.indexOf("iPad")>=0||tT.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,tT.indexOf("Linux"),tT?.indexOf("Mobi"),tB=!0,tP=globalThis._VSCODE_NLS_LANGUAGE||"en",navigator.language.toLowerCase());var tF=tE;tB&&"function"==typeof t$.importScripts&&t$.origin;var tW,tI=tT,tO=tP;(tY=tW||={}).value=function(){return tO},tY.isDefaultVariant=function(){return 2===tO.length?"en"===tO:tO.length>=3&&"e"===tO[0]&&"n"===tO[1]&&"-"===tO[2]},tY.isDefault=function(){return"en"===tO};var tz="function"==typeof t$.postMessage&&!t$.importScripts,tU=(()=>{if(tz){let e=[];t$.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,s=e.length;i<s;i++){let s=e[i];if(s.id===t.data.vscodeScheduleAsyncWork){e.splice(i,1),s.callback();return}}});let t=0;return i=>{let s=++t;e.push({id:s,callback:i}),t$.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})(),tN=!!(tI&&tI.indexOf("Chrome")>=0);tI&&tI.indexOf("Firefox"),!tN&&tI&&tI.indexOf("Safari"),tI&&tI.indexOf("Edg/"),tI&&tI.indexOf("Android");var tq="object"==typeof navigator?navigator:{};tF||document.queryCommandSupported&&document.queryCommandSupported("copy")||tq&&tq.clipboard&&tq.clipboard.writeText,tF||tq&&tq.clipboard&&tq.clipboard.readText,tF||tA||tq.keyboard,"ontouchstart"in ty||tq.maxTouchPoints,ty.PointerEvent&&("ontouchstart"in ty||navigator.maxTouchPoints);var tG=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},tH=new tG,tj=new tG,tV=new tG;(tX=tZ||={}).toString=function(e){return tH.keyCodeToStr(e)},tX.fromString=function(e){return tH.strToKeyCode(e)},tX.toUserSettingsUS=function(e){return tj.keyCodeToStr(e)},tX.toUserSettingsGeneral=function(e){return tV.keyCodeToStr(e)},tX.fromUserSettings=function(e){return tj.strToKeyCode(e)||tV.strToKeyCode(e)},tX.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return tH.keyCodeToStr(e)};var tY,tX,tZ,tQ,tK=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}});(o=tQ||={}).isCancellationToken=function(e){return e===o.None||e===o.Cancelled||e instanceof tJ||!!e&&"object"==typeof e&&"boolean"==typeof e.isCancellationRequested&&"function"==typeof e.onCancellationRequested},o.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:eO.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:tK});var tJ=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?tK:(this._emitter||(this._emitter=new eV),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};Symbol("MicrotaskDelay"),(a=h||={}).settled=async function(e){let t,i=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||(t=e)})));if("u">typeof t)throw t;return i},a.withAsyncBody=function(e){return new Promise(async(t,i)=>{try{await e(t,i)}catch(e){i(e)}})};var t0=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let i of t)e.emitOne(i)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new eV,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(1===this._state)return{done:!0,value:void 0};await eO.toPromise(this._onStateChanged.event)}},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,i){return new e(async e=>{for await(let s of t)e.emitOne(i(s))})}map(t){return e.map(this,t)}static filter(t,i){return new e(async e=>{for await(let s of t)i(s)&&e.emitOne(s)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let i of e)t.push(i);return t}toPromise(){return e.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}};t0.EMPTY=t0.fromArray([]);function t5(e,t){return(t<<5)-t+e|0}function t1(e,t){t=t5(149417,t);for(let i=0,s=e.length;i<s;i++)t=t5(e.charCodeAt(i),t);return t}new DataView(new ArrayBuffer(320));var{registerWindow:t2,getWindow:t3,getDocument:t4,getWindows:t8,getWindowsCount:t6,getWindowId:t7,getWindowById:t9,hasWindow:ie,onDidRegisterWindow:it,onWillUnregisterWindow:ii,onDidUnregisterWindow:is}=(t=new Map,i={window:ty,disposables:new A},t.set(ty.vscodeWindowId,i),s=new eV,r=new eV,n=new eV,{onDidRegisterWindow:s.event,onWillUnregisterWindow:n.event,onDidUnregisterWindow:r.event,registerWindow(e){var i,o;if(t.has(e.vscodeWindowId))return R.None;let a=new A,h={window:e,disposables:a.add(new A)};return t.set(e.vscodeWindowId,h),a.add(S(()=>{t.delete(e.vscodeWindowId),r.fire(e)})),a.add((i=e,o=ia.BEFORE_UNLOAD,new ir(i,o,()=>{n.fire(e)},void 0))),s.fire(h),a},getWindows:()=>t.values(),getWindowsCount:()=>t.size,getWindowId:e=>e.vscodeWindowId,hasWindow:e=>t.has(e),getWindowById:function(e,s){return("number"==typeof e?t.get(e):void 0)??(s?i:void 0)},getWindow:e=>e?.ownerDocument?.defaultView?e.ownerDocument.defaultView.window:e?.view?e.view.window:ty,getDocument:e=>t3(e).document}),ir=class{constructor(e,t,i,s){this._node=e,this._type=t,this._handler=i,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}},io=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,i=this.height){return t!==this.width||i!==this.height?new e(t,i):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t||!!e&&!!t&&e.width===t.width&&e.height===t.height}};io.None=new io(0,0),new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let s=this.mutationObservers.get(e);s||(s=new Map,this.mutationObservers.set(e,s));let r=function e(t,i){switch(typeof t){case"object":var s,r,n,o;return null===t?t5(349,i):Array.isArray(t)?(s=t,r=t5(104579,r=i),s.reduce((t,i)=>e(i,t),r)):(n=t,o=t5(181387,o=i),Object.keys(n).sort().reduce((t,i)=>(t=t1(i,t),e(n[i],t)),o));case"string":return t1(t,i);case"boolean":return t5(t?433:863,i);case"number":return t5(t,i);case"undefined":return t5(937,i);default:return t5(617,i)}}(i,0),n=s.get(r);if(n)n.users+=1;else{let o=new eV,a=new MutationObserver(e=>o.fire(e));a.observe(e,i);let h=n={users:1,observer:a,onDidMutate:o.event};t.add(S(()=>{h.users-=1,0===h.users&&(o.dispose(),a.disconnect(),s?.delete(r),s?.size===0&&this.mutationObservers.delete(e))})),s.set(r,n)}return n.onDidMutate}};var ia={BEFORE_UNLOAD:"beforeunload"},ih=class extends R{constructor(e,t,i,s,r,n,o,a,h){if(super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=i,this._coreBrowserService=s,this._coreService=r,this._decorationService=n,this._optionsService=o,this._themeService=a,this._cursorBlinkStateManager=new T,this._charAtlasDisposable=this._register(new T),this._observerDisposable=this._register(new T),this._model=new tl,this._workCell=new e8,this._workCell2=new e8,this._rectangleRenderer=this._register(new T),this._glyphRenderer=this._register(new T),this._onChangeTextureAtlas=this._register(new eV),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new eV),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new eV),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new eV),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new eV),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._gl=this._canvas.getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:h}),!this._gl)throw Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new ev(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new tL(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions={css:{canvas:es(),cell:es()},device:{canvas:es(),cell:es(),char:{width:0,height:0,left:0,top:0}}},this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(o.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(function(e,t,i){return new ir(e,t,i,void 0)}(this._canvas,"webglcontextlost",e=>{console.log("webglcontextlost event received"),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(e)},3e3)})),this._register(function(e,t,i){return new ir(e,t,i,void 0)}(this._canvas,"webglcontextrestored",e=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,e2(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=e4(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=e4(this._canvas,e,(e,t)=>this._setCanvasDevicePixelDimensions(e,t))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(S(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),e2(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){for(let e of(this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows),this._renderLayers))e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,i){for(let s of this._renderLayers)s.handleSelectionChanged(this._terminal,e,t,i);this._model.selection.update(this._core,e,t,i),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new tC(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new ta(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=e1(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=M(eO.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),eO.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){for(let e of(this._clearModel(!0),this._renderLayers))e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached)if(!this._core.screenElement?.isConnected||!this._charSizeService.width||!this._charSizeService.height)return;else this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;for(let i of this._renderLayers)i.handleGridChanged(this._terminal,e,t);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new e3(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let i=this._core,s=this._workCell,r,n,o,a,h,l,c=0,d=!0,u,_,f,g,v,p,m,x,w;e=ic(e,i.rows-1,0),t=ic(t,i.rows-1,0);let C=this._coreService.decPrivateModes.cursorStyle??i.options.cursorStyle??"block",b=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,L=b-i.buffer.ydisp,y=Math.min(this._terminal.buffer.active.cursorX,i.cols-1),M=-1,S=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let A=!1;for(n=e;n<=t;n++)for(o=n+i.buffer.ydisp,a=i.buffer.lines.get(o),this._model.lineLengths[n]=0,f=b===o,c=0,h=this._characterJoinerService.getJoinedCharacters(o),x=0;x<i.cols;x++){if(r=this._cellColorResolver.result.bg,a.loadCell(x,s),0===x&&(r=this._cellColorResolver.result.bg),l=!1,d=x>=c,u=x,h.length>0&&x===h[0][0]&&d){_=h.shift();let e=this._model.selection.isCellSelected(this._terminal,_[0],o);for(m=_[0]+1;m<_[1];m++)d&&=e===this._model.selection.isCellSelected(this._terminal,m,o);(d&&=!f||y<_[0]||y>=_[1])?(l=!0,s=new il(s,a.translateToString(!0,_[0],_[1]),_[1]-_[0]),u=_[1]-1):c=_[1]}if(g=s.getChars(),v=s.getCode(),m=(n*i.cols+x)*4,this._cellColorResolver.resolve(s,x,o,this.dimensions.device.cell.width),S&&o===b&&(x===y&&(this._model.cursor={x:y,y:L,width:s.getWidth(),style:this._coreBrowserService.isFocused?C:i.options.cursorInactiveStyle,cursorWidth:i.options.cursorWidth,dpr:this._devicePixelRatio},M=y+s.getWidth()-1),x>=y&&x<=M&&(this._coreBrowserService.isFocused&&"block"===C||!1===this._coreBrowserService.isFocused&&"block"===i.options.cursorInactiveStyle)&&(this._cellColorResolver.result.fg=0x3000000|this._themeService.colors.cursorAccent.rgba>>8&0xffffff,this._cellColorResolver.result.bg=0x3000000|this._themeService.colors.cursor.rgba>>8&0xffffff)),0!==v&&(this._model.lineLengths[n]=x+1),(this._model.cells[m]!==v||this._model.cells[m+1]!==this._cellColorResolver.result.bg||this._model.cells[m+2]!==this._cellColorResolver.result.fg||this._model.cells[m+3]!==this._cellColorResolver.result.ext)&&(A=!0,g.length>1&&(v|=0x80000000),this._model.cells[m]=v,this._model.cells[m+1]=this._cellColorResolver.result.bg,this._model.cells[m+2]=this._cellColorResolver.result.fg,this._model.cells[m+3]=this._cellColorResolver.result.ext,p=s.getWidth(),this._glyphRenderer.value.updateCell(x,n,v,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,g,p,r),l)){for(s=this._workCell,x++;x<=u;x++)w=(n*i.cols+x)*4,this._glyphRenderer.value.updateCell(x,n,0,0,0,0,"",0,0),this._model.cells[w]=0,this._model.cells[w+1]=this._cellColorResolver.result.bg,this._model.cells[w+2]=this._cellColorResolver.result.fg,this._model.cells[w+3]=this._cellColorResolver.result.ext;x--}}A&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=1===this._optionsService.rawOptions.lineHeight?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},il=class extends eB{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function ic(e,t,i=0){return Math.max(Math.min(e,t),i)}var id="di$target",iu="di$dependencies",i_=new Map;function ig(e){if(i_.has(e))return i_.get(e);let t=function(e,i,s){var r,n,o;if(3!=arguments.length)throw Error("@IServiceName-decorator can only be used to decorate a parameter");r=t,n=e,o=s,n[id]===n?n[iu].push({id:r,index:o}):(n[iu]=[{id:r,index:o}],n[id]=n)};return t._id=e,i_.set(e,t),t}ig("BufferService"),ig("CoreMouseService"),ig("CoreService"),ig("CharsetService"),ig("InstantiationService"),ig("LogService");var iv=ig("OptionsService");ig("OscLinkService"),ig("UnicodeService"),ig("DecorationService");var ip={trace:0,debug:1,info:2,warn:3,error:4,off:5},im=class extends R{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=ip[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)"function"==typeof e[t]&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+t,...i)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};im=((e,t,i,s)=>{for(var r,n=s>1?void 0:s?g(t,i):t,o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s?r(t,i,n):r(n))||n);return s&&n&&f(t,i,n),n})([(e,t)=>iv(e,t,0)],im);var ix=class extends R{constructor(e){if(D&&16>function(){if(!D)return 0;let e=E.match(/Version\/(\d+)/);return null===e||e.length<2?0:parseInt(e[1])}()&&!document.createElement("canvas").getContext("webgl2",{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error("Webgl2 is only supported on Safari 16 and above");super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new eV),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new eV),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new eV),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new eV),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element)return void this._register(t.onWillOpen(()=>this.activate(e)));this._terminal=e;let i=t.coreService,s=t.optionsService,r=t._renderService,n=t._characterJoinerService,o=t._charSizeService,a=t._coreBrowserService,h=t._decorationService,l=t._logService,c=t._themeService;this._renderer=this._register(new ih(e,n,o,a,i,h,s,c,this._preserveDrawingBuffer)),this._register(eO.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(eO.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(eO.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(eO.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),r.setRenderer(this._renderer),this._register(S(()=>{if(this._terminal._core._store._isDisposed)return;let t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},iw=e.i(821957),iC=e.i(360112),ib=e.i(533499),iL=e.i(138261),iy=e.i(540405);e.s(["TaskTerminal",0,function({taskId:e,worktreePath:t,onSessionEnd:i,useCanvasRenderer:s=!1,onReady:r}){let{t:n}=(0,ib.useI18n)(),{resolvedTheme:o}=(0,iw.useTheme)(),a=(0,c.useRef)(null),h=(0,c.useRef)(null),_=(0,c.useRef)(null),f=(0,c.useRef)(null),g=(0,c.useRef)(i);g.current=i;let v=(0,c.useRef)(r);v.current=r;let[p,m]=(0,c.useState)("connecting"),[x,w]=(0,c.useState)(!1);if((0,c.useEffect)(()=>{if(!t||!a.current)return;let i="light"!==o,r=new d.Terminal({fontFamily:"Menlo, Monaco, 'Courier New', monospace",fontSize:13,scrollback:2e3,cursorBlink:!0,allowTransparency:!1,rescaleOverlappingGlyphs:!0,theme:i?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}}),l=new u.FitAddon;r.loadAddon(l),r.open(a.current);let c=a.current.querySelector(".xterm-helper-textarea");c&&(c.style.opacity="0");let p=a.current,x=e=>{let t=e.clipboardData?.items;if(!t)return;let i=null;for(let e=0;e<t.length;e++){let s=t[e];if("file"===s.kind&&s.type.startsWith("image/")){i=s.getAsFile();break}}i&&(e.preventDefault(),e.stopPropagation(),C(i))};async function C(t){let i=iC.toast.loading(n("terminal.pasteImageUploading"));try{var s;let r=(await new Promise((e,i)=>{let s=new FileReader;s.onload=()=>e(s.result),s.onerror=()=>i(s.error),s.readAsDataURL(t)})).split(",")[1]??"",o=await fetch(`/api/internal/terminal/${encodeURIComponent(e)}/paste-image`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mime:t.type,base64:r,name:t.name})}),a=await o.json().catch(()=>null);if(!o.ok||!a?.path)return void iC.toast.error(n("terminal.pasteImageFailed"),{id:i});let l=_.current;if(l?.readyState!==WebSocket.OPEN)return void iC.toast.error(n("terminal.pasteImageFailed"),{id:i});l.send((s=a.path,/\s/.test(s)?`"${s}" `:`${s} `)),h.current?.focus(),iC.toast.success(n("terminal.pasteImageInserted"),{id:i})}catch{iC.toast.error(n("terminal.pasteImageFailed"),{id:i})}}p.addEventListener("paste",x,!0);let b=null;if(!s)try{(b=new ix).onContextLoss(()=>{b?.dispose(),b=null}),r.loadAddon(b)}catch{}l.fit(),r.focus();let L=null,y=null,M=!1,S=null,A=!1;return(0,iy.getConfigValues)(["terminal.fontSize","terminal.fontFamily"]).then(e=>{if(M)return;let t=Number(e["terminal.fontSize"]),i=e["terminal.fontFamily"];Number.isFinite(t)&&t>0&&(r.options.fontSize=t),"string"==typeof i&&i.trim()&&(r.options.fontFamily=i);try{l.fit()}catch{}}).catch(()=>{}),(0,iL.getActualWsPort)().then(t=>{M||function t(i){if(M||A)return;m("connecting");let s=new WebSocket(`ws://localhost:${i}/terminal?taskId=${encodeURIComponent(e)}`);L=s,s.addEventListener("open",()=>{s.send(JSON.stringify({type:"resize",cols:r.cols,rows:r.rows})),r.focus(),m("connected"),w(!0),setTimeout(()=>w(!1),2e3)}),s.addEventListener("message",e=>{let t=e.data;"string"==typeof t?r.write(t):t instanceof Blob?t.text().then(e=>r.write(e)):t instanceof ArrayBuffer&&r.write(new Uint8Array(t))}),y?.dispose(),y=r.onData(e=>{s.readyState===WebSocket.OPEN&&s.send(e)}),s.addEventListener("close",e=>{if(e.code>=4e3){A=!0,m("disconnected"),g.current?.(e.code-4e3);return}m("disconnected"),M||A||(S=setTimeout(()=>t(i),3e3))}),s.addEventListener("error",()=>{}),_.current=s}(t)}),h.current=r,f.current=l,v.current?.({focus:()=>r.focus(),blur:()=>r.blur()}),()=>{M=!0,v.current?.(null),p.removeEventListener("paste",x,!0),S&&clearTimeout(S),y?.dispose(),b?.dispose(),l.dispose(),r.dispose(),L?.close(),h.current=null,_.current=null,f.current=null}},[e,t]),(0,c.useEffect)(()=>{if(!t||!a.current)return;let e=f.current,i=_.current,s=h.current;e&&s&&requestAnimationFrame(()=>{e.fit(),i?.readyState===WebSocket.OPEN&&i.send(JSON.stringify({type:"resize",cols:s.cols,rows:s.rows}))});let r=null,n=a.current,o=new ResizeObserver(()=>{r&&clearTimeout(r),r=setTimeout(()=>{let e=f.current,t=_.current,i=h.current;e&&i&&(e.fit(),t?.readyState===WebSocket.OPEN&&t.send(JSON.stringify({type:"resize",cols:i.cols,rows:i.rows})))},100)});return o.observe(n),()=>{r&&clearTimeout(r),o.disconnect()}},[e,t]),(0,c.useEffect)(()=>{let e=h.current;if(!e)return;let t="light"!==o;e.options.theme=t?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}},[o]),!t)return(0,l.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center bg-[#fafafa] dark:bg-[#0a0a0a] text-center",children:[(0,l.jsx)("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:n("terminal.noWorktree")}),(0,l.jsx)("p",{className:"text-xs text-neutral-400 dark:text-neutral-600 mt-1",children:n("terminal.noWorktreeDesc")})]});let C="connected"===p?n("terminal.connected"):"connecting"===p?n("terminal.connecting"):n("terminal.disconnected");return(0,l.jsxs)("div",{className:"relative h-full w-full bg-[#fafafa] dark:bg-[#0a0a0a]",children:[(0,l.jsxs)("div",{className:["absolute right-3 top-3 z-10 flex items-center gap-1.5 rounded px-2 py-0.5 text-xs transition-opacity duration-500","connected"===p&&!x?"opacity-0 pointer-events-none":"opacity-100","bg-white/60 dark:bg-black/40 backdrop-blur-sm"].join(" "),title:C,children:[(0,l.jsx)("span",{className:`h-2 w-2 rounded-full ${"connected"===p?"bg-green-500":"connecting"===p?"bg-yellow-500":"bg-red-500"}`}),(0,l.jsx)("span",{className:"text-neutral-600 dark:text-neutral-300",children:C})]}),(0,l.jsx)("div",{ref:a,className:"h-full w-full overflow-hidden"})]})}],85890)},346069,e=>{e.n(e.i(85890))}]);
|