@overlordai/server 1.0.128 → 1.0.130
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/dist/adapters/adapter.module.js +1 -2
- package/dist/adapters/adapter.module.js.map +1 -1
- package/dist/adapters/adapter.registry.d.ts +4 -1
- package/dist/adapters/adapter.registry.d.ts.map +1 -1
- package/dist/adapters/adapter.registry.js +14 -6
- package/dist/adapters/adapter.registry.js.map +1 -1
- package/dist/adapters/lark/lark.adapter.js +7 -15
- package/dist/adapters/lark/lark.adapter.js.map +1 -1
- package/dist/adapters/lark/lark.controller.js +1 -6
- package/dist/adapters/lark/lark.controller.js.map +1 -1
- package/dist/adapters/slack/slack.adapter.js +8 -16
- package/dist/adapters/slack/slack.adapter.js.map +1 -1
- package/dist/adapters/slack/slack.controller.js +1 -6
- package/dist/adapters/slack/slack.controller.js.map +1 -1
- package/dist/auth/auth.controller.js +0 -1
- package/dist/auth/auth.controller.js.map +1 -1
- package/dist/auth/auth.service.js +1 -5
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/auth/extract-user.middleware.js +0 -1
- package/dist/auth/extract-user.middleware.js.map +1 -1
- package/dist/auth/guards/jwt-auth.guard.js +0 -3
- package/dist/auth/guards/jwt-auth.guard.js.map +1 -1
- package/dist/auth/guards/project-role.guard.js +0 -2
- package/dist/auth/guards/project-role.guard.js.map +1 -1
- package/dist/auth/guards/roles.guard.js +0 -1
- package/dist/auth/guards/roles.guard.js.map +1 -1
- package/dist/auth/jwt.strategy.js +0 -2
- package/dist/auth/jwt.strategy.js.map +1 -1
- package/dist/common/crypto.service.js +3 -1
- package/dist/common/crypto.service.js.map +1 -1
- package/dist/common/error-filter.js +3 -1
- package/dist/common/error-filter.js.map +1 -1
- package/dist/common/health.controller.js +0 -2
- package/dist/common/health.controller.js.map +1 -1
- package/dist/common/logger.service.js +0 -1
- package/dist/common/logger.service.js.map +1 -1
- package/dist/common/rate-limit.guard.js +3 -5
- package/dist/common/rate-limit.guard.js.map +1 -1
- package/dist/common/string-utils.d.ts.map +1 -1
- package/dist/common/string-utils.js +8 -4
- package/dist/common/string-utils.js.map +1 -1
- package/dist/database/database.service.js +3 -3
- package/dist/database/database.service.js.map +1 -1
- package/dist/database/repositories/audit-log.repository.js +0 -1
- package/dist/database/repositories/audit-log.repository.js.map +1 -1
- package/dist/database/repositories/bot.repository.js +0 -1
- package/dist/database/repositories/bot.repository.js.map +1 -1
- package/dist/database/repositories/developer-token.repository.js +0 -1
- package/dist/database/repositories/developer-token.repository.js.map +1 -1
- package/dist/database/repositories/developer.repository.js +1 -2
- package/dist/database/repositories/developer.repository.js.map +1 -1
- package/dist/database/repositories/notification.repository.js +0 -1
- package/dist/database/repositories/notification.repository.js.map +1 -1
- package/dist/database/repositories/project-member.repository.js +0 -1
- package/dist/database/repositories/project-member.repository.js.map +1 -1
- package/dist/database/repositories/project.repository.js +0 -1
- package/dist/database/repositories/project.repository.js.map +1 -1
- package/dist/database/repositories/session.repository.js +0 -1
- package/dist/database/repositories/session.repository.js.map +1 -1
- package/dist/database/repositories/task.repository.js +0 -1
- package/dist/database/repositories/task.repository.js.map +1 -1
- package/dist/database/repositories/worker-token.repository.js +0 -1
- package/dist/database/repositories/worker-token.repository.js.map +1 -1
- package/dist/database/repositories/worker.repository.js +0 -1
- package/dist/database/repositories/worker.repository.js.map +1 -1
- package/dist/database/repositories/workspace.repository.js +0 -1
- package/dist/database/repositories/workspace.repository.js.map +1 -1
- package/dist/dispatcher/capability.service.js +9 -7
- package/dist/dispatcher/capability.service.js.map +1 -1
- package/dist/dispatcher/cleanup.service.js +1 -4
- package/dist/dispatcher/cleanup.service.js.map +1 -1
- package/dist/dispatcher/dedup.service.js +0 -1
- package/dist/dispatcher/dedup.service.js.map +1 -1
- package/dist/dispatcher/dispatcher.service.js +1 -11
- package/dist/dispatcher/dispatcher.service.js.map +1 -1
- package/dist/dispatcher/heartbeat.service.js +2 -7
- package/dist/dispatcher/heartbeat.service.js.map +1 -1
- package/dist/dispatcher/pty-relay.service.js +5 -8
- package/dist/dispatcher/pty-relay.service.js.map +1 -1
- package/dist/dispatcher/reconciler.js +4 -12
- package/dist/dispatcher/reconciler.js.map +1 -1
- package/dist/dispatcher/scheduler.service.d.ts.map +1 -1
- package/dist/dispatcher/scheduler.service.js +4 -15
- package/dist/dispatcher/scheduler.service.js.map +1 -1
- package/dist/dispatcher/stage-confirm-timeout.service.js +2 -5
- package/dist/dispatcher/stage-confirm-timeout.service.js.map +1 -1
- package/dist/dispatcher/task-creation.service.js +1 -12
- package/dist/dispatcher/task-creation.service.js.map +1 -1
- package/dist/dispatcher/task-lifecycle.service.js +1 -11
- package/dist/dispatcher/task-lifecycle.service.js.map +1 -1
- package/dist/dispatcher/task-log-batcher.js +3 -6
- package/dist/dispatcher/task-log-batcher.js.map +1 -1
- package/dist/dispatcher/task-name.service.js +3 -1
- package/dist/dispatcher/task-name.service.js.map +1 -1
- package/dist/dispatcher/worker-auth.service.js +1 -8
- package/dist/dispatcher/worker-auth.service.js.map +1 -1
- package/dist/dispatcher/worker-connection.manager.js +5 -3
- package/dist/dispatcher/worker-connection.manager.js.map +1 -1
- package/dist/dispatcher/worker-selector.d.ts +2 -0
- package/dist/dispatcher/worker-selector.d.ts.map +1 -1
- package/dist/dispatcher/worker-selector.js +87 -18
- package/dist/dispatcher/worker-selector.js.map +1 -1
- package/dist/notifier/debouncer.js +5 -3
- package/dist/notifier/debouncer.js.map +1 -1
- package/dist/notifier/notification-consumer.js +6 -14
- package/dist/notifier/notification-consumer.js.map +1 -1
- package/dist/notifier/notification-event-listener.js +1 -3
- package/dist/notifier/notification-event-listener.js.map +1 -1
- package/dist/notifier/notifier.service.js +1 -5
- package/dist/notifier/notifier.service.js.map +1 -1
- package/dist/redis/redis.service.js +0 -1
- package/dist/redis/redis.service.js.map +1 -1
- package/dist/web/admin/admin-audit.controller.js +0 -1
- package/dist/web/admin/admin-audit.controller.js.map +1 -1
- package/dist/web/admin/admin-bot.controller.js +0 -3
- package/dist/web/admin/admin-bot.controller.js.map +1 -1
- package/dist/web/admin/admin-developer.controller.js +0 -4
- package/dist/web/admin/admin-developer.controller.js.map +1 -1
- package/dist/web/admin/admin-project.controller.js +0 -3
- package/dist/web/admin/admin-project.controller.js.map +1 -1
- package/dist/web/admin/admin-settings.controller.js +0 -2
- package/dist/web/admin/admin-settings.controller.js.map +1 -1
- package/dist/web/admin/admin-token.controller.js +0 -4
- package/dist/web/admin/admin-token.controller.js.map +1 -1
- package/dist/web/admin/admin-worker.controller.js +1 -7
- package/dist/web/admin/admin-worker.controller.js.map +1 -1
- package/dist/web/dashboard.controller.js +0 -3
- package/dist/web/dashboard.controller.js.map +1 -1
- package/dist/web/dashboard.service.js +10 -13
- package/dist/web/dashboard.service.js.map +1 -1
- package/dist/web/event.gateway.js +4 -8
- package/dist/web/event.gateway.js.map +1 -1
- package/dist/web/frame-handlers/frame-handler.registry.js +2 -2
- package/dist/web/frame-handlers/frame-handler.registry.js.map +1 -1
- package/dist/web/frame-handlers/heartbeat.handler.js +2 -4
- package/dist/web/frame-handlers/heartbeat.handler.js.map +1 -1
- package/dist/web/frame-handlers/progress.handler.js +2 -10
- package/dist/web/frame-handlers/progress.handler.js.map +1 -1
- package/dist/web/frame-handlers/stage-choice.handler.js +2 -5
- package/dist/web/frame-handlers/stage-choice.handler.js.map +1 -1
- package/dist/web/frame-handlers/stage-confirm.handler.js +2 -5
- package/dist/web/frame-handlers/stage-confirm.handler.js.map +1 -1
- package/dist/web/frame-handlers/stage-input.handler.js +2 -5
- package/dist/web/frame-handlers/stage-input.handler.js.map +1 -1
- package/dist/web/frame-handlers/tunnel.handler.js +1 -2
- package/dist/web/frame-handlers/tunnel.handler.js.map +1 -1
- package/dist/web/interaction.service.js +1 -4
- package/dist/web/interaction.service.js.map +1 -1
- package/dist/web/notification.controller.js +0 -1
- package/dist/web/notification.controller.js.map +1 -1
- package/dist/web/profile.controller.js +0 -5
- package/dist/web/profile.controller.js.map +1 -1
- package/dist/web/project-member.service.js +0 -3
- package/dist/web/project-member.service.js.map +1 -1
- package/dist/web/project.controller.js +0 -7
- package/dist/web/project.controller.js.map +1 -1
- package/dist/web/pty.gateway.js +6 -12
- package/dist/web/pty.gateway.js.map +1 -1
- package/dist/web/search.service.js +1 -2
- package/dist/web/search.service.js.map +1 -1
- package/dist/web/task.controller.js +0 -7
- package/dist/web/task.controller.js.map +1 -1
- package/dist/web/tunnel.service.js +10 -12
- package/dist/web/tunnel.service.js.map +1 -1
- package/dist/web/web-event.service.js +4 -2
- package/dist/web/web-event.service.js.map +1 -1
- package/dist/web/worker-channel.gateway.js +3 -11
- package/dist/web/worker-channel.gateway.js.map +1 -1
- package/dist/web/worker-web.controller.js +0 -2
- package/dist/web/worker-web.controller.js.map +1 -1
- package/dist/web/worker.controller.js +0 -3
- package/dist/web/worker.controller.js.map +1 -1
- package/dist/web/workspace.controller.js +1 -5
- package/dist/web/workspace.controller.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-BKPOeLH5.js → AccessTokensPage-CZ_Yavhf.js} +1 -1
- package/public/assets/{AdminPage-Bt8zsqUd.js → AdminPage-BlGfVUEg.js} +1 -1
- package/public/assets/{AgentCliPage-CvGgoJPi.js → AgentCliPage-CQpk2Yo_.js} +1 -1
- package/public/assets/{ApiReferencePage-BgTKVERG.js → ApiReferencePage-DsFA13KQ.js} +1 -1
- package/public/assets/{ArchitecturePage-B2jMT8On.js → ArchitecturePage-DDc-vReK.js} +1 -1
- package/public/assets/{AuditLogPage-BoB6en9-.js → AuditLogPage-BLTNLR9x.js} +1 -1
- package/public/assets/{BindPlatformPage-GJUb4y8U.js → BindPlatformPage-DLQdiRFL.js} +1 -1
- package/public/assets/{BotIntegrationPage-tvED2fvw.js → BotIntegrationPage-D6-XQG0r.js} +1 -1
- package/public/assets/{BotManage-Bb2nQJJ0.js → BotManage-DRTJDHW6.js} +1 -1
- package/public/assets/{BotSetupPage-IL_UG9mQ.js → BotSetupPage-ByjmKjXY.js} +1 -1
- package/public/assets/{ChangelogPage-IqI_PvlI.js → ChangelogPage-n7yRBO_5.js} +1 -1
- package/public/assets/{CliReferencePage-BK-20Xy3.js → CliReferencePage-B6gTsb4v.js} +1 -1
- package/public/assets/{DeploymentPage-CTegdPV6.js → DeploymentPage-CWhXb1UF.js} +1 -1
- package/public/assets/{DevWorkflowPage-D7X6FWv1.js → DevWorkflowPage-nTHhaHVz.js} +1 -1
- package/public/assets/{DeveloperManage-D0-xLBLk.js → DeveloperManage-APQbY_-q.js} +1 -1
- package/public/assets/{DeveloperSetupPage-DvypSJpw.js → DeveloperSetupPage-Bq-eKaT0.js} +1 -1
- package/public/assets/{DocsIndexPage-DFyZPfbE.js → DocsIndexPage-CzA83ol_.js} +1 -1
- package/public/assets/{DocsLayout-CetUdZqe.js → DocsLayout-Du6H0AOl.js} +1 -1
- package/public/assets/{DocsPrimitives-mEubiuOB.js → DocsPrimitives-CtwiZVPN.js} +1 -1
- package/public/assets/{EditProjectPage-DNwgYV6X.js → EditProjectPage-IRTaCyfg.js} +1 -1
- package/public/assets/{EmptyState-Oty9amb7.js → EmptyState-BBNo8OWr.js} +1 -1
- package/public/assets/{EnvVariablesPage-DCciQfa-.js → EnvVariablesPage-CY6bnuuq.js} +1 -1
- package/public/assets/{HomePage-CmLwPGXq.js → HomePage-DSD_C6l7.js} +1 -1
- package/public/assets/{InfoRow-wMRXVXpM.js → InfoRow-BZWqE07x.js} +1 -1
- package/public/assets/{InstallationPage-21iKvpOv.js → InstallationPage-BvBVyGkY.js} +1 -1
- package/public/assets/{LandingPage-jbch85jE.js → LandingPage-CP_wXo09.js} +1 -1
- package/public/assets/{LocalDevelopmentPage-CI0OCaIU.js → LocalDevelopmentPage-BxVqnOjh.js} +1 -1
- package/public/assets/{LoginPage-BlsMAD1A.js → LoginPage-Dfe5P2Mc.js} +1 -1
- package/public/assets/{MetricBar-Bbvo0mjB.js → MetricBar-LoaKP4Qj.js} +1 -1
- package/public/assets/{NotFoundPage-M_tndhpI.js → NotFoundPage-CZ6vHhxQ.js} +1 -1
- package/public/assets/{OnboardingGuide-DXiAPgIX.js → OnboardingGuide-BH1zjho_.js} +1 -1
- package/public/assets/{PermissionsPage-WHjs-Xic.js → PermissionsPage-C89LUwtR.js} +1 -1
- package/public/assets/{PipelineConfigPage-DYgMIHFl.js → PipelineConfigPage-C2XugReU.js} +1 -1
- package/public/assets/{PipelineEditorPage-KR-x6zVv.js → PipelineEditorPage-BF3eMSCM.js} +1 -1
- package/public/assets/{ProfilePage-BswRrpWP.js → ProfilePage-DKKDCTx9.js} +1 -1
- package/public/assets/{ProjectDetailPage-DK4Unf3c.js → ProjectDetailPage-Bi-3DLgA.js} +1 -1
- package/public/assets/{ProjectListPage-B1cnV_QE.js → ProjectListPage-DznwqHll.js} +1 -1
- package/public/assets/{PtyTerminal-CAmMWJXG.js → PtyTerminal-WrI_RZpQ.js} +1 -1
- package/public/assets/{QuickAuth-9N2MyHB7.js → QuickAuth-BBWmkwhA.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-eNkQp6cY.js → RemoveMemberConfirmDialog-DmCxvpwQ.js} +1 -1
- package/public/assets/{Select-CyvSd8Z7.js → Select-9vDFfmjq.js} +1 -1
- package/public/assets/{SettingsPage-CmdqpJZQ.js → SettingsPage-C1av7piJ.js} +1 -1
- package/public/assets/{Skeleton-VdSUQFFg.js → Skeleton-02wlyIbW.js} +1 -1
- package/public/assets/{SkillPage-B8x5n4hu.js → SkillPage-DqvIM6pJ.js} +1 -1
- package/public/assets/{TaskDetailPage-CSj4LhQy.js → TaskDetailPage-CdkjfSWn.js} +1 -1
- package/public/assets/{TaskListPage-DeqS_f6c.js → TaskListPage-C9R3EahV.js} +1 -1
- package/public/assets/{TaskStatusBadge-C9OhcDPY.js → TaskStatusBadge-EkExDX2H.js} +1 -1
- package/public/assets/{TerminalHomePage-BLLueNK1.js → TerminalHomePage-DSB_fbDP.js} +1 -1
- package/public/assets/{TokenManage-ENzIGDT3.js → TokenManage-CvFjNduI.js} +1 -1
- package/public/assets/{Tooltip-BBtFBnYK.js → Tooltip-M6jDD740.js} +1 -1
- package/public/assets/{TotpSetupPage-B_fa-elI.js → TotpSetupPage-BQmRtycf.js} +1 -1
- package/public/assets/{WorkerDetailPage-Dk4mhFUa.js → WorkerDetailPage-DIlJMx4z.js} +1 -1
- package/public/assets/{WorkerListPage-CWeju-3k.js → WorkerListPage-DbjJDQp5.js} +1 -1
- package/public/assets/{WorkerOperationsPage-DG4jApiM.js → WorkerOperationsPage-B3KV1JvF.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-C48MhYel.js → WorkerSetupGuidePage-BpTJlpJ_.js} +1 -1
- package/public/assets/{WorkerSetupPage-gonzLiuJ.js → WorkerSetupPage-CcByT6so.js} +1 -1
- package/public/assets/{arrow-left-DDL_7J7U.js → arrow-left-BGperOFX.js} +1 -1
- package/public/assets/{arrow-right-D9LLcDP1.js → arrow-right-DNHRd8Z9.js} +1 -1
- package/public/assets/{bot-DJqdGwhw.js → bot-5Lo_gqmx.js} +1 -1
- package/public/assets/{chevron-left-CUl8YHGw.js → chevron-left-DSXFZLMV.js} +1 -1
- package/public/assets/{chevron-right-F8dyj3sE.js → chevron-right-Dfp83tFY.js} +1 -1
- package/public/assets/{copy-BBzWcQWg.js → copy-CPx_B7OW.js} +1 -1
- package/public/assets/{download-BdOW8aIg.js → download-Bbj-oFLZ.js} +1 -1
- package/public/assets/{external-link-C0X_bVXz.js → external-link-DIUbaHQ2.js} +1 -1
- package/public/assets/{git-fork-BK7Pwrv9.js → git-fork-CL2HOg0X.js} +1 -1
- package/public/assets/{index-DphtnUU4.js → index-B10YHYT-.js} +5 -5
- package/public/assets/{key-ChzvW9EU.js → key-DpWySYfP.js} +1 -1
- package/public/assets/{loader-circle-DqhPqgMu.js → loader-circle-8E2jyEy9.js} +1 -1
- package/public/assets/{pencil-z_sz3N76.js → pencil-DL5_zTMe.js} +1 -1
- package/public/assets/{plus-Dlq6nqWS.js → plus-4UtzNPHG.js} +1 -1
- package/public/assets/{rotate-ccw-cERx2hQ-.js → rotate-ccw-6luto6QE.js} +1 -1
- package/public/assets/{scroll-text-UqFKmWfM.js → scroll-text-BqltO3x-.js} +1 -1
- package/public/assets/{settings-BBdnc180.js → settings-DQW5ib_a.js} +1 -1
- package/public/assets/{status-colors-BNjQYquq.js → status-colors-hJddxJDA.js} +1 -1
- package/public/assets/{task-constants-CxSAELU1.js → task-constants-DQs0yKJe.js} +1 -1
- package/public/assets/{trash-2-CUymC-02.js → trash-2-DZDM_1D_.js} +1 -1
- package/public/assets/{useFetch-BwzlwOc3.js → useFetch-BCJSyxgw.js} +1 -1
- package/public/assets/{users-JOM-3Abx.js → users-DFhrcJQ0.js} +1 -1
- package/public/assets/{wifi-D5KFVZ3E.js → wifi-rj7m9aYe.js} +1 -1
- package/public/assets/{workflow-Z8lE8Hzp.js → workflow-D_3K4Ohp.js} +1 -1
- package/public/index.html +1 -1
- 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-CP_wXo09.js","assets/arrow-right-DNHRd8Z9.js","assets/bot-5Lo_gqmx.js","assets/workflow-D_3K4Ohp.js","assets/users-DFhrcJQ0.js","assets/copy-CPx_B7OW.js","assets/HomePage-DSD_C6l7.js","assets/TaskStatusBadge-EkExDX2H.js","assets/status-colors-hJddxJDA.js","assets/Skeleton-02wlyIbW.js","assets/OnboardingGuide-BH1zjho_.js","assets/chevron-right-Dfp83tFY.js","assets/date-RFA7-ZGs.js","assets/useFetch-BCJSyxgw.js","assets/Tooltip-M6jDD740.js","assets/TerminalHomePage-DSB_fbDP.js","assets/task-constants-DQs0yKJe.js","assets/PtyTerminal-WrI_RZpQ.js","assets/PtyTerminal-Beg8tuEN.css","assets/Select-9vDFfmjq.js","assets/plus-4UtzNPHG.js","assets/rotate-ccw-6luto6QE.js","assets/wifi-rj7m9aYe.js","assets/TaskListPage-C9R3EahV.js","assets/git-fork-CL2HOg0X.js","assets/EmptyState-BBNo8OWr.js","assets/chevron-left-DSXFZLMV.js","assets/TaskDetailPage-CdkjfSWn.js","assets/arrow-left-BGperOFX.js","assets/external-link-DIUbaHQ2.js","assets/loader-circle-8E2jyEy9.js","assets/WorkerListPage-DbjJDQp5.js","assets/MetricBar-LoaKP4Qj.js","assets/WorkerSetupGuidePage-BpTJlpJ_.js","assets/key-DpWySYfP.js","assets/download-Bbj-oFLZ.js","assets/settings-DQW5ib_a.js","assets/WorkerDetailPage-DIlJMx4z.js","assets/InfoRow-BZWqE07x.js","assets/trash-2-DZDM_1D_.js","assets/ProjectListPage-DznwqHll.js","assets/ProjectDetailPage-Bi-3DLgA.js","assets/RemoveMemberConfirmDialog-DmCxvpwQ.js","assets/pencil-DL5_zTMe.js","assets/EditProjectPage-IRTaCyfg.js","assets/PipelineEditorPage-BF3eMSCM.js","assets/ProfilePage-DKKDCTx9.js","assets/password-CHk45-jw.js","assets/AccessTokensPage-CZ_Yavhf.js","assets/CliReferencePage-B6gTsb4v.js","assets/QuickAuth-BBWmkwhA.js","assets/ApiReferencePage-DsFA13KQ.js","assets/SkillPage-DqvIM6pJ.js","assets/DocsPrimitives-CtwiZVPN.js","assets/DocsLayout-Du6H0AOl.js","assets/InstallationPage-BvBVyGkY.js","assets/DeveloperSetupPage-Bq-eKaT0.js","assets/WorkerSetupPage-CcByT6so.js","assets/BotSetupPage-ByjmKjXY.js","assets/LocalDevelopmentPage-BxVqnOjh.js","assets/DeploymentPage-CWhXb1UF.js","assets/PipelineConfigPage-C2XugReU.js","assets/DevWorkflowPage-nTHhaHVz.js","assets/EnvVariablesPage-CY6bnuuq.js","assets/ArchitecturePage-DDc-vReK.js","assets/AgentCliPage-CQpk2Yo_.js","assets/DocsIndexPage-CzA83ol_.js","assets/AdminPage-BlGfVUEg.js","assets/scroll-text-BqltO3x-.js","assets/DeveloperManage-APQbY_-q.js","assets/BotManage-DRTJDHW6.js","assets/TokenManage-CvFjNduI.js","assets/AuditLogPage-BLTNLR9x.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var Ig=Object.defineProperty;var Pm=i=>{throw TypeError(i)};var Pg=(i,u,s)=>u in i?Ig(i,u,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[u]=s;var Ve=(i,u,s)=>Pg(i,typeof u!="symbol"?u+"":u,s),gs=(i,u,s)=>u.has(i)||Pm("Cannot "+s);var q=(i,u,s)=>(gs(i,u,"read from private field"),s?s.call(i):u.get(i)),Pt=(i,u,s)=>u.has(i)?Pm("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(i):u.set(i,s),Kt=(i,u,s,o)=>(gs(i,u,"write to private field"),o?o.call(i,s):u.set(i,s),s),ke=(i,u,s)=>(gs(i,u,"access private method"),s);var eh=(i,u,s,o)=>({set _(f){Kt(i,u,f,s)},get _(){return q(i,u,o)}});(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const _ of m.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&o(_)}).observe(document,{childList:!0,subtree:!0});function s(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function o(f){if(f.ep)return;f.ep=!0;const m=s(f);fetch(f.href,m)}})();function ey(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ys={exports:{}},ti={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
@@ -56,9 +56,9 @@ Error generating stack: `+n.message+`
|
|
|
56
56
|
* LICENSE.md file in the root directory of this source tree.
|
|
57
57
|
*
|
|
58
58
|
* @license MIT
|
|
59
|
-
*/var dh="popstate";function mh(i){return typeof i=="object"&&i!=null&&"pathname"in i&&"search"in i&&"hash"in i&&"state"in i&&"key"in i}function my(i={}){function u(o,f){var p;let m=(p=f.state)==null?void 0:p.masked,{pathname:_,search:b,hash:y}=m||o.location;return Os("",{pathname:_,search:b,hash:y},f.state&&f.state.usr||null,f.state&&f.state.key||"default",m?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function s(o,f){return typeof f=="string"?f:ui(f)}return py(u,s,null,i)}function qe(i,u){if(i===!1||i===null||typeof i>"u")throw new Error(u)}function Yt(i,u){if(!i){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function hy(){return Math.random().toString(36).substring(2,10)}function hh(i,u){return{usr:i.state,key:i.key,idx:u,masked:i.unstable_mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function Os(i,u,s=null,o,f){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof u=="string"?il(u):u,state:s,key:u&&u.key||o||hy(),unstable_mask:f}}function ui({pathname:i="/",search:u="",hash:s=""}){return u&&u!=="?"&&(i+=u.charAt(0)==="?"?u:"?"+u),s&&s!=="#"&&(i+=s.charAt(0)==="#"?s:"#"+s),i}function il(i){let u={};if(i){let s=i.indexOf("#");s>=0&&(u.hash=i.substring(s),i=i.substring(0,s));let o=i.indexOf("?");o>=0&&(u.search=i.substring(o),i=i.substring(0,o)),i&&(u.pathname=i)}return u}function py(i,u,s,o={}){let{window:f=document.defaultView,v5Compat:m=!1}=o,_=f.history,b="POP",y=null,p=w();p==null&&(p=0,_.replaceState({..._.state,idx:p},""));function w(){return(_.state||{idx:null}).idx}function k(){b="POP";let B=w(),U=B==null?null:B-p;p=B,y&&y({action:b,location:H.location,delta:U})}function N(B,U){b="PUSH";let K=mh(B)?B:Os(H.location,B,U);p=w()+1;let X=hh(K,p),ue=H.createHref(K.unstable_mask||K);try{_.pushState(X,"",ue)}catch(ce){if(ce instanceof DOMException&&ce.name==="DataCloneError")throw ce;f.location.assign(ue)}m&&y&&y({action:b,location:H.location,delta:1})}function Y(B,U){b="REPLACE";let K=mh(B)?B:Os(H.location,B,U);p=w();let X=hh(K,p),ue=H.createHref(K.unstable_mask||K);_.replaceState(X,"",ue),m&&y&&y({action:b,location:H.location,delta:0})}function L(B){return _y(B)}let H={get action(){return b},get location(){return i(f,_)},listen(B){if(y)throw new Error("A history only accepts one active listener");return f.addEventListener(dh,k),y=B,()=>{f.removeEventListener(dh,k),y=null}},createHref(B){return u(f,B)},createURL:L,encodeLocation(B){let U=L(B);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:N,replace:Y,go(B){return _.go(B)}};return H}function _y(i,u=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),qe(s,"No window.location.(origin|href) available to create URL");let o=typeof i=="string"?i:ui(i);return o=o.replace(/ $/,"%20"),!u&&o.startsWith("//")&&(o=s+o),new URL(o,s)}function Ch(i,u,s="/"){return gy(i,u,s,!1)}function gy(i,u,s,o){let f=typeof u=="string"?il(u):u,m=Sa(f.pathname||"/",s);if(m==null)return null;let _=Dh(i);yy(_);let b=null;for(let y=0;b==null&&y<_.length;++y){let p=Ay(m);b=jy(_[y],p,o)}return b}function Dh(i,u=[],s=[],o="",f=!1){let m=(_,b,y=f,p)=>{let w={relativePath:p===void 0?_.path||"":p,caseSensitive:_.caseSensitive===!0,childrenIndex:b,route:_};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(o)&&y)return;qe(w.relativePath.startsWith(o),`Absolute route path "${w.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(o.length)}let k=ta([o,w.relativePath]),N=s.concat(w);_.children&&_.children.length>0&&(qe(_.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${k}".`),Dh(_.children,u,N,k,y)),!(_.path==null&&!_.index)&&u.push({path:k,score:wy(k,_.index),routesMeta:N})};return i.forEach((_,b)=>{var y;if(_.path===""||!((y=_.path)!=null&&y.includes("?")))m(_,b);else for(let p of Nh(_.path))m(_,b,!0,p)}),u}function Nh(i){let u=i.split("/");if(u.length===0)return[];let[s,...o]=u,f=s.endsWith("?"),m=s.replace(/\?$/,"");if(o.length===0)return f?[m,""]:[m];let _=Nh(o.join("/")),b=[];return b.push(..._.map(y=>y===""?m:[m,y].join("/"))),f&&b.push(..._),b.map(y=>i.startsWith("/")&&y===""?"/":y)}function yy(i){i.sort((u,s)=>u.score!==s.score?s.score-u.score:Ty(u.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}var vy=/^:[\w-]+$/,by=3,xy=2,Sy=1,ky=10,Ey=-2,ph=i=>i==="*";function wy(i,u){let s=i.split("/"),o=s.length;return s.some(ph)&&(o+=Ey),u&&(o+=xy),s.filter(f=>!ph(f)).reduce((f,m)=>f+(vy.test(m)?by:m===""?Sy:ky),o)}function Ty(i,u){return i.length===u.length&&i.slice(0,-1).every((o,f)=>o===u[f])?i[i.length-1]-u[u.length-1]:0}function jy(i,u,s=!1){let{routesMeta:o}=i,f={},m="/",_=[];for(let b=0;b<o.length;++b){let y=o[b],p=b===o.length-1,w=m==="/"?u:u.slice(m.length)||"/",k=Qr({path:y.relativePath,caseSensitive:y.caseSensitive,end:p},w),N=y.route;if(!k&&p&&s&&!o[o.length-1].route.index&&(k=Qr({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},w)),!k)return null;Object.assign(f,k.params),_.push({params:f,pathname:ta([m,k.pathname]),pathnameBase:Dy(ta([m,k.pathnameBase])),route:N}),k.pathnameBase!=="/"&&(m=ta([m,k.pathnameBase]))}return _}function Qr(i,u){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[s,o]=Ry(i.path,i.caseSensitive,i.end),f=u.match(s);if(!f)return null;let m=f[0],_=m.replace(/(.)\/+$/,"$1"),b=f.slice(1);return{params:o.reduce((p,{paramName:w,isOptional:k},N)=>{if(w==="*"){let L=b[N]||"";_=m.slice(0,m.length-L.length).replace(/(.)\/+$/,"$1")}const Y=b[N];return k&&!Y?p[w]=void 0:p[w]=(Y||"").replace(/%2F/g,"/"),p},{}),pathname:m,pathnameBase:_,pattern:i}}function Ry(i,u=!1,s=!0){Yt(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let o=[],f="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(_,b,y,p,w)=>{if(o.push({paramName:b,isOptional:y!=null}),y){let k=w.charAt(p+_.length);return k&&k!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(o.push({paramName:"*"}),f+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?f+="\\/*$":i!==""&&i!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,u?void 0:"i"),o]}function Ay(i){try{return i.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Yt(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),i}}function Sa(i,u){if(u==="/")return i;if(!i.toLowerCase().startsWith(u.toLowerCase()))return null;let s=u.endsWith("/")?u.length-1:u.length,o=i.charAt(s);return o&&o!=="/"?null:i.slice(s)||"/"}var zy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Oy(i,u="/"){let{pathname:s,search:o="",hash:f=""}=typeof i=="string"?il(i):i,m;return s?(s=s.replace(/\/\/+/g,"/"),s.startsWith("/")?m=_h(s.substring(1),"/"):m=_h(s,u)):m=u,{pathname:m,search:Ny(o),hash:My(f)}}function _h(i,u){let s=u.replace(/\/+$/,"").split("/");return i.split("/").forEach(f=>{f===".."?s.length>1&&s.pop():f!=="."&&s.push(f)}),s.length>1?s.join("/"):"/"}function Es(i,u,s,o){return`Cannot include a '${i}' character in a manually specified \`to.${u}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Cy(i){return i.filter((u,s)=>s===0||u.route.path&&u.route.path.length>0)}function Gs(i){let u=Cy(i);return u.map((s,o)=>o===u.length-1?s.pathname:s.pathnameBase)}function Jr(i,u,s,o=!1){let f;typeof i=="string"?f=il(i):(f={...i},qe(!f.pathname||!f.pathname.includes("?"),Es("?","pathname","search",f)),qe(!f.pathname||!f.pathname.includes("#"),Es("#","pathname","hash",f)),qe(!f.search||!f.search.includes("#"),Es("#","search","hash",f)));let m=i===""||f.pathname==="",_=m?"/":f.pathname,b;if(_==null)b=s;else{let k=u.length-1;if(!o&&_.startsWith("..")){let N=_.split("/");for(;N[0]==="..";)N.shift(),k-=1;f.pathname=N.join("/")}b=k>=0?u[k]:"/"}let y=Oy(f,b),p=_&&_!=="/"&&_.endsWith("/"),w=(m||_===".")&&s.endsWith("/");return!y.pathname.endsWith("/")&&(p||w)&&(y.pathname+="/"),y}var ta=i=>i.join("/").replace(/\/\/+/g,"/"),Dy=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),Ny=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,My=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,Uy=class{constructor(i,u,s,o=!1){this.status=i,this.statusText=u||"",this.internal=o,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function qy(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function Ly(i){return i.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Mh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Uh(i,u){let s=i;if(typeof s!="string"||!zy.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let o=s,f=!1;if(Mh)try{let m=new URL(window.location.href),_=s.startsWith("//")?new URL(m.protocol+s):new URL(s),b=Sa(_.pathname,u);_.origin===m.origin&&b!=null?s=b+_.search+_.hash:f=!0}catch{Yt(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:f,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var qh=["POST","PUT","PATCH","DELETE"];new Set(qh);var Hy=["GET",...qh];new Set(Hy);var rl=g.createContext(null);rl.displayName="DataRouter";var $r=g.createContext(null);$r.displayName="DataRouterState";var By=g.createContext(!1),Lh=g.createContext({isTransitioning:!1});Lh.displayName="ViewTransition";var Yy=g.createContext(new Map);Yy.displayName="Fetchers";var Gy=g.createContext(null);Gy.displayName="Await";var Rt=g.createContext(null);Rt.displayName="Navigation";var oi=g.createContext(null);oi.displayName="Location";var Gt=g.createContext({outlet:null,matches:[],isDataRoute:!1});Gt.displayName="Route";var Vs=g.createContext(null);Vs.displayName="RouteError";var Hh="REACT_ROUTER_ERROR",Vy="REDIRECT",Xy="ROUTE_ERROR_RESPONSE";function Qy(i){if(i.startsWith(`${Hh}:${Vy}:{`))try{let u=JSON.parse(i.slice(28));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.location=="string"&&typeof u.reloadDocument=="boolean"&&typeof u.replace=="boolean")return u}catch{}}function Zy(i){if(i.startsWith(`${Hh}:${Xy}:{`))try{let u=JSON.parse(i.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new Uy(u.status,u.statusText,u.data)}catch{}}function Ky(i,{relative:u}={}){qe(ul(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:o}=g.useContext(Rt),{hash:f,pathname:m,search:_}=si(i,{relative:u}),b=m;return s!=="/"&&(b=m==="/"?s:ta([s,m])),o.createHref({pathname:b,search:_,hash:f})}function ul(){return g.useContext(oi)!=null}function gt(){return qe(ul(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(oi).location}var Bh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yh(i){g.useContext(Rt).static||g.useLayoutEffect(i)}function Fa(){let{isDataRoute:i}=g.useContext(Gt);return i?ov():Jy()}function Jy(){qe(ul(),"useNavigate() may be used only in the context of a <Router> component.");let i=g.useContext(rl),{basename:u,navigator:s}=g.useContext(Rt),{matches:o}=g.useContext(Gt),{pathname:f}=gt(),m=JSON.stringify(Gs(o)),_=g.useRef(!1);return Yh(()=>{_.current=!0}),g.useCallback((y,p={})=>{if(Yt(_.current,Bh),!_.current)return;if(typeof y=="number"){s.go(y);return}let w=Jr(y,JSON.parse(m),f,p.relative==="path");i==null&&u!=="/"&&(w.pathname=w.pathname==="/"?u:ta([u,w.pathname])),(p.replace?s.replace:s.push)(w,p.state,p)},[u,s,m,f,i])}var $y=g.createContext(null);function Wy(i){let u=g.useContext(Gt).outlet;return g.useMemo(()=>u&&g.createElement($y.Provider,{value:i},u),[u,i])}function O1(){let{matches:i}=g.useContext(Gt),u=i[i.length-1];return u?u.params:{}}function si(i,{relative:u}={}){let{matches:s}=g.useContext(Gt),{pathname:o}=gt(),f=JSON.stringify(Gs(s));return g.useMemo(()=>Jr(i,JSON.parse(f),o,u==="path"),[i,f,o,u])}function Fy(i,u){return Gh(i,u)}function Gh(i,u,s){var B;qe(ul(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=g.useContext(Rt),{matches:f}=g.useContext(Gt),m=f[f.length-1],_=m?m.params:{},b=m?m.pathname:"/",y=m?m.pathnameBase:"/",p=m&&m.route;{let U=p&&p.path||"";Xh(b,!p||U.endsWith("*")||U.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${b}" (under <Route path="${U}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
*/var dh="popstate";function mh(i){return typeof i=="object"&&i!=null&&"pathname"in i&&"search"in i&&"hash"in i&&"state"in i&&"key"in i}function my(i={}){function u(o,f){var p;let m=(p=f.state)==null?void 0:p.masked,{pathname:_,search:b,hash:y}=m||o.location;return Os("",{pathname:_,search:b,hash:y},f.state&&f.state.usr||null,f.state&&f.state.key||"default",m?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function s(o,f){return typeof f=="string"?f:ui(f)}return py(u,s,null,i)}function qe(i,u){if(i===!1||i===null||typeof i>"u")throw new Error(u)}function Yt(i,u){if(!i){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function hy(){return Math.random().toString(36).substring(2,10)}function hh(i,u){return{usr:i.state,key:i.key,idx:u,masked:i.unstable_mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function Os(i,u,s=null,o,f){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof u=="string"?il(u):u,state:s,key:u&&u.key||o||hy(),unstable_mask:f}}function ui({pathname:i="/",search:u="",hash:s=""}){return u&&u!=="?"&&(i+=u.charAt(0)==="?"?u:"?"+u),s&&s!=="#"&&(i+=s.charAt(0)==="#"?s:"#"+s),i}function il(i){let u={};if(i){let s=i.indexOf("#");s>=0&&(u.hash=i.substring(s),i=i.substring(0,s));let o=i.indexOf("?");o>=0&&(u.search=i.substring(o),i=i.substring(0,o)),i&&(u.pathname=i)}return u}function py(i,u,s,o={}){let{window:f=document.defaultView,v5Compat:m=!1}=o,_=f.history,b="POP",y=null,p=w();p==null&&(p=0,_.replaceState({..._.state,idx:p},""));function w(){return(_.state||{idx:null}).idx}function k(){b="POP";let B=w(),U=B==null?null:B-p;p=B,y&&y({action:b,location:H.location,delta:U})}function N(B,U){b="PUSH";let K=mh(B)?B:Os(H.location,B,U);p=w()+1;let X=hh(K,p),ue=H.createHref(K.unstable_mask||K);try{_.pushState(X,"",ue)}catch(ce){if(ce instanceof DOMException&&ce.name==="DataCloneError")throw ce;f.location.assign(ue)}m&&y&&y({action:b,location:H.location,delta:1})}function Y(B,U){b="REPLACE";let K=mh(B)?B:Os(H.location,B,U);p=w();let X=hh(K,p),ue=H.createHref(K.unstable_mask||K);_.replaceState(X,"",ue),m&&y&&y({action:b,location:H.location,delta:0})}function L(B){return _y(B)}let H={get action(){return b},get location(){return i(f,_)},listen(B){if(y)throw new Error("A history only accepts one active listener");return f.addEventListener(dh,k),y=B,()=>{f.removeEventListener(dh,k),y=null}},createHref(B){return u(f,B)},createURL:L,encodeLocation(B){let U=L(B);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:N,replace:Y,go(B){return _.go(B)}};return H}function _y(i,u=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),qe(s,"No window.location.(origin|href) available to create URL");let o=typeof i=="string"?i:ui(i);return o=o.replace(/ $/,"%20"),!u&&o.startsWith("//")&&(o=s+o),new URL(o,s)}function Ch(i,u,s="/"){return gy(i,u,s,!1)}function gy(i,u,s,o){let f=typeof u=="string"?il(u):u,m=Sa(f.pathname||"/",s);if(m==null)return null;let _=Dh(i);yy(_);let b=null;for(let y=0;b==null&&y<_.length;++y){let p=Ay(m);b=jy(_[y],p,o)}return b}function Dh(i,u=[],s=[],o="",f=!1){let m=(_,b,y=f,p)=>{let w={relativePath:p===void 0?_.path||"":p,caseSensitive:_.caseSensitive===!0,childrenIndex:b,route:_};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(o)&&y)return;qe(w.relativePath.startsWith(o),`Absolute route path "${w.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(o.length)}let k=ta([o,w.relativePath]),N=s.concat(w);_.children&&_.children.length>0&&(qe(_.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${k}".`),Dh(_.children,u,N,k,y)),!(_.path==null&&!_.index)&&u.push({path:k,score:wy(k,_.index),routesMeta:N})};return i.forEach((_,b)=>{var y;if(_.path===""||!((y=_.path)!=null&&y.includes("?")))m(_,b);else for(let p of Nh(_.path))m(_,b,!0,p)}),u}function Nh(i){let u=i.split("/");if(u.length===0)return[];let[s,...o]=u,f=s.endsWith("?"),m=s.replace(/\?$/,"");if(o.length===0)return f?[m,""]:[m];let _=Nh(o.join("/")),b=[];return b.push(..._.map(y=>y===""?m:[m,y].join("/"))),f&&b.push(..._),b.map(y=>i.startsWith("/")&&y===""?"/":y)}function yy(i){i.sort((u,s)=>u.score!==s.score?s.score-u.score:Ty(u.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}var vy=/^:[\w-]+$/,by=3,xy=2,Sy=1,ky=10,Ey=-2,ph=i=>i==="*";function wy(i,u){let s=i.split("/"),o=s.length;return s.some(ph)&&(o+=Ey),u&&(o+=xy),s.filter(f=>!ph(f)).reduce((f,m)=>f+(vy.test(m)?by:m===""?Sy:ky),o)}function Ty(i,u){return i.length===u.length&&i.slice(0,-1).every((o,f)=>o===u[f])?i[i.length-1]-u[u.length-1]:0}function jy(i,u,s=!1){let{routesMeta:o}=i,f={},m="/",_=[];for(let b=0;b<o.length;++b){let y=o[b],p=b===o.length-1,w=m==="/"?u:u.slice(m.length)||"/",k=Qr({path:y.relativePath,caseSensitive:y.caseSensitive,end:p},w),N=y.route;if(!k&&p&&s&&!o[o.length-1].route.index&&(k=Qr({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},w)),!k)return null;Object.assign(f,k.params),_.push({params:f,pathname:ta([m,k.pathname]),pathnameBase:Dy(ta([m,k.pathnameBase])),route:N}),k.pathnameBase!=="/"&&(m=ta([m,k.pathnameBase]))}return _}function Qr(i,u){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[s,o]=Ry(i.path,i.caseSensitive,i.end),f=u.match(s);if(!f)return null;let m=f[0],_=m.replace(/(.)\/+$/,"$1"),b=f.slice(1);return{params:o.reduce((p,{paramName:w,isOptional:k},N)=>{if(w==="*"){let L=b[N]||"";_=m.slice(0,m.length-L.length).replace(/(.)\/+$/,"$1")}const Y=b[N];return k&&!Y?p[w]=void 0:p[w]=(Y||"").replace(/%2F/g,"/"),p},{}),pathname:m,pathnameBase:_,pattern:i}}function Ry(i,u=!1,s=!0){Yt(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let o=[],f="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(_,b,y,p,w)=>{if(o.push({paramName:b,isOptional:y!=null}),y){let k=w.charAt(p+_.length);return k&&k!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(o.push({paramName:"*"}),f+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?f+="\\/*$":i!==""&&i!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,u?void 0:"i"),o]}function Ay(i){try{return i.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Yt(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),i}}function Sa(i,u){if(u==="/")return i;if(!i.toLowerCase().startsWith(u.toLowerCase()))return null;let s=u.endsWith("/")?u.length-1:u.length,o=i.charAt(s);return o&&o!=="/"?null:i.slice(s)||"/"}var zy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Oy(i,u="/"){let{pathname:s,search:o="",hash:f=""}=typeof i=="string"?il(i):i,m;return s?(s=s.replace(/\/\/+/g,"/"),s.startsWith("/")?m=_h(s.substring(1),"/"):m=_h(s,u)):m=u,{pathname:m,search:Ny(o),hash:My(f)}}function _h(i,u){let s=u.replace(/\/+$/,"").split("/");return i.split("/").forEach(f=>{f===".."?s.length>1&&s.pop():f!=="."&&s.push(f)}),s.length>1?s.join("/"):"/"}function Es(i,u,s,o){return`Cannot include a '${i}' character in a manually specified \`to.${u}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Cy(i){return i.filter((u,s)=>s===0||u.route.path&&u.route.path.length>0)}function Gs(i){let u=Cy(i);return u.map((s,o)=>o===u.length-1?s.pathname:s.pathnameBase)}function Jr(i,u,s,o=!1){let f;typeof i=="string"?f=il(i):(f={...i},qe(!f.pathname||!f.pathname.includes("?"),Es("?","pathname","search",f)),qe(!f.pathname||!f.pathname.includes("#"),Es("#","pathname","hash",f)),qe(!f.search||!f.search.includes("#"),Es("#","search","hash",f)));let m=i===""||f.pathname==="",_=m?"/":f.pathname,b;if(_==null)b=s;else{let k=u.length-1;if(!o&&_.startsWith("..")){let N=_.split("/");for(;N[0]==="..";)N.shift(),k-=1;f.pathname=N.join("/")}b=k>=0?u[k]:"/"}let y=Oy(f,b),p=_&&_!=="/"&&_.endsWith("/"),w=(m||_===".")&&s.endsWith("/");return!y.pathname.endsWith("/")&&(p||w)&&(y.pathname+="/"),y}var ta=i=>i.join("/").replace(/\/\/+/g,"/"),Dy=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),Ny=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,My=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,Uy=class{constructor(i,u,s,o=!1){this.status=i,this.statusText=u||"",this.internal=o,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function qy(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function Ly(i){return i.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Mh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Uh(i,u){let s=i;if(typeof s!="string"||!zy.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let o=s,f=!1;if(Mh)try{let m=new URL(window.location.href),_=s.startsWith("//")?new URL(m.protocol+s):new URL(s),b=Sa(_.pathname,u);_.origin===m.origin&&b!=null?s=b+_.search+_.hash:f=!0}catch{Yt(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:f,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var qh=["POST","PUT","PATCH","DELETE"];new Set(qh);var Hy=["GET",...qh];new Set(Hy);var rl=g.createContext(null);rl.displayName="DataRouter";var $r=g.createContext(null);$r.displayName="DataRouterState";var By=g.createContext(!1),Lh=g.createContext({isTransitioning:!1});Lh.displayName="ViewTransition";var Yy=g.createContext(new Map);Yy.displayName="Fetchers";var Gy=g.createContext(null);Gy.displayName="Await";var Rt=g.createContext(null);Rt.displayName="Navigation";var oi=g.createContext(null);oi.displayName="Location";var Gt=g.createContext({outlet:null,matches:[],isDataRoute:!1});Gt.displayName="Route";var Vs=g.createContext(null);Vs.displayName="RouteError";var Hh="REACT_ROUTER_ERROR",Vy="REDIRECT",Xy="ROUTE_ERROR_RESPONSE";function Qy(i){if(i.startsWith(`${Hh}:${Vy}:{`))try{let u=JSON.parse(i.slice(28));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.location=="string"&&typeof u.reloadDocument=="boolean"&&typeof u.replace=="boolean")return u}catch{}}function Zy(i){if(i.startsWith(`${Hh}:${Xy}:{`))try{let u=JSON.parse(i.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new Uy(u.status,u.statusText,u.data)}catch{}}function Ky(i,{relative:u}={}){qe(ul(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:o}=g.useContext(Rt),{hash:f,pathname:m,search:_}=si(i,{relative:u}),b=m;return s!=="/"&&(b=m==="/"?s:ta([s,m])),o.createHref({pathname:b,search:_,hash:f})}function ul(){return g.useContext(oi)!=null}function gt(){return qe(ul(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(oi).location}var Bh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yh(i){g.useContext(Rt).static||g.useLayoutEffect(i)}function Fa(){let{isDataRoute:i}=g.useContext(Gt);return i?ov():Jy()}function Jy(){qe(ul(),"useNavigate() may be used only in the context of a <Router> component.");let i=g.useContext(rl),{basename:u,navigator:s}=g.useContext(Rt),{matches:o}=g.useContext(Gt),{pathname:f}=gt(),m=JSON.stringify(Gs(o)),_=g.useRef(!1);return Yh(()=>{_.current=!0}),g.useCallback((y,p={})=>{if(Yt(_.current,Bh),!_.current)return;if(typeof y=="number"){s.go(y);return}let w=Jr(y,JSON.parse(m),f,p.relative==="path");i==null&&u!=="/"&&(w.pathname=w.pathname==="/"?u:ta([u,w.pathname])),(p.replace?s.replace:s.push)(w,p.state,p)},[u,s,m,f,i])}var $y=g.createContext(null);function Wy(i){let u=g.useContext(Gt).outlet;return g.useMemo(()=>u&&g.createElement($y.Provider,{value:i},u),[u,i])}function C1(){let{matches:i}=g.useContext(Gt),u=i[i.length-1];return u?u.params:{}}function si(i,{relative:u}={}){let{matches:s}=g.useContext(Gt),{pathname:o}=gt(),f=JSON.stringify(Gs(s));return g.useMemo(()=>Jr(i,JSON.parse(f),o,u==="path"),[i,f,o,u])}function Fy(i,u){return Gh(i,u)}function Gh(i,u,s){var B;qe(ul(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=g.useContext(Rt),{matches:f}=g.useContext(Gt),m=f[f.length-1],_=m?m.params:{},b=m?m.pathname:"/",y=m?m.pathnameBase:"/",p=m&&m.route;{let U=p&&p.path||"";Xh(b,!p||U.endsWith("*")||U.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${b}" (under <Route path="${U}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
60
60
|
|
|
61
|
-
Please change the parent <Route path="${U}"> to <Route path="${U==="/"?"*":`${U}/*`}">.`)}let w=gt(),k;if(u){let U=typeof u=="string"?il(u):u;qe(y==="/"||((B=U.pathname)==null?void 0:B.startsWith(y)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${y}" but pathname "${U.pathname}" was given in the \`location\` prop.`),k=U}else k=w;let N=k.pathname||"/",Y=N;if(y!=="/"){let U=y.replace(/^\//,"").split("/");Y="/"+N.replace(/^\//,"").split("/").slice(U.length).join("/")}let L=Ch(i,{pathname:Y});Yt(p||L!=null,`No routes matched location "${k.pathname}${k.search}${k.hash}" `),Yt(L==null||L[L.length-1].route.element!==void 0||L[L.length-1].route.Component!==void 0||L[L.length-1].route.lazy!==void 0,`Matched leaf route at location "${k.pathname}${k.search}${k.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let H=av(L&&L.map(U=>Object.assign({},U,{params:Object.assign({},_,U.params),pathname:ta([y,o.encodeLocation?o.encodeLocation(U.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathname]),pathnameBase:U.pathnameBase==="/"?y:ta([y,o.encodeLocation?o.encodeLocation(U.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathnameBase])})),f,s);return u&&H?g.createElement(oi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...k},navigationType:"POP"}},H):H}function Iy(){let i=uv(),u=qy(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),s=i instanceof Error?i.stack:null,o="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:o},m={padding:"2px 4px",backgroundColor:o},_=null;return console.error("Error handled by React Router default ErrorBoundary:",i),_=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:m},"ErrorBoundary")," or"," ",g.createElement("code",{style:m},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},u),s?g.createElement("pre",{style:f},s):null,_)}var Py=g.createElement(Iy,null),Vh=class extends g.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,u){return u.location!==i.location||u.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:u.error,location:u.location,revalidation:i.revalidation||u.revalidation}}componentDidCatch(i,u){this.props.onError?this.props.onError(i,u):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const s=Zy(i.digest);s&&(i=s)}let u=i!==void 0?g.createElement(Gt.Provider,{value:this.props.routeContext},g.createElement(Vs.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?g.createElement(ev,{error:i},u):u}};Vh.contextType=By;var ws=new WeakMap;function ev({children:i,error:u}){let{basename:s}=g.useContext(Rt);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let o=Qy(u.digest);if(o){let f=ws.get(u);if(f)throw f;let m=Uh(o.location,s);if(Mh&&!ws.get(u))if(m.isExternal||o.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const _=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:o.replace}));throw ws.set(u,_),_}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return i}function tv({routeContext:i,match:u,children:s}){let o=g.useContext(rl);return o&&o.static&&o.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=u.route.id),g.createElement(Gt.Provider,{value:i},s)}function av(i,u=[],s){let o=s==null?void 0:s.state;if(i==null){if(!o)return null;if(o.errors)i=o.matches;else if(u.length===0&&!o.initialized&&o.matches.length>0)i=o.matches;else return null}let f=i,m=o==null?void 0:o.errors;if(m!=null){let w=f.findIndex(k=>k.route.id&&(m==null?void 0:m[k.route.id])!==void 0);qe(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),f=f.slice(0,Math.min(f.length,w+1))}let _=!1,b=-1;if(s&&o){_=o.renderFallback;for(let w=0;w<f.length;w++){let k=f[w];if((k.route.HydrateFallback||k.route.hydrateFallbackElement)&&(b=w),k.route.id){let{loaderData:N,errors:Y}=o,L=k.route.loader&&!N.hasOwnProperty(k.route.id)&&(!Y||Y[k.route.id]===void 0);if(k.route.lazy||L){s.isStatic&&(_=!0),b>=0?f=f.slice(0,b+1):f=[f[0]];break}}}}let y=s==null?void 0:s.onError,p=o&&y?(w,k)=>{var N,Y;y(w,{location:o.location,params:((Y=(N=o.matches)==null?void 0:N[0])==null?void 0:Y.params)??{},unstable_pattern:Ly(o.matches),errorInfo:k})}:void 0;return f.reduceRight((w,k,N)=>{let Y,L=!1,H=null,B=null;o&&(Y=m&&k.route.id?m[k.route.id]:void 0,H=k.route.errorElement||Py,_&&(b<0&&N===0?(Xh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,B=null):b===N&&(L=!0,B=k.route.hydrateFallbackElement||null)));let U=u.concat(f.slice(0,N+1)),K=()=>{let X;return Y?X=H:L?X=B:k.route.Component?X=g.createElement(k.route.Component,null):k.route.element?X=k.route.element:X=w,g.createElement(tv,{match:k,routeContext:{outlet:w,matches:U,isDataRoute:o!=null},children:X})};return o&&(k.route.ErrorBoundary||k.route.errorElement||N===0)?g.createElement(Vh,{location:o.location,revalidation:o.revalidation,component:H,error:Y,children:K(),routeContext:{outlet:null,matches:U,isDataRoute:!0},onError:p}):K()},null)}function Xs(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nv(i){let u=g.useContext(rl);return qe(u,Xs(i)),u}function lv(i){let u=g.useContext($r);return qe(u,Xs(i)),u}function iv(i){let u=g.useContext(Gt);return qe(u,Xs(i)),u}function Qs(i){let u=iv(i),s=u.matches[u.matches.length-1];return qe(s.route.id,`${i} can only be used on routes that contain a unique "id"`),s.route.id}function rv(){return Qs("useRouteId")}function uv(){var o;let i=g.useContext(Vs),u=lv("useRouteError"),s=Qs("useRouteError");return i!==void 0?i:(o=u.errors)==null?void 0:o[s]}function ov(){let{router:i}=nv("useNavigate"),u=Qs("useNavigate"),s=g.useRef(!1);return Yh(()=>{s.current=!0}),g.useCallback(async(f,m={})=>{Yt(s.current,Bh),s.current&&(typeof f=="number"?await i.navigate(f):await i.navigate(f,{fromRouteId:u,...m}))},[i,u])}var gh={};function Xh(i,u,s){!u&&!gh[i]&&(gh[i]=!0,Yt(!1,s))}g.memo(sv);function sv({routes:i,future:u,state:s,isStatic:o,onError:f}){return Gh(i,void 0,{state:s,isStatic:o,onError:f})}function ll({to:i,replace:u,state:s,relative:o}){qe(ul(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=g.useContext(Rt);Yt(!f,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:m}=g.useContext(Gt),{pathname:_}=gt(),b=Fa(),y=Jr(i,Gs(m),_,o==="path"),p=JSON.stringify(y);return g.useEffect(()=>{b(JSON.parse(p),{replace:u,state:s,relative:o})},[b,p,o,u,s]),null}function cv(i){return Wy(i.context)}function ee(i){qe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function fv({basename:i="/",children:u=null,location:s,navigationType:o="POP",navigator:f,static:m=!1,unstable_useTransitions:_}){qe(!ul(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let b=i.replace(/^\/*/,"/"),y=g.useMemo(()=>({basename:b,navigator:f,static:m,unstable_useTransitions:_,future:{}}),[b,f,m,_]);typeof s=="string"&&(s=il(s));let{pathname:p="/",search:w="",hash:k="",state:N=null,key:Y="default",unstable_mask:L}=s,H=g.useMemo(()=>{let B=Sa(p,b);return B==null?null:{location:{pathname:B,search:w,hash:k,state:N,key:Y,unstable_mask:L},navigationType:o}},[b,p,w,k,N,Y,o,L]);return Yt(H!=null,`<Router basename="${b}"> is not able to match the URL "${p}${w}${k}" because it does not start with the basename, so the <Router> won't render anything.`),H==null?null:g.createElement(Rt.Provider,{value:y},g.createElement(oi.Provider,{children:u,value:H}))}function dv({children:i,location:u}){return Fy(Cs(i),u)}function Cs(i,u=[]){let s=[];return g.Children.forEach(i,(o,f)=>{if(!g.isValidElement(o))return;let m=[...u,f];if(o.type===g.Fragment){s.push.apply(s,Cs(o.props.children,m));return}qe(o.type===ee,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),qe(!o.props.index||!o.props.children,"An index route cannot have child routes.");let _={id:o.props.id||m.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(_.children=Cs(o.props.children,m)),s.push(_)}),s}var Lr="get",Hr="application/x-www-form-urlencoded";function Wr(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function mv(i){return Wr(i)&&i.tagName.toLowerCase()==="button"}function hv(i){return Wr(i)&&i.tagName.toLowerCase()==="form"}function pv(i){return Wr(i)&&i.tagName.toLowerCase()==="input"}function _v(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function gv(i,u){return i.button===0&&(!u||u==="_self")&&!_v(i)}function Ds(i=""){return new URLSearchParams(typeof i=="string"||Array.isArray(i)||i instanceof URLSearchParams?i:Object.keys(i).reduce((u,s)=>{let o=i[s];return u.concat(Array.isArray(o)?o.map(f=>[s,f]):[[s,o]])},[]))}function yv(i,u){let s=Ds(i);return u&&u.forEach((o,f)=>{s.has(f)||u.getAll(f).forEach(m=>{s.append(f,m)})}),s}var Ar=null;function vv(){if(Ar===null)try{new FormData(document.createElement("form"),0),Ar=!1}catch{Ar=!0}return Ar}var bv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ts(i){return i!=null&&!bv.has(i)?(Yt(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Hr}"`),null):i}function xv(i,u){let s,o,f,m,_;if(hv(i)){let b=i.getAttribute("action");o=b?Sa(b,u):null,s=i.getAttribute("method")||Lr,f=Ts(i.getAttribute("enctype"))||Hr,m=new FormData(i)}else if(mv(i)||pv(i)&&(i.type==="submit"||i.type==="image")){let b=i.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=i.getAttribute("formaction")||b.getAttribute("action");if(o=y?Sa(y,u):null,s=i.getAttribute("formmethod")||b.getAttribute("method")||Lr,f=Ts(i.getAttribute("formenctype"))||Ts(b.getAttribute("enctype"))||Hr,m=new FormData(b,i),!vv()){let{name:p,type:w,value:k}=i;if(w==="image"){let N=p?`${p}.`:"";m.append(`${N}x`,"0"),m.append(`${N}y`,"0")}else p&&m.append(p,k)}}else{if(Wr(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Lr,o=null,f=Hr,_=i}return m&&f==="text/plain"&&(_=m,m=void 0),{action:o,method:s.toLowerCase(),encType:f,formData:m,body:_}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Zs(i,u){if(i===!1||i===null||typeof i>"u")throw new Error(u)}function Sv(i,u,s,o){let f=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return s?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${o}`:f.pathname=`${f.pathname}.${o}`:f.pathname==="/"?f.pathname=`_root.${o}`:u&&Sa(f.pathname,u)==="/"?f.pathname=`${u.replace(/\/$/,"")}/_root.${o}`:f.pathname=`${f.pathname.replace(/\/$/,"")}.${o}`,f}async function kv(i,u){if(i.id in u)return u[i.id];try{let s=await import(i.module);return u[i.id]=s,s}catch(s){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ev(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function wv(i,u,s){let o=await Promise.all(i.map(async f=>{let m=u.routes[f.route.id];if(m){let _=await kv(m,s);return _.links?_.links():[]}return[]}));return Av(o.flat(1).filter(Ev).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function yh(i,u,s,o,f,m){let _=(y,p)=>s[p]?y.route.id!==s[p].route.id:!0,b=(y,p)=>{var w;return s[p].pathname!==y.pathname||((w=s[p].route.path)==null?void 0:w.endsWith("*"))&&s[p].params["*"]!==y.params["*"]};return m==="assets"?u.filter((y,p)=>_(y,p)||b(y,p)):m==="data"?u.filter((y,p)=>{var k;let w=o.routes[y.route.id];if(!w||!w.hasLoader)return!1;if(_(y,p)||b(y,p))return!0;if(y.route.shouldRevalidate){let N=y.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((k=s[0])==null?void 0:k.params)||{},nextUrl:new URL(i,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof N=="boolean")return N}return!0}):[]}function Tv(i,u,{includeHydrateFallback:s}={}){return jv(i.map(o=>{let f=u.routes[o.route.id];if(!f)return[];let m=[f.module];return f.clientActionModule&&(m=m.concat(f.clientActionModule)),f.clientLoaderModule&&(m=m.concat(f.clientLoaderModule)),s&&f.hydrateFallbackModule&&(m=m.concat(f.hydrateFallbackModule)),f.imports&&(m=m.concat(f.imports)),m}).flat(1))}function jv(i){return[...new Set(i)]}function Rv(i){let u={},s=Object.keys(i).sort();for(let o of s)u[o]=i[o];return u}function Av(i,u){let s=new Set;return new Set(u),i.reduce((o,f)=>{let m=JSON.stringify(Rv(f));return s.has(m)||(s.add(m),o.push({key:m,link:f})),o},[])}function Qh(){let i=g.useContext(rl);return Zs(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function zv(){let i=g.useContext($r);return Zs(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Ks=g.createContext(void 0);Ks.displayName="FrameworkContext";function Zh(){let i=g.useContext(Ks);return Zs(i,"You must render this element inside a <HydratedRouter> element"),i}function Ov(i,u){let s=g.useContext(Ks),[o,f]=g.useState(!1),[m,_]=g.useState(!1),{onFocus:b,onBlur:y,onMouseEnter:p,onMouseLeave:w,onTouchStart:k}=u,N=g.useRef(null);g.useEffect(()=>{if(i==="render"&&_(!0),i==="viewport"){let H=U=>{U.forEach(K=>{_(K.isIntersecting)})},B=new IntersectionObserver(H,{threshold:.5});return N.current&&B.observe(N.current),()=>{B.disconnect()}}},[i]),g.useEffect(()=>{if(o){let H=setTimeout(()=>{_(!0)},100);return()=>{clearTimeout(H)}}},[o]);let Y=()=>{f(!0)},L=()=>{f(!1),_(!1)};return s?i!=="intent"?[m,N,{}]:[m,N,{onFocus:ni(b,Y),onBlur:ni(y,L),onMouseEnter:ni(p,Y),onMouseLeave:ni(w,L),onTouchStart:ni(k,Y)}]:[!1,N,{}]}function ni(i,u){return s=>{i&&i(s),s.defaultPrevented||u(s)}}function Cv({page:i,...u}){let{router:s}=Qh(),o=g.useMemo(()=>Ch(s.routes,i,s.basename),[s.routes,i,s.basename]);return o?g.createElement(Nv,{page:i,matches:o,...u}):null}function Dv(i){let{manifest:u,routeModules:s}=Zh(),[o,f]=g.useState([]);return g.useEffect(()=>{let m=!1;return wv(i,u,s).then(_=>{m||f(_)}),()=>{m=!0}},[i,u,s]),o}function Nv({page:i,matches:u,...s}){let o=gt(),{future:f,manifest:m,routeModules:_}=Zh(),{basename:b}=Qh(),{loaderData:y,matches:p}=zv(),w=g.useMemo(()=>yh(i,u,p,m,o,"data"),[i,u,p,m,o]),k=g.useMemo(()=>yh(i,u,p,m,o,"assets"),[i,u,p,m,o]),N=g.useMemo(()=>{if(i===o.pathname+o.search+o.hash)return[];let H=new Set,B=!1;if(u.forEach(K=>{var ue;let X=m.routes[K.route.id];!X||!X.hasLoader||(!w.some(ce=>ce.route.id===K.route.id)&&K.route.id in y&&((ue=_[K.route.id])!=null&&ue.shouldRevalidate)||X.hasClientLoader?B=!0:H.add(K.route.id))}),H.size===0)return[];let U=Sv(i,b,f.unstable_trailingSlashAwareDataRequests,"data");return B&&H.size>0&&U.searchParams.set("_routes",u.filter(K=>H.has(K.route.id)).map(K=>K.route.id).join(",")),[U.pathname+U.search]},[b,f.unstable_trailingSlashAwareDataRequests,y,o,m,w,u,i,_]),Y=g.useMemo(()=>Tv(k,m),[k,m]),L=Dv(k);return g.createElement(g.Fragment,null,N.map(H=>g.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...s})),Y.map(H=>g.createElement("link",{key:H,rel:"modulepreload",href:H,...s})),L.map(({key:H,link:B})=>g.createElement("link",{key:H,nonce:s.nonce,...B,crossOrigin:B.crossOrigin??s.crossOrigin})))}function Mv(...i){return u=>{i.forEach(s=>{typeof s=="function"?s(u):s!=null&&(s.current=u)})}}var Uv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Uv&&(window.__reactRouterVersion="7.13.1")}catch{}function qv({basename:i,children:u,unstable_useTransitions:s,window:o}){let f=g.useRef();f.current==null&&(f.current=my({window:o,v5Compat:!0}));let m=f.current,[_,b]=g.useState({action:m.action,location:m.location}),y=g.useCallback(p=>{s===!1?b(p):g.startTransition(()=>b(p))},[s]);return g.useLayoutEffect(()=>m.listen(y),[m,y]),g.createElement(fv,{basename:i,children:u,location:_.location,navigationType:_.action,navigator:m,unstable_useTransitions:s})}var Kh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jh=g.forwardRef(function({onClick:u,discover:s="render",prefetch:o="none",relative:f,reloadDocument:m,replace:_,unstable_mask:b,state:y,target:p,to:w,preventScrollReset:k,viewTransition:N,unstable_defaultShouldRevalidate:Y,...L},H){let{basename:B,navigator:U,unstable_useTransitions:K}=g.useContext(Rt),X=typeof w=="string"&&Kh.test(w),ue=Uh(w,B);w=ue.to;let ce=Ky(w,{relative:f}),_e=gt(),F=null;if(b){let Me=Jr(b,[],_e.unstable_mask?_e.unstable_mask.pathname:"/",!0);B!=="/"&&(Me.pathname=Me.pathname==="/"?B:ta([B,Me.pathname])),F=U.createHref(Me)}let[W,se,Pe]=Ov(o,L),Je=Bv(w,{replace:_,unstable_mask:b,state:y,target:p,preventScrollReset:k,relative:f,viewTransition:N,unstable_defaultShouldRevalidate:Y,unstable_useTransitions:K});function Ce(Me){u&&u(Me),Me.defaultPrevented||Je(Me)}let At=!(ue.isExternal||m),ut=g.createElement("a",{...L,...Pe,href:(At?F:void 0)||ue.absoluteURL||ce,onClick:At?Ce:u,ref:Mv(H,se),target:p,"data-discover":!X&&s==="render"?"true":void 0});return W&&!X?g.createElement(g.Fragment,null,ut,g.createElement(Cv,{page:ce})):ut});Jh.displayName="Link";var Js=g.forwardRef(function({"aria-current":u="page",caseSensitive:s=!1,className:o="",end:f=!1,style:m,to:_,viewTransition:b,children:y,...p},w){let k=si(_,{relative:p.relative}),N=gt(),Y=g.useContext($r),{navigator:L,basename:H}=g.useContext(Rt),B=Y!=null&&Qv(k)&&b===!0,U=L.encodeLocation?L.encodeLocation(k).pathname:k.pathname,K=N.pathname,X=Y&&Y.navigation&&Y.navigation.location?Y.navigation.location.pathname:null;s||(K=K.toLowerCase(),X=X?X.toLowerCase():null,U=U.toLowerCase()),X&&H&&(X=Sa(X,H)||X);const ue=U!=="/"&&U.endsWith("/")?U.length-1:U.length;let ce=K===U||!f&&K.startsWith(U)&&K.charAt(ue)==="/",_e=X!=null&&(X===U||!f&&X.startsWith(U)&&X.charAt(U.length)==="/"),F={isActive:ce,isPending:_e,isTransitioning:B},W=ce?u:void 0,se;typeof o=="function"?se=o(F):se=[o,ce?"active":null,_e?"pending":null,B?"transitioning":null].filter(Boolean).join(" ");let Pe=typeof m=="function"?m(F):m;return g.createElement(Jh,{...p,"aria-current":W,className:se,ref:w,style:Pe,to:_,viewTransition:b},typeof y=="function"?y(F):y)});Js.displayName="NavLink";var Lv=g.forwardRef(({discover:i="render",fetcherKey:u,navigate:s,reloadDocument:o,replace:f,state:m,method:_=Lr,action:b,onSubmit:y,relative:p,preventScrollReset:w,viewTransition:k,unstable_defaultShouldRevalidate:N,...Y},L)=>{let{unstable_useTransitions:H}=g.useContext(Rt),B=Vv(),U=Xv(b,{relative:p}),K=_.toLowerCase()==="get"?"get":"post",X=typeof b=="string"&&Kh.test(b),ue=ce=>{if(y&&y(ce),ce.defaultPrevented)return;ce.preventDefault();let _e=ce.nativeEvent.submitter,F=(_e==null?void 0:_e.getAttribute("formmethod"))||_,W=()=>B(_e||ce.currentTarget,{fetcherKey:u,method:F,navigate:s,replace:f,state:m,relative:p,preventScrollReset:w,viewTransition:k,unstable_defaultShouldRevalidate:N});H&&s!==!1?g.startTransition(()=>W()):W()};return g.createElement("form",{ref:L,method:K,action:U,onSubmit:o?y:ue,...Y,"data-discover":!X&&i==="render"?"true":void 0})});Lv.displayName="Form";function Hv(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $h(i){let u=g.useContext(rl);return qe(u,Hv(i)),u}function Bv(i,{target:u,replace:s,unstable_mask:o,state:f,preventScrollReset:m,relative:_,viewTransition:b,unstable_defaultShouldRevalidate:y,unstable_useTransitions:p}={}){let w=Fa(),k=gt(),N=si(i,{relative:_});return g.useCallback(Y=>{if(gv(Y,u)){Y.preventDefault();let L=s!==void 0?s:ui(k)===ui(N),H=()=>w(i,{replace:L,unstable_mask:o,state:f,preventScrollReset:m,relative:_,viewTransition:b,unstable_defaultShouldRevalidate:y});p?g.startTransition(()=>H()):H()}},[k,w,N,s,o,f,u,i,m,_,b,y,p])}function C1(i){Yt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let u=g.useRef(Ds(i)),s=g.useRef(!1),o=gt(),f=g.useMemo(()=>yv(o.search,s.current?null:u.current),[o.search]),m=Fa(),_=g.useCallback((b,y)=>{const p=Ds(typeof b=="function"?b(new URLSearchParams(f)):b);s.current=!0,m("?"+p,y)},[m,f]);return[f,_]}var Yv=0,Gv=()=>`__${String(++Yv)}__`;function Vv(){let{router:i}=$h("useSubmit"),{basename:u}=g.useContext(Rt),s=rv(),o=i.fetch,f=i.navigate;return g.useCallback(async(m,_={})=>{let{action:b,method:y,encType:p,formData:w,body:k}=xv(m,u);if(_.navigate===!1){let N=_.fetcherKey||Gv();await o(N,s,_.action||b,{unstable_defaultShouldRevalidate:_.unstable_defaultShouldRevalidate,preventScrollReset:_.preventScrollReset,formData:w,body:k,formMethod:_.method||y,formEncType:_.encType||p,flushSync:_.flushSync})}else await f(_.action||b,{unstable_defaultShouldRevalidate:_.unstable_defaultShouldRevalidate,preventScrollReset:_.preventScrollReset,formData:w,body:k,formMethod:_.method||y,formEncType:_.encType||p,replace:_.replace,state:_.state,fromRouteId:s,flushSync:_.flushSync,viewTransition:_.viewTransition})},[o,f,u,s])}function Xv(i,{relative:u}={}){let{basename:s}=g.useContext(Rt),o=g.useContext(Gt);qe(o,"useFormAction must be used inside a RouteContext");let[f]=o.matches.slice(-1),m={...si(i||".",{relative:u})},_=gt();if(i==null){m.search=_.search;let b=new URLSearchParams(m.search),y=b.getAll("index");if(y.some(w=>w==="")){b.delete("index"),y.filter(k=>k).forEach(k=>b.append("index",k));let w=b.toString();m.search=w?`?${w}`:""}}return(!i||i===".")&&f.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(m.pathname=m.pathname==="/"?s:ta([s,m.pathname])),ui(m)}function Qv(i,{relative:u}={}){let s=g.useContext(Lh);qe(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=$h("useViewTransitionState"),f=si(i,{relative:u});if(!s.isTransitioning)return!1;let m=Sa(s.currentLocation.pathname,o)||s.currentLocation.pathname,_=Sa(s.nextLocation.pathname,o)||s.nextLocation.pathname;return Qr(f.pathname,_)!=null||Qr(f.pathname,m)!=null}function Wh(i,u){return i?i.length<=u?i:i.slice(0,u)+"...":""}/**
|
|
61
|
+
Please change the parent <Route path="${U}"> to <Route path="${U==="/"?"*":`${U}/*`}">.`)}let w=gt(),k;if(u){let U=typeof u=="string"?il(u):u;qe(y==="/"||((B=U.pathname)==null?void 0:B.startsWith(y)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${y}" but pathname "${U.pathname}" was given in the \`location\` prop.`),k=U}else k=w;let N=k.pathname||"/",Y=N;if(y!=="/"){let U=y.replace(/^\//,"").split("/");Y="/"+N.replace(/^\//,"").split("/").slice(U.length).join("/")}let L=Ch(i,{pathname:Y});Yt(p||L!=null,`No routes matched location "${k.pathname}${k.search}${k.hash}" `),Yt(L==null||L[L.length-1].route.element!==void 0||L[L.length-1].route.Component!==void 0||L[L.length-1].route.lazy!==void 0,`Matched leaf route at location "${k.pathname}${k.search}${k.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let H=av(L&&L.map(U=>Object.assign({},U,{params:Object.assign({},_,U.params),pathname:ta([y,o.encodeLocation?o.encodeLocation(U.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathname]),pathnameBase:U.pathnameBase==="/"?y:ta([y,o.encodeLocation?o.encodeLocation(U.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathnameBase])})),f,s);return u&&H?g.createElement(oi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...k},navigationType:"POP"}},H):H}function Iy(){let i=uv(),u=qy(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),s=i instanceof Error?i.stack:null,o="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:o},m={padding:"2px 4px",backgroundColor:o},_=null;return console.error("Error handled by React Router default ErrorBoundary:",i),_=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:m},"ErrorBoundary")," or"," ",g.createElement("code",{style:m},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},u),s?g.createElement("pre",{style:f},s):null,_)}var Py=g.createElement(Iy,null),Vh=class extends g.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,u){return u.location!==i.location||u.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:u.error,location:u.location,revalidation:i.revalidation||u.revalidation}}componentDidCatch(i,u){this.props.onError?this.props.onError(i,u):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const s=Zy(i.digest);s&&(i=s)}let u=i!==void 0?g.createElement(Gt.Provider,{value:this.props.routeContext},g.createElement(Vs.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?g.createElement(ev,{error:i},u):u}};Vh.contextType=By;var ws=new WeakMap;function ev({children:i,error:u}){let{basename:s}=g.useContext(Rt);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let o=Qy(u.digest);if(o){let f=ws.get(u);if(f)throw f;let m=Uh(o.location,s);if(Mh&&!ws.get(u))if(m.isExternal||o.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const _=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:o.replace}));throw ws.set(u,_),_}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return i}function tv({routeContext:i,match:u,children:s}){let o=g.useContext(rl);return o&&o.static&&o.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=u.route.id),g.createElement(Gt.Provider,{value:i},s)}function av(i,u=[],s){let o=s==null?void 0:s.state;if(i==null){if(!o)return null;if(o.errors)i=o.matches;else if(u.length===0&&!o.initialized&&o.matches.length>0)i=o.matches;else return null}let f=i,m=o==null?void 0:o.errors;if(m!=null){let w=f.findIndex(k=>k.route.id&&(m==null?void 0:m[k.route.id])!==void 0);qe(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),f=f.slice(0,Math.min(f.length,w+1))}let _=!1,b=-1;if(s&&o){_=o.renderFallback;for(let w=0;w<f.length;w++){let k=f[w];if((k.route.HydrateFallback||k.route.hydrateFallbackElement)&&(b=w),k.route.id){let{loaderData:N,errors:Y}=o,L=k.route.loader&&!N.hasOwnProperty(k.route.id)&&(!Y||Y[k.route.id]===void 0);if(k.route.lazy||L){s.isStatic&&(_=!0),b>=0?f=f.slice(0,b+1):f=[f[0]];break}}}}let y=s==null?void 0:s.onError,p=o&&y?(w,k)=>{var N,Y;y(w,{location:o.location,params:((Y=(N=o.matches)==null?void 0:N[0])==null?void 0:Y.params)??{},unstable_pattern:Ly(o.matches),errorInfo:k})}:void 0;return f.reduceRight((w,k,N)=>{let Y,L=!1,H=null,B=null;o&&(Y=m&&k.route.id?m[k.route.id]:void 0,H=k.route.errorElement||Py,_&&(b<0&&N===0?(Xh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,B=null):b===N&&(L=!0,B=k.route.hydrateFallbackElement||null)));let U=u.concat(f.slice(0,N+1)),K=()=>{let X;return Y?X=H:L?X=B:k.route.Component?X=g.createElement(k.route.Component,null):k.route.element?X=k.route.element:X=w,g.createElement(tv,{match:k,routeContext:{outlet:w,matches:U,isDataRoute:o!=null},children:X})};return o&&(k.route.ErrorBoundary||k.route.errorElement||N===0)?g.createElement(Vh,{location:o.location,revalidation:o.revalidation,component:H,error:Y,children:K(),routeContext:{outlet:null,matches:U,isDataRoute:!0},onError:p}):K()},null)}function Xs(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nv(i){let u=g.useContext(rl);return qe(u,Xs(i)),u}function lv(i){let u=g.useContext($r);return qe(u,Xs(i)),u}function iv(i){let u=g.useContext(Gt);return qe(u,Xs(i)),u}function Qs(i){let u=iv(i),s=u.matches[u.matches.length-1];return qe(s.route.id,`${i} can only be used on routes that contain a unique "id"`),s.route.id}function rv(){return Qs("useRouteId")}function uv(){var o;let i=g.useContext(Vs),u=lv("useRouteError"),s=Qs("useRouteError");return i!==void 0?i:(o=u.errors)==null?void 0:o[s]}function ov(){let{router:i}=nv("useNavigate"),u=Qs("useNavigate"),s=g.useRef(!1);return Yh(()=>{s.current=!0}),g.useCallback(async(f,m={})=>{Yt(s.current,Bh),s.current&&(typeof f=="number"?await i.navigate(f):await i.navigate(f,{fromRouteId:u,...m}))},[i,u])}var gh={};function Xh(i,u,s){!u&&!gh[i]&&(gh[i]=!0,Yt(!1,s))}g.memo(sv);function sv({routes:i,future:u,state:s,isStatic:o,onError:f}){return Gh(i,void 0,{state:s,isStatic:o,onError:f})}function ll({to:i,replace:u,state:s,relative:o}){qe(ul(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=g.useContext(Rt);Yt(!f,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:m}=g.useContext(Gt),{pathname:_}=gt(),b=Fa(),y=Jr(i,Gs(m),_,o==="path"),p=JSON.stringify(y);return g.useEffect(()=>{b(JSON.parse(p),{replace:u,state:s,relative:o})},[b,p,o,u,s]),null}function cv(i){return Wy(i.context)}function ee(i){qe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function fv({basename:i="/",children:u=null,location:s,navigationType:o="POP",navigator:f,static:m=!1,unstable_useTransitions:_}){qe(!ul(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let b=i.replace(/^\/*/,"/"),y=g.useMemo(()=>({basename:b,navigator:f,static:m,unstable_useTransitions:_,future:{}}),[b,f,m,_]);typeof s=="string"&&(s=il(s));let{pathname:p="/",search:w="",hash:k="",state:N=null,key:Y="default",unstable_mask:L}=s,H=g.useMemo(()=>{let B=Sa(p,b);return B==null?null:{location:{pathname:B,search:w,hash:k,state:N,key:Y,unstable_mask:L},navigationType:o}},[b,p,w,k,N,Y,o,L]);return Yt(H!=null,`<Router basename="${b}"> is not able to match the URL "${p}${w}${k}" because it does not start with the basename, so the <Router> won't render anything.`),H==null?null:g.createElement(Rt.Provider,{value:y},g.createElement(oi.Provider,{children:u,value:H}))}function dv({children:i,location:u}){return Fy(Cs(i),u)}function Cs(i,u=[]){let s=[];return g.Children.forEach(i,(o,f)=>{if(!g.isValidElement(o))return;let m=[...u,f];if(o.type===g.Fragment){s.push.apply(s,Cs(o.props.children,m));return}qe(o.type===ee,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),qe(!o.props.index||!o.props.children,"An index route cannot have child routes.");let _={id:o.props.id||m.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(_.children=Cs(o.props.children,m)),s.push(_)}),s}var Lr="get",Hr="application/x-www-form-urlencoded";function Wr(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function mv(i){return Wr(i)&&i.tagName.toLowerCase()==="button"}function hv(i){return Wr(i)&&i.tagName.toLowerCase()==="form"}function pv(i){return Wr(i)&&i.tagName.toLowerCase()==="input"}function _v(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function gv(i,u){return i.button===0&&(!u||u==="_self")&&!_v(i)}function Ds(i=""){return new URLSearchParams(typeof i=="string"||Array.isArray(i)||i instanceof URLSearchParams?i:Object.keys(i).reduce((u,s)=>{let o=i[s];return u.concat(Array.isArray(o)?o.map(f=>[s,f]):[[s,o]])},[]))}function yv(i,u){let s=Ds(i);return u&&u.forEach((o,f)=>{s.has(f)||u.getAll(f).forEach(m=>{s.append(f,m)})}),s}var Ar=null;function vv(){if(Ar===null)try{new FormData(document.createElement("form"),0),Ar=!1}catch{Ar=!0}return Ar}var bv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ts(i){return i!=null&&!bv.has(i)?(Yt(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Hr}"`),null):i}function xv(i,u){let s,o,f,m,_;if(hv(i)){let b=i.getAttribute("action");o=b?Sa(b,u):null,s=i.getAttribute("method")||Lr,f=Ts(i.getAttribute("enctype"))||Hr,m=new FormData(i)}else if(mv(i)||pv(i)&&(i.type==="submit"||i.type==="image")){let b=i.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=i.getAttribute("formaction")||b.getAttribute("action");if(o=y?Sa(y,u):null,s=i.getAttribute("formmethod")||b.getAttribute("method")||Lr,f=Ts(i.getAttribute("formenctype"))||Ts(b.getAttribute("enctype"))||Hr,m=new FormData(b,i),!vv()){let{name:p,type:w,value:k}=i;if(w==="image"){let N=p?`${p}.`:"";m.append(`${N}x`,"0"),m.append(`${N}y`,"0")}else p&&m.append(p,k)}}else{if(Wr(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Lr,o=null,f=Hr,_=i}return m&&f==="text/plain"&&(_=m,m=void 0),{action:o,method:s.toLowerCase(),encType:f,formData:m,body:_}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Zs(i,u){if(i===!1||i===null||typeof i>"u")throw new Error(u)}function Sv(i,u,s,o){let f=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return s?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${o}`:f.pathname=`${f.pathname}.${o}`:f.pathname==="/"?f.pathname=`_root.${o}`:u&&Sa(f.pathname,u)==="/"?f.pathname=`${u.replace(/\/$/,"")}/_root.${o}`:f.pathname=`${f.pathname.replace(/\/$/,"")}.${o}`,f}async function kv(i,u){if(i.id in u)return u[i.id];try{let s=await import(i.module);return u[i.id]=s,s}catch(s){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ev(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function wv(i,u,s){let o=await Promise.all(i.map(async f=>{let m=u.routes[f.route.id];if(m){let _=await kv(m,s);return _.links?_.links():[]}return[]}));return Av(o.flat(1).filter(Ev).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function yh(i,u,s,o,f,m){let _=(y,p)=>s[p]?y.route.id!==s[p].route.id:!0,b=(y,p)=>{var w;return s[p].pathname!==y.pathname||((w=s[p].route.path)==null?void 0:w.endsWith("*"))&&s[p].params["*"]!==y.params["*"]};return m==="assets"?u.filter((y,p)=>_(y,p)||b(y,p)):m==="data"?u.filter((y,p)=>{var k;let w=o.routes[y.route.id];if(!w||!w.hasLoader)return!1;if(_(y,p)||b(y,p))return!0;if(y.route.shouldRevalidate){let N=y.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((k=s[0])==null?void 0:k.params)||{},nextUrl:new URL(i,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof N=="boolean")return N}return!0}):[]}function Tv(i,u,{includeHydrateFallback:s}={}){return jv(i.map(o=>{let f=u.routes[o.route.id];if(!f)return[];let m=[f.module];return f.clientActionModule&&(m=m.concat(f.clientActionModule)),f.clientLoaderModule&&(m=m.concat(f.clientLoaderModule)),s&&f.hydrateFallbackModule&&(m=m.concat(f.hydrateFallbackModule)),f.imports&&(m=m.concat(f.imports)),m}).flat(1))}function jv(i){return[...new Set(i)]}function Rv(i){let u={},s=Object.keys(i).sort();for(let o of s)u[o]=i[o];return u}function Av(i,u){let s=new Set;return new Set(u),i.reduce((o,f)=>{let m=JSON.stringify(Rv(f));return s.has(m)||(s.add(m),o.push({key:m,link:f})),o},[])}function Qh(){let i=g.useContext(rl);return Zs(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function zv(){let i=g.useContext($r);return Zs(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Ks=g.createContext(void 0);Ks.displayName="FrameworkContext";function Zh(){let i=g.useContext(Ks);return Zs(i,"You must render this element inside a <HydratedRouter> element"),i}function Ov(i,u){let s=g.useContext(Ks),[o,f]=g.useState(!1),[m,_]=g.useState(!1),{onFocus:b,onBlur:y,onMouseEnter:p,onMouseLeave:w,onTouchStart:k}=u,N=g.useRef(null);g.useEffect(()=>{if(i==="render"&&_(!0),i==="viewport"){let H=U=>{U.forEach(K=>{_(K.isIntersecting)})},B=new IntersectionObserver(H,{threshold:.5});return N.current&&B.observe(N.current),()=>{B.disconnect()}}},[i]),g.useEffect(()=>{if(o){let H=setTimeout(()=>{_(!0)},100);return()=>{clearTimeout(H)}}},[o]);let Y=()=>{f(!0)},L=()=>{f(!1),_(!1)};return s?i!=="intent"?[m,N,{}]:[m,N,{onFocus:ni(b,Y),onBlur:ni(y,L),onMouseEnter:ni(p,Y),onMouseLeave:ni(w,L),onTouchStart:ni(k,Y)}]:[!1,N,{}]}function ni(i,u){return s=>{i&&i(s),s.defaultPrevented||u(s)}}function Cv({page:i,...u}){let{router:s}=Qh(),o=g.useMemo(()=>Ch(s.routes,i,s.basename),[s.routes,i,s.basename]);return o?g.createElement(Nv,{page:i,matches:o,...u}):null}function Dv(i){let{manifest:u,routeModules:s}=Zh(),[o,f]=g.useState([]);return g.useEffect(()=>{let m=!1;return wv(i,u,s).then(_=>{m||f(_)}),()=>{m=!0}},[i,u,s]),o}function Nv({page:i,matches:u,...s}){let o=gt(),{future:f,manifest:m,routeModules:_}=Zh(),{basename:b}=Qh(),{loaderData:y,matches:p}=zv(),w=g.useMemo(()=>yh(i,u,p,m,o,"data"),[i,u,p,m,o]),k=g.useMemo(()=>yh(i,u,p,m,o,"assets"),[i,u,p,m,o]),N=g.useMemo(()=>{if(i===o.pathname+o.search+o.hash)return[];let H=new Set,B=!1;if(u.forEach(K=>{var ue;let X=m.routes[K.route.id];!X||!X.hasLoader||(!w.some(ce=>ce.route.id===K.route.id)&&K.route.id in y&&((ue=_[K.route.id])!=null&&ue.shouldRevalidate)||X.hasClientLoader?B=!0:H.add(K.route.id))}),H.size===0)return[];let U=Sv(i,b,f.unstable_trailingSlashAwareDataRequests,"data");return B&&H.size>0&&U.searchParams.set("_routes",u.filter(K=>H.has(K.route.id)).map(K=>K.route.id).join(",")),[U.pathname+U.search]},[b,f.unstable_trailingSlashAwareDataRequests,y,o,m,w,u,i,_]),Y=g.useMemo(()=>Tv(k,m),[k,m]),L=Dv(k);return g.createElement(g.Fragment,null,N.map(H=>g.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...s})),Y.map(H=>g.createElement("link",{key:H,rel:"modulepreload",href:H,...s})),L.map(({key:H,link:B})=>g.createElement("link",{key:H,nonce:s.nonce,...B,crossOrigin:B.crossOrigin??s.crossOrigin})))}function Mv(...i){return u=>{i.forEach(s=>{typeof s=="function"?s(u):s!=null&&(s.current=u)})}}var Uv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Uv&&(window.__reactRouterVersion="7.13.1")}catch{}function qv({basename:i,children:u,unstable_useTransitions:s,window:o}){let f=g.useRef();f.current==null&&(f.current=my({window:o,v5Compat:!0}));let m=f.current,[_,b]=g.useState({action:m.action,location:m.location}),y=g.useCallback(p=>{s===!1?b(p):g.startTransition(()=>b(p))},[s]);return g.useLayoutEffect(()=>m.listen(y),[m,y]),g.createElement(fv,{basename:i,children:u,location:_.location,navigationType:_.action,navigator:m,unstable_useTransitions:s})}var Kh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jh=g.forwardRef(function({onClick:u,discover:s="render",prefetch:o="none",relative:f,reloadDocument:m,replace:_,unstable_mask:b,state:y,target:p,to:w,preventScrollReset:k,viewTransition:N,unstable_defaultShouldRevalidate:Y,...L},H){let{basename:B,navigator:U,unstable_useTransitions:K}=g.useContext(Rt),X=typeof w=="string"&&Kh.test(w),ue=Uh(w,B);w=ue.to;let ce=Ky(w,{relative:f}),_e=gt(),F=null;if(b){let Me=Jr(b,[],_e.unstable_mask?_e.unstable_mask.pathname:"/",!0);B!=="/"&&(Me.pathname=Me.pathname==="/"?B:ta([B,Me.pathname])),F=U.createHref(Me)}let[W,se,Pe]=Ov(o,L),Je=Bv(w,{replace:_,unstable_mask:b,state:y,target:p,preventScrollReset:k,relative:f,viewTransition:N,unstable_defaultShouldRevalidate:Y,unstable_useTransitions:K});function Ce(Me){u&&u(Me),Me.defaultPrevented||Je(Me)}let At=!(ue.isExternal||m),ut=g.createElement("a",{...L,...Pe,href:(At?F:void 0)||ue.absoluteURL||ce,onClick:At?Ce:u,ref:Mv(H,se),target:p,"data-discover":!X&&s==="render"?"true":void 0});return W&&!X?g.createElement(g.Fragment,null,ut,g.createElement(Cv,{page:ce})):ut});Jh.displayName="Link";var Js=g.forwardRef(function({"aria-current":u="page",caseSensitive:s=!1,className:o="",end:f=!1,style:m,to:_,viewTransition:b,children:y,...p},w){let k=si(_,{relative:p.relative}),N=gt(),Y=g.useContext($r),{navigator:L,basename:H}=g.useContext(Rt),B=Y!=null&&Qv(k)&&b===!0,U=L.encodeLocation?L.encodeLocation(k).pathname:k.pathname,K=N.pathname,X=Y&&Y.navigation&&Y.navigation.location?Y.navigation.location.pathname:null;s||(K=K.toLowerCase(),X=X?X.toLowerCase():null,U=U.toLowerCase()),X&&H&&(X=Sa(X,H)||X);const ue=U!=="/"&&U.endsWith("/")?U.length-1:U.length;let ce=K===U||!f&&K.startsWith(U)&&K.charAt(ue)==="/",_e=X!=null&&(X===U||!f&&X.startsWith(U)&&X.charAt(U.length)==="/"),F={isActive:ce,isPending:_e,isTransitioning:B},W=ce?u:void 0,se;typeof o=="function"?se=o(F):se=[o,ce?"active":null,_e?"pending":null,B?"transitioning":null].filter(Boolean).join(" ");let Pe=typeof m=="function"?m(F):m;return g.createElement(Jh,{...p,"aria-current":W,className:se,ref:w,style:Pe,to:_,viewTransition:b},typeof y=="function"?y(F):y)});Js.displayName="NavLink";var Lv=g.forwardRef(({discover:i="render",fetcherKey:u,navigate:s,reloadDocument:o,replace:f,state:m,method:_=Lr,action:b,onSubmit:y,relative:p,preventScrollReset:w,viewTransition:k,unstable_defaultShouldRevalidate:N,...Y},L)=>{let{unstable_useTransitions:H}=g.useContext(Rt),B=Vv(),U=Xv(b,{relative:p}),K=_.toLowerCase()==="get"?"get":"post",X=typeof b=="string"&&Kh.test(b),ue=ce=>{if(y&&y(ce),ce.defaultPrevented)return;ce.preventDefault();let _e=ce.nativeEvent.submitter,F=(_e==null?void 0:_e.getAttribute("formmethod"))||_,W=()=>B(_e||ce.currentTarget,{fetcherKey:u,method:F,navigate:s,replace:f,state:m,relative:p,preventScrollReset:w,viewTransition:k,unstable_defaultShouldRevalidate:N});H&&s!==!1?g.startTransition(()=>W()):W()};return g.createElement("form",{ref:L,method:K,action:U,onSubmit:o?y:ue,...Y,"data-discover":!X&&i==="render"?"true":void 0})});Lv.displayName="Form";function Hv(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $h(i){let u=g.useContext(rl);return qe(u,Hv(i)),u}function Bv(i,{target:u,replace:s,unstable_mask:o,state:f,preventScrollReset:m,relative:_,viewTransition:b,unstable_defaultShouldRevalidate:y,unstable_useTransitions:p}={}){let w=Fa(),k=gt(),N=si(i,{relative:_});return g.useCallback(Y=>{if(gv(Y,u)){Y.preventDefault();let L=s!==void 0?s:ui(k)===ui(N),H=()=>w(i,{replace:L,unstable_mask:o,state:f,preventScrollReset:m,relative:_,viewTransition:b,unstable_defaultShouldRevalidate:y});p?g.startTransition(()=>H()):H()}},[k,w,N,s,o,f,u,i,m,_,b,y,p])}function D1(i){Yt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let u=g.useRef(Ds(i)),s=g.useRef(!1),o=gt(),f=g.useMemo(()=>yv(o.search,s.current?null:u.current),[o.search]),m=Fa(),_=g.useCallback((b,y)=>{const p=Ds(typeof b=="function"?b(new URLSearchParams(f)):b);s.current=!0,m("?"+p,y)},[m,f]);return[f,_]}var Yv=0,Gv=()=>`__${String(++Yv)}__`;function Vv(){let{router:i}=$h("useSubmit"),{basename:u}=g.useContext(Rt),s=rv(),o=i.fetch,f=i.navigate;return g.useCallback(async(m,_={})=>{let{action:b,method:y,encType:p,formData:w,body:k}=xv(m,u);if(_.navigate===!1){let N=_.fetcherKey||Gv();await o(N,s,_.action||b,{unstable_defaultShouldRevalidate:_.unstable_defaultShouldRevalidate,preventScrollReset:_.preventScrollReset,formData:w,body:k,formMethod:_.method||y,formEncType:_.encType||p,flushSync:_.flushSync})}else await f(_.action||b,{unstable_defaultShouldRevalidate:_.unstable_defaultShouldRevalidate,preventScrollReset:_.preventScrollReset,formData:w,body:k,formMethod:_.method||y,formEncType:_.encType||p,replace:_.replace,state:_.state,fromRouteId:s,flushSync:_.flushSync,viewTransition:_.viewTransition})},[o,f,u,s])}function Xv(i,{relative:u}={}){let{basename:s}=g.useContext(Rt),o=g.useContext(Gt);qe(o,"useFormAction must be used inside a RouteContext");let[f]=o.matches.slice(-1),m={...si(i||".",{relative:u})},_=gt();if(i==null){m.search=_.search;let b=new URLSearchParams(m.search),y=b.getAll("index");if(y.some(w=>w==="")){b.delete("index"),y.filter(k=>k).forEach(k=>b.append("index",k));let w=b.toString();m.search=w?`?${w}`:""}}return(!i||i===".")&&f.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(m.pathname=m.pathname==="/"?s:ta([s,m.pathname])),ui(m)}function Qv(i,{relative:u}={}){let s=g.useContext(Lh);qe(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=$h("useViewTransitionState"),f=si(i,{relative:u});if(!s.isTransitioning)return!1;let m=Sa(s.currentLocation.pathname,o)||s.currentLocation.pathname,_=Sa(s.nextLocation.pathname,o)||s.nextLocation.pathname;return Qr(f.pathname,_)!=null||Qr(f.pathname,m)!=null}function Wh(i,u){return i?i.length<=u?i:i.slice(0,u)+"...":""}/**
|
|
62
62
|
* @license lucide-react v0.469.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
@@ -233,10 +233,10 @@ Please change the parent <Route path="${U}"> to <Route path="${U==="/"?"*":`${U}
|
|
|
233
233
|
*
|
|
234
234
|
* This source code is licensed under the ISC license.
|
|
235
235
|
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const lp=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),vh=i=>{let u;const s=new Set,o=(p,w)=>{const k=typeof p=="function"?p(u):p;if(!Object.is(k,u)){const N=u;u=w??(typeof k!="object"||k===null)?k:Object.assign({},u,k),s.forEach(Y=>Y(u,N))}},f=()=>u,b={setState:o,getState:f,getInitialState:()=>y,subscribe:p=>(s.add(p),()=>s.delete(p))},y=u=i(o,f,b);return b},yb=(i=>i?vh(i):vh),vb=i=>i;function bb(i,u=vb){const s=Rr.useSyncExternalStore(i.subscribe,Rr.useCallback(()=>u(i.getState()),[i,u]),Rr.useCallback(()=>u(i.getInitialState()),[i,u]));return Rr.useDebugValue(s),s}const bh=i=>{const u=yb(i),s=o=>bb(u,o);return Object.assign(s,u),s},Fr=(i=>i?bh(i):bh),zr="overlord-access-token",Or="overlord-refresh-token",We={getAccessToken(){return localStorage.getItem(zr)},setAccessToken(i){localStorage.setItem(zr,i)},getRefreshToken(){return localStorage.getItem(Or)},setRefreshToken(i){localStorage.setItem(Or,i)},setTokens(i,u){localStorage.setItem(zr,i),localStorage.setItem(Or,u)},clearTokens(){localStorage.removeItem(zr),localStorage.removeItem(Or)},parseToken(i){try{const u=i.split(".")[1];return JSON.parse(atob(u))}catch{return null}},hasScope(i,u){const s=We.parseToken(i);return s?s.scope===u:!1},isExpired(i){const u=We.parseToken(i);return!u||typeof u.exp!="number"?!0:Date.now()/1e3>u.exp-30}};function js(i){const u=We.parseToken(i);if(!u)return null;const s=u.name??"";return{id:u.sub,username:s,display_name:s,role:u.role}}const xa=Fr((i,u)=>({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!1,initializing:!0,initialize:()=>{const s=We.getAccessToken();s&&!We.isExpired(s)?i({accessToken:s,user:js(s),requireTotpSetup:We.hasScope(s,"totp_setup"),initializing:!1}):We.getRefreshToken()?u().refresh().catch(()=>{We.clearTokens()}).finally(()=>{i({initializing:!1})}):i({initializing:!1})},login:async s=>{var m;const o=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!o.ok){const _=await o.json().catch(()=>({message:"Login failed"})),b=((m=_.error)==null?void 0:m.message)??_.message??"Login failed";throw new Error(b)}const f=await o.json();if(f.totpSetup){We.setAccessToken(f.accessToken),i({accessToken:f.accessToken,user:null,requireTotpSetup:!0});return}We.setTokens(f.accessToken,f.refreshToken),i({accessToken:f.accessToken,user:js(f.accessToken),requireTotpSetup:!1,sessionExpired:!1})},logout:()=>{const s=We.getRefreshToken();s&&fetch("/api/auth/logout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:s})}).catch(()=>{}),We.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!1})},refresh:(()=>{let s=null;return async()=>s||(s=(async()=>{const o=We.getRefreshToken();if(!o)throw We.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!0}),new Error("No refresh token");const f=await fetch("/api/auth/refresh",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:o})});if(!f.ok)throw We.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!0}),new Error("Refresh failed");const m=await f.json();We.setTokens(m.accessToken,m.refreshToken),i({accessToken:m.accessToken,user:js(m.accessToken)})})().finally(()=>{s=null}),s)})(),setSessionExpired:s=>{i({sessionExpired:s})}})),D1={QUEUED:"QUEUED",ASSIGNED:"ASSIGNED",RUNNING:"RUNNING",SUSPENDED:"SUSPENDED",COMPLETED:"COMPLETED",FAILED:"FAILED",CANCELLED:"CANCELLED"},N1={ONLINE:"online",OFFLINE:"offline",DRAINING:"draining",DECOMMISSIONED:"decommissioned"},ip={DEVELOPER:"developer",LEAD:"lead",ADMIN:"admin"},M1={MAINTAINER:"maintainer",MEMBER:"member"},U1={CLAUDE:"claude",CURSOR:"cursor",CODEX:"codex"},q1={ACTIVE:"active",USED:"used",REVOKED:"revoked",EXPIRED:"expired"},L1={GITLAB:"gitlab",GITHUB:"github",GITEA:"gitea"},H1={ACTIVE:"active",DISABLED:"disabled"},B1={ACTIVE:"active"},Y1={IDLE:"IDLE",STARTING:"STARTING",CONNECTED:"CONNECTED",EXPIRED:"EXPIRED",CLOSING:"CLOSING",CLOSED:"CLOSED"};function xb(){return xa(i=>{var u;return((u=i.user)==null?void 0:u.role)===ip.ADMIN})??!1}const rp="overlord-sidebar-collapsed";function Sb(){try{return localStorage.getItem(rp)==="true"}catch{return!1}}const kb=Fr((i,u)=>({sidebarCollapsed:Sb(),toggleSidebar:()=>{const s=!u().sidebarCollapsed;try{localStorage.setItem(rp,String(s))}catch{}i({sidebarCollapsed:s})}}));class Eb{constructor(){Ve(this,"ws",null);Ve(this,"reconnectAttempts",0);Ve(this,"maxReconnectAttempts",15);Ve(this,"reconnectTimer",null);Ve(this,"disposed",!1);Ve(this,"authenticated",!1);Ve(this,"eventHandlers",new Set);Ve(this,"statusHandlers",new Set)}onEvent(u){return this.eventHandlers.add(u),()=>this.eventHandlers.delete(u)}onStatus(u){return this.statusHandlers.add(u),()=>this.statusHandlers.delete(u)}get isConnected(){var u;return this.authenticated&&((u=this.ws)==null?void 0:u.readyState)===WebSocket.OPEN}connect(){var f,m;if(this.disposed||((f=this.ws)==null?void 0:f.readyState)===WebSocket.OPEN||((m=this.ws)==null?void 0:m.readyState)===WebSocket.CONNECTING)return;const u=We.getAccessToken();if(!u||We.isExpired(u))return;const o=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/events`;this.notifyStatus("connecting"),this.authenticated=!1,this.ws=new WebSocket(o),this.ws.onopen=()=>{var b,y;const _=We.getAccessToken();_?(b=this.ws)==null||b.send(JSON.stringify({type:"auth",token:_})):(y=this.ws)==null||y.close()},this.ws.onmessage=_=>{var b;if(typeof _.data=="string")try{const y=JSON.parse(_.data);if(y.type==="auth_ok"){this.authenticated=!0,this.reconnectAttempts=0,this.notifyStatus("connected");return}if(y.type==="auth_error"){(b=this.ws)==null||b.close();return}if(y.type==="event")for(const p of this.eventHandlers)try{p(y)}catch{}}catch{}},this.ws.onclose=()=>{this.authenticated=!1,this.notifyStatus("disconnected"),this.scheduleReconnect()},this.ws.onerror=()=>{var _;(_=this.ws)==null||_.close()}}disconnect(){var u;this.clearReconnectTimer(),this.authenticated=!1,(u=this.ws)==null||u.close(),this.ws=null}dispose(){this.disposed=!0,this.disconnect(),this.eventHandlers.clear(),this.statusHandlers.clear()}reconnect(){this.disconnect(),this.reconnectAttempts=0,this.connect()}scheduleReconnect(){if(this.disposed||this.reconnectAttempts>=this.maxReconnectAttempts)return;const u=Math.min(1e3*2**this.reconnectAttempts,3e4);this.reconnectAttempts++,this.reconnectTimer=setTimeout(()=>{this.disposed||this.connect()},u)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}notifyStatus(u){for(const s of this.statusHandlers)try{s(u)}catch{}}}const Cr=new Eb,up=Fr(i=>({status:"disconnected",lastEvent:null,eventSeq:0,taskSeq:0,workerSeq:0,init:()=>{const u=Cr.onEvent(o=>{const f=o.event==="task_status_changed"||o.event==="task_created",m=o.event==="worker_status_changed";i(_=>({lastEvent:o,eventSeq:_.eventSeq+1,...f&&{taskSeq:_.taskSeq+1},...m&&{workerSeq:_.workerSeq+1}}))}),s=Cr.onStatus(o=>{const f=up.getState().status;i({status:o}),f==="disconnected"&&o==="connected"&&i(m=>({eventSeq:m.eventSeq+1,taskSeq:m.taskSeq+1,workerSeq:m.workerSeq+1}))});return Cr.connect(),()=>{u(),s(),Cr.disconnect()}}})),op="overlord-theme";function wb(){try{const i=localStorage.getItem(op);if(i==="light"||i==="dark"||i==="system")return i}catch{}return"dark"}function xh(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const sp=Fr(i=>{const u=wb(),s=u==="system"?xh():u;return{theme:u,resolved:s,setTheme:o=>{localStorage.setItem(op,o);const f=o==="system"?xh():o;i({theme:o,resolved:f})},setResolved:o=>{i({resolved:o})}}}),Tb={common:{cancel:"cancel",confirm:"confirm",save:"save",delete:"delete",edit:"edit",create:"create",copy:"copy",copied:"copied",close:"close",back:"back",back_to_site:"back to site",go_back:"go back",go_home:"go home",dismiss:"dismiss",retry:"retry",loading:"// thinking...",processing:"processing...",creating:"creating...",saving:"saving...",updating:"updating...",verifying:"verifying...",signing_in:"signing in...",just_now:"just now",never:"never",previous:"previous",next:"next",error:"error",success:"success",failed:"failed",active:"active",inactive:"inactive",enabled:"enabled",disabled:"disabled",showing_entries:"showing {start}-{end} of {total}",no_results:"no results found",runtime_error:"// runtime error",an_unexpected_error_occurred:"an unexpected error occurred",reload:"reload",not_found:"404",page_not_found:"// page not found",the_page_does_not_exist:"the page you are looking for does not exist or has been moved.",not_found_terminal_error:"error: requested not found - page does not exist",not_set:"not set",view_all:"view all",discard:"discard",save_changes:"save changes",add:"add",remove:"remove",search:"search",actions:"actions",name:"name",status:"status",role:"role",description:"description",type:"type",created_at:"created at",ago:"{time} ago",m_ago:"{n}m ago",h_ago:"{n}h ago",d_ago:"{n}d ago",navigation:"// navigation",docs_section:"// docs",admin_section:"// admin",overlord:"overlord",logout:"logout",logout_title:"// logout",logout_message:"are you sure you want to log out?",log_out:"log out",profile:"profile",search_placeholder:"search",search_input_placeholder:"search tasks, workers, projects...",no_search_results:'// no results for "{query}"',navigate_hint:"navigate",select_hint:"select",close_hint:"close",notifications:"notifications",mark_all_read:"mark all read",no_notifications:"// no notifications",mark_as_read:"mark as read",switch_to_light:"switch to light mode",switch_to_dark:"switch to dark mode",light_mode:"light mode",dark_mode:"dark mode",dismiss_notification:"dismiss",breadcrumb_terminal:"terminal",breadcrumb_terminal_sub:"active sessions",breadcrumb_dashboard:"dashboard",breadcrumb_dashboard_sub:"active overview",breadcrumb_tasks:"tasks",breadcrumb_tasks_sub:"queue management",breadcrumb_workers:"workers",breadcrumb_workers_sub:"fleet status",breadcrumb_projects:"projects",breadcrumb_projects_sub:"repository index",breadcrumb_admin:"admin",breadcrumb_admin_sub:"system control",breadcrumb_profile:"profile",breadcrumb_profile_sub:"user settings",breadcrumb_tokens:"tokens",breadcrumb_tokens_sub:"personal api tokens",breadcrumb_docs:"docs",breadcrumb_docs_sub:"documentation",breadcrumb_docs_cli:"docs",breadcrumb_docs_cli_sub:"cli",breadcrumb_docs_api:"docs",breadcrumb_docs_api_sub:"api",breadcrumb_docs_skill:"docs",breadcrumb_docs_skill_sub:"skill",breadcrumb_docs_bot_sub:"bot",breadcrumb_docs_all_sub:"all",error_default_title:"something went wrong",error_default_message:"an unexpected error occurred. please try again."},auth:{sign_in:"sign in",username:"username",enter_username:"enter username",password:"password",enter_password:"enter password",ai_powered_development_system:"// ai-powered development system",username_and_password_required:"username and password are required.",login_failed:"login failed",invalid_totp_code:"invalid totp code",two_factor_verification:"// 2fa verification",enter_totp_code:"enter your totp code",please_enter_valid_6_digit_code:"please enter a valid 6-digit code.",session_expired:"session expired",session_expired_message:"// your session has expired. please log in again.",go_to_login:"go to login",totp_setup_title:"2FA setup",totp_setup_subtitle:"// scan the qr code with your authenticator app",scan_with_authenticator:"scan this qr code with your authenticator app (google authenticator, authy, etc.)",manual_entry_key:"manual entry key",enter_verification_code:"enter the 6-digit verification code from your authenticator app",verification_code:"verification code",enter_6_digit_code:"enter 6-digit code",verify_and_enable:"verify and enable",totp_setup_complete:"2fa setup complete",totp_setup_complete_login_again:"2fa setup complete! please log in again.",totp_setup_failed:"verification failed. please try again.",totp_setup_footer:"// you must complete this setup before accessing the application",totp_manual_entry:"// or enter this key manually",verify:"verify",initializing:"// initializing...",failed_to_init_totp:"failed to initialize totp setup"},dashboard:{title:"dashboard",subtitle:"// system overview",active_tasks:"active tasks",queued_tasks:"queued tasks",tasks_active_queued:"active / queued",online_workers:"online workers",completed_today:"completed today",completed_all_today:"completed all today",completed_by_you_today:"completed by you today",task_success_rate:"> task success rate",last_7_days:"last 7 days",recent_tasks:"> recent tasks",no_tasks_yet:"// no tasks yet",worker_status:"> worker status",no_workers_registered:"// no workers registered",recent_activity:"> recent activity",no_recent_activity:"// no recent activity",daily_breakdown_not_available:"// daily breakdown not available",task_total:"task",tasks_total:"tasks",slots:"slots",online:"online",idle:"idle",offline:"offline"},tasks:{title:"tasks",subtitle:"// queue management",create_task:"create task",new_task:"new task",task_description:"task description",describe_task_placeholder:"describe the development task in detail...",project:"project",select_project:"select project...",task_type:"type",branch_slug:"branch name (optional)",branch_slug_placeholder:"auto-generated from description",target_worker:"target worker (optional)",any_able:"any able",assign_developer:"assign developer (admin only)",select_developer:"select developer...",search_tasks:"search tasks...",filter_project:"all projects",filter_developer:"all developers",id:"id",description_col:"description",status_col:"status",project_col:"project",assignee:"assignee",worker:"worker",time:"time",stage:"stage",no_tasks_found:"no tasks found",try_adjusting_search:"try adjusting your search query",create_first_task:"create your first task to get started",tab_all:"all",tab_running:"running",tab_queued:"queued",tab_completed:"completed",tab_failed:"failed",tab_cancelled:"cancelled",status_queued:"queued",status_assigned:"assigned",status_running:"running",status_suspended:"suspended",status_completed:"completed",status_failed:"failed",status_cancelled:"cancelled",similar_task_exists:"a similar task already exists.",confirm_create_similar:"are you sure you want to create this task?",view_existing:"view existing",force_create:"force create",cancel_task:"cancel",retry_task:"retry",cursor_tunnel:"IDE tunnel",skip_stage:"skip stage",take_over:"take over",release_control:"release control",connected:"connected",disconnected:"disconnected",connecting:"connecting",terminal:"terminal",pipeline_tab:"pipeline",logs:"logs",task_not_found:"// task not found",task_does_not_exist:"this task does not exist or has been deleted.",back_to_tasks:"back to tasks",task_detail_subtitle:"#{id} {desc}",cancel_task_title:"cancel task",task_cancelled:"task cancelled.",failed_to_cancel_task:"failed to cancel task.",task_retried:"task has been retried.",failed_to_retry_task:"failed to retry task.",fork_task:"fork task",fork_task_desc:"create a new task based on this one",fork_description_placeholder:"enter new description (leave empty to reuse original)",fork_success:"task forked successfully",fork_error:"failed to fork task",retry_mr_title:"retry MR",retry_mr_confirm:"retry creating the merge request for task #{id}?",mr_retry_submitted:"mr retry submitted.",failed_to_retry_mr:"failed to retry mr.",activity_log:"> activity log",pipeline_section:"> pipeline",no_pipeline:"// no pipeline configured",no_activity:"// no activity yet",confirm_stage:"confirm stage",confirm_stage_message:'confirm execution of stage "{name}"? this will proceed with the pipeline.',stage_confirmed:"stage confirmed.",failed_to_confirm_stage:"failed to confirm stage.",loading_task:"// thinking...",task_suspended_banner:"// task suspended — waiting for user confirmation",pending_confirmation:"> pending confirmation",pipeline_requires_confirmation:"the pipeline requires confirmation before proceeding.",confirm_and_proceed:"confirm and proceed",confirm_failed:"failed to confirm stage",reject:"reject",pty_terminal:"// pty terminal",view_terminal:"switch to terminal tab",restore_auto:"restore auto",requesting_takeover:"requesting...",pipeline_stages:"// pipeline stages",task_info:"> task info",stage_timeline:"> stage timeline",workspace_section:"> workspace",mr_link:"MR link",queue_position:"queue position: #{position} of {total}",queue_ahead:"{count} task(s) ahead",queue_next:"next to be processed",queue_position_banner:"// queued — position #{position} of {total}",no_worker_assigned:"// no worker assigned",no_output:"// no output",pty_output:"> PTY output",stage_progress:"> stage progress",task_logs:"> task logs",search_logs:"search logs...",no_log_entries:"// no log entries",prev:"prev",cursor_tunnel_section:"> IDE tunnel",auto_pipeline:"auto pipeline",auto_mode:"auto mode",manual_takeover:"manual takeover",takeover_denied:"takeover denied",requesting_takeover_ellipsis:"requesting takeover...",take_over_label:"take over",release_label:"release",create_task_page_title:"// create task",create_task_page_subtitle:"// submit a new task for processing",form_project_label:"project",form_description_label:"description",form_description_placeholder:"describe the task for the ai agent...",form_worker_preference:"worker preference",form_worker_placeholder:"optional: worker id or name (--on)",form_worker_hint:"leave empty for automatic worker selection.",form_agent_type:"agent type",form_agent_type_placeholder:"default",form_select_project:"select a project",form_create_task:"create task",project_and_description_required:"project and description are required.",failed_to_create_task:"failed to create task.",tunnel_idle:"idle",tunnel_starting:"starting...",tunnel_connected:"connected",tunnel_expired:"expired",tunnel_closing:"closing...",tunnel_start:"start",tunnel_open_in_cursor:"open in IDE",tunnel_header:"> IDE tunnel",tunnel_copied:"// copied to clipboard",tunnel_waiting:"// waiting for connection url...",tunnel_start_button:"> start tunnel",tunnel_starting_button:"// starting...",tunnel_stopping:"// stopping...",tunnel_cancel:"> cancel",tunnel_open_cursor:"> open in IDE",tunnel_open_vscode:"> open in vscode",tunnel_stop:"> stop tunnel",tunnel_restart:"> restart tunnel",tunnel_copy_url:"copy url",tunnel_expires_hm:"expires in {h}h {m}m",tunnel_expires_m:"expires in {m}m",tunnel_start_failed:"failed to start tunnel",tunnel_install_code_hint:'install the VS Code CLI ("code" command) to enable tunnels',dedup_title:"> similar task exists",dedup_description:"// a similar task was found that may already address your request",dedup_create_anyway:"create anyway",stage_choose_option:"// choose an option",stage_your_response:"your response",stage_type_answer:"type your answer...",stage_submitting:"submitting...",stage_continue:"continue",stage_submit:"submit",cancel_task_message:"are you sure you want to cancel task #{id}? this will terminate the running agent and cannot be undone.",cancel_task_confirm_label:"cancel task",retry_title:"retry task",retry_confirm_label:"retry",retry_message_with_mr:"task #{id} has an existing mr ({url}). retrying will create a new attempt on the same branch. continue?",retry_message_without_mr:"are you sure you want to retry task #{id}? this will create a new execution attempt.",reuse_workspace_label:"reuse existing workspace (skip worktree recreation, continue on current branch)"},workers:{title:"workers",subtitle:"// fleet status",fleet:"fleet",setup_guide:"setup guide",all_statuses:"all",register_worker:"register worker",no_workers_found:"no workers found",no_workers_registered:"no workers have registered yet",try_changing_status_filter:"try changing the status filter",view_setup_guide:"view setup guide",online:"online",offline:"offline",draining:"draining",cpu:"cpu",mem:"mem",disk:"disk",tasks_slots:"tasks: {active}/{max} slots",back_to_workers:"back to workers",drain:"drain",undrain:"undrain",last_heartbeat:"last heartbeat: {time}",resource_usage:"> resource usage",connection_info:"> connection info",capabilities:"> capabilities",current_tasks:"> current tasks",no_capabilities:"// no capabilities reported",no_running_tasks:"// no running tasks",host:"host",port:"port",os:"os",cpu_model:"CPU model",cpu_cores:"CPU cores",memory:"memory",total_slots:"total slots",confirm_drain:"drain worker",confirm_drain_message:'drain worker "{name}"? it will finish current tasks but accept no new ones.',worker_drained:"worker drain initiated.",worker_undrained:"worker undrain initiated.",failed_to_update_worker:"failed to update worker status.",worker_setup_title:"worker setup guide",worker_setup_subtitle:"// register a new worker with overlord",step_1_title:"01. generate a registration token",step_1_desc:"generate a one-time registration token from the admin panel.",step_2_title:"02. install the worker cli",step_2_desc:"install the overlord worker cli on the target worker.",step_3_title:"03. register the worker",step_3_desc:"run the register command with your token and server url.",step_4_title:"04. start the worker",step_4_desc:"start the worker daemon. it will connect to overlord and begin accepting tasks.",generate_token:"generate token",worker_token_modal_title:"worker registration token",worker_token_modal_message:"// copy this token now. it will not be shown again.",loading_worker:"// thinking...",worker_not_found:"// worker not found",draining_warning:"// this worker is draining — no new tasks will be assigned",draining_active_tasks:"active tasks will continue to run until completion",active_tasks:"> active tasks",no_active_tasks:"// no active tasks on this worker",worker_info:"> worker info",unknown:"unknown",n_a:"n/a",id:"id",description:"description",stage:"stage",no_capabilities_short:"// no capabilities",slots:"slots",status_label:"status",undrain_worker_title:"> undrain worker",drain_worker_title:"> drain worker",undrain_confirm:"are you sure you want to undrain {name}? the worker will start accepting new tasks again.",drain_confirm:"are you sure you want to drain {name}? running tasks will complete, but no new tasks will be assigned until the worker is undrained.",decommission:"decommission",decommission_title:"> decommission worker",decommission_confirm:'permanently decommission "{name}"? active tasks will be failed or re-queued, and the worker will be disconnected. this cannot be undone.',decommissioned:"decommissioned",worker_id:"worker ID",setup_header_desc:"// follow these steps to add a new worker to your overlord cluster.",prerequisites:"// prerequisites",prereq_machine:"linux or macos machine with at least 2 cpu cores and 4gb ram",prereq_node:"node.js 18+ and pnpm installed",prereq_git:"git installed (2.25+)",prereq_network:"network access to the overlord server",prereq_token:"admin-generated worker registration token",step_generate_token:"generate worker token",step_generate_token_desc:"// create a one-time registration token from the admin panel. each token can register exactly one worker.",go_to_token_management:"go to token management",step_install_worker:"install worker package",step_install_worker_desc:"// install the overlord worker package globally via npm.",step_configure_env:"configure environment",step_configure_env_desc:"// create a .env file in ~/.overlord-worker/ or set environment variables.",env_host:"overlord server address (required)",env_worker_token:"one-time registration token (required for first run)",env_worker_name:"display name (defaults to hostname)",env_workspace_root:"task workspace directory (defaults to ~/.overlord-worker/workspaces)",env_max_slots:"max concurrent tasks (defaults to 2)",step_start_worker:"start worker",step_start_worker_desc:"// start the worker process. it will register with the server and begin accepting tasks.",or_run_as_service:"// or run as a system service for auto-restart:",setup_wizard_option:"// option a: interactive setup wizard (recommended)",manual_config_option:"// option b: manual configuration",start_note_setup_wizard:"// if you used the setup wizard, the worker may already be running.",step_verify_connection:"verify connection",step_verify_connection_desc:'// once the worker connects, it will appear in the workers list with a "healthy" status.',verify_how_to:"// how to verify:",verify_check_workers:"check the workers page for your new worker",verify_status:'status should show "healthy" within 30 seconds',verify_capabilities:"worker capabilities are auto-detected on first heartbeat",last_heartbeat_label:"last heartbeat",worker_version:"worker version",reg_title:"// worker registration",reg_subtitle:"> register a new worker node",reg_step_generate_token:"generate token",reg_step_install_worker:"install worker",reg_step_waiting_activation:"waiting activation",reg_step_activated:"activated",reg_click_to_generate:"// click to generate a one-time registration token",reg_token_generated:"// token generated successfully",reg_install_command:"// install cli & worker:",reg_run_setup:"// run setup on worker:",reg_running_installation:"// running installation on target worker",reg_installed_wait:"i've installed → wait for activation",reg_listening_for_worker:"listening for worker connection...",reg_worker_connected:"// worker connected",reg_waiting_for_worker:"// waiting for worker to connect...",reg_worker_activated:"worker {name} activated!",reg_worker_registered:"// worker successfully registered",reg_done:"done",reg_completed:"// completed"},projects:{title:"projects",subtitle:"// repository index",create_project:"create project",no_projects_yet:"no projects yet",create_first_project:"create your first project to get started",key:"key",name:"name",repository:"repository",agent:"agent",project_info:"> project info",repo_url:"repo URL",default_branch:"default branch",git_platform:"git platform",agent_type:"agent type",max_turns:"max turns",allowed_tools:"allowed tools",default_project:"default project",tasks_count:"tasks",last_activity:"last activity",members:"> members",developer:"developer",role:"role",added_at:"added at",add_member:"add member",remove_member:"remove member",remove_member_confirm:"remove {name} from this project?",member_added:"member added.",member_removed:"member removed.",failed_to_add_member:"failed to add member.",member_already_exists:"this developer is already a member of this project.",failed_to_remove_member:"failed to remove member.",pipeline:"> pipeline",add_stage:"+ add stage",recent_tasks:"> recent tasks",no_recent_tasks:"// no recent tasks",edit_project:"edit project",delete_project:"delete project",delete_project_confirm:'delete project "{name}"? this cannot be undone.',project_deleted:"project deleted.",failed_to_delete_project:"failed to delete project.",project_name:"project name",project_name_placeholder:"my awesome project",project_key:"project key",project_key_placeholder:"my-project",project_key_hint:"// unique identifier (lowercase, alphanumeric, hyphens)",ssh_url:"SSH URL",ssh_url_placeholder:"git@github.com:org/repo.git",ssh_url_hint:"// optional — workers prefer ssh for git operations",repo_url_placeholder:"https://github.com/org/repo.git",main:"main",github:"github",gitlab:"gitlab",gitea:"gitea",claude:"claude",cursor:"cursor",codex:"codex",tools_placeholder:"tool1, tool2, ...",add_project_desc:"// add a new project to overlord",project_created:"project created.",failed_to_create_project:"failed to create project.",update_project_desc:"// update project configuration",save_changes:"save changes",basic_info:"> basic info",agent_config:"> agent config",security:"> security",git_token:"> git token",git_token_label:"current token",git_token_hint:"// personal access token for git operations (push, clone, etc.)",git_token_set:"set token",git_token_clear:"clear token",git_token_saved:"git token saved.",git_token_cleared:"git token cleared.",git_token_failed:"failed to update git token.",pipeline_section:"> pipeline",edit_pipeline:"> edit pipeline",pty_output_filter:"PTY output filter",workspace_root:"workspace root",member_role:"member",maintainer_role:"maintainer",select_developer:"select developer...",select_role:"select role...",adding:"adding...",project_not_found:"// project not found",back_to_projects:"back to projects",no_members_yet:"// no members yet",no_tasks_for_project:"// no tasks for this project yet",no_pipeline_configured:"// no pipeline configured",confirm_label:"confirm",id:"id",description:"description",status:"status",created:"created",project_saved:"project saved",failed_to_save_project:"failed to save project",invalid_pipeline_json:"invalid pipeline json",setup_commands:"setup commands",post_command:"post command",environment:"> environment",add_member_title:"// add member",edit_project_title:"edit project"},pipeline:{title:"pipeline editor",subtitle:"-- {key}",save:"save",cancel:"cancel",json_toggle:"json",add_stage:"add stage",stage_properties:"> stage properties",stage_name:"stage name",timeout:"timeout",confirm_required:"confirm required",on_failure:"on failure",goto:"goto",max_loops:"max loops",stop:"stop",no_stages:"// no stages defined",select_stage:"// select a stage to edit properties",saved:"pipeline saved",failed_to_save:"failed to save pipeline",failed_to_load:"failed to load pipeline.",loading_pipeline:"// thinking...",unnamed:"unnamed",editing:"// editing: {name}",name:"name",on_failure_section:"// on failure",goto_stage:"goto stage",up:"up",down:"down",failed_to_load_project:"failed to load project",delete_stage:"delete stage"},profile:{title:"profile",subtitle:"// user settings",profile_info:"> profile info",username:"username",git_name:"git name",git_email:"git email",status:"status",created_at:"created at",edit_git_info:"edit git info",change_password:"> change password",current_password:"current password",new_password:"new password",confirm_password:"confirm password",current_password_required:"current password is required.",new_password_required:"new password is required.",passwords_do_not_match:"new passwords do not match.",password_changed:"password changed successfully.",failed_to_change_password:"failed to change password.",update_password:"update password",two_factor_auth:"> two-factor authentication",two_fa_enabled:"2fa is enabled",two_fa_not_setup:"2fa is not set up",regenerate_2fa_warning:`// regenerating 2fa will invalidate your current authenticator app setup.
|
|
236
|
+
*/const lp=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),vh=i=>{let u;const s=new Set,o=(p,w)=>{const k=typeof p=="function"?p(u):p;if(!Object.is(k,u)){const N=u;u=w??(typeof k!="object"||k===null)?k:Object.assign({},u,k),s.forEach(Y=>Y(u,N))}},f=()=>u,b={setState:o,getState:f,getInitialState:()=>y,subscribe:p=>(s.add(p),()=>s.delete(p))},y=u=i(o,f,b);return b},yb=(i=>i?vh(i):vh),vb=i=>i;function bb(i,u=vb){const s=Rr.useSyncExternalStore(i.subscribe,Rr.useCallback(()=>u(i.getState()),[i,u]),Rr.useCallback(()=>u(i.getInitialState()),[i,u]));return Rr.useDebugValue(s),s}const bh=i=>{const u=yb(i),s=o=>bb(u,o);return Object.assign(s,u),s},Fr=(i=>i?bh(i):bh),zr="overlord-access-token",Or="overlord-refresh-token",We={getAccessToken(){return localStorage.getItem(zr)},setAccessToken(i){localStorage.setItem(zr,i)},getRefreshToken(){return localStorage.getItem(Or)},setRefreshToken(i){localStorage.setItem(Or,i)},setTokens(i,u){localStorage.setItem(zr,i),localStorage.setItem(Or,u)},clearTokens(){localStorage.removeItem(zr),localStorage.removeItem(Or)},parseToken(i){try{const u=i.split(".")[1];return JSON.parse(atob(u))}catch{return null}},hasScope(i,u){const s=We.parseToken(i);return s?s.scope===u:!1},isExpired(i){const u=We.parseToken(i);return!u||typeof u.exp!="number"?!0:Date.now()/1e3>u.exp-30}};function js(i){const u=We.parseToken(i);if(!u)return null;const s=u.name??"";return{id:u.sub,username:s,display_name:s,role:u.role}}const xa=Fr((i,u)=>({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!1,initializing:!0,initialize:()=>{const s=We.getAccessToken();s&&!We.isExpired(s)?i({accessToken:s,user:js(s),requireTotpSetup:We.hasScope(s,"totp_setup"),initializing:!1}):We.getRefreshToken()?u().refresh().catch(()=>{We.clearTokens()}).finally(()=>{i({initializing:!1})}):i({initializing:!1})},login:async s=>{var m;const o=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!o.ok){const _=await o.json().catch(()=>({message:"Login failed"})),b=((m=_.error)==null?void 0:m.message)??_.message??"Login failed";throw new Error(b)}const f=await o.json();if(f.totpSetup){We.setAccessToken(f.accessToken),i({accessToken:f.accessToken,user:null,requireTotpSetup:!0});return}We.setTokens(f.accessToken,f.refreshToken),i({accessToken:f.accessToken,user:js(f.accessToken),requireTotpSetup:!1,sessionExpired:!1})},logout:()=>{const s=We.getRefreshToken();s&&fetch("/api/auth/logout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:s})}).catch(()=>{}),We.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!1})},refresh:(()=>{let s=null;return async()=>s||(s=(async()=>{const o=We.getRefreshToken();if(!o)throw We.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!0}),new Error("No refresh token");const f=await fetch("/api/auth/refresh",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:o})});if(!f.ok)throw We.clearTokens(),i({accessToken:null,user:null,requireTotpSetup:!1,sessionExpired:!0}),new Error("Refresh failed");const m=await f.json();We.setTokens(m.accessToken,m.refreshToken),i({accessToken:m.accessToken,user:js(m.accessToken)})})().finally(()=>{s=null}),s)})(),setSessionExpired:s=>{i({sessionExpired:s})}})),N1={QUEUED:"QUEUED",ASSIGNED:"ASSIGNED",RUNNING:"RUNNING",SUSPENDED:"SUSPENDED",COMPLETED:"COMPLETED",FAILED:"FAILED",CANCELLED:"CANCELLED"},M1={ONLINE:"online",OFFLINE:"offline",DRAINING:"draining",DECOMMISSIONED:"decommissioned"},ip={DEVELOPER:"developer",LEAD:"lead",ADMIN:"admin"},U1={MAINTAINER:"maintainer",MEMBER:"member"},q1={CLAUDE:"claude",CURSOR:"cursor",CODEX:"codex"},L1={ACTIVE:"active",USED:"used",REVOKED:"revoked",EXPIRED:"expired"},H1={GITLAB:"gitlab",GITHUB:"github",GITEA:"gitea"},B1={ACTIVE:"active",DISABLED:"disabled"},Y1={ACTIVE:"active"},G1={IDLE:"IDLE",STARTING:"STARTING",CONNECTED:"CONNECTED",EXPIRED:"EXPIRED",CLOSING:"CLOSING",CLOSED:"CLOSED"};function xb(){return xa(i=>{var u;return((u=i.user)==null?void 0:u.role)===ip.ADMIN})??!1}const rp="overlord-sidebar-collapsed";function Sb(){try{return localStorage.getItem(rp)==="true"}catch{return!1}}const kb=Fr((i,u)=>({sidebarCollapsed:Sb(),toggleSidebar:()=>{const s=!u().sidebarCollapsed;try{localStorage.setItem(rp,String(s))}catch{}i({sidebarCollapsed:s})}}));class Eb{constructor(){Ve(this,"ws",null);Ve(this,"reconnectAttempts",0);Ve(this,"maxReconnectAttempts",15);Ve(this,"reconnectTimer",null);Ve(this,"disposed",!1);Ve(this,"authenticated",!1);Ve(this,"eventHandlers",new Set);Ve(this,"statusHandlers",new Set)}onEvent(u){return this.eventHandlers.add(u),()=>this.eventHandlers.delete(u)}onStatus(u){return this.statusHandlers.add(u),()=>this.statusHandlers.delete(u)}get isConnected(){var u;return this.authenticated&&((u=this.ws)==null?void 0:u.readyState)===WebSocket.OPEN}connect(){var f,m;if(this.disposed||((f=this.ws)==null?void 0:f.readyState)===WebSocket.OPEN||((m=this.ws)==null?void 0:m.readyState)===WebSocket.CONNECTING)return;const u=We.getAccessToken();if(!u||We.isExpired(u))return;const o=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/events`;this.notifyStatus("connecting"),this.authenticated=!1,this.ws=new WebSocket(o),this.ws.onopen=()=>{var b,y;const _=We.getAccessToken();_?(b=this.ws)==null||b.send(JSON.stringify({type:"auth",token:_})):(y=this.ws)==null||y.close()},this.ws.onmessage=_=>{var b;if(typeof _.data=="string")try{const y=JSON.parse(_.data);if(y.type==="auth_ok"){this.authenticated=!0,this.reconnectAttempts=0,this.notifyStatus("connected");return}if(y.type==="auth_error"){(b=this.ws)==null||b.close();return}if(y.type==="event")for(const p of this.eventHandlers)try{p(y)}catch{}}catch{}},this.ws.onclose=()=>{this.authenticated=!1,this.notifyStatus("disconnected"),this.scheduleReconnect()},this.ws.onerror=()=>{var _;(_=this.ws)==null||_.close()}}disconnect(){var u;this.clearReconnectTimer(),this.authenticated=!1,(u=this.ws)==null||u.close(),this.ws=null}dispose(){this.disposed=!0,this.disconnect(),this.eventHandlers.clear(),this.statusHandlers.clear()}reconnect(){this.disconnect(),this.reconnectAttempts=0,this.connect()}scheduleReconnect(){if(this.disposed||this.reconnectAttempts>=this.maxReconnectAttempts)return;const u=Math.min(1e3*2**this.reconnectAttempts,3e4);this.reconnectAttempts++,this.reconnectTimer=setTimeout(()=>{this.disposed||this.connect()},u)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}notifyStatus(u){for(const s of this.statusHandlers)try{s(u)}catch{}}}const Cr=new Eb,up=Fr(i=>({status:"disconnected",lastEvent:null,eventSeq:0,taskSeq:0,workerSeq:0,init:()=>{const u=Cr.onEvent(o=>{const f=o.event==="task_status_changed"||o.event==="task_created",m=o.event==="worker_status_changed";i(_=>({lastEvent:o,eventSeq:_.eventSeq+1,...f&&{taskSeq:_.taskSeq+1},...m&&{workerSeq:_.workerSeq+1}}))}),s=Cr.onStatus(o=>{const f=up.getState().status;i({status:o}),f==="disconnected"&&o==="connected"&&i(m=>({eventSeq:m.eventSeq+1,taskSeq:m.taskSeq+1,workerSeq:m.workerSeq+1}))});return Cr.connect(),()=>{u(),s(),Cr.disconnect()}}})),op="overlord-theme";function wb(){try{const i=localStorage.getItem(op);if(i==="light"||i==="dark"||i==="system")return i}catch{}return"dark"}function xh(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const sp=Fr(i=>{const u=wb(),s=u==="system"?xh():u;return{theme:u,resolved:s,setTheme:o=>{localStorage.setItem(op,o);const f=o==="system"?xh():o;i({theme:o,resolved:f})},setResolved:o=>{i({resolved:o})}}}),Tb={common:{cancel:"cancel",confirm:"confirm",save:"save",delete:"delete",edit:"edit",create:"create",copy:"copy",copied:"copied",close:"close",back:"back",back_to_site:"back to site",go_back:"go back",go_home:"go home",dismiss:"dismiss",retry:"retry",loading:"// thinking...",processing:"processing...",creating:"creating...",saving:"saving...",updating:"updating...",verifying:"verifying...",signing_in:"signing in...",just_now:"just now",never:"never",previous:"previous",next:"next",error:"error",success:"success",failed:"failed",active:"active",inactive:"inactive",enabled:"enabled",disabled:"disabled",showing_entries:"showing {start}-{end} of {total}",no_results:"no results found",runtime_error:"// runtime error",an_unexpected_error_occurred:"an unexpected error occurred",reload:"reload",not_found:"404",page_not_found:"// page not found",the_page_does_not_exist:"the page you are looking for does not exist or has been moved.",not_found_terminal_error:"error: requested not found - page does not exist",not_set:"not set",view_all:"view all",discard:"discard",save_changes:"save changes",add:"add",remove:"remove",search:"search",actions:"actions",name:"name",status:"status",role:"role",description:"description",type:"type",created_at:"created at",ago:"{time} ago",m_ago:"{n}m ago",h_ago:"{n}h ago",d_ago:"{n}d ago",navigation:"// navigation",docs_section:"// docs",admin_section:"// admin",overlord:"overlord",logout:"logout",logout_title:"// logout",logout_message:"are you sure you want to log out?",log_out:"log out",profile:"profile",search_placeholder:"search",search_input_placeholder:"search tasks, workers, projects...",no_search_results:'// no results for "{query}"',navigate_hint:"navigate",select_hint:"select",close_hint:"close",notifications:"notifications",mark_all_read:"mark all read",no_notifications:"// no notifications",mark_as_read:"mark as read",switch_to_light:"switch to light mode",switch_to_dark:"switch to dark mode",light_mode:"light mode",dark_mode:"dark mode",dismiss_notification:"dismiss",breadcrumb_terminal:"terminal",breadcrumb_terminal_sub:"active sessions",breadcrumb_dashboard:"dashboard",breadcrumb_dashboard_sub:"active overview",breadcrumb_tasks:"tasks",breadcrumb_tasks_sub:"queue management",breadcrumb_workers:"workers",breadcrumb_workers_sub:"fleet status",breadcrumb_projects:"projects",breadcrumb_projects_sub:"repository index",breadcrumb_admin:"admin",breadcrumb_admin_sub:"system control",breadcrumb_profile:"profile",breadcrumb_profile_sub:"user settings",breadcrumb_tokens:"tokens",breadcrumb_tokens_sub:"personal api tokens",breadcrumb_docs:"docs",breadcrumb_docs_sub:"documentation",breadcrumb_docs_cli:"docs",breadcrumb_docs_cli_sub:"cli",breadcrumb_docs_api:"docs",breadcrumb_docs_api_sub:"api",breadcrumb_docs_skill:"docs",breadcrumb_docs_skill_sub:"skill",breadcrumb_docs_bot_sub:"bot",breadcrumb_docs_all_sub:"all",error_default_title:"something went wrong",error_default_message:"an unexpected error occurred. please try again."},auth:{sign_in:"sign in",username:"username",enter_username:"enter username",password:"password",enter_password:"enter password",ai_powered_development_system:"// ai-powered development system",username_and_password_required:"username and password are required.",login_failed:"login failed",invalid_totp_code:"invalid totp code",two_factor_verification:"// 2fa verification",enter_totp_code:"enter your totp code",please_enter_valid_6_digit_code:"please enter a valid 6-digit code.",session_expired:"session expired",session_expired_message:"// your session has expired. please log in again.",go_to_login:"go to login",totp_setup_title:"2FA setup",totp_setup_subtitle:"// scan the qr code with your authenticator app",scan_with_authenticator:"scan this qr code with your authenticator app (google authenticator, authy, etc.)",manual_entry_key:"manual entry key",enter_verification_code:"enter the 6-digit verification code from your authenticator app",verification_code:"verification code",enter_6_digit_code:"enter 6-digit code",verify_and_enable:"verify and enable",totp_setup_complete:"2fa setup complete",totp_setup_complete_login_again:"2fa setup complete! please log in again.",totp_setup_failed:"verification failed. please try again.",totp_setup_footer:"// you must complete this setup before accessing the application",totp_manual_entry:"// or enter this key manually",verify:"verify",initializing:"// initializing...",failed_to_init_totp:"failed to initialize totp setup"},dashboard:{title:"dashboard",subtitle:"// system overview",active_tasks:"active tasks",queued_tasks:"queued tasks",tasks_active_queued:"active / queued",online_workers:"online workers",completed_today:"completed today",completed_all_today:"completed all today",completed_by_you_today:"completed by you today",task_success_rate:"> task success rate",last_7_days:"last 7 days",recent_tasks:"> recent tasks",no_tasks_yet:"// no tasks yet",worker_status:"> worker status",no_workers_registered:"// no workers registered",recent_activity:"> recent activity",no_recent_activity:"// no recent activity",daily_breakdown_not_available:"// daily breakdown not available",task_total:"task",tasks_total:"tasks",slots:"slots",online:"online",idle:"idle",offline:"offline"},tasks:{title:"tasks",subtitle:"// queue management",create_task:"create task",new_task:"new task",task_description:"task description",describe_task_placeholder:"describe the development task in detail...",project:"project",select_project:"select project...",task_type:"type",branch_slug:"branch name (optional)",branch_slug_placeholder:"auto-generated from description",target_worker:"target worker (optional)",any_able:"any able",assign_developer:"assign developer (admin only)",select_developer:"select developer...",search_tasks:"search tasks...",filter_project:"all projects",filter_developer:"all developers",id:"id",description_col:"description",status_col:"status",project_col:"project",assignee:"assignee",worker:"worker",time:"time",stage:"stage",no_tasks_found:"no tasks found",try_adjusting_search:"try adjusting your search query",create_first_task:"create your first task to get started",tab_all:"all",tab_running:"running",tab_queued:"queued",tab_completed:"completed",tab_failed:"failed",tab_cancelled:"cancelled",status_queued:"queued",status_assigned:"assigned",status_running:"running",status_suspended:"suspended",status_completed:"completed",status_failed:"failed",status_cancelled:"cancelled",similar_task_exists:"a similar task already exists.",confirm_create_similar:"are you sure you want to create this task?",view_existing:"view existing",force_create:"force create",cancel_task:"cancel",retry_task:"retry",cursor_tunnel:"IDE tunnel",skip_stage:"skip stage",take_over:"take over",release_control:"release control",connected:"connected",disconnected:"disconnected",connecting:"connecting",terminal:"terminal",pipeline_tab:"pipeline",logs:"logs",task_not_found:"// task not found",task_does_not_exist:"this task does not exist or has been deleted.",back_to_tasks:"back to tasks",task_detail_subtitle:"#{id} {desc}",cancel_task_title:"cancel task",task_cancelled:"task cancelled.",failed_to_cancel_task:"failed to cancel task.",task_retried:"task has been retried.",failed_to_retry_task:"failed to retry task.",fork_task:"fork task",fork_task_desc:"create a new task based on this one",fork_description_placeholder:"enter new description (leave empty to reuse original)",fork_success:"task forked successfully",fork_error:"failed to fork task",retry_mr_title:"retry MR",retry_mr_confirm:"retry creating the merge request for task #{id}?",mr_retry_submitted:"mr retry submitted.",failed_to_retry_mr:"failed to retry mr.",activity_log:"> activity log",pipeline_section:"> pipeline",no_pipeline:"// no pipeline configured",no_activity:"// no activity yet",confirm_stage:"confirm stage",confirm_stage_message:'confirm execution of stage "{name}"? this will proceed with the pipeline.',stage_confirmed:"stage confirmed.",failed_to_confirm_stage:"failed to confirm stage.",loading_task:"// thinking...",task_suspended_banner:"// task suspended — waiting for user confirmation",pending_confirmation:"> pending confirmation",pipeline_requires_confirmation:"the pipeline requires confirmation before proceeding.",confirm_and_proceed:"confirm and proceed",confirm_failed:"failed to confirm stage",reject:"reject",pty_terminal:"// pty terminal",view_terminal:"switch to terminal tab",restore_auto:"restore auto",requesting_takeover:"requesting...",pipeline_stages:"// pipeline stages",task_info:"> task info",stage_timeline:"> stage timeline",workspace_section:"> workspace",mr_link:"MR link",queue_position:"queue position: #{position} of {total}",queue_ahead:"{count} task(s) ahead",queue_next:"next to be processed",queue_position_banner:"// queued — position #{position} of {total}",no_worker_assigned:"// no worker assigned",no_output:"// no output",pty_output:"> PTY output",stage_progress:"> stage progress",task_logs:"> task logs",search_logs:"search logs...",no_log_entries:"// no log entries",prev:"prev",cursor_tunnel_section:"> IDE tunnel",auto_pipeline:"auto pipeline",auto_mode:"auto mode",manual_takeover:"manual takeover",takeover_denied:"takeover denied",requesting_takeover_ellipsis:"requesting takeover...",take_over_label:"take over",release_label:"release",create_task_page_title:"// create task",create_task_page_subtitle:"// submit a new task for processing",form_project_label:"project",form_description_label:"description",form_description_placeholder:"describe the task for the ai agent...",form_worker_preference:"worker preference",form_worker_placeholder:"optional: worker id or name (--on)",form_worker_hint:"leave empty for automatic worker selection.",form_agent_type:"agent type",form_agent_type_placeholder:"default",form_select_project:"select a project",form_create_task:"create task",project_and_description_required:"project and description are required.",failed_to_create_task:"failed to create task.",tunnel_idle:"idle",tunnel_starting:"starting...",tunnel_connected:"connected",tunnel_expired:"expired",tunnel_closing:"closing...",tunnel_start:"start",tunnel_open_in_cursor:"open in IDE",tunnel_header:"> IDE tunnel",tunnel_copied:"// copied to clipboard",tunnel_waiting:"// waiting for connection url...",tunnel_start_button:"> start tunnel",tunnel_starting_button:"// starting...",tunnel_stopping:"// stopping...",tunnel_cancel:"> cancel",tunnel_open_cursor:"> open in IDE",tunnel_open_vscode:"> open in vscode",tunnel_stop:"> stop tunnel",tunnel_restart:"> restart tunnel",tunnel_copy_url:"copy url",tunnel_expires_hm:"expires in {h}h {m}m",tunnel_expires_m:"expires in {m}m",tunnel_start_failed:"failed to start tunnel",tunnel_install_code_hint:'install the VS Code CLI ("code" command) to enable tunnels',dedup_title:"> similar task exists",dedup_description:"// a similar task was found that may already address your request",dedup_create_anyway:"create anyway",stage_choose_option:"// choose an option",stage_your_response:"your response",stage_type_answer:"type your answer...",stage_submitting:"submitting...",stage_continue:"continue",stage_submit:"submit",cancel_task_message:"are you sure you want to cancel task #{id}? this will terminate the running agent and cannot be undone.",cancel_task_confirm_label:"cancel task",retry_title:"retry task",retry_confirm_label:"retry",retry_message_with_mr:"task #{id} has an existing mr ({url}). retrying will create a new attempt on the same branch. continue?",retry_message_without_mr:"are you sure you want to retry task #{id}? this will create a new execution attempt.",reuse_workspace_label:"reuse existing workspace (skip worktree recreation, continue on current branch)"},workers:{title:"workers",subtitle:"// fleet status",fleet:"fleet",setup_guide:"setup guide",all_statuses:"all",register_worker:"register worker",no_workers_found:"no workers found",no_workers_registered:"no workers have registered yet",try_changing_status_filter:"try changing the status filter",view_setup_guide:"view setup guide",online:"online",offline:"offline",draining:"draining",cpu:"cpu",mem:"mem",disk:"disk",tasks_slots:"tasks: {active}/{max} slots",back_to_workers:"back to workers",drain:"drain",undrain:"undrain",last_heartbeat:"last heartbeat: {time}",resource_usage:"> resource usage",connection_info:"> connection info",capabilities:"> capabilities",current_tasks:"> current tasks",no_capabilities:"// no capabilities reported",no_running_tasks:"// no running tasks",host:"host",port:"port",os:"os",cpu_model:"CPU model",cpu_cores:"CPU cores",memory:"memory",total_slots:"total slots",confirm_drain:"drain worker",confirm_drain_message:'drain worker "{name}"? it will finish current tasks but accept no new ones.',worker_drained:"worker drain initiated.",worker_undrained:"worker undrain initiated.",failed_to_update_worker:"failed to update worker status.",worker_setup_title:"worker setup guide",worker_setup_subtitle:"// register a new worker with overlord",step_1_title:"01. generate a registration token",step_1_desc:"generate a one-time registration token from the admin panel.",step_2_title:"02. install the worker cli",step_2_desc:"install the overlord worker cli on the target worker.",step_3_title:"03. register the worker",step_3_desc:"run the register command with your token and server url.",step_4_title:"04. start the worker",step_4_desc:"start the worker daemon. it will connect to overlord and begin accepting tasks.",generate_token:"generate token",worker_token_modal_title:"worker registration token",worker_token_modal_message:"// copy this token now. it will not be shown again.",loading_worker:"// thinking...",worker_not_found:"// worker not found",draining_warning:"// this worker is draining — no new tasks will be assigned",draining_active_tasks:"active tasks will continue to run until completion",active_tasks:"> active tasks",no_active_tasks:"// no active tasks on this worker",worker_info:"> worker info",unknown:"unknown",n_a:"n/a",id:"id",description:"description",stage:"stage",no_capabilities_short:"// no capabilities",slots:"slots",status_label:"status",undrain_worker_title:"> undrain worker",drain_worker_title:"> drain worker",undrain_confirm:"are you sure you want to undrain {name}? the worker will start accepting new tasks again.",drain_confirm:"are you sure you want to drain {name}? running tasks will complete, but no new tasks will be assigned until the worker is undrained.",decommission:"decommission",decommission_title:"> decommission worker",decommission_confirm:'permanently decommission "{name}"? active tasks will be failed or re-queued, and the worker will be disconnected. this cannot be undone.',decommissioned:"decommissioned",worker_id:"worker ID",setup_header_desc:"// follow these steps to add a new worker to your overlord cluster.",prerequisites:"// prerequisites",prereq_machine:"linux or macos machine with at least 2 cpu cores and 4gb ram",prereq_node:"node.js 18+ and pnpm installed",prereq_git:"git installed (2.25+)",prereq_network:"network access to the overlord server",prereq_token:"admin-generated worker registration token",step_generate_token:"generate worker token",step_generate_token_desc:"// create a one-time registration token from the admin panel. each token can register exactly one worker.",go_to_token_management:"go to token management",step_install_worker:"install worker package",step_install_worker_desc:"// install the overlord worker package globally via npm.",step_configure_env:"configure environment",step_configure_env_desc:"// create a .env file in ~/.overlord-worker/ or set environment variables.",env_host:"overlord server address (required)",env_worker_token:"one-time registration token (required for first run)",env_worker_name:"display name (defaults to hostname)",env_workspace_root:"task workspace directory (defaults to ~/.overlord-worker/workspaces)",env_max_slots:"max concurrent tasks (defaults to 2)",step_start_worker:"start worker",step_start_worker_desc:"// start the worker process. it will register with the server and begin accepting tasks.",or_run_as_service:"// or run as a system service for auto-restart:",setup_wizard_option:"// option a: interactive setup wizard (recommended)",manual_config_option:"// option b: manual configuration",start_note_setup_wizard:"// if you used the setup wizard, the worker may already be running.",step_verify_connection:"verify connection",step_verify_connection_desc:'// once the worker connects, it will appear in the workers list with a "healthy" status.',verify_how_to:"// how to verify:",verify_check_workers:"check the workers page for your new worker",verify_status:'status should show "healthy" within 30 seconds',verify_capabilities:"worker capabilities are auto-detected on first heartbeat",last_heartbeat_label:"last heartbeat",worker_version:"worker version",reg_title:"// worker registration",reg_subtitle:"> register a new worker node",reg_step_generate_token:"generate token",reg_step_install_worker:"install worker",reg_step_waiting_activation:"waiting activation",reg_step_activated:"activated",reg_click_to_generate:"// click to generate a one-time registration token",reg_token_generated:"// token generated successfully",reg_install_command:"// install cli & worker:",reg_run_setup:"// run setup on worker:",reg_running_installation:"// running installation on target worker",reg_installed_wait:"i've installed → wait for activation",reg_listening_for_worker:"listening for worker connection...",reg_worker_connected:"// worker connected",reg_waiting_for_worker:"// waiting for worker to connect...",reg_worker_activated:"worker {name} activated!",reg_worker_registered:"// worker successfully registered",reg_done:"done",reg_completed:"// completed"},projects:{title:"projects",subtitle:"// repository index",create_project:"create project",no_projects_yet:"no projects yet",create_first_project:"create your first project to get started",key:"key",name:"name",repository:"repository",agent:"agent",project_info:"> project info",repo_url:"repo URL",default_branch:"default branch",git_platform:"git platform",agent_type:"agent type",max_turns:"max turns",allowed_tools:"allowed tools",default_project:"default project",tasks_count:"tasks",last_activity:"last activity",members:"> members",developer:"developer",role:"role",added_at:"added at",add_member:"add member",remove_member:"remove member",remove_member_confirm:"remove {name} from this project?",member_added:"member added.",member_removed:"member removed.",failed_to_add_member:"failed to add member.",member_already_exists:"this developer is already a member of this project.",failed_to_remove_member:"failed to remove member.",pipeline:"> pipeline",add_stage:"+ add stage",recent_tasks:"> recent tasks",no_recent_tasks:"// no recent tasks",edit_project:"edit project",delete_project:"delete project",delete_project_confirm:'delete project "{name}"? this cannot be undone.',project_deleted:"project deleted.",failed_to_delete_project:"failed to delete project.",project_name:"project name",project_name_placeholder:"my awesome project",project_key:"project key",project_key_placeholder:"my-project",project_key_hint:"// unique identifier (lowercase, alphanumeric, hyphens)",ssh_url:"SSH URL",ssh_url_placeholder:"git@github.com:org/repo.git",ssh_url_hint:"// optional — workers prefer ssh for git operations",repo_url_placeholder:"https://github.com/org/repo.git",main:"main",github:"github",gitlab:"gitlab",gitea:"gitea",claude:"claude",cursor:"cursor",codex:"codex",tools_placeholder:"tool1, tool2, ...",add_project_desc:"// add a new project to overlord",project_created:"project created.",failed_to_create_project:"failed to create project.",update_project_desc:"// update project configuration",save_changes:"save changes",basic_info:"> basic info",agent_config:"> agent config",security:"> security",git_token:"> git token",git_token_label:"current token",git_token_hint:"// personal access token for git operations (push, clone, etc.)",git_token_set:"set token",git_token_clear:"clear token",git_token_saved:"git token saved.",git_token_cleared:"git token cleared.",git_token_failed:"failed to update git token.",pipeline_section:"> pipeline",edit_pipeline:"> edit pipeline",pty_output_filter:"PTY output filter",workspace_root:"workspace root",member_role:"member",maintainer_role:"maintainer",select_developer:"select developer...",select_role:"select role...",adding:"adding...",project_not_found:"// project not found",back_to_projects:"back to projects",no_members_yet:"// no members yet",no_tasks_for_project:"// no tasks for this project yet",no_pipeline_configured:"// no pipeline configured",confirm_label:"confirm",id:"id",description:"description",status:"status",created:"created",project_saved:"project saved",failed_to_save_project:"failed to save project",invalid_pipeline_json:"invalid pipeline json",setup_commands:"setup commands",post_command:"post command",environment:"> environment",add_member_title:"// add member",edit_project_title:"edit project"},pipeline:{title:"pipeline editor",subtitle:"-- {key}",save:"save",cancel:"cancel",json_toggle:"json",add_stage:"add stage",stage_properties:"> stage properties",stage_name:"stage name",timeout:"timeout",confirm_required:"confirm required",on_failure:"on failure",goto:"goto",max_loops:"max loops",stop:"stop",no_stages:"// no stages defined",select_stage:"// select a stage to edit properties",saved:"pipeline saved",failed_to_save:"failed to save pipeline",failed_to_load:"failed to load pipeline.",loading_pipeline:"// thinking...",unnamed:"unnamed",editing:"// editing: {name}",name:"name",on_failure_section:"// on failure",goto_stage:"goto stage",up:"up",down:"down",failed_to_load_project:"failed to load project",delete_stage:"delete stage"},profile:{title:"profile",subtitle:"// user settings",profile_info:"> profile info",username:"username",git_name:"git name",git_email:"git email",status:"status",created_at:"created at",edit_git_info:"edit git info",change_password:"> change password",current_password:"current password",new_password:"new password",confirm_password:"confirm password",current_password_required:"current password is required.",new_password_required:"new password is required.",passwords_do_not_match:"new passwords do not match.",password_changed:"password changed successfully.",failed_to_change_password:"failed to change password.",update_password:"update password",two_factor_auth:"> two-factor authentication",two_fa_enabled:"2fa is enabled",two_fa_not_setup:"2fa is not set up",regenerate_2fa_warning:`// regenerating 2fa will invalidate your current authenticator app setup.
|
|
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",role:"role",status:"status",two_fa_status:"2FA status",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.",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:"group bindings",chat_bindings_subtitle:"// all integrations",no_chat_bindings:"// no group 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",encrypt_key:"encrypt key",encrypt_key_keep_current:"encrypt key (leave empty to keep current)",encrypt_key_hint:"events & callbacks → encryption strategy → encrypt key",encrypt_key_placeholder:"encrypt key from encryption strategy",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 group bindings configured for this bot.",add_chat_binding_desc:"// add group 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:"// thinking...",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",chat_binding_title:"// group bindings — {name}",chat_binding_no_bindings:"// no group bindings configured for this bot.",chat_binding_add:"// add group 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
240
|
ov login https://overlord.yourdomain.com`,setup_step_3_link:"development workflow",go_to_app:"open app",documentation:"documentation",api:"api",copy_install_command:"copy install command"},docs:{cli_reference:"cli",cli_subtitle:"// command-line tools",api_reference:"api",api_subtitle:"// rest api endpoints",quick_start:"// quick start",developer_cli:"developer cli (ov)",admin_cli:"admin cli (overlord)",authentication:"// authentication",usage:"usage",flags:"flags",example:"example",request_body:"request body",response:"response",quick_start_with_token:"// quick start with your token",replace_token_hint:"// replace <your-token> with the actual token value from your access tokens page",cli_tools_desc:"// overlord provides two cli tools: {ov} (developer cli) and {overlord} (admin/ops cli)",api_base_url_desc:"// base url: {url} · all endpoints return json · auth via bearer token in authorization header",docs_nav_getting_started:"// getting started",docs_nav_guides:"// guides",docs_nav_reference:"// reference",docs_nav_other:"// other",docs_installation:"installation",docs_developer_setup:"developer setup",docs_worker_setup:"worker setup",docs_bot_setup:"bot setup",docs_local_dev:"local development",docs_worker_ops:"worker operations",docs_deployment:"deployment",docs_bot_integration:"bot integration",docs_pipeline:"pipeline config",docs_dev_workflow:"dev workflow",docs_cli:"cli reference",docs_api:"api reference",docs_skill:"skill reference",docs_permissions:"permissions & roles",docs_env_vars:"environment variables",docs_architecture:"architecture",docs_changelog:"changelog",docs_menu:"docs menu",docs_back:"< back",docs_all_title:"// all documentation",docs_all_subtitle:"browse all guides, references, and resources",docs_desc_installation:"install overlord server and cli tools",docs_desc_developer_setup:"set up your local development environment",docs_desc_worker_setup:"register and configure worker machines",docs_desc_bot_setup:"connect lark or slack bots to overlord",docs_desc_local_dev:"run and debug overlord locally",docs_desc_worker_ops:"manage worker lifecycle and monitoring",docs_desc_deployment:"deploy overlord to production servers",docs_desc_bot_integration:"interactive cards, adapter pattern, troubleshooting",docs_desc_pipeline:"define multi-stage task pipelines",docs_desc_dev_workflow:"git workflow, branching, and merge requests",docs_desc_cli:"cli command reference",docs_desc_api:"http api endpoint reference",docs_desc_skill:"custom skill definitions and configuration",docs_desc_permissions:"roles, access control, and authorization",docs_desc_env_vars:"environment variables for server and worker",docs_desc_architecture:"system architecture and component overview",docs_desc_changelog:"version history and release notes",docs_agent_cli:"agent cli",docs_desc_agent_cli:"claude, cursor, and codex cli integration and flag mapping"},onboarding:{getting_started:"// getting started",completed_count:"{done}/{total} completed",dismiss:"dismiss",all_done:"all set! you're ready to go.",admin_create_project_title:"create your first project",admin_create_project_desc:"set up a project with a git repo and pipeline",admin_register_worker_title:"register a worker",admin_register_worker_desc:"generate a token and set up a worker to run tasks",admin_create_developer_title:"create a developer account",admin_create_developer_desc:"add team members who can create and monitor tasks",admin_configure_bot_title:"configure a chat bot",admin_configure_bot_desc:"register a Lark or Slack bot to enable task management via chat",admin_first_task_title:"create your first task",admin_first_task_desc:"verify the full pipeline works end-to-end",lead_view_projects_title:"view your projects",lead_view_projects_desc:"check the projects assigned to you",lead_configure_pipeline_title:"configure a pipeline",lead_configure_pipeline_desc:"set up stages for your project workflow",lead_add_member_title:"add a team member",lead_add_member_desc:"invite developers to your project",lead_first_task_title:"create your first task",lead_first_task_desc:"submit a task and watch it execute",dev_install_cli_title:"install the ov cli",dev_install_cli_desc:"npm install -g @overlordai/developer-cli",dev_setup_cli_title:"run ov setup",dev_setup_cli_desc:"connect to the server and authenticate",dev_link_chat_title:"link your chat account",dev_link_chat_desc:'send "bind" to the bot in Lark or Slack to connect your account',dev_view_projects_title:"explore projects",dev_view_projects_desc:"browse available projects and their pipelines",dev_first_task_title:"create your first task",dev_first_task_desc:"submit a task via web or cli",go_to_projects:"go to projects",go_to_workers:"go to workers",go_to_tasks:"go to tasks",go_to_bots:"manage bots",manage_developers:"manage developers",cli:"cli",setup_guide:"setup guide"},bind:{title:"// link platform account",linking:"linking your account...",success:"account linked successfully!",success_detail:"your {platform} account has been connected. you can now use bot commands.",error:"failed to link account",invalid_token:'this link is invalid or has expired. send "bind" to the bot again to get a new link.',back_to_home:"go to dashboard",no_token:"no bind token provided."},pwa_install:{title:"overlord://install",command:"overlord --install",desc_1:"add to home screen for standalone app experience",desc_2:"works offline · full-screen · instant launch",install:"y — install",skip:"n — skip",ios_command:"install --manual",ios_step_1:"tap share button in safari toolbar",ios_step_2:'scroll down → tap "add to home screen"',ios_step_3:'tap "add" to confirm'},pwa_update:{message:"new version available",reload:"reload"},terminal_home:{title:"terminal",select_project:"project...",all_projects:"all projects",task_description_placeholder:"describe the task...",new_task:"new task",no_active_tasks:"no active tasks",create_task_hint:"create a task using the bar above to get started",confirm_create_title:"create task",confirm_create_message:`create a [{taskType}] task in project [{projectKey}]?
|
|
241
241
|
|
|
242
|
-
"{description}"`}};function jb(i,u){const s=u.split(".");let o=i;for(const f of s){if(o==null||typeof o!="object")return u;o=o[f]}return typeof o=="string"?o:u}function Rb(i,u){return u?i.replace(/\{(\w+)\}/g,(s,o)=>u[o]!=null?String(u[o]):`{${o}}`):i}function Br(i,u){return Rb(jb(Tb,i),u)}function Vt(){return{t:g.useCallback((u,s)=>Br(u,s),[])}}function cp(){const{theme:i,setTheme:u}=sp(),{t:s}=Vt(),o=i==="dark"||i==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;function f(){u(o?"light":"dark")}return h.jsx("button",{onClick:f,className:"flex items-center gap-1.5 rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]","aria-label":s(o?"common.switch_to_light":"common.switch_to_dark"),title:s(o?"common.light_mode":"common.dark_mode"),children:o?h.jsx(_b,{size:16}):h.jsx(fb,{size:16})})}class Ns extends Error{constructor(s,o,f){const m=s.status||s.status===0?s.status:"",_=s.statusText??"",b=`${m} ${_}`.trim(),y=b?`status code ${b}`:"an unknown error";super(`Request failed with ${y}: ${o.method} ${o.url}`);Ve(this,"response");Ve(this,"request");Ve(this,"options");this.name="HTTPError",this.response=s,this.request=o,this.options=f}}class fp extends Error{constructor(s){let o="Non-error value was thrown";try{typeof s=="string"?o=s:s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&(o=s.message)}catch{}super(o);Ve(this,"name","NonError");Ve(this,"value");this.value=s}}class Rs extends Error{constructor(s){const o=s!=null&&s.cause?s.cause instanceof Error?s.cause:new fp(s.cause):void 0;super(s!=null&&s.code?`Forced retry: ${s.code}`:"Forced retry",o?{cause:o}:void 0);Ve(this,"name","ForceRetryError");Ve(this,"customDelay");Ve(this,"code");Ve(this,"customRequest");this.customDelay=s==null?void 0:s.delay,this.code=s==null?void 0:s.code,this.customRequest=s==null?void 0:s.request}}const Sh=(()=>{let i=!1,u=!1;const s=typeof globalThis.ReadableStream=="function",o=typeof globalThis.Request=="function";if(s&&o)try{u=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type")}catch(f){if(f instanceof Error&&f.message==="unsupported BodyInit type")return!1;throw f}return i&&!u})(),Ab=typeof globalThis.AbortController=="function",dp=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",zb=typeof globalThis.ReadableStream=="function",Ob=typeof globalThis.FormData=="function",mp=["get","post","put","patch","head","delete"],Cb={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},As=2147483647,Db=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,hp=Symbol("stop");class pp{constructor(u){Ve(this,"options");this.options=u}}const Nb=i=>new pp(i),Mb={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Ub={next:!0},qb={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Lb=i=>{if(!i)return 0;if(i instanceof FormData){let u=0;for(const[s,o]of i)u+=Db,u+=new TextEncoder().encode(`Content-Disposition: form-data; name="${s}"`).length,u+=typeof o=="string"?new TextEncoder().encode(o).length:o.size;return u}if(i instanceof Blob)return i.size;if(i instanceof ArrayBuffer)return i.byteLength;if(typeof i=="string")return new TextEncoder().encode(i).length;if(i instanceof URLSearchParams)return new TextEncoder().encode(i.toString()).length;if("byteLength"in i)return i.byteLength;if(typeof i=="object"&&i!==null)try{const u=JSON.stringify(i);return new TextEncoder().encode(u).length}catch{return 0}return 0},_p=(i,u,s)=>{let o,f=0;return i.pipeThrough(new TransformStream({transform(m,_){if(_.enqueue(m),o){f+=o.byteLength;let b=u===0?0:f/u;b>=1&&(b=1-Number.EPSILON),s==null||s({percent:b,totalBytes:Math.max(u,f),transferredBytes:f},o)}o=m},flush(){o&&(f+=o.byteLength,s==null||s({percent:1,totalBytes:Math.max(u,f),transferredBytes:f},o))}}))},Hb=(i,u)=>{if(!i.body)return i;if(i.status===204)return new Response(null,{status:i.status,statusText:i.statusText,headers:i.headers});const s=Math.max(0,Number(i.headers.get("content-length"))||0);return new Response(_p(i.body,s,u),{status:i.status,statusText:i.statusText,headers:i.headers})},Bb=(i,u,s)=>{if(!i.body)return i;const o=Lb(s??i.body);return new Request(i,{duplex:"half",body:_p(i.body,o,u)})},yn=i=>i!==null&&typeof i=="object",Dr=(...i)=>{for(const u of i)if((!yn(u)||Array.isArray(u))&&u!==void 0)throw new TypeError("The `options` argument must be an object");return Ws({},...i)},gp=(i={},u={})=>{const s=new globalThis.Headers(i),o=u instanceof globalThis.Headers,f=new globalThis.Headers(u);for(const[m,_]of f.entries())o&&_==="undefined"||_===void 0?s.delete(m):s.set(m,_);return s};function Nr(i,u,s){return Object.hasOwn(u,s)&&u[s]===void 0?[]:Ws(i[s]??[],u[s]??[])}const yp=(i={},u={})=>({beforeRequest:Nr(i,u,"beforeRequest"),beforeRetry:Nr(i,u,"beforeRetry"),afterResponse:Nr(i,u,"afterResponse"),beforeError:Nr(i,u,"beforeError")}),Yb=(i,u)=>{const s=new URLSearchParams;for(const o of[i,u])if(o!==void 0)if(o instanceof URLSearchParams)for(const[f,m]of o.entries())s.append(f,m);else if(Array.isArray(o))for(const f of o){if(!Array.isArray(f)||f.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");s.append(String(f[0]),String(f[1]))}else if(yn(o))for(const[f,m]of Object.entries(o))m!==void 0&&s.append(f,String(m));else{const f=new URLSearchParams(o);for(const[m,_]of f.entries())s.append(m,_)}return s},Ws=(...i)=>{let u={},s={},o={},f;const m=[];for(const _ of i)if(Array.isArray(_))Array.isArray(u)||(u=[]),u=[...u,..._];else if(yn(_)){for(let[b,y]of Object.entries(_)){if(b==="signal"&&y instanceof globalThis.AbortSignal){m.push(y);continue}if(b==="context"){if(y!=null&&(!yn(y)||Array.isArray(y)))throw new TypeError("The `context` option must be an object");u={...u,context:y==null?{}:{...u.context,...y}};continue}if(b==="searchParams"){y==null?f=void 0:f=f===void 0?y:Yb(f,y);continue}yn(y)&&b in u&&(y=Ws(u[b],y)),u={...u,[b]:y}}yn(_.hooks)&&(o=yp(o,_.hooks),u.hooks=o),yn(_.headers)&&(s=gp(s,_.headers),u.headers=s)}return f!==void 0&&(u.searchParams=f),m.length>0&&(m.length===1?u.signal=m[0]:dp?u.signal=AbortSignal.any(m):u.signal=m.at(-1)),u},Gb=i=>mp.includes(i)?i.toUpperCase():i,Vb=["get","put","head","delete","options","trace"],Xb=[408,413,429,500,502,503,504],Qb=[413,429,503],kh={limit:2,methods:Vb,statusCodes:Xb,afterStatusCodes:Qb,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:i=>.3*2**(i-1)*1e3,jitter:void 0,retryOnTimeout:!1},Zb=(i={})=>{if(typeof i=="number")return{...kh,limit:i};if(i.methods&&!Array.isArray(i.methods))throw new Error("retry.methods must be an array");if(i.methods&&(i.methods=i.methods.map(s=>s.toLowerCase())),i.statusCodes&&!Array.isArray(i.statusCodes))throw new Error("retry.statusCodes must be an array");const u=Object.fromEntries(Object.entries(i).filter(([,s])=>s!==void 0));return{...kh,...u}};class Ms extends Error{constructor(s){super(`Request timed out: ${s.method} ${s.url}`);Ve(this,"request");this.name="TimeoutError",this.request=s}}async function Kb(i,u,s,o){return new Promise((f,m)=>{const _=setTimeout(()=>{s&&s.abort(),m(new Ms(i))},o.timeout);o.fetch(i,u).then(f).catch(m).then(()=>{clearTimeout(_)})})}async function Jb(i,{signal:u}){return new Promise((s,o)=>{u&&(u.throwIfAborted(),u.addEventListener("abort",f,{once:!0}));function f(){clearTimeout(m),o(u.reason)}const m=setTimeout(()=>{u==null||u.removeEventListener("abort",f),s()},i)})}const $b=(i,u)=>{const s={};for(const o in u)Object.hasOwn(u,o)&&!(o in qb)&&!(o in Mb)&&(!(o in i)||o in Ub)&&(s[o]=u[o]);return s},Wb=i=>i===void 0?!1:Array.isArray(i)?i.length>0:i instanceof URLSearchParams?i.size>0:typeof i=="object"?Object.keys(i).length>0:typeof i=="string"?i.trim().length>0:!!i;function Fb(i){return i instanceof Ns||(i==null?void 0:i.name)===Ns.name}function Ib(i){return i instanceof Ms||(i==null?void 0:i.name)===Ms.name}var Kr,vp,Jt,Bt,rt,Q,$a,ea,vn,oe,Yr,bp,Us,Gr,Ja,qs,xp,ii,Vr,Ls;const ri=class ri{constructor(u,s={}){Pt(this,oe);Ve(this,"request");Pt(this,Jt);Pt(this,Bt,0);Pt(this,rt);Pt(this,Q);Pt(this,$a);Pt(this,ea);Pt(this,vn);var f,m,_;if(Kt(this,rt,u),Kt(this,Q,{...s,headers:gp(q(this,rt).headers,s.headers),hooks:yp({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},s.hooks),method:Gb(s.method??q(this,rt).method??"GET"),prefixUrl:String(s.prefixUrl||""),retry:Zb(s.retry),throwHttpErrors:s.throwHttpErrors??!0,timeout:s.timeout??1e4,fetch:s.fetch??globalThis.fetch.bind(globalThis),context:s.context??{}}),typeof q(this,rt)!="string"&&!(q(this,rt)instanceof URL||q(this,rt)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(q(this,Q).prefixUrl&&typeof q(this,rt)=="string"){if(q(this,rt).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");q(this,Q).prefixUrl.endsWith("/")||(q(this,Q).prefixUrl+="/"),Kt(this,rt,q(this,Q).prefixUrl+q(this,rt))}Ab&&dp&&(Kt(this,ea,q(this,Q).signal??q(this,rt).signal),Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal),Sh&&(q(this,Q).duplex="half"),q(this,Q).json!==void 0&&(q(this,Q).body=((m=(f=q(this,Q)).stringifyJson)==null?void 0:m.call(f,q(this,Q).json))??JSON.stringify(q(this,Q).json),q(this,Q).headers.set("content-type",q(this,Q).headers.get("content-type")??"application/json"));const o=s.headers&&new globalThis.Headers(s.headers).has("content-type");if(q(this,rt)instanceof globalThis.Request&&(Ob&&q(this,Q).body instanceof globalThis.FormData||q(this,Q).body instanceof URLSearchParams)&&!o&&q(this,Q).headers.delete("content-type"),this.request=new globalThis.Request(q(this,rt),q(this,Q)),Wb(q(this,Q).searchParams)){const y="?"+(typeof q(this,Q).searchParams=="string"?q(this,Q).searchParams.replace(/^\?/,""):new URLSearchParams(ke(_=ri,Kr,vp).call(_,q(this,Q).searchParams)).toString()),p=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,y);this.request=new globalThis.Request(p,q(this,Q))}if(q(this,Q).onUploadProgress){if(typeof q(this,Q).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Sh)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=ke(this,oe,Ls).call(this,this.request,q(this,Q).body??void 0)}}static create(u,s){var _,b,y;const o=new ri(u,s),f=async()=>{var w,k,N,Y,L,H,B,U,K,X,ue,ce;if(typeof q(o,Q).timeout=="number"&&q(o,Q).timeout>As)throw new RangeError(`The \`timeout\` option cannot be greater than ${As}`);await Promise.resolve();let p=await ke(w=o,oe,xp).call(w);for(const _e of q(o,Q).hooks.afterResponse){const F=ke(k=o,oe,Us).call(k,p.clone());let W;try{W=await _e(o.request,ke(N=o,oe,ii).call(N),F,{retryCount:q(o,Bt)})}catch(Pe){throw ke(Y=o,oe,Ja).call(Y,F),ke(L=o,oe,Ja).call(L,p),Pe}if(W instanceof pp)throw ke(H=o,oe,Ja).call(H,F),ke(B=o,oe,Ja).call(B,p),new Rs(W.options);const se=W instanceof globalThis.Response?W:p;F!==se&&ke(U=o,oe,Ja).call(U,F),p!==se&&ke(K=o,oe,Ja).call(K,p),p=se}if(ke(X=o,oe,Us).call(X,p),!p.ok&&(typeof q(o,Q).throwHttpErrors=="function"?q(o,Q).throwHttpErrors(p.status):q(o,Q).throwHttpErrors)){let _e=new Ns(p,o.request,ke(ue=o,oe,ii).call(ue));for(const F of q(o,Q).hooks.beforeError)_e=await F(_e,{retryCount:q(o,Bt)});throw _e}if(q(o,Q).onDownloadProgress){if(typeof q(o,Q).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!zb)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const _e=p.clone();return ke(ce=o,oe,Ja).call(ce,p),Hb(_e,q(o,Q).onDownloadProgress)}return p},m=ke(_=o,oe,qs).call(_,f).finally(()=>{var w,k;const p=q(o,$a);ke(w=o,oe,Gr).call(w,(p==null?void 0:p.body)??void 0),ke(k=o,oe,Gr).call(k,o.request.body??void 0)});for(const[p,w]of Object.entries(Cb))p==="bytes"&&typeof((y=(b=globalThis.Response)==null?void 0:b.prototype)==null?void 0:y.bytes)!="function"||(m[p]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||w);const k=await m;if(p==="json"){if(k.status===204)return"";const N=await k.text();return N===""?"":s.parseJson?s.parseJson(N):JSON.parse(N)}return k[p]()});return m}};Kr=new WeakSet,vp=function(u){return u&&typeof u=="object"&&!Array.isArray(u)&&!(u instanceof URLSearchParams)?Object.fromEntries(Object.entries(u).filter(([,s])=>s!==void 0)):u},Jt=new WeakMap,Bt=new WeakMap,rt=new WeakMap,Q=new WeakMap,$a=new WeakMap,ea=new WeakMap,vn=new WeakMap,oe=new WeakSet,Yr=function(){const u=q(this,Q).retry.delay(q(this,Bt));let s=u;q(this,Q).retry.jitter===!0?s=Math.random()*u:typeof q(this,Q).retry.jitter=="function"&&(s=q(this,Q).retry.jitter(u),(!Number.isFinite(s)||s<0)&&(s=u));const o=q(this,Q).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(o,s)},bp=async function(u){if(eh(this,Bt)._++,q(this,Bt)>q(this,Q).retry.limit)throw u;const s=u instanceof Error?u:new fp(u);if(s instanceof Rs)return s.customDelay??ke(this,oe,Yr).call(this);if(!q(this,Q).retry.methods.includes(this.request.method.toLowerCase()))throw u;if(q(this,Q).retry.shouldRetry!==void 0){const o=await q(this,Q).retry.shouldRetry({error:s,retryCount:q(this,Bt)});if(o===!1)throw u;if(o===!0)return ke(this,oe,Yr).call(this)}if(Ib(u)&&!q(this,Q).retry.retryOnTimeout)throw u;if(Fb(u)){if(!q(this,Q).retry.statusCodes.includes(u.response.status))throw u;const o=u.response.headers.get("Retry-After")??u.response.headers.get("RateLimit-Reset")??u.response.headers.get("X-RateLimit-Retry-After")??u.response.headers.get("X-RateLimit-Reset")??u.response.headers.get("X-Rate-Limit-Reset");if(o&&q(this,Q).retry.afterStatusCodes.includes(u.response.status)){let f=Number(o)*1e3;Number.isNaN(f)?f=Date.parse(o)-Date.now():f>=Date.parse("2024-01-01")&&(f-=Date.now());const m=q(this,Q).retry.maxRetryAfter??f;return f<m?f:m}if(u.response.status===413)throw u}return ke(this,oe,Yr).call(this)},Us=function(u){return q(this,Q).parseJson&&(u.json=async()=>q(this,Q).parseJson(await u.text())),u},Gr=function(u){u&&u.cancel().catch(()=>{})},Ja=function(u){ke(this,oe,Gr).call(this,u.body??void 0)},qs=async function(u){try{return await u()}catch(s){const o=Math.min(await ke(this,oe,bp).call(this,s),As);if(q(this,Bt)<1)throw s;if(await Jb(o,q(this,ea)?{signal:q(this,ea)}:{}),s instanceof Rs&&s.customRequest){const f=q(this,Q).signal?new globalThis.Request(s.customRequest,{signal:q(this,Q).signal}):new globalThis.Request(s.customRequest);ke(this,oe,Vr).call(this,f)}for(const f of q(this,Q).hooks.beforeRetry){const m=await f({request:this.request,options:ke(this,oe,ii).call(this),error:s,retryCount:q(this,Bt)});if(m instanceof globalThis.Request){ke(this,oe,Vr).call(this,m);break}if(m instanceof globalThis.Response)return m;if(m===hp)return}return ke(this,oe,qs).call(this,u)}},xp=async function(){var s;(s=q(this,Jt))!=null&&s.signal.aborted&&(Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal,this.request=new globalThis.Request(this.request,{signal:q(this,Q).signal}));for(const o of q(this,Q).hooks.beforeRequest){const f=await o(this.request,ke(this,oe,ii).call(this),{retryCount:q(this,Bt)});if(f instanceof Response)return f;if(f instanceof globalThis.Request){ke(this,oe,Vr).call(this,f);break}}const u=$b(this.request,q(this,Q));return Kt(this,$a,this.request),this.request=q(this,$a).clone(),q(this,Q).timeout===!1?q(this,Q).fetch(q(this,$a),u):Kb(q(this,$a),u,q(this,Jt),q(this,Q))},ii=function(){if(!q(this,vn)){const{hooks:u,...s}=q(this,Q);Kt(this,vn,Object.freeze(s))}return q(this,vn)},Vr=function(u){Kt(this,vn,void 0),this.request=ke(this,oe,Ls).call(this,u)},Ls=function(u,s){return!q(this,Q).onUploadProgress||!u.body?u:Bb(u,q(this,Q).onUploadProgress,s??q(this,Q).body??void 0)},Pt(ri,Kr);let Zr=ri;/*! MIT License © Sindre Sorhus */const Hs=i=>{const u=(s,o)=>Zr.create(s,Dr(i,o));for(const s of mp)u[s]=(o,f)=>Zr.create(o,Dr(i,f,{method:s}));return u.create=s=>Hs(Dr(s)),u.extend=s=>(typeof s=="function"&&(s=s(i??{})),Hs(Dr(i,s))),u.stop=hp,u.retry=Nb,u},Eh=Hs();let Mr=null;const Xr=Eh.create({prefixUrl:"/api",timeout:3e4,hooks:{beforeRequest:[i=>{const u=xa.getState().accessToken;u&&i.headers.set("Authorization",`Bearer ${u}`)}],afterResponse:[async(i,u,s)=>{if(s.status===401&&!i.headers.has("X-Retry-After-Refresh")){Mr||(Mr=xa.getState().refresh().finally(()=>{Mr=null}));try{await Mr}catch{throw s}const o=xa.getState().accessToken;return o&&i.headers.set("Authorization",`Bearer ${o}`),i.headers.set("X-Retry-After-Refresh","1"),Eh(i,u)}}]}}),Pb=3e4;function e0(i){if(i.link)return i.link;const u=(i.title+" "+i.body).match(/task\s*#?(\d+)/i);if(u)return`/tasks/${u[1]}`;const s=(i.title+" "+i.body).match(/worker\s+(\S+)/i);return s?`/workers/${s[1]}`:null}function Sp(){const i=Fa(),[u,s]=g.useState([]),[o,f]=g.useState(0),[m,_]=g.useState(!1),[b,y]=g.useState(!1),p=g.useRef(null),{t:w}=Vt(),k=g.useRef(async()=>{try{y(!0);const H=(await Xr.get("web/notifications",{searchParams:{limit:"20"}}).json()).data,B=H.filter(U=>!U.isRead).length;s(U=>U.length===H.length&&U.every((K,X)=>K.id===H[X].id&&K.isRead===H[X].isRead)?U:H),f(U=>U===B?U:B)}catch{}finally{y(!1)}});g.useEffect(()=>{k.current();const L=setInterval(()=>k.current(),Pb);return()=>clearInterval(L)},[]),g.useEffect(()=>{function L(H){p.current&&!p.current.contains(H.target)&&_(!1)}return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[]);async function N(L){try{await Xr.post(`web/notifications/${L}/read`),s(H=>H.map(B=>B.id===L?{...B,isRead:!0}:B)),f(H=>Math.max(0,H-1))}catch{}}async function Y(){try{await Xr.post("web/notifications/read-all"),s(L=>L.map(H=>({...H,isRead:!0}))),f(0)}catch{}}return h.jsxs("div",{className:"relative",ref:p,children:[h.jsxs("button",{type:"button",onClick:()=>_(L=>!L),"aria-label":w("common.notifications"),className:"relative inline-flex items-center justify-center rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]",children:[h.jsx($v,{size:16}),o>0&&h.jsx("span",{className:"absolute right-0 top-0 flex h-3 min-w-3 items-center justify-center rounded-full bg-[var(--destructive)] px-0.5 text-[8px] font-semibold leading-none text-white",children:o})]}),m&&h.jsxs("div",{className:"absolute right-0 top-full z-50 mt-2 w-[min(320px,calc(100vw-2rem))] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm font-semibold",children:w("common.notifications")}),o>0&&h.jsxs("button",{type:"button",onClick:Y,"aria-label":w("common.mark_all_read"),className:"inline-flex items-center gap-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(Wv,{className:"h-3.5 w-3.5"}),w("common.mark_all_read")]})]}),h.jsx("div",{className:"max-h-80 overflow-y-auto",children:b&&u.length===0?h.jsx("div",{className:"flex justify-center py-8",children:h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):u.length===0?h.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[h.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),h.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:w("common.no_notifications")})]}):u.map(L=>{const H=e0(L);return h.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 transition-colors ${H?"cursor-pointer hover:bg-[var(--bg-input)]":""} ${L.isRead?"opacity-60":"bg-[var(--accent)]/5"}`,onClick:()=>{H&&(L.isRead||N(L.id),_(!1),i(H))},children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm font-medium",title:L.title,children:L.title}),h.jsx("p",{className:"truncate text-xs text-[var(--text-secondary)]",title:L.body,children:L.body}),h.jsx("p",{className:"mt-1 text-xs text-[var(--text-secondary)] opacity-60",children:new Date(L.createdAt).toLocaleString()})]}),!L.isRead&&h.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),N(L.id)},"aria-label":w("common.mark_as_read"),className:"shrink-0 rounded-[4px] p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:h.jsx(Fv,{className:"h-3.5 w-3.5"})})]},L.id)})})]})]})}function kp(i,u=50){return i.name??Wh(i.description,u)}function t0(i){return i.description}function Ep(i){return`#${i.id} ${t0(i)}`}function G1(i,u=100){return{text:`#${i.id} ${kp(i,u)}`,title:Ep(i)}}function a0(i){return{tasks:i.tasks.map(u=>({type:"task",id:u.id,title:`#${u.id} ${kp(u)}`,subtitle:`${u.status} · ${u.project_key}`,hoverTitle:Ep(u)})),workers:(i.workers??[]).map(u=>({type:"worker",id:u.id,title:u.name,subtitle:`${u.hostname} · ${u.status}`})),projects:i.projects.map(u=>({type:"project",id:u.key,title:u.name,subtitle:u.repository}))}}const n0=300,wh={tasks:pb,workers:ap,projects:nb},l0={tasks:"tasks",workers:"workers",projects:"projects"};function wp({renderTrigger:i}={}){const[u,s]=g.useState(""),[o,f]=g.useState({tasks:[],workers:[],projects:[]}),[m,_]=g.useState(!1),[b,y]=g.useState(!1),[p,w]=g.useState(0),k=g.useRef(null),N=g.useRef(null),Y=g.useRef(void 0),L=g.useRef(void 0),H=Fa(),{t:B}=Vt(),U=g.useMemo(()=>[...o.tasks,...o.workers,...o.projects],[o]),K=g.useCallback(async W=>{var Pe;if(!W.trim()){f({tasks:[],workers:[],projects:[]});return}(Pe=L.current)==null||Pe.abort();const se=new AbortController;L.current=se;try{_(!0);const Je=await Xr.get("web/search",{searchParams:{q:W},signal:se.signal}).json();f(a0(Je)),w(0)}catch(Je){if(Je instanceof DOMException&&Je.name==="AbortError")return}finally{se.signal.aborted||_(!1)}},[]);g.useEffect(()=>(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>K(u),n0),()=>{Y.current&&clearTimeout(Y.current)}),[u,K]),g.useEffect(()=>{function W(se){se.key==="/"&&!b&&!(se.target instanceof HTMLInputElement||se.target instanceof HTMLTextAreaElement)&&(se.preventDefault(),y(!0)),se.key==="Escape"&&b&&(se.preventDefault(),X())}return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[b]),g.useEffect(()=>{b&&setTimeout(()=>{var W;return(W=N.current)==null?void 0:W.focus()},50)},[b]);function X(){y(!1),s(""),f({tasks:[],workers:[],projects:[]}),w(0)}function ue(W){switch(X(),W.type){case"task":H(`/tasks/${W.id}`);break;case"worker":H(`/workers/${W.id}`);break;case"project":H(`/projects/${W.id}`);break}}function ce(W){W.key==="ArrowDown"?(W.preventDefault(),w(se=>Math.min(se+1,U.length-1))):W.key==="ArrowUp"?(W.preventDefault(),w(se=>Math.max(se-1,0))):W.key==="Enter"&&U[p]&&(W.preventDefault(),ue(U[p]))}const _e=U.length>0;let F=0;return h.jsxs(h.Fragment,{children:[i?i(()=>y(!0)):h.jsxs("button",{type:"button",onClick:()=>y(!0),className:"flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-1.5 text-xs text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:[h.jsx(tp,{className:"h-3.5 w-3.5"}),h.jsx("span",{children:B("common.search_placeholder")}),h.jsx("kbd",{className:"ml-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-1.5 py-0.5 text-[11px] text-[var(--text-muted)]",children:"/"})]}),b&&h.jsx("div",{ref:k,className:"fixed inset-0 z-[100] flex items-start justify-center pt-[calc(var(--safe-area-top,0px)+16px)] md:pt-[15vh]",style:{backgroundColor:"rgba(0, 0, 0, 0.6)"},onClick:W=>{W.target===k.current&&X()},children:h.jsxs("div",{className:"mx-3 w-full max-w-[640px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-2xl sm:mx-4 md:mx-0",children:[h.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm text-[var(--accent)]",children:"/"}),h.jsx("input",{ref:N,type:"text",placeholder:B("common.search_input_placeholder"),value:u,onChange:W=>s(W.target.value),onKeyDown:ce,className:"flex-1 bg-transparent text-sm text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none"}),m&&h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})]}),h.jsx("div",{className:"max-h-[50vh] overflow-y-auto sm:max-h-[60vh] md:max-h-[400px]",children:u.trim()&&!_e&&!m?h.jsx("div",{className:"py-10 text-center text-xs text-[var(--text-muted)]",children:B("common.no_search_results",{query:u})}):Object.keys(wh).map(W=>{const se=o[W];if(se.length===0)return null;const Pe=wh[W],Je=F;return F+=se.length,h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-[var(--text-muted)]",children:[h.jsx(Pe,{className:"h-3 w-3"}),h.jsx("span",{className:"text-[11px] lowercase tracking-wider",children:l0[W]})]}),se.map((Ce,At)=>{const ut=Je+At,Me=ut===p;return h.jsxs("button",{type:"button",className:`flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors ${Me?"bg-[var(--accent)]/10 text-[var(--accent)]":"hover:bg-[var(--bg-input)]"}`,onClick:()=>ue(Ce),onMouseEnter:()=>w(ut),children:[h.jsx("span",{className:`text-xs ${Me?"text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:Me?">":" "}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm",title:Ce.hoverTitle??Ce.title,children:Ce.title}),Ce.subtitle&&h.jsx("p",{className:"truncate text-xs text-[var(--text-muted)]",title:Ce.subtitle,children:Ce.subtitle})]})]},`${Ce.type}-${Ce.id}`)})]},W)})}),h.jsxs("div",{className:"hidden items-center gap-4 border-t border-[var(--border)] px-4 py-2 md:flex",children:[h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↑↓"})," ",B("common.navigate_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↵"})," ",B("common.select_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"esc"})," ",B("common.close_hint")]})]})]})})]})}const i0={danger:"var(--destructive)",warning:"var(--warning)",accent:"var(--accent)"};function Th(i){return Array.from(i.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function r0({isOpen:i,onClose:u,onConfirm:s,title:o,message:f,confirmLabel:m,cancelLabel:_,confirmVariant:b="danger",isLoading:y,children:p}){const{t:w}=Vt(),k=g.useId(),N=m??w("common.confirm"),Y=_??w("common.cancel"),L=g.useRef(null),H=g.useRef(null),B=i0[b];g.useEffect(()=>{if(!i)return;H.current=document.activeElement;const K=requestAnimationFrame(()=>{if(L.current){const X=Th(L.current);X.length>0&&X[0].focus()}});return()=>{var X;cancelAnimationFrame(K),(X=H.current)==null||X.focus()}},[i]);const U=g.useCallback(K=>{if(K.key==="Escape"){u();return}if(K.key==="Tab"&&L.current){const X=Th(L.current);if(X.length===0)return;const ue=X[0],ce=X[X.length-1];K.shiftKey?document.activeElement===ue&&(K.preventDefault(),ce.focus()):document.activeElement===ce&&(K.preventDefault(),ue.focus())}},[u]);return i?h.jsx("div",{onClick:u,style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"max(1rem, 10vh)",paddingLeft:"1rem",paddingRight:"1rem",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:h.jsxs("div",{ref:L,role:"dialog","aria-modal":"true","aria-labelledby":k,onClick:K=>K.stopPropagation(),onKeyDown:U,style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem"},children:[h.jsx("div",{style:{marginBottom:"1.25rem"},children:h.jsxs("div",{id:k,style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:[h.jsx(np,{style:{width:"1rem",height:"1rem"}}),o]})}),h.jsxs("div",{style:{marginBottom:"1.25rem"},children:[h.jsx("p",{style:{color:"var(--text-muted)",fontSize:"0.75rem",lineHeight:"1.5"},children:f}),p]}),h.jsxs("div",{style:{display:"flex",gap:"0.75rem"},children:[h.jsx("button",{type:"button",onClick:u,disabled:y,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",cursor:y?"not-allowed":"pointer",opacity:y?.7:1,transition:"color 0.15s, border-color 0.15s"},children:Y}),h.jsx("button",{type:"button",onClick:s,disabled:y,style:{flex:1,padding:"0.5rem",backgroundColor:B,color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,cursor:y?"not-allowed":"pointer",opacity:y?.7:1},children:y?w("common.processing"):N})]})]})}):null}const jh="overlord-pwa-install-dismissed";function u0(){const i=navigator.userAgent;return/iP(hone|od|ad)/.test(i)&&/WebKit/.test(i)&&!/(CriOS|FxiOS|OPiOS|mercury)/.test(i)}function o0(){return navigator.standalone===!0||window.matchMedia("(display-mode: standalone)").matches}function s0(){const{t:i}=Vt(),[u,s]=g.useState("hidden"),[o,f]=g.useState(!1),m=g.useRef(null),_=g.useRef(void 0);g.useEffect(()=>{if(o0()||localStorage.getItem(jh)||window.innerWidth>=768)return;const p=k=>{k.preventDefault(),m.current=k};window.addEventListener("beforeinstallprompt",p);const w=setTimeout(()=>s("visible"),1e3);return()=>{window.removeEventListener("beforeinstallprompt",p),clearTimeout(w),clearTimeout(_.current)}},[]);function b(){localStorage.setItem(jh,"1"),s("dismissing"),_.current=setTimeout(()=>s("hidden"),200)}async function y(){if(m.current){await m.current.prompt();const{outcome:p}=await m.current.userChoice;p==="accepted"&&b(),m.current=null}else u0()&&f(!0)}return u==="hidden"?null:h.jsx("div",{className:`fixed bottom-4 left-4 right-4 z-40 md:hidden ${u==="dismissing"?"animate-slide-down":"animate-slide-up"}`,role:"dialog","aria-label":i("pwa_install.title"),children:h.jsxs("div",{className:"overflow-hidden rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--accent)]/20 bg-[var(--accent)]/[0.06] px-3 py-1.5",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}),h.jsx("span",{className:"text-[9px] font-medium text-[var(--accent)]",children:i("pwa_install.title")})]}),h.jsx("button",{onClick:b,className:"p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:h.jsx(lp,{size:14})})]}),h.jsx("div",{className:"px-3.5 py-3",children:o?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.ios_command")]}),h.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:[i("pwa_install.ios_step_1"),i("pwa_install.ios_step_2"),i("pwa_install.ios_step_3")].map((p,w)=>h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] bg-[var(--accent)]/[0.08]",children:h.jsx("span",{className:"text-xs font-semibold text-[var(--accent)]",children:w+1})}),h.jsxs("span",{className:"text-[10px] leading-snug text-[var(--text-secondary)]",children:[w===0&&h.jsx(db,{size:12,className:"mr-1 inline-block align-text-bottom text-[var(--text-muted)]"}),p]})]},w))})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.command")]}),h.jsxs("div",{className:"mt-1.5 text-[10px] leading-relaxed text-[var(--text-secondary)]",children:["→ ",i("pwa_install.desc_1"),h.jsx("br",{}),"→ ",i("pwa_install.desc_2")]}),h.jsxs("div",{className:"mt-2.5 flex gap-2",children:[h.jsx("button",{onClick:y,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_install.install")}),h.jsx("button",{onClick:b,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[10px] text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:i("pwa_install.skip")})]})]})})]})})}function c0(){const{t:i}=Vt(),[u,s]=g.useState(!1);return g.useEffect(()=>{if(!("serviceWorker"in navigator))return;let o=!1,f=null,m=null,_=null,b=null;function y(){o||s(!0)}navigator.serviceWorker.addEventListener("controllerchange",y);function p(k){if(f=k,k.waiting){s(!0);return}_=()=>{const N=k.installing;N&&(m=N,b=()=>{N.state==="installed"&&navigator.serviceWorker.controller&&(o||s(!0))},N.addEventListener("statechange",b))},k.addEventListener("updatefound",_)}navigator.serviceWorker.getRegistration().then(k=>{k&&!o&&p(k)});const w=setInterval(()=>{navigator.serviceWorker.getRegistration().then(k=>{!k||o||(k.update().catch(()=>{}),k.waiting&&s(!0))})},3e4);return()=>{o=!0,clearInterval(w),navigator.serviceWorker.removeEventListener("controllerchange",y),f&&_&&f.removeEventListener("updatefound",_),m&&b&&m.removeEventListener("statechange",b)}},[]),u?h.jsx("div",{className:"animate-slide-up fixed bottom-20 left-4 right-4 z-50 md:bottom-4 md:left-auto md:right-4 md:w-80",children:h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] px-3.5 py-3 shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsx(ep,{size:14,className:"shrink-0 text-[var(--accent)]"}),h.jsx("span",{className:"flex-1 text-[10px] text-[var(--text-secondary)]",children:i("pwa_update.message")}),h.jsx("button",{onClick:()=>window.location.reload(),className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-1 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_update.reload")})]})}):null}const Ur=64,f0=96,Rh=32;function d0({children:i,className:u}){const s=g.useRef(null),o=g.useRef(0),f=g.useRef("idle"),[m,_]=g.useState(0),[b,y]=g.useState("idle"),p=g.useCallback(U=>{f.current=U,y(U)},[]),w=g.useCallback(()=>{const U=s.current;return U?U.scrollTop<=0:!0},[]),k=g.useCallback(U=>{if(!w()){o.current=0;return}o.current=U.touches[0].clientY},[w]),N=g.useCallback(U=>{if(f.current==="refreshing"||o.current===0)return;const X=U.touches[0].clientY-o.current;if(X<=0){f.current!=="idle"&&(_(0),p("idle"));return}if(!w())return;U.preventDefault();const ue=Math.min(X*.5,f0);_(ue),p(ue>=Ur?"ready":"pulling")},[w,p]),Y=g.useCallback(()=>{f.current!=="refreshing"&&(f.current==="ready"?(p("refreshing"),_(Ur),setTimeout(()=>{window.location.reload()},300)):(_(0),p("idle")),o.current=0)},[p]);g.useEffect(()=>{const U=s.current;if(U)return U.addEventListener("touchstart",k,{passive:!0}),U.addEventListener("touchmove",N,{passive:!1}),U.addEventListener("touchend",Y,{passive:!0}),()=>{U.removeEventListener("touchstart",k),U.removeEventListener("touchmove",N),U.removeEventListener("touchend",Y)}},[k,N,Y]);const L=Math.min(m/Ur,1),H=b==="refreshing"?0:m/Ur*180,B=m>0||b==="refreshing";return h.jsxs("div",{ref:s,className:u,style:{overscrollBehaviorY:"contain"},children:[B&&h.jsx("div",{className:"pointer-events-none flex items-center justify-center md:hidden",style:{height:m,transition:b==="idle"?"height 200ms ease-out":void 0},children:h.jsx("div",{className:"flex items-center justify-center rounded-full bg-[var(--bg-card)] border border-[var(--border)]",style:{width:Rh,height:Rh,opacity:L,transition:b==="idle"?"opacity 200ms ease-out":void 0},children:b==="refreshing"?h.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",className:"animate-spin",style:{color:"var(--accent)"},children:[h.jsx("circle",{cx:"8",cy:"8",r:"6",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),h.jsx("path",{d:"M8 2a6 6 0 0 1 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):h.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",style:{color:b==="ready"?"var(--accent)":"var(--text-muted)",transform:`rotate(${H}deg)`,transition:"color 150ms"},children:h.jsx("path",{d:"M8 3v8M5 8l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),i]})}const Tp=g.createContext({setActions:()=>{}});function V1(i){const{setActions:u}=g.useContext(Tp);g.useEffect(()=>(u(i),()=>u(null)),[i,u])}const jp=g.createContext({setSubtitle:()=>{}});function X1(i){const{setSubtitle:u}=g.useContext(jp),s=typeof i=="string"?i:(i==null?void 0:i.text)??null,o=typeof i=="string"?i:(i==null?void 0:i.title)??(i==null?void 0:i.text)??null;g.useEffect(()=>s?(u(o&&o!==s?{text:s,title:o}:s),()=>u(null)):(u(null),()=>u(null)),[s,o,u])}const m0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:Ph},{to:"/dashboard",label:"dashboard",icon:Ih},{to:"/workers",label:"workers",icon:ap},{to:"/projects",label:"projects",icon:lb},{to:"/access-tokens",label:"tokens",icon:rb}],h0=[{to:"/docs/cli",label:"cli",icon:$s},{to:"/docs/api",label:"api",icon:ab},{to:"/docs/bot",label:"bot",icon:cb},{to:"/docs/skill",label:"skill",icon:hb},{to:"/docs/all",label:"all",icon:ub}],p0=[{to:"/admin",label:"admin",icon:mb}],_0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:Ph},{to:"/dashboard",label:"dashboard",icon:Ih}],qr={"/home":{title:"common.breadcrumb_terminal",subtitle:"common.breadcrumb_terminal_sub"},"/dashboard":{title:"common.breadcrumb_dashboard",subtitle:"common.breadcrumb_dashboard_sub"},"/tasks":{title:"common.breadcrumb_tasks",subtitle:"common.breadcrumb_tasks_sub"},"/workers":{title:"common.breadcrumb_workers",subtitle:"common.breadcrumb_workers_sub"},"/projects":{title:"common.breadcrumb_projects",subtitle:"common.breadcrumb_projects_sub"},"/admin":{title:"common.breadcrumb_admin",subtitle:"common.breadcrumb_admin_sub"},"/profile":{title:"common.breadcrumb_profile",subtitle:"common.breadcrumb_profile_sub"},"/access-tokens":{title:"common.breadcrumb_tokens",subtitle:"common.breadcrumb_tokens_sub"},"/docs":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_sub"},"/docs/cli":{title:"common.breadcrumb_docs_cli",subtitle:"common.breadcrumb_docs_cli_sub"},"/docs/api":{title:"common.breadcrumb_docs_api",subtitle:"common.breadcrumb_docs_api_sub"},"/docs/skill":{title:"common.breadcrumb_docs_skill",subtitle:"common.breadcrumb_docs_skill_sub"},"/docs/bot":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_bot_sub"},"/docs/all":{title:"common.breadcrumb_docs",subtitle:"common.breadcrumb_docs_all_sub"}};function g0(i){const{t:u}=Vt();if(qr[i]){const o=qr[i];return{title:u(o.title),subtitle:u(o.subtitle)}}const s="/"+i.split("/").filter(Boolean)[0];if(qr[s]){const o=qr[s],f=i.split("/").filter(Boolean).slice(1).join(" / ");return{title:u(o.title),subtitle:f||u(o.subtitle)}}return{title:i.slice(1).replace(/\//g," // ")||"home"}}function y0(i,u){return i==="/home"?u==="/home":i==="/dashboard"?u==="/dashboard":u.startsWith(i)}function v0(){const i=gt(),{t:u}=Vt(),s={terminal:u("terminal_home.title"),dashboard:u("dashboard.title"),tasks:u("tasks.title"),workers:u("workers.title")};return h.jsxs("nav",{className:"flex items-center justify-around border-t border-[var(--border)] bg-[var(--bg-card)]",style:{height:48,paddingTop:4},children:[_0.map(({to:o,label:f,icon:m})=>{const _=y0(o,i.pathname);return h.jsxs(Js,{to:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(m,{size:18,className:_?"text-[var(--accent)]":"text-[var(--text-muted)]"}),h.jsx("span",{className:`text-[11px] lowercase ${_?"font-bold text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:s[f]??f})]},o)}),h.jsx(wp,{renderTrigger:o=>h.jsxs("button",{type:"button",onClick:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(tp,{size:18,className:"text-[var(--text-muted)]"}),h.jsx("span",{className:"text-[11px] lowercase text-[var(--text-muted)]",children:u("common.search_placeholder")})]})})]})}function b0(){const i=Fa(),{t:u}=Vt();return h.jsxs("header",{className:"flex items-center justify-between border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:hidden",style:{height:"calc(56px + env(safe-area-inset-top, 0px))",minHeight:"calc(56px + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)"},children:[h.jsxs("button",{onClick:()=>i("/home"),className:"flex items-center gap-2",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-[4px] bg-[var(--accent)]",children:h.jsx("span",{className:"text-sm font-semibold",style:{color:"#0C0C0C"},children:"~"})}),h.jsx("span",{className:"text-sm font-bold lowercase text-[var(--text-primary)]",children:u("common.overlord")})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("button",{onClick:()=>i("/profile"),className:"p-2 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]","aria-label":u("common.profile"),children:h.jsx(gb,{size:18})}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})}function zs({label:i,items:u,collapsed:s}){return h.jsxs("div",{className:"mt-4 first:mt-0",children:[!s&&h.jsx("div",{className:"mb-2 px-3 text-xs lowercase",style:{color:"var(--text-muted)"},children:i}),u.map(({to:o,label:f,icon:m})=>h.jsx(Js,{to:o,className:({isActive:_})=>`flex items-center text-sm lowercase transition-colors ${s?"justify-center py-3":"gap-2.5 px-3 py-1.5"} ${_?"text-[var(--accent)] bg-[var(--accent)]/5":"text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:({isActive:_})=>h.jsxs(h.Fragment,{children:[h.jsx(m,{size:14,style:{flexShrink:0}}),!s&&h.jsx("span",{children:_?`> ${f}`:` ${f}`})]})},o))]})}function x0(){const{user:i,logout:u}=xa(),s=Fa(),[o,f]=g.useState(!1),m=xb(),{t:_}=Vt(),{sidebarCollapsed:b,toggleSidebar:y}=kb();function p(){u(),s("/login")}return h.jsxs("aside",{className:"hidden md:flex flex-col border-r border-[var(--border)] transition-[width,min-width] duration-300 overflow-hidden",style:{width:b?56:240,minWidth:b?56:240,backgroundColor:"var(--bg-card)"},children:[h.jsx("div",{className:"flex items-center px-5",style:{height:48},children:h.jsxs("button",{onClick:()=>s("/home"),className:"flex items-center gap-2.5",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-[4px] bg-[var(--accent)]",style:{flexShrink:0},children:h.jsx("span",{className:"text-lg font-semibold",style:{color:"#0C0C0C"},children:"~"})}),!b&&h.jsx("span",{className:"text-base font-bold lowercase tracking-tight",style:{color:"var(--text-primary)"},children:_("common.overlord")})]})}),h.jsxs("nav",{className:"flex-1 px-3 pt-2",children:[h.jsx(zs,{label:_("common.navigation"),items:m0,collapsed:b}),h.jsx(zs,{label:_("common.docs_section"),items:h0,collapsed:b}),m&&h.jsx(zs,{label:_("common.admin_section"),items:p0,collapsed:b})]}),h.jsx("div",{className:`px-3 py-1 ${b?"flex justify-center":""}`,children:h.jsx("button",{onClick:y,className:"flex items-center justify-center w-full py-1.5 rounded-[4px] text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)] hover:bg-[var(--accent)]/5","aria-label":b?"expand sidebar":"collapse sidebar",children:b?h.jsx(Pv,{size:14}):h.jsx(Iv,{size:14})})}),h.jsx("div",{className:"border-t border-[var(--border)] p-3",children:h.jsxs("div",{className:`flex items-center py-2 ${b?"justify-center":"gap-3 px-3"}`,children:[h.jsx("button",{onClick:()=>s("/profile"),className:"flex h-7 w-7 items-center justify-center text-xs font-bold text-black transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",borderRadius:4,flexShrink:0},title:_("common.profile"),children:((i==null?void 0:i.username)??"u")[0].toUpperCase()}),!b&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{onClick:()=>s("/profile"),className:"min-w-0 flex-1 text-left transition-colors hover:opacity-80",title:_("common.profile"),children:[h.jsx("div",{className:"truncate text-sm lowercase",style:{color:"var(--text-primary)"},children:(i==null?void 0:i.username)??"user"}),h.jsx("div",{className:"truncate text-xs lowercase",style:{color:"var(--text-muted)"},children:(i==null?void 0:i.role)??"user"})]}),h.jsx("button",{onClick:()=>f(!0),className:"p-1 text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)]","aria-label":_("common.log_out"),children:h.jsx(sb,{size:14})})]})]})}),h.jsx(r0,{isOpen:o,onClose:()=>f(!1),onConfirm:p,title:_("common.logout_title"),message:_("common.logout_message"),confirmLabel:_("common.logout"),confirmVariant:"warning"})]})}function S0({headerActions:i,subtitleOverride:u}){const s=gt(),{title:o,subtitle:f}=g0(s.pathname),m=u??f,_=typeof m=="string"?m:m==null?void 0:m.text,b=typeof m=="string"?m:(m==null?void 0:m.title)??(m==null?void 0:m.text);return h.jsxs("header",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5",style:{height:48,minHeight:48,backgroundColor:"var(--bg-card)"},children:[h.jsxs("div",{className:"text-sm lowercase",children:[h.jsx("span",{style:{color:"var(--text-primary)"},children:o}),_&&h.jsxs("span",{style:{color:"var(--text-muted)"},title:b,children:[" ","// ",Wh(_,40)]})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[i,h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(wp,{}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})]})}function k0(){const[i,u]=g.useState(null),[s,o]=g.useState(null),f=gt(),m=f.pathname==="/home",_=/^\/tasks\/\d+$/.test(f.pathname),b=f.pathname.startsWith("/docs");return g.useEffect(()=>up.getState().init(),[]),h.jsxs("div",{className:"fixed inset-x-0 top-0 flex w-full overflow-hidden font-mono md:flex-row",style:{height:"var(--app-height, 100dvh)",minHeight:"var(--app-height, 100dvh)"},children:[h.jsx(x0,{}),h.jsxs("div",{"data-testid":"app-main-column",className:"flex min-h-0 flex-1 flex-col overflow-hidden pb-[calc(48px+var(--safe-area-bottom,0px))] md:pb-0",children:[h.jsx(b0,{}),!b&&h.jsx(S0,{headerActions:i,subtitleOverride:s}),h.jsx(d0,{className:m||_?"min-h-0 flex-1 overflow-hidden bg-[var(--bg-primary)]":"min-h-0 flex-1 overflow-auto bg-[var(--bg-primary)] p-4 pb-6 md:p-6 md:pb-6",children:h.jsx(Tp.Provider,{value:{setActions:u},children:h.jsx(jp.Provider,{value:{setSubtitle:o},children:h.jsx(cv,{})})})}),h.jsx(s0,{}),h.jsx(c0,{}),h.jsx("div",{className:"safe-area-bottom-fill fixed inset-x-0 bottom-0 z-30 bg-[var(--bg-card)] md:hidden",children:h.jsx(v0,{})})]})]})}function Ah(i){var s;const u=(s=i.state)==null?void 0:s.from;return u?{from:u}:{from:{pathname:i.pathname,search:i.search}}}function li({children:i,requireAdmin:u=!1}){const{accessToken:s,user:o,requireTotpSetup:f,initializing:m}=xa(),_=gt();if(m)return h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})});if(!s)return h.jsx(ll,{to:"/login",state:Ah(_),replace:!0});if(f){const b=Ah(_);return _.pathname!=="/totp-setup"&&_.pathname!=="/bind"?h.jsx(ll,{to:"/totp-setup",state:b,replace:!0}):_.pathname==="/bind"?(sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(b.from)),h.jsx(ll,{to:"/totp-setup",state:b,replace:!0})):h.jsx(h.Fragment,{children:i})}return u&&(o==null?void 0:o.role)!==ip.ADMIN?h.jsx(ll,{to:"/home",replace:!0}):h.jsx(h.Fragment,{children:i})}function E0({children:i}){const{theme:u,resolved:s,setResolved:o}=sp();return g.useEffect(()=>{if(u!=="system"){o(u);return}const f=window.matchMedia("(prefers-color-scheme: dark)");o(f.matches?"dark":"light");const m=_=>o(_.matches?"dark":"light");return f.addEventListener("change",m),()=>f.removeEventListener("change",m)},[u,o]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",s==="dark")},[s]),h.jsx(h.Fragment,{children:i})}class w0 extends g.Component{constructor(u){super(u),this.state={hasError:!1,error:null}}static getDerivedStateFromError(u){return{hasError:!0,error:u}}render(){var u;return this.state.hasError?h.jsxs("div",{className:"flex h-full min-h-[300px] flex-col items-center justify-center gap-4 p-8 font-mono",children:[h.jsx("span",{className:"text-lg font-bold text-[var(--destructive)]",children:Br("common.runtime_error")}),h.jsx("p",{className:"max-w-md text-center text-xs text-[var(--text-muted)]",children:((u=this.state.error)==null?void 0:u.message)||Br("common.an_unexpected_error_occurred")}),h.jsxs("button",{onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(ep,{className:"h-3.5 w-3.5"}),Br("common.reload")]})]}):this.props.children}}function T0({isOpen:i}){const u=Fa(),{logout:s,setSessionExpired:o}=xa(),{t:f}=Vt();function m(){s(),o(!1),u("/login")}return i?h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[h.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),h.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:h.jsxs("div",{className:"flex flex-col items-center px-8 py-10",children:[h.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-full bg-[var(--warning)]/10",children:h.jsx(ob,{className:"h-7 w-7 text-[var(--warning)]"})}),h.jsx("h3",{className:"mb-2 text-base font-bold text-[var(--text-primary)]",children:f("auth.session_expired")}),h.jsx("p",{className:"mb-8 text-center text-xs text-[var(--text-secondary)]",children:f("auth.session_expired_message")}),h.jsx("button",{type:"button",className:"w-full rounded-[4px] bg-[var(--accent)] px-3 py-2.5 text-xs font-medium text-black hover:opacity-90 transition-opacity",onClick:m,children:f("auth.go_to_login")})]})})]}):null}const zh=5;let ba=[];const Bs=new Set;function Rp(){Bs.forEach(i=>i())}function j0(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Wa(i,u,s=4e3){const o=j0();return ba=[...ba,{id:o,variant:i,message:u,duration:s}],ba.length>zh&&(ba=ba.slice(ba.length-zh)),Rp(),o}Wa.success=(i,u)=>Wa("success",i,u);Wa.error=(i,u)=>Wa("error",i,u);Wa.warning=(i,u)=>Wa("warning",i,u);Wa.info=(i,u)=>Wa("info",i,u);function R0(i){ba=ba.filter(u=>u.id!==i),Rp()}function A0(){const[,i]=g.useState(0);return g.useEffect(()=>{const u=()=>i(s=>s+1);return Bs.add(u),()=>{Bs.delete(u)}},[]),ba}const z0={success:{icon:eb,borderColor:"var(--accent)"},error:{icon:tb,borderColor:"var(--destructive)"},warning:{icon:np,borderColor:"var(--warning)"},info:{icon:ib,borderColor:"var(--info)"}};function O0({item:i}){const u=z0[i.variant],s=u.icon,{t:o}=Vt(),f=g.useCallback(()=>R0(i.id),[i.id]);return g.useEffect(()=>{if(!i.duration)return;const m=setTimeout(f,i.duration);return()=>clearTimeout(m)},[i.duration,f]),h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] bg-[var(--bg-card)] px-4 py-3 shadow-lg",style:{borderLeft:`3px solid ${u.borderColor}`},role:"alert",children:[h.jsx(s,{className:"h-4 w-4 shrink-0",style:{color:u.borderColor}}),h.jsx("p",{className:"flex-1 text-xs text-[var(--text-primary)]",children:i.message}),h.jsx("button",{onClick:f,className:"shrink-0 rounded-[4px] p-0.5 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]","aria-label":o("common.dismiss_notification"),children:h.jsx(lp,{className:"h-3.5 w-3.5"})})]})}function C0(){const i=A0();return i.length===0?null:h.jsx("div",{className:"pointer-events-none fixed right-4 top-4 z-[9999] flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2",children:i.map(u=>h.jsx("div",{className:"pointer-events-auto",children:h.jsx(O0,{item:u})},u.id))})}const D0=g.lazy(()=>ne(()=>import("./LandingPage-jbch85jE.js"),__vite__mapDeps([0,1,2,3,4,5]))),N0=g.lazy(()=>ne(()=>import("./LoginPage-BlsMAD1A.js"),[])),M0=g.lazy(()=>ne(()=>import("./TotpSetupPage-B_fa-elI.js"),[])),U0=g.lazy(()=>ne(()=>import("./NotFoundPage-M_tndhpI.js"),[])),q0=g.lazy(()=>ne(()=>import("./HomePage-CmLwPGXq.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,1]))),L0=g.lazy(()=>ne(()=>import("./TerminalHomePage-BLLueNK1.js"),__vite__mapDeps([15,16,17,18,10,11,19,8,12,13,20,21,22]))),H0=g.lazy(()=>ne(()=>import("./TaskListPage-DeqS_f6c.js"),__vite__mapDeps([23,16,7,8,12,14,24,19,5,25,9,20,26,11]))),B0=g.lazy(()=>ne(()=>import("./TaskDetailPage-CSj4LhQy.js"),__vite__mapDeps([27,16,17,18,12,19,8,14,28,21,24,29,30]))),Y0=g.lazy(()=>ne(()=>import("./WorkerListPage-CWeju-3k.js"),__vite__mapDeps([31,8,32,33,34,35,36,22,5,30,19,25,9,13,20]))),G0=g.lazy(()=>ne(()=>import("./WorkerDetailPage-Dk4mhFUa.js"),__vite__mapDeps([37,12,8,38,32,13,14,39,28]))),V0=g.lazy(()=>ne(()=>import("./WorkerSetupGuidePage-C48MhYel.js"),__vite__mapDeps([33,34,35,36,22]))),X0=g.lazy(()=>ne(()=>import("./ProjectListPage-B1cnV_QE.js"),__vite__mapDeps([40,19,25,9,12,13,20]))),Q0=g.lazy(()=>ne(()=>import("./ProjectDetailPage-DK4Unf3c.js"),__vite__mapDeps([41,42,19,14,12,8,38,13,43,39,20]))),Z0=g.lazy(()=>ne(()=>import("./EditProjectPage-DNwgYV6X.js"),__vite__mapDeps([44,19,42,20]))),K0=g.lazy(()=>ne(()=>import("./PipelineEditorPage-KR-x6zVv.js"),__vite__mapDeps([45,19]))),J0=g.lazy(()=>ne(()=>import("./ProfilePage-BswRrpWP.js"),__vite__mapDeps([46,47,38,13]))),$0=g.lazy(()=>ne(()=>import("./BindPlatformPage-GJUb4y8U.js"),[])),W0=g.lazy(()=>ne(()=>import("./AccessTokensPage-BKPOeLH5.js"),__vite__mapDeps([48,19,25,9,12,13,20,5,39]))),F0=g.lazy(()=>ne(()=>import("./CliReferencePage-BK-20Xy3.js"),__vite__mapDeps([49,50,5,20]))),I0=g.lazy(()=>ne(()=>import("./ApiReferencePage-BgTKVERG.js"),__vite__mapDeps([51,50,5,20]))),P0=g.lazy(()=>ne(()=>import("./SkillPage-B8x5n4hu.js"),__vite__mapDeps([52,53,5,29]))),e1=g.lazy(()=>ne(()=>import("./DocsLayout-CetUdZqe.js"),__vite__mapDeps([54,28]))),t1=g.lazy(()=>ne(()=>import("./InstallationPage-21iKvpOv.js"),__vite__mapDeps([55,53,5]))),a1=g.lazy(()=>ne(()=>import("./DeveloperSetupPage-DvypSJpw.js"),__vite__mapDeps([56,53,5]))),n1=g.lazy(()=>ne(()=>import("./WorkerSetupPage-gonzLiuJ.js"),__vite__mapDeps([57,53,5]))),l1=g.lazy(()=>ne(()=>import("./BotSetupPage-IL_UG9mQ.js"),__vite__mapDeps([58,53,5]))),i1=g.lazy(()=>ne(()=>import("./LocalDevelopmentPage-CI0OCaIU.js"),__vite__mapDeps([59,53,5]))),r1=g.lazy(()=>ne(()=>import("./WorkerOperationsPage-DG4jApiM.js"),[])),u1=g.lazy(()=>ne(()=>import("./DeploymentPage-CTegdPV6.js"),__vite__mapDeps([60,53,5]))),Oh=g.lazy(()=>ne(()=>import("./BotIntegrationPage-tvED2fvw.js"),[])),o1=g.lazy(()=>ne(()=>import("./PipelineConfigPage-DYgMIHFl.js"),__vite__mapDeps([61,53,5]))),s1=g.lazy(()=>ne(()=>import("./DevWorkflowPage-D7X6FWv1.js"),__vite__mapDeps([62,53,5]))),c1=g.lazy(()=>ne(()=>import("./PermissionsPage-WHjs-Xic.js"),[])),f1=g.lazy(()=>ne(()=>import("./EnvVariablesPage-DCciQfa-.js"),__vite__mapDeps([63,53,5]))),d1=g.lazy(()=>ne(()=>import("./ArchitecturePage-B2jMT8On.js"),__vite__mapDeps([64,53,5]))),m1=g.lazy(()=>ne(()=>import("./ChangelogPage-IqI_PvlI.js"),[])),h1=g.lazy(()=>ne(()=>import("./AgentCliPage-CvGgoJPi.js"),__vite__mapDeps([65,53,5]))),p1=g.lazy(()=>ne(()=>import("./DocsIndexPage-DFyZPfbE.js"),__vite__mapDeps([66,35,2,3,36]))),_1=g.lazy(()=>ne(()=>import("./AdminPage-Bt8zsqUd.js"),__vite__mapDeps([67,4,2,68,36]))),g1=g.lazy(()=>ne(()=>import("./DeveloperManage-D0-xLBLk.js"),__vite__mapDeps([69,19,47,25,9,13,8,20,4,43,21]))),y1=g.lazy(()=>ne(()=>import("./BotManage-Bb2nQJJ0.js"),__vite__mapDeps([70,19,53,5,39,20,25,9,13,8,2,43]))),v1=g.lazy(()=>ne(()=>import("./TokenManage-ENzIGDT3.js"),__vite__mapDeps([71,34,5,29,25,9,13,8,20]))),b1=g.lazy(()=>ne(()=>import("./AuditLogPage-BoB6en9-.js"),__vite__mapDeps([72,19,25,9,68,26,11]))),x1=g.lazy(()=>ne(()=>import("./SettingsPage-CmdqpJZQ.js"),[]));function S1(){return h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})})}function k1(){const i=xa(u=>u.sessionExpired);return h.jsxs(E0,{children:[h.jsx(C0,{}),h.jsx(w0,{children:h.jsxs(qv,{children:[h.jsx(T0,{isOpen:i}),h.jsx(g.Suspense,{fallback:h.jsx(S1,{}),children:h.jsxs(dv,{children:[h.jsx(ee,{path:"/",element:h.jsx(D0,{})}),h.jsx(ee,{path:"/login",element:h.jsx(N0,{})}),h.jsx(ee,{path:"/totp-setup",element:h.jsx(li,{children:h.jsx(M0,{})})}),h.jsx(ee,{path:"/bind",element:h.jsx(li,{children:h.jsx($0,{})})}),h.jsxs(ee,{element:h.jsx(li,{children:h.jsx(k0,{})}),children:[h.jsx(ee,{path:"/home",element:h.jsx(L0,{})}),h.jsx(ee,{path:"/dashboard",element:h.jsx(q0,{})}),h.jsx(ee,{path:"/tasks",element:h.jsx(H0,{})}),h.jsx(ee,{path:"/tasks/:id",element:h.jsx(B0,{})}),h.jsx(ee,{path:"/workers",element:h.jsx(Y0,{})}),h.jsx(ee,{path:"/workers/setup",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(V0,{})})}),h.jsx(ee,{path:"/workers/:id",element:h.jsx(G0,{})}),h.jsx(ee,{path:"/projects",element:h.jsx(X0,{})}),h.jsx(ee,{path:"/projects/:key",element:h.jsx(Q0,{})}),h.jsx(ee,{path:"/projects/:key/edit",element:h.jsx(Z0,{})}),h.jsx(ee,{path:"/projects/:key/pipeline",element:h.jsx(K0,{})}),h.jsx(ee,{path:"/profile",element:h.jsx(J0,{})}),h.jsx(ee,{path:"/access-tokens",element:h.jsx(W0,{})}),h.jsxs(ee,{path:"/docs",element:h.jsx(e1,{}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"cli",replace:!0})}),h.jsx(ee,{path:"cli",element:h.jsx(F0,{})}),h.jsx(ee,{path:"api",element:h.jsx(I0,{})}),h.jsx(ee,{path:"bot",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"all",element:h.jsx(p1,{})}),h.jsx(ee,{path:"skill",element:h.jsx(P0,{})}),h.jsx(ee,{path:"installation",element:h.jsx(t1,{})}),h.jsx(ee,{path:"developer-setup",element:h.jsx(a1,{})}),h.jsx(ee,{path:"worker-setup",element:h.jsx(n1,{})}),h.jsx(ee,{path:"bot-setup",element:h.jsx(l1,{})}),h.jsx(ee,{path:"local-development",element:h.jsx(i1,{})}),h.jsx(ee,{path:"worker-operations",element:h.jsx(r1,{})}),h.jsx(ee,{path:"deployment",element:h.jsx(u1,{})}),h.jsx(ee,{path:"bot-integration",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"pipeline-config",element:h.jsx(o1,{})}),h.jsx(ee,{path:"dev-workflow",element:h.jsx(s1,{})}),h.jsx(ee,{path:"permissions",element:h.jsx(c1,{})}),h.jsx(ee,{path:"env-variables",element:h.jsx(f1,{})}),h.jsx(ee,{path:"architecture",element:h.jsx(d1,{})}),h.jsx(ee,{path:"agent-cli",element:h.jsx(h1,{})}),h.jsx(ee,{path:"changelog",element:h.jsx(m1,{})})]}),h.jsxs(ee,{path:"/admin",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(_1,{})}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"developers",replace:!0})}),h.jsx(ee,{path:"developers",element:h.jsx(g1,{})}),h.jsx(ee,{path:"bots",element:h.jsx(y1,{})}),h.jsx(ee,{path:"tokens",element:h.jsx(v1,{})}),h.jsx(ee,{path:"audit-logs",element:h.jsx(b1,{})}),h.jsx(ee,{path:"settings",element:h.jsx(x1,{})})]})]}),h.jsx(ee,{path:"*",element:h.jsx(U0,{})})]})})]})})]})}function E1(i){var u,s;return((u=i.matchMedia)==null?void 0:u.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}function w1(i){var s,o;const u=((s=i.navigator)==null?void 0:s.userAgent)??"";return/iPhone|iPad|iPod/i.test(u)||/Macintosh/i.test(u)&&(((o=i.navigator)==null?void 0:o.maxTouchPoints)??0)>1}function T1(i){const u=i.activeElement;if(!(u instanceof HTMLElement))return!1;const s=u.tagName;return u.isContentEditable||s==="INPUT"||s==="TEXTAREA"||s==="SELECT"}function j1(i){const u=i.screen;if(!u)return null;const s=Math.round(u.width),o=Math.round(u.height);return i.innerHeight>=i.innerWidth?Math.max(s,o):Math.min(s,o)}function R1(i=window,u=document){const s=u.documentElement,o=i.visualViewport??null,f=()=>{const m=Math.round((o==null?void 0:o.height)??0),_=Math.round(i.innerHeight);let b=m>0?m:_;if(E1(i)&&w1(i)&&!T1(u)){const y=j1(i);y!==null&&(b=Math.max(b,_,y))}s.style.setProperty("--app-height",`${b}px`)};return f(),i.addEventListener("resize",f),i.addEventListener("orientationchange",f),o==null||o.addEventListener("resize",f),o==null||o.addEventListener("scroll",f),()=>{i.removeEventListener("resize",f),i.removeEventListener("orientationchange",f),o==null||o.removeEventListener("resize",f),o==null||o.removeEventListener("scroll",f)}}xa.getState().initialize();R1(window,document);const A1=window.matchMedia("(display-mode: standalone)").matches||navigator.standalone===!0;if(A1){document.documentElement.classList.add("pwa-standalone");const i=window.matchMedia("(prefers-color-scheme: dark)").matches,u=localStorage.getItem("overlord-theme"),s=u==="dark"||u!=="light"&&i;document.body.style.backgroundColor=s?"#171717":"#FFFFFF",new MutationObserver(()=>{const o=document.documentElement.classList.contains("dark");document.body.style.backgroundColor=o?"#171717":"#FFFFFF"}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}cy.createRoot(document.getElementById("root")).render(h.jsx(g.StrictMode,{children:h.jsx(k1,{})}));export{Js as $,O1 as A,C1 as B,Fv as C,ip as D,eb as E,U1 as F,L1 as G,Ns as H,np as I,M1 as J,ep as K,Jh as L,cb as M,ll as N,uy as O,s0 as P,Wh as Q,Rr as R,ap as S,cp as T,rb as U,sb as V,N1 as W,lp as X,q1 as Y,ab as Z,hb as _,Vt as a,cv as a0,H1 as a1,B1 as a2,tb as a3,$s as b,xe as c,mb as d,ub as e,Fa as f,gt as g,Xr as h,xb as i,h as j,up as k,kp as l,Ep as m,t0 as n,Fr as o,D1 as p,X1 as q,g as r,G1 as s,Wa as t,xa as u,r0 as v,V1 as w,tp as x,Ph as y,Y1 as z};
|
|
242
|
+
"{description}"`}};function jb(i,u){const s=u.split(".");let o=i;for(const f of s){if(o==null||typeof o!="object")return u;o=o[f]}return typeof o=="string"?o:u}function Rb(i,u){return u?i.replace(/\{(\w+)\}/g,(s,o)=>u[o]!=null?String(u[o]):`{${o}}`):i}function Br(i,u){return Rb(jb(Tb,i),u)}function Vt(){return{t:g.useCallback((u,s)=>Br(u,s),[])}}function cp(){const{theme:i,setTheme:u}=sp(),{t:s}=Vt(),o=i==="dark"||i==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;function f(){u(o?"light":"dark")}return h.jsx("button",{onClick:f,className:"flex items-center gap-1.5 rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]","aria-label":s(o?"common.switch_to_light":"common.switch_to_dark"),title:s(o?"common.light_mode":"common.dark_mode"),children:o?h.jsx(_b,{size:16}):h.jsx(fb,{size:16})})}class Ns extends Error{constructor(s,o,f){const m=s.status||s.status===0?s.status:"",_=s.statusText??"",b=`${m} ${_}`.trim(),y=b?`status code ${b}`:"an unknown error";super(`Request failed with ${y}: ${o.method} ${o.url}`);Ve(this,"response");Ve(this,"request");Ve(this,"options");this.name="HTTPError",this.response=s,this.request=o,this.options=f}}class fp extends Error{constructor(s){let o="Non-error value was thrown";try{typeof s=="string"?o=s:s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&(o=s.message)}catch{}super(o);Ve(this,"name","NonError");Ve(this,"value");this.value=s}}class Rs extends Error{constructor(s){const o=s!=null&&s.cause?s.cause instanceof Error?s.cause:new fp(s.cause):void 0;super(s!=null&&s.code?`Forced retry: ${s.code}`:"Forced retry",o?{cause:o}:void 0);Ve(this,"name","ForceRetryError");Ve(this,"customDelay");Ve(this,"code");Ve(this,"customRequest");this.customDelay=s==null?void 0:s.delay,this.code=s==null?void 0:s.code,this.customRequest=s==null?void 0:s.request}}const Sh=(()=>{let i=!1,u=!1;const s=typeof globalThis.ReadableStream=="function",o=typeof globalThis.Request=="function";if(s&&o)try{u=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type")}catch(f){if(f instanceof Error&&f.message==="unsupported BodyInit type")return!1;throw f}return i&&!u})(),Ab=typeof globalThis.AbortController=="function",dp=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",zb=typeof globalThis.ReadableStream=="function",Ob=typeof globalThis.FormData=="function",mp=["get","post","put","patch","head","delete"],Cb={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},As=2147483647,Db=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,hp=Symbol("stop");class pp{constructor(u){Ve(this,"options");this.options=u}}const Nb=i=>new pp(i),Mb={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Ub={next:!0},qb={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Lb=i=>{if(!i)return 0;if(i instanceof FormData){let u=0;for(const[s,o]of i)u+=Db,u+=new TextEncoder().encode(`Content-Disposition: form-data; name="${s}"`).length,u+=typeof o=="string"?new TextEncoder().encode(o).length:o.size;return u}if(i instanceof Blob)return i.size;if(i instanceof ArrayBuffer)return i.byteLength;if(typeof i=="string")return new TextEncoder().encode(i).length;if(i instanceof URLSearchParams)return new TextEncoder().encode(i.toString()).length;if("byteLength"in i)return i.byteLength;if(typeof i=="object"&&i!==null)try{const u=JSON.stringify(i);return new TextEncoder().encode(u).length}catch{return 0}return 0},_p=(i,u,s)=>{let o,f=0;return i.pipeThrough(new TransformStream({transform(m,_){if(_.enqueue(m),o){f+=o.byteLength;let b=u===0?0:f/u;b>=1&&(b=1-Number.EPSILON),s==null||s({percent:b,totalBytes:Math.max(u,f),transferredBytes:f},o)}o=m},flush(){o&&(f+=o.byteLength,s==null||s({percent:1,totalBytes:Math.max(u,f),transferredBytes:f},o))}}))},Hb=(i,u)=>{if(!i.body)return i;if(i.status===204)return new Response(null,{status:i.status,statusText:i.statusText,headers:i.headers});const s=Math.max(0,Number(i.headers.get("content-length"))||0);return new Response(_p(i.body,s,u),{status:i.status,statusText:i.statusText,headers:i.headers})},Bb=(i,u,s)=>{if(!i.body)return i;const o=Lb(s??i.body);return new Request(i,{duplex:"half",body:_p(i.body,o,u)})},yn=i=>i!==null&&typeof i=="object",Dr=(...i)=>{for(const u of i)if((!yn(u)||Array.isArray(u))&&u!==void 0)throw new TypeError("The `options` argument must be an object");return Ws({},...i)},gp=(i={},u={})=>{const s=new globalThis.Headers(i),o=u instanceof globalThis.Headers,f=new globalThis.Headers(u);for(const[m,_]of f.entries())o&&_==="undefined"||_===void 0?s.delete(m):s.set(m,_);return s};function Nr(i,u,s){return Object.hasOwn(u,s)&&u[s]===void 0?[]:Ws(i[s]??[],u[s]??[])}const yp=(i={},u={})=>({beforeRequest:Nr(i,u,"beforeRequest"),beforeRetry:Nr(i,u,"beforeRetry"),afterResponse:Nr(i,u,"afterResponse"),beforeError:Nr(i,u,"beforeError")}),Yb=(i,u)=>{const s=new URLSearchParams;for(const o of[i,u])if(o!==void 0)if(o instanceof URLSearchParams)for(const[f,m]of o.entries())s.append(f,m);else if(Array.isArray(o))for(const f of o){if(!Array.isArray(f)||f.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");s.append(String(f[0]),String(f[1]))}else if(yn(o))for(const[f,m]of Object.entries(o))m!==void 0&&s.append(f,String(m));else{const f=new URLSearchParams(o);for(const[m,_]of f.entries())s.append(m,_)}return s},Ws=(...i)=>{let u={},s={},o={},f;const m=[];for(const _ of i)if(Array.isArray(_))Array.isArray(u)||(u=[]),u=[...u,..._];else if(yn(_)){for(let[b,y]of Object.entries(_)){if(b==="signal"&&y instanceof globalThis.AbortSignal){m.push(y);continue}if(b==="context"){if(y!=null&&(!yn(y)||Array.isArray(y)))throw new TypeError("The `context` option must be an object");u={...u,context:y==null?{}:{...u.context,...y}};continue}if(b==="searchParams"){y==null?f=void 0:f=f===void 0?y:Yb(f,y);continue}yn(y)&&b in u&&(y=Ws(u[b],y)),u={...u,[b]:y}}yn(_.hooks)&&(o=yp(o,_.hooks),u.hooks=o),yn(_.headers)&&(s=gp(s,_.headers),u.headers=s)}return f!==void 0&&(u.searchParams=f),m.length>0&&(m.length===1?u.signal=m[0]:dp?u.signal=AbortSignal.any(m):u.signal=m.at(-1)),u},Gb=i=>mp.includes(i)?i.toUpperCase():i,Vb=["get","put","head","delete","options","trace"],Xb=[408,413,429,500,502,503,504],Qb=[413,429,503],kh={limit:2,methods:Vb,statusCodes:Xb,afterStatusCodes:Qb,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:i=>.3*2**(i-1)*1e3,jitter:void 0,retryOnTimeout:!1},Zb=(i={})=>{if(typeof i=="number")return{...kh,limit:i};if(i.methods&&!Array.isArray(i.methods))throw new Error("retry.methods must be an array");if(i.methods&&(i.methods=i.methods.map(s=>s.toLowerCase())),i.statusCodes&&!Array.isArray(i.statusCodes))throw new Error("retry.statusCodes must be an array");const u=Object.fromEntries(Object.entries(i).filter(([,s])=>s!==void 0));return{...kh,...u}};class Ms extends Error{constructor(s){super(`Request timed out: ${s.method} ${s.url}`);Ve(this,"request");this.name="TimeoutError",this.request=s}}async function Kb(i,u,s,o){return new Promise((f,m)=>{const _=setTimeout(()=>{s&&s.abort(),m(new Ms(i))},o.timeout);o.fetch(i,u).then(f).catch(m).then(()=>{clearTimeout(_)})})}async function Jb(i,{signal:u}){return new Promise((s,o)=>{u&&(u.throwIfAborted(),u.addEventListener("abort",f,{once:!0}));function f(){clearTimeout(m),o(u.reason)}const m=setTimeout(()=>{u==null||u.removeEventListener("abort",f),s()},i)})}const $b=(i,u)=>{const s={};for(const o in u)Object.hasOwn(u,o)&&!(o in qb)&&!(o in Mb)&&(!(o in i)||o in Ub)&&(s[o]=u[o]);return s},Wb=i=>i===void 0?!1:Array.isArray(i)?i.length>0:i instanceof URLSearchParams?i.size>0:typeof i=="object"?Object.keys(i).length>0:typeof i=="string"?i.trim().length>0:!!i;function Fb(i){return i instanceof Ns||(i==null?void 0:i.name)===Ns.name}function Ib(i){return i instanceof Ms||(i==null?void 0:i.name)===Ms.name}var Kr,vp,Jt,Bt,rt,Q,$a,ea,vn,oe,Yr,bp,Us,Gr,Ja,qs,xp,ii,Vr,Ls;const ri=class ri{constructor(u,s={}){Pt(this,oe);Ve(this,"request");Pt(this,Jt);Pt(this,Bt,0);Pt(this,rt);Pt(this,Q);Pt(this,$a);Pt(this,ea);Pt(this,vn);var f,m,_;if(Kt(this,rt,u),Kt(this,Q,{...s,headers:gp(q(this,rt).headers,s.headers),hooks:yp({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},s.hooks),method:Gb(s.method??q(this,rt).method??"GET"),prefixUrl:String(s.prefixUrl||""),retry:Zb(s.retry),throwHttpErrors:s.throwHttpErrors??!0,timeout:s.timeout??1e4,fetch:s.fetch??globalThis.fetch.bind(globalThis),context:s.context??{}}),typeof q(this,rt)!="string"&&!(q(this,rt)instanceof URL||q(this,rt)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(q(this,Q).prefixUrl&&typeof q(this,rt)=="string"){if(q(this,rt).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");q(this,Q).prefixUrl.endsWith("/")||(q(this,Q).prefixUrl+="/"),Kt(this,rt,q(this,Q).prefixUrl+q(this,rt))}Ab&&dp&&(Kt(this,ea,q(this,Q).signal??q(this,rt).signal),Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal),Sh&&(q(this,Q).duplex="half"),q(this,Q).json!==void 0&&(q(this,Q).body=((m=(f=q(this,Q)).stringifyJson)==null?void 0:m.call(f,q(this,Q).json))??JSON.stringify(q(this,Q).json),q(this,Q).headers.set("content-type",q(this,Q).headers.get("content-type")??"application/json"));const o=s.headers&&new globalThis.Headers(s.headers).has("content-type");if(q(this,rt)instanceof globalThis.Request&&(Ob&&q(this,Q).body instanceof globalThis.FormData||q(this,Q).body instanceof URLSearchParams)&&!o&&q(this,Q).headers.delete("content-type"),this.request=new globalThis.Request(q(this,rt),q(this,Q)),Wb(q(this,Q).searchParams)){const y="?"+(typeof q(this,Q).searchParams=="string"?q(this,Q).searchParams.replace(/^\?/,""):new URLSearchParams(ke(_=ri,Kr,vp).call(_,q(this,Q).searchParams)).toString()),p=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,y);this.request=new globalThis.Request(p,q(this,Q))}if(q(this,Q).onUploadProgress){if(typeof q(this,Q).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Sh)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=ke(this,oe,Ls).call(this,this.request,q(this,Q).body??void 0)}}static create(u,s){var _,b,y;const o=new ri(u,s),f=async()=>{var w,k,N,Y,L,H,B,U,K,X,ue,ce;if(typeof q(o,Q).timeout=="number"&&q(o,Q).timeout>As)throw new RangeError(`The \`timeout\` option cannot be greater than ${As}`);await Promise.resolve();let p=await ke(w=o,oe,xp).call(w);for(const _e of q(o,Q).hooks.afterResponse){const F=ke(k=o,oe,Us).call(k,p.clone());let W;try{W=await _e(o.request,ke(N=o,oe,ii).call(N),F,{retryCount:q(o,Bt)})}catch(Pe){throw ke(Y=o,oe,Ja).call(Y,F),ke(L=o,oe,Ja).call(L,p),Pe}if(W instanceof pp)throw ke(H=o,oe,Ja).call(H,F),ke(B=o,oe,Ja).call(B,p),new Rs(W.options);const se=W instanceof globalThis.Response?W:p;F!==se&&ke(U=o,oe,Ja).call(U,F),p!==se&&ke(K=o,oe,Ja).call(K,p),p=se}if(ke(X=o,oe,Us).call(X,p),!p.ok&&(typeof q(o,Q).throwHttpErrors=="function"?q(o,Q).throwHttpErrors(p.status):q(o,Q).throwHttpErrors)){let _e=new Ns(p,o.request,ke(ue=o,oe,ii).call(ue));for(const F of q(o,Q).hooks.beforeError)_e=await F(_e,{retryCount:q(o,Bt)});throw _e}if(q(o,Q).onDownloadProgress){if(typeof q(o,Q).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!zb)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const _e=p.clone();return ke(ce=o,oe,Ja).call(ce,p),Hb(_e,q(o,Q).onDownloadProgress)}return p},m=ke(_=o,oe,qs).call(_,f).finally(()=>{var w,k;const p=q(o,$a);ke(w=o,oe,Gr).call(w,(p==null?void 0:p.body)??void 0),ke(k=o,oe,Gr).call(k,o.request.body??void 0)});for(const[p,w]of Object.entries(Cb))p==="bytes"&&typeof((y=(b=globalThis.Response)==null?void 0:b.prototype)==null?void 0:y.bytes)!="function"||(m[p]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||w);const k=await m;if(p==="json"){if(k.status===204)return"";const N=await k.text();return N===""?"":s.parseJson?s.parseJson(N):JSON.parse(N)}return k[p]()});return m}};Kr=new WeakSet,vp=function(u){return u&&typeof u=="object"&&!Array.isArray(u)&&!(u instanceof URLSearchParams)?Object.fromEntries(Object.entries(u).filter(([,s])=>s!==void 0)):u},Jt=new WeakMap,Bt=new WeakMap,rt=new WeakMap,Q=new WeakMap,$a=new WeakMap,ea=new WeakMap,vn=new WeakMap,oe=new WeakSet,Yr=function(){const u=q(this,Q).retry.delay(q(this,Bt));let s=u;q(this,Q).retry.jitter===!0?s=Math.random()*u:typeof q(this,Q).retry.jitter=="function"&&(s=q(this,Q).retry.jitter(u),(!Number.isFinite(s)||s<0)&&(s=u));const o=q(this,Q).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(o,s)},bp=async function(u){if(eh(this,Bt)._++,q(this,Bt)>q(this,Q).retry.limit)throw u;const s=u instanceof Error?u:new fp(u);if(s instanceof Rs)return s.customDelay??ke(this,oe,Yr).call(this);if(!q(this,Q).retry.methods.includes(this.request.method.toLowerCase()))throw u;if(q(this,Q).retry.shouldRetry!==void 0){const o=await q(this,Q).retry.shouldRetry({error:s,retryCount:q(this,Bt)});if(o===!1)throw u;if(o===!0)return ke(this,oe,Yr).call(this)}if(Ib(u)&&!q(this,Q).retry.retryOnTimeout)throw u;if(Fb(u)){if(!q(this,Q).retry.statusCodes.includes(u.response.status))throw u;const o=u.response.headers.get("Retry-After")??u.response.headers.get("RateLimit-Reset")??u.response.headers.get("X-RateLimit-Retry-After")??u.response.headers.get("X-RateLimit-Reset")??u.response.headers.get("X-Rate-Limit-Reset");if(o&&q(this,Q).retry.afterStatusCodes.includes(u.response.status)){let f=Number(o)*1e3;Number.isNaN(f)?f=Date.parse(o)-Date.now():f>=Date.parse("2024-01-01")&&(f-=Date.now());const m=q(this,Q).retry.maxRetryAfter??f;return f<m?f:m}if(u.response.status===413)throw u}return ke(this,oe,Yr).call(this)},Us=function(u){return q(this,Q).parseJson&&(u.json=async()=>q(this,Q).parseJson(await u.text())),u},Gr=function(u){u&&u.cancel().catch(()=>{})},Ja=function(u){ke(this,oe,Gr).call(this,u.body??void 0)},qs=async function(u){try{return await u()}catch(s){const o=Math.min(await ke(this,oe,bp).call(this,s),As);if(q(this,Bt)<1)throw s;if(await Jb(o,q(this,ea)?{signal:q(this,ea)}:{}),s instanceof Rs&&s.customRequest){const f=q(this,Q).signal?new globalThis.Request(s.customRequest,{signal:q(this,Q).signal}):new globalThis.Request(s.customRequest);ke(this,oe,Vr).call(this,f)}for(const f of q(this,Q).hooks.beforeRetry){const m=await f({request:this.request,options:ke(this,oe,ii).call(this),error:s,retryCount:q(this,Bt)});if(m instanceof globalThis.Request){ke(this,oe,Vr).call(this,m);break}if(m instanceof globalThis.Response)return m;if(m===hp)return}return ke(this,oe,qs).call(this,u)}},xp=async function(){var s;(s=q(this,Jt))!=null&&s.signal.aborted&&(Kt(this,Jt,new globalThis.AbortController),q(this,Q).signal=q(this,ea)?AbortSignal.any([q(this,ea),q(this,Jt).signal]):q(this,Jt).signal,this.request=new globalThis.Request(this.request,{signal:q(this,Q).signal}));for(const o of q(this,Q).hooks.beforeRequest){const f=await o(this.request,ke(this,oe,ii).call(this),{retryCount:q(this,Bt)});if(f instanceof Response)return f;if(f instanceof globalThis.Request){ke(this,oe,Vr).call(this,f);break}}const u=$b(this.request,q(this,Q));return Kt(this,$a,this.request),this.request=q(this,$a).clone(),q(this,Q).timeout===!1?q(this,Q).fetch(q(this,$a),u):Kb(q(this,$a),u,q(this,Jt),q(this,Q))},ii=function(){if(!q(this,vn)){const{hooks:u,...s}=q(this,Q);Kt(this,vn,Object.freeze(s))}return q(this,vn)},Vr=function(u){Kt(this,vn,void 0),this.request=ke(this,oe,Ls).call(this,u)},Ls=function(u,s){return!q(this,Q).onUploadProgress||!u.body?u:Bb(u,q(this,Q).onUploadProgress,s??q(this,Q).body??void 0)},Pt(ri,Kr);let Zr=ri;/*! MIT License © Sindre Sorhus */const Hs=i=>{const u=(s,o)=>Zr.create(s,Dr(i,o));for(const s of mp)u[s]=(o,f)=>Zr.create(o,Dr(i,f,{method:s}));return u.create=s=>Hs(Dr(s)),u.extend=s=>(typeof s=="function"&&(s=s(i??{})),Hs(Dr(i,s))),u.stop=hp,u.retry=Nb,u},Eh=Hs();let Mr=null;const Xr=Eh.create({prefixUrl:"/api",timeout:3e4,hooks:{beforeRequest:[i=>{const u=xa.getState().accessToken;u&&i.headers.set("Authorization",`Bearer ${u}`)}],afterResponse:[async(i,u,s)=>{if(s.status===401&&!i.headers.has("X-Retry-After-Refresh")){Mr||(Mr=xa.getState().refresh().finally(()=>{Mr=null}));try{await Mr}catch{throw s}const o=xa.getState().accessToken;return o&&i.headers.set("Authorization",`Bearer ${o}`),i.headers.set("X-Retry-After-Refresh","1"),Eh(i,u)}}]}}),Pb=3e4;function e0(i){if(i.link)return i.link;const u=(i.title+" "+i.body).match(/task\s*#?(\d+)/i);if(u)return`/tasks/${u[1]}`;const s=(i.title+" "+i.body).match(/worker\s+(\S+)/i);return s?`/workers/${s[1]}`:null}function Sp(){const i=Fa(),[u,s]=g.useState([]),[o,f]=g.useState(0),[m,_]=g.useState(!1),[b,y]=g.useState(!1),p=g.useRef(null),{t:w}=Vt(),k=g.useRef(async()=>{try{y(!0);const H=(await Xr.get("web/notifications",{searchParams:{limit:"20"}}).json()).data,B=H.filter(U=>!U.isRead).length;s(U=>U.length===H.length&&U.every((K,X)=>K.id===H[X].id&&K.isRead===H[X].isRead)?U:H),f(U=>U===B?U:B)}catch{}finally{y(!1)}});g.useEffect(()=>{k.current();const L=setInterval(()=>k.current(),Pb);return()=>clearInterval(L)},[]),g.useEffect(()=>{function L(H){p.current&&!p.current.contains(H.target)&&_(!1)}return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[]);async function N(L){try{await Xr.post(`web/notifications/${L}/read`),s(H=>H.map(B=>B.id===L?{...B,isRead:!0}:B)),f(H=>Math.max(0,H-1))}catch{}}async function Y(){try{await Xr.post("web/notifications/read-all"),s(L=>L.map(H=>({...H,isRead:!0}))),f(0)}catch{}}return h.jsxs("div",{className:"relative",ref:p,children:[h.jsxs("button",{type:"button",onClick:()=>_(L=>!L),"aria-label":w("common.notifications"),className:"relative inline-flex items-center justify-center rounded-[4px] p-2 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)] hover:text-[var(--text-primary)]",children:[h.jsx($v,{size:16}),o>0&&h.jsx("span",{className:"absolute right-0 top-0 flex h-3 min-w-3 items-center justify-center rounded-full bg-[var(--destructive)] px-0.5 text-[8px] font-semibold leading-none text-white",children:o})]}),m&&h.jsxs("div",{className:"absolute right-0 top-full z-50 mt-2 w-[min(320px,calc(100vw-2rem))] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm font-semibold",children:w("common.notifications")}),o>0&&h.jsxs("button",{type:"button",onClick:Y,"aria-label":w("common.mark_all_read"),className:"inline-flex items-center gap-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(Wv,{className:"h-3.5 w-3.5"}),w("common.mark_all_read")]})]}),h.jsx("div",{className:"max-h-80 overflow-y-auto",children:b&&u.length===0?h.jsx("div",{className:"flex justify-center py-8",children:h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):u.length===0?h.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[h.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),h.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:w("common.no_notifications")})]}):u.map(L=>{const H=e0(L);return h.jsxs("div",{className:`flex items-start gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 transition-colors ${H?"cursor-pointer hover:bg-[var(--bg-input)]":""} ${L.isRead?"opacity-60":"bg-[var(--accent)]/5"}`,onClick:()=>{H&&(L.isRead||N(L.id),_(!1),i(H))},children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm font-medium",title:L.title,children:L.title}),h.jsx("p",{className:"truncate text-xs text-[var(--text-secondary)]",title:L.body,children:L.body}),h.jsx("p",{className:"mt-1 text-xs text-[var(--text-secondary)] opacity-60",children:new Date(L.createdAt).toLocaleString()})]}),!L.isRead&&h.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),N(L.id)},"aria-label":w("common.mark_as_read"),className:"shrink-0 rounded-[4px] p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:h.jsx(Fv,{className:"h-3.5 w-3.5"})})]},L.id)})})]})]})}function t0(i){return i&&i.trim().length>0?i:null}function kp(i,u=50){return t0(i.name)??Wh(i.description,u)}function a0(i){return i.description}function Ep(i){return`#${i.id} ${a0(i)}`}function V1(i,u=100){return{text:`#${i.id} ${kp(i,u)}`,title:Ep(i)}}function n0(i){return{tasks:i.tasks.map(u=>({type:"task",id:u.id,title:`#${u.id} ${kp(u)}`,subtitle:`${u.status} · ${u.project_key}`,hoverTitle:Ep(u)})),workers:(i.workers??[]).map(u=>({type:"worker",id:u.id,title:u.name,subtitle:`${u.hostname} · ${u.status}`})),projects:i.projects.map(u=>({type:"project",id:u.key,title:u.name,subtitle:u.repository}))}}const l0=300,wh={tasks:pb,workers:ap,projects:nb},i0={tasks:"tasks",workers:"workers",projects:"projects"};function wp({renderTrigger:i}={}){const[u,s]=g.useState(""),[o,f]=g.useState({tasks:[],workers:[],projects:[]}),[m,_]=g.useState(!1),[b,y]=g.useState(!1),[p,w]=g.useState(0),k=g.useRef(null),N=g.useRef(null),Y=g.useRef(void 0),L=g.useRef(void 0),H=Fa(),{t:B}=Vt(),U=g.useMemo(()=>[...o.tasks,...o.workers,...o.projects],[o]),K=g.useCallback(async W=>{var Pe;if(!W.trim()){f({tasks:[],workers:[],projects:[]});return}(Pe=L.current)==null||Pe.abort();const se=new AbortController;L.current=se;try{_(!0);const Je=await Xr.get("web/search",{searchParams:{q:W},signal:se.signal}).json();f(n0(Je)),w(0)}catch(Je){if(Je instanceof DOMException&&Je.name==="AbortError")return}finally{se.signal.aborted||_(!1)}},[]);g.useEffect(()=>(Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>K(u),l0),()=>{Y.current&&clearTimeout(Y.current)}),[u,K]),g.useEffect(()=>{function W(se){se.key==="/"&&!b&&!(se.target instanceof HTMLInputElement||se.target instanceof HTMLTextAreaElement)&&(se.preventDefault(),y(!0)),se.key==="Escape"&&b&&(se.preventDefault(),X())}return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[b]),g.useEffect(()=>{b&&setTimeout(()=>{var W;return(W=N.current)==null?void 0:W.focus()},50)},[b]);function X(){y(!1),s(""),f({tasks:[],workers:[],projects:[]}),w(0)}function ue(W){switch(X(),W.type){case"task":H(`/tasks/${W.id}`);break;case"worker":H(`/workers/${W.id}`);break;case"project":H(`/projects/${W.id}`);break}}function ce(W){W.key==="ArrowDown"?(W.preventDefault(),w(se=>Math.min(se+1,U.length-1))):W.key==="ArrowUp"?(W.preventDefault(),w(se=>Math.max(se-1,0))):W.key==="Enter"&&U[p]&&(W.preventDefault(),ue(U[p]))}const _e=U.length>0;let F=0;return h.jsxs(h.Fragment,{children:[i?i(()=>y(!0)):h.jsxs("button",{type:"button",onClick:()=>y(!0),className:"flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-1.5 text-xs text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:[h.jsx(tp,{className:"h-3.5 w-3.5"}),h.jsx("span",{children:B("common.search_placeholder")}),h.jsx("kbd",{className:"ml-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-1.5 py-0.5 text-[11px] text-[var(--text-muted)]",children:"/"})]}),b&&h.jsx("div",{ref:k,className:"fixed inset-0 z-[100] flex items-start justify-center pt-[calc(var(--safe-area-top,0px)+16px)] md:pt-[15vh]",style:{backgroundColor:"rgba(0, 0, 0, 0.6)"},onClick:W=>{W.target===k.current&&X()},children:h.jsxs("div",{className:"mx-3 w-full max-w-[640px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-2xl sm:mx-4 md:mx-0",children:[h.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-4 py-3",children:[h.jsx("span",{className:"text-sm text-[var(--accent)]",children:"/"}),h.jsx("input",{ref:N,type:"text",placeholder:B("common.search_input_placeholder"),value:u,onChange:W=>s(W.target.value),onKeyDown:ce,className:"flex-1 bg-transparent text-sm text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none"}),m&&h.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})]}),h.jsx("div",{className:"max-h-[50vh] overflow-y-auto sm:max-h-[60vh] md:max-h-[400px]",children:u.trim()&&!_e&&!m?h.jsx("div",{className:"py-10 text-center text-xs text-[var(--text-muted)]",children:B("common.no_search_results",{query:u})}):Object.keys(wh).map(W=>{const se=o[W];if(se.length===0)return null;const Pe=wh[W],Je=F;return F+=se.length,h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-[var(--text-muted)]",children:[h.jsx(Pe,{className:"h-3 w-3"}),h.jsx("span",{className:"text-[11px] lowercase tracking-wider",children:i0[W]})]}),se.map((Ce,At)=>{const ut=Je+At,Me=ut===p;return h.jsxs("button",{type:"button",className:`flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors ${Me?"bg-[var(--accent)]/10 text-[var(--accent)]":"hover:bg-[var(--bg-input)]"}`,onClick:()=>ue(Ce),onMouseEnter:()=>w(ut),children:[h.jsx("span",{className:`text-xs ${Me?"text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:Me?">":" "}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm",title:Ce.hoverTitle??Ce.title,children:Ce.title}),Ce.subtitle&&h.jsx("p",{className:"truncate text-xs text-[var(--text-muted)]",title:Ce.subtitle,children:Ce.subtitle})]})]},`${Ce.type}-${Ce.id}`)})]},W)})}),h.jsxs("div",{className:"hidden items-center gap-4 border-t border-[var(--border)] px-4 py-2 md:flex",children:[h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↑↓"})," ",B("common.navigate_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"↵"})," ",B("common.select_hint")]}),h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--text-muted)]",children:[h.jsx("kbd",{className:"rounded-[4px] border border-[var(--border)] px-1",children:"esc"})," ",B("common.close_hint")]})]})]})})]})}const r0={danger:"var(--destructive)",warning:"var(--warning)",accent:"var(--accent)"};function Th(i){return Array.from(i.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function u0({isOpen:i,onClose:u,onConfirm:s,title:o,message:f,confirmLabel:m,cancelLabel:_,confirmVariant:b="danger",isLoading:y,children:p}){const{t:w}=Vt(),k=g.useId(),N=m??w("common.confirm"),Y=_??w("common.cancel"),L=g.useRef(null),H=g.useRef(null),B=r0[b];g.useEffect(()=>{if(!i)return;H.current=document.activeElement;const K=requestAnimationFrame(()=>{if(L.current){const X=Th(L.current);X.length>0&&X[0].focus()}});return()=>{var X;cancelAnimationFrame(K),(X=H.current)==null||X.focus()}},[i]);const U=g.useCallback(K=>{if(K.key==="Escape"){u();return}if(K.key==="Tab"&&L.current){const X=Th(L.current);if(X.length===0)return;const ue=X[0],ce=X[X.length-1];K.shiftKey?document.activeElement===ue&&(K.preventDefault(),ce.focus()):document.activeElement===ce&&(K.preventDefault(),ue.focus())}},[u]);return i?h.jsx("div",{onClick:u,style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"max(1rem, 10vh)",paddingLeft:"1rem",paddingRight:"1rem",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:h.jsxs("div",{ref:L,role:"dialog","aria-modal":"true","aria-labelledby":k,onClick:K=>K.stopPropagation(),onKeyDown:U,style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem"},children:[h.jsx("div",{style:{marginBottom:"1.25rem"},children:h.jsxs("div",{id:k,style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:[h.jsx(np,{style:{width:"1rem",height:"1rem"}}),o]})}),h.jsxs("div",{style:{marginBottom:"1.25rem"},children:[h.jsx("p",{style:{color:"var(--text-muted)",fontSize:"0.75rem",lineHeight:"1.5"},children:f}),p]}),h.jsxs("div",{style:{display:"flex",gap:"0.75rem"},children:[h.jsx("button",{type:"button",onClick:u,disabled:y,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",cursor:y?"not-allowed":"pointer",opacity:y?.7:1,transition:"color 0.15s, border-color 0.15s"},children:Y}),h.jsx("button",{type:"button",onClick:s,disabled:y,style:{flex:1,padding:"0.5rem",backgroundColor:B,color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,cursor:y?"not-allowed":"pointer",opacity:y?.7:1},children:y?w("common.processing"):N})]})]})}):null}const jh="overlord-pwa-install-dismissed";function o0(){const i=navigator.userAgent;return/iP(hone|od|ad)/.test(i)&&/WebKit/.test(i)&&!/(CriOS|FxiOS|OPiOS|mercury)/.test(i)}function s0(){return navigator.standalone===!0||window.matchMedia("(display-mode: standalone)").matches}function c0(){const{t:i}=Vt(),[u,s]=g.useState("hidden"),[o,f]=g.useState(!1),m=g.useRef(null),_=g.useRef(void 0);g.useEffect(()=>{if(s0()||localStorage.getItem(jh)||window.innerWidth>=768)return;const p=k=>{k.preventDefault(),m.current=k};window.addEventListener("beforeinstallprompt",p);const w=setTimeout(()=>s("visible"),1e3);return()=>{window.removeEventListener("beforeinstallprompt",p),clearTimeout(w),clearTimeout(_.current)}},[]);function b(){localStorage.setItem(jh,"1"),s("dismissing"),_.current=setTimeout(()=>s("hidden"),200)}async function y(){if(m.current){await m.current.prompt();const{outcome:p}=await m.current.userChoice;p==="accepted"&&b(),m.current=null}else o0()&&f(!0)}return u==="hidden"?null:h.jsx("div",{className:`fixed bottom-4 left-4 right-4 z-40 md:hidden ${u==="dismissing"?"animate-slide-down":"animate-slide-up"}`,role:"dialog","aria-label":i("pwa_install.title"),children:h.jsxs("div",{className:"overflow-hidden rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--accent)]/20 bg-[var(--accent)]/[0.06] px-3 py-1.5",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"}),h.jsx("span",{className:"text-[9px] font-medium text-[var(--accent)]",children:i("pwa_install.title")})]}),h.jsx("button",{onClick:b,className:"p-1 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:h.jsx(lp,{size:14})})]}),h.jsx("div",{className:"px-3.5 py-3",children:o?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.ios_command")]}),h.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:[i("pwa_install.ios_step_1"),i("pwa_install.ios_step_2"),i("pwa_install.ios_step_3")].map((p,w)=>h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] bg-[var(--accent)]/[0.08]",children:h.jsx("span",{className:"text-xs font-semibold text-[var(--accent)]",children:w+1})}),h.jsxs("span",{className:"text-[10px] leading-snug text-[var(--text-secondary)]",children:[w===0&&h.jsx(db,{size:12,className:"mr-1 inline-block align-text-bottom text-[var(--text-muted)]"}),p]})]},w))})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:[h.jsx("span",{className:"text-[var(--accent)]",children:"$"})," ",i("pwa_install.command")]}),h.jsxs("div",{className:"mt-1.5 text-[10px] leading-relaxed text-[var(--text-secondary)]",children:["→ ",i("pwa_install.desc_1"),h.jsx("br",{}),"→ ",i("pwa_install.desc_2")]}),h.jsxs("div",{className:"mt-2.5 flex gap-2",children:[h.jsx("button",{onClick:y,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_install.install")}),h.jsx("button",{onClick:b,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[10px] text-[var(--text-muted)] transition-colors hover:border-[var(--text-muted)]",children:i("pwa_install.skip")})]})]})})]})})}function f0(){const{t:i}=Vt(),[u,s]=g.useState(!1);return g.useEffect(()=>{if(!("serviceWorker"in navigator))return;let o=!1,f=null,m=null,_=null,b=null;function y(){o||s(!0)}navigator.serviceWorker.addEventListener("controllerchange",y);function p(k){if(f=k,k.waiting){s(!0);return}_=()=>{const N=k.installing;N&&(m=N,b=()=>{N.state==="installed"&&navigator.serviceWorker.controller&&(o||s(!0))},N.addEventListener("statechange",b))},k.addEventListener("updatefound",_)}navigator.serviceWorker.getRegistration().then(k=>{k&&!o&&p(k)});const w=setInterval(()=>{navigator.serviceWorker.getRegistration().then(k=>{!k||o||(k.update().catch(()=>{}),k.waiting&&s(!0))})},3e4);return()=>{o=!0,clearInterval(w),navigator.serviceWorker.removeEventListener("controllerchange",y),f&&_&&f.removeEventListener("updatefound",_),m&&b&&m.removeEventListener("statechange",b)}},[]),u?h.jsx("div",{className:"animate-slide-up fixed bottom-20 left-4 right-4 z-50 md:bottom-4 md:left-auto md:right-4 md:w-80",children:h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] border border-[var(--accent)]/40 bg-[var(--bg-card)] px-3.5 py-3 shadow-[0_8px_32px_rgba(0,0,0,0.2)]",children:[h.jsx(ep,{size:14,className:"shrink-0 text-[var(--accent)]"}),h.jsx("span",{className:"flex-1 text-[10px] text-[var(--text-secondary)]",children:i("pwa_update.message")}),h.jsx("button",{onClick:()=>window.location.reload(),className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-1 text-[10px] font-semibold text-black transition-all hover:brightness-110",children:i("pwa_update.reload")})]})}):null}const Ur=64,d0=96,Rh=32;function m0({children:i,className:u}){const s=g.useRef(null),o=g.useRef(0),f=g.useRef("idle"),[m,_]=g.useState(0),[b,y]=g.useState("idle"),p=g.useCallback(U=>{f.current=U,y(U)},[]),w=g.useCallback(()=>{const U=s.current;return U?U.scrollTop<=0:!0},[]),k=g.useCallback(U=>{if(!w()){o.current=0;return}o.current=U.touches[0].clientY},[w]),N=g.useCallback(U=>{if(f.current==="refreshing"||o.current===0)return;const X=U.touches[0].clientY-o.current;if(X<=0){f.current!=="idle"&&(_(0),p("idle"));return}if(!w())return;U.preventDefault();const ue=Math.min(X*.5,d0);_(ue),p(ue>=Ur?"ready":"pulling")},[w,p]),Y=g.useCallback(()=>{f.current!=="refreshing"&&(f.current==="ready"?(p("refreshing"),_(Ur),setTimeout(()=>{window.location.reload()},300)):(_(0),p("idle")),o.current=0)},[p]);g.useEffect(()=>{const U=s.current;if(U)return U.addEventListener("touchstart",k,{passive:!0}),U.addEventListener("touchmove",N,{passive:!1}),U.addEventListener("touchend",Y,{passive:!0}),()=>{U.removeEventListener("touchstart",k),U.removeEventListener("touchmove",N),U.removeEventListener("touchend",Y)}},[k,N,Y]);const L=Math.min(m/Ur,1),H=b==="refreshing"?0:m/Ur*180,B=m>0||b==="refreshing";return h.jsxs("div",{ref:s,className:u,style:{overscrollBehaviorY:"contain"},children:[B&&h.jsx("div",{className:"pointer-events-none flex items-center justify-center md:hidden",style:{height:m,transition:b==="idle"?"height 200ms ease-out":void 0},children:h.jsx("div",{className:"flex items-center justify-center rounded-full bg-[var(--bg-card)] border border-[var(--border)]",style:{width:Rh,height:Rh,opacity:L,transition:b==="idle"?"opacity 200ms ease-out":void 0},children:b==="refreshing"?h.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",className:"animate-spin",style:{color:"var(--accent)"},children:[h.jsx("circle",{cx:"8",cy:"8",r:"6",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),h.jsx("path",{d:"M8 2a6 6 0 0 1 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):h.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",style:{color:b==="ready"?"var(--accent)":"var(--text-muted)",transform:`rotate(${H}deg)`,transition:"color 150ms"},children:h.jsx("path",{d:"M8 3v8M5 8l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),i]})}const Tp=g.createContext({setActions:()=>{}});function X1(i){const{setActions:u}=g.useContext(Tp);g.useEffect(()=>(u(i),()=>u(null)),[i,u])}const jp=g.createContext({setSubtitle:()=>{}});function Q1(i){const{setSubtitle:u}=g.useContext(jp),s=typeof i=="string"?i:(i==null?void 0:i.text)??null,o=typeof i=="string"?i:(i==null?void 0:i.title)??(i==null?void 0:i.text)??null;g.useEffect(()=>s?(u(o&&o!==s?{text:s,title:o}:s),()=>u(null)):(u(null),()=>u(null)),[s,o,u])}const h0=[{to:"/home",label:"terminal",icon:$s},{to:"/tasks",label:"tasks",icon:Ph},{to:"/dashboard",label:"dashboard",icon:Ih},{to:"/workers",label:"workers",icon:ap},{to:"/projects",label:"projects",icon:lb},{to:"/access-tokens",label:"tokens",icon:rb}],p0=[{to:"/docs/cli",label:"cli",icon:$s},{to:"/docs/api",label:"api",icon:ab},{to:"/docs/bot",label:"bot",icon:cb},{to:"/docs/skill",label:"skill",icon:hb},{to:"/docs/all",label:"all",icon:ub}],_0=[{to:"/admin",label:"admin",icon:mb}],g0=[{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 y0(i){const{t:u}=Vt();if(qr[i]){const o=qr[i];return{title:u(o.title),subtitle:u(o.subtitle)}}const s="/"+i.split("/").filter(Boolean)[0];if(qr[s]){const o=qr[s],f=i.split("/").filter(Boolean).slice(1).join(" / ");return{title:u(o.title),subtitle:f||u(o.subtitle)}}return{title:i.slice(1).replace(/\//g," // ")||"home"}}function v0(i,u){return i==="/home"?u==="/home":i==="/dashboard"?u==="/dashboard":u.startsWith(i)}function b0(){const i=gt(),{t:u}=Vt(),s={terminal:u("terminal_home.title"),dashboard:u("dashboard.title"),tasks:u("tasks.title"),workers:u("workers.title")};return h.jsxs("nav",{className:"flex items-center justify-around border-t border-[var(--border)] bg-[var(--bg-card)]",style:{height:48,paddingTop:4},children:[g0.map(({to:o,label:f,icon:m})=>{const _=v0(o,i.pathname);return h.jsxs(Js,{to:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(m,{size:18,className:_?"text-[var(--accent)]":"text-[var(--text-muted)]"}),h.jsx("span",{className:`text-[11px] lowercase ${_?"font-bold text-[var(--accent)]":"text-[var(--text-muted)]"}`,children:s[f]??f})]},o)}),h.jsx(wp,{renderTrigger:o=>h.jsxs("button",{type:"button",onClick:o,className:"flex flex-1 flex-col items-center gap-1",children:[h.jsx(tp,{size:18,className:"text-[var(--text-muted)]"}),h.jsx("span",{className:"text-[11px] lowercase text-[var(--text-muted)]",children:u("common.search_placeholder")})]})})]})}function x0(){const i=Fa(),{t:u}=Vt();return h.jsxs("header",{className:"flex items-center justify-between border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:hidden",style:{height:"calc(56px + env(safe-area-inset-top, 0px))",minHeight:"calc(56px + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)"},children:[h.jsxs("button",{onClick:()=>i("/home"),className:"flex items-center gap-2",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-[4px] bg-[var(--accent)]",children:h.jsx("span",{className:"text-sm font-semibold",style:{color:"#0C0C0C"},children:"~"})}),h.jsx("span",{className:"text-sm font-bold lowercase text-[var(--text-primary)]",children:u("common.overlord")})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("button",{onClick:()=>i("/profile"),className:"p-2 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]","aria-label":u("common.profile"),children:h.jsx(gb,{size:18})}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})}function zs({label:i,items:u,collapsed:s}){return h.jsxs("div",{className:"mt-4 first:mt-0",children:[!s&&h.jsx("div",{className:"mb-2 px-3 text-xs lowercase",style:{color:"var(--text-muted)"},children:i}),u.map(({to:o,label:f,icon:m})=>h.jsx(Js,{to:o,className:({isActive:_})=>`flex items-center text-sm lowercase transition-colors ${s?"justify-center py-3":"gap-2.5 px-3 py-1.5"} ${_?"text-[var(--accent)] bg-[var(--accent)]/5":"text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:({isActive:_})=>h.jsxs(h.Fragment,{children:[h.jsx(m,{size:14,style:{flexShrink:0}}),!s&&h.jsx("span",{children:_?`> ${f}`:` ${f}`})]})},o))]})}function S0(){const{user:i,logout:u}=xa(),s=Fa(),[o,f]=g.useState(!1),m=xb(),{t:_}=Vt(),{sidebarCollapsed:b,toggleSidebar:y}=kb();function p(){u(),s("/login")}return h.jsxs("aside",{className:"hidden md:flex flex-col border-r border-[var(--border)] transition-[width,min-width] duration-300 overflow-hidden",style:{width:b?56:240,minWidth:b?56:240,backgroundColor:"var(--bg-card)"},children:[h.jsx("div",{className:"flex items-center px-5",style:{height:48},children:h.jsxs("button",{onClick:()=>s("/home"),className:"flex items-center gap-2.5",style:{background:"none",border:"none",padding:0},children:[h.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-[4px] bg-[var(--accent)]",style:{flexShrink:0},children:h.jsx("span",{className:"text-lg font-semibold",style:{color:"#0C0C0C"},children:"~"})}),!b&&h.jsx("span",{className:"text-base font-bold lowercase tracking-tight",style:{color:"var(--text-primary)"},children:_("common.overlord")})]})}),h.jsxs("nav",{className:"flex-1 px-3 pt-2",children:[h.jsx(zs,{label:_("common.navigation"),items:h0,collapsed:b}),h.jsx(zs,{label:_("common.docs_section"),items:p0,collapsed:b}),m&&h.jsx(zs,{label:_("common.admin_section"),items:_0,collapsed:b})]}),h.jsx("div",{className:`px-3 py-1 ${b?"flex justify-center":""}`,children:h.jsx("button",{onClick:y,className:"flex items-center justify-center w-full py-1.5 rounded-[4px] text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)] hover:bg-[var(--accent)]/5","aria-label":b?"expand sidebar":"collapse sidebar",children:b?h.jsx(Pv,{size:14}):h.jsx(Iv,{size:14})})}),h.jsx("div",{className:"border-t border-[var(--border)] p-3",children:h.jsxs("div",{className:`flex items-center py-2 ${b?"justify-center":"gap-3 px-3"}`,children:[h.jsx("button",{onClick:()=>s("/profile"),className:"flex h-7 w-7 items-center justify-center text-xs font-bold text-black transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",borderRadius:4,flexShrink:0},title:_("common.profile"),children:((i==null?void 0:i.username)??"u")[0].toUpperCase()}),!b&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{onClick:()=>s("/profile"),className:"min-w-0 flex-1 text-left transition-colors hover:opacity-80",title:_("common.profile"),children:[h.jsx("div",{className:"truncate text-sm lowercase",style:{color:"var(--text-primary)"},children:(i==null?void 0:i.username)??"user"}),h.jsx("div",{className:"truncate text-xs lowercase",style:{color:"var(--text-muted)"},children:(i==null?void 0:i.role)??"user"})]}),h.jsx("button",{onClick:()=>f(!0),className:"p-1 text-[var(--text-secondary)] transition-colors hover:text-[var(--accent)]","aria-label":_("common.log_out"),children:h.jsx(sb,{size:14})})]})]})}),h.jsx(u0,{isOpen:o,onClose:()=>f(!1),onConfirm:p,title:_("common.logout_title"),message:_("common.logout_message"),confirmLabel:_("common.logout"),confirmVariant:"warning"})]})}function k0({headerActions:i,subtitleOverride:u}){const s=gt(),{title:o,subtitle:f}=y0(s.pathname),m=u??f,_=typeof m=="string"?m:m==null?void 0:m.text,b=typeof m=="string"?m:(m==null?void 0:m.title)??(m==null?void 0:m.text);return h.jsxs("header",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5",style:{height:48,minHeight:48,backgroundColor:"var(--bg-card)"},children:[h.jsxs("div",{className:"text-sm lowercase",children:[h.jsx("span",{style:{color:"var(--text-primary)"},children:o}),_&&h.jsxs("span",{style:{color:"var(--text-muted)"},title:b,children:[" ","// ",Wh(_,40)]})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[i,h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(wp,{}),h.jsx(Sp,{}),h.jsx(cp,{})]})]})]})}function E0(){const[i,u]=g.useState(null),[s,o]=g.useState(null),f=gt(),m=f.pathname==="/home",_=/^\/tasks\/\d+$/.test(f.pathname),b=f.pathname.startsWith("/docs");return g.useEffect(()=>up.getState().init(),[]),h.jsxs("div",{className:"fixed inset-x-0 top-0 flex w-full overflow-hidden font-mono md:flex-row",style:{height:"var(--app-height, 100dvh)",minHeight:"var(--app-height, 100dvh)"},children:[h.jsx(S0,{}),h.jsxs("div",{"data-testid":"app-main-column",className:"flex min-h-0 flex-1 flex-col overflow-hidden pb-[calc(48px+var(--safe-area-bottom,0px))] md:pb-0",children:[h.jsx(x0,{}),!b&&h.jsx(k0,{headerActions:i,subtitleOverride:s}),h.jsx(m0,{className:m||_?"min-h-0 flex-1 overflow-hidden bg-[var(--bg-primary)]":"min-h-0 flex-1 overflow-auto bg-[var(--bg-primary)] p-4 pb-6 md:p-6 md:pb-6",children:h.jsx(Tp.Provider,{value:{setActions:u},children:h.jsx(jp.Provider,{value:{setSubtitle:o},children:h.jsx(cv,{})})})}),h.jsx(c0,{}),h.jsx(f0,{}),h.jsx("div",{className:"safe-area-bottom-fill fixed inset-x-0 bottom-0 z-30 bg-[var(--bg-card)] md:hidden",children:h.jsx(b0,{})})]})]})}function Ah(i){var s;const u=(s=i.state)==null?void 0:s.from;return u?{from:u}:{from:{pathname:i.pathname,search:i.search}}}function li({children:i,requireAdmin:u=!1}){const{accessToken:s,user:o,requireTotpSetup:f,initializing:m}=xa(),_=gt();if(m)return h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})});if(!s)return h.jsx(ll,{to:"/login",state:Ah(_),replace:!0});if(f){const b=Ah(_);return _.pathname!=="/totp-setup"&&_.pathname!=="/bind"?h.jsx(ll,{to:"/totp-setup",state:b,replace:!0}):_.pathname==="/bind"?(sessionStorage.setItem("overlord_bind_redirect",JSON.stringify(b.from)),h.jsx(ll,{to:"/totp-setup",state:b,replace:!0})):h.jsx(h.Fragment,{children:i})}return u&&(o==null?void 0:o.role)!==ip.ADMIN?h.jsx(ll,{to:"/home",replace:!0}):h.jsx(h.Fragment,{children:i})}function w0({children:i}){const{theme:u,resolved:s,setResolved:o}=sp();return g.useEffect(()=>{if(u!=="system"){o(u);return}const f=window.matchMedia("(prefers-color-scheme: dark)");o(f.matches?"dark":"light");const m=_=>o(_.matches?"dark":"light");return f.addEventListener("change",m),()=>f.removeEventListener("change",m)},[u,o]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",s==="dark")},[s]),h.jsx(h.Fragment,{children:i})}class T0 extends g.Component{constructor(u){super(u),this.state={hasError:!1,error:null}}static getDerivedStateFromError(u){return{hasError:!0,error:u}}render(){var u;return this.state.hasError?h.jsxs("div",{className:"flex h-full min-h-[300px] flex-col items-center justify-center gap-4 p-8 font-mono",children:[h.jsx("span",{className:"text-lg font-bold text-[var(--destructive)]",children:Br("common.runtime_error")}),h.jsx("p",{className:"max-w-md text-center text-xs text-[var(--text-muted)]",children:((u=this.state.error)==null?void 0:u.message)||Br("common.an_unexpected_error_occurred")}),h.jsxs("button",{onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[h.jsx(ep,{className:"h-3.5 w-3.5"}),Br("common.reload")]})]}):this.props.children}}function j0({isOpen:i}){const u=Fa(),{logout:s,setSessionExpired:o}=xa(),{t:f}=Vt();function m(){s(),o(!1),u("/login")}return i?h.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[h.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),h.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:h.jsxs("div",{className:"flex flex-col items-center px-8 py-10",children:[h.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-full bg-[var(--warning)]/10",children:h.jsx(ob,{className:"h-7 w-7 text-[var(--warning)]"})}),h.jsx("h3",{className:"mb-2 text-base font-bold text-[var(--text-primary)]",children:f("auth.session_expired")}),h.jsx("p",{className:"mb-8 text-center text-xs text-[var(--text-secondary)]",children:f("auth.session_expired_message")}),h.jsx("button",{type:"button",className:"w-full rounded-[4px] bg-[var(--accent)] px-3 py-2.5 text-xs font-medium text-black hover:opacity-90 transition-opacity",onClick:m,children:f("auth.go_to_login")})]})})]}):null}const zh=5;let ba=[];const Bs=new Set;function Rp(){Bs.forEach(i=>i())}function R0(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Wa(i,u,s=4e3){const o=R0();return ba=[...ba,{id:o,variant:i,message:u,duration:s}],ba.length>zh&&(ba=ba.slice(ba.length-zh)),Rp(),o}Wa.success=(i,u)=>Wa("success",i,u);Wa.error=(i,u)=>Wa("error",i,u);Wa.warning=(i,u)=>Wa("warning",i,u);Wa.info=(i,u)=>Wa("info",i,u);function A0(i){ba=ba.filter(u=>u.id!==i),Rp()}function z0(){const[,i]=g.useState(0);return g.useEffect(()=>{const u=()=>i(s=>s+1);return Bs.add(u),()=>{Bs.delete(u)}},[]),ba}const O0={success:{icon:eb,borderColor:"var(--accent)"},error:{icon:tb,borderColor:"var(--destructive)"},warning:{icon:np,borderColor:"var(--warning)"},info:{icon:ib,borderColor:"var(--info)"}};function C0({item:i}){const u=O0[i.variant],s=u.icon,{t:o}=Vt(),f=g.useCallback(()=>A0(i.id),[i.id]);return g.useEffect(()=>{if(!i.duration)return;const m=setTimeout(f,i.duration);return()=>clearTimeout(m)},[i.duration,f]),h.jsxs("div",{className:"flex items-center gap-3 rounded-[4px] bg-[var(--bg-card)] px-4 py-3 shadow-lg",style:{borderLeft:`3px solid ${u.borderColor}`},role:"alert",children:[h.jsx(s,{className:"h-4 w-4 shrink-0",style:{color:u.borderColor}}),h.jsx("p",{className:"flex-1 text-xs text-[var(--text-primary)]",children:i.message}),h.jsx("button",{onClick:f,className:"shrink-0 rounded-[4px] p-0.5 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]","aria-label":o("common.dismiss_notification"),children:h.jsx(lp,{className:"h-3.5 w-3.5"})})]})}function D0(){const i=z0();return i.length===0?null:h.jsx("div",{className:"pointer-events-none fixed right-4 top-4 z-[9999] flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2",children:i.map(u=>h.jsx("div",{className:"pointer-events-auto",children:h.jsx(C0,{item:u})},u.id))})}const N0=g.lazy(()=>ne(()=>import("./LandingPage-CP_wXo09.js"),__vite__mapDeps([0,1,2,3,4,5]))),M0=g.lazy(()=>ne(()=>import("./LoginPage-Dfe5P2Mc.js"),[])),U0=g.lazy(()=>ne(()=>import("./TotpSetupPage-BQmRtycf.js"),[])),q0=g.lazy(()=>ne(()=>import("./NotFoundPage-CZ6vHhxQ.js"),[])),L0=g.lazy(()=>ne(()=>import("./HomePage-DSD_C6l7.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,1]))),H0=g.lazy(()=>ne(()=>import("./TerminalHomePage-DSB_fbDP.js"),__vite__mapDeps([15,16,17,18,10,11,19,8,12,13,20,21,22]))),B0=g.lazy(()=>ne(()=>import("./TaskListPage-C9R3EahV.js"),__vite__mapDeps([23,16,7,8,12,14,24,19,5,25,9,20,26,11]))),Y0=g.lazy(()=>ne(()=>import("./TaskDetailPage-CdkjfSWn.js"),__vite__mapDeps([27,16,17,18,12,19,8,14,28,21,24,29,30]))),G0=g.lazy(()=>ne(()=>import("./WorkerListPage-DbjJDQp5.js"),__vite__mapDeps([31,8,32,33,34,35,36,22,5,30,19,25,9,13,20]))),V0=g.lazy(()=>ne(()=>import("./WorkerDetailPage-DIlJMx4z.js"),__vite__mapDeps([37,12,8,38,32,13,14,39,28]))),X0=g.lazy(()=>ne(()=>import("./WorkerSetupGuidePage-BpTJlpJ_.js"),__vite__mapDeps([33,34,35,36,22]))),Q0=g.lazy(()=>ne(()=>import("./ProjectListPage-DznwqHll.js"),__vite__mapDeps([40,19,25,9,12,13,20]))),Z0=g.lazy(()=>ne(()=>import("./ProjectDetailPage-Bi-3DLgA.js"),__vite__mapDeps([41,42,19,14,12,8,38,13,43,39,20]))),K0=g.lazy(()=>ne(()=>import("./EditProjectPage-IRTaCyfg.js"),__vite__mapDeps([44,19,42,20]))),J0=g.lazy(()=>ne(()=>import("./PipelineEditorPage-BF3eMSCM.js"),__vite__mapDeps([45,19]))),$0=g.lazy(()=>ne(()=>import("./ProfilePage-DKKDCTx9.js"),__vite__mapDeps([46,47,38,13]))),W0=g.lazy(()=>ne(()=>import("./BindPlatformPage-DLQdiRFL.js"),[])),F0=g.lazy(()=>ne(()=>import("./AccessTokensPage-CZ_Yavhf.js"),__vite__mapDeps([48,19,25,9,12,13,20,5,39]))),I0=g.lazy(()=>ne(()=>import("./CliReferencePage-B6gTsb4v.js"),__vite__mapDeps([49,50,5,20]))),P0=g.lazy(()=>ne(()=>import("./ApiReferencePage-DsFA13KQ.js"),__vite__mapDeps([51,50,5,20]))),e1=g.lazy(()=>ne(()=>import("./SkillPage-DqvIM6pJ.js"),__vite__mapDeps([52,53,5,29]))),t1=g.lazy(()=>ne(()=>import("./DocsLayout-Du6H0AOl.js"),__vite__mapDeps([54,28]))),a1=g.lazy(()=>ne(()=>import("./InstallationPage-BvBVyGkY.js"),__vite__mapDeps([55,53,5]))),n1=g.lazy(()=>ne(()=>import("./DeveloperSetupPage-Bq-eKaT0.js"),__vite__mapDeps([56,53,5]))),l1=g.lazy(()=>ne(()=>import("./WorkerSetupPage-CcByT6so.js"),__vite__mapDeps([57,53,5]))),i1=g.lazy(()=>ne(()=>import("./BotSetupPage-ByjmKjXY.js"),__vite__mapDeps([58,53,5]))),r1=g.lazy(()=>ne(()=>import("./LocalDevelopmentPage-BxVqnOjh.js"),__vite__mapDeps([59,53,5]))),u1=g.lazy(()=>ne(()=>import("./WorkerOperationsPage-B3KV1JvF.js"),[])),o1=g.lazy(()=>ne(()=>import("./DeploymentPage-CWhXb1UF.js"),__vite__mapDeps([60,53,5]))),Oh=g.lazy(()=>ne(()=>import("./BotIntegrationPage-D6-XQG0r.js"),[])),s1=g.lazy(()=>ne(()=>import("./PipelineConfigPage-C2XugReU.js"),__vite__mapDeps([61,53,5]))),c1=g.lazy(()=>ne(()=>import("./DevWorkflowPage-nTHhaHVz.js"),__vite__mapDeps([62,53,5]))),f1=g.lazy(()=>ne(()=>import("./PermissionsPage-C89LUwtR.js"),[])),d1=g.lazy(()=>ne(()=>import("./EnvVariablesPage-CY6bnuuq.js"),__vite__mapDeps([63,53,5]))),m1=g.lazy(()=>ne(()=>import("./ArchitecturePage-DDc-vReK.js"),__vite__mapDeps([64,53,5]))),h1=g.lazy(()=>ne(()=>import("./ChangelogPage-n7yRBO_5.js"),[])),p1=g.lazy(()=>ne(()=>import("./AgentCliPage-CQpk2Yo_.js"),__vite__mapDeps([65,53,5]))),_1=g.lazy(()=>ne(()=>import("./DocsIndexPage-CzA83ol_.js"),__vite__mapDeps([66,35,2,3,36]))),g1=g.lazy(()=>ne(()=>import("./AdminPage-BlGfVUEg.js"),__vite__mapDeps([67,4,2,68,36]))),y1=g.lazy(()=>ne(()=>import("./DeveloperManage-APQbY_-q.js"),__vite__mapDeps([69,19,47,25,9,13,8,20,4,43,21]))),v1=g.lazy(()=>ne(()=>import("./BotManage-DRTJDHW6.js"),__vite__mapDeps([70,19,53,5,39,20,25,9,13,8,2,43]))),b1=g.lazy(()=>ne(()=>import("./TokenManage-CvFjNduI.js"),__vite__mapDeps([71,34,5,29,25,9,13,8,20]))),x1=g.lazy(()=>ne(()=>import("./AuditLogPage-BLTNLR9x.js"),__vite__mapDeps([72,19,25,9,68,26,11]))),S1=g.lazy(()=>ne(()=>import("./SettingsPage-C1av7piJ.js"),[]));function k1(){return h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})})}function E1(){const i=xa(u=>u.sessionExpired);return h.jsxs(w0,{children:[h.jsx(D0,{}),h.jsx(T0,{children:h.jsxs(qv,{children:[h.jsx(j0,{isOpen:i}),h.jsx(g.Suspense,{fallback:h.jsx(k1,{}),children:h.jsxs(dv,{children:[h.jsx(ee,{path:"/",element:h.jsx(N0,{})}),h.jsx(ee,{path:"/login",element:h.jsx(M0,{})}),h.jsx(ee,{path:"/totp-setup",element:h.jsx(li,{children:h.jsx(U0,{})})}),h.jsx(ee,{path:"/bind",element:h.jsx(li,{children:h.jsx(W0,{})})}),h.jsxs(ee,{element:h.jsx(li,{children:h.jsx(E0,{})}),children:[h.jsx(ee,{path:"/home",element:h.jsx(H0,{})}),h.jsx(ee,{path:"/dashboard",element:h.jsx(L0,{})}),h.jsx(ee,{path:"/tasks",element:h.jsx(B0,{})}),h.jsx(ee,{path:"/tasks/:id",element:h.jsx(Y0,{})}),h.jsx(ee,{path:"/workers",element:h.jsx(G0,{})}),h.jsx(ee,{path:"/workers/setup",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(X0,{})})}),h.jsx(ee,{path:"/workers/:id",element:h.jsx(V0,{})}),h.jsx(ee,{path:"/projects",element:h.jsx(Q0,{})}),h.jsx(ee,{path:"/projects/:key",element:h.jsx(Z0,{})}),h.jsx(ee,{path:"/projects/:key/edit",element:h.jsx(K0,{})}),h.jsx(ee,{path:"/projects/:key/pipeline",element:h.jsx(J0,{})}),h.jsx(ee,{path:"/profile",element:h.jsx($0,{})}),h.jsx(ee,{path:"/access-tokens",element:h.jsx(F0,{})}),h.jsxs(ee,{path:"/docs",element:h.jsx(t1,{}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"cli",replace:!0})}),h.jsx(ee,{path:"cli",element:h.jsx(I0,{})}),h.jsx(ee,{path:"api",element:h.jsx(P0,{})}),h.jsx(ee,{path:"bot",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"all",element:h.jsx(_1,{})}),h.jsx(ee,{path:"skill",element:h.jsx(e1,{})}),h.jsx(ee,{path:"installation",element:h.jsx(a1,{})}),h.jsx(ee,{path:"developer-setup",element:h.jsx(n1,{})}),h.jsx(ee,{path:"worker-setup",element:h.jsx(l1,{})}),h.jsx(ee,{path:"bot-setup",element:h.jsx(i1,{})}),h.jsx(ee,{path:"local-development",element:h.jsx(r1,{})}),h.jsx(ee,{path:"worker-operations",element:h.jsx(u1,{})}),h.jsx(ee,{path:"deployment",element:h.jsx(o1,{})}),h.jsx(ee,{path:"bot-integration",element:h.jsx(Oh,{})}),h.jsx(ee,{path:"pipeline-config",element:h.jsx(s1,{})}),h.jsx(ee,{path:"dev-workflow",element:h.jsx(c1,{})}),h.jsx(ee,{path:"permissions",element:h.jsx(f1,{})}),h.jsx(ee,{path:"env-variables",element:h.jsx(d1,{})}),h.jsx(ee,{path:"architecture",element:h.jsx(m1,{})}),h.jsx(ee,{path:"agent-cli",element:h.jsx(p1,{})}),h.jsx(ee,{path:"changelog",element:h.jsx(h1,{})})]}),h.jsxs(ee,{path:"/admin",element:h.jsx(li,{requireAdmin:!0,children:h.jsx(g1,{})}),children:[h.jsx(ee,{index:!0,element:h.jsx(ll,{to:"developers",replace:!0})}),h.jsx(ee,{path:"developers",element:h.jsx(y1,{})}),h.jsx(ee,{path:"bots",element:h.jsx(v1,{})}),h.jsx(ee,{path:"tokens",element:h.jsx(b1,{})}),h.jsx(ee,{path:"audit-logs",element:h.jsx(x1,{})}),h.jsx(ee,{path:"settings",element:h.jsx(S1,{})})]})]}),h.jsx(ee,{path:"*",element:h.jsx(q0,{})})]})})]})})]})}function w1(i){var u,s;return((u=i.matchMedia)==null?void 0:u.call(i,"(display-mode: standalone)").matches)===!0||((s=i.navigator)==null?void 0:s.standalone)===!0}function T1(i){var s,o;const u=((s=i.navigator)==null?void 0:s.userAgent)??"";return/iPhone|iPad|iPod/i.test(u)||/Macintosh/i.test(u)&&(((o=i.navigator)==null?void 0:o.maxTouchPoints)??0)>1}function j1(i){const u=i.activeElement;if(!(u instanceof HTMLElement))return!1;const s=u.tagName;return u.isContentEditable||s==="INPUT"||s==="TEXTAREA"||s==="SELECT"}function R1(i){const u=i.screen;if(!u)return null;const s=Math.round(u.width),o=Math.round(u.height);return i.innerHeight>=i.innerWidth?Math.max(s,o):Math.min(s,o)}function A1(i=window,u=document){const s=u.documentElement,o=i.visualViewport??null;let f=-1;const m=()=>{const _=Math.round((o==null?void 0:o.height)??0),b=Math.round(i.innerHeight);let y=_>0?_:b;if(w1(i)&&T1(i)&&!j1(u)){const p=R1(i);p!==null&&(y=Math.max(y,b,p))}y!==f&&(f=y,s.style.setProperty("--app-height",`${y}px`))};return m(),i.addEventListener("resize",m),i.addEventListener("orientationchange",m),o==null||o.addEventListener("resize",m),()=>{i.removeEventListener("resize",m),i.removeEventListener("orientationchange",m),o==null||o.removeEventListener("resize",m)}}xa.getState().initialize();A1(window,document);const z1=window.matchMedia("(display-mode: standalone)").matches||navigator.standalone===!0;if(z1){document.documentElement.classList.add("pwa-standalone");const i=window.matchMedia("(prefers-color-scheme: dark)").matches,u=localStorage.getItem("overlord-theme"),s=u==="dark"||u!=="light"&&i;document.body.style.backgroundColor=s?"#171717":"#FFFFFF",new MutationObserver(()=>{const o=document.documentElement.classList.contains("dark");document.body.style.backgroundColor=o?"#171717":"#FFFFFF"}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}cy.createRoot(document.getElementById("root")).render(h.jsx(g.StrictMode,{children:h.jsx(E1,{})}));export{Js as $,C1 as A,D1 as B,Fv as C,ip as D,eb as E,q1 as F,H1 as G,Ns as H,np as I,U1 as J,ep as K,Jh as L,cb as M,ll as N,uy as O,c0 as P,Wh as Q,Rr as R,ap as S,cp as T,rb as U,sb as V,M1 as W,lp as X,L1 as Y,ab as Z,hb as _,Vt as a,cv as a0,B1 as a1,Y1 as a2,tb as a3,$s as b,xe as c,mb as d,ub as e,Fa as f,gt as g,Xr as h,xb as i,h as j,up as k,kp as l,Ep as m,a0 as n,Fr as o,N1 as p,Q1 as q,g as r,V1 as s,Wa as t,xa as u,u0 as v,X1 as w,tp as x,Ph as y,G1 as z};
|