@overlordai/server 1.0.125 → 1.0.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/dispatcher/scheduler.service.d.ts.map +1 -1
  2. package/dist/dispatcher/scheduler.service.js +22 -1
  3. package/dist/dispatcher/scheduler.service.js.map +1 -1
  4. package/dist/notifier/notification-consumer.d.ts +1 -1
  5. package/dist/notifier/notification-consumer.d.ts.map +1 -1
  6. package/dist/notifier/notification-consumer.js +38 -14
  7. package/dist/notifier/notification-consumer.js.map +1 -1
  8. package/package.json +4 -4
  9. package/public/assets/{AccessTokensPage-Ck9KudgP.js → AccessTokensPage-BsHXxEAa.js} +1 -1
  10. package/public/assets/{AdminPage-BKWbP0n2.js → AdminPage-CqbSIVC9.js} +1 -1
  11. package/public/assets/{AgentCliPage-Bex4ulEr.js → AgentCliPage-mQ_4MWzg.js} +1 -1
  12. package/public/assets/{ApiReferencePage-CTkJqTdJ.js → ApiReferencePage-R-TWXn2i.js} +1 -1
  13. package/public/assets/{ArchitecturePage-8SxZccYN.js → ArchitecturePage-D2x2ctOK.js} +1 -1
  14. package/public/assets/{AuditLogPage-BLzj5y_X.js → AuditLogPage-C_H7ZESD.js} +1 -1
  15. package/public/assets/{BindPlatformPage-D45esrNl.js → BindPlatformPage-CQ4nCUs4.js} +1 -1
  16. package/public/assets/{BotIntegrationPage-BhDYugrQ.js → BotIntegrationPage-B9NpzTot.js} +1 -1
  17. package/public/assets/{BotManage-CbUW-s4b.js → BotManage-BT6BRj5J.js} +1 -1
  18. package/public/assets/{BotSetupPage-DnwaG9Z7.js → BotSetupPage-zct5uBr8.js} +1 -1
  19. package/public/assets/{ChangelogPage-ROnloca6.js → ChangelogPage-B6tVwiC6.js} +1 -1
  20. package/public/assets/{CliReferencePage-C-Lw0uAV.js → CliReferencePage-49nW5cIo.js} +1 -1
  21. package/public/assets/{DeploymentPage-Cm8hl7PF.js → DeploymentPage-fjn7sGc4.js} +1 -1
  22. package/public/assets/{DevWorkflowPage-DTjFXI4G.js → DevWorkflowPage-ErXGq_I6.js} +1 -1
  23. package/public/assets/{DeveloperManage-4o7ML8ff.js → DeveloperManage-CQ4GuWD1.js} +1 -1
  24. package/public/assets/{DeveloperSetupPage-BQhIuXLe.js → DeveloperSetupPage-BS1EEJPG.js} +1 -1
  25. package/public/assets/{DocsIndexPage-CoUUKiVh.js → DocsIndexPage-Dj824iQn.js} +1 -1
  26. package/public/assets/{DocsLayout-Br7yGyG5.js → DocsLayout-BFVyO-jL.js} +1 -1
  27. package/public/assets/{DocsPrimitives-DuiNLMTd.js → DocsPrimitives-CepUnsjE.js} +1 -1
  28. package/public/assets/{EditProjectPage-C_vbQdR2.js → EditProjectPage-BmqFgw6t.js} +1 -1
  29. package/public/assets/{EmptyState-aKMHLBhj.js → EmptyState-Dzgbe-pY.js} +1 -1
  30. package/public/assets/{EnvVariablesPage-gbqhCWCv.js → EnvVariablesPage-_vSrnwQF.js} +1 -1
  31. package/public/assets/{HomePage-Sfw7oH7M.js → HomePage-CUvmATWV.js} +1 -1
  32. package/public/assets/{InfoRow-BQI_KKyp.js → InfoRow-wzi1lOPu.js} +1 -1
  33. package/public/assets/{InstallationPage-Ce0qD1m-.js → InstallationPage-BnXbq6BG.js} +1 -1
  34. package/public/assets/{LandingPage-1SiyCrIO.js → LandingPage-CzEcY8Ug.js} +1 -1
  35. package/public/assets/{LocalDevelopmentPage-tuixvO86.js → LocalDevelopmentPage-BrMAHM9U.js} +1 -1
  36. package/public/assets/{LoginPage-D7C2GvH2.js → LoginPage-DL_ktf8K.js} +1 -1
  37. package/public/assets/{MetricBar-DaWuVJHZ.js → MetricBar-U5_XNUhU.js} +1 -1
  38. package/public/assets/{NotFoundPage-B2K-657t.js → NotFoundPage-DbnkHNlS.js} +1 -1
  39. package/public/assets/{OnboardingGuide-Cj_QW_kH.js → OnboardingGuide-BY2IVf0x.js} +1 -1
  40. package/public/assets/{PermissionsPage-D4ZeOpEb.js → PermissionsPage-BE8hB9JD.js} +1 -1
  41. package/public/assets/{PipelineConfigPage-DaCDhd-P.js → PipelineConfigPage-Dr--9t7o.js} +1 -1
  42. package/public/assets/{PipelineEditorPage-rM_yORd4.js → PipelineEditorPage-B-VIaUq9.js} +1 -1
  43. package/public/assets/{ProfilePage-DshUwwog.js → ProfilePage-DJfNVbh5.js} +1 -1
  44. package/public/assets/{ProjectDetailPage-BMKog_vR.js → ProjectDetailPage-CKKVrkpJ.js} +1 -1
  45. package/public/assets/{ProjectListPage-C5U_Q6m_.js → ProjectListPage-BEeRYf2H.js} +1 -1
  46. package/public/assets/{PtyTerminal-DJ4ToCWx.js → PtyTerminal-CBC06L-w.js} +1 -1
  47. package/public/assets/{QuickAuth-BPSm4iQz.js → QuickAuth-7KQofW1O.js} +1 -1
  48. package/public/assets/{RemoveMemberConfirmDialog-GYx2AH26.js → RemoveMemberConfirmDialog-Cu1_OjEg.js} +1 -1
  49. package/public/assets/{Select-CvM411zU.js → Select-qlm6GDCC.js} +1 -1
  50. package/public/assets/{SettingsPage-_cXRQuuA.js → SettingsPage-BMb2Tcw6.js} +1 -1
  51. package/public/assets/{Skeleton-qXDikSxR.js → Skeleton-CFuKRpvr.js} +1 -1
  52. package/public/assets/{SkillPage-C3wTzd5o.js → SkillPage-BteMVTia.js} +1 -1
  53. package/public/assets/{TaskDetailPage-BQY6iia7.js → TaskDetailPage-Chu8n_LB.js} +1 -1
  54. package/public/assets/{TaskListPage-D6iQoHz7.js → TaskListPage-B8wt__hJ.js} +1 -1
  55. package/public/assets/{TaskStatusBadge-CJTrG6-l.js → TaskStatusBadge-Dzz5X_zP.js} +1 -1
  56. package/public/assets/{TerminalHomePage-BFyQcEXU.js → TerminalHomePage-ZaZgrQ1h.js} +1 -1
  57. package/public/assets/{TokenManage-C5GQ1LB8.js → TokenManage-N7hHSMbB.js} +1 -1
  58. package/public/assets/{Tooltip-DYbD-tQw.js → Tooltip-DkWmUEGK.js} +1 -1
  59. package/public/assets/{TotpSetupPage-C09YtAXD.js → TotpSetupPage-BIB7NxIo.js} +1 -1
  60. package/public/assets/{WorkerDetailPage-DhtIXNEC.js → WorkerDetailPage-bvOu-Kfl.js} +1 -1
  61. package/public/assets/{WorkerListPage-B_K4x-PV.js → WorkerListPage-C8HOqjJK.js} +1 -1
  62. package/public/assets/{WorkerOperationsPage-BZN-hLvH.js → WorkerOperationsPage-DUJsmQbG.js} +1 -1
  63. package/public/assets/{WorkerSetupGuidePage-DNy2wbA9.js → WorkerSetupGuidePage-DwFagocV.js} +1 -1
  64. package/public/assets/{WorkerSetupPage-VBsAuhUc.js → WorkerSetupPage-Cg0X_s7f.js} +1 -1
  65. package/public/assets/{arrow-left-B5R31ze1.js → arrow-left-D44aHNQk.js} +1 -1
  66. package/public/assets/{arrow-right-C10sjQNz.js → arrow-right-Bq-BKmhL.js} +1 -1
  67. package/public/assets/{bot-J2o7uWlo.js → bot-BCIBzxfK.js} +1 -1
  68. package/public/assets/{chevron-left-B5ojlwvf.js → chevron-left-CVgRX9jS.js} +1 -1
  69. package/public/assets/{chevron-right-Yoiq-SRa.js → chevron-right-DfteUugq.js} +1 -1
  70. package/public/assets/{copy-BpM8iA-r.js → copy-BD_Dl2hy.js} +1 -1
  71. package/public/assets/{download-DMI0uxkZ.js → download-DthxFO_i.js} +1 -1
  72. package/public/assets/{external-link-BgyHxzCy.js → external-link-Cv_5wb3c.js} +1 -1
  73. package/public/assets/{git-fork-BSMVuD3x.js → git-fork-ChuAxaYu.js} +1 -1
  74. package/public/assets/{index-XDDf1Oy_.js → index-MUaJRsMr.js} +2 -2
  75. package/public/assets/{key-y6VWhViZ.js → key-CpYHjdzY.js} +1 -1
  76. package/public/assets/{loader-circle-CMxLiCu8.js → loader-circle-Af9Hv3JS.js} +1 -1
  77. package/public/assets/{pencil-CUs1Ii2-.js → pencil-DtB4RcLk.js} +1 -1
  78. package/public/assets/{plus-R7zuZ-Lg.js → plus-CbAhPFY5.js} +1 -1
  79. package/public/assets/{rotate-ccw-B1uEgqoV.js → rotate-ccw-CUAv4Vwe.js} +1 -1
  80. package/public/assets/{scroll-text-CL3s7j9w.js → scroll-text-CpwtPADs.js} +1 -1
  81. package/public/assets/{settings-IoIv8DUf.js → settings-DAVu6Hwq.js} +1 -1
  82. package/public/assets/{status-colors-JE6CIHvW.js → status-colors-CPLk9kee.js} +1 -1
  83. package/public/assets/task-constants-cmxquUo7.js +1 -0
  84. package/public/assets/{trash-2-BYatp6Y5.js → trash-2-DMrdhXG2.js} +1 -1
  85. package/public/assets/{useFetch-D6-vLVQP.js → useFetch-Bwaf8gKF.js} +1 -1
  86. package/public/assets/{users-C3jRdgS-.js → users-Bm7VCq1O.js} +1 -1
  87. package/public/assets/{wifi-B8ZV0Cuq.js → wifi-B4I0pd5i.js} +1 -1
  88. package/public/assets/{workflow-GXjmJAuH.js → workflow-Df0Z1USj.js} +1 -1
  89. package/public/index.html +1 -1
  90. package/public/sw.js +1 -1
  91. package/public/assets/task-constants-DkWAZdpz.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LandingPage-1SiyCrIO.js","assets/arrow-right-C10sjQNz.js","assets/bot-J2o7uWlo.js","assets/workflow-GXjmJAuH.js","assets/users-C3jRdgS-.js","assets/copy-BpM8iA-r.js","assets/HomePage-Sfw7oH7M.js","assets/TaskStatusBadge-CJTrG6-l.js","assets/status-colors-JE6CIHvW.js","assets/Skeleton-qXDikSxR.js","assets/OnboardingGuide-Cj_QW_kH.js","assets/chevron-right-Yoiq-SRa.js","assets/date-RFA7-ZGs.js","assets/useFetch-D6-vLVQP.js","assets/Tooltip-DYbD-tQw.js","assets/TerminalHomePage-BFyQcEXU.js","assets/task-constants-DkWAZdpz.js","assets/PtyTerminal-DJ4ToCWx.js","assets/PtyTerminal-Beg8tuEN.css","assets/Select-CvM411zU.js","assets/plus-R7zuZ-Lg.js","assets/rotate-ccw-B1uEgqoV.js","assets/wifi-B8ZV0Cuq.js","assets/TaskListPage-D6iQoHz7.js","assets/git-fork-BSMVuD3x.js","assets/EmptyState-aKMHLBhj.js","assets/chevron-left-B5ojlwvf.js","assets/TaskDetailPage-BQY6iia7.js","assets/arrow-left-B5R31ze1.js","assets/external-link-BgyHxzCy.js","assets/loader-circle-CMxLiCu8.js","assets/WorkerListPage-B_K4x-PV.js","assets/MetricBar-DaWuVJHZ.js","assets/WorkerSetupGuidePage-DNy2wbA9.js","assets/key-y6VWhViZ.js","assets/download-DMI0uxkZ.js","assets/settings-IoIv8DUf.js","assets/WorkerDetailPage-DhtIXNEC.js","assets/InfoRow-BQI_KKyp.js","assets/trash-2-BYatp6Y5.js","assets/ProjectListPage-C5U_Q6m_.js","assets/ProjectDetailPage-BMKog_vR.js","assets/RemoveMemberConfirmDialog-GYx2AH26.js","assets/pencil-CUs1Ii2-.js","assets/EditProjectPage-C_vbQdR2.js","assets/PipelineEditorPage-rM_yORd4.js","assets/ProfilePage-DshUwwog.js","assets/password-CHk45-jw.js","assets/AccessTokensPage-Ck9KudgP.js","assets/CliReferencePage-C-Lw0uAV.js","assets/QuickAuth-BPSm4iQz.js","assets/ApiReferencePage-CTkJqTdJ.js","assets/SkillPage-C3wTzd5o.js","assets/DocsPrimitives-DuiNLMTd.js","assets/DocsLayout-Br7yGyG5.js","assets/InstallationPage-Ce0qD1m-.js","assets/DeveloperSetupPage-BQhIuXLe.js","assets/WorkerSetupPage-VBsAuhUc.js","assets/BotSetupPage-DnwaG9Z7.js","assets/LocalDevelopmentPage-tuixvO86.js","assets/DeploymentPage-Cm8hl7PF.js","assets/PipelineConfigPage-DaCDhd-P.js","assets/DevWorkflowPage-DTjFXI4G.js","assets/EnvVariablesPage-gbqhCWCv.js","assets/ArchitecturePage-8SxZccYN.js","assets/AgentCliPage-Bex4ulEr.js","assets/DocsIndexPage-CoUUKiVh.js","assets/AdminPage-BKWbP0n2.js","assets/scroll-text-CL3s7j9w.js","assets/DeveloperManage-4o7ML8ff.js","assets/BotManage-CbUW-s4b.js","assets/TokenManage-C5GQ1LB8.js","assets/AuditLogPage-BLzj5y_X.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LandingPage-CzEcY8Ug.js","assets/arrow-right-Bq-BKmhL.js","assets/bot-BCIBzxfK.js","assets/workflow-Df0Z1USj.js","assets/users-Bm7VCq1O.js","assets/copy-BD_Dl2hy.js","assets/HomePage-CUvmATWV.js","assets/TaskStatusBadge-Dzz5X_zP.js","assets/status-colors-CPLk9kee.js","assets/Skeleton-CFuKRpvr.js","assets/OnboardingGuide-BY2IVf0x.js","assets/chevron-right-DfteUugq.js","assets/date-RFA7-ZGs.js","assets/useFetch-Bwaf8gKF.js","assets/Tooltip-DkWmUEGK.js","assets/TerminalHomePage-ZaZgrQ1h.js","assets/task-constants-cmxquUo7.js","assets/PtyTerminal-CBC06L-w.js","assets/PtyTerminal-Beg8tuEN.css","assets/Select-qlm6GDCC.js","assets/plus-CbAhPFY5.js","assets/rotate-ccw-CUAv4Vwe.js","assets/wifi-B4I0pd5i.js","assets/TaskListPage-B8wt__hJ.js","assets/git-fork-ChuAxaYu.js","assets/EmptyState-Dzgbe-pY.js","assets/chevron-left-CVgRX9jS.js","assets/TaskDetailPage-Chu8n_LB.js","assets/arrow-left-D44aHNQk.js","assets/external-link-Cv_5wb3c.js","assets/loader-circle-Af9Hv3JS.js","assets/WorkerListPage-C8HOqjJK.js","assets/MetricBar-U5_XNUhU.js","assets/WorkerSetupGuidePage-DwFagocV.js","assets/key-CpYHjdzY.js","assets/download-DthxFO_i.js","assets/settings-DAVu6Hwq.js","assets/WorkerDetailPage-bvOu-Kfl.js","assets/InfoRow-wzi1lOPu.js","assets/trash-2-DMrdhXG2.js","assets/ProjectListPage-BEeRYf2H.js","assets/ProjectDetailPage-CKKVrkpJ.js","assets/RemoveMemberConfirmDialog-Cu1_OjEg.js","assets/pencil-DtB4RcLk.js","assets/EditProjectPage-BmqFgw6t.js","assets/PipelineEditorPage-B-VIaUq9.js","assets/ProfilePage-DJfNVbh5.js","assets/password-CHk45-jw.js","assets/AccessTokensPage-BsHXxEAa.js","assets/CliReferencePage-49nW5cIo.js","assets/QuickAuth-7KQofW1O.js","assets/ApiReferencePage-R-TWXn2i.js","assets/SkillPage-BteMVTia.js","assets/DocsPrimitives-CepUnsjE.js","assets/DocsLayout-BFVyO-jL.js","assets/InstallationPage-BnXbq6BG.js","assets/DeveloperSetupPage-BS1EEJPG.js","assets/WorkerSetupPage-Cg0X_s7f.js","assets/BotSetupPage-zct5uBr8.js","assets/LocalDevelopmentPage-BrMAHM9U.js","assets/DeploymentPage-fjn7sGc4.js","assets/PipelineConfigPage-Dr--9t7o.js","assets/DevWorkflowPage-ErXGq_I6.js","assets/EnvVariablesPage-_vSrnwQF.js","assets/ArchitecturePage-D2x2ctOK.js","assets/AgentCliPage-mQ_4MWzg.js","assets/DocsIndexPage-Dj824iQn.js","assets/AdminPage-CqbSIVC9.js","assets/scroll-text-CpwtPADs.js","assets/DeveloperManage-CQ4GuWD1.js","assets/BotManage-BT6BRj5J.js","assets/TokenManage-N7hHSMbB.js","assets/AuditLogPage-C_H7ZESD.js"])))=>i.map(i=>d[i]);
