@overlordai/server 1.0.87 → 1.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-CR-PeNcP.js → AccessTokensPage-sK3N2u_u.js} +1 -1
- package/public/assets/{AdminPage-BbgV2794.js → AdminPage-T2N8gkga.js} +1 -1
- package/public/assets/{ApiReferencePage-kSxqlizD.js → ApiReferencePage-BsgCrdnS.js} +1 -1
- package/public/assets/{ArchitecturePage-D4lMpWah.js → ArchitecturePage-HfB8jUUK.js} +1 -1
- package/public/assets/{AuditLogPage-Bpb-eqBx.js → AuditLogPage-C8j1IYdY.js} +1 -1
- package/public/assets/{BindPlatformPage-B4yvlEZB.js → BindPlatformPage-Cpdzj1Tk.js} +1 -1
- package/public/assets/{BotIntegrationPage-BjNySaDS.js → BotIntegrationPage-aKGUVx5x.js} +1 -1
- package/public/assets/{BotManage-CymH4dDp.js → BotManage-DZoCrtbr.js} +1 -1
- package/public/assets/{BotSetupPage-COUQ_fLe.js → BotSetupPage-CytZ4Gx8.js} +1 -1
- package/public/assets/{ChangelogPage-CI_beBIp.js → ChangelogPage-DIrrMqIX.js} +1 -1
- package/public/assets/{CliReferencePage-BmSUdZzk.js → CliReferencePage-f-wWhwLh.js} +1 -1
- package/public/assets/{DeploymentPage-B4b8MWz0.js → DeploymentPage-BsmGTiaf.js} +1 -1
- package/public/assets/{DevWorkflowPage-r0YMu6kh.js → DevWorkflowPage-BTWCu80T.js} +1 -1
- package/public/assets/{DeveloperManage-rknJYHkS.js → DeveloperManage-CiTFC11g.js} +1 -1
- package/public/assets/{DeveloperSetupPage-CUqUgy0E.js → DeveloperSetupPage-BmTBvVsJ.js} +1 -1
- package/public/assets/{DocsIndexPage--RNvPtIx.js → DocsIndexPage-Dlr1y2GY.js} +1 -1
- package/public/assets/{DocsLayout-CSEESXJ9.js → DocsLayout-z2g7mdGc.js} +1 -1
- package/public/assets/{DocsPrimitives-BFkVXaLE.js → DocsPrimitives-9NZm2NLa.js} +1 -1
- package/public/assets/{EditProjectPage-C9fj4Etb.js → EditProjectPage-D28Hz-Fy.js} +1 -1
- package/public/assets/{EmptyState-CQTAQGqQ.js → EmptyState-BYjk5wEi.js} +1 -1
- package/public/assets/{EnvVariablesPage-B55en0xK.js → EnvVariablesPage-DYPddx7m.js} +1 -1
- package/public/assets/{HomePage-BzUb4bsR.js → HomePage-DbnMuUQo.js} +1 -1
- package/public/assets/{InfoRow-BfW9UTcm.js → InfoRow-BqWo-qVC.js} +1 -1
- package/public/assets/{InstallationPage-BUenUQoa.js → InstallationPage-Zx2k7j6q.js} +1 -1
- package/public/assets/{LandingPage-Dg1l9YuB.js → LandingPage-BbIBmqXQ.js} +1 -1
- package/public/assets/{LocalDevelopmentPage-DPxg7dz1.js → LocalDevelopmentPage-04D-pooV.js} +1 -1
- package/public/assets/{LoginPage-BNA6mofp.js → LoginPage-DBvY2-RL.js} +1 -1
- package/public/assets/{MetricBar-BLVxA7cZ.js → MetricBar-BmjoG-Pg.js} +1 -1
- package/public/assets/{NotFoundPage-BPrL-qXb.js → NotFoundPage-BHGsABKV.js} +1 -1
- package/public/assets/{OnboardingGuide-B_C-pot5.js → OnboardingGuide-BBt7b_Ym.js} +1 -1
- package/public/assets/{PermissionsPage-BDRRUvjz.js → PermissionsPage-C8dwmqg7.js} +1 -1
- package/public/assets/{PipelineConfigPage-C83Rso9T.js → PipelineConfigPage-BbWnlaOA.js} +1 -1
- package/public/assets/{PipelineEditorPage-CTENPxyS.js → PipelineEditorPage-B_YcB5Ib.js} +1 -1
- package/public/assets/{ProfilePage-CmiTwPqb.js → ProfilePage-DqdenVXL.js} +1 -1
- package/public/assets/{ProjectDetailPage-Dy12a-yh.js → ProjectDetailPage-Bz6OhmPY.js} +1 -1
- package/public/assets/{ProjectListPage-g_giI9FY.js → ProjectListPage-AnhEn3Th.js} +1 -1
- package/public/assets/{PtyTerminal-B88CDkrt.js → PtyTerminal-DfvlQOcM.js} +1 -1
- package/public/assets/{QuickAuth-CHnyyqfZ.js → QuickAuth-VXgZsdW9.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-Bc7z-_h9.js → RemoveMemberConfirmDialog-CHk0bJXj.js} +1 -1
- package/public/assets/{Select-DB0riRRO.js → Select-BtSNX3NZ.js} +1 -1
- package/public/assets/{SettingsPage-kh7GaEeZ.js → SettingsPage-OH6QNvBA.js} +1 -1
- package/public/assets/{Skeleton-7_I-AGaQ.js → Skeleton-DT_BaIgT.js} +1 -1
- package/public/assets/{SkillPage-C_O2lBKw.js → SkillPage-B6Jnx-8h.js} +1 -1
- package/public/assets/{TaskDetailPage-CZsGWK6C.js → TaskDetailPage-DBeni0k5.js} +1 -1
- package/public/assets/{TaskListPage-BTjkMvm2.js → TaskListPage-p5bJL71v.js} +1 -1
- package/public/assets/{TaskStatusBadge-DSwQXGox.js → TaskStatusBadge-D3eGDm2A.js} +1 -1
- package/public/assets/{TerminalHomePage-BLtX8Dhh.js → TerminalHomePage-DtyStII6.js} +1 -1
- package/public/assets/{TokenManage-BX2Aye0P.js → TokenManage-9AYk-a5X.js} +1 -1
- package/public/assets/{TotpSetupPage-BKtS7CmV.js → TotpSetupPage-B60lPql9.js} +1 -1
- package/public/assets/{WorkerDetailPage-B32pd9kw.js → WorkerDetailPage-Dzqe65ff.js} +1 -1
- package/public/assets/{WorkerListPage-BhZXxIIw.js → WorkerListPage-DztJ3QSS.js} +1 -1
- package/public/assets/{WorkerOperationsPage-C9Dq5sRP.js → WorkerOperationsPage-D61Et5DA.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-D-guQEnF.js → WorkerSetupGuidePage-BJUwY6cD.js} +1 -1
- package/public/assets/{WorkerSetupPage-DkdDxUHR.js → WorkerSetupPage-BlKJ3bPt.js} +1 -1
- package/public/assets/{arrow-left-Mv-Wt2zu.js → arrow-left-Cylo_JbH.js} +1 -1
- package/public/assets/{arrow-right-CkibgOpa.js → arrow-right-BnAOtARm.js} +1 -1
- package/public/assets/{bot-CXD83Yon.js → bot-CJ_Alp6i.js} +1 -1
- package/public/assets/{chevron-right-Be6CHNVx.js → chevron-right-Dp_05_2B.js} +1 -1
- package/public/assets/{copy-DbB00b_A.js → copy-B3IFOgML.js} +1 -1
- package/public/assets/{download-BuvW-Ofk.js → download-B2094gL8.js} +1 -1
- package/public/assets/{external-link-Bk-byFuo.js → external-link-Bpnu3Et-.js} +1 -1
- package/public/assets/{index-CM9HPqn3.js → index-DLd-R-kA.js} +2 -2
- package/public/assets/{index-D7W3xVfx.css → index-Dr3nWRKD.css} +1 -1
- package/public/assets/{key-BeZ_C-3Z.js → key-CfQMxUFW.js} +1 -1
- package/public/assets/{loader-circle-CKlrv2sk.js → loader-circle-B-nMsX-h.js} +1 -1
- package/public/assets/{pencil-lstEK28m.js → pencil-COSUn_9K.js} +1 -1
- package/public/assets/{plus-Dt-mfKPs.js → plus-DPQbm3yK.js} +1 -1
- package/public/assets/{rotate-ccw-DJeCnqOr.js → rotate-ccw-DlYCYD8O.js} +1 -1
- package/public/assets/{scroll-text-FWP3U9KZ.js → scroll-text-0EoAqlvg.js} +1 -1
- package/public/assets/{settings-uvmO-hdT.js → settings-BXm5M0Ua.js} +1 -1
- package/public/assets/{status-colors-D0--eDE-.js → status-colors-CIkz7-Ul.js} +1 -1
- package/public/assets/{task-constants-O7kYmdXG.js → task-constants-kcmzUAaH.js} +1 -1
- package/public/assets/{trash-2-BJWb8bko.js → trash-2-DBsIF0Hq.js} +1 -1
- package/public/assets/{useFetch-dewR_wY1.js → useFetch-CChqlGjw.js} +1 -1
- package/public/assets/{users-BEA0V8ZN.js → users-bX_FIkyc.js} +1 -1
- package/public/assets/{wifi-CP02ZtYJ.js → wifi-D2ciPPDj.js} +1 -1
- package/public/assets/{workflow-G8iZdRyO.js → workflow-C1Jjr1Z2.js} +1 -1
- package/public/index.html +2 -2
- package/public/sw.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LandingPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LandingPage-BbIBmqXQ.js","assets/arrow-right-BnAOtARm.js","assets/bot-CJ_Alp6i.js","assets/workflow-C1Jjr1Z2.js","assets/users-bX_FIkyc.js","assets/copy-B3IFOgML.js","assets/HomePage-DbnMuUQo.js","assets/TaskStatusBadge-D3eGDm2A.js","assets/status-colors-CIkz7-Ul.js","assets/Skeleton-DT_BaIgT.js","assets/OnboardingGuide-BBt7b_Ym.js","assets/chevron-right-Dp_05_2B.js","assets/date-BdNtiQTP.js","assets/string-B39tzdVK.js","assets/useFetch-CChqlGjw.js","assets/TerminalHomePage-DtyStII6.js","assets/task-constants-kcmzUAaH.js","assets/PtyTerminal-DfvlQOcM.js","assets/PtyTerminal-Beg8tuEN.css","assets/Select-BtSNX3NZ.js","assets/plus-DPQbm3yK.js","assets/rotate-ccw-DlYCYD8O.js","assets/wifi-D2ciPPDj.js","assets/TaskListPage-p5bJL71v.js","assets/EmptyState-BYjk5wEi.js","assets/TaskDetailPage-DBeni0k5.js","assets/arrow-left-Cylo_JbH.js","assets/external-link-Bpnu3Et-.js","assets/loader-circle-B-nMsX-h.js","assets/WorkerListPage-DztJ3QSS.js","assets/MetricBar-BmjoG-Pg.js","assets/WorkerSetupGuidePage-BJUwY6cD.js","assets/key-CfQMxUFW.js","assets/download-B2094gL8.js","assets/settings-BXm5M0Ua.js","assets/WorkerDetailPage-Dzqe65ff.js","assets/InfoRow-BqWo-qVC.js","assets/trash-2-DBsIF0Hq.js","assets/ProjectListPage-AnhEn3Th.js","assets/ProjectDetailPage-Bz6OhmPY.js","assets/RemoveMemberConfirmDialog-CHk0bJXj.js","assets/pencil-COSUn_9K.js","assets/EditProjectPage-D28Hz-Fy.js","assets/PipelineEditorPage-B_YcB5Ib.js","assets/ProfilePage-DqdenVXL.js","assets/password-CHk45-jw.js","assets/AccessTokensPage-sK3N2u_u.js","assets/CliReferencePage-f-wWhwLh.js","assets/QuickAuth-VXgZsdW9.js","assets/ApiReferencePage-BsgCrdnS.js","assets/SkillPage-B6Jnx-8h.js","assets/DocsPrimitives-9NZm2NLa.js","assets/DocsLayout-z2g7mdGc.js","assets/InstallationPage-Zx2k7j6q.js","assets/DeveloperSetupPage-BmTBvVsJ.js","assets/WorkerSetupPage-BlKJ3bPt.js","assets/BotSetupPage-CytZ4Gx8.js","assets/LocalDevelopmentPage-04D-pooV.js","assets/DeploymentPage-BsmGTiaf.js","assets/PipelineConfigPage-BbWnlaOA.js","assets/DevWorkflowPage-BTWCu80T.js","assets/ArchitecturePage-HfB8jUUK.js","assets/DocsIndexPage-Dlr1y2GY.js","assets/AdminPage-T2N8gkga.js","assets/scroll-text-0EoAqlvg.js","assets/DeveloperManage-CiTFC11g.js","assets/BotManage-DZoCrtbr.js","assets/TokenManage-9AYk-a5X.js","assets/AuditLogPage-C8j1IYdY.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var $g=Object.defineProperty;var Pm=r=>{throw TypeError(r)};var Wg=(r,u,s)=>u in r?$g(r,u,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[u]=s;var Ve=(r,u,s)=>Wg(r,typeof u!="symbol"?u+"":u,s),gs=(r,u,s)=>u.has(r)||Pm("Cannot "+s);var U=(r,u,s)=>(gs(r,u,"read from private field"),s?s.call(r):u.get(r)),Pt=(r,u,s)=>u.has(r)?Pm("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(r):u.set(r,s),Kt=(r,u,s,o)=>(gs(r,u,"write to private field"),o?o.call(r,s):u.set(r,s),s),ke=(r,u,s)=>(gs(r,u,"access private method"),s);var eh=(r,u,s,o)=>({set _(f){Kt(r,u,f,s)},get _(){return U(r,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 h of f)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&o(p)}).observe(document,{childList:!0,subtree:!0});function s(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(f){if(f.ep)return;f.ep=!0;const h=s(f);fetch(f.href,h)}})();function Fg(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ys={exports:{}},ti={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
@@ -237,4 +237,4 @@ Please change the parent <Route path="${B}"> to <Route path="${B==="/"?"*":`${B}
|
|
|
237
237
|
you will need to set up 2fa again on your next login.`,regenerate_2fa:"regenerate 2FA",regenerating:"regenerating...",access_tokens:"access tokens",access_tokens_desc:"// manage personal access tokens for cli & api",git_info_updated:"git info updated.",failed_to_update_git_info:"failed to update git info.",two_fa_reset:"2fa has been reset. please set up your authenticator again on next login.",failed_to_regenerate_2fa:"failed to regenerate 2fa.",failed_to_load_profile:"failed to load profile.",unable_to_load_profile:"// unable to load profile information",personal_settings:"// personal settings",password_length_10_20:"password must be between 10 and 20 characters.",password_hint_10_20:"// 10-20 characters, letters, numbers, and special characters",current_totp_code:"current TOTP code",totp_code_placeholder:"6-digit code",totp_code_required:"please enter your current 6-digit totp code to regenerate 2fa.",two_fa_regenerated:"2fa regenerated. you will need to set it up again on next login.",totp_code_invalid:"invalid totp code or failed to regenerate 2fa.",platform_accounts:"platform accounts",not_linked:"not linked",bind_hint:'send "bind" to the bot in lark or slack to link your account.'},access_tokens:{title:"access tokens",subtitle:"// personal access tokens",create_token:"create token",no_tokens:"no personal access tokens",create_token_desc:"create a token to authenticate with the cli or api",copy_token_warning:"// copy your token now. you will not be able to see it again.",token_name:"token name",token_name_placeholder:"my-cli-token",expires_in:"expires in",days_30:"30 days",days_90:"90 days",days_365:"365 days",no_expiry:"no expiry",token_created:"token created.",failed_to_create_token:"failed to create token.",token_revoked:"token revoked.",failed_to_revoke_token:"failed to revoke token.",failed_to_load_tokens:"failed to load tokens.",revoke:"revoke",revoke_token:"revoke token",last_used:"last used",expires_at:"expires at",token:"token",created:"created",expires:"expires",revoke_confirm:'are you sure you want to revoke "{name}"? this action cannot be undone.',create_personal_access_token:"// create personal access token",tokens_authenticate_desc:"// tokens authenticate the ov cli and api requests",revoke_token_title:"// revoke token",token_label_required:"token label is required."},admin:{title:"admin",subtitle:"// system control",tab_developers:"developers",tab_bots:"bots",tab_tokens:"worker tokens",tab_audit_logs:"audit logs",tab_settings:"settings",developers_title:"admin / developers",developers_subtitle:"// developer account management",create_developer:"create developer",search_developers:"search developers...",no_matching_developers:"no matching developers",no_developers_found:"no developers found",try_adjusting_search:"try adjusting your search query",username:"username",display_name:"display name",role:"role",status:"status",two_fa_status:"2FA status",dev_name:"dev name",totp:"totp",reset_2fa:"reset 2fa",deactivate:"deactivate",activate:"activate",create_developer_title:"create developer",create_developer_desc:"// add a new developer account",edit_developer_title:"edit developer",edit_developer_desc:"// update developer account settings",developer_created:"developer created.",developer_updated:"developer updated.",failed_to_create_developer:"failed to create developer",failed_to_update_developer:"failed to update developer",confirm_reset_2fa:'reset 2fa for "{name}"? they will need to set up 2fa again on next login.',two_fa_reset:"2fa has been reset.",failed_to_reset_2fa:"failed to reset 2fa",confirm_deactivate:'deactivate "{name}"? they will not be able to log in.',confirm_activate:'activate "{name}"?',developer_deactivated:"developer deactivated.",developer_activated:"developer activated.",failed_to_update_status:"failed to update developer status.",create_first_developer:"create your first developer to get started",all_fields_required:"all fields are required.",password_length_error:"password must be between 10 and 20 characters.",password_complexity_error:"password must contain at least one letter, one digit, and one special character.",password_hint:"// must be 10-20 characters with letters, digits, and special characters.",display_name_required:"display name is required.",demote_self_warning:"you are about to demote yourself from admin. the system must have at least one admin. please verify another admin exists before proceeding.",demote_self_inline_warning:"// warning: you are demoting yourself from admin. ensure at least one other admin exists.",lark_uid:"lark open ID",slack_uid:"slack user ID",platform_accounts:"platform accounts",reset_2fa_confirm_message:"are you sure you want to reset two-factor authentication for",reset_2fa_audit_note:"// the user will be required to set up 2fa again on their next login. this action is recorded in the audit log.",resetting:"resetting...",bots_title:"admin / bots",bots_subtitle:"// bot instance management",create_bot:"create bot",no_bots_configured:"no bots configured",add_bot_desc:"add a bot instance to enable chat integrations with lark or slack",bot_name:"bot name",platform:"platform",app_id:"app ID",lark:"lark",slack:"slack",delete_bot:"delete bot",delete_bot_confirm:'delete bot "{name}"? this cannot be undone.',bot_deleted:"bot deleted.",failed_to_delete_bot:"failed to delete bot.",bot_created:"bot created.",failed_to_create_bot:"failed to create bot",chat_bindings:"chat bindings",chat_bindings_subtitle:"// all integrations",no_chat_bindings:"// no chat bindings configured",chat_id:"chat ID",chat_name:"chat name",project:"project",bot:"bot",edit_bot:"edit bot",name_and_app_id_required:"name and app id are required.",app_secret_required:"app secret is required for new bots.",app_secret:"app secret",app_secret_keep_current:"app secret (leave empty to keep current)",webhook_url_optional:"webhook URL (optional)",lark_feishu:"lark (feishu)",failed_to_update_bot:"failed to update bot",bot_token:"bot token",bot_token_keep_current:"bot token (leave empty to keep current)",bot_token_placeholder:"xoxb-...",bot_token_hint:"// OAuth & Permissions → Bot User OAuth Token",signing_secret:"signing secret",signing_secret_keep_current:"signing secret (leave empty to keep current)",signing_secret_placeholder:"your signing secret",signing_secret_hint:"// Basic Information → App Credentials → Signing Secret",app_secret_hint_lark:"// lark open platform → app credentials → app secret",app_id_hint_slack:"// Basic Information → App ID",app_id_hint_lark:"// lark open platform → app id",webhook_config:"// webhook configuration",webhook_config_hint_slack:"// copy these URLs to your Slack app settings",webhook_config_hint_lark:"// copy this URL to event subscriptions → request url",webhook_events_url:"events url",webhook_interact_url:"interactivity url",webhook_commands_url:"slash commands url",webhook_request_url:"request url",slack_events_hint:"// paste in Event Subscriptions → Request URL",slack_interact_hint:"// paste in Interactivity & Shortcuts → Request URL",slack_commands_hint:"// paste in Slash Commands → Request URL",invalid_bot_token:"// bot token must start with xoxb-",signing_secret_required:"// signing secret is required for Slack bots",no_chat_bindings_for_bot:"// no chat bindings configured for this bot.",add_chat_binding_desc:"// add chat binding",add_binding:"add binding",failed_to_add_binding:"failed to add binding",tokens_title:"admin / worker tokens",tokens_subtitle:"// worker registration token management",generate_token:"generate token",no_worker_tokens:"no worker tokens",generate_token_desc:"generate a token to register a new worker",label:"label",purpose:"purpose",expires_at:"expires at",token_generated:"token generated.",failed_to_generate_token:"failed to generate token.",token_revoked:"token revoked.",failed_to_revoke_token:"failed to revoke token.",revoke_token:"revoke token",revoke_token_confirm:'revoke token "{label}"? this cannot be undone.',show_revoked:"show revoked",hide_revoked:"hide revoked",audit_title:"admin / audit logs",audit_subtitle:"// system activity audit trail",all_actions:"all actions",filter_by_user:"filter by user...",no_audit_entries:"no audit log entries",audit_logs_appear:"audit logs will appear here as actions are performed in the system",timestamp:"timestamp",user_id:"user ID",action:"action",resource:"resource",detail:"detail",ip:"ip",action_login:"login",action_logout:"logout",action_create:"create",action_update:"update",action_delete:"delete",action_revoke:"revoke",action_reset_2fa:"reset 2FA",action_generate_token:"generate token",showing_entries:"showing {count} entries",revoke:"revoke",generate_worker_token_title:"> generate worker token",create_one_time_token:"// create a one-time registration token",label_identifies_worker:"// identifies which worker this token is for",generating:"generating...",generate:"generate",worker_registered:"> worker registered",worker_token_generated:"> worker token generated",run_command_desc:"// run this command on the target machine to register the worker",token_shown_once:"// this token will only be shown once. copy the command before closing.",setup_command:"setup command",waiting_for_worker:"// waiting for worker to register...",token_not_yet_used:"// token not yet used. the worker can still register later using this token.",worker_registered_success:"// worker registered successfully",worker:"worker",copied_wait_for_worker:"copied — wait for worker",close_worker_can_register:"close // worker can still register",view_worker:"view worker",label_required:"label is required.",settings_title:"admin / settings",settings_subtitle:"// global system configuration",save_settings:"save settings",settings_saved:"settings saved",failed_to_save_settings:"failed to save settings",loading_settings:"// loading settings...",scheduling:"> scheduling",heartbeat:"> heartbeat",output:"> output",defaults:"> defaults",max_concurrent_tasks:"max concurrent tasks per worker",max_concurrent_tasks_desc:"// maximum number of tasks a single worker can run simultaneously",task_timeout:"task timeout minutes",task_timeout_desc:"// auto-cancel tasks after this many minutes of inactivity",heartbeat_interval:"heartbeat interval seconds",heartbeat_interval_desc:"// expected interval between worker heartbeats",worker_offline_threshold:"worker offline threshold seconds",worker_offline_threshold_desc:"// mark worker offline after missing heartbeats for this duration",default_agent_type:"default agent type",default_agent_type_desc:"// default agent type for new projects",server_url:"server URL",server_url_desc:"// public server url used in worker setup instructions",chat_binding_title:"// chat bindings — {name}",chat_binding_no_bindings:"// no chat bindings configured for this bot.",chat_binding_add:"// add chat binding",chat_binding_id_placeholder:"platform chat/group id",chat_binding_name_placeholder:"display name for the chat",chat_binding_select_project:"select project...",chat_binding_all_fields_required:"all fields are required.",chat_binding_adding:"adding...",pat_label_required:"label is required.",pat_failed_to_generate:"failed to generate token",pat_label_placeholder:"e.g. build-server-03"},landing:{overlord:"overlord",version_badge:"self-hosted · bring your own subscriptions and machines",hero_line1:"turn your subscriptions / machines into",hero_turn_your:"turn your",hero_into:"into",hero_word_subscriptions:"subscriptions",hero_word_machines:"machines",hero_highlight:"a dev team that never sleeps.",hero_desc:"dispatch coding tasks across your machine fleet. ai agents execute in parallel — you watch, jump in, or come back to finished pull requests.",get_started:"get started",read_docs:"read docs",how_it_works:"how it works",three_steps:"from task description to merged pull request.",step_n:"step {n}",step_define:"connect your fleet",step_define_desc:"register your machines as workers. each one runs ai agents — claude code, cursor, codex — using your existing subscriptions.",step_dispatch:"send a task",step_dispatch_desc:"describe what you want from slack, lark, cli, or the web dashboard. overlord finds the best available machine and starts the ai agent automatically.",step_monitor:"watch or walk away",step_monitor_desc:"live terminal streams agent output to your browser. jump in to guide the agent, or come back later to a finished pull request.",everything_you_need:"everything you need",complete_platform:"self-hosted. your machines, your ai subscriptions, your control.",feature_terminal:"real-time pty terminal",feature_terminal_desc:"stream live agent output directly in the browser. full xterm.js integration with scrollback and search.",feature_multi_agent:"multi-agent support",feature_multi_agent_desc:"first-class support for claude code, cursor, and codex. route tasks to the right agent automatically.",feature_routing:"smart task routing",feature_routing_desc:"intelligent scheduling across your machine fleet. tasks land on the best available worker every time.",feature_pipeline:"pipeline automation",feature_pipeline_desc:"chain tasks into multi-stage pipelines. build, test, and deploy in one continuous flow.",feature_collab:"team collaboration",feature_collab_desc:"project-level permissions, audit logs, and shared dashboards. keep your whole team in sync.",feature_pool:"pool subscriptions, maximize value",feature_pool_desc:"every team member's ai subscription goes into a shared pool — everyone can use any seat. no idle subscriptions, no duplicate costs. the bigger your team, the more you save.",feature_trigger:"trigger from everywhere",feature_trigger_desc:"slack message, lark bot, cli command, or web dashboard — create tasks from whatever tool you already use. phone, laptop, tablet, it all works.",feature_remote:"code from anywhere",feature_remote_desc:"on the bus, at a café, or away from your desk — dispatch tasks from your phone or laptop and your fleet keeps coding. come back to finished pull requests.",feature_security:"secure by design",feature_security_desc:"totp two-factor auth, scoped api tokens, and full audit trail. enterprise-ready from day one.",install_title:"get up and running",install_desc:"three components, three commands. deploy in minutes.",install_command:"npm install -g @overlordai/developer-cli",setup_step_1_title:"deploy the server",setup_step_1_desc:"install overlord and start the central server. it manages all tasks, authentication, and real-time communication.",setup_step_1_command:`npm install -g @overlordai/cli @overlordai/server
|
|
238
238
|
overlord install`,setup_step_1_link:"installation guide",setup_step_2_title:"register workers",setup_step_2_desc:"set up worker machines that execute tasks. each worker runs ai agents in isolated workspaces with full git integration.",setup_step_2_command:`npm install -g @overlordai/cli @overlordai/worker
|
|
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
|
-
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"},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"}};function wb(r,u){const s=u.split(".");let o=r;for(const f of s){if(o==null||typeof o!="object")return u;o=o[f]}return typeof o=="string"?o:u}function Tb(r,u){return u?r.replace(/\{(\w+)\}/g,(s,o)=>u[o]!=null?String(u[o]):`{${o}}`):r}function Br(r,u){return Tb(wb(Eb,r),u)}function Vt(){return{t:g.useCallback((u,s)=>Br(u,s),[])}}function sp(){const{theme:r,setTheme:u}=op(),{t:s}=Vt(),o=r==="dark"||r==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;function f(){u(o?"light":"dark")}return m.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?m.jsx(mb,{size:16}):m.jsx(ob,{size:16})})}class Ns extends Error{constructor(s,o,f){const h=s.status||s.status===0?s.status:"",p=s.statusText??"",b=`${h} ${p}`.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 cp 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 cp(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 r=!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 r=!0,"half"}}).headers.has("Content-Type")}catch(f){if(f instanceof Error&&f.message==="unsupported BodyInit type")return!1;throw f}return r&&!u})(),jb=typeof globalThis.AbortController=="function",fp=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",Rb=typeof globalThis.ReadableStream=="function",Ab=typeof globalThis.FormData=="function",dp=["get","post","put","patch","head","delete"],zb={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},As=2147483647,Cb=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,mp=Symbol("stop");class hp{constructor(u){Ve(this,"options");this.options=u}}const Ob=r=>new hp(r),Db={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},Nb={next:!0},Mb={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},Ub=r=>{if(!r)return 0;if(r instanceof FormData){let u=0;for(const[s,o]of r)u+=Cb,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(r instanceof Blob)return r.size;if(r instanceof ArrayBuffer)return r.byteLength;if(typeof r=="string")return new TextEncoder().encode(r).length;if(r instanceof URLSearchParams)return new TextEncoder().encode(r.toString()).length;if("byteLength"in r)return r.byteLength;if(typeof r=="object"&&r!==null)try{const u=JSON.stringify(r);return new TextEncoder().encode(u).length}catch{return 0}return 0},pp=(r,u,s)=>{let o,f=0;return r.pipeThrough(new TransformStream({transform(h,p){if(p.enqueue(h),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=h},flush(){o&&(f+=o.byteLength,s==null||s({percent:1,totalBytes:Math.max(u,f),transferredBytes:f},o))}}))},qb=(r,u)=>{if(!r.body)return r;if(r.status===204)return new Response(null,{status:r.status,statusText:r.statusText,headers:r.headers});const s=Math.max(0,Number(r.headers.get("content-length"))||0);return new Response(pp(r.body,s,u),{status:r.status,statusText:r.statusText,headers:r.headers})},Lb=(r,u,s)=>{if(!r.body)return r;const o=Ub(s??r.body);return new Request(r,{duplex:"half",body:pp(r.body,o,u)})},yn=r=>r!==null&&typeof r=="object",Dr=(...r)=>{for(const u of r)if((!yn(u)||Array.isArray(u))&&u!==void 0)throw new TypeError("The `options` argument must be an object");return Ws({},...r)},_p=(r={},u={})=>{const s=new globalThis.Headers(r),o=u instanceof globalThis.Headers,f=new globalThis.Headers(u);for(const[h,p]of f.entries())o&&p==="undefined"||p===void 0?s.delete(h):s.set(h,p);return s};function Nr(r,u,s){return Object.hasOwn(u,s)&&u[s]===void 0?[]:Ws(r[s]??[],u[s]??[])}const gp=(r={},u={})=>({beforeRequest:Nr(r,u,"beforeRequest"),beforeRetry:Nr(r,u,"beforeRetry"),afterResponse:Nr(r,u,"afterResponse"),beforeError:Nr(r,u,"beforeError")}),Hb=(r,u)=>{const s=new URLSearchParams;for(const o of[r,u])if(o!==void 0)if(o instanceof URLSearchParams)for(const[f,h]of o.entries())s.append(f,h);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,h]of Object.entries(o))h!==void 0&&s.append(f,String(h));else{const f=new URLSearchParams(o);for(const[h,p]of f.entries())s.append(h,p)}return s},Ws=(...r)=>{let u={},s={},o={},f;const h=[];for(const p of r)if(Array.isArray(p))Array.isArray(u)||(u=[]),u=[...u,...p];else if(yn(p)){for(let[b,y]of Object.entries(p)){if(b==="signal"&&y instanceof globalThis.AbortSignal){h.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:Hb(f,y);continue}yn(y)&&b in u&&(y=Ws(u[b],y)),u={...u,[b]:y}}yn(p.hooks)&&(o=gp(o,p.hooks),u.hooks=o),yn(p.headers)&&(s=_p(s,p.headers),u.headers=s)}return f!==void 0&&(u.searchParams=f),h.length>0&&(h.length===1?u.signal=h[0]:fp?u.signal=AbortSignal.any(h):u.signal=h.at(-1)),u},Bb=r=>dp.includes(r)?r.toUpperCase():r,Yb=["get","put","head","delete","options","trace"],Gb=[408,413,429,500,502,503,504],Vb=[413,429,503],kh={limit:2,methods:Yb,statusCodes:Gb,afterStatusCodes:Vb,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:r=>.3*2**(r-1)*1e3,jitter:void 0,retryOnTimeout:!1},Xb=(r={})=>{if(typeof r=="number")return{...kh,limit:r};if(r.methods&&!Array.isArray(r.methods))throw new Error("retry.methods must be an array");if(r.methods&&(r.methods=r.methods.map(s=>s.toLowerCase())),r.statusCodes&&!Array.isArray(r.statusCodes))throw new Error("retry.statusCodes must be an array");const u=Object.fromEntries(Object.entries(r).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 Qb(r,u,s,o){return new Promise((f,h)=>{const p=setTimeout(()=>{s&&s.abort(),h(new Ms(r))},o.timeout);o.fetch(r,u).then(f).catch(h).then(()=>{clearTimeout(p)})})}async function Zb(r,{signal:u}){return new Promise((s,o)=>{u&&(u.throwIfAborted(),u.addEventListener("abort",f,{once:!0}));function f(){clearTimeout(h),o(u.reason)}const h=setTimeout(()=>{u==null||u.removeEventListener("abort",f),s()},r)})}const Kb=(r,u)=>{const s={};for(const o in u)Object.hasOwn(u,o)&&!(o in Mb)&&!(o in Db)&&(!(o in r)||o in Nb)&&(s[o]=u[o]);return s},Jb=r=>r===void 0?!1:Array.isArray(r)?r.length>0:r instanceof URLSearchParams?r.size>0:typeof r=="object"?Object.keys(r).length>0:typeof r=="string"?r.trim().length>0:!!r;function $b(r){return r instanceof Ns||(r==null?void 0:r.name)===Ns.name}function Wb(r){return r instanceof Ms||(r==null?void 0:r.name)===Ms.name}var Kr,yp,Jt,Bt,rt,Q,$a,ea,vn,ue,Yr,vp,Us,Gr,Ja,qs,bp,ii,Vr,Ls;const ri=class ri{constructor(u,s={}){Pt(this,ue);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,h,p;if(Kt(this,rt,u),Kt(this,Q,{...s,headers:_p(U(this,rt).headers,s.headers),hooks:gp({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},s.hooks),method:Bb(s.method??U(this,rt).method??"GET"),prefixUrl:String(s.prefixUrl||""),retry:Xb(s.retry),throwHttpErrors:s.throwHttpErrors??!0,timeout:s.timeout??1e4,fetch:s.fetch??globalThis.fetch.bind(globalThis),context:s.context??{}}),typeof U(this,rt)!="string"&&!(U(this,rt)instanceof URL||U(this,rt)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(U(this,Q).prefixUrl&&typeof U(this,rt)=="string"){if(U(this,rt).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");U(this,Q).prefixUrl.endsWith("/")||(U(this,Q).prefixUrl+="/"),Kt(this,rt,U(this,Q).prefixUrl+U(this,rt))}jb&&fp&&(Kt(this,ea,U(this,Q).signal??U(this,rt).signal),Kt(this,Jt,new globalThis.AbortController),U(this,Q).signal=U(this,ea)?AbortSignal.any([U(this,ea),U(this,Jt).signal]):U(this,Jt).signal),Sh&&(U(this,Q).duplex="half"),U(this,Q).json!==void 0&&(U(this,Q).body=((h=(f=U(this,Q)).stringifyJson)==null?void 0:h.call(f,U(this,Q).json))??JSON.stringify(U(this,Q).json),U(this,Q).headers.set("content-type",U(this,Q).headers.get("content-type")??"application/json"));const o=s.headers&&new globalThis.Headers(s.headers).has("content-type");if(U(this,rt)instanceof globalThis.Request&&(Ab&&U(this,Q).body instanceof globalThis.FormData||U(this,Q).body instanceof URLSearchParams)&&!o&&U(this,Q).headers.delete("content-type"),this.request=new globalThis.Request(U(this,rt),U(this,Q)),Jb(U(this,Q).searchParams)){const y="?"+(typeof U(this,Q).searchParams=="string"?U(this,Q).searchParams.replace(/^\?/,""):new URLSearchParams(ke(p=ri,Kr,yp).call(p,U(this,Q).searchParams)).toString()),_=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,y);this.request=new globalThis.Request(_,U(this,Q))}if(U(this,Q).onUploadProgress){if(typeof U(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,ue,Ls).call(this,this.request,U(this,Q).body??void 0)}}static create(u,s){var p,b,y;const o=new ri(u,s),f=async()=>{var w,k,M,Y,H,q,L,B,G,J,se,ce;if(typeof U(o,Q).timeout=="number"&&U(o,Q).timeout>As)throw new RangeError(`The \`timeout\` option cannot be greater than ${As}`);await Promise.resolve();let _=await ke(w=o,ue,bp).call(w);for(const _e of U(o,Q).hooks.afterResponse){const F=ke(k=o,ue,Us).call(k,_.clone());let W;try{W=await _e(o.request,ke(M=o,ue,ii).call(M),F,{retryCount:U(o,Bt)})}catch(Pe){throw ke(Y=o,ue,Ja).call(Y,F),ke(H=o,ue,Ja).call(H,_),Pe}if(W instanceof hp)throw ke(q=o,ue,Ja).call(q,F),ke(L=o,ue,Ja).call(L,_),new Rs(W.options);const oe=W instanceof globalThis.Response?W:_;F!==oe&&ke(B=o,ue,Ja).call(B,F),_!==oe&&ke(G=o,ue,Ja).call(G,_),_=oe}if(ke(J=o,ue,Us).call(J,_),!_.ok&&(typeof U(o,Q).throwHttpErrors=="function"?U(o,Q).throwHttpErrors(_.status):U(o,Q).throwHttpErrors)){let _e=new Ns(_,o.request,ke(se=o,ue,ii).call(se));for(const F of U(o,Q).hooks.beforeError)_e=await F(_e,{retryCount:U(o,Bt)});throw _e}if(U(o,Q).onDownloadProgress){if(typeof U(o,Q).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Rb)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const _e=_.clone();return ke(ce=o,ue,Ja).call(ce,_),qb(_e,U(o,Q).onDownloadProgress)}return _},h=ke(p=o,ue,qs).call(p,f).finally(()=>{var w,k;const _=U(o,$a);ke(w=o,ue,Gr).call(w,(_==null?void 0:_.body)??void 0),ke(k=o,ue,Gr).call(k,o.request.body??void 0)});for(const[_,w]of Object.entries(zb))_==="bytes"&&typeof((y=(b=globalThis.Response)==null?void 0:b.prototype)==null?void 0:y.bytes)!="function"||(h[_]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||w);const k=await h;if(_==="json"){if(k.status===204)return"";const M=await k.text();return M===""?"":s.parseJson?s.parseJson(M):JSON.parse(M)}return k[_]()});return h}};Kr=new WeakSet,yp=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,ue=new WeakSet,Yr=function(){const u=U(this,Q).retry.delay(U(this,Bt));let s=u;U(this,Q).retry.jitter===!0?s=Math.random()*u:typeof U(this,Q).retry.jitter=="function"&&(s=U(this,Q).retry.jitter(u),(!Number.isFinite(s)||s<0)&&(s=u));const o=U(this,Q).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(o,s)},vp=async function(u){if(eh(this,Bt)._++,U(this,Bt)>U(this,Q).retry.limit)throw u;const s=u instanceof Error?u:new cp(u);if(s instanceof Rs)return s.customDelay??ke(this,ue,Yr).call(this);if(!U(this,Q).retry.methods.includes(this.request.method.toLowerCase()))throw u;if(U(this,Q).retry.shouldRetry!==void 0){const o=await U(this,Q).retry.shouldRetry({error:s,retryCount:U(this,Bt)});if(o===!1)throw u;if(o===!0)return ke(this,ue,Yr).call(this)}if(Wb(u)&&!U(this,Q).retry.retryOnTimeout)throw u;if($b(u)){if(!U(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&&U(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 h=U(this,Q).retry.maxRetryAfter??f;return f<h?f:h}if(u.response.status===413)throw u}return ke(this,ue,Yr).call(this)},Us=function(u){return U(this,Q).parseJson&&(u.json=async()=>U(this,Q).parseJson(await u.text())),u},Gr=function(u){u&&u.cancel().catch(()=>{})},Ja=function(u){ke(this,ue,Gr).call(this,u.body??void 0)},qs=async function(u){try{return await u()}catch(s){const o=Math.min(await ke(this,ue,vp).call(this,s),As);if(U(this,Bt)<1)throw s;if(await Zb(o,U(this,ea)?{signal:U(this,ea)}:{}),s instanceof Rs&&s.customRequest){const f=U(this,Q).signal?new globalThis.Request(s.customRequest,{signal:U(this,Q).signal}):new globalThis.Request(s.customRequest);ke(this,ue,Vr).call(this,f)}for(const f of U(this,Q).hooks.beforeRetry){const h=await f({request:this.request,options:ke(this,ue,ii).call(this),error:s,retryCount:U(this,Bt)});if(h instanceof globalThis.Request){ke(this,ue,Vr).call(this,h);break}if(h instanceof globalThis.Response)return h;if(h===mp)return}return ke(this,ue,qs).call(this,u)}},bp=async function(){var s;(s=U(this,Jt))!=null&&s.signal.aborted&&(Kt(this,Jt,new globalThis.AbortController),U(this,Q).signal=U(this,ea)?AbortSignal.any([U(this,ea),U(this,Jt).signal]):U(this,Jt).signal,this.request=new globalThis.Request(this.request,{signal:U(this,Q).signal}));for(const o of U(this,Q).hooks.beforeRequest){const f=await o(this.request,ke(this,ue,ii).call(this),{retryCount:U(this,Bt)});if(f instanceof Response)return f;if(f instanceof globalThis.Request){ke(this,ue,Vr).call(this,f);break}}const u=Kb(this.request,U(this,Q));return Kt(this,$a,this.request),this.request=U(this,$a).clone(),U(this,Q).timeout===!1?U(this,Q).fetch(U(this,$a),u):Qb(U(this,$a),u,U(this,Jt),U(this,Q))},ii=function(){if(!U(this,vn)){const{hooks:u,...s}=U(this,Q);Kt(this,vn,Object.freeze(s))}return U(this,vn)},Vr=function(u){Kt(this,vn,void 0),this.request=ke(this,ue,Ls).call(this,u)},Ls=function(u,s){return!U(this,Q).onUploadProgress||!u.body?u:Lb(u,U(this,Q).onUploadProgress,s??U(this,Q).body??void 0)},Pt(ri,Kr);let Zr=ri;/*! MIT License © Sindre Sorhus */const Hs=r=>{const u=(s,o)=>Zr.create(s,Dr(r,o));for(const s of dp)u[s]=(o,f)=>Zr.create(o,Dr(r,f,{method:s}));return u.create=s=>Hs(Dr(s)),u.extend=s=>(typeof s=="function"&&(s=s(r??{})),Hs(Dr(r,s))),u.stop=mp,u.retry=Ob,u},Eh=Hs();let Mr=null;const Xr=Eh.create({prefixUrl:"/api",timeout:3e4,hooks:{beforeRequest:[r=>{const u=xa.getState().accessToken;u&&r.headers.set("Authorization",`Bearer ${u}`)}],afterResponse:[async(r,u,s)=>{if(s.status===401&&!r.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&&r.headers.set("Authorization",`Bearer ${o}`),r.headers.set("X-Retry-After-Refresh","1"),Eh(r,u)}}]}}),Fb=3e4;function Ib(r){if(r.link)return r.link;const u=(r.title+" "+r.body).match(/task\s*#?(\d+)/i);if(u)return`/tasks/${u[1]}`;const s=(r.title+" "+r.body).match(/worker\s+(\S+)/i);return s?`/workers/${s[1]}`:null}function xp(){const r=Fa(),[u,s]=g.useState([]),[o,f]=g.useState(0),[h,p]=g.useState(!1),[b,y]=g.useState(!1),_=g.useRef(null),{t:w}=Vt(),k=g.useRef(async()=>{try{y(!0);const q=(await Xr.get("web/notifications",{searchParams:{limit:"20"}}).json()).data,L=q.filter(B=>!B.isRead).length;s(B=>B.length===q.length&&B.every((G,J)=>G.id===q[J].id&&G.isRead===q[J].isRead)?B:q),f(B=>B===L?B:L)}catch{}finally{y(!1)}});g.useEffect(()=>{k.current();const H=setInterval(()=>k.current(),Fb);return()=>clearInterval(H)},[]),g.useEffect(()=>{function H(q){_.current&&!_.current.contains(q.target)&&p(!1)}return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[]);async function M(H){try{await Xr.post(`web/notifications/${H}/read`),s(q=>q.map(L=>L.id===H?{...L,isRead:!0}:L)),f(q=>Math.max(0,q-1))}catch{}}async function Y(){try{await Xr.post("web/notifications/read-all"),s(H=>H.map(q=>({...q,isRead:!0}))),f(0)}catch{}}return m.jsxs("div",{className:"relative",ref:_,children:[m.jsxs("button",{type:"button",onClick:()=>p(H=>!H),"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:[m.jsx(Zv,{size:16}),o>0&&m.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})]}),h&&m.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:[m.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[m.jsx("span",{className:"text-sm font-semibold",children:w("common.notifications")}),o>0&&m.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:[m.jsx(Kv,{className:"h-3.5 w-3.5"}),w("common.mark_all_read")]})]}),m.jsx("div",{className:"max-h-80 overflow-y-auto",children:b&&u.length===0?m.jsx("div",{className:"flex justify-center py-8",children:m.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):u.length===0?m.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[m.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),m.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:w("common.no_notifications")})]}):u.map(H=>{const q=Ib(H);return m.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 transition-colors ${q?"cursor-pointer hover:bg-[var(--bg-input)]":""} ${H.isRead?"opacity-60":"bg-[var(--accent)]/5"}`,onClick:()=>{q&&(H.isRead||M(H.id),p(!1),r(q))},children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:"text-sm font-medium",children:H.title}),m.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:H.body}),m.jsx("p",{className:"mt-1 text-xs text-[var(--text-secondary)] opacity-60",children:new Date(H.createdAt).toLocaleString()})]}),!H.isRead&&m.jsx("button",{type:"button",onClick:L=>{L.stopPropagation(),M(H.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:m.jsx(Jv,{className:"h-3.5 w-3.5"})})]},H.id)})})]})]})}function Pb(r){return{tasks:r.tasks.map(u=>({type:"task",id:u.id,title:`#${u.id} ${u.description}`,subtitle:`${u.status} · ${u.project_key}`})),workers:(r.workers??[]).map(u=>({type:"worker",id:u.id,title:u.name,subtitle:`${u.hostname} · ${u.status}`})),projects:r.projects.map(u=>({type:"project",id:u.key,title:u.name,subtitle:u.repository}))}}const e0=300,wh={tasks:db,workers:ap,projects:eb},t0={tasks:"tasks",workers:"workers",projects:"projects"};function Sp({renderTrigger:r}={}){const[u,s]=g.useState(""),[o,f]=g.useState({tasks:[],workers:[],projects:[]}),[h,p]=g.useState(!1),[b,y]=g.useState(!1),[_,w]=g.useState(0),k=g.useRef(null),M=g.useRef(null),Y=g.useRef(void 0),H=g.useRef(void 0),q=Fa(),{t:L}=Vt(),B=g.useMemo(()=>[...o.tasks,...o.workers,...o.projects],[o]),G=g.useCallback(async W=>{var Pe;if(!W.trim()){f({tasks:[],workers:[],projects:[]});return}(Pe=H.current)==null||Pe.abort();const oe=new AbortController;H.current=oe;try{p(!0);const Je=await Xr.get("web/search",{searchParams:{q:W},signal:oe.signal}).json();f(Pb(Je)),w(0)}catch(Je){if(Je instanceof DOMException&&Je.name==="AbortError")return}finally{oe.signal.aborted||p(!1)}},[]);g.useEffect(()=>(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>G(u),e0),()=>{Y.current&&clearTimeout(Y.current)}),[u,G]),g.useEffect(()=>{function W(oe){oe.key==="/"&&!b&&!(oe.target instanceof HTMLInputElement||oe.target instanceof HTMLTextAreaElement)&&(oe.preventDefault(),y(!0)),oe.key==="Escape"&&b&&(oe.preventDefault(),J())}return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[b]),g.useEffect(()=>{b&&setTimeout(()=>{var W;return(W=M.current)==null?void 0:W.focus()},50)},[b]);function J(){y(!1),s(""),f({tasks:[],workers:[],projects:[]}),w(0)}function se(W){switch(J(),W.type){case"task":q(`/tasks/${W.id}`);break;case"worker":q(`/workers/${W.id}`);break;case"project":q(`/projects/${W.id}`);break}}function ce(W){W.key==="ArrowDown"?(W.preventDefault(),w(oe=>Math.min(oe+1,B.length-1))):W.key==="ArrowUp"?(W.preventDefault(),w(oe=>Math.max(oe-1,0))):W.key==="Enter"&&B[_]&&(W.preventDefault(),se(B[_]))}const _e=B.length>0;let F=0;return m.jsxs(m.Fragment,{children:[r?r(()=>y(!0)):m.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:[m.jsx(tp,{className:"h-3.5 w-3.5"}),m.jsx("span",{children:L("common.search_placeholder")}),m.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&&m.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&&J()},children:m.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:[m.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-4 py-3",children:[m.jsx("span",{className:"text-sm text-[var(--accent)]",children:"/"}),m.jsx("input",{ref:M,type:"text",placeholder:L("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"}),h&&m.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})]}),m.jsx("div",{className:"max-h-[50vh] overflow-y-auto sm:max-h-[60vh] md:max-h-[400px]",children:u.trim()&&!_e&&!h?m.jsx("div",{className:"py-10 text-center text-xs text-[var(--text-muted)]",children:L("common.no_search_results",{query:u})}):Object.keys(wh).map(W=>{const oe=o[W];if(oe.length===0)return null;const Pe=wh[W],Je=F;return F+=oe.length,m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-[var(--text-muted)]",children:[m.jsx(Pe,{className:"h-3 w-3"}),m.jsx("span",{className:"text-[11px] lowercase tracking-wider",children:t0[W]})]}),oe.map((qe,At)=>{const ut=Je+At,Ne=ut===_;return m.jsxs("button",{type:"button",className:`flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors ${Ne?"bg-[var(--accent)]/10 text-[var(--accent)]":"hover:bg-[var(--bg-input)]"}`,onClick:()=>se(qe),onMouseEnter:()=>w(ut),children:[m.jsx("span",{className:`text-xs ${Ne?"text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:Ne?">":" "}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:"truncate text-sm",children:qe.title}),qe.subtitle&&m.jsx("p",{className:"truncate text-xs text-[var(--text-muted)]",children:qe.subtitle})]})]},`${qe.type}-${qe.id}`)})]},W)})}),m.jsxs("div",{className:"hidden items-center gap-4 border-t border-[var(--border)] px-4 py-2 md:flex",children:[m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↑↓"})," ",L("common.navigate_hint")]}),m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↵"})," ",L("common.select_hint")]}),m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"esc"})," ",L("common.close_hint")]})]})]})})]})}const a0={danger:"var(--destructive)",warning:"var(--warning)",accent:"var(--accent)"},Th="confirm-dialog-title";function jh(r){return Array.from(r.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function n0({isOpen:r,onClose:u,onConfirm:s,title:o,message:f,confirmVariant:h="danger",isLoading:p,...b}){const{t:y}=Vt(),_=b.confirmLabel??y("common.confirm"),w=b.cancelLabel??y("common.cancel"),k=g.useRef(null),M=g.useRef(null),Y=a0[h];g.useEffect(()=>{if(!r)return;M.current=document.activeElement;const q=requestAnimationFrame(()=>{if(k.current){const L=jh(k.current);L.length>0&&L[0].focus()}});return()=>{var L;cancelAnimationFrame(q),(L=M.current)==null||L.focus()}},[r]);const H=g.useCallback(q=>{if(q.key==="Tab"&&k.current){const L=jh(k.current);if(L.length===0)return;const B=L[0],G=L[L.length-1];q.shiftKey?document.activeElement===B&&(q.preventDefault(),G.focus()):document.activeElement===G&&(q.preventDefault(),B.focus())}},[]);return r?m.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:m.jsxs("div",{ref:k,role:"dialog","aria-modal":"true","aria-labelledby":Th,onClick:q=>q.stopPropagation(),onKeyDown:H,style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem"},children:[m.jsx("div",{style:{marginBottom:"1.25rem"},children:m.jsxs("div",{id:Th,style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:[m.jsx(np,{style:{width:"1rem",height:"1rem"}}),o]})}),m.jsx("div",{style:{marginBottom:"1.25rem"},children:m.jsx("p",{style:{color:"var(--text-muted)",fontSize:"0.75rem",lineHeight:"1.5"},children:f})}),m.jsxs("div",{style:{display:"flex",gap:"0.75rem"},children:[m.jsx("button",{type:"button",onClick:u,disabled:p,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:p?"not-allowed":"pointer",opacity:p?.7:1,transition:"color 0.15s, border-color 0.15s"},children:w}),m.jsx("button",{type:"button",onClick:s,disabled:p,style:{flex:1,padding:"0.5rem",backgroundColor:Y,color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,cursor:p?"not-allowed":"pointer",opacity:p?.7:1},children:p?y("common.processing"):_})]})]})}):null}const Rh="overlord-pwa-install-dismissed";function l0(){const r=navigator.userAgent;return/iP(hone|od|ad)/.test(r)&&/WebKit/.test(r)&&!/(CriOS|FxiOS|OPiOS|mercury)/.test(r)}function i0(){return navigator.standalone===!0||window.matchMedia("(display-mode: standalone)").matches}function r0(){const{t:r}=Vt(),[u,s]=g.useState("hidden"),[o,f]=g.useState(!1),h=g.useRef(null),p=g.useRef(void 0);g.useEffect(()=>{if(i0()||localStorage.getItem(Rh)||window.innerWidth>=768)return;const _=k=>{k.preventDefault(),h.current=k};window.addEventListener("beforeinstallprompt",_);const w=setTimeout(()=>s("visible"),1e3);return()=>{window.removeEventListener("beforeinstallprompt",_),clearTimeout(w),clearTimeout(p.current)}},[]);function b(){localStorage.setItem(Rh,"1"),s("dismissing"),p.current=setTimeout(()=>s("hidden"),200)}async function y(){if(h.current){await h.current.prompt();const{outcome:_}=await h.current.userChoice;_==="accepted"&&b(),h.current=null}else l0()&&f(!0)}return u==="hidden"?null:m.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":r("pwa_install.title"),children:m.jsxs("div",{className:"overflow-hidden rounded-[4px] border border-[var(--accent)]/40 bg-[#0C0C0C] shadow-[0_8px_32px_rgba(0,0,0,0.4)]",children:[m.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:[m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}),m.jsx("span",{className:"text-[9px] font-medium text-[var(--accent)]",children:r("pwa_install.title")})]}),m.jsx("button",{onClick:b,className:"p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:m.jsx(lp,{size:14})})]}),m.jsx("div",{className:"px-3.5 py-3",children:o?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[m.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",r("pwa_install.ios_command")]}),m.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:[r("pwa_install.ios_step_1"),r("pwa_install.ios_step_2"),r("pwa_install.ios_step_3")].map((_,w)=>m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] bg-[var(--accent)]/[0.08]",children:m.jsx("span",{className:"text-xs font-semibold text-[var(--accent)]",children:w+1})}),m.jsxs("span",{className:"text-[10px] leading-snug text-[var(--text-secondary)]",children:[w===0&&m.jsx(sb,{size:12,className:"mr-1 inline-block align-text-bottom text-[var(--text-muted)]"}),_]})]},w))})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[m.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",r("pwa_install.command")]}),m.jsxs("div",{className:"mt-1.5 text-[10px] leading-relaxed text-[var(--text-secondary)]",children:["→ ",r("pwa_install.desc_1"),m.jsx("br",{}),"→ ",r("pwa_install.desc_2")]}),m.jsxs("div",{className:"mt-2.5 flex gap-2",children:[m.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:r("pwa_install.install")}),m.jsx("button",{onClick:b,className:"rounded-[4px] border border-[#333] px-3 py-1.5 text-[10px] text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:r("pwa_install.skip")})]})]})})]})})}function u0(){const{t:r}=Vt(),[u,s]=g.useState(!1);return g.useEffect(()=>{if(!("serviceWorker"in navigator))return;function o(){s(!0)}return navigator.serviceWorker.addEventListener("controllerchange",o),navigator.serviceWorker.getRegistration().then(f=>{if(f){if(f.waiting){s(!0);return}f.addEventListener("updatefound",()=>{const h=f.installing;h&&h.addEventListener("statechange",()=>{h.state==="installed"&&navigator.serviceWorker.controller&&s(!0)})})}}),()=>{navigator.serviceWorker.removeEventListener("controllerchange",o)}},[]),u?m.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:m.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] border border-[var(--accent)]/40 bg-[#0C0C0C] px-3.5 py-3 shadow-[0_8px_32px_rgba(0,0,0,0.4)]",children:[m.jsx(ep,{size:14,className:"shrink-0 text-[var(--accent)]"}),m.jsx("span",{className:"flex-1 text-[10px] text-[var(--text-secondary)]",children:r("pwa_update.message")}),m.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:r("pwa_update.reload")})]})}):null}const Ur=64,o0=96,Ah=32;function s0({children:r,className:u}){const s=g.useRef(null),o=g.useRef(0),f=g.useRef(0),h=g.useRef("idle"),[p,b]=g.useState(0),[y,_]=g.useState("idle"),w=g.useCallback(G=>{h.current=G,_(G)},[]),k=g.useCallback(()=>{const G=s.current;return G?G.scrollTop<=0:!0},[]),M=g.useCallback(G=>{k()&&(o.current=G.touches[0].clientY,f.current=G.touches[0].clientY)},[k]),Y=g.useCallback(G=>{if(h.current==="refreshing"||o.current===0)return;const J=G.touches[0].clientY,se=J-o.current;if(se<=0){h.current!=="idle"&&(b(0),w("idle"));return}if(!k())return;G.preventDefault();const ce=Math.min(se*.5,o0);f.current=J,b(ce),w(ce>=Ur?"ready":"pulling")},[k,w]),H=g.useCallback(()=>{h.current!=="refreshing"&&(h.current==="ready"?(w("refreshing"),b(Ur),setTimeout(()=>{window.location.reload()},300)):(b(0),w("idle")),o.current=0)},[w]);g.useEffect(()=>{const G=s.current;if(G)return G.addEventListener("touchstart",M,{passive:!0}),G.addEventListener("touchmove",Y,{passive:!1}),G.addEventListener("touchend",H,{passive:!0}),()=>{G.removeEventListener("touchstart",M),G.removeEventListener("touchmove",Y),G.removeEventListener("touchend",H)}},[M,Y,H]);const q=Math.min(p/Ur,1),L=y==="refreshing"?0:p/Ur*180,B=p>0||y==="refreshing";return m.jsxs("div",{ref:s,className:u,style:{overscrollBehaviorY:"contain"},children:[B&&m.jsx("div",{className:"pointer-events-none flex items-center justify-center md:hidden",style:{height:p,transition:y==="idle"?"height 200ms ease-out":void 0},children:m.jsx("div",{className:"flex items-center justify-center rounded-full bg-[var(--bg-card)] border border-[var(--border)]",style:{width:Ah,height:Ah,opacity:q,transition:y==="idle"?"opacity 200ms ease-out":void 0},children:y==="refreshing"?m.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",className:"animate-spin",style:{color:"var(--accent)"},children:[m.jsx("circle",{cx:"8",cy:"8",r:"6",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),m.jsx("path",{d:"M8 2a6 6 0 0 1 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):m.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",style:{color:y==="ready"?"var(--accent)":"var(--text-muted)",transform:`rotate(${L}deg)`,transition:"color 150ms"},children:m.jsx("path",{d:"M8 3v8M5 8l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),r]})}const kp=g.createContext({setActions:()=>{}});function D1(r){const{setActions:u}=g.useContext(kp);g.useEffect(()=>(u(r),()=>u(null)),[r,u])}const Ep=g.createContext({setSubtitle:()=>{}});function N1(r){const{setSubtitle:u}=g.useContext(Ep);g.useEffect(()=>(u(r),()=>u(null)),[r,u])}const c0=[{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:tb},{to:"/access-tokens",label:"tokens",icon:nb}],f0=[{to:"/docs/cli",label:"cli",icon:$s},{to:"/docs/api",label:"api",icon:Pv},{to:"/docs/bot",label:"bot",icon:ub},{to:"/docs/skill",label:"skill",icon:fb},{to:"/docs/all",label:"all",icon:lb}],d0=[{to:"/admin",label:"admin",icon:cb}],m0=[{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 h0(r){const{t:u}=Vt();if(qr[r]){const o=qr[r];return{title:u(o.title),subtitle:u(o.subtitle)}}const s="/"+r.split("/").filter(Boolean)[0];if(qr[s]){const o=qr[s],f=r.split("/").filter(Boolean).slice(1).join(" / ");return{title:u(o.title),subtitle:f||u(o.subtitle)}}return{title:r.slice(1).replace(/\//g," // ")||"home"}}function p0(r,u){return r==="/home"?u==="/home":r==="/dashboard"?u==="/dashboard":u.startsWith(r)}function _0(){const[r,u]=g.useState("");return g.useEffect(()=>{const s=document.createElement("div");s.style.height="env(safe-area-inset-bottom, -1px)",document.body.appendChild(s);const o=getComputedStyle(s).height;document.body.removeChild(s),window.matchMedia("(display-mode: standalone)").matches;const f=document.querySelector(".mobile-bottom-nav"),h=f?f.offsetHeight:"?",p=f?getComputedStyle(f).paddingBottom:"?",b=document.querySelector(".fixed.inset-0"),y=b?b.offsetHeight:"?",_=b?getComputedStyle(b).bottom:"?";u(`env=${o} navH=${h} navPB=${p} fixedH=${y} fixedBottom=${_} vh=${window.innerHeight}`)},[]),r?m.jsx("div",{className:"fixed top-16 left-2 right-2 z-50 rounded-[4px] bg-red-600 px-3 py-2 text-[9px] text-white font-mono md:hidden",children:r}):null}function g0(){const r=gt(),{t:u}=Vt(),s={terminal:u("terminal_home.title"),dashboard:u("dashboard.title"),tasks:u("tasks.title"),workers:u("workers.title")};return m.jsxs("nav",{className:"mobile-bottom-nav flex items-center justify-around border-t border-[var(--border)] bg-[var(--bg-card)] md:hidden",children:[m0.map(({to:o,label:f,icon:h})=>{const p=p0(o,r.pathname);return m.jsxs(Js,{to:o,className:"flex flex-1 flex-col items-center gap-1",children:[m.jsx(h,{size:18,className:p?"text-[var(--accent)]":"text-[var(--text-muted)]"}),m.jsx("span",{className:`text-[11px] lowercase ${p?"font-bold text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:s[f]??f})]},o)}),m.jsx(Sp,{renderTrigger:o=>m.jsxs("button",{type:"button",onClick:o,className:"flex flex-1 flex-col items-center gap-1",children:[m.jsx(tp,{size:18,className:"text-[var(--text-muted)]"}),m.jsx("span",{className:"text-[11px] lowercase text-[var(--text-muted)]",children:u("common.search_placeholder")})]})})]})}function y0(){const r=Fa(),{t:u}=Vt();return m.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:[m.jsxs("button",{onClick:()=>r("/home"),className:"flex items-center gap-2",style:{background:"none",border:"none",padding:0},children:[m.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-[4px] bg-[var(--accent)]",children:m.jsx("span",{className:"text-sm font-semibold",style:{color:"#0C0C0C"},children:"~"})}),m.jsx("span",{className:"text-sm font-bold lowercase text-[var(--text-primary)]",children:u("common.overlord")})]}),m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx("button",{onClick:()=>r("/profile"),className:"p-2 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]","aria-label":u("common.profile"),children:m.jsx(hb,{size:18})}),m.jsx(xp,{}),m.jsx(sp,{})]})]})}function zs({label:r,items:u,collapsed:s}){return m.jsxs("div",{className:"mt-4 first:mt-0",children:[!s&&m.jsx("div",{className:"mb-2 px-3 text-xs lowercase",style:{color:"var(--text-muted)"},children:r}),u.map(({to:o,label:f,icon:h})=>m.jsx(Js,{to:o,className:({isActive:p})=>`flex items-center text-sm lowercase transition-colors ${s?"justify-center py-3":"gap-2.5 px-3 py-1.5"} ${p?"text-[var(--accent)] bg-[var(--accent)]/5":"text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:({isActive:p})=>m.jsxs(m.Fragment,{children:[m.jsx(h,{size:14,style:{flexShrink:0}}),!s&&m.jsx("span",{children:p?`> ${f}`:` ${f}`})]})},o))]})}function v0(){const{user:r,logout:u}=xa(),s=Fa(),[o,f]=g.useState(!1),h=yb(),{t:p}=Vt(),{sidebarCollapsed:b,toggleSidebar:y}=bb();function _(){u(),s("/login")}return m.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:[m.jsx("div",{className:"flex items-center px-5",style:{height:48},children:m.jsxs("button",{onClick:()=>s("/home"),className:"flex items-center gap-2.5",style:{background:"none",border:"none",padding:0},children:[m.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-[4px] bg-[var(--accent)]",style:{flexShrink:0},children:m.jsx("span",{className:"text-lg font-semibold",style:{color:"#0C0C0C"},children:"~"})}),!b&&m.jsx("span",{className:"text-base font-bold lowercase tracking-tight",style:{color:"var(--text-primary)"},children:p("common.overlord")})]})}),m.jsxs("nav",{className:"flex-1 px-3 pt-2",children:[m.jsx(zs,{label:p("common.navigation"),items:c0,collapsed:b}),m.jsx(zs,{label:p("common.docs_section"),items:f0,collapsed:b}),h&&m.jsx(zs,{label:p("common.admin_section"),items:d0,collapsed:b})]}),m.jsx("div",{className:`px-3 py-1 ${b?"flex justify-center":""}`,children:m.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?m.jsx(Wv,{size:14}):m.jsx($v,{size:14})})}),m.jsx("div",{className:"border-t border-[var(--border)] p-3",children:m.jsxs("div",{className:`flex items-center py-2 ${b?"justify-center":"gap-3 px-3"}`,children:[m.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:p("common.profile"),children:((r==null?void 0:r.username)??"u")[0].toUpperCase()}),!b&&m.jsxs(m.Fragment,{children:[m.jsxs("button",{onClick:()=>s("/profile"),className:"min-w-0 flex-1 text-left transition-colors hover:opacity-80",title:p("common.profile"),children:[m.jsx("div",{className:"truncate text-sm lowercase",style:{color:"var(--text-primary)"},children:(r==null?void 0:r.username)??"user"}),m.jsx("div",{className:"truncate text-xs lowercase",style:{color:"var(--text-muted)"},children:(r==null?void 0:r.role)??"user"})]}),m.jsx("button",{onClick:()=>f(!0),className:"p-1 text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)]","aria-label":p("common.log_out"),children:m.jsx(rb,{size:14})})]})]})}),m.jsx(n0,{isOpen:o,onClose:()=>f(!1),onConfirm:_,title:p("common.logout_title"),message:p("common.logout_message"),confirmLabel:p("common.logout"),confirmVariant:"warning"})]})}function b0({headerActions:r,subtitleOverride:u}){const s=gt(),{title:o,subtitle:f}=h0(s.pathname),h=u??f;return m.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:[m.jsxs("div",{className:"text-sm lowercase",children:[m.jsx("span",{style:{color:"var(--text-primary)"},children:o}),h&&m.jsxs("span",{style:{color:"var(--text-muted)"},children:[" ","// ",h]})]}),m.jsxs("div",{className:"flex items-center gap-3",children:[r,m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx(Sp,{}),m.jsx(xp,{}),m.jsx(sp,{})]})]})]})}function x0(){const[r,u]=g.useState(null),[s,o]=g.useState(null),f=gt(),h=f.pathname==="/home",p=f.pathname.startsWith("/docs");return g.useEffect(()=>Sb.getState().init(),[]),m.jsxs("div",{className:"fixed inset-0 flex font-mono",children:[m.jsx(v0,{}),m.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[m.jsx(y0,{}),m.jsx(_0,{}),!p&&m.jsx(b0,{headerActions:r,subtitleOverride:s}),m.jsx(s0,{className:h?"flex-1 overflow-hidden bg-[var(--bg-primary)]":"flex-1 overflow-auto bg-[var(--bg-primary)] p-4 pb-6 md:p-6 md:pb-6",children:m.jsx(kp.Provider,{value:{setActions:u},children:m.jsx(Ep.Provider,{value:{setSubtitle:o},children:m.jsx(uv,{})})})}),m.jsx(r0,{}),m.jsx(u0,{}),m.jsx(g0,{})]})]})}function zh(r){var s;const u=(s=r.state)==null?void 0:s.from;return u?{from:u}:{from:{pathname:r.pathname,search:r.search}}}function li({children:r,requireAdmin:u=!1}){const{accessToken:s,user:o,requireTotpSetup:f,initializing:h}=xa(),p=gt();if(h)return m.jsx("div",{className:"flex h-screen items-center justify-center",children:m.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})});if(!s)return m.jsx(ll,{to:"/login",state:zh(p),replace:!0});if(f){const b=zh(p);return p.pathname!=="/totp-setup"&&p.pathname!=="/bind"?m.jsx(ll,{to:"/totp-setup",state:b,replace:!0}):p.pathname==="/bind"?(sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(b.from)),m.jsx(ll,{to:"/totp-setup",state:b,replace:!0})):m.jsx(m.Fragment,{children:r})}return u&&(o==null?void 0:o.role)!==ip.ADMIN?m.jsx(ll,{to:"/home",replace:!0}):m.jsx(m.Fragment,{children:r})}function S0({children:r}){const{theme:u,resolved:s,setResolved:o}=op();return g.useEffect(()=>{if(u!=="system"){o(u);return}const f=window.matchMedia("(prefers-color-scheme: dark)");o(f.matches?"dark":"light");const h=p=>o(p.matches?"dark":"light");return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[u,o]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",s==="dark")},[s]),m.jsx(m.Fragment,{children:r})}class k0 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?m.jsxs("div",{className:"flex h-full min-h-[300px] flex-col items-center justify-center gap-4 p-8 font-mono",children:[m.jsx("span",{className:"text-lg font-bold text-[var(--destructive)]",children:Br("common.runtime_error")}),m.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")}),m.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:[m.jsx(ep,{className:"h-3.5 w-3.5"}),Br("common.reload")]})]}):this.props.children}}function E0({isOpen:r}){const u=Fa(),{logout:s,setSessionExpired:o}=xa(),{t:f}=Vt();function h(){s(),o(!1),u("/login")}return r?m.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[m.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),m.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:m.jsxs("div",{className:"flex flex-col items-center px-8 py-10",children:[m.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-full bg-[var(--warning)]/10",children:m.jsx(ib,{className:"h-7 w-7 text-[var(--warning)]"})}),m.jsx("h3",{className:"mb-2 text-base font-bold text-[var(--text-primary)]",children:f("auth.session_expired")}),m.jsx("p",{className:"mb-8 text-center text-xs text-[var(--text-secondary)]",children:f("auth.session_expired_message")}),m.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:h,children:f("auth.go_to_login")})]})})]}):null}const Ch=5;let ba=[];const Bs=new Set;function wp(){Bs.forEach(r=>r())}function w0(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Wa(r,u,s=4e3){const o=w0();return ba=[...ba,{id:o,variant:r,message:u,duration:s}],ba.length>Ch&&(ba=ba.slice(ba.length-Ch)),wp(),o}Wa.success=(r,u)=>Wa("success",r,u);Wa.error=(r,u)=>Wa("error",r,u);Wa.warning=(r,u)=>Wa("warning",r,u);Wa.info=(r,u)=>Wa("info",r,u);function T0(r){ba=ba.filter(u=>u.id!==r),wp()}function j0(){const[,r]=g.useState(0);return g.useEffect(()=>{const u=()=>r(s=>s+1);return Bs.add(u),()=>{Bs.delete(u)}},[]),ba}const R0={success:{icon:Fv,borderColor:"var(--accent)"},error:{icon:Iv,borderColor:"var(--destructive)"},warning:{icon:np,borderColor:"var(--warning)"},info:{icon:ab,borderColor:"var(--info)"}};function A0({item:r}){const u=R0[r.variant],s=u.icon,{t:o}=Vt(),f=g.useCallback(()=>T0(r.id),[r.id]);return g.useEffect(()=>{if(!r.duration)return;const h=setTimeout(f,r.duration);return()=>clearTimeout(h)},[r.duration,f]),m.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:[m.jsx(s,{className:"h-4 w-4 shrink-0",style:{color:u.borderColor}}),m.jsx("p",{className:"flex-1 text-xs text-[var(--text-primary)]",children:r.message}),m.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:m.jsx(lp,{className:"h-3.5 w-3.5"})})]})}function z0(){const r=j0();return r.length===0?null:m.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:r.map(u=>m.jsx("div",{className:"pointer-events-auto",children:m.jsx(A0,{item:u})},u.id))})}const C0=g.lazy(()=>ne(()=>import("./LandingPage-Dg1l9YuB.js"),__vite__mapDeps([0,1,2,3,4,5]))),O0=g.lazy(()=>ne(()=>import("./LoginPage-BNA6mofp.js"),[])),D0=g.lazy(()=>ne(()=>import("./TotpSetupPage-BKtS7CmV.js"),[])),N0=g.lazy(()=>ne(()=>import("./NotFoundPage-BPrL-qXb.js"),[])),M0=g.lazy(()=>ne(()=>import("./HomePage-BzUb4bsR.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,1]))),U0=g.lazy(()=>ne(()=>import("./TerminalHomePage-BLtX8Dhh.js"),__vite__mapDeps([15,16,17,18,10,11,19,8,12,14,20,21,22]))),q0=g.lazy(()=>ne(()=>import("./TaskListPage-BTjkMvm2.js"),__vite__mapDeps([23,16,7,8,12,13,19,5,24,9,20]))),L0=g.lazy(()=>ne(()=>import("./TaskDetailPage-CZsGWK6C.js"),__vite__mapDeps([25,16,17,18,12,19,8,26,21,27,28]))),H0=g.lazy(()=>ne(()=>import("./WorkerListPage-BhZXxIIw.js"),__vite__mapDeps([29,8,30,31,32,33,34,22,5,28,19,24,9,14,20]))),B0=g.lazy(()=>ne(()=>import("./WorkerDetailPage-B32pd9kw.js"),__vite__mapDeps([35,12,8,36,30,14,37,26]))),Y0=g.lazy(()=>ne(()=>import("./WorkerSetupGuidePage-D-guQEnF.js"),__vite__mapDeps([31,32,33,34,22]))),G0=g.lazy(()=>ne(()=>import("./ProjectListPage-g_giI9FY.js"),__vite__mapDeps([38,19,24,9,12,14,20]))),V0=g.lazy(()=>ne(()=>import("./ProjectDetailPage-Dy12a-yh.js"),__vite__mapDeps([39,40,19,12,8,36,14,41,37,20]))),X0=g.lazy(()=>ne(()=>import("./EditProjectPage-C9fj4Etb.js"),__vite__mapDeps([42,19,40,20]))),Q0=g.lazy(()=>ne(()=>import("./PipelineEditorPage-CTENPxyS.js"),__vite__mapDeps([43,19,13]))),Z0=g.lazy(()=>ne(()=>import("./ProfilePage-CmiTwPqb.js"),__vite__mapDeps([44,45,36,14]))),K0=g.lazy(()=>ne(()=>import("./BindPlatformPage-B4yvlEZB.js"),[])),J0=g.lazy(()=>ne(()=>import("./AccessTokensPage-CR-PeNcP.js"),__vite__mapDeps([46,19,24,9,12,14,20,5,37]))),$0=g.lazy(()=>ne(()=>import("./CliReferencePage-BmSUdZzk.js"),__vite__mapDeps([47,48,5,20]))),W0=g.lazy(()=>ne(()=>import("./ApiReferencePage-kSxqlizD.js"),__vite__mapDeps([49,48,5,20]))),F0=g.lazy(()=>ne(()=>import("./SkillPage-C_O2lBKw.js"),__vite__mapDeps([50,51,5,27]))),I0=g.lazy(()=>ne(()=>import("./DocsLayout-CSEESXJ9.js"),__vite__mapDeps([52,26]))),P0=g.lazy(()=>ne(()=>import("./InstallationPage-BUenUQoa.js"),__vite__mapDeps([53,51,5]))),e1=g.lazy(()=>ne(()=>import("./DeveloperSetupPage-CUqUgy0E.js"),__vite__mapDeps([54,51,5]))),t1=g.lazy(()=>ne(()=>import("./WorkerSetupPage-DkdDxUHR.js"),__vite__mapDeps([55,51,5]))),a1=g.lazy(()=>ne(()=>import("./BotSetupPage-COUQ_fLe.js"),__vite__mapDeps([56,51,5]))),n1=g.lazy(()=>ne(()=>import("./LocalDevelopmentPage-DPxg7dz1.js"),__vite__mapDeps([57,51,5]))),l1=g.lazy(()=>ne(()=>import("./WorkerOperationsPage-C9Dq5sRP.js"),[])),i1=g.lazy(()=>ne(()=>import("./DeploymentPage-B4b8MWz0.js"),__vite__mapDeps([58,51,5]))),Oh=g.lazy(()=>ne(()=>import("./BotIntegrationPage-BjNySaDS.js"),[])),r1=g.lazy(()=>ne(()=>import("./PipelineConfigPage-C83Rso9T.js"),__vite__mapDeps([59,51,5]))),u1=g.lazy(()=>ne(()=>import("./DevWorkflowPage-r0YMu6kh.js"),__vite__mapDeps([60,51,5]))),o1=g.lazy(()=>ne(()=>import("./PermissionsPage-BDRRUvjz.js"),[])),s1=g.lazy(()=>ne(()=>import("./EnvVariablesPage-B55en0xK.js"),[])),c1=g.lazy(()=>ne(()=>import("./ArchitecturePage-D4lMpWah.js"),__vite__mapDeps([61,51,5]))),f1=g.lazy(()=>ne(()=>import("./ChangelogPage-CI_beBIp.js"),[])),d1=g.lazy(()=>ne(()=>import("./DocsIndexPage--RNvPtIx.js"),__vite__mapDeps([62,33,2,3,34]))),m1=g.lazy(()=>ne(()=>import("./AdminPage-BbgV2794.js"),__vite__mapDeps([63,4,2,64,34]))),h1=g.lazy(()=>ne(()=>import("./DeveloperManage-rknJYHkS.js"),__vite__mapDeps([65,19,45,24,9,14,8,20,4,41,21]))),p1=g.lazy(()=>ne(()=>import("./BotManage-CymH4dDp.js"),__vite__mapDeps([66,19,51,5,37,20,24,9,14,8,2,41]))),_1=g.lazy(()=>ne(()=>import("./TokenManage-BX2Aye0P.js"),__vite__mapDeps([67,32,5,27,24,9,14,8,20]))),g1=g.lazy(()=>ne(()=>import("./AuditLogPage-Bpb-eqBx.js"),__vite__mapDeps([68,19,24,9,64,11]))),y1=g.lazy(()=>ne(()=>import("./SettingsPage-kh7GaEeZ.js"),[]));function v1(){return m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})})}function b1(){const r=xa(u=>u.sessionExpired);return m.jsxs(S0,{children:[m.jsx(z0,{}),m.jsx(k0,{children:m.jsxs(Nv,{children:[m.jsx(E0,{isOpen:r}),m.jsx(g.Suspense,{fallback:m.jsx(v1,{}),children:m.jsxs(sv,{children:[m.jsx(te,{path:"/",element:m.jsx(C0,{})}),m.jsx(te,{path:"/login",element:m.jsx(O0,{})}),m.jsx(te,{path:"/totp-setup",element:m.jsx(li,{children:m.jsx(D0,{})})}),m.jsx(te,{path:"/bind",element:m.jsx(li,{children:m.jsx(K0,{})})}),m.jsxs(te,{element:m.jsx(li,{children:m.jsx(x0,{})}),children:[m.jsx(te,{path:"/home",element:m.jsx(U0,{})}),m.jsx(te,{path:"/dashboard",element:m.jsx(M0,{})}),m.jsx(te,{path:"/tasks",element:m.jsx(q0,{})}),m.jsx(te,{path:"/tasks/:id",element:m.jsx(L0,{})}),m.jsx(te,{path:"/workers",element:m.jsx(H0,{})}),m.jsx(te,{path:"/workers/setup",element:m.jsx(li,{requireAdmin:!0,children:m.jsx(Y0,{})})}),m.jsx(te,{path:"/workers/:id",element:m.jsx(B0,{})}),m.jsx(te,{path:"/projects",element:m.jsx(G0,{})}),m.jsx(te,{path:"/projects/:key",element:m.jsx(V0,{})}),m.jsx(te,{path:"/projects/:key/edit",element:m.jsx(X0,{})}),m.jsx(te,{path:"/projects/:key/pipeline",element:m.jsx(Q0,{})}),m.jsx(te,{path:"/profile",element:m.jsx(Z0,{})}),m.jsx(te,{path:"/access-tokens",element:m.jsx(J0,{})}),m.jsxs(te,{path:"/docs",element:m.jsx(I0,{}),children:[m.jsx(te,{index:!0,element:m.jsx(ll,{to:"cli",replace:!0})}),m.jsx(te,{path:"cli",element:m.jsx($0,{})}),m.jsx(te,{path:"api",element:m.jsx(W0,{})}),m.jsx(te,{path:"bot",element:m.jsx(Oh,{})}),m.jsx(te,{path:"all",element:m.jsx(d1,{})}),m.jsx(te,{path:"skill",element:m.jsx(F0,{})}),m.jsx(te,{path:"installation",element:m.jsx(P0,{})}),m.jsx(te,{path:"developer-setup",element:m.jsx(e1,{})}),m.jsx(te,{path:"worker-setup",element:m.jsx(t1,{})}),m.jsx(te,{path:"bot-setup",element:m.jsx(a1,{})}),m.jsx(te,{path:"local-development",element:m.jsx(n1,{})}),m.jsx(te,{path:"worker-operations",element:m.jsx(l1,{})}),m.jsx(te,{path:"deployment",element:m.jsx(i1,{})}),m.jsx(te,{path:"bot-integration",element:m.jsx(Oh,{})}),m.jsx(te,{path:"pipeline-config",element:m.jsx(r1,{})}),m.jsx(te,{path:"dev-workflow",element:m.jsx(u1,{})}),m.jsx(te,{path:"permissions",element:m.jsx(o1,{})}),m.jsx(te,{path:"env-variables",element:m.jsx(s1,{})}),m.jsx(te,{path:"architecture",element:m.jsx(c1,{})}),m.jsx(te,{path:"changelog",element:m.jsx(f1,{})})]}),m.jsxs(te,{path:"/admin",element:m.jsx(li,{requireAdmin:!0,children:m.jsx(m1,{})}),children:[m.jsx(te,{index:!0,element:m.jsx(ll,{to:"developers",replace:!0})}),m.jsx(te,{path:"developers",element:m.jsx(h1,{})}),m.jsx(te,{path:"bots",element:m.jsx(p1,{})}),m.jsx(te,{path:"tokens",element:m.jsx(_1,{})}),m.jsx(te,{path:"audit-logs",element:m.jsx(g1,{})}),m.jsx(te,{path:"settings",element:m.jsx(y1,{})})]})]}),m.jsx(te,{path:"*",element:m.jsx(N0,{})})]})})]})})]})}xa.getState().initialize();uy.createRoot(document.getElementById("root")).render(m.jsx(g.StrictMode,{children:m.jsx(b1,{})}));export{j1 as A,ep as B,Jv as C,ip as D,rb as E,k1 as F,A1 as G,Ns as H,R1 as I,Pv as J,nb as K,$h as L,ub as M,ll as N,fb as O,r0 as P,Js as Q,Rr as R,ap as S,sp as T,uv as U,z1 as V,w1 as W,lp as X,C1 as Y,Iv as Z,Vt as a,$s as b,xe as c,cb as d,lb as e,Fa as f,gt as g,Xr as h,yb as i,m as j,Sb as k,Fr as l,E1 as m,N1 as n,D1 as o,tp as p,Ph as q,g as r,O1 as s,Wa as t,xa as u,n0 as v,S1 as w,Fv as x,np as y,T1 as z};
|
|
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"},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"}};function wb(r,u){const s=u.split(".");let o=r;for(const f of s){if(o==null||typeof o!="object")return u;o=o[f]}return typeof o=="string"?o:u}function Tb(r,u){return u?r.replace(/\{(\w+)\}/g,(s,o)=>u[o]!=null?String(u[o]):`{${o}}`):r}function Br(r,u){return Tb(wb(Eb,r),u)}function Vt(){return{t:g.useCallback((u,s)=>Br(u,s),[])}}function sp(){const{theme:r,setTheme:u}=op(),{t:s}=Vt(),o=r==="dark"||r==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;function f(){u(o?"light":"dark")}return m.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?m.jsx(mb,{size:16}):m.jsx(ob,{size:16})})}class Ns extends Error{constructor(s,o,f){const h=s.status||s.status===0?s.status:"",p=s.statusText??"",b=`${h} ${p}`.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 cp 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 cp(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 r=!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 r=!0,"half"}}).headers.has("Content-Type")}catch(f){if(f instanceof Error&&f.message==="unsupported BodyInit type")return!1;throw f}return r&&!u})(),jb=typeof globalThis.AbortController=="function",fp=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",Rb=typeof globalThis.ReadableStream=="function",Ab=typeof globalThis.FormData=="function",dp=["get","post","put","patch","head","delete"],zb={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},As=2147483647,Cb=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,mp=Symbol("stop");class hp{constructor(u){Ve(this,"options");this.options=u}}const Ob=r=>new hp(r),Db={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},Nb={next:!0},Mb={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},Ub=r=>{if(!r)return 0;if(r instanceof FormData){let u=0;for(const[s,o]of r)u+=Cb,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(r instanceof Blob)return r.size;if(r instanceof ArrayBuffer)return r.byteLength;if(typeof r=="string")return new TextEncoder().encode(r).length;if(r instanceof URLSearchParams)return new TextEncoder().encode(r.toString()).length;if("byteLength"in r)return r.byteLength;if(typeof r=="object"&&r!==null)try{const u=JSON.stringify(r);return new TextEncoder().encode(u).length}catch{return 0}return 0},pp=(r,u,s)=>{let o,f=0;return r.pipeThrough(new TransformStream({transform(h,p){if(p.enqueue(h),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=h},flush(){o&&(f+=o.byteLength,s==null||s({percent:1,totalBytes:Math.max(u,f),transferredBytes:f},o))}}))},qb=(r,u)=>{if(!r.body)return r;if(r.status===204)return new Response(null,{status:r.status,statusText:r.statusText,headers:r.headers});const s=Math.max(0,Number(r.headers.get("content-length"))||0);return new Response(pp(r.body,s,u),{status:r.status,statusText:r.statusText,headers:r.headers})},Lb=(r,u,s)=>{if(!r.body)return r;const o=Ub(s??r.body);return new Request(r,{duplex:"half",body:pp(r.body,o,u)})},yn=r=>r!==null&&typeof r=="object",Dr=(...r)=>{for(const u of r)if((!yn(u)||Array.isArray(u))&&u!==void 0)throw new TypeError("The `options` argument must be an object");return Ws({},...r)},_p=(r={},u={})=>{const s=new globalThis.Headers(r),o=u instanceof globalThis.Headers,f=new globalThis.Headers(u);for(const[h,p]of f.entries())o&&p==="undefined"||p===void 0?s.delete(h):s.set(h,p);return s};function Nr(r,u,s){return Object.hasOwn(u,s)&&u[s]===void 0?[]:Ws(r[s]??[],u[s]??[])}const gp=(r={},u={})=>({beforeRequest:Nr(r,u,"beforeRequest"),beforeRetry:Nr(r,u,"beforeRetry"),afterResponse:Nr(r,u,"afterResponse"),beforeError:Nr(r,u,"beforeError")}),Hb=(r,u)=>{const s=new URLSearchParams;for(const o of[r,u])if(o!==void 0)if(o instanceof URLSearchParams)for(const[f,h]of o.entries())s.append(f,h);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,h]of Object.entries(o))h!==void 0&&s.append(f,String(h));else{const f=new URLSearchParams(o);for(const[h,p]of f.entries())s.append(h,p)}return s},Ws=(...r)=>{let u={},s={},o={},f;const h=[];for(const p of r)if(Array.isArray(p))Array.isArray(u)||(u=[]),u=[...u,...p];else if(yn(p)){for(let[b,y]of Object.entries(p)){if(b==="signal"&&y instanceof globalThis.AbortSignal){h.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:Hb(f,y);continue}yn(y)&&b in u&&(y=Ws(u[b],y)),u={...u,[b]:y}}yn(p.hooks)&&(o=gp(o,p.hooks),u.hooks=o),yn(p.headers)&&(s=_p(s,p.headers),u.headers=s)}return f!==void 0&&(u.searchParams=f),h.length>0&&(h.length===1?u.signal=h[0]:fp?u.signal=AbortSignal.any(h):u.signal=h.at(-1)),u},Bb=r=>dp.includes(r)?r.toUpperCase():r,Yb=["get","put","head","delete","options","trace"],Gb=[408,413,429,500,502,503,504],Vb=[413,429,503],kh={limit:2,methods:Yb,statusCodes:Gb,afterStatusCodes:Vb,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:r=>.3*2**(r-1)*1e3,jitter:void 0,retryOnTimeout:!1},Xb=(r={})=>{if(typeof r=="number")return{...kh,limit:r};if(r.methods&&!Array.isArray(r.methods))throw new Error("retry.methods must be an array");if(r.methods&&(r.methods=r.methods.map(s=>s.toLowerCase())),r.statusCodes&&!Array.isArray(r.statusCodes))throw new Error("retry.statusCodes must be an array");const u=Object.fromEntries(Object.entries(r).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 Qb(r,u,s,o){return new Promise((f,h)=>{const p=setTimeout(()=>{s&&s.abort(),h(new Ms(r))},o.timeout);o.fetch(r,u).then(f).catch(h).then(()=>{clearTimeout(p)})})}async function Zb(r,{signal:u}){return new Promise((s,o)=>{u&&(u.throwIfAborted(),u.addEventListener("abort",f,{once:!0}));function f(){clearTimeout(h),o(u.reason)}const h=setTimeout(()=>{u==null||u.removeEventListener("abort",f),s()},r)})}const Kb=(r,u)=>{const s={};for(const o in u)Object.hasOwn(u,o)&&!(o in Mb)&&!(o in Db)&&(!(o in r)||o in Nb)&&(s[o]=u[o]);return s},Jb=r=>r===void 0?!1:Array.isArray(r)?r.length>0:r instanceof URLSearchParams?r.size>0:typeof r=="object"?Object.keys(r).length>0:typeof r=="string"?r.trim().length>0:!!r;function $b(r){return r instanceof Ns||(r==null?void 0:r.name)===Ns.name}function Wb(r){return r instanceof Ms||(r==null?void 0:r.name)===Ms.name}var Kr,yp,Jt,Bt,rt,Q,$a,ea,vn,ue,Yr,vp,Us,Gr,Ja,qs,bp,ii,Vr,Ls;const ri=class ri{constructor(u,s={}){Pt(this,ue);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,h,p;if(Kt(this,rt,u),Kt(this,Q,{...s,headers:_p(U(this,rt).headers,s.headers),hooks:gp({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},s.hooks),method:Bb(s.method??U(this,rt).method??"GET"),prefixUrl:String(s.prefixUrl||""),retry:Xb(s.retry),throwHttpErrors:s.throwHttpErrors??!0,timeout:s.timeout??1e4,fetch:s.fetch??globalThis.fetch.bind(globalThis),context:s.context??{}}),typeof U(this,rt)!="string"&&!(U(this,rt)instanceof URL||U(this,rt)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(U(this,Q).prefixUrl&&typeof U(this,rt)=="string"){if(U(this,rt).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");U(this,Q).prefixUrl.endsWith("/")||(U(this,Q).prefixUrl+="/"),Kt(this,rt,U(this,Q).prefixUrl+U(this,rt))}jb&&fp&&(Kt(this,ea,U(this,Q).signal??U(this,rt).signal),Kt(this,Jt,new globalThis.AbortController),U(this,Q).signal=U(this,ea)?AbortSignal.any([U(this,ea),U(this,Jt).signal]):U(this,Jt).signal),Sh&&(U(this,Q).duplex="half"),U(this,Q).json!==void 0&&(U(this,Q).body=((h=(f=U(this,Q)).stringifyJson)==null?void 0:h.call(f,U(this,Q).json))??JSON.stringify(U(this,Q).json),U(this,Q).headers.set("content-type",U(this,Q).headers.get("content-type")??"application/json"));const o=s.headers&&new globalThis.Headers(s.headers).has("content-type");if(U(this,rt)instanceof globalThis.Request&&(Ab&&U(this,Q).body instanceof globalThis.FormData||U(this,Q).body instanceof URLSearchParams)&&!o&&U(this,Q).headers.delete("content-type"),this.request=new globalThis.Request(U(this,rt),U(this,Q)),Jb(U(this,Q).searchParams)){const y="?"+(typeof U(this,Q).searchParams=="string"?U(this,Q).searchParams.replace(/^\?/,""):new URLSearchParams(ke(p=ri,Kr,yp).call(p,U(this,Q).searchParams)).toString()),_=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,y);this.request=new globalThis.Request(_,U(this,Q))}if(U(this,Q).onUploadProgress){if(typeof U(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,ue,Ls).call(this,this.request,U(this,Q).body??void 0)}}static create(u,s){var p,b,y;const o=new ri(u,s),f=async()=>{var w,k,M,Y,H,q,L,B,G,J,se,ce;if(typeof U(o,Q).timeout=="number"&&U(o,Q).timeout>As)throw new RangeError(`The \`timeout\` option cannot be greater than ${As}`);await Promise.resolve();let _=await ke(w=o,ue,bp).call(w);for(const _e of U(o,Q).hooks.afterResponse){const F=ke(k=o,ue,Us).call(k,_.clone());let W;try{W=await _e(o.request,ke(M=o,ue,ii).call(M),F,{retryCount:U(o,Bt)})}catch(Pe){throw ke(Y=o,ue,Ja).call(Y,F),ke(H=o,ue,Ja).call(H,_),Pe}if(W instanceof hp)throw ke(q=o,ue,Ja).call(q,F),ke(L=o,ue,Ja).call(L,_),new Rs(W.options);const oe=W instanceof globalThis.Response?W:_;F!==oe&&ke(B=o,ue,Ja).call(B,F),_!==oe&&ke(G=o,ue,Ja).call(G,_),_=oe}if(ke(J=o,ue,Us).call(J,_),!_.ok&&(typeof U(o,Q).throwHttpErrors=="function"?U(o,Q).throwHttpErrors(_.status):U(o,Q).throwHttpErrors)){let _e=new Ns(_,o.request,ke(se=o,ue,ii).call(se));for(const F of U(o,Q).hooks.beforeError)_e=await F(_e,{retryCount:U(o,Bt)});throw _e}if(U(o,Q).onDownloadProgress){if(typeof U(o,Q).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Rb)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const _e=_.clone();return ke(ce=o,ue,Ja).call(ce,_),qb(_e,U(o,Q).onDownloadProgress)}return _},h=ke(p=o,ue,qs).call(p,f).finally(()=>{var w,k;const _=U(o,$a);ke(w=o,ue,Gr).call(w,(_==null?void 0:_.body)??void 0),ke(k=o,ue,Gr).call(k,o.request.body??void 0)});for(const[_,w]of Object.entries(zb))_==="bytes"&&typeof((y=(b=globalThis.Response)==null?void 0:b.prototype)==null?void 0:y.bytes)!="function"||(h[_]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||w);const k=await h;if(_==="json"){if(k.status===204)return"";const M=await k.text();return M===""?"":s.parseJson?s.parseJson(M):JSON.parse(M)}return k[_]()});return h}};Kr=new WeakSet,yp=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,ue=new WeakSet,Yr=function(){const u=U(this,Q).retry.delay(U(this,Bt));let s=u;U(this,Q).retry.jitter===!0?s=Math.random()*u:typeof U(this,Q).retry.jitter=="function"&&(s=U(this,Q).retry.jitter(u),(!Number.isFinite(s)||s<0)&&(s=u));const o=U(this,Q).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(o,s)},vp=async function(u){if(eh(this,Bt)._++,U(this,Bt)>U(this,Q).retry.limit)throw u;const s=u instanceof Error?u:new cp(u);if(s instanceof Rs)return s.customDelay??ke(this,ue,Yr).call(this);if(!U(this,Q).retry.methods.includes(this.request.method.toLowerCase()))throw u;if(U(this,Q).retry.shouldRetry!==void 0){const o=await U(this,Q).retry.shouldRetry({error:s,retryCount:U(this,Bt)});if(o===!1)throw u;if(o===!0)return ke(this,ue,Yr).call(this)}if(Wb(u)&&!U(this,Q).retry.retryOnTimeout)throw u;if($b(u)){if(!U(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&&U(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 h=U(this,Q).retry.maxRetryAfter??f;return f<h?f:h}if(u.response.status===413)throw u}return ke(this,ue,Yr).call(this)},Us=function(u){return U(this,Q).parseJson&&(u.json=async()=>U(this,Q).parseJson(await u.text())),u},Gr=function(u){u&&u.cancel().catch(()=>{})},Ja=function(u){ke(this,ue,Gr).call(this,u.body??void 0)},qs=async function(u){try{return await u()}catch(s){const o=Math.min(await ke(this,ue,vp).call(this,s),As);if(U(this,Bt)<1)throw s;if(await Zb(o,U(this,ea)?{signal:U(this,ea)}:{}),s instanceof Rs&&s.customRequest){const f=U(this,Q).signal?new globalThis.Request(s.customRequest,{signal:U(this,Q).signal}):new globalThis.Request(s.customRequest);ke(this,ue,Vr).call(this,f)}for(const f of U(this,Q).hooks.beforeRetry){const h=await f({request:this.request,options:ke(this,ue,ii).call(this),error:s,retryCount:U(this,Bt)});if(h instanceof globalThis.Request){ke(this,ue,Vr).call(this,h);break}if(h instanceof globalThis.Response)return h;if(h===mp)return}return ke(this,ue,qs).call(this,u)}},bp=async function(){var s;(s=U(this,Jt))!=null&&s.signal.aborted&&(Kt(this,Jt,new globalThis.AbortController),U(this,Q).signal=U(this,ea)?AbortSignal.any([U(this,ea),U(this,Jt).signal]):U(this,Jt).signal,this.request=new globalThis.Request(this.request,{signal:U(this,Q).signal}));for(const o of U(this,Q).hooks.beforeRequest){const f=await o(this.request,ke(this,ue,ii).call(this),{retryCount:U(this,Bt)});if(f instanceof Response)return f;if(f instanceof globalThis.Request){ke(this,ue,Vr).call(this,f);break}}const u=Kb(this.request,U(this,Q));return Kt(this,$a,this.request),this.request=U(this,$a).clone(),U(this,Q).timeout===!1?U(this,Q).fetch(U(this,$a),u):Qb(U(this,$a),u,U(this,Jt),U(this,Q))},ii=function(){if(!U(this,vn)){const{hooks:u,...s}=U(this,Q);Kt(this,vn,Object.freeze(s))}return U(this,vn)},Vr=function(u){Kt(this,vn,void 0),this.request=ke(this,ue,Ls).call(this,u)},Ls=function(u,s){return!U(this,Q).onUploadProgress||!u.body?u:Lb(u,U(this,Q).onUploadProgress,s??U(this,Q).body??void 0)},Pt(ri,Kr);let Zr=ri;/*! MIT License © Sindre Sorhus */const Hs=r=>{const u=(s,o)=>Zr.create(s,Dr(r,o));for(const s of dp)u[s]=(o,f)=>Zr.create(o,Dr(r,f,{method:s}));return u.create=s=>Hs(Dr(s)),u.extend=s=>(typeof s=="function"&&(s=s(r??{})),Hs(Dr(r,s))),u.stop=mp,u.retry=Ob,u},Eh=Hs();let Mr=null;const Xr=Eh.create({prefixUrl:"/api",timeout:3e4,hooks:{beforeRequest:[r=>{const u=xa.getState().accessToken;u&&r.headers.set("Authorization",`Bearer ${u}`)}],afterResponse:[async(r,u,s)=>{if(s.status===401&&!r.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&&r.headers.set("Authorization",`Bearer ${o}`),r.headers.set("X-Retry-After-Refresh","1"),Eh(r,u)}}]}}),Fb=3e4;function Ib(r){if(r.link)return r.link;const u=(r.title+" "+r.body).match(/task\s*#?(\d+)/i);if(u)return`/tasks/${u[1]}`;const s=(r.title+" "+r.body).match(/worker\s+(\S+)/i);return s?`/workers/${s[1]}`:null}function xp(){const r=Fa(),[u,s]=g.useState([]),[o,f]=g.useState(0),[h,p]=g.useState(!1),[b,y]=g.useState(!1),_=g.useRef(null),{t:w}=Vt(),k=g.useRef(async()=>{try{y(!0);const q=(await Xr.get("web/notifications",{searchParams:{limit:"20"}}).json()).data,L=q.filter(B=>!B.isRead).length;s(B=>B.length===q.length&&B.every((G,J)=>G.id===q[J].id&&G.isRead===q[J].isRead)?B:q),f(B=>B===L?B:L)}catch{}finally{y(!1)}});g.useEffect(()=>{k.current();const H=setInterval(()=>k.current(),Fb);return()=>clearInterval(H)},[]),g.useEffect(()=>{function H(q){_.current&&!_.current.contains(q.target)&&p(!1)}return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[]);async function M(H){try{await Xr.post(`web/notifications/${H}/read`),s(q=>q.map(L=>L.id===H?{...L,isRead:!0}:L)),f(q=>Math.max(0,q-1))}catch{}}async function Y(){try{await Xr.post("web/notifications/read-all"),s(H=>H.map(q=>({...q,isRead:!0}))),f(0)}catch{}}return m.jsxs("div",{className:"relative",ref:_,children:[m.jsxs("button",{type:"button",onClick:()=>p(H=>!H),"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:[m.jsx(Zv,{size:16}),o>0&&m.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})]}),h&&m.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:[m.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[m.jsx("span",{className:"text-sm font-semibold",children:w("common.notifications")}),o>0&&m.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:[m.jsx(Kv,{className:"h-3.5 w-3.5"}),w("common.mark_all_read")]})]}),m.jsx("div",{className:"max-h-80 overflow-y-auto",children:b&&u.length===0?m.jsx("div",{className:"flex justify-center py-8",children:m.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):u.length===0?m.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[m.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),m.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:w("common.no_notifications")})]}):u.map(H=>{const q=Ib(H);return m.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 transition-colors ${q?"cursor-pointer hover:bg-[var(--bg-input)]":""} ${H.isRead?"opacity-60":"bg-[var(--accent)]/5"}`,onClick:()=>{q&&(H.isRead||M(H.id),p(!1),r(q))},children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:"text-sm font-medium",children:H.title}),m.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:H.body}),m.jsx("p",{className:"mt-1 text-xs text-[var(--text-secondary)] opacity-60",children:new Date(H.createdAt).toLocaleString()})]}),!H.isRead&&m.jsx("button",{type:"button",onClick:L=>{L.stopPropagation(),M(H.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:m.jsx(Jv,{className:"h-3.5 w-3.5"})})]},H.id)})})]})]})}function Pb(r){return{tasks:r.tasks.map(u=>({type:"task",id:u.id,title:`#${u.id} ${u.description}`,subtitle:`${u.status} · ${u.project_key}`})),workers:(r.workers??[]).map(u=>({type:"worker",id:u.id,title:u.name,subtitle:`${u.hostname} · ${u.status}`})),projects:r.projects.map(u=>({type:"project",id:u.key,title:u.name,subtitle:u.repository}))}}const e0=300,wh={tasks:db,workers:ap,projects:eb},t0={tasks:"tasks",workers:"workers",projects:"projects"};function Sp({renderTrigger:r}={}){const[u,s]=g.useState(""),[o,f]=g.useState({tasks:[],workers:[],projects:[]}),[h,p]=g.useState(!1),[b,y]=g.useState(!1),[_,w]=g.useState(0),k=g.useRef(null),M=g.useRef(null),Y=g.useRef(void 0),H=g.useRef(void 0),q=Fa(),{t:L}=Vt(),B=g.useMemo(()=>[...o.tasks,...o.workers,...o.projects],[o]),G=g.useCallback(async W=>{var Pe;if(!W.trim()){f({tasks:[],workers:[],projects:[]});return}(Pe=H.current)==null||Pe.abort();const oe=new AbortController;H.current=oe;try{p(!0);const Je=await Xr.get("web/search",{searchParams:{q:W},signal:oe.signal}).json();f(Pb(Je)),w(0)}catch(Je){if(Je instanceof DOMException&&Je.name==="AbortError")return}finally{oe.signal.aborted||p(!1)}},[]);g.useEffect(()=>(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>G(u),e0),()=>{Y.current&&clearTimeout(Y.current)}),[u,G]),g.useEffect(()=>{function W(oe){oe.key==="/"&&!b&&!(oe.target instanceof HTMLInputElement||oe.target instanceof HTMLTextAreaElement)&&(oe.preventDefault(),y(!0)),oe.key==="Escape"&&b&&(oe.preventDefault(),J())}return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[b]),g.useEffect(()=>{b&&setTimeout(()=>{var W;return(W=M.current)==null?void 0:W.focus()},50)},[b]);function J(){y(!1),s(""),f({tasks:[],workers:[],projects:[]}),w(0)}function se(W){switch(J(),W.type){case"task":q(`/tasks/${W.id}`);break;case"worker":q(`/workers/${W.id}`);break;case"project":q(`/projects/${W.id}`);break}}function ce(W){W.key==="ArrowDown"?(W.preventDefault(),w(oe=>Math.min(oe+1,B.length-1))):W.key==="ArrowUp"?(W.preventDefault(),w(oe=>Math.max(oe-1,0))):W.key==="Enter"&&B[_]&&(W.preventDefault(),se(B[_]))}const _e=B.length>0;let F=0;return m.jsxs(m.Fragment,{children:[r?r(()=>y(!0)):m.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:[m.jsx(tp,{className:"h-3.5 w-3.5"}),m.jsx("span",{children:L("common.search_placeholder")}),m.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&&m.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&&J()},children:m.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:[m.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-4 py-3",children:[m.jsx("span",{className:"text-sm text-[var(--accent)]",children:"/"}),m.jsx("input",{ref:M,type:"text",placeholder:L("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"}),h&&m.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})]}),m.jsx("div",{className:"max-h-[50vh] overflow-y-auto sm:max-h-[60vh] md:max-h-[400px]",children:u.trim()&&!_e&&!h?m.jsx("div",{className:"py-10 text-center text-xs text-[var(--text-muted)]",children:L("common.no_search_results",{query:u})}):Object.keys(wh).map(W=>{const oe=o[W];if(oe.length===0)return null;const Pe=wh[W],Je=F;return F+=oe.length,m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-[var(--text-muted)]",children:[m.jsx(Pe,{className:"h-3 w-3"}),m.jsx("span",{className:"text-[11px] lowercase tracking-wider",children:t0[W]})]}),oe.map((qe,At)=>{const ut=Je+At,Ne=ut===_;return m.jsxs("button",{type:"button",className:`flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors ${Ne?"bg-[var(--accent)]/10 text-[var(--accent)]":"hover:bg-[var(--bg-input)]"}`,onClick:()=>se(qe),onMouseEnter:()=>w(ut),children:[m.jsx("span",{className:`text-xs ${Ne?"text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:Ne?">":" "}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:"truncate text-sm",children:qe.title}),qe.subtitle&&m.jsx("p",{className:"truncate text-xs text-[var(--text-muted)]",children:qe.subtitle})]})]},`${qe.type}-${qe.id}`)})]},W)})}),m.jsxs("div",{className:"hidden items-center gap-4 border-t border-[var(--border)] px-4 py-2 md:flex",children:[m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↑↓"})," ",L("common.navigate_hint")]}),m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↵"})," ",L("common.select_hint")]}),m.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[m.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"esc"})," ",L("common.close_hint")]})]})]})})]})}const a0={danger:"var(--destructive)",warning:"var(--warning)",accent:"var(--accent)"},Th="confirm-dialog-title";function jh(r){return Array.from(r.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function n0({isOpen:r,onClose:u,onConfirm:s,title:o,message:f,confirmVariant:h="danger",isLoading:p,...b}){const{t:y}=Vt(),_=b.confirmLabel??y("common.confirm"),w=b.cancelLabel??y("common.cancel"),k=g.useRef(null),M=g.useRef(null),Y=a0[h];g.useEffect(()=>{if(!r)return;M.current=document.activeElement;const q=requestAnimationFrame(()=>{if(k.current){const L=jh(k.current);L.length>0&&L[0].focus()}});return()=>{var L;cancelAnimationFrame(q),(L=M.current)==null||L.focus()}},[r]);const H=g.useCallback(q=>{if(q.key==="Tab"&&k.current){const L=jh(k.current);if(L.length===0)return;const B=L[0],G=L[L.length-1];q.shiftKey?document.activeElement===B&&(q.preventDefault(),G.focus()):document.activeElement===G&&(q.preventDefault(),B.focus())}},[]);return r?m.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:m.jsxs("div",{ref:k,role:"dialog","aria-modal":"true","aria-labelledby":Th,onClick:q=>q.stopPropagation(),onKeyDown:H,style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem"},children:[m.jsx("div",{style:{marginBottom:"1.25rem"},children:m.jsxs("div",{id:Th,style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:[m.jsx(np,{style:{width:"1rem",height:"1rem"}}),o]})}),m.jsx("div",{style:{marginBottom:"1.25rem"},children:m.jsx("p",{style:{color:"var(--text-muted)",fontSize:"0.75rem",lineHeight:"1.5"},children:f})}),m.jsxs("div",{style:{display:"flex",gap:"0.75rem"},children:[m.jsx("button",{type:"button",onClick:u,disabled:p,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:p?"not-allowed":"pointer",opacity:p?.7:1,transition:"color 0.15s, border-color 0.15s"},children:w}),m.jsx("button",{type:"button",onClick:s,disabled:p,style:{flex:1,padding:"0.5rem",backgroundColor:Y,color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,cursor:p?"not-allowed":"pointer",opacity:p?.7:1},children:p?y("common.processing"):_})]})]})}):null}const Rh="overlord-pwa-install-dismissed";function l0(){const r=navigator.userAgent;return/iP(hone|od|ad)/.test(r)&&/WebKit/.test(r)&&!/(CriOS|FxiOS|OPiOS|mercury)/.test(r)}function i0(){return navigator.standalone===!0||window.matchMedia("(display-mode: standalone)").matches}function r0(){const{t:r}=Vt(),[u,s]=g.useState("hidden"),[o,f]=g.useState(!1),h=g.useRef(null),p=g.useRef(void 0);g.useEffect(()=>{if(i0()||localStorage.getItem(Rh)||window.innerWidth>=768)return;const _=k=>{k.preventDefault(),h.current=k};window.addEventListener("beforeinstallprompt",_);const w=setTimeout(()=>s("visible"),1e3);return()=>{window.removeEventListener("beforeinstallprompt",_),clearTimeout(w),clearTimeout(p.current)}},[]);function b(){localStorage.setItem(Rh,"1"),s("dismissing"),p.current=setTimeout(()=>s("hidden"),200)}async function y(){if(h.current){await h.current.prompt();const{outcome:_}=await h.current.userChoice;_==="accepted"&&b(),h.current=null}else l0()&&f(!0)}return u==="hidden"?null:m.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":r("pwa_install.title"),children:m.jsxs("div",{className:"overflow-hidden rounded-[4px] border border-[var(--accent)]/40 bg-[#0C0C0C] shadow-[0_8px_32px_rgba(0,0,0,0.4)]",children:[m.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:[m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}),m.jsx("span",{className:"text-[9px] font-medium text-[var(--accent)]",children:r("pwa_install.title")})]}),m.jsx("button",{onClick:b,className:"p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:m.jsx(lp,{size:14})})]}),m.jsx("div",{className:"px-3.5 py-3",children:o?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[m.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",r("pwa_install.ios_command")]}),m.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:[r("pwa_install.ios_step_1"),r("pwa_install.ios_step_2"),r("pwa_install.ios_step_3")].map((_,w)=>m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] bg-[var(--accent)]/[0.08]",children:m.jsx("span",{className:"text-xs font-semibold text-[var(--accent)]",children:w+1})}),m.jsxs("span",{className:"text-[10px] leading-snug text-[var(--text-secondary)]",children:[w===0&&m.jsx(sb,{size:12,className:"mr-1 inline-block align-text-bottom text-[var(--text-muted)]"}),_]})]},w))})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[m.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",r("pwa_install.command")]}),m.jsxs("div",{className:"mt-1.5 text-[10px] leading-relaxed text-[var(--text-secondary)]",children:["→ ",r("pwa_install.desc_1"),m.jsx("br",{}),"→ ",r("pwa_install.desc_2")]}),m.jsxs("div",{className:"mt-2.5 flex gap-2",children:[m.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:r("pwa_install.install")}),m.jsx("button",{onClick:b,className:"rounded-[4px] border border-[#333] px-3 py-1.5 text-[10px] text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:r("pwa_install.skip")})]})]})})]})})}function u0(){const{t:r}=Vt(),[u,s]=g.useState(!1);return g.useEffect(()=>{if(!("serviceWorker"in navigator))return;function o(){s(!0)}return navigator.serviceWorker.addEventListener("controllerchange",o),navigator.serviceWorker.getRegistration().then(f=>{if(f){if(f.waiting){s(!0);return}f.addEventListener("updatefound",()=>{const h=f.installing;h&&h.addEventListener("statechange",()=>{h.state==="installed"&&navigator.serviceWorker.controller&&s(!0)})})}}),()=>{navigator.serviceWorker.removeEventListener("controllerchange",o)}},[]),u?m.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:m.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] border border-[var(--accent)]/40 bg-[#0C0C0C] px-3.5 py-3 shadow-[0_8px_32px_rgba(0,0,0,0.4)]",children:[m.jsx(ep,{size:14,className:"shrink-0 text-[var(--accent)]"}),m.jsx("span",{className:"flex-1 text-[10px] text-[var(--text-secondary)]",children:r("pwa_update.message")}),m.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:r("pwa_update.reload")})]})}):null}const Ur=64,o0=96,Ah=32;function s0({children:r,className:u}){const s=g.useRef(null),o=g.useRef(0),f=g.useRef(0),h=g.useRef("idle"),[p,b]=g.useState(0),[y,_]=g.useState("idle"),w=g.useCallback(G=>{h.current=G,_(G)},[]),k=g.useCallback(()=>{const G=s.current;return G?G.scrollTop<=0:!0},[]),M=g.useCallback(G=>{k()&&(o.current=G.touches[0].clientY,f.current=G.touches[0].clientY)},[k]),Y=g.useCallback(G=>{if(h.current==="refreshing"||o.current===0)return;const J=G.touches[0].clientY,se=J-o.current;if(se<=0){h.current!=="idle"&&(b(0),w("idle"));return}if(!k())return;G.preventDefault();const ce=Math.min(se*.5,o0);f.current=J,b(ce),w(ce>=Ur?"ready":"pulling")},[k,w]),H=g.useCallback(()=>{h.current!=="refreshing"&&(h.current==="ready"?(w("refreshing"),b(Ur),setTimeout(()=>{window.location.reload()},300)):(b(0),w("idle")),o.current=0)},[w]);g.useEffect(()=>{const G=s.current;if(G)return G.addEventListener("touchstart",M,{passive:!0}),G.addEventListener("touchmove",Y,{passive:!1}),G.addEventListener("touchend",H,{passive:!0}),()=>{G.removeEventListener("touchstart",M),G.removeEventListener("touchmove",Y),G.removeEventListener("touchend",H)}},[M,Y,H]);const q=Math.min(p/Ur,1),L=y==="refreshing"?0:p/Ur*180,B=p>0||y==="refreshing";return m.jsxs("div",{ref:s,className:u,style:{overscrollBehaviorY:"contain"},children:[B&&m.jsx("div",{className:"pointer-events-none flex items-center justify-center md:hidden",style:{height:p,transition:y==="idle"?"height 200ms ease-out":void 0},children:m.jsx("div",{className:"flex items-center justify-center rounded-full bg-[var(--bg-card)] border border-[var(--border)]",style:{width:Ah,height:Ah,opacity:q,transition:y==="idle"?"opacity 200ms ease-out":void 0},children:y==="refreshing"?m.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",className:"animate-spin",style:{color:"var(--accent)"},children:[m.jsx("circle",{cx:"8",cy:"8",r:"6",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),m.jsx("path",{d:"M8 2a6 6 0 0 1 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):m.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",style:{color:y==="ready"?"var(--accent)":"var(--text-muted)",transform:`rotate(${L}deg)`,transition:"color 150ms"},children:m.jsx("path",{d:"M8 3v8M5 8l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),r]})}const kp=g.createContext({setActions:()=>{}});function D1(r){const{setActions:u}=g.useContext(kp);g.useEffect(()=>(u(r),()=>u(null)),[r,u])}const Ep=g.createContext({setSubtitle:()=>{}});function N1(r){const{setSubtitle:u}=g.useContext(Ep);g.useEffect(()=>(u(r),()=>u(null)),[r,u])}const c0=[{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:tb},{to:"/access-tokens",label:"tokens",icon:nb}],f0=[{to:"/docs/cli",label:"cli",icon:$s},{to:"/docs/api",label:"api",icon:Pv},{to:"/docs/bot",label:"bot",icon:ub},{to:"/docs/skill",label:"skill",icon:fb},{to:"/docs/all",label:"all",icon:lb}],d0=[{to:"/admin",label:"admin",icon:cb}],m0=[{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 h0(r){const{t:u}=Vt();if(qr[r]){const o=qr[r];return{title:u(o.title),subtitle:u(o.subtitle)}}const s="/"+r.split("/").filter(Boolean)[0];if(qr[s]){const o=qr[s],f=r.split("/").filter(Boolean).slice(1).join(" / ");return{title:u(o.title),subtitle:f||u(o.subtitle)}}return{title:r.slice(1).replace(/\//g," // ")||"home"}}function p0(r,u){return r==="/home"?u==="/home":r==="/dashboard"?u==="/dashboard":u.startsWith(r)}function _0(){const[r,u]=g.useState("");return g.useEffect(()=>{const s=document.createElement("div");s.style.height="env(safe-area-inset-bottom, -1px)",document.body.appendChild(s);const o=getComputedStyle(s).height;document.body.removeChild(s),window.matchMedia("(display-mode: standalone)").matches;const f=document.querySelector(".mobile-bottom-nav"),h=f?f.offsetHeight:"?",p=f?getComputedStyle(f).paddingBottom:"?",b=f?f.getBoundingClientRect():null,y=b?Math.round(b.bottom):"?";u(`env=${o} navH=${h} navPB=${p} navBot=${y} vh=${window.innerHeight} scr=${screen.height}`)},[]),r?m.jsx("div",{className:"fixed top-16 left-2 right-2 z-50 rounded-[4px] bg-red-600 px-3 py-2 text-[9px] text-white font-mono md:hidden",children:r}):null}function g0(){const r=gt(),{t:u}=Vt(),s={terminal:u("terminal_home.title"),dashboard:u("dashboard.title"),tasks:u("tasks.title"),workers:u("workers.title")};return m.jsxs("nav",{className:"mobile-bottom-nav fixed bottom-0 left-0 right-0 flex items-center justify-around border-t border-[var(--border)] bg-[var(--bg-card)] z-40 md:hidden",style:{paddingTop:8},children:[m0.map(({to:o,label:f,icon:h})=>{const p=p0(o,r.pathname);return m.jsxs(Js,{to:o,className:"flex flex-1 flex-col items-center gap-1",children:[m.jsx(h,{size:18,className:p?"text-[var(--accent)]":"text-[var(--text-muted)]"}),m.jsx("span",{className:`text-[11px] lowercase ${p?"font-bold text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:s[f]??f})]},o)}),m.jsx(Sp,{renderTrigger:o=>m.jsxs("button",{type:"button",onClick:o,className:"flex flex-1 flex-col items-center gap-1",children:[m.jsx(tp,{size:18,className:"text-[var(--text-muted)]"}),m.jsx("span",{className:"text-[11px] lowercase text-[var(--text-muted)]",children:u("common.search_placeholder")})]})})]})}function y0(){const r=Fa(),{t:u}=Vt();return m.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:[m.jsxs("button",{onClick:()=>r("/home"),className:"flex items-center gap-2",style:{background:"none",border:"none",padding:0},children:[m.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-[4px] bg-[var(--accent)]",children:m.jsx("span",{className:"text-sm font-semibold",style:{color:"#0C0C0C"},children:"~"})}),m.jsx("span",{className:"text-sm font-bold lowercase text-[var(--text-primary)]",children:u("common.overlord")})]}),m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx("button",{onClick:()=>r("/profile"),className:"p-2 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]","aria-label":u("common.profile"),children:m.jsx(hb,{size:18})}),m.jsx(xp,{}),m.jsx(sp,{})]})]})}function zs({label:r,items:u,collapsed:s}){return m.jsxs("div",{className:"mt-4 first:mt-0",children:[!s&&m.jsx("div",{className:"mb-2 px-3 text-xs lowercase",style:{color:"var(--text-muted)"},children:r}),u.map(({to:o,label:f,icon:h})=>m.jsx(Js,{to:o,className:({isActive:p})=>`flex items-center text-sm lowercase transition-colors ${s?"justify-center py-3":"gap-2.5 px-3 py-1.5"} ${p?"text-[var(--accent)] bg-[var(--accent)]/5":"text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:({isActive:p})=>m.jsxs(m.Fragment,{children:[m.jsx(h,{size:14,style:{flexShrink:0}}),!s&&m.jsx("span",{children:p?`> ${f}`:` ${f}`})]})},o))]})}function v0(){const{user:r,logout:u}=xa(),s=Fa(),[o,f]=g.useState(!1),h=yb(),{t:p}=Vt(),{sidebarCollapsed:b,toggleSidebar:y}=bb();function _(){u(),s("/login")}return m.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:[m.jsx("div",{className:"flex items-center px-5",style:{height:48},children:m.jsxs("button",{onClick:()=>s("/home"),className:"flex items-center gap-2.5",style:{background:"none",border:"none",padding:0},children:[m.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-[4px] bg-[var(--accent)]",style:{flexShrink:0},children:m.jsx("span",{className:"text-lg font-semibold",style:{color:"#0C0C0C"},children:"~"})}),!b&&m.jsx("span",{className:"text-base font-bold lowercase tracking-tight",style:{color:"var(--text-primary)"},children:p("common.overlord")})]})}),m.jsxs("nav",{className:"flex-1 px-3 pt-2",children:[m.jsx(zs,{label:p("common.navigation"),items:c0,collapsed:b}),m.jsx(zs,{label:p("common.docs_section"),items:f0,collapsed:b}),h&&m.jsx(zs,{label:p("common.admin_section"),items:d0,collapsed:b})]}),m.jsx("div",{className:`px-3 py-1 ${b?"flex justify-center":""}`,children:m.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?m.jsx(Wv,{size:14}):m.jsx($v,{size:14})})}),m.jsx("div",{className:"border-t border-[var(--border)] p-3",children:m.jsxs("div",{className:`flex items-center py-2 ${b?"justify-center":"gap-3 px-3"}`,children:[m.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:p("common.profile"),children:((r==null?void 0:r.username)??"u")[0].toUpperCase()}),!b&&m.jsxs(m.Fragment,{children:[m.jsxs("button",{onClick:()=>s("/profile"),className:"min-w-0 flex-1 text-left transition-colors hover:opacity-80",title:p("common.profile"),children:[m.jsx("div",{className:"truncate text-sm lowercase",style:{color:"var(--text-primary)"},children:(r==null?void 0:r.username)??"user"}),m.jsx("div",{className:"truncate text-xs lowercase",style:{color:"var(--text-muted)"},children:(r==null?void 0:r.role)??"user"})]}),m.jsx("button",{onClick:()=>f(!0),className:"p-1 text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)]","aria-label":p("common.log_out"),children:m.jsx(rb,{size:14})})]})]})}),m.jsx(n0,{isOpen:o,onClose:()=>f(!1),onConfirm:_,title:p("common.logout_title"),message:p("common.logout_message"),confirmLabel:p("common.logout"),confirmVariant:"warning"})]})}function b0({headerActions:r,subtitleOverride:u}){const s=gt(),{title:o,subtitle:f}=h0(s.pathname),h=u??f;return m.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:[m.jsxs("div",{className:"text-sm lowercase",children:[m.jsx("span",{style:{color:"var(--text-primary)"},children:o}),h&&m.jsxs("span",{style:{color:"var(--text-muted)"},children:[" ","// ",h]})]}),m.jsxs("div",{className:"flex items-center gap-3",children:[r,m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx(Sp,{}),m.jsx(xp,{}),m.jsx(sp,{})]})]})]})}function x0(){const[r,u]=g.useState(null),[s,o]=g.useState(null),f=gt(),h=f.pathname==="/home",p=f.pathname.startsWith("/docs");return g.useEffect(()=>Sb.getState().init(),[]),m.jsxs("div",{className:"fixed inset-0 flex font-mono",children:[m.jsx(v0,{}),m.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[m.jsx(y0,{}),m.jsx(_0,{}),!p&&m.jsx(b0,{headerActions:r,subtitleOverride:s}),m.jsx(s0,{className:h?"flex-1 overflow-hidden bg-[var(--bg-primary)]":"flex-1 overflow-auto bg-[var(--bg-primary)] p-4 pb-6 md:p-6 md:pb-6",children:m.jsx(kp.Provider,{value:{setActions:u},children:m.jsx(Ep.Provider,{value:{setSubtitle:o},children:m.jsx(uv,{})})})}),m.jsx(r0,{}),m.jsx(u0,{}),m.jsx("div",{className:"shrink-0 md:hidden",style:{height:60}})]}),m.jsx(g0,{})]})}function zh(r){var s;const u=(s=r.state)==null?void 0:s.from;return u?{from:u}:{from:{pathname:r.pathname,search:r.search}}}function li({children:r,requireAdmin:u=!1}){const{accessToken:s,user:o,requireTotpSetup:f,initializing:h}=xa(),p=gt();if(h)return m.jsx("div",{className:"flex h-screen items-center justify-center",children:m.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})});if(!s)return m.jsx(ll,{to:"/login",state:zh(p),replace:!0});if(f){const b=zh(p);return p.pathname!=="/totp-setup"&&p.pathname!=="/bind"?m.jsx(ll,{to:"/totp-setup",state:b,replace:!0}):p.pathname==="/bind"?(sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(b.from)),m.jsx(ll,{to:"/totp-setup",state:b,replace:!0})):m.jsx(m.Fragment,{children:r})}return u&&(o==null?void 0:o.role)!==ip.ADMIN?m.jsx(ll,{to:"/home",replace:!0}):m.jsx(m.Fragment,{children:r})}function S0({children:r}){const{theme:u,resolved:s,setResolved:o}=op();return g.useEffect(()=>{if(u!=="system"){o(u);return}const f=window.matchMedia("(prefers-color-scheme: dark)");o(f.matches?"dark":"light");const h=p=>o(p.matches?"dark":"light");return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[u,o]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",s==="dark")},[s]),m.jsx(m.Fragment,{children:r})}class k0 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?m.jsxs("div",{className:"flex h-full min-h-[300px] flex-col items-center justify-center gap-4 p-8 font-mono",children:[m.jsx("span",{className:"text-lg font-bold text-[var(--destructive)]",children:Br("common.runtime_error")}),m.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")}),m.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:[m.jsx(ep,{className:"h-3.5 w-3.5"}),Br("common.reload")]})]}):this.props.children}}function E0({isOpen:r}){const u=Fa(),{logout:s,setSessionExpired:o}=xa(),{t:f}=Vt();function h(){s(),o(!1),u("/login")}return r?m.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[m.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),m.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:m.jsxs("div",{className:"flex flex-col items-center px-8 py-10",children:[m.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-full bg-[var(--warning)]/10",children:m.jsx(ib,{className:"h-7 w-7 text-[var(--warning)]"})}),m.jsx("h3",{className:"mb-2 text-base font-bold text-[var(--text-primary)]",children:f("auth.session_expired")}),m.jsx("p",{className:"mb-8 text-center text-xs text-[var(--text-secondary)]",children:f("auth.session_expired_message")}),m.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:h,children:f("auth.go_to_login")})]})})]}):null}const Ch=5;let ba=[];const Bs=new Set;function wp(){Bs.forEach(r=>r())}function w0(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Wa(r,u,s=4e3){const o=w0();return ba=[...ba,{id:o,variant:r,message:u,duration:s}],ba.length>Ch&&(ba=ba.slice(ba.length-Ch)),wp(),o}Wa.success=(r,u)=>Wa("success",r,u);Wa.error=(r,u)=>Wa("error",r,u);Wa.warning=(r,u)=>Wa("warning",r,u);Wa.info=(r,u)=>Wa("info",r,u);function T0(r){ba=ba.filter(u=>u.id!==r),wp()}function j0(){const[,r]=g.useState(0);return g.useEffect(()=>{const u=()=>r(s=>s+1);return Bs.add(u),()=>{Bs.delete(u)}},[]),ba}const R0={success:{icon:Fv,borderColor:"var(--accent)"},error:{icon:Iv,borderColor:"var(--destructive)"},warning:{icon:np,borderColor:"var(--warning)"},info:{icon:ab,borderColor:"var(--info)"}};function A0({item:r}){const u=R0[r.variant],s=u.icon,{t:o}=Vt(),f=g.useCallback(()=>T0(r.id),[r.id]);return g.useEffect(()=>{if(!r.duration)return;const h=setTimeout(f,r.duration);return()=>clearTimeout(h)},[r.duration,f]),m.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:[m.jsx(s,{className:"h-4 w-4 shrink-0",style:{color:u.borderColor}}),m.jsx("p",{className:"flex-1 text-xs text-[var(--text-primary)]",children:r.message}),m.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:m.jsx(lp,{className:"h-3.5 w-3.5"})})]})}function z0(){const r=j0();return r.length===0?null:m.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:r.map(u=>m.jsx("div",{className:"pointer-events-auto",children:m.jsx(A0,{item:u})},u.id))})}const C0=g.lazy(()=>ne(()=>import("./LandingPage-BbIBmqXQ.js"),__vite__mapDeps([0,1,2,3,4,5]))),O0=g.lazy(()=>ne(()=>import("./LoginPage-DBvY2-RL.js"),[])),D0=g.lazy(()=>ne(()=>import("./TotpSetupPage-B60lPql9.js"),[])),N0=g.lazy(()=>ne(()=>import("./NotFoundPage-BHGsABKV.js"),[])),M0=g.lazy(()=>ne(()=>import("./HomePage-DbnMuUQo.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,1]))),U0=g.lazy(()=>ne(()=>import("./TerminalHomePage-DtyStII6.js"),__vite__mapDeps([15,16,17,18,10,11,19,8,12,14,20,21,22]))),q0=g.lazy(()=>ne(()=>import("./TaskListPage-p5bJL71v.js"),__vite__mapDeps([23,16,7,8,12,13,19,5,24,9,20]))),L0=g.lazy(()=>ne(()=>import("./TaskDetailPage-DBeni0k5.js"),__vite__mapDeps([25,16,17,18,12,19,8,26,21,27,28]))),H0=g.lazy(()=>ne(()=>import("./WorkerListPage-DztJ3QSS.js"),__vite__mapDeps([29,8,30,31,32,33,34,22,5,28,19,24,9,14,20]))),B0=g.lazy(()=>ne(()=>import("./WorkerDetailPage-Dzqe65ff.js"),__vite__mapDeps([35,12,8,36,30,14,37,26]))),Y0=g.lazy(()=>ne(()=>import("./WorkerSetupGuidePage-BJUwY6cD.js"),__vite__mapDeps([31,32,33,34,22]))),G0=g.lazy(()=>ne(()=>import("./ProjectListPage-AnhEn3Th.js"),__vite__mapDeps([38,19,24,9,12,14,20]))),V0=g.lazy(()=>ne(()=>import("./ProjectDetailPage-Bz6OhmPY.js"),__vite__mapDeps([39,40,19,12,8,36,14,41,37,20]))),X0=g.lazy(()=>ne(()=>import("./EditProjectPage-D28Hz-Fy.js"),__vite__mapDeps([42,19,40,20]))),Q0=g.lazy(()=>ne(()=>import("./PipelineEditorPage-B_YcB5Ib.js"),__vite__mapDeps([43,19,13]))),Z0=g.lazy(()=>ne(()=>import("./ProfilePage-DqdenVXL.js"),__vite__mapDeps([44,45,36,14]))),K0=g.lazy(()=>ne(()=>import("./BindPlatformPage-Cpdzj1Tk.js"),[])),J0=g.lazy(()=>ne(()=>import("./AccessTokensPage-sK3N2u_u.js"),__vite__mapDeps([46,19,24,9,12,14,20,5,37]))),$0=g.lazy(()=>ne(()=>import("./CliReferencePage-f-wWhwLh.js"),__vite__mapDeps([47,48,5,20]))),W0=g.lazy(()=>ne(()=>import("./ApiReferencePage-BsgCrdnS.js"),__vite__mapDeps([49,48,5,20]))),F0=g.lazy(()=>ne(()=>import("./SkillPage-B6Jnx-8h.js"),__vite__mapDeps([50,51,5,27]))),I0=g.lazy(()=>ne(()=>import("./DocsLayout-z2g7mdGc.js"),__vite__mapDeps([52,26]))),P0=g.lazy(()=>ne(()=>import("./InstallationPage-Zx2k7j6q.js"),__vite__mapDeps([53,51,5]))),e1=g.lazy(()=>ne(()=>import("./DeveloperSetupPage-BmTBvVsJ.js"),__vite__mapDeps([54,51,5]))),t1=g.lazy(()=>ne(()=>import("./WorkerSetupPage-BlKJ3bPt.js"),__vite__mapDeps([55,51,5]))),a1=g.lazy(()=>ne(()=>import("./BotSetupPage-CytZ4Gx8.js"),__vite__mapDeps([56,51,5]))),n1=g.lazy(()=>ne(()=>import("./LocalDevelopmentPage-04D-pooV.js"),__vite__mapDeps([57,51,5]))),l1=g.lazy(()=>ne(()=>import("./WorkerOperationsPage-D61Et5DA.js"),[])),i1=g.lazy(()=>ne(()=>import("./DeploymentPage-BsmGTiaf.js"),__vite__mapDeps([58,51,5]))),Oh=g.lazy(()=>ne(()=>import("./BotIntegrationPage-aKGUVx5x.js"),[])),r1=g.lazy(()=>ne(()=>import("./PipelineConfigPage-BbWnlaOA.js"),__vite__mapDeps([59,51,5]))),u1=g.lazy(()=>ne(()=>import("./DevWorkflowPage-BTWCu80T.js"),__vite__mapDeps([60,51,5]))),o1=g.lazy(()=>ne(()=>import("./PermissionsPage-C8dwmqg7.js"),[])),s1=g.lazy(()=>ne(()=>import("./EnvVariablesPage-DYPddx7m.js"),[])),c1=g.lazy(()=>ne(()=>import("./ArchitecturePage-HfB8jUUK.js"),__vite__mapDeps([61,51,5]))),f1=g.lazy(()=>ne(()=>import("./ChangelogPage-DIrrMqIX.js"),[])),d1=g.lazy(()=>ne(()=>import("./DocsIndexPage-Dlr1y2GY.js"),__vite__mapDeps([62,33,2,3,34]))),m1=g.lazy(()=>ne(()=>import("./AdminPage-T2N8gkga.js"),__vite__mapDeps([63,4,2,64,34]))),h1=g.lazy(()=>ne(()=>import("./DeveloperManage-CiTFC11g.js"),__vite__mapDeps([65,19,45,24,9,14,8,20,4,41,21]))),p1=g.lazy(()=>ne(()=>import("./BotManage-DZoCrtbr.js"),__vite__mapDeps([66,19,51,5,37,20,24,9,14,8,2,41]))),_1=g.lazy(()=>ne(()=>import("./TokenManage-9AYk-a5X.js"),__vite__mapDeps([67,32,5,27,24,9,14,8,20]))),g1=g.lazy(()=>ne(()=>import("./AuditLogPage-C8j1IYdY.js"),__vite__mapDeps([68,19,24,9,64,11]))),y1=g.lazy(()=>ne(()=>import("./SettingsPage-OH6QNvBA.js"),[]));function v1(){return m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})})}function b1(){const r=xa(u=>u.sessionExpired);return m.jsxs(S0,{children:[m.jsx(z0,{}),m.jsx(k0,{children:m.jsxs(Nv,{children:[m.jsx(E0,{isOpen:r}),m.jsx(g.Suspense,{fallback:m.jsx(v1,{}),children:m.jsxs(sv,{children:[m.jsx(te,{path:"/",element:m.jsx(C0,{})}),m.jsx(te,{path:"/login",element:m.jsx(O0,{})}),m.jsx(te,{path:"/totp-setup",element:m.jsx(li,{children:m.jsx(D0,{})})}),m.jsx(te,{path:"/bind",element:m.jsx(li,{children:m.jsx(K0,{})})}),m.jsxs(te,{element:m.jsx(li,{children:m.jsx(x0,{})}),children:[m.jsx(te,{path:"/home",element:m.jsx(U0,{})}),m.jsx(te,{path:"/dashboard",element:m.jsx(M0,{})}),m.jsx(te,{path:"/tasks",element:m.jsx(q0,{})}),m.jsx(te,{path:"/tasks/:id",element:m.jsx(L0,{})}),m.jsx(te,{path:"/workers",element:m.jsx(H0,{})}),m.jsx(te,{path:"/workers/setup",element:m.jsx(li,{requireAdmin:!0,children:m.jsx(Y0,{})})}),m.jsx(te,{path:"/workers/:id",element:m.jsx(B0,{})}),m.jsx(te,{path:"/projects",element:m.jsx(G0,{})}),m.jsx(te,{path:"/projects/:key",element:m.jsx(V0,{})}),m.jsx(te,{path:"/projects/:key/edit",element:m.jsx(X0,{})}),m.jsx(te,{path:"/projects/:key/pipeline",element:m.jsx(Q0,{})}),m.jsx(te,{path:"/profile",element:m.jsx(Z0,{})}),m.jsx(te,{path:"/access-tokens",element:m.jsx(J0,{})}),m.jsxs(te,{path:"/docs",element:m.jsx(I0,{}),children:[m.jsx(te,{index:!0,element:m.jsx(ll,{to:"cli",replace:!0})}),m.jsx(te,{path:"cli",element:m.jsx($0,{})}),m.jsx(te,{path:"api",element:m.jsx(W0,{})}),m.jsx(te,{path:"bot",element:m.jsx(Oh,{})}),m.jsx(te,{path:"all",element:m.jsx(d1,{})}),m.jsx(te,{path:"skill",element:m.jsx(F0,{})}),m.jsx(te,{path:"installation",element:m.jsx(P0,{})}),m.jsx(te,{path:"developer-setup",element:m.jsx(e1,{})}),m.jsx(te,{path:"worker-setup",element:m.jsx(t1,{})}),m.jsx(te,{path:"bot-setup",element:m.jsx(a1,{})}),m.jsx(te,{path:"local-development",element:m.jsx(n1,{})}),m.jsx(te,{path:"worker-operations",element:m.jsx(l1,{})}),m.jsx(te,{path:"deployment",element:m.jsx(i1,{})}),m.jsx(te,{path:"bot-integration",element:m.jsx(Oh,{})}),m.jsx(te,{path:"pipeline-config",element:m.jsx(r1,{})}),m.jsx(te,{path:"dev-workflow",element:m.jsx(u1,{})}),m.jsx(te,{path:"permissions",element:m.jsx(o1,{})}),m.jsx(te,{path:"env-variables",element:m.jsx(s1,{})}),m.jsx(te,{path:"architecture",element:m.jsx(c1,{})}),m.jsx(te,{path:"changelog",element:m.jsx(f1,{})})]}),m.jsxs(te,{path:"/admin",element:m.jsx(li,{requireAdmin:!0,children:m.jsx(m1,{})}),children:[m.jsx(te,{index:!0,element:m.jsx(ll,{to:"developers",replace:!0})}),m.jsx(te,{path:"developers",element:m.jsx(h1,{})}),m.jsx(te,{path:"bots",element:m.jsx(p1,{})}),m.jsx(te,{path:"tokens",element:m.jsx(_1,{})}),m.jsx(te,{path:"audit-logs",element:m.jsx(g1,{})}),m.jsx(te,{path:"settings",element:m.jsx(y1,{})})]})]}),m.jsx(te,{path:"*",element:m.jsx(N0,{})})]})})]})})]})}xa.getState().initialize();uy.createRoot(document.getElementById("root")).render(m.jsx(g.StrictMode,{children:m.jsx(b1,{})}));export{j1 as A,ep as B,Jv as C,ip as D,rb as E,k1 as F,A1 as G,Ns as H,R1 as I,Pv as J,nb as K,$h as L,ub as M,ll as N,fb as O,r0 as P,Js as Q,Rr as R,ap as S,sp as T,uv as U,z1 as V,w1 as W,lp as X,C1 as Y,Iv as Z,Vt as a,$s as b,xe as c,cb as d,lb as e,Fa as f,gt as g,Xr as h,yb as i,m as j,Sb as k,Fr as l,E1 as m,N1 as n,D1 as o,tp as p,Ph as q,g as r,O1 as s,Wa as t,xa as u,n0 as v,S1 as w,Fv as x,np as y,T1 as z};
|