2
2
  var Ig=Object.defineProperty;var Pm=i=>{throw TypeError(i)};var Pg=(i,u,s)=>u in i?Ig(i,u,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[u]=s;var Ve=(i,u,s)=>Pg(i,typeof u!="symbol"?u+"":u,s),gs=(i,u,s)=>u.has(i)||Pm("Cannot "+s);var q=(i,u,s)=>(gs(i,u,"read from private field"),s?s.call(i):u.get(i)),Pt=(i,u,s)=>u.has(i)?Pm("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(i):u.set(i,s),Kt=(i,u,s,o)=>(gs(i,u,"write to private field"),o?o.call(i,s):u.set(i,s),s),ke=(i,u,s)=>(gs(i,u,"access private method"),s);var eh=(i,u,s,o)=>({set _(f){Kt(i,u,f,s)},get _(){return q(i,u,o)}});(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const _ of m.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&o(_)}).observe(document,{childList:!0,subtree:!0});function s(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function o(f){if(f.ep)return;f.ep=!0;const m=s(f);fetch(f.href,m)}})();function ey(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ys={exports:{}},ti={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -239,4 +239,4 @@ overlord install`,setup_step_1_link:"installation guide",setup_step_2_title:"reg
239
239
  overlord setup worker`,setup_step_2_link:"worker setup guide",setup_step_3_title:"connect as developer",setup_step_3_desc:"install the developer cli to create tasks, attach to running sessions, and monitor progress from your terminal.",setup_step_3_command:`npm install -g @overlordai/developer-cli
240
240
  ov login https://overlord.yourdomain.com`,setup_step_3_link:"development workflow",go_to_app:"open app",documentation:"documentation",api:"api",copy_install_command:"copy install command"},docs:{cli_reference:"cli",cli_subtitle:"// command-line tools",api_reference:"api",api_subtitle:"// rest api endpoints",quick_start:"// quick start",developer_cli:"developer cli (ov)",admin_cli:"admin cli (overlord)",authentication:"// authentication",usage:"usage",flags:"flags",example:"example",request_body:"request body",response:"response",quick_start_with_token:"// quick start with your token",replace_token_hint:"// replace <your-token> with the actual token value from your access tokens page",cli_tools_desc:"// overlord provides two cli tools: {ov} (developer cli) and {overlord} (admin/ops cli)",api_base_url_desc:"// base url: {url} · all endpoints return json · auth via bearer token in authorization header",docs_nav_getting_started:"// getting started",docs_nav_guides:"// guides",docs_nav_reference:"// reference",docs_nav_other:"// other",docs_installation:"installation",docs_developer_setup:"developer setup",docs_worker_setup:"worker setup",docs_bot_setup:"bot setup",docs_local_dev:"local development",docs_worker_ops:"worker operations",docs_deployment:"deployment",docs_bot_integration:"bot integration",docs_pipeline:"pipeline config",docs_dev_workflow:"dev workflow",docs_cli:"cli reference",docs_api:"api reference",docs_skill:"skill reference",docs_permissions:"permissions & roles",docs_env_vars:"environment variables",docs_architecture:"architecture",docs_changelog:"changelog",docs_menu:"docs menu",docs_back:"< back",docs_all_title:"// all documentation",docs_all_subtitle:"browse all guides, references, and resources",docs_desc_installation:"install overlord server and cli tools",docs_desc_developer_setup:"set up your local development environment",docs_desc_worker_setup:"register and configure worker machines",docs_desc_bot_setup:"connect lark or slack bots to overlord",docs_desc_local_dev:"run and debug overlord locally",docs_desc_worker_ops:"manage worker lifecycle and monitoring",docs_desc_deployment:"deploy overlord to production servers",docs_desc_bot_integration:"interactive cards, adapter pattern, troubleshooting",docs_desc_pipeline:"define multi-stage task pipelines",docs_desc_dev_workflow:"git workflow, branching, and merge requests",docs_desc_cli:"cli command reference",docs_desc_api:"http api endpoint reference",docs_desc_skill:"custom skill definitions and configuration",docs_desc_permissions:"roles, access control, and authorization",docs_desc_env_vars:"environment variables for server and worker",docs_desc_architecture:"system architecture and component overview",docs_desc_changelog:"version history and release notes",docs_agent_cli:"agent cli",docs_desc_agent_cli:"claude, cursor, and codex cli integration and flag mapping"},onboarding:{getting_started:"// getting started",completed_count:"{done}/{total} completed",dismiss:"dismiss",all_done:"all set! you're ready to go.",admin_create_project_title:"create your first project",admin_create_project_desc:"set up a project with a git repo and pipeline",admin_register_worker_title:"register a worker",admin_register_worker_desc:"generate a token and set up a worker to run tasks",admin_create_developer_title:"create a developer account",admin_create_developer_desc:"add team members who can create and monitor tasks",admin_configure_bot_title:"configure a chat bot",admin_configure_bot_desc:"register a Lark or Slack bot to enable task management via chat",admin_first_task_title:"create your first task",admin_first_task_desc:"verify the full pipeline works end-to-end",lead_view_projects_title:"view your projects",lead_view_projects_desc:"check the projects assigned to you",lead_configure_pipeline_title:"configure a pipeline",lead_configure_pipeline_desc:"set up stages for your project workflow",lead_add_member_title:"add a team member",lead_add_member_desc:"invite developers to your project",lead_first_task_title:"create your first task",lead_first_task_desc:"submit a task and watch it execute",dev_install_cli_title:"install the ov cli",dev_install_cli_desc:"npm install -g @overlordai/developer-cli",dev_setup_cli_title:"run ov setup",dev_setup_cli_desc:"connect to the server and authenticate",dev_link_chat_title:"link your chat account",dev_link_chat_desc:'send "bind" to the bot in Lark or Slack to connect your account',dev_view_projects_title:"explore projects",dev_view_projects_desc:"browse available projects and their pipelines",dev_first_task_title:"create your first task",dev_first_task_desc:"submit a task via web or cli",go_to_projects:"go to projects",go_to_workers:"go to workers",go_to_tasks:"go to tasks",go_to_bots:"manage bots",manage_developers:"manage developers",cli:"cli",setup_guide:"setup guide"},bind:{title:"// link platform account",linking:"linking your account...",success:"account linked successfully!",success_detail:"your {platform} account has been connected. you can now use bot commands.",error:"failed to link account",invalid_token:'this link is invalid or has expired. send "bind" to the bot again to get a new link.',back_to_home:"go to dashboard",no_token:"no bind token provided."},pwa_install:{title:"overlord://install",command:"overlord --install",desc_1:"add to home screen for standalone app experience",desc_2:"works offline · full-screen · instant launch",install:"y — install",skip:"n — skip",ios_command:"install --manual",ios_step_1:"tap share button in safari toolbar",ios_step_2:'scroll down → tap "add to home screen"',ios_step_3:'tap "add" to confirm'},pwa_update:{message:"new version available",reload:"reload"},terminal_home:{title:"terminal",select_project:"project...",all_projects:"all projects",task_description_placeholder:"describe the task...",new_task:"new task",no_active_tasks:"no active tasks",create_task_hint:"create a task using the bar above to get started",confirm_create_title:"create task",confirm_create_message:`create a [{taskType}] task in project [{projectKey}]?
241
241
 
242
- "{description}"`}};function jb(i,u){const s=u.split(".");let o=i;for(const f of s){if(o==null||typeof o!="object")return u;o=o[f]}return typeof o=="string"?o:u}function Rb(i,u){return u?i.replace(/\{(\w+)\}/g,(s,o)=>u[o]!=null?String(u[o]):`{${o}}`):i}function Br(i,u){return Rb(jb(Tb,i),u)}function Vt(){return{t:g.useCallback((u,s)=>Br(u,s),[])}}function cp(){const{theme:i,setTheme:u}=sp(),{t:s}=Vt(),o=i==="dark"||i==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;function f(){u(o?"light":"dark")}return h.jsx("button",{onClick:f,className:"flex items-center gap-1.5 rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]","aria-label":s(o?"common.switch_to_light":"common.switch_to_dark"),title:s(o?"common.light_mode":"common.dark_mode"),children:o?h.jsx(_b,{size:16}):h.jsx(fb,{size:16})})}class Ns extends Error{constructor(s,o,f){const m=s.status||s.status===0?s.status:"",_=s.statusText??"",b=`${m} ${_}`.trim(),y=b?`status code ${b}`:"an unknown error";super(`Request failed with ${y}: ${o.method} ${o.url}`);Ve(this,"response");Ve(this,"request");Ve(this,"options");this.name="HTTPError",this.response=s,this.request=o,this.options=f}}class fp extends Error{constructor(s){let o="Non-error value was thrown";try{typeof s=="string"?o=s:s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&(o=s.message)}catch{}super(o);Ve(this,"name","NonError");Ve(this,"value");this.value=s}}class Rs extends Error{constructor(s){const o=s!=null&&s.cause?s.cause instanceof Error?s.cause:new fp(s.cause):void 0;super(s!=null&&s.code?`Forced retry: ${s.code}`:"Forced retry",o?{cause:o}:void 0);Ve(this,"name","ForceRetryError");Ve(this,"customDelay");Ve(this,"code");Ve(this,"customRequest");this.customDelay=s==null?void 0:s.delay,this.code=s==null?void 0:s.code,this.customRequest=s==null?void 0:s.request}}const Sh=(()=>{let i=!1,u=!1;const s=typeof globalThis.ReadableStream=="function",o=typeof globalThis.Request=="function";if(s&&o)try{u=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type")}catch(f){if(f instanceof Error&&f.message==="unsupported BodyInit type")return!1;throw f}return i&&!u})(),Ab=typeof globalThis.AbortController=="function",dp=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",zb=typeof globalThis.ReadableStream=="function",Ob=typeof globalThis.FormData=="function",mp=["get","post","put","patch","head","delete"],Cb={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},As=2147483647,Db=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,hp=Symbol("stop");class pp{constructor(u){Ve(this,"options");this.options=u}}const Nb=i=>new pp(i),Mb={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Ub={next:!0},qb={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Lb=i=>{if(!i)return 0;if(i instanceof FormData){let u=0;for(const[s,o]of i)u+=Db,u+=new TextEncoder().encode(`Content-Disposition: form-data; name="${s}"`).length,u+=typeof o=="string"?new TextEncoder().encode(o).length:o.size;return u}if(i instanceof Blob)return i.size;if(i instanceof ArrayBuffer)return i.byteLength;if(typeof i=="string")return new TextEncoder().encode(i).length;if(i instanceof URLSearchParams)return new TextEncoder().encode(i.toString()).length;if("byteLength"in i)return i.byteLength;if(typeof i=="object"&&i!==null)try{const u=JSON.stringify(i);return new TextEncoder().encode(u).length}catch{return 0}return 0},_p=(i,u,s)=>{let o,f=0;return i.pipeThrough(new TransformStream({transform(m,_){if(_.enqueue(m),o){f+=o.byteLength;let b=u===0?0:f/u;b>=1&&(b=1-Number.EPSILON),s==null||s({percent:b,totalBytes:Math.max(u,f),transferredBytes:f},o)}o=m},flush(){o&&(f+=o.byteLength,s==null||s({percent:1,totalBytes:Math.max(u,f),transferredBytes:f},o))}}))},Hb=(i,u)=>{if(!i.body)return i;if(i.status===204)return new Response(null,{status:i.status,statusText:i.statusText,headers:i.headers});const s=Math.max(0,Number(i.headers.get("content-length"))||0);return new Response(_p(i.body,s,u),{status:i.status,statusText:i.statusText,headers:i.headers})},Bb=(i,u,s)=>{if(!i.body)return i;const o=Lb(s??i.body);return new Request(i,{duplex:"half",body:_p(i.body,o,u)})},yn=i=>i!==null&&typeof i=="object",Dr=(...i)=>{for(const u of i)if((!yn(u)||Array.isArray(u))&&u!==void 0)throw new TypeError("The `options` argument must be an object");return Ws({},...i)},gp=(i={},u={})=>{const s=new globalThis.Headers(i),o=u instanceof globalThis.Headers,f=new globalThis.Headers(u);for(const[m,_]of f.entries())o&&_==="undefined"||_===void 0?s.delete(m):s.set(m,_);return s};function Nr(i,u,s){return Object.hasOwn(u,s)&&u[s]===void 0?[]:Ws(i[s]??[],u[s]??[])}const yp=(i={},u={})=>({beforeRequest:Nr(i,u,"beforeRequest"),beforeRetry:Nr(i,u,"beforeRetry"),afterResponse:Nr(i,u,"afterResponse"),beforeError:Nr(i,u,"beforeError")}),Yb=(i,u)=>{const s=new URLSearchParams;for(const o of[i,u])if(o!==void 0)if(o instanceof URLSearchParams)for(const[f,m]of o.entries())s.append(f,m);else if(Array.isArray(o))for(const f of o){if(!Array.isArray(f)||f.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");s.append(String(f[0]),String(f[1]))}else if(yn(o))for(const[f,m]of Object.entries(o))m!==void 0&&s.append(f,String(m));else{const f=new URLSearchParams(o);for(const[m,_]of f.entries())s.append(m,_)}return s},Ws=(...i)=>{let u={},s={},o={},f;const m=[];for(const _ of i)if(Array.isArray(_))Array.isArray(u)||(u=[]),u=[...u,..._];else if(yn(_)){for(let[b,y]of Object.entries(_)){if(b==="signal"&&y instanceof globalThis.AbortSignal){m.push(y);continue}if(b==="context"){if(y!=null&&(!yn(y)||Array.isArray(y)))throw new TypeError("The `context` option must be an object");u={...u,context:y==null?{}:{...u.context,...y}};continue}if(b==="searchParams"){y==null?f=void 0:f=f===void 0?y:Yb(f,y);continue}yn(y)&&b in u&&(y=Ws(u[b],y)),u={...u,[b]:y}}yn(_.hooks)&&(o=yp(o,_.hooks),u.hooks=o),yn(_.headers)&&(s=gp(s,_.headers),u.headers=s)}return f!==void 0&&(u.searchParams=f),m.length>0&&(m.length===1?u.signal=m[0]:dp?u.signal=AbortSignal.any(m):u.signal=m.at(-1)),u},Gb=i=>mp.includes(i)?i.toUpperCase():i,Vb=["get","put","head","delete","options","trace"],Xb=[408,413,429,500,502,503,504],Qb=[413,429,503],kh={limit:2,methods:Vb,statusCodes:Xb,afterStatusCodes:Qb,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:i=>.3*2**(i-1)*1e3,jitter:void 0,retryOnTimeout:!1},Zb=(i={})=>{if(typeof i=="number")return{...kh,limit:i};if(i.methods&&!Array.isArray(i.methods))throw new Error("retry.methods must be an array");if(i.methods&&(i.methods=i.methods.map(s=>s.toLowerCase())),i.statusCodes&&!Array.isArray(i.statusCodes))throw new Error("retry.statusCodes must be an array");const u=Object.fromEntries(Object.entries(i).filter(([,s])=>s!==void 0));return{...kh,...u}};class Ms extends Error{constructor(s){super(`Request timed out: ${s.method} ${s.url}`);Ve(this,"request");this.name="TimeoutError",this.request=s}}async function Kb(i,u,s,o){return new Promise((f,m)=>{const _=setTimeout(()=>{s&&s.abort(),m(new Ms(i))},o.timeout);o.fetch(i,u).then(f).catch(m).then(()=>{clearTimeout(_)})})}async function Jb(i,{signal:u}){return new Promise((s,o)=>{u&&(u.throwIfAborted(),u.addEventListener("abort",f,{once:!0}));function f(){clearTimeout(m),o(u.reason)}const m=setTimeout(()=>{u==null||u.removeEventListener("abort",f),s()},i)})}const $b=(i,u)=>{const s={};for(const o in u)Object.hasOwn(u,o)&&!(o in qb)&&!(o in Mb)&&(!(o in i)||o in Ub)&&(s[o]=u[o]);return s},Wb=i=>i===void 0?!1:Array.isArray(i)?i.length>0:i instanceof URLSearchParams?i.size>0:typeof i=="object"?Object.keys(i).length>0:typeof i=="string"?i.trim().length>0:!!i;function Fb(i){return i instanceof Ns||(i==null?void 0:i.name)===Ns.name}function Ib(i){return i instanceof Ms||(i==null?void 0:i.name)===Ms.name}var Kr,vp,Jt,Bt,rt,Q,$a,ea,vn,oe,Yr,bp,Us,Gr,Ja,qs,xp,ii,Vr,Ls;const ri=class ri{constructor(u,s={}){Pt(this,oe);Ve(this,"request");Pt(this,Jt);Pt(this,Bt,0);Pt(this,rt);Pt(this,Q);Pt(this,$a);Pt(this,ea);Pt(this,vn);var f,m,_;if(Kt(this,rt,u),Kt(this,Q,{...s,headers:gp(q(this,rt).headers,s.headers),hooks:yp({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},s.hooks),method:Gb(s.method??q(this,rt).method??"GET"),prefixUrl:String(s.prefixUrl||""),retry:Zb(s.retry),throwHttpErrors:s.throwHttpErrors??!0,timeout:s.timeout??1e4,fetch:s.fetch??globalThis.fetch.bind(globalThis),context:s.context??{}}),typeof q(this,rt)!="string"&&!(q(this,rt)instanceof URL||q(this,rt)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(q(this,Q).prefixUrl&&typeof q(this,rt)=="string"){if(q(this,rt).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");q(this,Q).prefixUrl.endsWith("/")||(q(this,Q).prefixUrl+="/"),Kt(this,rt,q(this,Q).prefixUrl+q(this,rt))}Ab&&dp&&(Kt(this,ea,q(this,Q).signal??q(this,rt).signal),Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal),Sh&&(q(this,Q).duplex="half"),q(this,Q).json!==void 0&&(q(this,Q).body=((m=(f=q(this,Q)).stringifyJson)==null?void 0:m.call(f,q(this,Q).json))??JSON.stringify(q(this,Q).json),q(this,Q).headers.set("content-type",q(this,Q).headers.get("content-type")??"application/json"));const o=s.headers&&new globalThis.Headers(s.headers).has("content-type");if(q(this,rt)instanceof globalThis.Request&&(Ob&&q(this,Q).body instanceof globalThis.FormData||q(this,Q).body instanceof URLSearchParams)&&!o&&q(this,Q).headers.delete("content-type"),this.request=new globalThis.Request(q(this,rt),q(this,Q)),Wb(q(this,Q).searchParams)){const y="?"+(typeof q(this,Q).searchParams=="string"?q(this,Q).searchParams.replace(/^\?/,""):new URLSearchParams(ke(_=ri,Kr,vp).call(_,q(this,Q).searchParams)).toString()),p=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,y);this.request=new globalThis.Request(p,q(this,Q))}if(q(this,Q).onUploadProgress){if(typeof q(this,Q).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Sh)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=ke(this,oe,Ls).call(this,this.request,q(this,Q).body??void 0)}}static create(u,s){var _,b,y;const o=new ri(u,s),f=async()=>{var w,k,N,Y,L,H,B,U,K,X,ue,ce;if(typeof q(o,Q).timeout=="number"&&q(o,Q).timeout>As)throw new RangeError(`The \`timeout\` option cannot be greater than ${As}`);await Promise.resolve();let p=await ke(w=o,oe,xp).call(w);for(const _e of q(o,Q).hooks.afterResponse){const F=ke(k=o,oe,Us).call(k,p.clone());let W;try{W=await _e(o.request,ke(N=o,oe,ii).call(N),F,{retryCount:q(o,Bt)})}catch(Pe){throw ke(Y=o,oe,Ja).call(Y,F),ke(L=o,oe,Ja).call(L,p),Pe}if(W instanceof pp)throw ke(H=o,oe,Ja).call(H,F),ke(B=o,oe,Ja).call(B,p),new Rs(W.options);const se=W instanceof globalThis.Response?W:p;F!==se&&ke(U=o,oe,Ja).call(U,F),p!==se&&ke(K=o,oe,Ja).call(K,p),p=se}if(ke(X=o,oe,Us).call(X,p),!p.ok&&(typeof q(o,Q).throwHttpErrors=="function"?q(o,Q).throwHttpErrors(p.status):q(o,Q).throwHttpErrors)){let _e=new Ns(p,o.request,ke(ue=o,oe,ii).call(ue));for(const F of q(o,Q).hooks.beforeError)_e=await F(_e,{retryCount:q(o,Bt)});throw _e}if(q(o,Q).onDownloadProgress){if(typeof q(o,Q).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!zb)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const _e=p.clone();return ke(ce=o,oe,Ja).call(ce,p),Hb(_e,q(o,Q).onDownloadProgress)}return p},m=ke(_=o,oe,qs).call(_,f).finally(()=>{var w,k;const p=q(o,$a);ke(w=o,oe,Gr).call(w,(p==null?void 0:p.body)??void 0),ke(k=o,oe,Gr).call(k,o.request.body??void 0)});for(const[p,w]of Object.entries(Cb))p==="bytes"&&typeof((y=(b=globalThis.Response)==null?void 0:b.prototype)==null?void 0:y.bytes)!="function"||(m[p]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||w);const k=await m;if(p==="json"){if(k.status===204)return"";const N=await k.text();return N===""?"":s.parseJson?s.parseJson(N):JSON.parse(N)}return k[p]()});return m}};Kr=new WeakSet,vp=function(u){return u&&typeof u=="object"&&!Array.isArray(u)&&!(u instanceof URLSearchParams)?Object.fromEntries(Object.entries(u).filter(([,s])=>s!==void 0)):u},Jt=new WeakMap,Bt=new WeakMap,rt=new WeakMap,Q=new WeakMap,$a=new WeakMap,ea=new WeakMap,vn=new WeakMap,oe=new WeakSet,Yr=function(){const u=q(this,Q).retry.delay(q(this,Bt));let s=u;q(this,Q).retry.jitter===!0?s=Math.random()*u:typeof q(this,Q).retry.jitter=="function"&&(s=q(this,Q).retry.jitter(u),(!Number.isFinite(s)||s<0)&&(s=u));const o=q(this,Q).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(o,s)},bp=async function(u){if(eh(this,Bt)._++,q(this,Bt)>q(this,Q).retry.limit)throw u;const s=u instanceof Error?u:new fp(u);if(s instanceof Rs)return s.customDelay??ke(this,oe,Yr).call(this);if(!q(this,Q).retry.methods.includes(this.request.method.toLowerCase()))throw u;if(q(this,Q).retry.shouldRetry!==void 0){const o=await q(this,Q).retry.shouldRetry({error:s,retryCount:q(this,Bt)});if(o===!1)throw u;if(o===!0)return ke(this,oe,Yr).call(this)}if(Ib(u)&&!q(this,Q).retry.retryOnTimeout)throw u;if(Fb(u)){if(!q(this,Q).retry.statusCodes.includes(u.response.status))throw u;const o=u.response.headers.get("Retry-After")??u.response.headers.get("RateLimit-Reset")??u.response.headers.get("X-RateLimit-Retry-After")??u.response.headers.get("X-RateLimit-Reset")??u.response.headers.get("X-Rate-Limit-Reset");if(o&&q(this,Q).retry.afterStatusCodes.includes(u.response.status)){let f=Number(o)*1e3;Number.isNaN(f)?f=Date.parse(o)-Date.now():f>=Date.parse("2024-01-01")&&(f-=Date.now());const m=q(this,Q).retry.maxRetryAfter??f;return f<m?f:m}if(u.response.status===413)throw u}return ke(this,oe,Yr).call(this)},Us=function(u){return q(this,Q).parseJson&&(u.json=async()=>q(this,Q).parseJson(await u.text())),u},Gr=function(u){u&&u.cancel().catch(()=>{})},Ja=function(u){ke(this,oe,Gr).call(this,u.body??void 0)},qs=async function(u){try{return await u()}catch(s){const o=Math.min(await ke(this,oe,bp).call(this,s),As);if(q(this,Bt)<1)throw s;if(await Jb(o,q(this,ea)?{signal:q(this,ea)}:{}),s instanceof Rs&&s.customRequest){const f=q(this,Q).signal?new globalThis.Request(s.customRequest,{signal:q(this,Q).signal}):new globalThis.Request(s.customRequest);ke(this,oe,Vr).call(this,f)}for(const f of q(this,Q).hooks.beforeRetry){const m=await f({request:this.request,options:ke(this,oe,ii).call(this),error:s,retryCount:q(this,Bt)});if(m instanceof globalThis.Request){ke(this,oe,Vr).call(this,m);break}if(m instanceof globalThis.Response)return m;if(m===hp)return}return ke(this,oe,qs).call(this,u)}},xp=async function(){var s;(s=q(this,Jt))!=null&&s.signal.aborted&&(Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal,this.request=new globalThis.Request(this.request,{signal:q(this,Q).signal}));for(const o of q(this,Q).hooks.beforeRequest){const f=await o(this.request,ke(this,oe,ii).call(this),{retryCount:q(this,Bt)});if(f instanceof Response)return f;if(f instanceof globalThis.Request){ke(this,oe,Vr).call(this,f);break}}const u=$b(this.request,q(this,Q));return Kt(this,$a,this.request),this.request=q(this,$a).clone(),q(this,Q).timeout===!1?q(this,Q).fetch(q(this,$a),u):Kb(q(this,$a),u,q(this,Jt),q(this,Q))},ii=function(){if(!q(this,vn)){const{hooks:u,...s}=q(this,Q);Kt(this,vn,Object.freeze(s))}return q(this,vn)},Vr=function(u){Kt(this,vn,void 0),this.request=ke(this,oe,Ls).call(this,u)},Ls=function(u,s){return!q(this,Q).onUploadProgress||!u.body?u:Bb(u,q(this,Q).onUploadProgress,s??q(this,Q).body??void 0)},Pt(ri,Kr);let Zr=ri;/*! MIT License © Sindre Sorhus */const Hs=i=>{const u=(s,o)=>Zr.create(s,Dr(i,o));for(const s of mp)u[s]=(o,f)=>Zr.create(o,Dr(i,f,{method:s}));return u.create=s=>Hs(Dr(s)),u.extend=s=>(typeof s=="function"&&(s=s(i??{})),Hs(Dr(i,s))),u.stop=hp,u.retry=Nb,u},Eh=Hs();let Mr=null;const Xr=Eh.create({prefixUrl:"/api",timeout:3e4,hooks:{beforeRequest:[i=>{const u=xa.getState().accessToken;u&&i.headers.set("Authorization",`Bearer ${u}`)}],afterResponse:[async(i,u,s)=>{if(s.status===401&&!i.headers.has("X-Retry-After-Refresh")){Mr||(Mr=xa.getState().refresh().finally(()=>{Mr=null}));try{await Mr}catch{throw s}const o=xa.getState().accessToken;return o&&i.headers.set("Authorization",`Bearer ${o}`),i.headers.set("X-Retry-After-Refresh","1"),Eh(i,u)}}]}}),Pb=3e4;function e0(i){if(i.link)return i.link;const u=(i.title+" "+i.body).match(/task\s*#?(\d+)/i);if(u)return`/tasks/${u[1]}`;const s=(i.title+" "+i.body).match(/worker\s+(\S+)/i);return s?`/workers/${s[1]}`:null}function Sp(){const i=Fa(),[u,s]=g.useState([]),[o,f]=g.useState(0),[m,_]=g.useState(!1),[b,y]=g.useState(!1),p=g.useRef(null),{t:w}=Vt(),k=g.useRef(async()=>{try{y(!0);const H=(await Xr.get("web/notifications",{searchParams:{limit:"20"}}).json()).data,B=H.filter(U=>!U.isRead).length;s(U=>U.length===H.length&&U.every((K,X)=>K.id===H[X].id&&K.isRead===H[X].isRead)?U:H),f(U=>U===B?U:B)}catch{}finally{y(!1)}});g.useEffect(()=>{k.current();const L=setInterval(()=>k.current(),Pb);return()=>clearInterval(L)},[]),g.useEffect(()=>{function L(H){p.current&&!p.current.contains(H.target)&&_(!1)}return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[]);async function N(L){try{await Xr.post(`web/notifications/${L}/read`),s(H=>H.map(B=>B.id===L?{...B,isRead:!0}:B)),f(H=>Math.max(0,H-1))}catch{}}async function Y(){try{await Xr.post("web/notifications/read-all"),s(L=>L.map(H=>({...H,isRead:!0}))),f(0)}catch{}}return h.jsxs("div",{className:"relative",ref:p,children:[h.jsxs("button",{type:"button",onClick:()=>_(L=>!L),"aria-label":w("common.notifications"),className:"relative inline-flex items-center justify-center rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]",children:[h.jsx($v,{size:16}),o>0&&h.jsx("span",{className:"absolute right-0 top-0 flex h-3 min-w-3 items-center justify-center rounded-full bg-[var(--destructive)] px-0.5 text-[8px] font-semibold leading-none text-white",children:o})]}),m&&h.jsxs("div",{className:"absolute right-0 top-full z-50 mt-2 w-[min(320px,calc(100vw-2rem))] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm font-semibold",children:w("common.notifications")}),o>0&&h.jsxs("button",{type:"button",onClick:Y,"aria-label":w("common.mark_all_read"),className:"inline-flex items-center gap-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(Wv,{className:"h-3.5 w-3.5"}),w("common.mark_all_read")]})]}),h.jsx("div",{className:"max-h-80 overflow-y-auto",children:b&&u.length===0?h.jsx("div",{className:"flex justify-center py-8",children:h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):u.length===0?h.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[h.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),h.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:w("common.no_notifications")})]}):u.map(L=>{const H=e0(L);return h.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 transition-colors ${H?"cursor-pointer hover:bg-[var(--bg-input)]":""} ${L.isRead?"opacity-60":"bg-[var(--accent)]/5"}`,onClick:()=>{H&&(L.isRead||N(L.id),_(!1),i(H))},children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm font-medium",title:L.title,children:L.title}),h.jsx("p",{className:"truncate text-xs text-[var(--text-secondary)]",title:L.body,children:L.body}),h.jsx("p",{className:"mt-1 text-xs text-[var(--text-secondary)] opacity-60",children:new Date(L.createdAt).toLocaleString()})]}),!L.isRead&&h.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),N(L.id)},"aria-label":w("common.mark_as_read"),className:"shrink-0 rounded-[4px] p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:h.jsx(Fv,{className:"h-3.5 w-3.5"})})]},L.id)})})]})]})}function kp(i,u=50){return i.name??Wh(i.description,u)}function t0(i){return i.description}function Ep(i){return`#${i.id} ${t0(i)}`}function G1(i,u=100){return{text:`#${i.id} ${kp(i,u)}`,title:Ep(i)}}function a0(i){return{tasks:i.tasks.map(u=>({type:"task",id:u.id,title:`#${u.id} ${kp(u)}`,subtitle:`${u.status} · ${u.project_key}`,hoverTitle:Ep(u)})),workers:(i.workers??[]).map(u=>({type:"worker",id:u.id,title:u.name,subtitle:`${u.hostname} · ${u.status}`})),projects:i.projects.map(u=>({type:"project",id:u.key,title:u.name,subtitle:u.repository}))}}const n0=300,wh={tasks:pb,workers:ap,projects:nb},l0={tasks:"tasks",workers:"workers",projects:"projects"};function wp({renderTrigger:i}={}){const[u,s]=g.useState(""),[o,f]=g.useState({tasks:[],workers:[],projects:[]}),[m,_]=g.useState(!1),[b,y]=g.useState(!1),[p,w]=g.useState(0),k=g.useRef(null),N=g.useRef(null),Y=g.useRef(void 0),L=g.useRef(void 0),H=Fa(),{t:B}=Vt(),U=g.useMemo(()=>[...o.tasks,...o.workers,...o.projects],[o]),K=g.useCallback(async W=>{var Pe;if(!W.trim()){f({tasks:[],workers:[],projects:[]});return}(Pe=L.current)==null||Pe.abort();const se=new AbortController;L.current=se;try{_(!0);const Je=await Xr.get("web/search",{searchParams:{q:W},signal:se.signal}).json();f(a0(Je)),w(0)}catch(Je){if(Je instanceof DOMException&&Je.name==="AbortError")return}finally{se.signal.aborted||_(!1)}},[]);g.useEffect(()=>(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>K(u),n0),()=>{Y.current&&clearTimeout(Y.current)}),[u,K]),g.useEffect(()=>{function W(se){se.key==="/"&&!b&&!(se.target instanceof HTMLInputElement||se.target instanceof HTMLTextAreaElement)&&(se.preventDefault(),y(!0)),se.key==="Escape"&&b&&(se.preventDefault(),X())}return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[b]),g.useEffect(()=>{b&&setTimeout(()=>{var W;return(W=N.current)==null?void 0:W.focus()},50)},[b]);function X(){y(!1),s(""),f({tasks:[],workers:[],projects:[]}),w(0)}function ue(W){switch(X(),W.type){case"task":H(`/tasks/${W.id}`);break;case"worker":H(`/workers/${W.id}`);break;case"project":H(`/projects/${W.id}`);break}}function ce(W){W.key==="ArrowDown"?(W.preventDefault(),w(se=>Math.min(se+1,U.length-1))):W.key==="ArrowUp"?(W.preventDefault(),w(se=>Math.max(se-1,0))):W.key==="Enter"&&U[p]&&(W.preventDefault(),ue(U[p]))}const _e=U.length>0;let F=0;return h.jsxs(h.Fragment,{children:[i?i(()=>y(!0)):h.jsxs("button",{type:"button",onClick:()=>y(!0),className:"flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-1.5 text-xs text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:[h.jsx(tp,{className:"h-3.5 w-3.5"}),h.jsx("span",{children:B("common.search_placeholder")}),h.jsx("kbd",{className:"ml-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-1.5 py-0.5 text-[11px] text-[var(--text-muted)]",children:"/"})]}),b&&h.jsx("div",{ref:k,className:"fixed inset-0 z-[100] flex items-start justify-center pt-[calc(var(--safe-area-top,0px)+16px)] md:pt-[15vh]",style:{backgroundColor:"rgba(0, 0, 0, 0.6)"},onClick:W=>{W.target===k.current&&X()},children:h.jsxs("div",{className:"mx-3 w-full max-w-[640px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-2xl sm:mx-4 md:mx-0",children:[h.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm text-[var(--accent)]",children:"/"}),h.jsx("input",{ref:N,type:"text",placeholder:B("common.search_input_placeholder"),value:u,onChange:W=>s(W.target.value),onKeyDown:ce,className:"flex-1 bg-transparent text-sm text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none"}),m&&h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})]}),h.jsx("div",{className:"max-h-[50vh] overflow-y-auto sm:max-h-[60vh] md:max-h-[400px]",children:u.trim()&&!_e&&!m?h.jsx("div",{className:"py-10 text-center text-xs text-[var(--text-muted)]",children:B("common.no_search_results",{query:u})}):Object.keys(wh).map(W=>{const se=o[W];if(se.length===0)return null;const Pe=wh[W],Je=F;return F+=se.length,h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-[var(--text-muted)]",children:[h.jsx(Pe,{className:"h-3 w-3"}),h.jsx("span",{className:"text-[11px] lowercase tracking-wider",children:l0[W]})]}),se.map((Ce,At)=>{const ut=Je+At,Me=ut===p;return h.jsxs("button",{type:"button",className:`flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors ${Me?"bg-[var(--accent)]/10 text-[var(--accent)]":"hover:bg-[var(--bg-input)]"}`,onClick:()=>ue(Ce),onMouseEnter:()=>w(ut),children:[h.jsx("span",{className:`text-xs ${Me?"text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:Me?">":" "}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm",title:Ce.hoverTitle??Ce.title,children:Ce.title}),Ce.subtitle&&h.jsx("p",{className:"truncate text-xs text-[var(--text-muted)]",title:Ce.subtitle,children:Ce.subtitle})]})]},`${Ce.type}-${Ce.id}`)})]},W)})}),h.jsxs("div",{className:"hidden items-center gap-4 border-t border-[var(--border)] px-4 py-2 md:flex",children:[h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↑↓"})," ",B("common.navigate_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↵"})," ",B("common.select_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"esc"})," ",B("common.close_hint")]})]})]})})]})}const i0={danger:"var(--destructive)",warning:"var(--warning)",accent:"var(--accent)"};function Th(i){return Array.from(i.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function r0({isOpen:i,onClose:u,onConfirm:s,title:o,message:f,confirmLabel:m,cancelLabel:_,confirmVariant:b="danger",isLoading:y,children:p}){const{t:w}=Vt(),k=g.useId(),N=m??w("common.confirm"),Y=_??w("common.cancel"),L=g.useRef(null),H=g.useRef(null),B=i0[b];g.useEffect(()=>{if(!i)return;H.current=document.activeElement;const K=requestAnimationFrame(()=>{if(L.current){const X=Th(L.current);X.length>0&&X[0].focus()}});return()=>{var X;cancelAnimationFrame(K),(X=H.current)==null||X.focus()}},[i]);const U=g.useCallback(K=>{if(K.key==="Escape"){u();return}if(K.key==="Tab"&&L.current){const X=Th(L.current);if(X.length===0)return;const ue=X[0],ce=X[X.length-1];K.shiftKey?document.activeElement===ue&&(K.preventDefault(),ce.focus()):document.activeElement===ce&&(K.preventDefault(),ue.focus())}},[u]);return i?h.jsx("div",{onClick:u,style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"max(1rem, 10vh)",paddingLeft:"1rem",paddingRight:"1rem",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:h.jsxs("div",{ref:L,role:"dialog","aria-modal":"true","aria-labelledby":k,onClick:K=>K.stopPropagation(),onKeyDown:U,style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem"},children:[h.jsx("div",{style:{marginBottom:"1.25rem"},children:h.jsxs("div",{id:k,style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:[h.jsx(np,{style:{width:"1rem",height:"1rem"}}),o]})}),h.jsxs("div",{style:{marginBottom:"1.25rem"},children:[h.jsx("p",{style:{color:"var(--text-muted)",fontSize:"0.75rem",lineHeight:"1.5"},children:f}),p]}),h.jsxs("div",{style:{display:"flex",gap:"0.75rem"},children:[h.jsx("button",{type:"button",onClick:u,disabled:y,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",cursor:y?"not-allowed":"pointer",opacity:y?.7:1,transition:"color 0.15s, border-color 0.15s"},children:Y}),h.jsx("button",{type:"button",onClick:s,disabled:y,style:{flex:1,padding:"0.5rem",backgroundColor:B,color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,cursor:y?"not-allowed":"pointer",opacity:y?.7:1},children:y?w("common.processing"):N})]})]})}):null}const jh="overlord-pwa-install-dismissed";function u0(){const i=navigator.userAgent;return/iP(hone|od|ad)/.test(i)&&/WebKit/.test(i)&&!/(CriOS|FxiOS|OPiOS|mercury)/.test(i)}function o0(){return navigator.standalone===!0||window.matchMedia("(display-mode: standalone)").matches}function s0(){const{t:i}=Vt(),[u,s]=g.useState("hidden"),[o,f]=g.useState(!1),m=g.useRef(null),_=g.useRef(void 0);g.useEffect(()=>{if(o0()||localStorage.getItem(jh)||window.innerWidth>=768)return;const p=k=>{k.preventDefault(),m.current=k};window.addEventListener("beforeinstallprompt",p);const w=setTimeout(()=>s("visible"),1e3);return()=>{window.removeEventListener("beforeinstallprompt",p),clearTimeout(w),clearTimeout(_.current)}},[]);function b(){localStorage.setItem(jh,"1"),s("dismissing"),_.current=setTimeout(()=>s("hidden"),200)}async function y(){if(m.current){await m.current.prompt();const{outcome:p}=await m.current.userChoice;p==="accepted"&&b(),m.current=null}else u0()&&f(!0)}return u==="hidden"?null:h.jsx("div",{className:`fixed bottom-4 left-4 right-4 z-40 md:hidden ${u==="dismissing"?"animate-slide-down":"animate-slide-up"}`,role:"dialog","aria-label":i("pwa_install.title"),children:h.jsxs("div",{className:"overflow-hidden rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--accent)]/20 bg-[var(--accent)]/[0.06] px-3 py-1.5",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}),h.jsx("span",{className:"text-[9px] font-medium text-[var(--accent)]",children:i("pwa_install.title")})]}),h.jsx("button",{onClick:b,className:"p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:h.jsx(lp,{size:14})})]}),h.jsx("div",{className:"px-3.5 py-3",children:o?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.ios_command")]}),h.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:[i("pwa_install.ios_step_1"),i("pwa_install.ios_step_2"),i("pwa_install.ios_step_3")].map((p,w)=>h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] bg-[var(--accent)]/[0.08]",children:h.jsx("span",{className:"text-xs font-semibold text-[var(--accent)]",children:w+1})}),h.jsxs("span",{className:"text-[10px] leading-snug text-[var(--text-secondary)]",children:[w===0&&h.jsx(db,{size:12,className:"mr-1 inline-block align-text-bottom text-[var(--text-muted)]"}),p]})]},w))})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.command")]}),h.jsxs("div",{className:"mt-1.5 text-[10px] leading-relaxed text-[var(--text-secondary)]",children:["→ ",i("pwa_install.desc_1"),h.jsx("br",{}),"→ ",i("pwa_install.desc_2")]}),h.jsxs("div",{className:"mt-2.5 flex gap-2",children:[h.jsx("button",{onClick:y,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_install.install")}),h.jsx("button",{onClick:b,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[10px] text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:i("pwa_install.skip")})]})]})})]})})}function c0(){const{t:i}=Vt(),[u,s]=g.useState(!1);return g.useEffect(()=>{if(!("serviceWorker"in navigator))return;let o=!1,f=null,m=null,_=null,b=null;function y(){o||s(!0)}navigator.serviceWorker.addEventListener("controllerchange",y);function p(k){if(f=k,k.waiting){s(!0);return}_=()=>{const N=k.installing;N&&(m=N,b=()=>{N.state==="installed"&&navigator.serviceWorker.controller&&(o||s(!0))},N.addEventListener("statechange",b))},k.addEventListener("updatefound",_)}navigator.serviceWorker.getRegistration().then(k=>{k&&!o&&p(k)});const w=setInterval(()=>{navigator.serviceWorker.getRegistration().then(k=>{!k||o||(k.update().catch(()=>{}),k.waiting&&s(!0))})},3e4);return()=>{o=!0,clearInterval(w),navigator.serviceWorker.removeEventListener("controllerchange",y),f&&_&&f.removeEventListener("updatefound",_),m&&b&&m.removeEventListener("statechange",b)}},[]),u?h.jsx("div",{className:"animate-slide-up fixed bottom-20 left-4 right-4 z-50 md:bottom-4 md:left-auto md:right-4 md:w-80",children:h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] px-3.5 py-3 shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsx(ep,{size:14,className:"shrink-0 text-[var(--accent)]"}),h.jsx("span",{className:"flex-1 text-[10px] text-[var(--text-secondary)]",children:i("pwa_update.message")}),h.jsx("button",{onClick:()=>window.location.reload(),className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-1 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_update.reload")})]})}):null}const Ur=64,f0=96,Rh=32;function d0({children:i,className:u}){const s=g.useRef(null),o=g.useRef(0),f=g.useRef("idle"),[m,_]=g.useState(0),[b,y]=g.useState("idle"),p=g.useCallback(U=>{f.current=U,y(U)},[]),w=g.useCallback(()=>{const U=s.current;return U?U.scrollTop<=0:!0},[]),k=g.useCallback(U=>{if(!w()){o.current=0;return}o.current=U.touches[0].clientY},[w]),N=g.useCallback(U=>{if(f.current==="refreshing"||o.current===0)return;const X=U.touches[0].clientY-o.current;if(X<=0){f.current!=="idle"&&(_(0),p("idle"));return}if(!w())return;U.preventDefault();const ue=Math.min(X*.5,f0);_(ue),p(ue>=Ur?"ready":"pulling")},[w,p]),Y=g.useCallback(()=>{f.current!=="refreshing"&&(f.current==="ready"?(p("refreshing"),_(Ur),setTimeout(()=>{window.location.reload()},300)):(_(0),p("idle")),o.current=0)},[p]);g.useEffect(()=>{const U=s.current;if(U)return U.addEventListener("touchstart",k,{passive:!0}),U.addEventListener("touchmove",N,{passive:!1}),U.addEventListener("touchend",Y,{passive:!0}),()=>{U.removeEventListener("touchstart",k),U.removeEventListener("touchmove",N),U.removeEventListener("touchend",Y)}},[k,N,Y]);const L=Math.min(m/Ur,1),H=b==="refreshing"?0:m/Ur*180,B=m>0||b==="refreshing";return h.jsxs("div",{ref:s,className:u,style:{overscrollBehaviorY:"contain"},children:[B&&h.jsx("div",{className:"pointer-events-none flex items-center justify-center md:hidden",style:{height:m,transition:b==="idle"?"height 200ms ease-out":void 0},children:h.jsx("div",{className:"flex items-center justify-center rounded-full bg-[var(--bg-card)] border border-[var(--border)]",style:{width:Rh,height:Rh,opacity:L,transition:b==="idle"?"opacity 200ms ease-out":void 0},children:b==="refreshing"?h.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",className:"animate-spin",style:{color:"var(--accent)"},children:[h.jsx("circle",{cx:"8",cy:"8",r:"6",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),h.jsx("path",{d:"M8 2a6 6 0 0 1 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):h.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",style:{color:b==="ready"?"var(--accent)":"var(--text-muted)",transform:`rotate(${H}deg)`,transition:"color 150ms"},children:h.jsx("path",{d:"M8 3v8M5 8l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),i]})}const Tp=g.createContext({setActions:()=>{}});function V1(i){const{setActions:u}=g.useContext(Tp);g.useEffect(()=>(u(i),()=>u(null)),[i,u])}const jp=g.createContext({setSubtitle:()=>{}});function X1(i){const{setSubtitle:u}=g.useContext(jp),s=typeof i=="string"?i:(i==null?void 0:i.text)??null,o=typeof i=="string"?i:(i==null?void 0:i.title)??(i==null?void 0:i.text)??null;g.useEffect(()=>s?(u(o&&o!==s?{text:s,title:o}:s),()=>u(null)):(u(null),()=>u(null)),[s,o,u])}const m0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:Ph},{to:"/dashboard",label:"dashboard",icon:Ih},{to:"/workers",label:"workers",icon:ap},{to:"/projects",label:"projects",icon:lb},{to:"/access-tokens",label:"tokens",icon:rb}],h0=[{to:"/docs/cli",label:"cli",icon:$s},{to:"/docs/api",label:"api",icon:ab},{to:"/docs/bot",label:"bot",icon:cb},{to:"/docs/skill",label:"skill",icon:hb},{to:"/docs/all",label:"all",icon:ub}],p0=[{to:"/admin",label:"admin",icon:mb}],_0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:Ph},{to:"/dashboard",label:"dashboard",icon:Ih}],qr={"/home":{title:"common.breadcrumb_terminal",subtitle:"common.breadcrumb_terminal_sub"},"/dashboard":{title:"common.breadcrumb_dashboard",subtitle:"common.breadcrumb_dashboard_sub"},"/tasks":{title:"common.breadcrumb_tasks",subtitle:"common.breadcrumb_tasks_sub"},"/workers":{title:"common.breadcrumb_workers",subtitle:"common.breadcrumb_workers_sub"},"/projects":{title:"common.breadcrumb_projects",subtitle:"common.breadcrumb_projects_sub"},"/admin":{title:"common.breadcrumb_admin",subtitle:"common.breadcrumb_admin_sub"},"/profile":{title:"common.breadcrumb_profile",subtitle:"common.breadcrumb_profile_sub"},"/access-tokens":{title:"common.breadcrumb_tokens",subtitle:"common.breadcrumb_tokens_sub"},"/docs":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_sub"},"/docs/cli":{title:"common.breadcrumb_docs_cli",subtitle:"common.breadcrumb_docs_cli_sub"},"/docs/api":{title:"common.breadcrumb_docs_api",subtitle:"common.breadcrumb_docs_api_sub"},"/docs/skill":{title:"common.breadcrumb_docs_skill",subtitle:"common.breadcrumb_docs_skill_sub"},"/docs/bot":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_bot_sub"},"/docs/all":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_all_sub"}};function g0(i){const{t:u}=Vt();if(qr[i]){const o=qr[i];return{title:u(o.title),subtitle:u(o.subtitle)}}const s="/"+i.split("/").filter(Boolean)[0];if(qr[s]){const o=qr[s],f=i.split("/").filter(Boolean).slice(1).join(" / ");return{title:u(o.title),subtitle:f||u(o.subtitle)}}return{title:i.slice(1).replace(/\//g," // ")||"home"}}function y0(i,u){return i==="/home"?u==="/home":i==="/dashboard"?u==="/dashboard":u.startsWith(i)}function v0(){const i=gt(),{t:u}=Vt(),s={terminal:u("terminal_home.title"),dashboard:u("dashboard.title"),tasks:u("tasks.title"),workers:u("workers.title")};return h.jsxs("nav",{className:"flex items-center justify-around border-t border-[var(--border)] bg-[var(--bg-card)]",style:{height:48,paddingTop:4},children:[_0.map(({to:o,label:f,icon:m})=>{const _=y0(o,i.pathname);return h.jsxs(Js,{to:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(m,{size:18,className:_?"text-[var(--accent)]":"text-[var(--text-muted)]"}),h.jsx("span",{className:`text-[11px] lowercase ${_?"font-bold text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:s[f]??f})]},o)}),h.jsx(wp,{renderTrigger:o=>h.jsxs("button",{type:"button",onClick:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(tp,{size:18,className:"text-[var(--text-muted)]"}),h.jsx("span",{className:"text-[11px] lowercase text-[var(--text-muted)]",children:u("common.search_placeholder")})]})})]})}function b0(){const i=Fa(),{t:u}=Vt();return h.jsxs("header",{className:"flex items-center justify-between border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:hidden",style:{height:"calc(56px + env(safe-area-inset-top, 0px))",minHeight:"calc(56px + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)"},children:[h.jsxs("button",{onClick:()=>i("/home"),className:"flex items-center gap-2",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-[4px] bg-[var(--accent)]",children:h.jsx("span",{className:"text-sm font-semibold",style:{color:"#0C0C0C"},children:"~"})}),h.jsx("span",{className:"text-sm font-bold lowercase text-[var(--text-primary)]",children:u("common.overlord")})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("button",{onClick:()=>i("/profile"),className:"p-2 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]","aria-label":u("common.profile"),children:h.jsx(gb,{size:18})}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})}function zs({label:i,items:u,collapsed:s}){return h.jsxs("div",{className:"mt-4 first:mt-0",children:[!s&&h.jsx("div",{className:"mb-2 px-3 text-xs lowercase",style:{color:"var(--text-muted)"},children:i}),u.map(({to:o,label:f,icon:m})=>h.jsx(Js,{to:o,className:({isActive:_})=>`flex items-center text-sm lowercase transition-colors ${s?"justify-center py-3":"gap-2.5 px-3 py-1.5"} ${_?"text-[var(--accent)] bg-[var(--accent)]/5":"text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:({isActive:_})=>h.jsxs(h.Fragment,{children:[h.jsx(m,{size:14,style:{flexShrink:0}}),!s&&h.jsx("span",{children:_?`> ${f}`:` ${f}`})]})},o))]})}function x0(){const{user:i,logout:u}=xa(),s=Fa(),[o,f]=g.useState(!1),m=xb(),{t:_}=Vt(),{sidebarCollapsed:b,toggleSidebar:y}=kb();function p(){u(),s("/login")}return h.jsxs("aside",{className:"hidden md:flex flex-col border-r border-[var(--border)] transition-[width,min-width] duration-300 overflow-hidden",style:{width:b?56:240,minWidth:b?56:240,backgroundColor:"var(--bg-card)"},children:[h.jsx("div",{className:"flex items-center px-5",style:{height:48},children:h.jsxs("button",{onClick:()=>s("/home"),className:"flex items-center gap-2.5",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-[4px] bg-[var(--accent)]",style:{flexShrink:0},children:h.jsx("span",{className:"text-lg font-semibold",style:{color:"#0C0C0C"},children:"~"})}),!b&&h.jsx("span",{className:"text-base font-bold lowercase tracking-tight",style:{color:"var(--text-primary)"},children:_("common.overlord")})]})}),h.jsxs("nav",{className:"flex-1 px-3 pt-2",children:[h.jsx(zs,{label:_("common.navigation"),items:m0,collapsed:b}),h.jsx(zs,{label:_("common.docs_section"),items:h0,collapsed:b}),m&&h.jsx(zs,{label:_("common.admin_section"),items:p0,collapsed:b})]}),h.jsx("div",{className:`px-3 py-1 ${b?"flex justify-center":""}`,children:h.jsx("button",{onClick:y,className:"flex items-center justify-center w-full py-1.5 rounded-[4px] text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)] hover:bg-[var(--accent)]/5","aria-label":b?"expand sidebar":"collapse sidebar",children:b?h.jsx(Pv,{size:14}):h.jsx(Iv,{size:14})})}),h.jsx("div",{className:"border-t border-[var(--border)] p-3",children:h.jsxs("div",{className:`flex items-center py-2 ${b?"justify-center":"gap-3 px-3"}`,children:[h.jsx("button",{onClick:()=>s("/profile"),className:"flex h-7 w-7 items-center justify-center text-xs font-bold text-black transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",borderRadius:4,flexShrink:0},title:_("common.profile"),children:((i==null?void 0:i.username)??"u")[0].toUpperCase()}),!b&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{onClick:()=>s("/profile"),className:"min-w-0 flex-1 text-left transition-colors hover:opacity-80",title:_("common.profile"),children:[h.jsx("div",{className:"truncate text-sm lowercase",style:{color:"var(--text-primary)"},children:(i==null?void 0:i.username)??"user"}),h.jsx("div",{className:"truncate text-xs lowercase",style:{color:"var(--text-muted)"},children:(i==null?void 0:i.role)??"user"})]}),h.jsx("button",{onClick:()=>f(!0),className:"p-1 text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)]","aria-label":_("common.log_out"),children:h.jsx(sb,{size:14})})]})]})}),h.jsx(r0,{isOpen:o,onClose:()=>f(!1),onConfirm:p,title:_("common.logout_title"),message:_("common.logout_message"),confirmLabel:_("common.logout"),confirmVariant:"warning"})]})}function S0({headerActions:i,subtitleOverride:u}){const s=gt(),{title:o,subtitle:f}=g0(s.pathname),m=u??f,_=typeof m=="string"?m:m==null?void 0:m.text,b=typeof m=="string"?m:(m==null?void 0:m.title)??(m==null?void 0:m.text);return h.jsxs("header",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5",style:{height:48,minHeight:48,backgroundColor:"var(--bg-card)"},children:[h.jsxs("div",{className:"text-sm lowercase",children:[h.jsx("span",{style:{color:"var(--text-primary)"},children:o}),_&&h.jsxs("span",{style:{color:"var(--text-muted)"},title:b,children:[" ","// ",Wh(_,40)]})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[i,h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(wp,{}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})]})}function k0(){const[i,u]=g.useState(null),[s,o]=g.useState(null),f=gt(),m=f.pathname==="/home",_=/^\/tasks\/\d+$/.test(f.pathname),b=f.pathname.startsWith("/docs");return g.useEffect(()=>up.getState().init(),[]),h.jsxs("div",{className:"fixed inset-x-0 top-0 flex w-full overflow-hidden font-mono md:flex-row",style:{height:"var(--app-height, 100dvh)",minHeight:"var(--app-height, 100dvh)"},children:[h.jsx(x0,{}),h.jsxs("div",{"data-testid":"app-main-column",className:"flex min-h-0 flex-1 flex-col overflow-hidden pb-[calc(48px+var(--safe-area-bottom,0px))] md:pb-0",children:[h.jsx(b0,{}),!b&&h.jsx(S0,{headerActions:i,subtitleOverride:s}),h.jsx(d0,{className:m||_?"min-h-0 flex-1 overflow-hidden bg-[var(--bg-primary)]":"min-h-0 flex-1 overflow-auto bg-[var(--bg-primary)] p-4 pb-6 md:p-6 md:pb-6",children:h.jsx(Tp.Provider,{value:{setActions:u},children:h.jsx(jp.Provider,{value:{setSubtitle:o},children:h.jsx(cv,{})})})}),h.jsx(s0,{}),h.jsx(c0,{}),h.jsx("div",{className:"safe-area-bottom-fill fixed inset-x-0 bottom-0 z-30 bg-[var(--bg-card)] md:hidden",children:h.jsx(v0,{})})]})]})}function Ah(i){var s;const u=(s=i.state)==null?void 0:s.from;return u?{from:u}:{from:{pathname:i.pathname,search:i.search}}}function li({children:i,requireAdmin:u=!1}){const{accessToken:s,user:o,requireTotpSetup:f,initializing:m}=xa(),_=gt();if(m)return h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})});if(!s)return h.jsx(ll,{to:"/login",state:Ah(_),replace:!0});if(f){const b=Ah(_);return _.pathname!=="/totp-setup"&&_.pathname!=="/bind"?h.jsx(ll,{to:"/totp-setup",state:b,replace:!0}):_.pathname==="/bind"?(sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(b.from)),h.jsx(ll,{to:"/totp-setup",state:b,replace:!0})):h.jsx(h.Fragment,{children:i})}return u&&(o==null?void 0:o.role)!==ip.ADMIN?h.jsx(ll,{to:"/home",replace:!0}):h.jsx(h.Fragment,{children:i})}function E0({children:i}){const{theme:u,resolved:s,setResolved:o}=sp();return g.useEffect(()=>{if(u!=="system"){o(u);return}const f=window.matchMedia("(prefers-color-scheme: dark)");o(f.matches?"dark":"light");const m=_=>o(_.matches?"dark":"light");return f.addEventListener("change",m),()=>f.removeEventListener("change",m)},[u,o]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",s==="dark")},[s]),h.jsx(h.Fragment,{children:i})}class w0 extends g.Component{constructor(u){super(u),this.state={hasError:!1,error:null}}static getDerivedStateFromError(u){return{hasError:!0,error:u}}render(){var u;return this.state.hasError?h.jsxs("div",{className:"flex h-full min-h-[300px] flex-col items-center justify-center gap-4 p-8 font-mono",children:[h.jsx("span",{className:"text-lg font-bold text-[var(--destructive)]",children:Br("common.runtime_error")}),h.jsx("p",{className:"max-w-md text-center text-xs text-[var(--text-muted)]",children:((u=this.state.error)==null?void 0:u.message)||Br("common.an_unexpected_error_occurred")}),h.jsxs("button",{onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(ep,{className:"h-3.5 w-3.5"}),Br("common.reload")]})]}):this.props.children}}function T0({isOpen:i}){const u=Fa(),{logout:s,setSessionExpired:o}=xa(),{t:f}=Vt();function m(){s(),o(!1),u("/login")}return i?h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[h.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),h.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:h.jsxs("div",{className:"flex flex-col items-center px-8 py-10",children:[h.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-full bg-[var(--warning)]/10",children:h.jsx(ob,{className:"h-7 w-7 text-[var(--warning)]"})}),h.jsx("h3",{className:"mb-2 text-base font-bold text-[var(--text-primary)]",children:f("auth.session_expired")}),h.jsx("p",{className:"mb-8 text-center text-xs text-[var(--text-secondary)]",children:f("auth.session_expired_message")}),h.jsx("button",{type:"button",className:"w-full rounded-[4px] bg-[var(--accent)] px-3 py-2.5 text-xs font-medium text-black hover:opacity-90 transition-opacity",onClick:m,children:f("auth.go_to_login")})]})})]}):null}const zh=5;let ba=[];const Bs=new Set;function Rp(){Bs.forEach(i=>i())}function j0(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Wa(i,u,s=4e3){const o=j0();return ba=[...ba,{id:o,variant:i,message:u,duration:s}],ba.length>zh&&(ba=ba.slice(ba.length-zh)),Rp(),o}Wa.success=(i,u)=>Wa("success",i,u);Wa.error=(i,u)=>Wa("error",i,u);Wa.warning=(i,u)=>Wa("warning",i,u);Wa.info=(i,u)=>Wa("info",i,u);function R0(i){ba=ba.filter(u=>u.id!==i),Rp()}function A0(){const[,i]=g.useState(0);return g.useEffect(()=>{const u=()=>i(s=>s+1);return Bs.add(u),()=>{Bs.delete(u)}},[]),ba}const z0={success:{icon:eb,borderColor:"var(--accent)"},error:{icon:tb,borderColor:"var(--destructive)"},warning:{icon:np,borderColor:"var(--warning)"},info:{icon:ib,borderColor:"var(--info)"}};function O0({item:i}){const u=z0[i.variant],s=u.icon,{t:o}=Vt(),f=g.useCallback(()=>R0(i.id),[i.id]);return g.useEffect(()=>{if(!i.duration)return;const m=setTimeout(f,i.duration);return()=>clearTimeout(m)},[i.duration,f]),h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] bg-[var(--bg-card)] px-4 py-3 shadow-lg",style:{borderLeft:`3px solid ${u.borderColor}`},role:"alert",children:[h.jsx(s,{className:"h-4 w-4 shrink-0",style:{color:u.borderColor}}),h.jsx("p",{className:"flex-1 text-xs text-[var(--text-primary)]",children:i.message}),h.jsx("button",{onClick:f,className:"shrink-0 rounded-[4px] p-0.5 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]","aria-label":o("common.dismiss_notification"),children:h.jsx(lp,{className:"h-3.5 w-3.5"})})]})}function C0(){const i=A0();return i.length===0?null:h.jsx("div",{className:"pointer-events-none fixed right-4 top-4 z-[9999] flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2",children:i.map(u=>h.jsx("div",{className:"pointer-events-auto",children:h.jsx(O0,{item:u})},u.id))})}const D0=g.lazy(()=>ne(()=>import("./LandingPage-1SiyCrIO.js"),__vite__mapDeps([0,1,2,3,4,5]))),N0=g.lazy(()=>ne(()=>import("./LoginPage-D7C2GvH2.js"),[])),M0=g.lazy(()=>ne(()=>import("./TotpSetupPage-C09YtAXD.js"),[])),U0=g.lazy(()=>ne(()=>import("./NotFoundPage-B2K-657t.js"),[])),q0=g.lazy(()=>ne(()=>import("./HomePage-Sfw7oH7M.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,1]))),L0=g.lazy(()=>ne(()=>import("./TerminalHomePage-BFyQcEXU.js"),__vite__mapDeps([15,16,17,18,10,11,19,8,12,13,20,21,22]))),H0=g.lazy(()=>ne(()=>import("./TaskListPage-D6iQoHz7.js"),__vite__mapDeps([23,16,7,8,12,14,24,19,5,25,9,20,26,11]))),B0=g.lazy(()=>ne(()=>import("./TaskDetailPage-BQY6iia7.js"),__vite__mapDeps([27,16,17,18,12,19,8,14,28,21,24,29,30]))),Y0=g.lazy(()=>ne(()=>import("./WorkerListPage-B_K4x-PV.js"),__vite__mapDeps([31,8,32,33,34,35,36,22,5,30,19,25,9,13,20]))),G0=g.lazy(()=>ne(()=>import("./WorkerDetailPage-DhtIXNEC.js"),__vite__mapDeps([37,12,8,38,32,13,14,39,28]))),V0=g.lazy(()=>ne(()=>import("./WorkerSetupGuidePage-DNy2wbA9.js"),__vite__mapDeps([33,34,35,36,22]))),X0=g.lazy(()=>ne(()=>import("./ProjectListPage-C5U_Q6m_.js"),__vite__mapDeps([40,19,25,9,12,13,20]))),Q0=g.lazy(()=>ne(()=>import("./ProjectDetailPage-BMKog_vR.js"),__vite__mapDeps([41,42,19,14,12,8,38,13,43,39,20]))),Z0=g.lazy(()=>ne(()=>import("./EditProjectPage-C_vbQdR2.js"),__vite__mapDeps([44,19,42,20]))),K0=g.lazy(()=>ne(()=>import("./PipelineEditorPage-rM_yORd4.js"),__vite__mapDeps([45,19]))),J0=g.lazy(()=>ne(()=>import("./ProfilePage-DshUwwog.js"),__vite__mapDeps([46,47,38,13]))),$0=g.lazy(()=>ne(()=>import("./BindPlatformPage-D45esrNl.js"),[])),W0=g.lazy(()=>ne(()=>import("./AccessTokensPage-Ck9KudgP.js"),__vite__mapDeps([48,19,25,9,12,13,20,5,39]))),F0=g.lazy(()=>ne(()=>import("./CliReferencePage-C-Lw0uAV.js"),__vite__mapDeps([49,50,5,20]))),I0=g.lazy(()=>ne(()=>import("./ApiReferencePage-CTkJqTdJ.js"),__vite__mapDeps([51,50,5,20]))),P0=g.lazy(()=>ne(()=>import("./SkillPage-C3wTzd5o.js"),__vite__mapDeps([52,53,5,29]))),e1=g.lazy(()=>ne(()=>import("./DocsLayout-Br7yGyG5.js"),__vite__mapDeps([54,28]))),t1=g.lazy(()=>ne(()=>import("./InstallationPage-Ce0qD1m-.js"),__vite__mapDeps([55,53,5]))),a1=g.lazy(()=>ne(()=>import("./DeveloperSetupPage-BQhIuXLe.js"),__vite__mapDeps([56,53,5]))),n1=g.lazy(()=>ne(()=>import("./WorkerSetupPage-VBsAuhUc.js"),__vite__mapDeps([57,53,5]))),l1=g.lazy(()=>ne(()=>import("./BotSetupPage-DnwaG9Z7.js"),__vite__mapDeps([58,53,5]))),i1=g.lazy(()=>ne(()=>import("./LocalDevelopmentPage-tuixvO86.js"),__vite__mapDeps([59,53,5]))),r1=g.lazy(()=>ne(()=>import("./WorkerOperationsPage-BZN-hLvH.js"),[])),u1=g.lazy(()=>ne(()=>import("./DeploymentPage-Cm8hl7PF.js"),__vite__mapDeps([60,53,5]))),Oh=g.lazy(()=>ne(()=>import("./BotIntegrationPage-BhDYugrQ.js"),[])),o1=g.lazy(()=>ne(()=>import("./PipelineConfigPage-DaCDhd-P.js"),__vite__mapDeps([61,53,5]))),s1=g.lazy(()=>ne(()=>import("./DevWorkflowPage-DTjFXI4G.js"),__vite__mapDeps([62,53,5]))),c1=g.lazy(()=>ne(()=>import("./PermissionsPage-D4ZeOpEb.js"),[])),f1=g.lazy(()=>ne(()=>import("./EnvVariablesPage-gbqhCWCv.js"),__vite__mapDeps([63,53,5]))),d1=g.lazy(()=>ne(()=>import("./ArchitecturePage-8SxZccYN.js"),__vite__mapDeps([64,53,5]))),m1=g.lazy(()=>ne(()=>import("./ChangelogPage-ROnloca6.js"),[])),h1=g.lazy(()=>ne(()=>import("./AgentCliPage-Bex4ulEr.js"),__vite__mapDeps([65,53,5]))),p1=g.lazy(()=>ne(()=>import("./DocsIndexPage-CoUUKiVh.js"),__vite__mapDeps([66,35,2,3,36]))),_1=g.lazy(()=>ne(()=>import("./AdminPage-BKWbP0n2.js"),__vite__mapDeps([67,4,2,68,36]))),g1=g.lazy(()=>ne(()=>import("./DeveloperManage-4o7ML8ff.js"),__vite__mapDeps([69,19,47,25,9,13,8,20,4,43,21]))),y1=g.lazy(()=>ne(()=>import("./BotManage-CbUW-s4b.js"),__vite__mapDeps([70,19,53,5,39,20,25,9,13,8,2,43]))),v1=g.lazy(()=>ne(()=>import("./TokenManage-C5GQ1LB8.js"),__vite__mapDeps([71,34,5,29,25,9,13,8,20]))),b1=g.lazy(()=>ne(()=>import("./AuditLogPage-BLzj5y_X.js"),__vite__mapDeps([72,19,25,9,68,26,11]))),x1=g.lazy(()=>ne(()=>import("./SettingsPage-_cXRQuuA.js"),[]));function S1(){return h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})})}function k1(){const i=xa(u=>u.sessionExpired);return h.jsxs(E0,{children:[h.jsx(C0,{}),h.jsx(w0,{children:h.jsxs(qv,{children:[h.jsx(T0,{isOpen:i}),h.jsx(g.Suspense,{fallback:h.jsx(S1,{}),children:h.jsxs(dv,{children:[h.jsx(ee,{path:"/",element:h.jsx(D0,{})}),h.jsx(ee,{path:"/login",element:h.jsx(N0,{})}),h.jsx(ee,{path:"/totp-setup",element:h.jsx(li,{children:h.jsx(M0,{})})}),h.jsx(ee,{path:"/bind",element:h.jsx(li,{children:h.jsx($0,{})})}),h.jsxs(ee,{element:h.jsx(li,{children:h.jsx(k0,{})}),children:[h.jsx(ee,{path:"/home",element:h.jsx(L0,{})}),h.jsx(ee,{path:"/dashboard",element:h.jsx(q0,{})}),h.jsx(ee,{path:"/tasks",element:h.jsx(H0,{})}),h.jsx(ee,{path:"/tasks/:id",element:h.jsx(B0,{})}),h.jsx(ee,{path:"/workers",element:h.jsx(Y0,{})}),h.jsx(ee,{path:"/workers/setup",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(V0,{})})}),h.jsx(ee,{path:"/workers/:id",element:h.jsx(G0,{})}),h.jsx(ee,{path:"/projects",element:h.jsx(X0,{})}),h.jsx(ee,{path:"/projects/:key",element:h.jsx(Q0,{})}),h.jsx(ee,{path:"/projects/:key/edit",element:h.jsx(Z0,{})}),h.jsx(ee,{path:"/projects/:key/pipeline",element:h.jsx(K0,{})}),h.jsx(ee,{path:"/profile",element:h.jsx(J0,{})}),h.jsx(ee,{path:"/access-tokens",element:h.jsx(W0,{})}),h.jsxs(ee,{path:"/docs",element:h.jsx(e1,{}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"cli",replace:!0})}),h.jsx(ee,{path:"cli",element:h.jsx(F0,{})}),h.jsx(ee,{path:"api",element:h.jsx(I0,{})}),h.jsx(ee,{path:"bot",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"all",element:h.jsx(p1,{})}),h.jsx(ee,{path:"skill",element:h.jsx(P0,{})}),h.jsx(ee,{path:"installation",element:h.jsx(t1,{})}),h.jsx(ee,{path:"developer-setup",element:h.jsx(a1,{})}),h.jsx(ee,{path:"worker-setup",element:h.jsx(n1,{})}),h.jsx(ee,{path:"bot-setup",element:h.jsx(l1,{})}),h.jsx(ee,{path:"local-development",element:h.jsx(i1,{})}),h.jsx(ee,{path:"worker-operations",element:h.jsx(r1,{})}),h.jsx(ee,{path:"deployment",element:h.jsx(u1,{})}),h.jsx(ee,{path:"bot-integration",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"pipeline-config",element:h.jsx(o1,{})}),h.jsx(ee,{path:"dev-workflow",element:h.jsx(s1,{})}),h.jsx(ee,{path:"permissions",element:h.jsx(c1,{})}),h.jsx(ee,{path:"env-variables",element:h.jsx(f1,{})}),h.jsx(ee,{path:"architecture",element:h.jsx(d1,{})}),h.jsx(ee,{path:"agent-cli",element:h.jsx(h1,{})}),h.jsx(ee,{path:"changelog",element:h.jsx(m1,{})})]}),h.jsxs(ee,{path:"/admin",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(_1,{})}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"developers",replace:!0})}),h.jsx(ee,{path:"developers",element:h.jsx(g1,{})}),h.jsx(ee,{path:"bots",element:h.jsx(y1,{})}),h.jsx(ee,{path:"tokens",element:h.jsx(v1,{})}),h.jsx(ee,{path:"audit-logs",element:h.jsx(b1,{})}),h.jsx(ee,{path:"settings",element:h.jsx(x1,{})})]})]}),h.jsx(ee,{path:"*",element:h.jsx(U0,{})})]})})]})})]})}function E1(i){var u,s;return((u=i.matchMedia)==null?void 0:u.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}function w1(i){var s,o;const u=((s=i.navigator)==null?void 0:s.userAgent)??"";return/iPhone|iPad|iPod/i.test(u)||/Macintosh/i.test(u)&&(((o=i.navigator)==null?void 0:o.maxTouchPoints)??0)>1}function T1(i){const u=i.activeElement;if(!(u instanceof HTMLElement))return!1;const s=u.tagName;return u.isContentEditable||s==="INPUT"||s==="TEXTAREA"||s==="SELECT"}function j1(i){const u=i.screen;if(!u)return null;const s=Math.round(u.width),o=Math.round(u.height);return i.innerHeight>=i.innerWidth?Math.max(s,o):Math.min(s,o)}function R1(i=window,u=document){const s=u.documentElement,o=i.visualViewport??null,f=()=>{const m=Math.round((o==null?void 0:o.height)??0),_=Math.round(i.innerHeight);let b=m>0?m:_;if(E1(i)&&w1(i)&&!T1(u)){const y=j1(i);y!==null&&(b=Math.max(b,_,y))}s.style.setProperty("--app-height",`${b}px`)};return f(),i.addEventListener("resize",f),i.addEventListener("orientationchange",f),o==null||o.addEventListener("resize",f),o==null||o.addEventListener("scroll",f),()=>{i.removeEventListener("resize",f),i.removeEventListener("orientationchange",f),o==null||o.removeEventListener("resize",f),o==null||o.removeEventListener("scroll",f)}}xa.getState().initialize();R1(window,document);const A1=window.matchMedia("(display-mode: standalone)").matches||navigator.standalone===!0;if(A1){document.documentElement.classList.add("pwa-standalone");const i=window.matchMedia("(prefers-color-scheme: dark)").matches,u=localStorage.getItem("overlord-theme"),s=u==="dark"||u!=="light"&&i;document.body.style.backgroundColor=s?"#171717":"#FFFFFF",new MutationObserver(()=>{const o=document.documentElement.classList.contains("dark");document.body.style.backgroundColor=o?"#171717":"#FFFFFF"}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}cy.createRoot(document.getElementById("root")).render(h.jsx(g.StrictMode,{children:h.jsx(k1,{})}));export{Js as $,O1 as A,C1 as B,Fv as C,ip as D,eb as E,U1 as F,L1 as G,Ns as H,np as I,M1 as J,ep as K,Jh as L,cb as M,ll as N,uy as O,s0 as P,Wh as Q,Rr as R,ap as S,cp as T,rb as U,sb as V,N1 as W,lp as X,q1 as Y,ab as Z,hb as _,Vt as a,cv as a0,H1 as a1,B1 as a2,tb as a3,$s as b,xe as c,mb as d,ub as e,Fa as f,gt as g,Xr as h,xb as i,h as j,up as k,kp as l,Ep as m,t0 as n,Fr as o,D1 as p,X1 as q,g as r,G1 as s,Wa as t,xa as u,r0 as v,V1 as w,tp as x,Ph as y,Y1 as z};
242
+ "{description}"`}};function jb(i,u){const s=u.split(".");let o=i;for(const f of s){if(o==null||typeof o!="object")return u;o=o[f]}return typeof o=="string"?o:u}function Rb(i,u){return u?i.replace(/\{(\w+)\}/g,(s,o)=>u[o]!=null?String(u[o]):`{${o}}`):i}function Br(i,u){return Rb(jb(Tb,i),u)}function Vt(){return{t:g.useCallback((u,s)=>Br(u,s),[])}}function cp(){const{theme:i,setTheme:u}=sp(),{t:s}=Vt(),o=i==="dark"||i==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;function f(){u(o?"light":"dark")}return h.jsx("button",{onClick:f,className:"flex items-center gap-1.5 rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]","aria-label":s(o?"common.switch_to_light":"common.switch_to_dark"),title:s(o?"common.light_mode":"common.dark_mode"),children:o?h.jsx(_b,{size:16}):h.jsx(fb,{size:16})})}class Ns extends Error{constructor(s,o,f){const m=s.status||s.status===0?s.status:"",_=s.statusText??"",b=`${m} ${_}`.trim(),y=b?`status code ${b}`:"an unknown error";super(`Request failed with ${y}: ${o.method} ${o.url}`);Ve(this,"response");Ve(this,"request");Ve(this,"options");this.name="HTTPError",this.response=s,this.request=o,this.options=f}}class fp extends Error{constructor(s){let o="Non-error value was thrown";try{typeof s=="string"?o=s:s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&(o=s.message)}catch{}super(o);Ve(this,"name","NonError");Ve(this,"value");this.value=s}}class Rs extends Error{constructor(s){const o=s!=null&&s.cause?s.cause instanceof Error?s.cause:new fp(s.cause):void 0;super(s!=null&&s.code?`Forced retry: ${s.code}`:"Forced retry",o?{cause:o}:void 0);Ve(this,"name","ForceRetryError");Ve(this,"customDelay");Ve(this,"code");Ve(this,"customRequest");this.customDelay=s==null?void 0:s.delay,this.code=s==null?void 0:s.code,this.customRequest=s==null?void 0:s.request}}const Sh=(()=>{let i=!1,u=!1;const s=typeof globalThis.ReadableStream=="function",o=typeof globalThis.Request=="function";if(s&&o)try{u=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type")}catch(f){if(f instanceof Error&&f.message==="unsupported BodyInit type")return!1;throw f}return i&&!u})(),Ab=typeof globalThis.AbortController=="function",dp=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",zb=typeof globalThis.ReadableStream=="function",Ob=typeof globalThis.FormData=="function",mp=["get","post","put","patch","head","delete"],Cb={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},As=2147483647,Db=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,hp=Symbol("stop");class pp{constructor(u){Ve(this,"options");this.options=u}}const Nb=i=>new pp(i),Mb={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Ub={next:!0},qb={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Lb=i=>{if(!i)return 0;if(i instanceof FormData){let u=0;for(const[s,o]of i)u+=Db,u+=new TextEncoder().encode(`Content-Disposition: form-data; name="${s}"`).length,u+=typeof o=="string"?new TextEncoder().encode(o).length:o.size;return u}if(i instanceof Blob)return i.size;if(i instanceof ArrayBuffer)return i.byteLength;if(typeof i=="string")return new TextEncoder().encode(i).length;if(i instanceof URLSearchParams)return new TextEncoder().encode(i.toString()).length;if("byteLength"in i)return i.byteLength;if(typeof i=="object"&&i!==null)try{const u=JSON.stringify(i);return new TextEncoder().encode(u).length}catch{return 0}return 0},_p=(i,u,s)=>{let o,f=0;return i.pipeThrough(new TransformStream({transform(m,_){if(_.enqueue(m),o){f+=o.byteLength;let b=u===0?0:f/u;b>=1&&(b=1-Number.EPSILON),s==null||s({percent:b,totalBytes:Math.max(u,f),transferredBytes:f},o)}o=m},flush(){o&&(f+=o.byteLength,s==null||s({percent:1,totalBytes:Math.max(u,f),transferredBytes:f},o))}}))},Hb=(i,u)=>{if(!i.body)return i;if(i.status===204)return new Response(null,{status:i.status,statusText:i.statusText,headers:i.headers});const s=Math.max(0,Number(i.headers.get("content-length"))||0);return new Response(_p(i.body,s,u),{status:i.status,statusText:i.statusText,headers:i.headers})},Bb=(i,u,s)=>{if(!i.body)return i;const o=Lb(s??i.body);return new Request(i,{duplex:"half",body:_p(i.body,o,u)})},yn=i=>i!==null&&typeof i=="object",Dr=(...i)=>{for(const u of i)if((!yn(u)||Array.isArray(u))&&u!==void 0)throw new TypeError("The `options` argument must be an object");return Ws({},...i)},gp=(i={},u={})=>{const s=new globalThis.Headers(i),o=u instanceof globalThis.Headers,f=new globalThis.Headers(u);for(const[m,_]of f.entries())o&&_==="undefined"||_===void 0?s.delete(m):s.set(m,_);return s};function Nr(i,u,s){return Object.hasOwn(u,s)&&u[s]===void 0?[]:Ws(i[s]??[],u[s]??[])}const yp=(i={},u={})=>({beforeRequest:Nr(i,u,"beforeRequest"),beforeRetry:Nr(i,u,"beforeRetry"),afterResponse:Nr(i,u,"afterResponse"),beforeError:Nr(i,u,"beforeError")}),Yb=(i,u)=>{const s=new URLSearchParams;for(const o of[i,u])if(o!==void 0)if(o instanceof URLSearchParams)for(const[f,m]of o.entries())s.append(f,m);else if(Array.isArray(o))for(const f of o){if(!Array.isArray(f)||f.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");s.append(String(f[0]),String(f[1]))}else if(yn(o))for(const[f,m]of Object.entries(o))m!==void 0&&s.append(f,String(m));else{const f=new URLSearchParams(o);for(const[m,_]of f.entries())s.append(m,_)}return s},Ws=(...i)=>{let u={},s={},o={},f;const m=[];for(const _ of i)if(Array.isArray(_))Array.isArray(u)||(u=[]),u=[...u,..._];else if(yn(_)){for(let[b,y]of Object.entries(_)){if(b==="signal"&&y instanceof globalThis.AbortSignal){m.push(y);continue}if(b==="context"){if(y!=null&&(!yn(y)||Array.isArray(y)))throw new TypeError("The `context` option must be an object");u={...u,context:y==null?{}:{...u.context,...y}};continue}if(b==="searchParams"){y==null?f=void 0:f=f===void 0?y:Yb(f,y);continue}yn(y)&&b in u&&(y=Ws(u[b],y)),u={...u,[b]:y}}yn(_.hooks)&&(o=yp(o,_.hooks),u.hooks=o),yn(_.headers)&&(s=gp(s,_.headers),u.headers=s)}return f!==void 0&&(u.searchParams=f),m.length>0&&(m.length===1?u.signal=m[0]:dp?u.signal=AbortSignal.any(m):u.signal=m.at(-1)),u},Gb=i=>mp.includes(i)?i.toUpperCase():i,Vb=["get","put","head","delete","options","trace"],Xb=[408,413,429,500,502,503,504],Qb=[413,429,503],kh={limit:2,methods:Vb,statusCodes:Xb,afterStatusCodes:Qb,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:i=>.3*2**(i-1)*1e3,jitter:void 0,retryOnTimeout:!1},Zb=(i={})=>{if(typeof i=="number")return{...kh,limit:i};if(i.methods&&!Array.isArray(i.methods))throw new Error("retry.methods must be an array");if(i.methods&&(i.methods=i.methods.map(s=>s.toLowerCase())),i.statusCodes&&!Array.isArray(i.statusCodes))throw new Error("retry.statusCodes must be an array");const u=Object.fromEntries(Object.entries(i).filter(([,s])=>s!==void 0));return{...kh,...u}};class Ms extends Error{constructor(s){super(`Request timed out: ${s.method} ${s.url}`);Ve(this,"request");this.name="TimeoutError",this.request=s}}async function Kb(i,u,s,o){return new Promise((f,m)=>{const _=setTimeout(()=>{s&&s.abort(),m(new Ms(i))},o.timeout);o.fetch(i,u).then(f).catch(m).then(()=>{clearTimeout(_)})})}async function Jb(i,{signal:u}){return new Promise((s,o)=>{u&&(u.throwIfAborted(),u.addEventListener("abort",f,{once:!0}));function f(){clearTimeout(m),o(u.reason)}const m=setTimeout(()=>{u==null||u.removeEventListener("abort",f),s()},i)})}const $b=(i,u)=>{const s={};for(const o in u)Object.hasOwn(u,o)&&!(o in qb)&&!(o in Mb)&&(!(o in i)||o in Ub)&&(s[o]=u[o]);return s},Wb=i=>i===void 0?!1:Array.isArray(i)?i.length>0:i instanceof URLSearchParams?i.size>0:typeof i=="object"?Object.keys(i).length>0:typeof i=="string"?i.trim().length>0:!!i;function Fb(i){return i instanceof Ns||(i==null?void 0:i.name)===Ns.name}function Ib(i){return i instanceof Ms||(i==null?void 0:i.name)===Ms.name}var Kr,vp,Jt,Bt,rt,Q,$a,ea,vn,oe,Yr,bp,Us,Gr,Ja,qs,xp,ii,Vr,Ls;const ri=class ri{constructor(u,s={}){Pt(this,oe);Ve(this,"request");Pt(this,Jt);Pt(this,Bt,0);Pt(this,rt);Pt(this,Q);Pt(this,$a);Pt(this,ea);Pt(this,vn);var f,m,_;if(Kt(this,rt,u),Kt(this,Q,{...s,headers:gp(q(this,rt).headers,s.headers),hooks:yp({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},s.hooks),method:Gb(s.method??q(this,rt).method??"GET"),prefixUrl:String(s.prefixUrl||""),retry:Zb(s.retry),throwHttpErrors:s.throwHttpErrors??!0,timeout:s.timeout??1e4,fetch:s.fetch??globalThis.fetch.bind(globalThis),context:s.context??{}}),typeof q(this,rt)!="string"&&!(q(this,rt)instanceof URL||q(this,rt)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(q(this,Q).prefixUrl&&typeof q(this,rt)=="string"){if(q(this,rt).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");q(this,Q).prefixUrl.endsWith("/")||(q(this,Q).prefixUrl+="/"),Kt(this,rt,q(this,Q).prefixUrl+q(this,rt))}Ab&&dp&&(Kt(this,ea,q(this,Q).signal??q(this,rt).signal),Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal),Sh&&(q(this,Q).duplex="half"),q(this,Q).json!==void 0&&(q(this,Q).body=((m=(f=q(this,Q)).stringifyJson)==null?void 0:m.call(f,q(this,Q).json))??JSON.stringify(q(this,Q).json),q(this,Q).headers.set("content-type",q(this,Q).headers.get("content-type")??"application/json"));const o=s.headers&&new globalThis.Headers(s.headers).has("content-type");if(q(this,rt)instanceof globalThis.Request&&(Ob&&q(this,Q).body instanceof globalThis.FormData||q(this,Q).body instanceof URLSearchParams)&&!o&&q(this,Q).headers.delete("content-type"),this.request=new globalThis.Request(q(this,rt),q(this,Q)),Wb(q(this,Q).searchParams)){const y="?"+(typeof q(this,Q).searchParams=="string"?q(this,Q).searchParams.replace(/^\?/,""):new URLSearchParams(ke(_=ri,Kr,vp).call(_,q(this,Q).searchParams)).toString()),p=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,y);this.request=new globalThis.Request(p,q(this,Q))}if(q(this,Q).onUploadProgress){if(typeof q(this,Q).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Sh)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=ke(this,oe,Ls).call(this,this.request,q(this,Q).body??void 0)}}static create(u,s){var _,b,y;const o=new ri(u,s),f=async()=>{var w,k,N,Y,L,H,B,U,K,X,ue,ce;if(typeof q(o,Q).timeout=="number"&&q(o,Q).timeout>As)throw new RangeError(`The \`timeout\` option cannot be greater than ${As}`);await Promise.resolve();let p=await ke(w=o,oe,xp).call(w);for(const _e of q(o,Q).hooks.afterResponse){const F=ke(k=o,oe,Us).call(k,p.clone());let W;try{W=await _e(o.request,ke(N=o,oe,ii).call(N),F,{retryCount:q(o,Bt)})}catch(Pe){throw ke(Y=o,oe,Ja).call(Y,F),ke(L=o,oe,Ja).call(L,p),Pe}if(W instanceof pp)throw ke(H=o,oe,Ja).call(H,F),ke(B=o,oe,Ja).call(B,p),new Rs(W.options);const se=W instanceof globalThis.Response?W:p;F!==se&&ke(U=o,oe,Ja).call(U,F),p!==se&&ke(K=o,oe,Ja).call(K,p),p=se}if(ke(X=o,oe,Us).call(X,p),!p.ok&&(typeof q(o,Q).throwHttpErrors=="function"?q(o,Q).throwHttpErrors(p.status):q(o,Q).throwHttpErrors)){let _e=new Ns(p,o.request,ke(ue=o,oe,ii).call(ue));for(const F of q(o,Q).hooks.beforeError)_e=await F(_e,{retryCount:q(o,Bt)});throw _e}if(q(o,Q).onDownloadProgress){if(typeof q(o,Q).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!zb)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const _e=p.clone();return ke(ce=o,oe,Ja).call(ce,p),Hb(_e,q(o,Q).onDownloadProgress)}return p},m=ke(_=o,oe,qs).call(_,f).finally(()=>{var w,k;const p=q(o,$a);ke(w=o,oe,Gr).call(w,(p==null?void 0:p.body)??void 0),ke(k=o,oe,Gr).call(k,o.request.body??void 0)});for(const[p,w]of Object.entries(Cb))p==="bytes"&&typeof((y=(b=globalThis.Response)==null?void 0:b.prototype)==null?void 0:y.bytes)!="function"||(m[p]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||w);const k=await m;if(p==="json"){if(k.status===204)return"";const N=await k.text();return N===""?"":s.parseJson?s.parseJson(N):JSON.parse(N)}return k[p]()});return m}};Kr=new WeakSet,vp=function(u){return u&&typeof u=="object"&&!Array.isArray(u)&&!(u instanceof URLSearchParams)?Object.fromEntries(Object.entries(u).filter(([,s])=>s!==void 0)):u},Jt=new WeakMap,Bt=new WeakMap,rt=new WeakMap,Q=new WeakMap,$a=new WeakMap,ea=new WeakMap,vn=new WeakMap,oe=new WeakSet,Yr=function(){const u=q(this,Q).retry.delay(q(this,Bt));let s=u;q(this,Q).retry.jitter===!0?s=Math.random()*u:typeof q(this,Q).retry.jitter=="function"&&(s=q(this,Q).retry.jitter(u),(!Number.isFinite(s)||s<0)&&(s=u));const o=q(this,Q).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(o,s)},bp=async function(u){if(eh(this,Bt)._++,q(this,Bt)>q(this,Q).retry.limit)throw u;const s=u instanceof Error?u:new fp(u);if(s instanceof Rs)return s.customDelay??ke(this,oe,Yr).call(this);if(!q(this,Q).retry.methods.includes(this.request.method.toLowerCase()))throw u;if(q(this,Q).retry.shouldRetry!==void 0){const o=await q(this,Q).retry.shouldRetry({error:s,retryCount:q(this,Bt)});if(o===!1)throw u;if(o===!0)return ke(this,oe,Yr).call(this)}if(Ib(u)&&!q(this,Q).retry.retryOnTimeout)throw u;if(Fb(u)){if(!q(this,Q).retry.statusCodes.includes(u.response.status))throw u;const o=u.response.headers.get("Retry-After")??u.response.headers.get("RateLimit-Reset")??u.response.headers.get("X-RateLimit-Retry-After")??u.response.headers.get("X-RateLimit-Reset")??u.response.headers.get("X-Rate-Limit-Reset");if(o&&q(this,Q).retry.afterStatusCodes.includes(u.response.status)){let f=Number(o)*1e3;Number.isNaN(f)?f=Date.parse(o)-Date.now():f>=Date.parse("2024-01-01")&&(f-=Date.now());const m=q(this,Q).retry.maxRetryAfter??f;return f<m?f:m}if(u.response.status===413)throw u}return ke(this,oe,Yr).call(this)},Us=function(u){return q(this,Q).parseJson&&(u.json=async()=>q(this,Q).parseJson(await u.text())),u},Gr=function(u){u&&u.cancel().catch(()=>{})},Ja=function(u){ke(this,oe,Gr).call(this,u.body??void 0)},qs=async function(u){try{return await u()}catch(s){const o=Math.min(await ke(this,oe,bp).call(this,s),As);if(q(this,Bt)<1)throw s;if(await Jb(o,q(this,ea)?{signal:q(this,ea)}:{}),s instanceof Rs&&s.customRequest){const f=q(this,Q).signal?new globalThis.Request(s.customRequest,{signal:q(this,Q).signal}):new globalThis.Request(s.customRequest);ke(this,oe,Vr).call(this,f)}for(const f of q(this,Q).hooks.beforeRetry){const m=await f({request:this.request,options:ke(this,oe,ii).call(this),error:s,retryCount:q(this,Bt)});if(m instanceof globalThis.Request){ke(this,oe,Vr).call(this,m);break}if(m instanceof globalThis.Response)return m;if(m===hp)return}return ke(this,oe,qs).call(this,u)}},xp=async function(){var s;(s=q(this,Jt))!=null&&s.signal.aborted&&(Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal,this.request=new globalThis.Request(this.request,{signal:q(this,Q).signal}));for(const o of q(this,Q).hooks.beforeRequest){const f=await o(this.request,ke(this,oe,ii).call(this),{retryCount:q(this,Bt)});if(f instanceof Response)return f;if(f instanceof globalThis.Request){ke(this,oe,Vr).call(this,f);break}}const u=$b(this.request,q(this,Q));return Kt(this,$a,this.request),this.request=q(this,$a).clone(),q(this,Q).timeout===!1?q(this,Q).fetch(q(this,$a),u):Kb(q(this,$a),u,q(this,Jt),q(this,Q))},ii=function(){if(!q(this,vn)){const{hooks:u,...s}=q(this,Q);Kt(this,vn,Object.freeze(s))}return q(this,vn)},Vr=function(u){Kt(this,vn,void 0),this.request=ke(this,oe,Ls).call(this,u)},Ls=function(u,s){return!q(this,Q).onUploadProgress||!u.body?u:Bb(u,q(this,Q).onUploadProgress,s??q(this,Q).body??void 0)},Pt(ri,Kr);let Zr=ri;/*! MIT License © Sindre Sorhus */const Hs=i=>{const u=(s,o)=>Zr.create(s,Dr(i,o));for(const s of mp)u[s]=(o,f)=>Zr.create(o,Dr(i,f,{method:s}));return u.create=s=>Hs(Dr(s)),u.extend=s=>(typeof s=="function"&&(s=s(i??{})),Hs(Dr(i,s))),u.stop=hp,u.retry=Nb,u},Eh=Hs();let Mr=null;const Xr=Eh.create({prefixUrl:"/api",timeout:3e4,hooks:{beforeRequest:[i=>{const u=xa.getState().accessToken;u&&i.headers.set("Authorization",`Bearer ${u}`)}],afterResponse:[async(i,u,s)=>{if(s.status===401&&!i.headers.has("X-Retry-After-Refresh")){Mr||(Mr=xa.getState().refresh().finally(()=>{Mr=null}));try{await Mr}catch{throw s}const o=xa.getState().accessToken;return o&&i.headers.set("Authorization",`Bearer ${o}`),i.headers.set("X-Retry-After-Refresh","1"),Eh(i,u)}}]}}),Pb=3e4;function e0(i){if(i.link)return i.link;const u=(i.title+" "+i.body).match(/task\s*#?(\d+)/i);if(u)return`/tasks/${u[1]}`;const s=(i.title+" "+i.body).match(/worker\s+(\S+)/i);return s?`/workers/${s[1]}`:null}function Sp(){const i=Fa(),[u,s]=g.useState([]),[o,f]=g.useState(0),[m,_]=g.useState(!1),[b,y]=g.useState(!1),p=g.useRef(null),{t:w}=Vt(),k=g.useRef(async()=>{try{y(!0);const H=(await Xr.get("web/notifications",{searchParams:{limit:"20"}}).json()).data,B=H.filter(U=>!U.isRead).length;s(U=>U.length===H.length&&U.every((K,X)=>K.id===H[X].id&&K.isRead===H[X].isRead)?U:H),f(U=>U===B?U:B)}catch{}finally{y(!1)}});g.useEffect(()=>{k.current();const L=setInterval(()=>k.current(),Pb);return()=>clearInterval(L)},[]),g.useEffect(()=>{function L(H){p.current&&!p.current.contains(H.target)&&_(!1)}return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[]);async function N(L){try{await Xr.post(`web/notifications/${L}/read`),s(H=>H.map(B=>B.id===L?{...B,isRead:!0}:B)),f(H=>Math.max(0,H-1))}catch{}}async function Y(){try{await Xr.post("web/notifications/read-all"),s(L=>L.map(H=>({...H,isRead:!0}))),f(0)}catch{}}return h.jsxs("div",{className:"relative",ref:p,children:[h.jsxs("button",{type:"button",onClick:()=>_(L=>!L),"aria-label":w("common.notifications"),className:"relative inline-flex items-center justify-center rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]",children:[h.jsx($v,{size:16}),o>0&&h.jsx("span",{className:"absolute right-0 top-0 flex h-3 min-w-3 items-center justify-center rounded-full bg-[var(--destructive)] px-0.5 text-[8px] font-semibold leading-none text-white",children:o})]}),m&&h.jsxs("div",{className:"absolute right-0 top-full z-50 mt-2 w-[min(320px,calc(100vw-2rem))] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm font-semibold",children:w("common.notifications")}),o>0&&h.jsxs("button",{type:"button",onClick:Y,"aria-label":w("common.mark_all_read"),className:"inline-flex items-center gap-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(Wv,{className:"h-3.5 w-3.5"}),w("common.mark_all_read")]})]}),h.jsx("div",{className:"max-h-80 overflow-y-auto",children:b&&u.length===0?h.jsx("div",{className:"flex justify-center py-8",children:h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):u.length===0?h.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[h.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),h.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:w("common.no_notifications")})]}):u.map(L=>{const H=e0(L);return h.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 transition-colors ${H?"cursor-pointer hover:bg-[var(--bg-input)]":""} ${L.isRead?"opacity-60":"bg-[var(--accent)]/5"}`,onClick:()=>{H&&(L.isRead||N(L.id),_(!1),i(H))},children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm font-medium",title:L.title,children:L.title}),h.jsx("p",{className:"truncate text-xs text-[var(--text-secondary)]",title:L.body,children:L.body}),h.jsx("p",{className:"mt-1 text-xs text-[var(--text-secondary)] opacity-60",children:new Date(L.createdAt).toLocaleString()})]}),!L.isRead&&h.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),N(L.id)},"aria-label":w("common.mark_as_read"),className:"shrink-0 rounded-[4px] p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:h.jsx(Fv,{className:"h-3.5 w-3.5"})})]},L.id)})})]})]})}function kp(i,u=50){return i.name??Wh(i.description,u)}function t0(i){return i.description}function Ep(i){return`#${i.id} ${t0(i)}`}function G1(i,u=100){return{text:`#${i.id} ${kp(i,u)}`,title:Ep(i)}}function a0(i){return{tasks:i.tasks.map(u=>({type:"task",id:u.id,title:`#${u.id} ${kp(u)}`,subtitle:`${u.status} · ${u.project_key}`,hoverTitle:Ep(u)})),workers:(i.workers??[]).map(u=>({type:"worker",id:u.id,title:u.name,subtitle:`${u.hostname} · ${u.status}`})),projects:i.projects.map(u=>({type:"project",id:u.key,title:u.name,subtitle:u.repository}))}}const n0=300,wh={tasks:pb,workers:ap,projects:nb},l0={tasks:"tasks",workers:"workers",projects:"projects"};function wp({renderTrigger:i}={}){const[u,s]=g.useState(""),[o,f]=g.useState({tasks:[],workers:[],projects:[]}),[m,_]=g.useState(!1),[b,y]=g.useState(!1),[p,w]=g.useState(0),k=g.useRef(null),N=g.useRef(null),Y=g.useRef(void 0),L=g.useRef(void 0),H=Fa(),{t:B}=Vt(),U=g.useMemo(()=>[...o.tasks,...o.workers,...o.projects],[o]),K=g.useCallback(async W=>{var Pe;if(!W.trim()){f({tasks:[],workers:[],projects:[]});return}(Pe=L.current)==null||Pe.abort();const se=new AbortController;L.current=se;try{_(!0);const Je=await Xr.get("web/search",{searchParams:{q:W},signal:se.signal}).json();f(a0(Je)),w(0)}catch(Je){if(Je instanceof DOMException&&Je.name==="AbortError")return}finally{se.signal.aborted||_(!1)}},[]);g.useEffect(()=>(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>K(u),n0),()=>{Y.current&&clearTimeout(Y.current)}),[u,K]),g.useEffect(()=>{function W(se){se.key==="/"&&!b&&!(se.target instanceof HTMLInputElement||se.target instanceof HTMLTextAreaElement)&&(se.preventDefault(),y(!0)),se.key==="Escape"&&b&&(se.preventDefault(),X())}return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[b]),g.useEffect(()=>{b&&setTimeout(()=>{var W;return(W=N.current)==null?void 0:W.focus()},50)},[b]);function X(){y(!1),s(""),f({tasks:[],workers:[],projects:[]}),w(0)}function ue(W){switch(X(),W.type){case"task":H(`/tasks/${W.id}`);break;case"worker":H(`/workers/${W.id}`);break;case"project":H(`/projects/${W.id}`);break}}function ce(W){W.key==="ArrowDown"?(W.preventDefault(),w(se=>Math.min(se+1,U.length-1))):W.key==="ArrowUp"?(W.preventDefault(),w(se=>Math.max(se-1,0))):W.key==="Enter"&&U[p]&&(W.preventDefault(),ue(U[p]))}const _e=U.length>0;let F=0;return h.jsxs(h.Fragment,{children:[i?i(()=>y(!0)):h.jsxs("button",{type:"button",onClick:()=>y(!0),className:"flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-1.5 text-xs text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:[h.jsx(tp,{className:"h-3.5 w-3.5"}),h.jsx("span",{children:B("common.search_placeholder")}),h.jsx("kbd",{className:"ml-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-1.5 py-0.5 text-[11px] text-[var(--text-muted)]",children:"/"})]}),b&&h.jsx("div",{ref:k,className:"fixed inset-0 z-[100] flex items-start justify-center pt-[calc(var(--safe-area-top,0px)+16px)] md:pt-[15vh]",style:{backgroundColor:"rgba(0, 0, 0, 0.6)"},onClick:W=>{W.target===k.current&&X()},children:h.jsxs("div",{className:"mx-3 w-full max-w-[640px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-2xl sm:mx-4 md:mx-0",children:[h.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm text-[var(--accent)]",children:"/"}),h.jsx("input",{ref:N,type:"text",placeholder:B("common.search_input_placeholder"),value:u,onChange:W=>s(W.target.value),onKeyDown:ce,className:"flex-1 bg-transparent text-sm text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none"}),m&&h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})]}),h.jsx("div",{className:"max-h-[50vh] overflow-y-auto sm:max-h-[60vh] md:max-h-[400px]",children:u.trim()&&!_e&&!m?h.jsx("div",{className:"py-10 text-center text-xs text-[var(--text-muted)]",children:B("common.no_search_results",{query:u})}):Object.keys(wh).map(W=>{const se=o[W];if(se.length===0)return null;const Pe=wh[W],Je=F;return F+=se.length,h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-[var(--text-muted)]",children:[h.jsx(Pe,{className:"h-3 w-3"}),h.jsx("span",{className:"text-[11px] lowercase tracking-wider",children:l0[W]})]}),se.map((Ce,At)=>{const ut=Je+At,Me=ut===p;return h.jsxs("button",{type:"button",className:`flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors ${Me?"bg-[var(--accent)]/10 text-[var(--accent)]":"hover:bg-[var(--bg-input)]"}`,onClick:()=>ue(Ce),onMouseEnter:()=>w(ut),children:[h.jsx("span",{className:`text-xs ${Me?"text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:Me?">":" "}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm",title:Ce.hoverTitle??Ce.title,children:Ce.title}),Ce.subtitle&&h.jsx("p",{className:"truncate text-xs text-[var(--text-muted)]",title:Ce.subtitle,children:Ce.subtitle})]})]},`${Ce.type}-${Ce.id}`)})]},W)})}),h.jsxs("div",{className:"hidden items-center gap-4 border-t border-[var(--border)] px-4 py-2 md:flex",children:[h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↑↓"})," ",B("common.navigate_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↵"})," ",B("common.select_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"esc"})," ",B("common.close_hint")]})]})]})})]})}const i0={danger:"var(--destructive)",warning:"var(--warning)",accent:"var(--accent)"};function Th(i){return Array.from(i.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function r0({isOpen:i,onClose:u,onConfirm:s,title:o,message:f,confirmLabel:m,cancelLabel:_,confirmVariant:b="danger",isLoading:y,children:p}){const{t:w}=Vt(),k=g.useId(),N=m??w("common.confirm"),Y=_??w("common.cancel"),L=g.useRef(null),H=g.useRef(null),B=i0[b];g.useEffect(()=>{if(!i)return;H.current=document.activeElement;const K=requestAnimationFrame(()=>{if(L.current){const X=Th(L.current);X.length>0&&X[0].focus()}});return()=>{var X;cancelAnimationFrame(K),(X=H.current)==null||X.focus()}},[i]);const U=g.useCallback(K=>{if(K.key==="Escape"){u();return}if(K.key==="Tab"&&L.current){const X=Th(L.current);if(X.length===0)return;const ue=X[0],ce=X[X.length-1];K.shiftKey?document.activeElement===ue&&(K.preventDefault(),ce.focus()):document.activeElement===ce&&(K.preventDefault(),ue.focus())}},[u]);return i?h.jsx("div",{onClick:u,style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"max(1rem, 10vh)",paddingLeft:"1rem",paddingRight:"1rem",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:h.jsxs("div",{ref:L,role:"dialog","aria-modal":"true","aria-labelledby":k,onClick:K=>K.stopPropagation(),onKeyDown:U,style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem"},children:[h.jsx("div",{style:{marginBottom:"1.25rem"},children:h.jsxs("div",{id:k,style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:[h.jsx(np,{style:{width:"1rem",height:"1rem"}}),o]})}),h.jsxs("div",{style:{marginBottom:"1.25rem"},children:[h.jsx("p",{style:{color:"var(--text-muted)",fontSize:"0.75rem",lineHeight:"1.5"},children:f}),p]}),h.jsxs("div",{style:{display:"flex",gap:"0.75rem"},children:[h.jsx("button",{type:"button",onClick:u,disabled:y,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",cursor:y?"not-allowed":"pointer",opacity:y?.7:1,transition:"color 0.15s, border-color 0.15s"},children:Y}),h.jsx("button",{type:"button",onClick:s,disabled:y,style:{flex:1,padding:"0.5rem",backgroundColor:B,color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,cursor:y?"not-allowed":"pointer",opacity:y?.7:1},children:y?w("common.processing"):N})]})]})}):null}const jh="overlord-pwa-install-dismissed";function u0(){const i=navigator.userAgent;return/iP(hone|od|ad)/.test(i)&&/WebKit/.test(i)&&!/(CriOS|FxiOS|OPiOS|mercury)/.test(i)}function o0(){return navigator.standalone===!0||window.matchMedia("(display-mode: standalone)").matches}function s0(){const{t:i}=Vt(),[u,s]=g.useState("hidden"),[o,f]=g.useState(!1),m=g.useRef(null),_=g.useRef(void 0);g.useEffect(()=>{if(o0()||localStorage.getItem(jh)||window.innerWidth>=768)return;const p=k=>{k.preventDefault(),m.current=k};window.addEventListener("beforeinstallprompt",p);const w=setTimeout(()=>s("visible"),1e3);return()=>{window.removeEventListener("beforeinstallprompt",p),clearTimeout(w),clearTimeout(_.current)}},[]);function b(){localStorage.setItem(jh,"1"),s("dismissing"),_.current=setTimeout(()=>s("hidden"),200)}async function y(){if(m.current){await m.current.prompt();const{outcome:p}=await m.current.userChoice;p==="accepted"&&b(),m.current=null}else u0()&&f(!0)}return u==="hidden"?null:h.jsx("div",{className:`fixed bottom-4 left-4 right-4 z-40 md:hidden ${u==="dismissing"?"animate-slide-down":"animate-slide-up"}`,role:"dialog","aria-label":i("pwa_install.title"),children:h.jsxs("div",{className:"overflow-hidden rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--accent)]/20 bg-[var(--accent)]/[0.06] px-3 py-1.5",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}),h.jsx("span",{className:"text-[9px] font-medium text-[var(--accent)]",children:i("pwa_install.title")})]}),h.jsx("button",{onClick:b,className:"p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:h.jsx(lp,{size:14})})]}),h.jsx("div",{className:"px-3.5 py-3",children:o?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.ios_command")]}),h.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:[i("pwa_install.ios_step_1"),i("pwa_install.ios_step_2"),i("pwa_install.ios_step_3")].map((p,w)=>h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] bg-[var(--accent)]/[0.08]",children:h.jsx("span",{className:"text-xs font-semibold text-[var(--accent)]",children:w+1})}),h.jsxs("span",{className:"text-[10px] leading-snug text-[var(--text-secondary)]",children:[w===0&&h.jsx(db,{size:12,className:"mr-1 inline-block align-text-bottom text-[var(--text-muted)]"}),p]})]},w))})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.command")]}),h.jsxs("div",{className:"mt-1.5 text-[10px] leading-relaxed text-[var(--text-secondary)]",children:["→ ",i("pwa_install.desc_1"),h.jsx("br",{}),"→ ",i("pwa_install.desc_2")]}),h.jsxs("div",{className:"mt-2.5 flex gap-2",children:[h.jsx("button",{onClick:y,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_install.install")}),h.jsx("button",{onClick:b,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[10px] text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:i("pwa_install.skip")})]})]})})]})})}function c0(){const{t:i}=Vt(),[u,s]=g.useState(!1);return g.useEffect(()=>{if(!("serviceWorker"in navigator))return;let o=!1,f=null,m=null,_=null,b=null;function y(){o||s(!0)}navigator.serviceWorker.addEventListener("controllerchange",y);function p(k){if(f=k,k.waiting){s(!0);return}_=()=>{const N=k.installing;N&&(m=N,b=()=>{N.state==="installed"&&navigator.serviceWorker.controller&&(o||s(!0))},N.addEventListener("statechange",b))},k.addEventListener("updatefound",_)}navigator.serviceWorker.getRegistration().then(k=>{k&&!o&&p(k)});const w=setInterval(()=>{navigator.serviceWorker.getRegistration().then(k=>{!k||o||(k.update().catch(()=>{}),k.waiting&&s(!0))})},3e4);return()=>{o=!0,clearInterval(w),navigator.serviceWorker.removeEventListener("controllerchange",y),f&&_&&f.removeEventListener("updatefound",_),m&&b&&m.removeEventListener("statechange",b)}},[]),u?h.jsx("div",{className:"animate-slide-up fixed bottom-20 left-4 right-4 z-50 md:bottom-4 md:left-auto md:right-4 md:w-80",children:h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] px-3.5 py-3 shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsx(ep,{size:14,className:"shrink-0 text-[var(--accent)]"}),h.jsx("span",{className:"flex-1 text-[10px] text-[var(--text-secondary)]",children:i("pwa_update.message")}),h.jsx("button",{onClick:()=>window.location.reload(),className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-1 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_update.reload")})]})}):null}const Ur=64,f0=96,Rh=32;function d0({children:i,className:u}){const s=g.useRef(null),o=g.useRef(0),f=g.useRef("idle"),[m,_]=g.useState(0),[b,y]=g.useState("idle"),p=g.useCallback(U=>{f.current=U,y(U)},[]),w=g.useCallback(()=>{const U=s.current;return U?U.scrollTop<=0:!0},[]),k=g.useCallback(U=>{if(!w()){o.current=0;return}o.current=U.touches[0].clientY},[w]),N=g.useCallback(U=>{if(f.current==="refreshing"||o.current===0)return;const X=U.touches[0].clientY-o.current;if(X<=0){f.current!=="idle"&&(_(0),p("idle"));return}if(!w())return;U.preventDefault();const ue=Math.min(X*.5,f0);_(ue),p(ue>=Ur?"ready":"pulling")},[w,p]),Y=g.useCallback(()=>{f.current!=="refreshing"&&(f.current==="ready"?(p("refreshing"),_(Ur),setTimeout(()=>{window.location.reload()},300)):(_(0),p("idle")),o.current=0)},[p]);g.useEffect(()=>{const U=s.current;if(U)return U.addEventListener("touchstart",k,{passive:!0}),U.addEventListener("touchmove",N,{passive:!1}),U.addEventListener("touchend",Y,{passive:!0}),()=>{U.removeEventListener("touchstart",k),U.removeEventListener("touchmove",N),U.removeEventListener("touchend",Y)}},[k,N,Y]);const L=Math.min(m/Ur,1),H=b==="refreshing"?0:m/Ur*180,B=m>0||b==="refreshing";return h.jsxs("div",{ref:s,className:u,style:{overscrollBehaviorY:"contain"},children:[B&&h.jsx("div",{className:"pointer-events-none flex items-center justify-center md:hidden",style:{height:m,transition:b==="idle"?"height 200ms ease-out":void 0},children:h.jsx("div",{className:"flex items-center justify-center rounded-full bg-[var(--bg-card)] border border-[var(--border)]",style:{width:Rh,height:Rh,opacity:L,transition:b==="idle"?"opacity 200ms ease-out":void 0},children:b==="refreshing"?h.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",className:"animate-spin",style:{color:"var(--accent)"},children:[h.jsx("circle",{cx:"8",cy:"8",r:"6",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),h.jsx("path",{d:"M8 2a6 6 0 0 1 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):h.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",style:{color:b==="ready"?"var(--accent)":"var(--text-muted)",transform:`rotate(${H}deg)`,transition:"color 150ms"},children:h.jsx("path",{d:"M8 3v8M5 8l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),i]})}const Tp=g.createContext({setActions:()=>{}});function V1(i){const{setActions:u}=g.useContext(Tp);g.useEffect(()=>(u(i),()=>u(null)),[i,u])}const jp=g.createContext({setSubtitle:()=>{}});function X1(i){const{setSubtitle:u}=g.useContext(jp),s=typeof i=="string"?i:(i==null?void 0:i.text)??null,o=typeof i=="string"?i:(i==null?void 0:i.title)??(i==null?void 0:i.text)??null;g.useEffect(()=>s?(u(o&&o!==s?{text:s,title:o}:s),()=>u(null)):(u(null),()=>u(null)),[s,o,u])}const m0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:Ph},{to:"/dashboard",label:"dashboard",icon:Ih},{to:"/workers",label:"workers",icon:ap},{to:"/projects",label:"projects",icon:lb},{to:"/access-tokens",label:"tokens",icon:rb}],h0=[{to:"/docs/cli",label:"cli",icon:$s},{to:"/docs/api",label:"api",icon:ab},{to:"/docs/bot",label:"bot",icon:cb},{to:"/docs/skill",label:"skill",icon:hb},{to:"/docs/all",label:"all",icon:ub}],p0=[{to:"/admin",label:"admin",icon:mb}],_0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:Ph},{to:"/dashboard",label:"dashboard",icon:Ih}],qr={"/home":{title:"common.breadcrumb_terminal",subtitle:"common.breadcrumb_terminal_sub"},"/dashboard":{title:"common.breadcrumb_dashboard",subtitle:"common.breadcrumb_dashboard_sub"},"/tasks":{title:"common.breadcrumb_tasks",subtitle:"common.breadcrumb_tasks_sub"},"/workers":{title:"common.breadcrumb_workers",subtitle:"common.breadcrumb_workers_sub"},"/projects":{title:"common.breadcrumb_projects",subtitle:"common.breadcrumb_projects_sub"},"/admin":{title:"common.breadcrumb_admin",subtitle:"common.breadcrumb_admin_sub"},"/profile":{title:"common.breadcrumb_profile",subtitle:"common.breadcrumb_profile_sub"},"/access-tokens":{title:"common.breadcrumb_tokens",subtitle:"common.breadcrumb_tokens_sub"},"/docs":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_sub"},"/docs/cli":{title:"common.breadcrumb_docs_cli",subtitle:"common.breadcrumb_docs_cli_sub"},"/docs/api":{title:"common.breadcrumb_docs_api",subtitle:"common.breadcrumb_docs_api_sub"},"/docs/skill":{title:"common.breadcrumb_docs_skill",subtitle:"common.breadcrumb_docs_skill_sub"},"/docs/bot":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_bot_sub"},"/docs/all":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_all_sub"}};function g0(i){const{t:u}=Vt();if(qr[i]){const o=qr[i];return{title:u(o.title),subtitle:u(o.subtitle)}}const s="/"+i.split("/").filter(Boolean)[0];if(qr[s]){const o=qr[s],f=i.split("/").filter(Boolean).slice(1).join(" / ");return{title:u(o.title),subtitle:f||u(o.subtitle)}}return{title:i.slice(1).replace(/\//g," // ")||"home"}}function y0(i,u){return i==="/home"?u==="/home":i==="/dashboard"?u==="/dashboard":u.startsWith(i)}function v0(){const i=gt(),{t:u}=Vt(),s={terminal:u("terminal_home.title"),dashboard:u("dashboard.title"),tasks:u("tasks.title"),workers:u("workers.title")};return h.jsxs("nav",{className:"flex items-center justify-around border-t border-[var(--border)] bg-[var(--bg-card)]",style:{height:48,paddingTop:4},children:[_0.map(({to:o,label:f,icon:m})=>{const _=y0(o,i.pathname);return h.jsxs(Js,{to:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(m,{size:18,className:_?"text-[var(--accent)]":"text-[var(--text-muted)]"}),h.jsx("span",{className:`text-[11px] lowercase ${_?"font-bold text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:s[f]??f})]},o)}),h.jsx(wp,{renderTrigger:o=>h.jsxs("button",{type:"button",onClick:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(tp,{size:18,className:"text-[var(--text-muted)]"}),h.jsx("span",{className:"text-[11px] lowercase text-[var(--text-muted)]",children:u("common.search_placeholder")})]})})]})}function b0(){const i=Fa(),{t:u}=Vt();return h.jsxs("header",{className:"flex items-center justify-between border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:hidden",style:{height:"calc(56px + env(safe-area-inset-top, 0px))",minHeight:"calc(56px + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)"},children:[h.jsxs("button",{onClick:()=>i("/home"),className:"flex items-center gap-2",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-[4px] bg-[var(--accent)]",children:h.jsx("span",{className:"text-sm font-semibold",style:{color:"#0C0C0C"},children:"~"})}),h.jsx("span",{className:"text-sm font-bold lowercase text-[var(--text-primary)]",children:u("common.overlord")})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("button",{onClick:()=>i("/profile"),className:"p-2 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]","aria-label":u("common.profile"),children:h.jsx(gb,{size:18})}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})}function zs({label:i,items:u,collapsed:s}){return h.jsxs("div",{className:"mt-4 first:mt-0",children:[!s&&h.jsx("div",{className:"mb-2 px-3 text-xs lowercase",style:{color:"var(--text-muted)"},children:i}),u.map(({to:o,label:f,icon:m})=>h.jsx(Js,{to:o,className:({isActive:_})=>`flex items-center text-sm lowercase transition-colors ${s?"justify-center py-3":"gap-2.5 px-3 py-1.5"} ${_?"text-[var(--accent)] bg-[var(--accent)]/5":"text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:({isActive:_})=>h.jsxs(h.Fragment,{children:[h.jsx(m,{size:14,style:{flexShrink:0}}),!s&&h.jsx("span",{children:_?`> ${f}`:` ${f}`})]})},o))]})}function x0(){const{user:i,logout:u}=xa(),s=Fa(),[o,f]=g.useState(!1),m=xb(),{t:_}=Vt(),{sidebarCollapsed:b,toggleSidebar:y}=kb();function p(){u(),s("/login")}return h.jsxs("aside",{className:"hidden md:flex flex-col border-r border-[var(--border)] transition-[width,min-width] duration-300 overflow-hidden",style:{width:b?56:240,minWidth:b?56:240,backgroundColor:"var(--bg-card)"},children:[h.jsx("div",{className:"flex items-center px-5",style:{height:48},children:h.jsxs("button",{onClick:()=>s("/home"),className:"flex items-center gap-2.5",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-[4px] bg-[var(--accent)]",style:{flexShrink:0},children:h.jsx("span",{className:"text-lg font-semibold",style:{color:"#0C0C0C"},children:"~"})}),!b&&h.jsx("span",{className:"text-base font-bold lowercase tracking-tight",style:{color:"var(--text-primary)"},children:_("common.overlord")})]})}),h.jsxs("nav",{className:"flex-1 px-3 pt-2",children:[h.jsx(zs,{label:_("common.navigation"),items:m0,collapsed:b}),h.jsx(zs,{label:_("common.docs_section"),items:h0,collapsed:b}),m&&h.jsx(zs,{label:_("common.admin_section"),items:p0,collapsed:b})]}),h.jsx("div",{className:`px-3 py-1 ${b?"flex justify-center":""}`,children:h.jsx("button",{onClick:y,className:"flex items-center justify-center w-full py-1.5 rounded-[4px] text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)] hover:bg-[var(--accent)]/5","aria-label":b?"expand sidebar":"collapse sidebar",children:b?h.jsx(Pv,{size:14}):h.jsx(Iv,{size:14})})}),h.jsx("div",{className:"border-t border-[var(--border)] p-3",children:h.jsxs("div",{className:`flex items-center py-2 ${b?"justify-center":"gap-3 px-3"}`,children:[h.jsx("button",{onClick:()=>s("/profile"),className:"flex h-7 w-7 items-center justify-center text-xs font-bold text-black transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",borderRadius:4,flexShrink:0},title:_("common.profile"),children:((i==null?void 0:i.username)??"u")[0].toUpperCase()}),!b&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{onClick:()=>s("/profile"),className:"min-w-0 flex-1 text-left transition-colors hover:opacity-80",title:_("common.profile"),children:[h.jsx("div",{className:"truncate text-sm lowercase",style:{color:"var(--text-primary)"},children:(i==null?void 0:i.username)??"user"}),h.jsx("div",{className:"truncate text-xs lowercase",style:{color:"var(--text-muted)"},children:(i==null?void 0:i.role)??"user"})]}),h.jsx("button",{onClick:()=>f(!0),className:"p-1 text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)]","aria-label":_("common.log_out"),children:h.jsx(sb,{size:14})})]})]})}),h.jsx(r0,{isOpen:o,onClose:()=>f(!1),onConfirm:p,title:_("common.logout_title"),message:_("common.logout_message"),confirmLabel:_("common.logout"),confirmVariant:"warning"})]})}function S0({headerActions:i,subtitleOverride:u}){const s=gt(),{title:o,subtitle:f}=g0(s.pathname),m=u??f,_=typeof m=="string"?m:m==null?void 0:m.text,b=typeof m=="string"?m:(m==null?void 0:m.title)??(m==null?void 0:m.text);return h.jsxs("header",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5",style:{height:48,minHeight:48,backgroundColor:"var(--bg-card)"},children:[h.jsxs("div",{className:"text-sm lowercase",children:[h.jsx("span",{style:{color:"var(--text-primary)"},children:o}),_&&h.jsxs("span",{style:{color:"var(--text-muted)"},title:b,children:[" ","// ",Wh(_,40)]})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[i,h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(wp,{}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})]})}function k0(){const[i,u]=g.useState(null),[s,o]=g.useState(null),f=gt(),m=f.pathname==="/home",_=/^\/tasks\/\d+$/.test(f.pathname),b=f.pathname.startsWith("/docs");return g.useEffect(()=>up.getState().init(),[]),h.jsxs("div",{className:"fixed inset-x-0 top-0 flex w-full overflow-hidden font-mono md:flex-row",style:{height:"var(--app-height, 100dvh)",minHeight:"var(--app-height, 100dvh)"},children:[h.jsx(x0,{}),h.jsxs("div",{"data-testid":"app-main-column",className:"flex min-h-0 flex-1 flex-col overflow-hidden pb-[calc(48px+var(--safe-area-bottom,0px))] md:pb-0",children:[h.jsx(b0,{}),!b&&h.jsx(S0,{headerActions:i,subtitleOverride:s}),h.jsx(d0,{className:m||_?"min-h-0 flex-1 overflow-hidden bg-[var(--bg-primary)]":"min-h-0 flex-1 overflow-auto bg-[var(--bg-primary)] p-4 pb-6 md:p-6 md:pb-6",children:h.jsx(Tp.Provider,{value:{setActions:u},children:h.jsx(jp.Provider,{value:{setSubtitle:o},children:h.jsx(cv,{})})})}),h.jsx(s0,{}),h.jsx(c0,{}),h.jsx("div",{className:"safe-area-bottom-fill fixed inset-x-0 bottom-0 z-30 bg-[var(--bg-card)] md:hidden",children:h.jsx(v0,{})})]})]})}function Ah(i){var s;const u=(s=i.state)==null?void 0:s.from;return u?{from:u}:{from:{pathname:i.pathname,search:i.search}}}function li({children:i,requireAdmin:u=!1}){const{accessToken:s,user:o,requireTotpSetup:f,initializing:m}=xa(),_=gt();if(m)return h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})});if(!s)return h.jsx(ll,{to:"/login",state:Ah(_),replace:!0});if(f){const b=Ah(_);return _.pathname!=="/totp-setup"&&_.pathname!=="/bind"?h.jsx(ll,{to:"/totp-setup",state:b,replace:!0}):_.pathname==="/bind"?(sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(b.from)),h.jsx(ll,{to:"/totp-setup",state:b,replace:!0})):h.jsx(h.Fragment,{children:i})}return u&&(o==null?void 0:o.role)!==ip.ADMIN?h.jsx(ll,{to:"/home",replace:!0}):h.jsx(h.Fragment,{children:i})}function E0({children:i}){const{theme:u,resolved:s,setResolved:o}=sp();return g.useEffect(()=>{if(u!=="system"){o(u);return}const f=window.matchMedia("(prefers-color-scheme: dark)");o(f.matches?"dark":"light");const m=_=>o(_.matches?"dark":"light");return f.addEventListener("change",m),()=>f.removeEventListener("change",m)},[u,o]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",s==="dark")},[s]),h.jsx(h.Fragment,{children:i})}class w0 extends g.Component{constructor(u){super(u),this.state={hasError:!1,error:null}}static getDerivedStateFromError(u){return{hasError:!0,error:u}}render(){var u;return this.state.hasError?h.jsxs("div",{className:"flex h-full min-h-[300px] flex-col items-center justify-center gap-4 p-8 font-mono",children:[h.jsx("span",{className:"text-lg font-bold text-[var(--destructive)]",children:Br("common.runtime_error")}),h.jsx("p",{className:"max-w-md text-center text-xs text-[var(--text-muted)]",children:((u=this.state.error)==null?void 0:u.message)||Br("common.an_unexpected_error_occurred")}),h.jsxs("button",{onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(ep,{className:"h-3.5 w-3.5"}),Br("common.reload")]})]}):this.props.children}}function T0({isOpen:i}){const u=Fa(),{logout:s,setSessionExpired:o}=xa(),{t:f}=Vt();function m(){s(),o(!1),u("/login")}return i?h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[h.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),h.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:h.jsxs("div",{className:"flex flex-col items-center px-8 py-10",children:[h.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-full bg-[var(--warning)]/10",children:h.jsx(ob,{className:"h-7 w-7 text-[var(--warning)]"})}),h.jsx("h3",{className:"mb-2 text-base font-bold text-[var(--text-primary)]",children:f("auth.session_expired")}),h.jsx("p",{className:"mb-8 text-center text-xs text-[var(--text-secondary)]",children:f("auth.session_expired_message")}),h.jsx("button",{type:"button",className:"w-full rounded-[4px] bg-[var(--accent)] px-3 py-2.5 text-xs font-medium text-black hover:opacity-90 transition-opacity",onClick:m,children:f("auth.go_to_login")})]})})]}):null}const zh=5;let ba=[];const Bs=new Set;function Rp(){Bs.forEach(i=>i())}function j0(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Wa(i,u,s=4e3){const o=j0();return ba=[...ba,{id:o,variant:i,message:u,duration:s}],ba.length>zh&&(ba=ba.slice(ba.length-zh)),Rp(),o}Wa.success=(i,u)=>Wa("success",i,u);Wa.error=(i,u)=>Wa("error",i,u);Wa.warning=(i,u)=>Wa("warning",i,u);Wa.info=(i,u)=>Wa("info",i,u);function R0(i){ba=ba.filter(u=>u.id!==i),Rp()}function A0(){const[,i]=g.useState(0);return g.useEffect(()=>{const u=()=>i(s=>s+1);return Bs.add(u),()=>{Bs.delete(u)}},[]),ba}const z0={success:{icon:eb,borderColor:"var(--accent)"},error:{icon:tb,borderColor:"var(--destructive)"},warning:{icon:np,borderColor:"var(--warning)"},info:{icon:ib,borderColor:"var(--info)"}};function O0({item:i}){const u=z0[i.variant],s=u.icon,{t:o}=Vt(),f=g.useCallback(()=>R0(i.id),[i.id]);return g.useEffect(()=>{if(!i.duration)return;const m=setTimeout(f,i.duration);return()=>clearTimeout(m)},[i.duration,f]),h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] bg-[var(--bg-card)] px-4 py-3 shadow-lg",style:{borderLeft:`3px solid ${u.borderColor}`},role:"alert",children:[h.jsx(s,{className:"h-4 w-4 shrink-0",style:{color:u.borderColor}}),h.jsx("p",{className:"flex-1 text-xs text-[var(--text-primary)]",children:i.message}),h.jsx("button",{onClick:f,className:"shrink-0 rounded-[4px] p-0.5 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]","aria-label":o("common.dismiss_notification"),children:h.jsx(lp,{className:"h-3.5 w-3.5"})})]})}function C0(){const i=A0();return i.length===0?null:h.jsx("div",{className:"pointer-events-none fixed right-4 top-4 z-[9999] flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2",children:i.map(u=>h.jsx("div",{className:"pointer-events-auto",children:h.jsx(O0,{item:u})},u.id))})}const D0=g.lazy(()=>ne(()=>import("./LandingPage-CzEcY8Ug.js"),__vite__mapDeps([0,1,2,3,4,5]))),N0=g.lazy(()=>ne(()=>import("./LoginPage-DL_ktf8K.js"),[])),M0=g.lazy(()=>ne(()=>import("./TotpSetupPage-BIB7NxIo.js"),[])),U0=g.lazy(()=>ne(()=>import("./NotFoundPage-DbnkHNlS.js"),[])),q0=g.lazy(()=>ne(()=>import("./HomePage-CUvmATWV.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,1]))),L0=g.lazy(()=>ne(()=>import("./TerminalHomePage-ZaZgrQ1h.js"),__vite__mapDeps([15,16,17,18,10,11,19,8,12,13,20,21,22]))),H0=g.lazy(()=>ne(()=>import("./TaskListPage-B8wt__hJ.js"),__vite__mapDeps([23,16,7,8,12,14,24,19,5,25,9,20,26,11]))),B0=g.lazy(()=>ne(()=>import("./TaskDetailPage-Chu8n_LB.js"),__vite__mapDeps([27,16,17,18,12,19,8,14,28,21,24,29,30]))),Y0=g.lazy(()=>ne(()=>import("./WorkerListPage-C8HOqjJK.js"),__vite__mapDeps([31,8,32,33,34,35,36,22,5,30,19,25,9,13,20]))),G0=g.lazy(()=>ne(()=>import("./WorkerDetailPage-bvOu-Kfl.js"),__vite__mapDeps([37,12,8,38,32,13,14,39,28]))),V0=g.lazy(()=>ne(()=>import("./WorkerSetupGuidePage-DwFagocV.js"),__vite__mapDeps([33,34,35,36,22]))),X0=g.lazy(()=>ne(()=>import("./ProjectListPage-BEeRYf2H.js"),__vite__mapDeps([40,19,25,9,12,13,20]))),Q0=g.lazy(()=>ne(()=>import("./ProjectDetailPage-CKKVrkpJ.js"),__vite__mapDeps([41,42,19,14,12,8,38,13,43,39,20]))),Z0=g.lazy(()=>ne(()=>import("./EditProjectPage-BmqFgw6t.js"),__vite__mapDeps([44,19,42,20]))),K0=g.lazy(()=>ne(()=>import("./PipelineEditorPage-B-VIaUq9.js"),__vite__mapDeps([45,19]))),J0=g.lazy(()=>ne(()=>import("./ProfilePage-DJfNVbh5.js"),__vite__mapDeps([46,47,38,13]))),$0=g.lazy(()=>ne(()=>import("./BindPlatformPage-CQ4nCUs4.js"),[])),W0=g.lazy(()=>ne(()=>import("./AccessTokensPage-BsHXxEAa.js"),__vite__mapDeps([48,19,25,9,12,13,20,5,39]))),F0=g.lazy(()=>ne(()=>import("./CliReferencePage-49nW5cIo.js"),__vite__mapDeps([49,50,5,20]))),I0=g.lazy(()=>ne(()=>import("./ApiReferencePage-R-TWXn2i.js"),__vite__mapDeps([51,50,5,20]))),P0=g.lazy(()=>ne(()=>import("./SkillPage-BteMVTia.js"),__vite__mapDeps([52,53,5,29]))),e1=g.lazy(()=>ne(()=>import("./DocsLayout-BFVyO-jL.js"),__vite__mapDeps([54,28]))),t1=g.lazy(()=>ne(()=>import("./InstallationPage-BnXbq6BG.js"),__vite__mapDeps([55,53,5]))),a1=g.lazy(()=>ne(()=>import("./DeveloperSetupPage-BS1EEJPG.js"),__vite__mapDeps([56,53,5]))),n1=g.lazy(()=>ne(()=>import("./WorkerSetupPage-Cg0X_s7f.js"),__vite__mapDeps([57,53,5]))),l1=g.lazy(()=>ne(()=>import("./BotSetupPage-zct5uBr8.js"),__vite__mapDeps([58,53,5]))),i1=g.lazy(()=>ne(()=>import("./LocalDevelopmentPage-BrMAHM9U.js"),__vite__mapDeps([59,53,5]))),r1=g.lazy(()=>ne(()=>import("./WorkerOperationsPage-DUJsmQbG.js"),[])),u1=g.lazy(()=>ne(()=>import("./DeploymentPage-fjn7sGc4.js"),__vite__mapDeps([60,53,5]))),Oh=g.lazy(()=>ne(()=>import("./BotIntegrationPage-B9NpzTot.js"),[])),o1=g.lazy(()=>ne(()=>import("./PipelineConfigPage-Dr--9t7o.js"),__vite__mapDeps([61,53,5]))),s1=g.lazy(()=>ne(()=>import("./DevWorkflowPage-ErXGq_I6.js"),__vite__mapDeps([62,53,5]))),c1=g.lazy(()=>ne(()=>import("./PermissionsPage-BE8hB9JD.js"),[])),f1=g.lazy(()=>ne(()=>import("./EnvVariablesPage-_vSrnwQF.js"),__vite__mapDeps([63,53,5]))),d1=g.lazy(()=>ne(()=>import("./ArchitecturePage-D2x2ctOK.js"),__vite__mapDeps([64,53,5]))),m1=g.lazy(()=>ne(()=>import("./ChangelogPage-B6tVwiC6.js"),[])),h1=g.lazy(()=>ne(()=>import("./AgentCliPage-mQ_4MWzg.js"),__vite__mapDeps([65,53,5]))),p1=g.lazy(()=>ne(()=>import("./DocsIndexPage-Dj824iQn.js"),__vite__mapDeps([66,35,2,3,36]))),_1=g.lazy(()=>ne(()=>import("./AdminPage-CqbSIVC9.js"),__vite__mapDeps([67,4,2,68,36]))),g1=g.lazy(()=>ne(()=>import("./DeveloperManage-CQ4GuWD1.js"),__vite__mapDeps([69,19,47,25,9,13,8,20,4,43,21]))),y1=g.lazy(()=>ne(()=>import("./BotManage-BT6BRj5J.js"),__vite__mapDeps([70,19,53,5,39,20,25,9,13,8,2,43]))),v1=g.lazy(()=>ne(()=>import("./TokenManage-N7hHSMbB.js"),__vite__mapDeps([71,34,5,29,25,9,13,8,20]))),b1=g.lazy(()=>ne(()=>import("./AuditLogPage-C_H7ZESD.js"),__vite__mapDeps([72,19,25,9,68,26,11]))),x1=g.lazy(()=>ne(()=>import("./SettingsPage-BMb2Tcw6.js"),[]));function S1(){return h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})})}function k1(){const i=xa(u=>u.sessionExpired);return h.jsxs(E0,{children:[h.jsx(C0,{}),h.jsx(w0,{children:h.jsxs(qv,{children:[h.jsx(T0,{isOpen:i}),h.jsx(g.Suspense,{fallback:h.jsx(S1,{}),children:h.jsxs(dv,{children:[h.jsx(ee,{path:"/",element:h.jsx(D0,{})}),h.jsx(ee,{path:"/login",element:h.jsx(N0,{})}),h.jsx(ee,{path:"/totp-setup",element:h.jsx(li,{children:h.jsx(M0,{})})}),h.jsx(ee,{path:"/bind",element:h.jsx(li,{children:h.jsx($0,{})})}),h.jsxs(ee,{element:h.jsx(li,{children:h.jsx(k0,{})}),children:[h.jsx(ee,{path:"/home",element:h.jsx(L0,{})}),h.jsx(ee,{path:"/dashboard",element:h.jsx(q0,{})}),h.jsx(ee,{path:"/tasks",element:h.jsx(H0,{})}),h.jsx(ee,{path:"/tasks/:id",element:h.jsx(B0,{})}),h.jsx(ee,{path:"/workers",element:h.jsx(Y0,{})}),h.jsx(ee,{path:"/workers/setup",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(V0,{})})}),h.jsx(ee,{path:"/workers/:id",element:h.jsx(G0,{})}),h.jsx(ee,{path:"/projects",element:h.jsx(X0,{})}),h.jsx(ee,{path:"/projects/:key",element:h.jsx(Q0,{})}),h.jsx(ee,{path:"/projects/:key/edit",element:h.jsx(Z0,{})}),h.jsx(ee,{path:"/projects/:key/pipeline",element:h.jsx(K0,{})}),h.jsx(ee,{path:"/profile",element:h.jsx(J0,{})}),h.jsx(ee,{path:"/access-tokens",element:h.jsx(W0,{})}),h.jsxs(ee,{path:"/docs",element:h.jsx(e1,{}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"cli",replace:!0})}),h.jsx(ee,{path:"cli",element:h.jsx(F0,{})}),h.jsx(ee,{path:"api",element:h.jsx(I0,{})}),h.jsx(ee,{path:"bot",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"all",element:h.jsx(p1,{})}),h.jsx(ee,{path:"skill",element:h.jsx(P0,{})}),h.jsx(ee,{path:"installation",element:h.jsx(t1,{})}),h.jsx(ee,{path:"developer-setup",element:h.jsx(a1,{})}),h.jsx(ee,{path:"worker-setup",element:h.jsx(n1,{})}),h.jsx(ee,{path:"bot-setup",element:h.jsx(l1,{})}),h.jsx(ee,{path:"local-development",element:h.jsx(i1,{})}),h.jsx(ee,{path:"worker-operations",element:h.jsx(r1,{})}),h.jsx(ee,{path:"deployment",element:h.jsx(u1,{})}),h.jsx(ee,{path:"bot-integration",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"pipeline-config",element:h.jsx(o1,{})}),h.jsx(ee,{path:"dev-workflow",element:h.jsx(s1,{})}),h.jsx(ee,{path:"permissions",element:h.jsx(c1,{})}),h.jsx(ee,{path:"env-variables",element:h.jsx(f1,{})}),h.jsx(ee,{path:"architecture",element:h.jsx(d1,{})}),h.jsx(ee,{path:"agent-cli",element:h.jsx(h1,{})}),h.jsx(ee,{path:"changelog",element:h.jsx(m1,{})})]}),h.jsxs(ee,{path:"/admin",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(_1,{})}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"developers",replace:!0})}),h.jsx(ee,{path:"developers",element:h.jsx(g1,{})}),h.jsx(ee,{path:"bots",element:h.jsx(y1,{})}),h.jsx(ee,{path:"tokens",element:h.jsx(v1,{})}),h.jsx(ee,{path:"audit-logs",element:h.jsx(b1,{})}),h.jsx(ee,{path:"settings",element:h.jsx(x1,{})})]})]}),h.jsx(ee,{path:"*",element:h.jsx(U0,{})})]})})]})})]})}function E1(i){var u,s;return((u=i.matchMedia)==null?void 0:u.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}function w1(i){var s,o;const u=((s=i.navigator)==null?void 0:s.userAgent)??"";return/iPhone|iPad|iPod/i.test(u)||/Macintosh/i.test(u)&&(((o=i.navigator)==null?void 0:o.maxTouchPoints)??0)>1}function T1(i){const u=i.activeElement;if(!(u instanceof HTMLElement))return!1;const s=u.tagName;return u.isContentEditable||s==="INPUT"||s==="TEXTAREA"||s==="SELECT"}function j1(i){const u=i.screen;if(!u)return null;const s=Math.round(u.width),o=Math.round(u.height);return i.innerHeight>=i.innerWidth?Math.max(s,o):Math.min(s,o)}function R1(i=window,u=document){const s=u.documentElement,o=i.visualViewport??null,f=()=>{const m=Math.round((o==null?void 0:o.height)??0),_=Math.round(i.innerHeight);let b=m>0?m:_;if(E1(i)&&w1(i)&&!T1(u)){const y=j1(i);y!==null&&(b=Math.max(b,_,y))}s.style.setProperty("--app-height",`${b}px`)};return f(),i.addEventListener("resize",f),i.addEventListener("orientationchange",f),o==null||o.addEventListener("resize",f),o==null||o.addEventListener("scroll",f),()=>{i.removeEventListener("resize",f),i.removeEventListener("orientationchange",f),o==null||o.removeEventListener("resize",f),o==null||o.removeEventListener("scroll",f)}}xa.getState().initialize();R1(window,document);const A1=window.matchMedia("(display-mode: standalone)").matches||navigator.standalone===!0;if(A1){document.documentElement.classList.add("pwa-standalone");const i=window.matchMedia("(prefers-color-scheme: dark)").matches,u=localStorage.getItem("overlord-theme"),s=u==="dark"||u!=="light"&&i;document.body.style.backgroundColor=s?"#171717":"#FFFFFF",new MutationObserver(()=>{const o=document.documentElement.classList.contains("dark");document.body.style.backgroundColor=o?"#171717":"#FFFFFF"}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}cy.createRoot(document.getElementById("root")).render(h.jsx(g.StrictMode,{children:h.jsx(k1,{})}));export{Js as $,O1 as A,C1 as B,Fv as C,ip as D,eb as E,U1 as F,L1 as G,Ns as H,np as I,M1 as J,ep as K,Jh as L,cb as M,ll as N,uy as O,s0 as P,Wh as Q,Rr as R,ap as S,cp as T,rb as U,sb as V,N1 as W,lp as X,q1 as Y,ab as Z,hb as _,Vt as a,cv as a0,H1 as a1,B1 as a2,tb as a3,$s as b,xe as c,mb as d,ub as e,Fa as f,gt as g,Xr as h,xb as i,h as j,up as k,kp as l,Ep as m,t0 as n,Fr as o,D1 as p,X1 as q,g as r,G1 as s,Wa as t,xa as u,r0 as v,V1 as w,tp as x,Ph as y,Y1 as z};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-XDDf1Oy_.js";/**
1
+ import{c as e}from"./index-MUaJRsMr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-XDDf1Oy_.js";/**
1
+ import{c as e}from"./index-MUaJRsMr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-XDDf1Oy_.js";/**
1
+ import{c as a}from"./index-MUaJRsMr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-XDDf1Oy_.js";/**
1
+ import{c as e}from"./index-MUaJRsMr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as t}from"./index-XDDf1Oy_.js";/**
1
+ import{c as t}from"./index-MUaJRsMr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-XDDf1Oy_.js";/**
1
+ import{c as a}from"./index-MUaJRsMr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-XDDf1Oy_.js";/**
1
+ import{c as a}from"./index-MUaJRsMr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{W as r,p as e,a1 as s,a2 as u,Y as a}from"./index-XDDf1Oy_.js";const n={[e.QUEUED]:"var(--text-muted)",[e.ASSIGNED]:"#60a5fa",[e.RUNNING]:"var(--accent)",[e.SUSPENDED]:"var(--warning)",[e.COMPLETED]:"var(--info)",[e.FAILED]:"var(--destructive)",[e.CANCELLED]:"var(--text-muted)"};function v(t){return n[t]??"var(--text-muted)"}const o={[r.ONLINE]:"var(--accent)",[r.OFFLINE]:"var(--destructive)",[r.DRAINING]:"var(--warning)",[r.DECOMMISSIONED]:"var(--text-muted)"};function E(t){return o[t]??"var(--text-muted)"}function x(t){switch(t){case s.ACTIVE:return"text-green-400";case s.DISABLED:return"text-red-400";default:return"text-[var(--text-muted)]"}}function S(t){switch(t){case a.ACTIVE:return"text-green-400";case a.USED:return"text-blue-400";case a.REVOKED:return"text-red-400";case a.EXPIRED:return"text-[var(--text-muted)]";default:return"text-[var(--text-muted)]"}}function d(t){switch(t){case u.ACTIVE:return"text-green-400";case"error":return"text-red-400";default:return"text-[var(--text-muted)]"}}function i(t){return t>.8?"var(--destructive)":t>.6?"var(--warning)":"var(--accent)"}export{v as a,i as b,x as c,d,S as e,E as g,n as t,o as w};
1
+ import{W as r,p as e,a1 as s,a2 as u,Y as a}from"./index-MUaJRsMr.js";const n={[e.QUEUED]:"var(--text-muted)",[e.ASSIGNED]:"#60a5fa",[e.RUNNING]:"var(--accent)",[e.SUSPENDED]:"var(--warning)",[e.COMPLETED]:"var(--info)",[e.FAILED]:"var(--destructive)",[e.CANCELLED]:"var(--text-muted)"};function v(t){return n[t]??"var(--text-muted)"}const o={[r.ONLINE]:"var(--accent)",[r.OFFLINE]:"var(--destructive)",[r.DRAINING]:"var(--warning)",[r.DECOMMISSIONED]:"var(--text-muted)"};function E(t){return o[t]??"var(--text-muted)"}function x(t){switch(t){case s.ACTIVE:return"text-green-400";case s.DISABLED:return"text-red-400";default:return"text-[var(--text-muted)]"}}function S(t){switch(t){case a.ACTIVE:return"text-green-400";case a.USED:return"text-blue-400";case a.REVOKED:return"text-red-400";case a.EXPIRED:return"text-[var(--text-muted)]";default:return"text-[var(--text-muted)]"}}function d(t){switch(t){case u.ACTIVE:return"text-green-400";case"error":return"text-red-400";default:return"text-[var(--text-muted)]"}}function i(t){return t>.8?"var(--destructive)":t>.6?"var(--warning)":"var(--accent)"}export{v as a,i as b,x as c,d,S as e,E as g,n as t,o as w};
@@ -0,0 +1 @@
1
+ import{o as i,h as n,p as c,F as T}from"./index-MUaJRsMr.js";const h=i((t,r)=>({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,_fetchTasksRequestId:0,fetchTasks:async a=>{const s=r()._fetchTasksAbort;s&&s.abort();const o=new AbortController,l=r()._fetchTasksRequestId+1;t({loading:!0,error:null,_fetchTasksAbort:o,_fetchTasksRequestId:l});try{const e={};a!=null&&a.status&&(e.status=a.status),a!=null&&a.projectKey&&(e.projectKey=a.projectKey),a!=null&&a.developerId&&(e.developerId=a.developerId),a!=null&&a.cursor&&(e.cursor=a.cursor),a!=null&&a.limit&&(e.limit=String(a.limit));const f=await n.get("web/tasks",{searchParams:e,signal:o.signal}).json();if(r()._fetchTasksRequestId!==l)return;t({tasks:f.data,nextCursor:f.nextCursor??null,_fetchTasksAbort:null})}catch(e){if(e instanceof DOMException&&e.name==="AbortError")return;r()._fetchTasksRequestId===l&&t({error:e instanceof Error?e.message:"Failed to fetch tasks"})}finally{r()._fetchTasksRequestId===l&&t({loading:!1,_fetchTasksAbort:null})}},fetchTask:async a=>{t({loading:!0,error:null});try{const s=await n.get(`web/tasks/${a}`).json();t({currentTask:s})}catch(s){t({error:s instanceof Error?s.message:"Failed to fetch task"})}finally{t({loading:!1})}},createTask:async a=>{t({error:null});try{const s=await n.post("web/tasks",{json:a}).json();return t(o=>({tasks:[s,...o.tasks]})),s}catch(s){throw t({error:s instanceof Error?s.message:"Failed to create task"}),s}},cancelTask:async a=>{t({error:null});try{await n.post(`web/tasks/${a}/cancel`);const{currentTask:s}=r();(s==null?void 0:s.id)===a&&await r().fetchTask(a)}catch(s){throw t({error:s instanceof Error?s.message:"Failed to cancel task"}),s}},reset:()=>{t({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,_fetchTasksRequestId:0})}})),u=[c.COMPLETED,c.FAILED,c.CANCELLED],b=[{value:"feat",label:"feat"},{value:"fix",label:"fix"},{value:"refactor",label:"refactor"},{value:"docs",label:"docs"},{value:"chore",label:"chore"}],k=Object.values(T).map(t=>({value:t,label:t})),_=[{value:"",label:"default"},...k];export{_ as A,k as C,u as T,b as a,h as u};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-XDDf1Oy_.js";/**
1
+ import{c as e}from"./index-MUaJRsMr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as e}from"./index-XDDf1Oy_.js";function p(s,l){const[i,d]=e.useState(null),[R,a]=e.useState(!0),[m,o]=e.useState(null),f=e.useRef(s);f.current=s;const r=e.useRef(0),t=e.useRef(!0),u=e.useCallback(async()=>{const c=++r.current;a(!0),o(null);try{const n=await f.current();t.current&&c===r.current&&d(n)}catch(n){if(t.current&&c===r.current){const E=n instanceof Error?n.message:"An unexpected error occurred";o(E)}}finally{t.current&&c===r.current&&a(!1)}},l);return e.useEffect(()=>{u()},[u]),e.useEffect(()=>()=>{t.current=!1,r.current+=1},[]),{data:i,loading:R,error:m,refetch:u}}export{p as u};
1
+ import{r as e}from"./index-MUaJRsMr.js";function p(s,l){const[i,d]=e.useState(null),[R,a]=e.useState(!0),[m,o]=e.useState(null),f=e.useRef(s);f.current=s;const r=e.useRef(0),t=e.useRef(!0),u=e.useCallback(async()=>{const c=++r.current;a(!0),o(null);try{const n=await f.current();t.current&&c===r.current&&d(n)}catch(n){if(t.current&&c===r.current){const E=n instanceof Error?n.message:"An unexpected error occurred";o(E)}}finally{t.current&&c===r.current&&a(!1)}},l);return e.useEffect(()=>{u()},[u]),e.useEffect(()=>()=>{t.current=!1,r.current+=1},[]),{data:i,loading:R,error:m,refetch:u}}export{p as u};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-XDDf1Oy_.js";/**
1
+ import{c as e}from"./index-MUaJRsMr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-XDDf1Oy_.js";/**
1
+ import{c as e}from"./index-MUaJRsMr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-XDDf1Oy_.js";/**
1
+ import{c}from"./index-MUaJRsMr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
package/public/index.html CHANGED
@@ -28,7 +28,7 @@
28
28
  href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap"
29
29
  rel="stylesheet"
30
30
  />
31
- <script type="module" crossorigin src="/assets/index-XDDf1Oy_.js"></script>
31
+ <script type="module" crossorigin src="/assets/index-MUaJRsMr.js"></script>
32
32
  <link rel="stylesheet" crossorigin href="/assets/index-DMWyyiI3.css">
33
33
  <link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
34
34
  <body>
package/public/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let s,e={};const l=(l,i)=>(l=new URL(l+".js",i).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(i,n)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const o=s=>l(s,r),a={module:{uri:r},exports:u,require:o};e[r]=Promise.all(i.map(s=>a[s]||o(s))).then(s=>(n(...s),u))}}define(["./workbox-6e9b121d"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"og-image.png",revision:"f1563b4bdc7d1a4ab0aef864b0c2294e"},{url:"index.html",revision:"ae4ea8cc78601c6719b6e3ef1b29684c"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"apple-touch-icon-152x152.png",revision:"8cc7ef3bc3aa19c3d8a29a58646d0636"},{url:"apple-touch-icon-120x120.png",revision:"7057fb6fb60df3fcf3cd49883db13be9"},{url:"assets/workflow-GXjmJAuH.js",revision:null},{url:"assets/wifi-B8ZV0Cuq.js",revision:null},{url:"assets/users-C3jRdgS-.js",revision:null},{url:"assets/useFetch-D6-vLVQP.js",revision:null},{url:"assets/trash-2-BYatp6Y5.js",revision:null},{url:"assets/task-constants-DkWAZdpz.js",revision:null},{url:"assets/status-colors-JE6CIHvW.js",revision:null},{url:"assets/settings-IoIv8DUf.js",revision:null},{url:"assets/scroll-text-CL3s7j9w.js",revision:null},{url:"assets/rotate-ccw-B1uEgqoV.js",revision:null},{url:"assets/plus-R7zuZ-Lg.js",revision:null},{url:"assets/pencil-CUs1Ii2-.js",revision:null},{url:"assets/password-CHk45-jw.js",revision:null},{url:"assets/loader-circle-CMxLiCu8.js",revision:null},{url:"assets/key-y6VWhViZ.js",revision:null},{url:"assets/index-XDDf1Oy_.js",revision:null},{url:"assets/index-DMWyyiI3.css",revision:null},{url:"assets/git-fork-BSMVuD3x.js",revision:null},{url:"assets/external-link-BgyHxzCy.js",revision:null},{url:"assets/download-DMI0uxkZ.js",revision:null},{url:"assets/date-RFA7-ZGs.js",revision:null},{url:"assets/copy-BpM8iA-r.js",revision:null},{url:"assets/chevron-right-Yoiq-SRa.js",revision:null},{url:"assets/chevron-left-B5ojlwvf.js",revision:null},{url:"assets/bot-J2o7uWlo.js",revision:null},{url:"assets/arrow-right-C10sjQNz.js",revision:null},{url:"assets/arrow-left-B5R31ze1.js",revision:null},{url:"assets/WorkerSetupPage-VBsAuhUc.js",revision:null},{url:"assets/WorkerSetupGuidePage-DNy2wbA9.js",revision:null},{url:"assets/WorkerOperationsPage-BZN-hLvH.js",revision:null},{url:"assets/WorkerListPage-B_K4x-PV.js",revision:null},{url:"assets/WorkerDetailPage-DhtIXNEC.js",revision:null},{url:"assets/TotpSetupPage-C09YtAXD.js",revision:null},{url:"assets/Tooltip-DYbD-tQw.js",revision:null},{url:"assets/TokenManage-C5GQ1LB8.js",revision:null},{url:"assets/TerminalHomePage-BFyQcEXU.js",revision:null},{url:"assets/TaskStatusBadge-CJTrG6-l.js",revision:null},{url:"assets/TaskListPage-D6iQoHz7.js",revision:null},{url:"assets/TaskDetailPage-BQY6iia7.js",revision:null},{url:"assets/SkillPage-C3wTzd5o.js",revision:null},{url:"assets/Skeleton-qXDikSxR.js",revision:null},{url:"assets/SettingsPage-_cXRQuuA.js",revision:null},{url:"assets/Select-CvM411zU.js",revision:null},{url:"assets/RemoveMemberConfirmDialog-GYx2AH26.js",revision:null},{url:"assets/QuickAuth-BPSm4iQz.js",revision:null},{url:"assets/PtyTerminal-DJ4ToCWx.js",revision:null},{url:"assets/PtyTerminal-Beg8tuEN.css",revision:null},{url:"assets/ProjectListPage-C5U_Q6m_.js",revision:null},{url:"assets/ProjectDetailPage-BMKog_vR.js",revision:null},{url:"assets/ProfilePage-DshUwwog.js",revision:null},{url:"assets/PipelineEditorPage-rM_yORd4.js",revision:null},{url:"assets/PipelineConfigPage-DaCDhd-P.js",revision:null},{url:"assets/PermissionsPage-D4ZeOpEb.js",revision:null},{url:"assets/OnboardingGuide-Cj_QW_kH.js",revision:null},{url:"assets/NotFoundPage-B2K-657t.js",revision:null},{url:"assets/MetricBar-DaWuVJHZ.js",revision:null},{url:"assets/LoginPage-D7C2GvH2.js",revision:null},{url:"assets/LocalDevelopmentPage-tuixvO86.js",revision:null},{url:"assets/LandingPage-1SiyCrIO.js",revision:null},{url:"assets/InstallationPage-Ce0qD1m-.js",revision:null},{url:"assets/InfoRow-BQI_KKyp.js",revision:null},{url:"assets/HomePage-Sfw7oH7M.js",revision:null},{url:"assets/EnvVariablesPage-gbqhCWCv.js",revision:null},{url:"assets/EmptyState-aKMHLBhj.js",revision:null},{url:"assets/EditProjectPage-C_vbQdR2.js",revision:null},{url:"assets/DocsPrimitives-DuiNLMTd.js",revision:null},{url:"assets/DocsLayout-Br7yGyG5.js",revision:null},{url:"assets/DocsIndexPage-CoUUKiVh.js",revision:null},{url:"assets/DeveloperSetupPage-BQhIuXLe.js",revision:null},{url:"assets/DeveloperManage-4o7ML8ff.js",revision:null},{url:"assets/DevWorkflowPage-DTjFXI4G.js",revision:null},{url:"assets/DeploymentPage-Cm8hl7PF.js",revision:null},{url:"assets/CliReferencePage-C-Lw0uAV.js",revision:null},{url:"assets/ChangelogPage-ROnloca6.js",revision:null},{url:"assets/BotSetupPage-DnwaG9Z7.js",revision:null},{url:"assets/BotManage-CbUW-s4b.js",revision:null},{url:"assets/BotIntegrationPage-BhDYugrQ.js",revision:null},{url:"assets/BindPlatformPage-D45esrNl.js",revision:null},{url:"assets/AuditLogPage-BLzj5y_X.js",revision:null},{url:"assets/ArchitecturePage-8SxZccYN.js",revision:null},{url:"assets/ApiReferencePage-CTkJqTdJ.js",revision:null},{url:"assets/AgentCliPage-Bex4ulEr.js",revision:null},{url:"assets/AdminPage-BKWbP0n2.js",revision:null},{url:"assets/AccessTokensPage-Ck9KudgP.js",revision:null},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"manifest.webmanifest",revision:"fefa2ba09d815fe1773d1fdaaf97d9e5"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("/index.html"))),s.registerRoute(/^https:\/\/fonts\.googleapis\.com/,new s.CacheFirst({cacheName:"google-fonts-stylesheets",plugins:[]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com/,new s.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new s.ExpirationPlugin({maxEntries:10,maxAgeSeconds:31536e3})]}),"GET")});
1
+ if(!self.define){let s,e={};const l=(l,i)=>(l=new URL(l+".js",i).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(i,n)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const a=s=>l(s,r),o={module:{uri:r},exports:u,require:a};e[r]=Promise.all(i.map(s=>o[s]||a(s))).then(s=>(n(...s),u))}}define(["./workbox-6e9b121d"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"og-image.png",revision:"f1563b4bdc7d1a4ab0aef864b0c2294e"},{url:"index.html",revision:"fd664f52b5072425d712750cb65b7cac"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"apple-touch-icon-152x152.png",revision:"8cc7ef3bc3aa19c3d8a29a58646d0636"},{url:"apple-touch-icon-120x120.png",revision:"7057fb6fb60df3fcf3cd49883db13be9"},{url:"assets/workflow-Df0Z1USj.js",revision:null},{url:"assets/wifi-B4I0pd5i.js",revision:null},{url:"assets/users-Bm7VCq1O.js",revision:null},{url:"assets/useFetch-Bwaf8gKF.js",revision:null},{url:"assets/trash-2-DMrdhXG2.js",revision:null},{url:"assets/task-constants-cmxquUo7.js",revision:null},{url:"assets/status-colors-CPLk9kee.js",revision:null},{url:"assets/settings-DAVu6Hwq.js",revision:null},{url:"assets/scroll-text-CpwtPADs.js",revision:null},{url:"assets/rotate-ccw-CUAv4Vwe.js",revision:null},{url:"assets/plus-CbAhPFY5.js",revision:null},{url:"assets/pencil-DtB4RcLk.js",revision:null},{url:"assets/password-CHk45-jw.js",revision:null},{url:"assets/loader-circle-Af9Hv3JS.js",revision:null},{url:"assets/key-CpYHjdzY.js",revision:null},{url:"assets/index-MUaJRsMr.js",revision:null},{url:"assets/index-DMWyyiI3.css",revision:null},{url:"assets/git-fork-ChuAxaYu.js",revision:null},{url:"assets/external-link-Cv_5wb3c.js",revision:null},{url:"assets/download-DthxFO_i.js",revision:null},{url:"assets/date-RFA7-ZGs.js",revision:null},{url:"assets/copy-BD_Dl2hy.js",revision:null},{url:"assets/chevron-right-DfteUugq.js",revision:null},{url:"assets/chevron-left-CVgRX9jS.js",revision:null},{url:"assets/bot-BCIBzxfK.js",revision:null},{url:"assets/arrow-right-Bq-BKmhL.js",revision:null},{url:"assets/arrow-left-D44aHNQk.js",revision:null},{url:"assets/WorkerSetupPage-Cg0X_s7f.js",revision:null},{url:"assets/WorkerSetupGuidePage-DwFagocV.js",revision:null},{url:"assets/WorkerOperationsPage-DUJsmQbG.js",revision:null},{url:"assets/WorkerListPage-C8HOqjJK.js",revision:null},{url:"assets/WorkerDetailPage-bvOu-Kfl.js",revision:null},{url:"assets/TotpSetupPage-BIB7NxIo.js",revision:null},{url:"assets/Tooltip-DkWmUEGK.js",revision:null},{url:"assets/TokenManage-N7hHSMbB.js",revision:null},{url:"assets/TerminalHomePage-ZaZgrQ1h.js",revision:null},{url:"assets/TaskStatusBadge-Dzz5X_zP.js",revision:null},{url:"assets/TaskListPage-B8wt__hJ.js",revision:null},{url:"assets/TaskDetailPage-Chu8n_LB.js",revision:null},{url:"assets/SkillPage-BteMVTia.js",revision:null},{url:"assets/Skeleton-CFuKRpvr.js",revision:null},{url:"assets/SettingsPage-BMb2Tcw6.js",revision:null},{url:"assets/Select-qlm6GDCC.js",revision:null},{url:"assets/RemoveMemberConfirmDialog-Cu1_OjEg.js",revision:null},{url:"assets/QuickAuth-7KQofW1O.js",revision:null},{url:"assets/PtyTerminal-CBC06L-w.js",revision:null},{url:"assets/PtyTerminal-Beg8tuEN.css",revision:null},{url:"assets/ProjectListPage-BEeRYf2H.js",revision:null},{url:"assets/ProjectDetailPage-CKKVrkpJ.js",revision:null},{url:"assets/ProfilePage-DJfNVbh5.js",revision:null},{url:"assets/PipelineEditorPage-B-VIaUq9.js",revision:null},{url:"assets/PipelineConfigPage-Dr--9t7o.js",revision:null},{url:"assets/PermissionsPage-BE8hB9JD.js",revision:null},{url:"assets/OnboardingGuide-BY2IVf0x.js",revision:null},{url:"assets/NotFoundPage-DbnkHNlS.js",revision:null},{url:"assets/MetricBar-U5_XNUhU.js",revision:null},{url:"assets/LoginPage-DL_ktf8K.js",revision:null},{url:"assets/LocalDevelopmentPage-BrMAHM9U.js",revision:null},{url:"assets/LandingPage-CzEcY8Ug.js",revision:null},{url:"assets/InstallationPage-BnXbq6BG.js",revision:null},{url:"assets/InfoRow-wzi1lOPu.js",revision:null},{url:"assets/HomePage-CUvmATWV.js",revision:null},{url:"assets/EnvVariablesPage-_vSrnwQF.js",revision:null},{url:"assets/EmptyState-Dzgbe-pY.js",revision:null},{url:"assets/EditProjectPage-BmqFgw6t.js",revision:null},{url:"assets/DocsPrimitives-CepUnsjE.js",revision:null},{url:"assets/DocsLayout-BFVyO-jL.js",revision:null},{url:"assets/DocsIndexPage-Dj824iQn.js",revision:null},{url:"assets/DeveloperSetupPage-BS1EEJPG.js",revision:null},{url:"assets/DeveloperManage-CQ4GuWD1.js",revision:null},{url:"assets/DevWorkflowPage-ErXGq_I6.js",revision:null},{url:"assets/DeploymentPage-fjn7sGc4.js",revision:null},{url:"assets/CliReferencePage-49nW5cIo.js",revision:null},{url:"assets/ChangelogPage-B6tVwiC6.js",revision:null},{url:"assets/BotSetupPage-zct5uBr8.js",revision:null},{url:"assets/BotManage-BT6BRj5J.js",revision:null},{url:"assets/BotIntegrationPage-B9NpzTot.js",revision:null},{url:"assets/BindPlatformPage-CQ4nCUs4.js",revision:null},{url:"assets/AuditLogPage-C_H7ZESD.js",revision:null},{url:"assets/ArchitecturePage-D2x2ctOK.js",revision:null},{url:"assets/ApiReferencePage-R-TWXn2i.js",revision:null},{url:"assets/AgentCliPage-mQ_4MWzg.js",revision:null},{url:"assets/AdminPage-CqbSIVC9.js",revision:null},{url:"assets/AccessTokensPage-BsHXxEAa.js",revision:null},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"manifest.webmanifest",revision:"fefa2ba09d815fe1773d1fdaaf97d9e5"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("/index.html"))),s.registerRoute(/^https:\/\/fonts\.googleapis\.com/,new s.CacheFirst({cacheName:"google-fonts-stylesheets",plugins:[]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com/,new s.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new s.ExpirationPlugin({maxEntries:10,maxAgeSeconds:31536e3})]}),"GET")});
@@ -1 +0,0 @@
1
- import{o as k,h as c,p as f,F as T}from"./index-XDDf1Oy_.js";const b=k((t,r)=>({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,_fetchTasksRequestId:0,fetchTasks:async a=>{const s=r()._fetchTasksAbort;s&&s.abort();const o=new AbortController,l=r()._fetchTasksRequestId+1;t({loading:!0,error:null,_fetchTasksAbort:o,_fetchTasksRequestId:l});try{const e={};a!=null&&a.status&&(e.status=a.status),a!=null&&a.projectKey&&(e.projectKey=a.projectKey),a!=null&&a.developerId&&(e.developerId=a.developerId),a!=null&&a.cursor&&(e.cursor=a.cursor),a!=null&&a.limit&&(e.limit=String(a.limit));const n=await c.get("web/tasks",{searchParams:e,signal:o.signal}).json();if(r()._fetchTasksRequestId!==l)return;a!=null&&a.cursor?t(i=>({tasks:[...i.tasks,...n.data],nextCursor:n.nextCursor??null,_fetchTasksAbort:null})):t({tasks:n.data,nextCursor:n.nextCursor??null,_fetchTasksAbort:null})}catch(e){if(e instanceof DOMException&&e.name==="AbortError")return;r()._fetchTasksRequestId===l&&t({error:e instanceof Error?e.message:"Failed to fetch tasks"})}finally{r()._fetchTasksRequestId===l&&t({loading:!1,_fetchTasksAbort:null})}},fetchTask:async a=>{t({loading:!0,error:null});try{const s=await c.get(`web/tasks/${a}`).json();t({currentTask:s})}catch(s){t({error:s instanceof Error?s.message:"Failed to fetch task"})}finally{t({loading:!1})}},createTask:async a=>{t({error:null});try{const s=await c.post("web/tasks",{json:a}).json();return t(o=>({tasks:[s,...o.tasks]})),s}catch(s){throw t({error:s instanceof Error?s.message:"Failed to create task"}),s}},cancelTask:async a=>{t({error:null});try{await c.post(`web/tasks/${a}/cancel`);const{currentTask:s}=r();(s==null?void 0:s.id)===a&&await r().fetchTask(a)}catch(s){throw t({error:s instanceof Error?s.message:"Failed to cancel task"}),s}},reset:()=>{t({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,_fetchTasksRequestId:0})}})),u=[f.COMPLETED,f.FAILED,f.CANCELLED],_=[{value:"feat",label:"feat"},{value:"fix",label:"fix"},{value:"refactor",label:"refactor"},{value:"docs",label:"docs"},{value:"chore",label:"chore"}],d=Object.values(T).map(t=>({value:t,label:t})),E=[{value:"",label:"default"},...d];export{E as A,d as C,u as T,_ as a,b as u};