@shepai/cli 1.151.2-pr460.ba381d8 → 1.151.2-pr460.d6300bd
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/packages/core/src/application/ports/output/repositories/interactive-session-repository.interface.d.ts +19 -0
- package/dist/packages/core/src/application/ports/output/repositories/interactive-session-repository.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/interactive-session-service.interface.d.ts +13 -0
- package/dist/packages/core/src/application/ports/output/services/interactive-session-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/interactive-session.mapper.d.ts +2 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/interactive-session.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/interactive-session.mapper.js +2 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/047-add-agent-session-id.d.ts +15 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/047-add-agent-session-id.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/047-add-agent-session-id.js +27 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/048-add-turn-status.d.ts +15 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/048-add-turn-status.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/048-add-turn-status.js +20 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.d.ts +4 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.js +37 -0
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.d.ts +4 -2
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.js +89 -32
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/mark-read/route.d.ts +19 -0
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/mark-read/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/mark-read/route.js +24 -0
- package/dist/src/presentation/web/app/api/interactive/chat/turn-statuses/route.d.ts +13 -0
- package/dist/src/presentation/web/app/api/interactive/chat/turn-statuses/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/interactive/chat/turn-statuses/route.js +36 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +5 -2
- package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node.js +7 -2
- package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.d.ts +14 -0
- package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.js +13 -0
- package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.stories.d.ts +9 -0
- package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.stories.js +19 -0
- package/dist/src/presentation/web/components/features/chat/ChatSheet.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatSheet.js +4 -1
- package/dist/src/presentation/web/components/features/chat/useChatRuntime.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/useChatRuntime.js +6 -0
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +9 -2
- package/dist/src/presentation/web/hooks/turn-statuses-provider.d.ts +19 -0
- package/dist/src/presentation/web/hooks/turn-statuses-provider.d.ts.map +1 -0
- package/dist/src/presentation/web/hooks/turn-statuses-provider.js +26 -0
- package/dist/src/presentation/web/hooks/use-turn-statuses.d.ts +13 -0
- package/dist/src/presentation/web/hooks/use-turn-statuses.d.ts.map +1 -0
- package/dist/src/presentation/web/hooks/use-turn-statuses.js +31 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +2 -0
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/routes-manifest.json +14 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/attachments/upload-from-path/route.js +1 -1
- package/web/.next/server/app/api/attachments/upload-from-path/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/mark-read/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/mark-read/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/mark-read/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/mark-read/route.js +7 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/mark-read/route.js.map +5 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/mark-read/route.js.nft.json +1 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/mark-read/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/turn-statuses/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/interactive/chat/turn-statuses/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/interactive/chat/turn-statuses/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/interactive/chat/turn-statuses/route.js +7 -0
- package/web/.next/server/app/api/interactive/chat/turn-statuses/route.js.map +5 -0
- package/web/.next/server/app/api/interactive/chat/turn-statuses/route.js.nft.json +1 -0
- package/web/.next/server/app/api/interactive/chat/turn-statuses/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/sessions-batch/route.js +1 -1
- package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app-paths-manifest.json +2 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_[featureId]_mark-read_route_actions_ce79c730.js +3 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_[featureId]_mark-read_route_actions_ce79c730.js.map +1 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_turn-statuses_route_actions_f97e4de7.js +3 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_turn-statuses_route_actions_f97e4de7.js.map +1 -0
- package/web/.next/server/chunks/{[root-of-the-server]__0d33c29e._.js → [root-of-the-server]__31598852._.js} +2 -2
- package/web/.next/server/chunks/{[root-of-the-server]__0d33c29e._.js.map → [root-of-the-server]__31598852._.js.map} +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__32b04219._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__32b04219._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__ab4951b1._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__ab4951b1._.js.map +1 -0
- package/web/.next/server/chunks/{[root-of-the-server]__a5879003._.js → [root-of-the-server]__ea653642._.js} +2 -2
- package/web/.next/server/chunks/{[root-of-the-server]__a5879003._.js.map → [root-of-the-server]__ea653642._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__28d0d265._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__563f2f7a._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__563f2f7a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__31f1c3b0._.js → [root-of-the-server]__e91ffd5e._.js} +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e91ffd5e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_3a0b989f._.js +2 -2
- package/web/.next/server/chunks/ssr/_3a0b989f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_5f69c13f._.js +1 -1
- package/web/.next/server/chunks/ssr/_5f69c13f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_6f48569b._.js +3 -0
- package/web/.next/server/chunks/ssr/{_de71404e._.js.map → _6f48569b._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_7c5b97c6._.js +1 -1
- package/web/.next/server/chunks/ssr/_7c5b97c6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_82c57f10._.js +1 -1
- package/web/.next/server/chunks/ssr/_82c57f10._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_9495d50b._.js +1 -1
- package/web/.next/server/chunks/ssr/_9495d50b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_4c42590e._.js → _9ab5e836._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_4c42590e._.js.map → _9ab5e836._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_eb9467e9._.js → _9ecb7d6d._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_eb9467e9._.js.map → _9ecb7d6d._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_a0e3f7e4._.js +1 -1
- package/web/.next/server/chunks/ssr/_a0e3f7e4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_ac4a3873._.js +1 -1
- package/web/.next/server/chunks/ssr/_ca0aa7f0._.js +1 -1
- package/web/.next/server/chunks/ssr/_ca0aa7f0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_cb5a021e._.js +1 -1
- package/web/.next/server/chunks/ssr/_cb5a021e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d86175ae._.js +1 -1
- package/web/.next/server/chunks/ssr/_d86175ae._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d8bedf13._.js +1 -1
- package/web/.next/server/chunks/ssr/_d8bedf13._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_48e5757d._.js → _e9a73a63._.js} +2 -2
- package/web/.next/server/chunks/ssr/_e9a73a63._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_fa7efce3._.js +2 -2
- package/web/.next/server/chunks/ssr/_fa7efce3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_ef15a0bd._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_ef15a0bd._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +45 -45
- package/web/.next/static/chunks/{e51493c981deb9fd.js → 00ddf2682e26248f.js} +1 -1
- package/web/.next/static/chunks/{6a5c79587318fe1e.js → 0d07a524b56a91ae.js} +1 -1
- package/web/.next/static/chunks/{73b5be3394d27358.js → 3011d2b0e84898b9.js} +2 -2
- package/web/.next/static/chunks/{c80523e4d172cdea.js → 3d780d0c67e9c6d7.js} +2 -2
- package/web/.next/static/chunks/{9dd319c237b73197.js → 3f314c0cfed1a31f.js} +1 -1
- package/web/.next/static/chunks/{b546fac6810f555b.js → 4dcd3fddd166e847.js} +1 -1
- package/web/.next/static/chunks/{ce18a48f7d5d53c0.js → 6b96db4c6afb337c.js} +1 -1
- package/web/.next/static/chunks/8ba1c07ef18b15a9.js +1 -0
- package/web/.next/static/chunks/91ca5103e9d37ecf.js +7 -0
- package/web/.next/static/chunks/a919a9df4ab12a5c.css +1 -0
- package/web/.next/static/chunks/afc4212532319046.js +1 -0
- package/web/.next/static/chunks/{feed0046c419c228.js → b4cde06eff374c59.js} +3 -3
- package/web/.next/static/chunks/{ec7cd7e136a1b320.js → c9d93e106e541ea5.js} +1 -1
- package/web/.next/static/chunks/{0e73b25a355804a2.js → d1beeb17dc36ae56.js} +2 -2
- package/web/.next/static/chunks/{487a3d47f76ba2ce.js → dd72af4aa0e5a751.js} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__31f1c3b0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ede6df1f._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ede6df1f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_48e5757d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_de71404e._.js +0 -3
- package/web/.next/static/chunks/16f6471485cbfed1.css +0 -1
- package/web/.next/static/chunks/476ebad4abb27ee8.js +0 -7
- package/web/.next/static/chunks/f0b1a5ded6ab6885.js +0 -1
- /package/web/.next/static/{VIJH9LQh8Ro1-nip3v-Am → Pz2jBHo89UcoWoV7z5vJp}/_buildManifest.js +0 -0
- /package/web/.next/static/{VIJH9LQh8Ro1-nip3v-Am → Pz2jBHo89UcoWoV7z5vJp}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{VIJH9LQh8Ro1-nip3v-Am → Pz2jBHo89UcoWoV7z5vJp}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(20314),n=e.i(79054),a=e.i(23925),r=e.i(26370),i=e.i(38573),l=e.i(49228),o=e.i(3645);let s=(0,o.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),d=(0,o.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),c=(0,o.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),u=(0,o.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var p=e.i(10714),p=p,m=e.i(3214),h=e.i(30702);let f=(0,o.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var g=e.i(58860),x=e.i(48109),v=e.i(60112),b=e.i(31777),w=e.i(41957),y=e.i(51911),S=e.i(26036),j=e.i(27069),C=e.i(91967),k=e.i(87342),I=e.i(5978),M=e.i(22528),N=e.i(66033),P=e.i(53532),R=e.i(41687),E=e.i(56720),T=e.i(13123),A=e.i(52740),D=e.i(39979),F=e.i(87620),L=e.i(86874),H=e.i(29297),B=e.i(36589),z=e.i(5192),_=e.i(23405),V=e.i(1693),W=e.i(73772),O=e.i(13044),U=[" ","Enter","ArrowUp","ArrowDown"],K=[" ","Enter"],q="Select",[G,$,Y]=(0,k.createCollection)(q),[Z,X]=(0,M.createContextScope)(q,[Y,A.createPopperScope]),Q=(0,A.createPopperScope)(),[J,ee]=Z(q),[et,en]=Z(q),ea=e=>{let{__scopeSelect:a,children:r,open:i,defaultOpen:l,onOpenChange:o,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:m,disabled:h,required:f,form:g}=e,x=Q(a),[v,b]=n.useState(null),[w,y]=n.useState(null),[S,j]=n.useState(!1),C=(0,N.useDirection)(u),[k,I]=(0,B.useControllableState)({prop:i,defaultProp:l??!1,onChange:o,caller:q}),[M,P]=(0,B.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:q}),R=n.useRef(null),E=!v||g||!!v.closest("form"),[D,F]=n.useState(new Set),L=Array.from(D).map(e=>e.props.value).join(";");return(0,t.jsx)(A.Root,{...x,children:(0,t.jsxs)(J,{required:f,scope:a,trigger:v,onTriggerChange:b,valueNode:w,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:(0,T.useId)(),value:M,onValueChange:P,open:k,onOpenChange:I,dir:C,triggerPointerDownPosRef:R,disabled:h,children:[(0,t.jsx)(G.Provider,{scope:a,children:(0,t.jsx)(et,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{F(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{F(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:r})}),E?(0,t.jsxs)(eU,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:m,value:M,onChange:e=>P(e.target.value),disabled:h,form:g,children:[void 0===M?(0,t.jsx)("option",{value:""}):null,Array.from(D)]},L):null]})})};ea.displayName=q;var er="SelectTrigger",ei=n.forwardRef((e,a)=>{let{__scopeSelect:r,disabled:i=!1,...l}=e,o=Q(r),s=ee(er,r),d=s.disabled||i,c=(0,I.useComposedRefs)(a,s.onTriggerChange),u=$(r),p=n.useRef("touch"),[m,h,f]=eq(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),a=eG(t,e,n);void 0!==a&&s.onValueChange(a.value)}),g=e=>{d||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(A.Anchor,{asChild:!0,...o,children:(0,t.jsx)(F.Primitive.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":eK(s.value)?"":void 0,...l,ref:c,onClick:(0,C.composeEventHandlers)(l.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,C.composeEventHandlers)(l.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:(0,C.composeEventHandlers)(l.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&U.includes(e.key)&&(g(),e.preventDefault())})})})});ei.displayName=er;var el="SelectValue",eo=n.forwardRef((e,n)=>{let{__scopeSelect:a,className:r,style:i,children:l,placeholder:o="",...s}=e,d=ee(el,a),{onValueNodeHasChildrenChange:c}=d,u=void 0!==l,p=(0,I.useComposedRefs)(n,d.onValueNodeChange);return(0,z.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(F.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eK(d.value)?(0,t.jsx)(t.Fragment,{children:o}):l})});eo.displayName=el;var es=n.forwardRef((e,n)=>{let{__scopeSelect:a,children:r,...i}=e;return(0,t.jsx)(F.Primitive.span,{"aria-hidden":!0,...i,ref:n,children:r||"▼"})});es.displayName="SelectIcon";var ed=e=>(0,t.jsx)(D.Portal,{asChild:!0,...e});ed.displayName="SelectPortal";var ec="SelectContent",eu=n.forwardRef((e,a)=>{let r=ee(ec,e.__scopeSelect),[i,l]=n.useState();return((0,z.useLayoutEffect)(()=>{l(new DocumentFragment)},[]),r.open)?(0,t.jsx)(ef,{...e,ref:a}):i?S.createPortal((0,t.jsx)(ep,{scope:e.__scopeSelect,children:(0,t.jsx)(G.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});eu.displayName=ec;var[ep,em]=Z(ec),eh=(0,L.createSlot)("SelectContent.RemoveScroll"),ef=n.forwardRef((e,a)=>{let{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:o,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...b}=e,w=ee(ec,r),[y,S]=n.useState(null),[j,k]=n.useState(null),M=(0,I.useComposedRefs)(a,e=>S(e)),[N,T]=n.useState(null),[A,D]=n.useState(null),F=$(r),[L,H]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,W.hideOthers)(y)},[y]),(0,R.useFocusGuards)();let z=n.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[a]=n.slice(-1),r=document.activeElement;for(let n of e)if(n===r||(n?.scrollIntoView({block:"nearest"}),n===t&&j&&(j.scrollTop=0),n===a&&j&&(j.scrollTop=j.scrollHeight),n?.focus(),document.activeElement!==r))return},[F,j]),_=n.useCallback(()=>z([N,y]),[z,N,y]);n.useEffect(()=>{L&&_()},[L,_]);let{onOpenChange:V,triggerPointerDownPosRef:U}=w;n.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(U.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(U.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||V(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[y,V,U]),n.useEffect(()=>{let e=()=>V(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[V]);let[K,q]=eq(e=>{let t=F().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),a=eG(t,e,n);a&&setTimeout(()=>a.ref.current.focus())}),G=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==w.value&&w.value===t||a)&&(T(e),a&&(B.current=!0))},[w.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==w.value&&w.value===t||a)&&D(e)},[w.value]),X="popper"===i?ex:eg,Q=X===ex?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(ep,{scope:r,content:y,viewport:j,onViewportChange:k,itemRefCallback:G,selectedItem:N,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:A,position:i,isPositioned:L,searchRef:K,children:(0,t.jsx)(O.RemoveScroll,{as:eh,allowPinchZoom:!0,children:(0,t.jsx)(E.FocusScope,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,C.composeEventHandlers)(l,e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(P.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:(0,t.jsx)(X,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...b,...Q,onPlaced:()=>H(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:(0,C.composeEventHandlers)(b.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||q(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,a=t.indexOf(n);t=t.slice(a+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});ef.displayName="SelectContentImpl";var eg=n.forwardRef((e,a)=>{let{__scopeSelect:r,onPlaced:i,...l}=e,o=ee(ec,r),s=em(ec,r),[d,c]=n.useState(null),[u,p]=n.useState(null),m=(0,I.useComposedRefs)(a,e=>p(e)),h=$(r),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:b,focusSelectedItem:w}=s,y=n.useCallback(()=>{if(o.trigger&&o.valueNode&&d&&u&&x&&v&&b){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=b.getBoundingClientRect();if("rtl"!==o.dir){let r=a.left-t.left,i=n.left-r,l=e.left-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,j.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.left=u+"px"}else{let r=t.right-a.right,i=window.innerWidth-n.right-r,l=window.innerWidth-e.right-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,j.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.right=u+"px"}let r=h(),l=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),m=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),w=p+m+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,w),S=window.getComputedStyle(x),C=parseInt(S.paddingTop,10),k=parseInt(S.paddingBottom,10),I=e.top+e.height/2-10,M=v.offsetHeight/2,N=p+m+(v.offsetTop+M);if(N<=I){let e=r.length>0&&v===r[r.length-1].ref.current;d.style.bottom="0px";let t=Math.max(l-I,M+(e?k:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=N+t+"px"}else{let e=r.length>0&&v===r[0].ref.current;d.style.top="0px";let t=Math.max(I,p+x.offsetTop+(e?C:0)+M);d.style.height=t+(w-N)+"px",x.scrollTop=N-I+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=l+"px",i?.(),requestAnimationFrame(()=>f.current=!0)}},[h,o.trigger,o.valueNode,d,u,x,v,b,o.dir,i]);(0,z.useLayoutEffect)(()=>y(),[y]);let[S,C]=n.useState();(0,z.useLayoutEffect)(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let k=n.useCallback(e=>{e&&!0===g.current&&(y(),w?.(),g.current=!1)},[y,w]);return(0,t.jsx)(ev,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:k,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:(0,t.jsx)(F.Primitive.div,{...l,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});eg.displayName="SelectItemAlignedPosition";var ex=n.forwardRef((e,n)=>{let{__scopeSelect:a,align:r="start",collisionPadding:i=10,...l}=e,o=Q(a);return(0,t.jsx)(A.Content,{...o,...l,ref:n,align:r,collisionPadding:i,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ex.displayName="SelectPopperPosition";var[ev,eb]=Z(ec,{}),ew="SelectViewport",ey=n.forwardRef((e,a)=>{let{__scopeSelect:r,nonce:i,...l}=e,o=em(ew,r),s=eb(ew,r),d=(0,I.useComposedRefs)(a,o.onViewportChange),c=n.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,t.jsx)(G.Slot,{scope:r,children:(0,t.jsx)(F.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:(0,C.composeEventHandlers)(l.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:a}=s;if(a?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let a=window.innerHeight-20,r=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(r<a){let i=r+e,l=Math.min(a,i),o=i-l;n.style.height=l+"px","0px"===n.style.bottom&&(t.scrollTop=o>0?o:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});ey.displayName=ew;var eS="SelectGroup",[ej,eC]=Z(eS),ek=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=(0,T.useId)();return(0,t.jsx)(ej,{scope:a,id:i,children:(0,t.jsx)(F.Primitive.div,{role:"group","aria-labelledby":i,...r,ref:n})})});ek.displayName=eS;var eI="SelectLabel",eM=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=eC(eI,a);return(0,t.jsx)(F.Primitive.div,{id:i.id,...r,ref:n})});eM.displayName=eI;var eN="SelectItem",[eP,eR]=Z(eN),eE=n.forwardRef((e,a)=>{let{__scopeSelect:r,value:i,disabled:l=!1,textValue:o,...s}=e,d=ee(eN,r),c=em(eN,r),u=d.value===i,[p,m]=n.useState(o??""),[h,f]=n.useState(!1),g=(0,I.useComposedRefs)(a,e=>c.itemRefCallback?.(e,i,l)),x=(0,T.useId)(),v=n.useRef("touch"),b=()=>{l||(d.onValueChange(i),d.onOpenChange(!1))};if(""===i)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(eP,{scope:r,value:i,disabled:l,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(G.ItemSlot,{scope:r,value:i,disabled:l,textValue:p,children:(0,t.jsx)(F.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...s,ref:g,onFocus:(0,C.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,C.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,C.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&b()}),onPointerUp:(0,C.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&b()}),onPointerDown:(0,C.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,C.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,l?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,C.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,C.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(K.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})});eE.displayName=eN;var eT="SelectItemText",eA=n.forwardRef((e,a)=>{let{__scopeSelect:r,className:i,style:l,...o}=e,s=ee(eT,r),d=em(eT,r),c=eR(eT,r),u=en(eT,r),[p,m]=n.useState(null),h=(0,I.useComposedRefs)(a,e=>m(e),c.onItemTextChange,e=>d.itemTextRefCallback?.(e,c.value,c.disabled)),f=p?.textContent,g=n.useMemo(()=>(0,t.jsx)("option",{value:c.value,disabled:c.disabled,children:f},c.value),[c.disabled,c.value,f]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=u;return(0,z.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(F.Primitive.span,{id:c.textId,...o,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?S.createPortal(o.children,s.valueNode):null]})});eA.displayName=eT;var eD="SelectItemIndicator",eF=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e;return eR(eD,a).isSelected?(0,t.jsx)(F.Primitive.span,{"aria-hidden":!0,...r,ref:n}):null});eF.displayName=eD;var eL="SelectScrollUpButton",eH=n.forwardRef((e,a)=>{let r=em(eL,e.__scopeSelect),i=eb(eL,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,I.useComposedRefs)(a,i.onScrollButtonChange);return(0,z.useLayoutEffect)(()=>{if(r.viewport&&r.isPositioned){let e=function(){o(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),l?(0,t.jsx)(e_,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eH.displayName=eL;var eB="SelectScrollDownButton",ez=n.forwardRef((e,a)=>{let r=em(eB,e.__scopeSelect),i=eb(eB,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,I.useComposedRefs)(a,i.onScrollButtonChange);return(0,z.useLayoutEffect)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),l?(0,t.jsx)(e_,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ez.displayName=eB;var e_=n.forwardRef((e,a)=>{let{__scopeSelect:r,onAutoScroll:i,...l}=e,o=em("SelectScrollButton",r),s=n.useRef(null),d=$(r),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,z.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(F.Primitive.div,{"aria-hidden":!0,...l,ref:a,style:{flexShrink:0,...l.style},onPointerDown:(0,C.composeEventHandlers)(l.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(i,50))}),onPointerMove:(0,C.composeEventHandlers)(l.onPointerMove,()=>{o.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(i,50))}),onPointerLeave:(0,C.composeEventHandlers)(l.onPointerLeave,()=>{c()})})}),eV=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e;return(0,t.jsx)(F.Primitive.div,{"aria-hidden":!0,...r,ref:n})});eV.displayName="SelectSeparator";var eW="SelectArrow",eO=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=Q(a),l=ee(eW,a),o=em(eW,a);return l.open&&"popper"===o.position?(0,t.jsx)(A.Arrow,{...i,...r,ref:n}):null});eO.displayName=eW;var eU=n.forwardRef(({__scopeSelect:e,value:a,...r},i)=>{let l=n.useRef(null),o=(0,I.useComposedRefs)(i,l),s=(0,_.usePrevious)(a);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==a&&t){let n=new Event("change",{bubbles:!0});t.call(e,a),e.dispatchEvent(n)}},[s,a]),(0,t.jsx)(F.Primitive.select,{...r,style:{...V.VISUALLY_HIDDEN_STYLES,...r.style},ref:o,defaultValue:a})});function eK(e){return""===e||void 0===e}function eq(e){let t=(0,H.useCallbackRef)(e),a=n.useRef(""),r=n.useRef(0),i=n.useCallback(e=>{let n=a.current+e;t(n),function e(t){a.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),l=n.useCallback(()=>{a.current="",window.clearTimeout(r.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(r.current),[]),[a,i,l]}function eG(e,t,n){var a,r;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1,o=(a=e,r=Math.max(l,0),a.map((e,t)=>a[(r+t)%a.length]));1===i.length&&(o=o.filter(e=>e!==n));let s=o.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}eU.displayName="SelectBubbleInput",e.s(["Arrow",()=>eO,"Content",()=>eu,"Group",()=>ek,"Icon",()=>es,"Item",()=>eE,"ItemIndicator",()=>eF,"ItemText",()=>eA,"Label",()=>eM,"Portal",()=>ed,"Root",()=>ea,"ScrollDownButton",()=>ez,"ScrollUpButton",()=>eH,"Select",()=>ea,"SelectArrow",()=>eO,"SelectContent",()=>eu,"SelectGroup",()=>ek,"SelectIcon",()=>es,"SelectItem",()=>eE,"SelectItemIndicator",()=>eF,"SelectItemText",()=>eA,"SelectLabel",()=>eM,"SelectPortal",()=>ed,"SelectScrollDownButton",()=>ez,"SelectScrollUpButton",()=>eH,"SelectSeparator",()=>eV,"SelectTrigger",()=>ei,"SelectValue",()=>eo,"SelectViewport",()=>ey,"Separator",()=>eV,"Trigger",()=>ei,"Value",()=>eo,"Viewport",()=>ey,"createSelectScope",()=>X],83830);var e$=e.i(83830),e$=e$,eY=e.i(99105),eZ=e.i(48829);let eX=e$.Root;e$.Group;let eQ=e$.Value,eJ=n.forwardRef(({className:e,children:n,...a},r)=>(0,t.jsxs)(e$.Trigger,{ref:r,className:(0,b.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[n,(0,t.jsx)(e$.Icon,{asChild:!0,children:(0,t.jsx)(eY.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));eJ.displayName=e$.Trigger.displayName;let e0=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.ScrollUpButton,{ref:a,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eZ.ChevronUp,{className:"h-4 w-4"})}));e0.displayName=e$.ScrollUpButton.displayName;let e1=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.ScrollDownButton,{ref:a,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eY.ChevronDown,{className:"h-4 w-4"})}));e1.displayName=e$.ScrollDownButton.displayName;let e2=n.forwardRef(({className:e,children:n,position:a="popper",...r},i)=>(0,t.jsx)(e$.Portal,{children:(0,t.jsxs)(e$.Content,{ref:i,className:(0,b.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...r,children:[(0,t.jsx)(e0,{}),(0,t.jsx)(e$.Viewport,{className:(0,b.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e1,{})]})}));e2.displayName=e$.Content.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.Label,{ref:a,className:(0,b.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=e$.Label.displayName;let e3=n.forwardRef(({className:e,children:n,...r},i)=>(0,t.jsxs)(e$.Item,{ref:i,className:(0,b.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(e$.ItemIndicator,{children:(0,t.jsx)(a.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(e$.ItemText,{children:n})]}));e3.displayName=e$.Item.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.Separator,{ref:a,className:(0,b.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=e$.Separator.displayName;var e5=e.i(21023);let e4=(0,e5.createServerReference)("4058cd18eaa0f95af93f5c3e1bdc2bcd0ffabe15ac",e5.callServer,void 0,e5.findSourceMapURL,"updateSettingsAction");var e8=e.i(17406),e9=e.i(98804),e6=e.i(44229),e7=e.i(83902);function te(e){return(0,t.jsx)(e6.Code,{className:(0,b.cn)("h-4 w-4",e.className),...e})}function tt({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function tn({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function ta({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function ti({className:e,...n}){return(0,t.jsx)(e7.Rocket,{className:(0,b.cn)("h-4 w-4",e),...n})}tt.displayName="VsCodeIcon",tn.displayName="CursorEditorIcon",ta.displayName="WindsurfIcon",tr.displayName="ZedIcon",ti.displayName="AntigravityIcon";let tl={vscode:tt,cursor:tn,windsurf:ta,zed:tr,antigravity:ti};var to=e.i(41413),ts=e.i(77624),td=["PageUp","PageDown"],tc=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tu={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tp="Slider",[tm,th,tf]=(0,k.createCollection)(tp),[tg,tx]=(0,M.createContextScope)(tp,[tf]),[tv,tb]=tg(tp),tw=n.forwardRef((e,a)=>{let{name:r,min:i=0,max:l=100,step:o=1,orientation:s="horizontal",disabled:d=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[i],value:p,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:f=!1,form:g,...x}=e,v=n.useRef(new Set),b=n.useRef(0),w="horizontal"===s,[y=[],S]=(0,B.useControllableState)({prop:p,defaultProp:u,onChange:e=>{let t=[...v.current];t[b.current]?.focus(),m(e)}}),k=n.useRef(y);function I(e,t,{commit:n}={commit:!1}){let a,r=(String(o).split(".")[1]||"").length,s=Math.round((Math.round((e-i)/o)*o+i)*(a=Math.pow(10,r)))/a,d=(0,j.clamp)(s,[i,l]);S((e=[])=>{let a=function(e=[],t,n){let a=[...e];return a[n]=t,a.sort((e,t)=>e-t)}(e,d,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,n)=>e[n+1]-t))>=t;return!0}(a,c*o))return e;{b.current=a.indexOf(d);let t=String(a)!==String(e);return t&&n&&h(a),t?a:e}})}return(0,t.jsx)(tv,{scope:e.__scopeSlider,name:r,disabled:d,min:i,max:l,valueIndexToChangeRef:b,thumbs:v.current,values:y,orientation:s,form:g,children:(0,t.jsx)(tm.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(tm.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(w?tj:tC,{"aria-disabled":d,"data-disabled":d?"":void 0,...x,ref:a,onPointerDown:(0,C.composeEventHandlers)(x.onPointerDown,()=>{d||(k.current=y)}),min:i,max:l,inverted:f,onSlideStart:d?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let n=e.map(e=>Math.abs(e-t)),a=Math.min(...n);return n.indexOf(a)}(y,e);I(e,t)},onSlideMove:d?void 0:function(e){I(e,b.current)},onSlideEnd:d?void 0:function(){let e=k.current[b.current];y[b.current]!==e&&h(y)},onHomeKeyDown:()=>!d&&I(i,0,{commit:!0}),onEndKeyDown:()=>!d&&I(l,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!d){let n=td.includes(e.key)||e.shiftKey&&tc.includes(e.key),a=b.current;I(y[a]+o*(n?10:1)*t,a,{commit:!0})}}})})})})});tw.displayName=tp;var[ty,tS]=tg(tp,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tj=n.forwardRef((e,a)=>{let{min:r,max:i,dir:l,inverted:o,onSlideStart:s,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...p}=e,[m,h]=n.useState(null),f=(0,I.useComposedRefs)(a,e=>h(e)),g=n.useRef(void 0),x=(0,N.useDirection)(l),v="ltr"===x,b=v&&!o||!v&&o;function w(e){let t=g.current||m.getBoundingClientRect(),n=tF([0,t.width],b?[r,i]:[i,r]);return g.current=t,n(e-t.left)}return(0,t.jsx)(ty,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:(0,t.jsx)(tk,{dir:x,"data-orientation":"horizontal",...p,ref:f,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=w(e.clientX);s?.(t)},onSlideMove:e=>{let t=w(e.clientX);d?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=tu[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),tC=n.forwardRef((e,a)=>{let{min:r,max:i,inverted:l,onSlideStart:o,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=e,p=n.useRef(null),m=(0,I.useComposedRefs)(a,p),h=n.useRef(void 0),f=!l;function g(e){let t=h.current||p.current.getBoundingClientRect(),n=tF([0,t.height],f?[i,r]:[r,i]);return h.current=t,n(e-t.top)}return(0,t.jsx)(ty,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,t.jsx)(tk,{"data-orientation":"vertical",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=g(e.clientY);o?.(t)},onSlideMove:e=>{let t=g(e.clientY);s?.(t)},onSlideEnd:()=>{h.current=void 0,d?.()},onStepKeyDown:e=>{let t=tu[f?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),tk=n.forwardRef((e,n)=>{let{__scopeSlider:a,onSlideStart:r,onSlideMove:i,onSlideEnd:l,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:d,...c}=e,u=tb(tp,a);return(0,t.jsx)(F.Primitive.span,{...c,ref:n,onKeyDown:(0,C.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(o(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):td.concat(tc).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:(0,C.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:(0,C.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:(0,C.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),l(e))})})}),tI="SliderTrack",tM=n.forwardRef((e,n)=>{let{__scopeSlider:a,...r}=e,i=tb(tI,a);return(0,t.jsx)(F.Primitive.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:n})});tM.displayName=tI;var tN="SliderRange",tP=n.forwardRef((e,a)=>{let{__scopeSlider:r,...i}=e,l=tb(tN,r),o=tS(tN,r),s=n.useRef(null),d=(0,I.useComposedRefs)(a,s),c=l.values.length,u=l.values.map(e=>tD(e,l.min,l.max)),p=c>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(F.Primitive.span,{"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,...i,ref:d,style:{...e.style,[o.startEdge]:p+"%",[o.endEdge]:m+"%"}})});tP.displayName=tN;var tR="SliderThumb",tE=n.forwardRef((e,a)=>{let r=th(e.__scopeSlider),[i,l]=n.useState(null),o=(0,I.useComposedRefs)(a,e=>l(e)),s=n.useMemo(()=>i?r().findIndex(e=>e.ref.current===i):-1,[r,i]);return(0,t.jsx)(tT,{...e,ref:o,index:s})}),tT=n.forwardRef((e,a)=>{var r,i,l,o,s;let d,c,{__scopeSlider:u,index:p,name:m,...h}=e,f=tb(tR,u),g=tS(tR,u),[x,v]=n.useState(null),b=(0,I.useComposedRefs)(a,e=>v(e)),w=!x||f.form||!!x.closest("form"),y=(0,ts.useSize)(x),S=f.values[p],j=void 0===S?0:tD(S,f.min,f.max),k=(r=p,(i=f.values.length)>2?`Value ${r+1} of ${i}`:2===i?["Minimum","Maximum"][r]:void 0),M=y?.[g.size],N=M?(l=M,o=j,s=g.direction,c=tF([0,50],[0,d=l/2]),(d-c(o)*s)*s):0;return n.useEffect(()=>{if(x)return f.thumbs.add(x),()=>{f.thumbs.delete(x)}},[x,f.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[g.startEdge]:`calc(${j}% + ${N}px)`},children:[(0,t.jsx)(tm.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(F.Primitive.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":f.min,"aria-valuenow":S,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...h,ref:b,style:void 0===S?{display:"none"}:e.style,onFocus:(0,C.composeEventHandlers)(e.onFocus,()=>{f.valueIndexToChangeRef.current=p})})}),w&&(0,t.jsx)(tA,{name:m??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:S},p)]})});tE.displayName=tR;var tA=n.forwardRef(({__scopeSlider:e,value:a,...r},i)=>{let l=n.useRef(null),o=(0,I.useComposedRefs)(l,i),s=(0,_.usePrevious)(a);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==a&&t){let n=new Event("input",{bubbles:!0});t.call(e,a),e.dispatchEvent(n)}},[s,a]),(0,t.jsx)(F.Primitive.input,{style:{display:"none"},...r,ref:o,defaultValue:a})});function tD(e,t,n){return(0,j.clamp)(100/(n-t)*(e-t),[0,100])}function tF(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(n-e[0])}}tA.displayName="RadioBubbleInput",e.s(["Range",()=>tP,"Root",()=>tw,"Slider",()=>tw,"SliderRange",()=>tP,"SliderThumb",()=>tE,"SliderTrack",()=>tM,"Thumb",()=>tE,"Track",()=>tM,"createSliderScope",()=>tx],29991);var tL=e.i(29991),tL=tL;function tH({className:e,defaultValue:a,value:r,min:i=0,max:l=100,...o}){let s=n.useMemo(()=>Array.isArray(r)?r:Array.isArray(a)?a:[i,l],[r,a,i,l]);return(0,t.jsxs)(tL.Root,{"data-slot":"slider",defaultValue:a,value:r,min:i,max:l,className:(0,b.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...o,children:[(0,t.jsx)(tL.Track,{"data-slot":"slider-track",className:(0,b.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(tL.Range,{"data-slot":"slider-range",className:(0,b.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,n)=>(0,t.jsx)(tL.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},n))]})}let tB=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],tz=tB.length-1;function t_(e){let t=0,n=Math.abs(e-tB[0]);for(let a=1;a<tB.length;a++){let r=Math.abs(e-tB[a]);r<n&&(n=r,t=a)}return t}function tV({id:e,testId:a,value:r,onChange:i,onBlur:l,defaultSeconds:o=1800}){var s;let d,c,u=(""===r?o:parseInt(r,10))||o,[p,m]=(0,n.useState)(()=>t_(u)),h=t_(u);h!==p&&tB[p]!==u&&m(h);let f=(0,n.useCallback)(([e])=>{m(e),i(String(tB[e]))},[i]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(tH,{id:e,"data-testid":a,min:0,max:tz,step:1,value:[p],onValueChange:f,onValueCommit:()=>l(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-right text-xs tabular-nums",children:(d=Math.floor((s=tB[p])/3600),c=Math.round(s%3600/60),0===d?`${c}m`:0===c?`${d}h`:`${d}h ${c}m`)})]})}let tW=[{value:e8.EditorType.VsCode,label:"VS Code"},{value:e8.EditorType.Cursor,label:"Cursor"},{value:e8.EditorType.Windsurf,label:"Windsurf"},{value:e8.EditorType.Zed,label:"Zed"},{value:e8.EditorType.Antigravity,label:"Antigravity"}],tO=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],tU=[{id:"agent",label:"Agent",icon:r.Bot},{id:"environment",label:"Environment",icon:i.Terminal},{id:"workflow",label:"Workflow",icon:l.GitBranch},{id:"ci",label:"CI",icon:s},{id:"stage-timeouts",label:"Timeouts",icon:g.Timer},{id:"notifications",label:"Notifications",icon:d},{id:"feature-flags",label:"Flags",icon:c},{id:"interactive-agent",label:"Chat",icon:x.MessageSquare},{id:"database",label:"Database",icon:u}];function tK({label:e,description:n,htmlFor:a,children:r}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(w.Label,{htmlFor:a,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),n?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:n}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r})]})}function tq({label:e,description:n,id:a,testId:r,checked:i,onChange:l,disabled:o}){return(0,t.jsx)(tK,{label:e,description:n,htmlFor:a,children:(0,t.jsx)(y.Switch,{id:a,"data-testid":r,checked:i,onCheckedChange:l,disabled:o,className:(0,b.cn)("cursor-pointer",o&&"cursor-not-allowed opacity-50")})})}function tG({icon:e,title:n,description:a,badge:r,testId:i,children:l}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":i,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:n}),r?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:r}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:a})]}),(0,t.jsx)("div",{className:"px-4",children:l})]})}function t$({id:e,testId:n,value:a,onChange:r,onBlur:i,placeholder:l,min:o=1,max:s,step:d=1,suffix:c}){let u=""===a?void 0:parseInt(a,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{r(String(Math.max(o,(u??parseInt(l,10))-d)))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":"Decrease",children:(0,t.jsx)(p.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":n,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:a,placeholder:l,onChange:e=>{r(e.target.value.replace(/[^0-9]/g,""))},onBlur:i,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=u??parseInt(l,10),r(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":"Increase",children:(0,t.jsx)(m.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function tY({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function tZ({children:e,links:n}){return(0,t.jsxs)("div",{className:"hidden pt-2 lg:block",children:[(0,t.jsx)("p",{className:"text-muted-foreground/70 text-[11px] leading-relaxed",children:e}),null!=n&&n.length>0?(0,t.jsx)("div",{className:"mt-2 flex flex-col gap-1",children:n.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(h.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function tX({settings:e,shepHome:o,dbFileSize:p,availableTerminals:m}){let{showSaving:h,showSaved:w,save:y}=function(){let[e,t]=(0,n.useTransition)(),[a,r]=(0,n.useState)(!1),[i,l]=(0,n.useState)(!1),o=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!a&&(r(!0),s.current=!1,o.current=setTimeout(()=>{o.current=null,s.current&&(r(!1),l(!0),setTimeout(()=>l(!1),2e3))},350)),!e&&a&&(s.current=!0,o.current||(r(!1),l(!0),setTimeout(()=>l(!1),2e3)))},[e,a]),{showSaving:a,showSaved:i,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e4(e);t.success||v.toast.error(t.error??"Failed to save settings")})},[t])}}(),S=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1},[j,C]=(0,n.useState)(e.agent.type),[k,I]=(0,n.useState)(e.environment.defaultEditor),[M,N]=(0,n.useState)(e.environment.shellPreference),[P,R]=(0,n.useState)(e.environment.terminalPreference??e8.TerminalType.System),E=m?m.filter(e=>e.available):[{id:e8.TerminalType.System,name:"System Terminal",available:!0}],[T,A]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[D,F]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[L,H]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[B,z]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[_,V]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[W,O]=(0,n.useState)(e.workflow.enableEvidence),[U,K]=(0,n.useState)(e.workflow.commitEvidence),[q,G]=(0,n.useState)(!1!==e.workflow.ciWatchEnabled),[$,Y]=(0,n.useState)(!1!==e.workflow.hideCiStatus),[Z,X]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[Q,J]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[ee,et]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[en,ea]=(0,n.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),er=e.workflow.stageTimeouts,[ei,el]=(0,n.useState)(String(Math.round((er?.analyzeMs??18e5)/1e3))),[eo,es]=(0,n.useState)(String(Math.round((er?.requirementsMs??18e5)/1e3))),[ed,ec]=(0,n.useState)(String(Math.round((er?.researchMs??18e5)/1e3))),[eu,ep]=(0,n.useState)(String(Math.round((er?.planMs??18e5)/1e3))),[em,eh]=(0,n.useState)(String(Math.round((er?.implementMs??18e5)/1e3))),[ef,eg]=(0,n.useState)(String(Math.round((er?.mergeMs??18e5)/1e3))),ex=e.workflow.analyzeRepoTimeouts,[ev,eb]=(0,n.useState)(String(Math.round((ex?.analyzeMs??6e5)/1e3))),ew=e.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[ey,eS]=(0,n.useState)(ew.enabled),[ej,eC]=(0,n.useState)(String(ew.autoTimeoutMinutes)),[ek,eI]=(0,n.useState)(String(ew.maxConcurrentSessions)),[eM,eN]=(0,n.useState)(e.notifications.inApp.enabled),[eP,eR]=(0,n.useState)({...e.notifications.events}),[eE,eT]=(0,n.useState)({...S}),eA=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",eD=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",eF=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",eL=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"",eH=er?.analyzeMs!=null?String(Math.round(er.analyzeMs/1e3)):"",eB=er?.requirementsMs!=null?String(Math.round(er.requirementsMs/1e3)):"",ez=er?.researchMs!=null?String(Math.round(er.researchMs/1e3)):"",e_=er?.planMs!=null?String(Math.round(er.planMs/1e3)):"",eV=er?.implementMs!=null?String(Math.round(er.implementMs/1e3)):"",eW=er?.mergeMs!=null?String(Math.round(er.mergeMs/1e3)):"",eO=ex?.analyzeMs!=null?String(Math.round(ex.analyzeMs/1e3)):"";function eU(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eK(e){if(void 0===e)return;let t=eU(e);return null!=t?1e3*t:void 0}function eq(e={}){let t=eU(e.ciTimeout??Q);return{workflow:{openPrOnImplementationComplete:e.openPr??T,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??D,allowPrd:e.allowPrd??L,allowPlan:e.allowPlan??B,allowMerge:e.allowMerge??_},enableEvidence:e.enableEvidence??W,commitEvidence:e.commitEvidence??U,ciWatchEnabled:e.ciWatchEnabled??q,hideCiStatus:e.hideCiStatus??$,ciMaxFixAttempts:eU(e.ciMaxFix??Z),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:eU(e.ciLogMax??ee),ciWatchPollIntervalSeconds:eU(e.ciPollInterval??en),stageTimeouts:{analyzeMs:eK(e.analyzeTimeout??ei),requirementsMs:eK(e.requirementsTimeout??eo),researchMs:eK(e.researchTimeout??ed),planMs:eK(e.planTimeout??eu),implementMs:eK(e.implementTimeout??em),mergeMs:eK(e.mergeTimeout??ef)},analyzeRepoTimeouts:{analyzeMs:eK(e.analyzeRepoTimeout??ev)}}}}function eG(e={}){return{notifications:{inApp:{enabled:e.inApp??eM},events:e.events??eP}}}let[e$,eY]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=tU.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&eY(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let eZ=(0,n.useCallback)(e=>{let t=document.getElementById(`section-${e}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),t.style.animation="none",t.offsetHeight,t.style.animation="section-flash 1s ease-out")},[]);return(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl",children:[(0,t.jsx)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 grid grid-cols-1 gap-x-5 pt-6 pb-4 backdrop-blur lg:grid-cols-[1fr_280px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Settings"}),(0,t.jsxs)("span",{className:"relative h-4 w-16",children:[(0,t.jsx)("span",{className:(0,b.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",h?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,b.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",w&&!h?"opacity-100":"opacity-0"),children:[(0,t.jsx)(a.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:tU.map(e=>{let n=e.icon,a=e$===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>eZ(e.id),className:(0,b.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",a?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(n,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(tG,{icon:r.Bot,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:(0,t.jsx)(tK,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(to.AgentModelPicker,{initialAgentType:j,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>C(e),className:"w-55"})})}),(0,t.jsx)(tZ,{links:[{label:"Agent system",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/agent-system.md"},{label:"Adding agents",href:"https://github.com/shep-ai/cli/blob/main/docs/development/adding-agents.md"},{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Choose which AI coding agent powers your features. Each agent supports different models and capabilities. Authentication is resolved automatically via your active session."})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:i.Terminal,title:"Environment",description:"Editor, shell, and terminal preferences",testId:"environment-settings-section",children:[(0,t.jsx)(tK,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(eX,{value:k,onValueChange:e=>{I(e),y({environment:{defaultEditor:e,shellPreference:M,terminalPreference:P}})},children:[(0,t.jsx)(eJ,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:tW.map(e=>{var n;let a=(n=e.value)&&n in tl?tl[n]:te;return(0,t.jsx)(e3,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(a,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(tK,{label:"Shell",description:"Default shell for generated scripts",htmlFor:"shell-preference",children:(0,t.jsxs)(eX,{value:M,onValueChange:e=>{N(e),y({environment:{defaultEditor:k,shellPreference:e,terminalPreference:P}})},children:[(0,t.jsx)(eJ,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:tO.map(e=>(0,t.jsx)(e3,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(tK,{label:"Terminal",description:"Terminal emulator for shell sessions",htmlFor:"terminal-preference",children:(0,t.jsxs)(eX,{value:P,onValueChange:e=>{R(e),y({environment:{defaultEditor:k,shellPreference:M,terminalPreference:e}})},children:[(0,t.jsx)(eJ,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:E.map(e=>(0,t.jsx)(e3,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)(tZ,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor opens files for review. The shell setting controls generated scripts. The terminal emulator is launched when opening shell sessions from the web UI."})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:l.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(tY,{children:"Approve"}),(0,t.jsx)(tq,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:L,onChange:e=>{H(e),y(eq({allowPrd:e}))}}),(0,t.jsx)(tq,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:B,onChange:e=>{z(e),y(eq({allowPlan:e}))}}),(0,t.jsx)(tq,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:_,onChange:e=>{V(e),y(eq({allowMerge:e}))}}),(0,t.jsx)(tY,{children:"Evidence"}),(0,t.jsx)(tq,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:W,onChange:e=>{O(e),e?y(eq({enableEvidence:e})):(K(!1),y(eq({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tq,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:U,disabled:!W||!T,onChange:e=>{K(e),y(eq({commitEvidence:e}))}}),(0,t.jsx)(tY,{children:"Git"}),(0,t.jsx)(tq,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:D,onChange:e=>{F(e),y(eq({pushOnComplete:e}))}}),(0,t.jsx)(tq,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:T,onChange:e=>{A(e),e?y(eq({openPr:e})):(K(!1),y(eq({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(tq,{label:"Watch CI after push",description:"Monitor CI and auto-fix failures. Disable to avoid rate limits.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:q,onChange:e=>{G(e),y(eq({ciWatchEnabled:e}))}})]}),(0,t.jsx)(tZ,{links:[{label:"Approval gates",href:"https://github.com/shep-ai/cli/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:"Push & PR flags",href:"https://github.com/shep-ai/cli/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:"Control how autonomous each feature run is. Auto-approve skips the human review pause at each phase. Push and PR options control what happens after successful implementation."})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:s,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tK,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(t$,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:Z,onChange:X,onBlur:()=>{Z!==eA&&y(eq({ciMaxFix:Z}))},min:1,max:10})}),(0,t.jsx)(tK,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(t$,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:Q,onChange:J,onBlur:()=>{Q!==eD&&y(eq({ciTimeout:Q}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tK,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(t$,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:ee,onChange:et,onBlur:()=>{ee!==eF&&y(eq({ciLogMax:ee}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(tK,{label:"Poll interval",description:"How often to check GitHub for CI status updates",htmlFor:"ci-poll-interval",children:(0,t.jsx)(t$,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:en,onChange:ea,onBlur:()=>{en!==eL&&y(eq({ciPollInterval:en}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(tq,{label:"Hide CI status",description:"Hide CI status badges from feature drawer and merge review",id:"hide-ci-status",testId:"switch-hide-ci-status",checked:$,onChange:e=>{Y(e),y(eq({hideCiStatus:e}))}})]}),(0,t.jsx)(tZ,{links:[{label:"CI/CD pipeline",href:"https://github.com/shep-ai/cli/blob/main/docs/development/cicd.md"},{label:"CI security gates",href:"https://github.com/shep-ai/cli/blob/main/specs/003-cicd-security-gates/spec.md"}],children:"When a feature completes, the agent can watch CI and auto-fix failures. These limits prevent runaway retries and control how much log output is sent to the agent for analysis."})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:g.Timer,title:"Stage Timeouts",description:"Maximum execution time per agent stage",testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(tY,{children:"Feature Agent"}),(0,t.jsx)(tK,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze",children:(0,t.jsx)(tV,{id:"timeout-analyze",testId:"timeout-analyze-input",value:ei,onChange:el,onBlur:()=>{ei!==eH&&y(eq({analyzeTimeout:ei}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Requirements",description:"Requirements gathering timeout",htmlFor:"timeout-requirements",children:(0,t.jsx)(tV,{id:"timeout-requirements",testId:"timeout-requirements-input",value:eo,onChange:es,onBlur:()=>{eo!==eB&&y(eq({requirementsTimeout:eo}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Research",description:"Technical research timeout",htmlFor:"timeout-research",children:(0,t.jsx)(tV,{id:"timeout-research",testId:"timeout-research-input",value:ed,onChange:ec,onBlur:()=>{ed!==ez&&y(eq({researchTimeout:ed}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Plan",description:"Implementation planning timeout",htmlFor:"timeout-plan",children:(0,t.jsx)(tV,{id:"timeout-plan",testId:"timeout-plan-input",value:eu,onChange:ep,onBlur:()=>{eu!==e_&&y(eq({planTimeout:eu}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Implement",description:"Code implementation timeout",htmlFor:"timeout-implement",children:(0,t.jsx)(tV,{id:"timeout-implement",testId:"timeout-implement-input",value:em,onChange:eh,onBlur:()=>{em!==eV&&y(eq({implementTimeout:em}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Merge",description:"PR creation and merge timeout",htmlFor:"timeout-merge",children:(0,t.jsx)(tV,{id:"timeout-merge",testId:"timeout-merge-input",value:ef,onChange:eg,onBlur:()=>{ef!==eW&&y(eq({mergeTimeout:ef}))},defaultSeconds:1800})}),(0,t.jsx)(tY,{children:"Analyze Repository Agent"}),(0,t.jsx)(tK,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(tV,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:ev,onChange:eb,onBlur:()=>{ev!==eO&&y(eq({analyzeRepoTimeout:ev}))},defaultSeconds:600})})]}),(0,t.jsx)(tZ,{children:"Each agent has independently configurable stage timeouts. When a stage exceeds its timeout, the agent is terminated. Longer timeouts are useful for complex implementations. Feature agent defaults to 30 minutes per stage. Analyze repository agent defaults to 10 minutes."})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:d,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(tY,{children:"Channels"}),(0,t.jsx)(tq,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:eM,onChange:e=>{eN(e),y(eG({inApp:e}))}}),(0,t.jsx)(tY,{children:"Agent Events"}),(0,t.jsx)(tq,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:eP.agentStarted,onChange:e=>{let t={...eP,agentStarted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:eP.phaseCompleted,onChange:e=>{let t={...eP,phaseCompleted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:eP.waitingApproval,onChange:e=>{let t={...eP,waitingApproval:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:eP.agentCompleted,onChange:e=>{let t={...eP,agentCompleted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:eP.agentFailed,onChange:e=>{let t={...eP,agentFailed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tY,{children:"Pull Request Events"}),(0,t.jsx)(tq,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:eP.prMerged,onChange:e=>{let t={...eP,prMerged:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:eP.prClosed,onChange:e=>{let t={...eP,prClosed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:eP.prChecksPassed,onChange:e=>{let t={...eP,prChecksPassed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:eP.prChecksFailed,onChange:e=>{let t={...eP,prChecksFailed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR blocked",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:eP.prBlocked,onChange:e=>{let t={...eP,prBlocked:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Merge review ready",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:eP.mergeReviewReady,onChange:e=>{let t={...eP,mergeReviewReady:e};eR(t),y(eG({events:t}))}})]}),(0,t.jsx)(tZ,{links:[{label:"Notification system",href:"https://github.com/shep-ai/cli/blob/main/specs/021-agent-notifications/spec.yaml"}],children:"In-app toast notifications keep you in the loop. Fine-tune which agent lifecycle events trigger a notification."})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:c,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tq,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:eE.skills,onChange:e=>{let t={...eE,skills:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:eE.envDeploy,onChange:e=>{let t={...eE,envDeploy:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:eE.debug,onChange:e=>{let t={...eE,debug:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"GitHub Import",description:"Enable GitHub repository import in the web UI",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:eE.githubImport,onChange:e=>{let t={...eE,githubImport:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Adopt Branch",description:"Import existing branches as tracked features",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:eE.adoptBranch,onChange:e=>{let t={...eE,adoptBranch:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Git Rebase & Sync",description:"Enable git rebase-on-main and sync-main operations",id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:eE.gitRebaseSync,onChange:e=>{let t={...eE,gitRebaseSync:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"React File Manager",description:"Use the built-in React file manager instead of the native OS folder picker",id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:eE.reactFileManager,onChange:e=>{let t={...eE,reactFileManager:e};eT(t),y({featureFlags:t})}})]}),(0,t.jsx)(tZ,{children:"Experimental features that are still under development. Enable at your own risk — they may change or be removed in future versions. Debug mode adds verbose logging useful for troubleshooting."})]}),(0,t.jsxs)("div",{id:"section-interactive-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:x.MessageSquare,title:"Interactive Agent",description:"Chat tab settings for per-feature interactive agent sessions",testId:"interactive-agent-settings-section",children:[(0,t.jsx)(tq,{label:"Enable Chat tab",description:"Show the Chat tab on all feature detail pages",id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:ey,onChange:e=>{eS(e),y({interactiveAgent:{enabled:e,autoTimeoutMinutes:parseInt(ej,10)||15,maxConcurrentSessions:parseInt(ek,10)||3}})}}),(0,t.jsx)(tK,{label:"Auto-timeout",description:"Minutes of inactivity before the agent is stopped automatically (1–120)",htmlFor:"interactive-agent-timeout",children:(0,t.jsx)(t$,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:ej,placeholder:"15",min:1,max:120,suffix:"min",onChange:eC,onBlur:()=>{let e=parseInt(ej,10),t=Number.isNaN(e)?15:Math.min(120,Math.max(1,e));eC(String(t)),y({interactiveAgent:{enabled:ey,autoTimeoutMinutes:t,maxConcurrentSessions:parseInt(ek,10)||3}})}})}),(0,t.jsx)(tK,{label:"Max concurrent sessions",description:"Maximum number of active interactive agent sessions at once (1–10)",htmlFor:"interactive-agent-sessions",children:(0,t.jsx)(t$,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:ek,placeholder:"3",min:1,max:10,onChange:eI,onBlur:()=>{let e=parseInt(ek,10),t=Number.isNaN(e)?3:Math.min(10,Math.max(1,e));eI(String(t)),y({interactiveAgent:{enabled:ey,autoTimeoutMinutes:parseInt(ej,10)||15,maxConcurrentSessions:t}})}})})]}),(0,t.jsx)(tZ,{children:"The Chat tab spawns a persistent agent process per feature. Auto-timeout stops idle sessions automatically to conserve resources. The concurrent session cap prevents runaway resource usage on developer machines."})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:u,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tK,{label:"Location",description:"Path to the local SQLite database",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shep-home-path",children:o})}),(0,t.jsx)(tK,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:p})})]}),(0,t.jsx)(tZ,{links:[{label:"Settings service",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/settings-service.md"},{label:"Settings spec",href:"https://github.com/shep-ai/cli/blob/main/specs/005-global-settings-service/spec.md"}],children:"All settings are stored in a local SQLite database at ~/.shep/data. The database uses a singleton record pattern with automatic migrations on startup."})]})]})]})}e.s(["SettingsPageClient",()=>tX],41952)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(20314),n=e.i(79054),a=e.i(23925),r=e.i(26370),i=e.i(38573),l=e.i(49228),o=e.i(3645);let s=(0,o.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),d=(0,o.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),c=(0,o.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),u=(0,o.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var p=e.i(10714),p=p,m=e.i(3214),h=e.i(30702);let f=(0,o.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var g=e.i(58860),x=e.i(48109),v=e.i(60112),b=e.i(31777),w=e.i(41957),y=e.i(51911),S=e.i(26036),j=e.i(27069),C=e.i(91967),k=e.i(87342),I=e.i(5978),M=e.i(22528),N=e.i(66033),P=e.i(53532),R=e.i(41687),E=e.i(56720),T=e.i(13123),A=e.i(52740),D=e.i(39979),F=e.i(87620),L=e.i(86874),H=e.i(29297),B=e.i(36589),z=e.i(5192),_=e.i(23405),V=e.i(1693),W=e.i(73772),O=e.i(13044),U=[" ","Enter","ArrowUp","ArrowDown"],K=[" ","Enter"],q="Select",[G,$,Y]=(0,k.createCollection)(q),[Z,X]=(0,M.createContextScope)(q,[Y,A.createPopperScope]),Q=(0,A.createPopperScope)(),[J,ee]=Z(q),[et,en]=Z(q),ea=e=>{let{__scopeSelect:a,children:r,open:i,defaultOpen:l,onOpenChange:o,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:m,disabled:h,required:f,form:g}=e,x=Q(a),[v,b]=n.useState(null),[w,y]=n.useState(null),[S,j]=n.useState(!1),C=(0,N.useDirection)(u),[k,I]=(0,B.useControllableState)({prop:i,defaultProp:l??!1,onChange:o,caller:q}),[M,P]=(0,B.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:q}),R=n.useRef(null),E=!v||g||!!v.closest("form"),[D,F]=n.useState(new Set),L=Array.from(D).map(e=>e.props.value).join(";");return(0,t.jsx)(A.Root,{...x,children:(0,t.jsxs)(J,{required:f,scope:a,trigger:v,onTriggerChange:b,valueNode:w,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:(0,T.useId)(),value:M,onValueChange:P,open:k,onOpenChange:I,dir:C,triggerPointerDownPosRef:R,disabled:h,children:[(0,t.jsx)(G.Provider,{scope:a,children:(0,t.jsx)(et,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{F(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{F(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:r})}),E?(0,t.jsxs)(eU,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:m,value:M,onChange:e=>P(e.target.value),disabled:h,form:g,children:[void 0===M?(0,t.jsx)("option",{value:""}):null,Array.from(D)]},L):null]})})};ea.displayName=q;var er="SelectTrigger",ei=n.forwardRef((e,a)=>{let{__scopeSelect:r,disabled:i=!1,...l}=e,o=Q(r),s=ee(er,r),d=s.disabled||i,c=(0,I.useComposedRefs)(a,s.onTriggerChange),u=$(r),p=n.useRef("touch"),[m,h,f]=eq(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),a=eG(t,e,n);void 0!==a&&s.onValueChange(a.value)}),g=e=>{d||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(A.Anchor,{asChild:!0,...o,children:(0,t.jsx)(F.Primitive.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":eK(s.value)?"":void 0,...l,ref:c,onClick:(0,C.composeEventHandlers)(l.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,C.composeEventHandlers)(l.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:(0,C.composeEventHandlers)(l.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&U.includes(e.key)&&(g(),e.preventDefault())})})})});ei.displayName=er;var el="SelectValue",eo=n.forwardRef((e,n)=>{let{__scopeSelect:a,className:r,style:i,children:l,placeholder:o="",...s}=e,d=ee(el,a),{onValueNodeHasChildrenChange:c}=d,u=void 0!==l,p=(0,I.useComposedRefs)(n,d.onValueNodeChange);return(0,z.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(F.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eK(d.value)?(0,t.jsx)(t.Fragment,{children:o}):l})});eo.displayName=el;var es=n.forwardRef((e,n)=>{let{__scopeSelect:a,children:r,...i}=e;return(0,t.jsx)(F.Primitive.span,{"aria-hidden":!0,...i,ref:n,children:r||"▼"})});es.displayName="SelectIcon";var ed=e=>(0,t.jsx)(D.Portal,{asChild:!0,...e});ed.displayName="SelectPortal";var ec="SelectContent",eu=n.forwardRef((e,a)=>{let r=ee(ec,e.__scopeSelect),[i,l]=n.useState();return((0,z.useLayoutEffect)(()=>{l(new DocumentFragment)},[]),r.open)?(0,t.jsx)(ef,{...e,ref:a}):i?S.createPortal((0,t.jsx)(ep,{scope:e.__scopeSelect,children:(0,t.jsx)(G.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});eu.displayName=ec;var[ep,em]=Z(ec),eh=(0,L.createSlot)("SelectContent.RemoveScroll"),ef=n.forwardRef((e,a)=>{let{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:o,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...b}=e,w=ee(ec,r),[y,S]=n.useState(null),[j,k]=n.useState(null),M=(0,I.useComposedRefs)(a,e=>S(e)),[N,T]=n.useState(null),[A,D]=n.useState(null),F=$(r),[L,H]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,W.hideOthers)(y)},[y]),(0,R.useFocusGuards)();let z=n.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[a]=n.slice(-1),r=document.activeElement;for(let n of e)if(n===r||(n?.scrollIntoView({block:"nearest"}),n===t&&j&&(j.scrollTop=0),n===a&&j&&(j.scrollTop=j.scrollHeight),n?.focus(),document.activeElement!==r))return},[F,j]),_=n.useCallback(()=>z([N,y]),[z,N,y]);n.useEffect(()=>{L&&_()},[L,_]);let{onOpenChange:V,triggerPointerDownPosRef:U}=w;n.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(U.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(U.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||V(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[y,V,U]),n.useEffect(()=>{let e=()=>V(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[V]);let[K,q]=eq(e=>{let t=F().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),a=eG(t,e,n);a&&setTimeout(()=>a.ref.current.focus())}),G=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==w.value&&w.value===t||a)&&(T(e),a&&(B.current=!0))},[w.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==w.value&&w.value===t||a)&&D(e)},[w.value]),X="popper"===i?ex:eg,Q=X===ex?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(ep,{scope:r,content:y,viewport:j,onViewportChange:k,itemRefCallback:G,selectedItem:N,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:A,position:i,isPositioned:L,searchRef:K,children:(0,t.jsx)(O.RemoveScroll,{as:eh,allowPinchZoom:!0,children:(0,t.jsx)(E.FocusScope,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,C.composeEventHandlers)(l,e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(P.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:(0,t.jsx)(X,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...b,...Q,onPlaced:()=>H(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:(0,C.composeEventHandlers)(b.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||q(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,a=t.indexOf(n);t=t.slice(a+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});ef.displayName="SelectContentImpl";var eg=n.forwardRef((e,a)=>{let{__scopeSelect:r,onPlaced:i,...l}=e,o=ee(ec,r),s=em(ec,r),[d,c]=n.useState(null),[u,p]=n.useState(null),m=(0,I.useComposedRefs)(a,e=>p(e)),h=$(r),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:b,focusSelectedItem:w}=s,y=n.useCallback(()=>{if(o.trigger&&o.valueNode&&d&&u&&x&&v&&b){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=b.getBoundingClientRect();if("rtl"!==o.dir){let r=a.left-t.left,i=n.left-r,l=e.left-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,j.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.left=u+"px"}else{let r=t.right-a.right,i=window.innerWidth-n.right-r,l=window.innerWidth-e.right-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,j.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.right=u+"px"}let r=h(),l=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),m=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),w=p+m+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,w),S=window.getComputedStyle(x),C=parseInt(S.paddingTop,10),k=parseInt(S.paddingBottom,10),I=e.top+e.height/2-10,M=v.offsetHeight/2,N=p+m+(v.offsetTop+M);if(N<=I){let e=r.length>0&&v===r[r.length-1].ref.current;d.style.bottom="0px";let t=Math.max(l-I,M+(e?k:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=N+t+"px"}else{let e=r.length>0&&v===r[0].ref.current;d.style.top="0px";let t=Math.max(I,p+x.offsetTop+(e?C:0)+M);d.style.height=t+(w-N)+"px",x.scrollTop=N-I+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=l+"px",i?.(),requestAnimationFrame(()=>f.current=!0)}},[h,o.trigger,o.valueNode,d,u,x,v,b,o.dir,i]);(0,z.useLayoutEffect)(()=>y(),[y]);let[S,C]=n.useState();(0,z.useLayoutEffect)(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let k=n.useCallback(e=>{e&&!0===g.current&&(y(),w?.(),g.current=!1)},[y,w]);return(0,t.jsx)(ev,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:k,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:(0,t.jsx)(F.Primitive.div,{...l,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});eg.displayName="SelectItemAlignedPosition";var ex=n.forwardRef((e,n)=>{let{__scopeSelect:a,align:r="start",collisionPadding:i=10,...l}=e,o=Q(a);return(0,t.jsx)(A.Content,{...o,...l,ref:n,align:r,collisionPadding:i,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ex.displayName="SelectPopperPosition";var[ev,eb]=Z(ec,{}),ew="SelectViewport",ey=n.forwardRef((e,a)=>{let{__scopeSelect:r,nonce:i,...l}=e,o=em(ew,r),s=eb(ew,r),d=(0,I.useComposedRefs)(a,o.onViewportChange),c=n.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,t.jsx)(G.Slot,{scope:r,children:(0,t.jsx)(F.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:(0,C.composeEventHandlers)(l.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:a}=s;if(a?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let a=window.innerHeight-20,r=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(r<a){let i=r+e,l=Math.min(a,i),o=i-l;n.style.height=l+"px","0px"===n.style.bottom&&(t.scrollTop=o>0?o:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});ey.displayName=ew;var eS="SelectGroup",[ej,eC]=Z(eS),ek=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=(0,T.useId)();return(0,t.jsx)(ej,{scope:a,id:i,children:(0,t.jsx)(F.Primitive.div,{role:"group","aria-labelledby":i,...r,ref:n})})});ek.displayName=eS;var eI="SelectLabel",eM=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=eC(eI,a);return(0,t.jsx)(F.Primitive.div,{id:i.id,...r,ref:n})});eM.displayName=eI;var eN="SelectItem",[eP,eR]=Z(eN),eE=n.forwardRef((e,a)=>{let{__scopeSelect:r,value:i,disabled:l=!1,textValue:o,...s}=e,d=ee(eN,r),c=em(eN,r),u=d.value===i,[p,m]=n.useState(o??""),[h,f]=n.useState(!1),g=(0,I.useComposedRefs)(a,e=>c.itemRefCallback?.(e,i,l)),x=(0,T.useId)(),v=n.useRef("touch"),b=()=>{l||(d.onValueChange(i),d.onOpenChange(!1))};if(""===i)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(eP,{scope:r,value:i,disabled:l,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(G.ItemSlot,{scope:r,value:i,disabled:l,textValue:p,children:(0,t.jsx)(F.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...s,ref:g,onFocus:(0,C.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,C.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,C.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&b()}),onPointerUp:(0,C.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&b()}),onPointerDown:(0,C.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,C.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,l?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,C.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,C.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(K.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})});eE.displayName=eN;var eT="SelectItemText",eA=n.forwardRef((e,a)=>{let{__scopeSelect:r,className:i,style:l,...o}=e,s=ee(eT,r),d=em(eT,r),c=eR(eT,r),u=en(eT,r),[p,m]=n.useState(null),h=(0,I.useComposedRefs)(a,e=>m(e),c.onItemTextChange,e=>d.itemTextRefCallback?.(e,c.value,c.disabled)),f=p?.textContent,g=n.useMemo(()=>(0,t.jsx)("option",{value:c.value,disabled:c.disabled,children:f},c.value),[c.disabled,c.value,f]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=u;return(0,z.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(F.Primitive.span,{id:c.textId,...o,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?S.createPortal(o.children,s.valueNode):null]})});eA.displayName=eT;var eD="SelectItemIndicator",eF=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e;return eR(eD,a).isSelected?(0,t.jsx)(F.Primitive.span,{"aria-hidden":!0,...r,ref:n}):null});eF.displayName=eD;var eL="SelectScrollUpButton",eH=n.forwardRef((e,a)=>{let r=em(eL,e.__scopeSelect),i=eb(eL,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,I.useComposedRefs)(a,i.onScrollButtonChange);return(0,z.useLayoutEffect)(()=>{if(r.viewport&&r.isPositioned){let e=function(){o(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),l?(0,t.jsx)(e_,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eH.displayName=eL;var eB="SelectScrollDownButton",ez=n.forwardRef((e,a)=>{let r=em(eB,e.__scopeSelect),i=eb(eB,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,I.useComposedRefs)(a,i.onScrollButtonChange);return(0,z.useLayoutEffect)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),l?(0,t.jsx)(e_,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ez.displayName=eB;var e_=n.forwardRef((e,a)=>{let{__scopeSelect:r,onAutoScroll:i,...l}=e,o=em("SelectScrollButton",r),s=n.useRef(null),d=$(r),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,z.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(F.Primitive.div,{"aria-hidden":!0,...l,ref:a,style:{flexShrink:0,...l.style},onPointerDown:(0,C.composeEventHandlers)(l.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(i,50))}),onPointerMove:(0,C.composeEventHandlers)(l.onPointerMove,()=>{o.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(i,50))}),onPointerLeave:(0,C.composeEventHandlers)(l.onPointerLeave,()=>{c()})})}),eV=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e;return(0,t.jsx)(F.Primitive.div,{"aria-hidden":!0,...r,ref:n})});eV.displayName="SelectSeparator";var eW="SelectArrow",eO=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=Q(a),l=ee(eW,a),o=em(eW,a);return l.open&&"popper"===o.position?(0,t.jsx)(A.Arrow,{...i,...r,ref:n}):null});eO.displayName=eW;var eU=n.forwardRef(({__scopeSelect:e,value:a,...r},i)=>{let l=n.useRef(null),o=(0,I.useComposedRefs)(i,l),s=(0,_.usePrevious)(a);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==a&&t){let n=new Event("change",{bubbles:!0});t.call(e,a),e.dispatchEvent(n)}},[s,a]),(0,t.jsx)(F.Primitive.select,{...r,style:{...V.VISUALLY_HIDDEN_STYLES,...r.style},ref:o,defaultValue:a})});function eK(e){return""===e||void 0===e}function eq(e){let t=(0,H.useCallbackRef)(e),a=n.useRef(""),r=n.useRef(0),i=n.useCallback(e=>{let n=a.current+e;t(n),function e(t){a.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),l=n.useCallback(()=>{a.current="",window.clearTimeout(r.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(r.current),[]),[a,i,l]}function eG(e,t,n){var a,r;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1,o=(a=e,r=Math.max(l,0),a.map((e,t)=>a[(r+t)%a.length]));1===i.length&&(o=o.filter(e=>e!==n));let s=o.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}eU.displayName="SelectBubbleInput",e.s(["Arrow",()=>eO,"Content",()=>eu,"Group",()=>ek,"Icon",()=>es,"Item",()=>eE,"ItemIndicator",()=>eF,"ItemText",()=>eA,"Label",()=>eM,"Portal",()=>ed,"Root",()=>ea,"ScrollDownButton",()=>ez,"ScrollUpButton",()=>eH,"Select",()=>ea,"SelectArrow",()=>eO,"SelectContent",()=>eu,"SelectGroup",()=>ek,"SelectIcon",()=>es,"SelectItem",()=>eE,"SelectItemIndicator",()=>eF,"SelectItemText",()=>eA,"SelectLabel",()=>eM,"SelectPortal",()=>ed,"SelectScrollDownButton",()=>ez,"SelectScrollUpButton",()=>eH,"SelectSeparator",()=>eV,"SelectTrigger",()=>ei,"SelectValue",()=>eo,"SelectViewport",()=>ey,"Separator",()=>eV,"Trigger",()=>ei,"Value",()=>eo,"Viewport",()=>ey,"createSelectScope",()=>X],83830);var e$=e.i(83830),e$=e$,eY=e.i(99105),eZ=e.i(48829);let eX=e$.Root;e$.Group;let eQ=e$.Value,eJ=n.forwardRef(({className:e,children:n,...a},r)=>(0,t.jsxs)(e$.Trigger,{ref:r,className:(0,b.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[n,(0,t.jsx)(e$.Icon,{asChild:!0,children:(0,t.jsx)(eY.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));eJ.displayName=e$.Trigger.displayName;let e0=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.ScrollUpButton,{ref:a,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eZ.ChevronUp,{className:"h-4 w-4"})}));e0.displayName=e$.ScrollUpButton.displayName;let e1=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.ScrollDownButton,{ref:a,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eY.ChevronDown,{className:"h-4 w-4"})}));e1.displayName=e$.ScrollDownButton.displayName;let e2=n.forwardRef(({className:e,children:n,position:a="popper",...r},i)=>(0,t.jsx)(e$.Portal,{children:(0,t.jsxs)(e$.Content,{ref:i,className:(0,b.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...r,children:[(0,t.jsx)(e0,{}),(0,t.jsx)(e$.Viewport,{className:(0,b.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e1,{})]})}));e2.displayName=e$.Content.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.Label,{ref:a,className:(0,b.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=e$.Label.displayName;let e3=n.forwardRef(({className:e,children:n,...r},i)=>(0,t.jsxs)(e$.Item,{ref:i,className:(0,b.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(e$.ItemIndicator,{children:(0,t.jsx)(a.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(e$.ItemText,{children:n})]}));e3.displayName=e$.Item.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.Separator,{ref:a,className:(0,b.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=e$.Separator.displayName;var e5=e.i(21023);let e4=(0,e5.createServerReference)("4045029c15051c8966122901a7acce0afc2d94e455",e5.callServer,void 0,e5.findSourceMapURL,"updateSettingsAction");var e8=e.i(17406),e9=e.i(98804),e6=e.i(44229),e7=e.i(83902);function te(e){return(0,t.jsx)(e6.Code,{className:(0,b.cn)("h-4 w-4",e.className),...e})}function tt({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function tn({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function ta({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function ti({className:e,...n}){return(0,t.jsx)(e7.Rocket,{className:(0,b.cn)("h-4 w-4",e),...n})}tt.displayName="VsCodeIcon",tn.displayName="CursorEditorIcon",ta.displayName="WindsurfIcon",tr.displayName="ZedIcon",ti.displayName="AntigravityIcon";let tl={vscode:tt,cursor:tn,windsurf:ta,zed:tr,antigravity:ti};var to=e.i(41413),ts=e.i(77624),td=["PageUp","PageDown"],tc=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tu={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tp="Slider",[tm,th,tf]=(0,k.createCollection)(tp),[tg,tx]=(0,M.createContextScope)(tp,[tf]),[tv,tb]=tg(tp),tw=n.forwardRef((e,a)=>{let{name:r,min:i=0,max:l=100,step:o=1,orientation:s="horizontal",disabled:d=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[i],value:p,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:f=!1,form:g,...x}=e,v=n.useRef(new Set),b=n.useRef(0),w="horizontal"===s,[y=[],S]=(0,B.useControllableState)({prop:p,defaultProp:u,onChange:e=>{let t=[...v.current];t[b.current]?.focus(),m(e)}}),k=n.useRef(y);function I(e,t,{commit:n}={commit:!1}){let a,r=(String(o).split(".")[1]||"").length,s=Math.round((Math.round((e-i)/o)*o+i)*(a=Math.pow(10,r)))/a,d=(0,j.clamp)(s,[i,l]);S((e=[])=>{let a=function(e=[],t,n){let a=[...e];return a[n]=t,a.sort((e,t)=>e-t)}(e,d,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,n)=>e[n+1]-t))>=t;return!0}(a,c*o))return e;{b.current=a.indexOf(d);let t=String(a)!==String(e);return t&&n&&h(a),t?a:e}})}return(0,t.jsx)(tv,{scope:e.__scopeSlider,name:r,disabled:d,min:i,max:l,valueIndexToChangeRef:b,thumbs:v.current,values:y,orientation:s,form:g,children:(0,t.jsx)(tm.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(tm.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(w?tj:tC,{"aria-disabled":d,"data-disabled":d?"":void 0,...x,ref:a,onPointerDown:(0,C.composeEventHandlers)(x.onPointerDown,()=>{d||(k.current=y)}),min:i,max:l,inverted:f,onSlideStart:d?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let n=e.map(e=>Math.abs(e-t)),a=Math.min(...n);return n.indexOf(a)}(y,e);I(e,t)},onSlideMove:d?void 0:function(e){I(e,b.current)},onSlideEnd:d?void 0:function(){let e=k.current[b.current];y[b.current]!==e&&h(y)},onHomeKeyDown:()=>!d&&I(i,0,{commit:!0}),onEndKeyDown:()=>!d&&I(l,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!d){let n=td.includes(e.key)||e.shiftKey&&tc.includes(e.key),a=b.current;I(y[a]+o*(n?10:1)*t,a,{commit:!0})}}})})})})});tw.displayName=tp;var[ty,tS]=tg(tp,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tj=n.forwardRef((e,a)=>{let{min:r,max:i,dir:l,inverted:o,onSlideStart:s,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...p}=e,[m,h]=n.useState(null),f=(0,I.useComposedRefs)(a,e=>h(e)),g=n.useRef(void 0),x=(0,N.useDirection)(l),v="ltr"===x,b=v&&!o||!v&&o;function w(e){let t=g.current||m.getBoundingClientRect(),n=tF([0,t.width],b?[r,i]:[i,r]);return g.current=t,n(e-t.left)}return(0,t.jsx)(ty,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:(0,t.jsx)(tk,{dir:x,"data-orientation":"horizontal",...p,ref:f,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=w(e.clientX);s?.(t)},onSlideMove:e=>{let t=w(e.clientX);d?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=tu[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),tC=n.forwardRef((e,a)=>{let{min:r,max:i,inverted:l,onSlideStart:o,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=e,p=n.useRef(null),m=(0,I.useComposedRefs)(a,p),h=n.useRef(void 0),f=!l;function g(e){let t=h.current||p.current.getBoundingClientRect(),n=tF([0,t.height],f?[i,r]:[r,i]);return h.current=t,n(e-t.top)}return(0,t.jsx)(ty,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,t.jsx)(tk,{"data-orientation":"vertical",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=g(e.clientY);o?.(t)},onSlideMove:e=>{let t=g(e.clientY);s?.(t)},onSlideEnd:()=>{h.current=void 0,d?.()},onStepKeyDown:e=>{let t=tu[f?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),tk=n.forwardRef((e,n)=>{let{__scopeSlider:a,onSlideStart:r,onSlideMove:i,onSlideEnd:l,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:d,...c}=e,u=tb(tp,a);return(0,t.jsx)(F.Primitive.span,{...c,ref:n,onKeyDown:(0,C.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(o(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):td.concat(tc).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:(0,C.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:(0,C.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:(0,C.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),l(e))})})}),tI="SliderTrack",tM=n.forwardRef((e,n)=>{let{__scopeSlider:a,...r}=e,i=tb(tI,a);return(0,t.jsx)(F.Primitive.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:n})});tM.displayName=tI;var tN="SliderRange",tP=n.forwardRef((e,a)=>{let{__scopeSlider:r,...i}=e,l=tb(tN,r),o=tS(tN,r),s=n.useRef(null),d=(0,I.useComposedRefs)(a,s),c=l.values.length,u=l.values.map(e=>tD(e,l.min,l.max)),p=c>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(F.Primitive.span,{"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,...i,ref:d,style:{...e.style,[o.startEdge]:p+"%",[o.endEdge]:m+"%"}})});tP.displayName=tN;var tR="SliderThumb",tE=n.forwardRef((e,a)=>{let r=th(e.__scopeSlider),[i,l]=n.useState(null),o=(0,I.useComposedRefs)(a,e=>l(e)),s=n.useMemo(()=>i?r().findIndex(e=>e.ref.current===i):-1,[r,i]);return(0,t.jsx)(tT,{...e,ref:o,index:s})}),tT=n.forwardRef((e,a)=>{var r,i,l,o,s;let d,c,{__scopeSlider:u,index:p,name:m,...h}=e,f=tb(tR,u),g=tS(tR,u),[x,v]=n.useState(null),b=(0,I.useComposedRefs)(a,e=>v(e)),w=!x||f.form||!!x.closest("form"),y=(0,ts.useSize)(x),S=f.values[p],j=void 0===S?0:tD(S,f.min,f.max),k=(r=p,(i=f.values.length)>2?`Value ${r+1} of ${i}`:2===i?["Minimum","Maximum"][r]:void 0),M=y?.[g.size],N=M?(l=M,o=j,s=g.direction,c=tF([0,50],[0,d=l/2]),(d-c(o)*s)*s):0;return n.useEffect(()=>{if(x)return f.thumbs.add(x),()=>{f.thumbs.delete(x)}},[x,f.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[g.startEdge]:`calc(${j}% + ${N}px)`},children:[(0,t.jsx)(tm.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(F.Primitive.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":f.min,"aria-valuenow":S,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...h,ref:b,style:void 0===S?{display:"none"}:e.style,onFocus:(0,C.composeEventHandlers)(e.onFocus,()=>{f.valueIndexToChangeRef.current=p})})}),w&&(0,t.jsx)(tA,{name:m??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:S},p)]})});tE.displayName=tR;var tA=n.forwardRef(({__scopeSlider:e,value:a,...r},i)=>{let l=n.useRef(null),o=(0,I.useComposedRefs)(l,i),s=(0,_.usePrevious)(a);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==a&&t){let n=new Event("input",{bubbles:!0});t.call(e,a),e.dispatchEvent(n)}},[s,a]),(0,t.jsx)(F.Primitive.input,{style:{display:"none"},...r,ref:o,defaultValue:a})});function tD(e,t,n){return(0,j.clamp)(100/(n-t)*(e-t),[0,100])}function tF(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(n-e[0])}}tA.displayName="RadioBubbleInput",e.s(["Range",()=>tP,"Root",()=>tw,"Slider",()=>tw,"SliderRange",()=>tP,"SliderThumb",()=>tE,"SliderTrack",()=>tM,"Thumb",()=>tE,"Track",()=>tM,"createSliderScope",()=>tx],29991);var tL=e.i(29991),tL=tL;function tH({className:e,defaultValue:a,value:r,min:i=0,max:l=100,...o}){let s=n.useMemo(()=>Array.isArray(r)?r:Array.isArray(a)?a:[i,l],[r,a,i,l]);return(0,t.jsxs)(tL.Root,{"data-slot":"slider",defaultValue:a,value:r,min:i,max:l,className:(0,b.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...o,children:[(0,t.jsx)(tL.Track,{"data-slot":"slider-track",className:(0,b.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(tL.Range,{"data-slot":"slider-range",className:(0,b.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,n)=>(0,t.jsx)(tL.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},n))]})}let tB=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],tz=tB.length-1;function t_(e){let t=0,n=Math.abs(e-tB[0]);for(let a=1;a<tB.length;a++){let r=Math.abs(e-tB[a]);r<n&&(n=r,t=a)}return t}function tV({id:e,testId:a,value:r,onChange:i,onBlur:l,defaultSeconds:o=1800}){var s;let d,c,u=(""===r?o:parseInt(r,10))||o,[p,m]=(0,n.useState)(()=>t_(u)),h=t_(u);h!==p&&tB[p]!==u&&m(h);let f=(0,n.useCallback)(([e])=>{m(e),i(String(tB[e]))},[i]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(tH,{id:e,"data-testid":a,min:0,max:tz,step:1,value:[p],onValueChange:f,onValueCommit:()=>l(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-right text-xs tabular-nums",children:(d=Math.floor((s=tB[p])/3600),c=Math.round(s%3600/60),0===d?`${c}m`:0===c?`${d}h`:`${d}h ${c}m`)})]})}let tW=[{value:e8.EditorType.VsCode,label:"VS Code"},{value:e8.EditorType.Cursor,label:"Cursor"},{value:e8.EditorType.Windsurf,label:"Windsurf"},{value:e8.EditorType.Zed,label:"Zed"},{value:e8.EditorType.Antigravity,label:"Antigravity"}],tO=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],tU=[{id:"agent",label:"Agent",icon:r.Bot},{id:"environment",label:"Environment",icon:i.Terminal},{id:"workflow",label:"Workflow",icon:l.GitBranch},{id:"ci",label:"CI",icon:s},{id:"stage-timeouts",label:"Timeouts",icon:g.Timer},{id:"notifications",label:"Notifications",icon:d},{id:"feature-flags",label:"Flags",icon:c},{id:"interactive-agent",label:"Chat",icon:x.MessageSquare},{id:"database",label:"Database",icon:u}];function tK({label:e,description:n,htmlFor:a,children:r}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(w.Label,{htmlFor:a,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),n?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:n}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r})]})}function tq({label:e,description:n,id:a,testId:r,checked:i,onChange:l,disabled:o}){return(0,t.jsx)(tK,{label:e,description:n,htmlFor:a,children:(0,t.jsx)(y.Switch,{id:a,"data-testid":r,checked:i,onCheckedChange:l,disabled:o,className:(0,b.cn)("cursor-pointer",o&&"cursor-not-allowed opacity-50")})})}function tG({icon:e,title:n,description:a,badge:r,testId:i,children:l}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":i,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:n}),r?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:r}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:a})]}),(0,t.jsx)("div",{className:"px-4",children:l})]})}function t$({id:e,testId:n,value:a,onChange:r,onBlur:i,placeholder:l,min:o=1,max:s,step:d=1,suffix:c}){let u=""===a?void 0:parseInt(a,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{r(String(Math.max(o,(u??parseInt(l,10))-d)))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":"Decrease",children:(0,t.jsx)(p.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":n,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:a,placeholder:l,onChange:e=>{r(e.target.value.replace(/[^0-9]/g,""))},onBlur:i,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=u??parseInt(l,10),r(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":"Increase",children:(0,t.jsx)(m.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function tY({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function tZ({children:e,links:n}){return(0,t.jsxs)("div",{className:"hidden pt-2 lg:block",children:[(0,t.jsx)("p",{className:"text-muted-foreground/70 text-[11px] leading-relaxed",children:e}),null!=n&&n.length>0?(0,t.jsx)("div",{className:"mt-2 flex flex-col gap-1",children:n.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(h.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function tX({settings:e,shepHome:o,dbFileSize:p,availableTerminals:m}){let{showSaving:h,showSaved:w,save:y}=function(){let[e,t]=(0,n.useTransition)(),[a,r]=(0,n.useState)(!1),[i,l]=(0,n.useState)(!1),o=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!a&&(r(!0),s.current=!1,o.current=setTimeout(()=>{o.current=null,s.current&&(r(!1),l(!0),setTimeout(()=>l(!1),2e3))},350)),!e&&a&&(s.current=!0,o.current||(r(!1),l(!0),setTimeout(()=>l(!1),2e3)))},[e,a]),{showSaving:a,showSaved:i,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e4(e);t.success||v.toast.error(t.error??"Failed to save settings")})},[t])}}(),S=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1},[j,C]=(0,n.useState)(e.agent.type),[k,I]=(0,n.useState)(e.environment.defaultEditor),[M,N]=(0,n.useState)(e.environment.shellPreference),[P,R]=(0,n.useState)(e.environment.terminalPreference??e8.TerminalType.System),E=m?m.filter(e=>e.available):[{id:e8.TerminalType.System,name:"System Terminal",available:!0}],[T,A]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[D,F]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[L,H]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[B,z]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[_,V]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[W,O]=(0,n.useState)(e.workflow.enableEvidence),[U,K]=(0,n.useState)(e.workflow.commitEvidence),[q,G]=(0,n.useState)(!1!==e.workflow.ciWatchEnabled),[$,Y]=(0,n.useState)(!1!==e.workflow.hideCiStatus),[Z,X]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[Q,J]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[ee,et]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[en,ea]=(0,n.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),er=e.workflow.stageTimeouts,[ei,el]=(0,n.useState)(String(Math.round((er?.analyzeMs??18e5)/1e3))),[eo,es]=(0,n.useState)(String(Math.round((er?.requirementsMs??18e5)/1e3))),[ed,ec]=(0,n.useState)(String(Math.round((er?.researchMs??18e5)/1e3))),[eu,ep]=(0,n.useState)(String(Math.round((er?.planMs??18e5)/1e3))),[em,eh]=(0,n.useState)(String(Math.round((er?.implementMs??18e5)/1e3))),[ef,eg]=(0,n.useState)(String(Math.round((er?.mergeMs??18e5)/1e3))),ex=e.workflow.analyzeRepoTimeouts,[ev,eb]=(0,n.useState)(String(Math.round((ex?.analyzeMs??6e5)/1e3))),ew=e.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[ey,eS]=(0,n.useState)(ew.enabled),[ej,eC]=(0,n.useState)(String(ew.autoTimeoutMinutes)),[ek,eI]=(0,n.useState)(String(ew.maxConcurrentSessions)),[eM,eN]=(0,n.useState)(e.notifications.inApp.enabled),[eP,eR]=(0,n.useState)({...e.notifications.events}),[eE,eT]=(0,n.useState)({...S}),eA=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",eD=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",eF=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",eL=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"",eH=er?.analyzeMs!=null?String(Math.round(er.analyzeMs/1e3)):"",eB=er?.requirementsMs!=null?String(Math.round(er.requirementsMs/1e3)):"",ez=er?.researchMs!=null?String(Math.round(er.researchMs/1e3)):"",e_=er?.planMs!=null?String(Math.round(er.planMs/1e3)):"",eV=er?.implementMs!=null?String(Math.round(er.implementMs/1e3)):"",eW=er?.mergeMs!=null?String(Math.round(er.mergeMs/1e3)):"",eO=ex?.analyzeMs!=null?String(Math.round(ex.analyzeMs/1e3)):"";function eU(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eK(e){if(void 0===e)return;let t=eU(e);return null!=t?1e3*t:void 0}function eq(e={}){let t=eU(e.ciTimeout??Q);return{workflow:{openPrOnImplementationComplete:e.openPr??T,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??D,allowPrd:e.allowPrd??L,allowPlan:e.allowPlan??B,allowMerge:e.allowMerge??_},enableEvidence:e.enableEvidence??W,commitEvidence:e.commitEvidence??U,ciWatchEnabled:e.ciWatchEnabled??q,hideCiStatus:e.hideCiStatus??$,ciMaxFixAttempts:eU(e.ciMaxFix??Z),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:eU(e.ciLogMax??ee),ciWatchPollIntervalSeconds:eU(e.ciPollInterval??en),stageTimeouts:{analyzeMs:eK(e.analyzeTimeout??ei),requirementsMs:eK(e.requirementsTimeout??eo),researchMs:eK(e.researchTimeout??ed),planMs:eK(e.planTimeout??eu),implementMs:eK(e.implementTimeout??em),mergeMs:eK(e.mergeTimeout??ef)},analyzeRepoTimeouts:{analyzeMs:eK(e.analyzeRepoTimeout??ev)}}}}function eG(e={}){return{notifications:{inApp:{enabled:e.inApp??eM},events:e.events??eP}}}let[e$,eY]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=tU.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&eY(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let eZ=(0,n.useCallback)(e=>{let t=document.getElementById(`section-${e}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),t.style.animation="none",t.offsetHeight,t.style.animation="section-flash 1s ease-out")},[]);return(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl",children:[(0,t.jsx)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 grid grid-cols-1 gap-x-5 pt-6 pb-4 backdrop-blur lg:grid-cols-[1fr_280px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Settings"}),(0,t.jsxs)("span",{className:"relative h-4 w-16",children:[(0,t.jsx)("span",{className:(0,b.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",h?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,b.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",w&&!h?"opacity-100":"opacity-0"),children:[(0,t.jsx)(a.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:tU.map(e=>{let n=e.icon,a=e$===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>eZ(e.id),className:(0,b.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",a?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(n,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(tG,{icon:r.Bot,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:(0,t.jsx)(tK,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(to.AgentModelPicker,{initialAgentType:j,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>C(e),className:"w-55"})})}),(0,t.jsx)(tZ,{links:[{label:"Agent system",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/agent-system.md"},{label:"Adding agents",href:"https://github.com/shep-ai/cli/blob/main/docs/development/adding-agents.md"},{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Choose which AI coding agent powers your features. Each agent supports different models and capabilities. Authentication is resolved automatically via your active session."})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:i.Terminal,title:"Environment",description:"Editor, shell, and terminal preferences",testId:"environment-settings-section",children:[(0,t.jsx)(tK,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(eX,{value:k,onValueChange:e=>{I(e),y({environment:{defaultEditor:e,shellPreference:M,terminalPreference:P}})},children:[(0,t.jsx)(eJ,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:tW.map(e=>{var n;let a=(n=e.value)&&n in tl?tl[n]:te;return(0,t.jsx)(e3,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(a,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(tK,{label:"Shell",description:"Default shell for generated scripts",htmlFor:"shell-preference",children:(0,t.jsxs)(eX,{value:M,onValueChange:e=>{N(e),y({environment:{defaultEditor:k,shellPreference:e,terminalPreference:P}})},children:[(0,t.jsx)(eJ,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:tO.map(e=>(0,t.jsx)(e3,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(tK,{label:"Terminal",description:"Terminal emulator for shell sessions",htmlFor:"terminal-preference",children:(0,t.jsxs)(eX,{value:P,onValueChange:e=>{R(e),y({environment:{defaultEditor:k,shellPreference:M,terminalPreference:e}})},children:[(0,t.jsx)(eJ,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:E.map(e=>(0,t.jsx)(e3,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)(tZ,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor opens files for review. The shell setting controls generated scripts. The terminal emulator is launched when opening shell sessions from the web UI."})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:l.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(tY,{children:"Approve"}),(0,t.jsx)(tq,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:L,onChange:e=>{H(e),y(eq({allowPrd:e}))}}),(0,t.jsx)(tq,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:B,onChange:e=>{z(e),y(eq({allowPlan:e}))}}),(0,t.jsx)(tq,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:_,onChange:e=>{V(e),y(eq({allowMerge:e}))}}),(0,t.jsx)(tY,{children:"Evidence"}),(0,t.jsx)(tq,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:W,onChange:e=>{O(e),e?y(eq({enableEvidence:e})):(K(!1),y(eq({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tq,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:U,disabled:!W||!T,onChange:e=>{K(e),y(eq({commitEvidence:e}))}}),(0,t.jsx)(tY,{children:"Git"}),(0,t.jsx)(tq,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:D,onChange:e=>{F(e),y(eq({pushOnComplete:e}))}}),(0,t.jsx)(tq,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:T,onChange:e=>{A(e),e?y(eq({openPr:e})):(K(!1),y(eq({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(tq,{label:"Watch CI after push",description:"Monitor CI and auto-fix failures. Disable to avoid rate limits.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:q,onChange:e=>{G(e),y(eq({ciWatchEnabled:e}))}})]}),(0,t.jsx)(tZ,{links:[{label:"Approval gates",href:"https://github.com/shep-ai/cli/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:"Push & PR flags",href:"https://github.com/shep-ai/cli/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:"Control how autonomous each feature run is. Auto-approve skips the human review pause at each phase. Push and PR options control what happens after successful implementation."})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:s,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tK,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(t$,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:Z,onChange:X,onBlur:()=>{Z!==eA&&y(eq({ciMaxFix:Z}))},min:1,max:10})}),(0,t.jsx)(tK,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(t$,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:Q,onChange:J,onBlur:()=>{Q!==eD&&y(eq({ciTimeout:Q}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tK,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(t$,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:ee,onChange:et,onBlur:()=>{ee!==eF&&y(eq({ciLogMax:ee}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(tK,{label:"Poll interval",description:"How often to check GitHub for CI status updates",htmlFor:"ci-poll-interval",children:(0,t.jsx)(t$,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:en,onChange:ea,onBlur:()=>{en!==eL&&y(eq({ciPollInterval:en}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(tq,{label:"Hide CI status",description:"Hide CI status badges from feature drawer and merge review",id:"hide-ci-status",testId:"switch-hide-ci-status",checked:$,onChange:e=>{Y(e),y(eq({hideCiStatus:e}))}})]}),(0,t.jsx)(tZ,{links:[{label:"CI/CD pipeline",href:"https://github.com/shep-ai/cli/blob/main/docs/development/cicd.md"},{label:"CI security gates",href:"https://github.com/shep-ai/cli/blob/main/specs/003-cicd-security-gates/spec.md"}],children:"When a feature completes, the agent can watch CI and auto-fix failures. These limits prevent runaway retries and control how much log output is sent to the agent for analysis."})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:g.Timer,title:"Stage Timeouts",description:"Maximum execution time per agent stage",testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(tY,{children:"Feature Agent"}),(0,t.jsx)(tK,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze",children:(0,t.jsx)(tV,{id:"timeout-analyze",testId:"timeout-analyze-input",value:ei,onChange:el,onBlur:()=>{ei!==eH&&y(eq({analyzeTimeout:ei}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Requirements",description:"Requirements gathering timeout",htmlFor:"timeout-requirements",children:(0,t.jsx)(tV,{id:"timeout-requirements",testId:"timeout-requirements-input",value:eo,onChange:es,onBlur:()=>{eo!==eB&&y(eq({requirementsTimeout:eo}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Research",description:"Technical research timeout",htmlFor:"timeout-research",children:(0,t.jsx)(tV,{id:"timeout-research",testId:"timeout-research-input",value:ed,onChange:ec,onBlur:()=>{ed!==ez&&y(eq({researchTimeout:ed}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Plan",description:"Implementation planning timeout",htmlFor:"timeout-plan",children:(0,t.jsx)(tV,{id:"timeout-plan",testId:"timeout-plan-input",value:eu,onChange:ep,onBlur:()=>{eu!==e_&&y(eq({planTimeout:eu}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Implement",description:"Code implementation timeout",htmlFor:"timeout-implement",children:(0,t.jsx)(tV,{id:"timeout-implement",testId:"timeout-implement-input",value:em,onChange:eh,onBlur:()=>{em!==eV&&y(eq({implementTimeout:em}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Merge",description:"PR creation and merge timeout",htmlFor:"timeout-merge",children:(0,t.jsx)(tV,{id:"timeout-merge",testId:"timeout-merge-input",value:ef,onChange:eg,onBlur:()=>{ef!==eW&&y(eq({mergeTimeout:ef}))},defaultSeconds:1800})}),(0,t.jsx)(tY,{children:"Analyze Repository Agent"}),(0,t.jsx)(tK,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(tV,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:ev,onChange:eb,onBlur:()=>{ev!==eO&&y(eq({analyzeRepoTimeout:ev}))},defaultSeconds:600})})]}),(0,t.jsx)(tZ,{children:"Each agent has independently configurable stage timeouts. When a stage exceeds its timeout, the agent is terminated. Longer timeouts are useful for complex implementations. Feature agent defaults to 30 minutes per stage. Analyze repository agent defaults to 10 minutes."})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:d,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(tY,{children:"Channels"}),(0,t.jsx)(tq,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:eM,onChange:e=>{eN(e),y(eG({inApp:e}))}}),(0,t.jsx)(tY,{children:"Agent Events"}),(0,t.jsx)(tq,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:eP.agentStarted,onChange:e=>{let t={...eP,agentStarted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:eP.phaseCompleted,onChange:e=>{let t={...eP,phaseCompleted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:eP.waitingApproval,onChange:e=>{let t={...eP,waitingApproval:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:eP.agentCompleted,onChange:e=>{let t={...eP,agentCompleted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:eP.agentFailed,onChange:e=>{let t={...eP,agentFailed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tY,{children:"Pull Request Events"}),(0,t.jsx)(tq,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:eP.prMerged,onChange:e=>{let t={...eP,prMerged:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:eP.prClosed,onChange:e=>{let t={...eP,prClosed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:eP.prChecksPassed,onChange:e=>{let t={...eP,prChecksPassed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:eP.prChecksFailed,onChange:e=>{let t={...eP,prChecksFailed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR blocked",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:eP.prBlocked,onChange:e=>{let t={...eP,prBlocked:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Merge review ready",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:eP.mergeReviewReady,onChange:e=>{let t={...eP,mergeReviewReady:e};eR(t),y(eG({events:t}))}})]}),(0,t.jsx)(tZ,{links:[{label:"Notification system",href:"https://github.com/shep-ai/cli/blob/main/specs/021-agent-notifications/spec.yaml"}],children:"In-app toast notifications keep you in the loop. Fine-tune which agent lifecycle events trigger a notification."})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:c,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tq,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:eE.skills,onChange:e=>{let t={...eE,skills:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:eE.envDeploy,onChange:e=>{let t={...eE,envDeploy:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:eE.debug,onChange:e=>{let t={...eE,debug:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"GitHub Import",description:"Enable GitHub repository import in the web UI",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:eE.githubImport,onChange:e=>{let t={...eE,githubImport:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Adopt Branch",description:"Import existing branches as tracked features",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:eE.adoptBranch,onChange:e=>{let t={...eE,adoptBranch:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Git Rebase & Sync",description:"Enable git rebase-on-main and sync-main operations",id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:eE.gitRebaseSync,onChange:e=>{let t={...eE,gitRebaseSync:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"React File Manager",description:"Use the built-in React file manager instead of the native OS folder picker",id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:eE.reactFileManager,onChange:e=>{let t={...eE,reactFileManager:e};eT(t),y({featureFlags:t})}})]}),(0,t.jsx)(tZ,{children:"Experimental features that are still under development. Enable at your own risk — they may change or be removed in future versions. Debug mode adds verbose logging useful for troubleshooting."})]}),(0,t.jsxs)("div",{id:"section-interactive-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:x.MessageSquare,title:"Interactive Agent",description:"Chat tab settings for per-feature interactive agent sessions",testId:"interactive-agent-settings-section",children:[(0,t.jsx)(tq,{label:"Enable Chat tab",description:"Show the Chat tab on all feature detail pages",id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:ey,onChange:e=>{eS(e),y({interactiveAgent:{enabled:e,autoTimeoutMinutes:parseInt(ej,10)||15,maxConcurrentSessions:parseInt(ek,10)||3}})}}),(0,t.jsx)(tK,{label:"Auto-timeout",description:"Minutes of inactivity before the agent is stopped automatically (1–120)",htmlFor:"interactive-agent-timeout",children:(0,t.jsx)(t$,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:ej,placeholder:"15",min:1,max:120,suffix:"min",onChange:eC,onBlur:()=>{let e=parseInt(ej,10),t=Number.isNaN(e)?15:Math.min(120,Math.max(1,e));eC(String(t)),y({interactiveAgent:{enabled:ey,autoTimeoutMinutes:t,maxConcurrentSessions:parseInt(ek,10)||3}})}})}),(0,t.jsx)(tK,{label:"Max concurrent sessions",description:"Maximum number of active interactive agent sessions at once (1–10)",htmlFor:"interactive-agent-sessions",children:(0,t.jsx)(t$,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:ek,placeholder:"3",min:1,max:10,onChange:eI,onBlur:()=>{let e=parseInt(ek,10),t=Number.isNaN(e)?3:Math.min(10,Math.max(1,e));eI(String(t)),y({interactiveAgent:{enabled:ey,autoTimeoutMinutes:parseInt(ej,10)||15,maxConcurrentSessions:t}})}})})]}),(0,t.jsx)(tZ,{children:"The Chat tab spawns a persistent agent process per feature. Auto-timeout stops idle sessions automatically to conserve resources. The concurrent session cap prevents runaway resource usage on developer machines."})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:u,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tK,{label:"Location",description:"Path to the local SQLite database",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shep-home-path",children:o})}),(0,t.jsx)(tK,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:p})})]}),(0,t.jsx)(tZ,{links:[{label:"Settings service",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/settings-service.md"},{label:"Settings spec",href:"https://github.com/shep-ai/cli/blob/main/specs/005-global-settings-service/spec.md"}],children:"All settings are stored in a local SQLite database at ~/.shep/data. The database uses a singleton record pattern with automatic migrations on startup."})]})]})]})}e.s(["SettingsPageClient",()=>tX],41952)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,66033,e=>{"use strict";var t=e.i(79054);e.i(20314);var r=t.createContext(void 0);function s(e){let s=t.useContext(r);return e||s||"ltr"}e.s(["useDirection",()=>s])},87342,e=>{"use strict";var t=e.i(79054),r=e.i(22528),s=e.i(5978),i=e.i(86874),n=e.i(20314);function a(e){let a=e+"CollectionProvider",[o,u]=(0,r.createContextScope)(a),[l,c]=o(a,{collectionRef:{current:null},itemMap:new Map}),h=e=>{let{scope:r,children:s}=e,i=t.default.useRef(null),a=t.default.useRef(new Map).current;return(0,n.jsx)(l,{scope:r,itemMap:a,collectionRef:i,children:s})};h.displayName=a;let d=e+"CollectionSlot",f=(0,i.createSlot)(d),p=t.default.forwardRef((e,t)=>{let{scope:r,children:i}=e,a=c(d,r),o=(0,s.useComposedRefs)(t,a.collectionRef);return(0,n.jsx)(f,{ref:o,children:i})});p.displayName=d;let y=e+"CollectionItemSlot",v="data-radix-collection-item",m=(0,i.createSlot)(y),b=t.default.forwardRef((e,r)=>{let{scope:i,children:a,...o}=e,u=t.default.useRef(null),l=(0,s.useComposedRefs)(r,u),h=c(y,i);return t.default.useEffect(()=>(h.itemMap.set(u,{ref:u,...o}),()=>void h.itemMap.delete(u))),(0,n.jsx)(m,{...{[v]:""},ref:l,children:a})});return b.displayName=y,[{Provider:h,Slot:p,ItemSlot:b},function(r){let s=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=s.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${v}]`));return Array.from(s.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[s.collectionRef,s.itemMap])},u]}var o=new WeakMap;function u(e,t){var r,s;let i,n,a;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let o=(r=e,s=t,i=r.length,(a=(n=l(s))>=0?n:i+n)<0||a>=i?-1:a);return -1===o?void 0:e[o]}function l(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],o.set(this,!0)}set(e,t){return o.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let s,i=this.has(t),n=this.#e.length,a=l(e),o=a>=0?a:n+a,u=o<0||o>=n?-1:o;if(u===this.size||i&&u===this.size-1||-1===u)return this.set(t,r),this;let c=this.size+ +!i;a<0&&o++;let h=[...this.#e],d=!1;for(let e=o;e<c;e++)if(o===e){let n=h[e];h[e]===t&&(n=h[e+1]),i&&this.delete(t),s=this.get(n),this.set(t,r)}else{d||h[e-1]!==t||(d=!0);let r=h[d?e:e-1],i=s;s=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,s){let i=new e(this);return i.insert(t,r,s),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let s=this.#e.indexOf(e);return -1===s?this:this.insert(s+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=u(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=u(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return u(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let s=r+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let s=r+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return s;r++}}findIndex(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return r;r++}return -1}filter(t,r){let s=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&s.push(e),i++;return new e(s)}map(t,r){let s=[],i=0;for(let e of this)s.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(s)}reduce(...e){let[t,r]=e,s=0,i=r??this.at(0);for(let r of this)i=0===s&&1===e.length?r:Reflect.apply(t,this,[i,r,s,this]),s++;return i}reduceRight(...e){let[t,r]=e,s=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);s=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[s,i,r,this])}return s}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),s=this.get(r);t.set(r,s)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let s=new e,i=this.size-1;if(void 0===t)return s;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);s.set(t,r)}return s}every(e,t){let r=0;for(let s of this){if(!Reflect.apply(e,t,[s,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let s of this){if(Reflect.apply(e,t,[s,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>a])},51080,e=>{"use strict";var t=e.i(79054),r=e.i(91967),s=e.i(87342),i=e.i(5978),n=e.i(22528),a=e.i(13123),o=e.i(87620),u=e.i(29297),l=e.i(36589),c=e.i(66033),h=e.i(20314),d="rovingFocusGroup.onEntryFocus",f={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[y,v,m]=(0,s.createCollection)(p),[b,g]=(0,n.createContextScope)(p,[m]),[R,S]=b(p),w=t.forwardRef((e,t)=>(0,h.jsx)(y.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,h.jsx)(y.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,h.jsx)(T,{...e,ref:t})})}));w.displayName=p;var T=t.forwardRef((e,s)=>{let{__scopeRovingFocusGroup:n,orientation:a,loop:y=!1,dir:m,currentTabStopId:b,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:S,onEntryFocus:w,preventScrollOnEntryFocus:T=!1,...C}=e,O=t.useRef(null),x=(0,i.useComposedRefs)(s,O),I=(0,c.useDirection)(m),[F,k]=(0,l.useControllableState)({prop:b,defaultProp:g??null,onChange:S,caller:p}),[M,Q]=t.useState(!1),j=(0,u.useCallbackRef)(w),D=v(n),A=t.useRef(!1),[P,U]=t.useState(0);return t.useEffect(()=>{let e=O.current;if(e)return e.addEventListener(d,j),()=>e.removeEventListener(d,j)},[j]),(0,h.jsx)(R,{scope:n,orientation:a,dir:I,loop:y,currentTabStopId:F,onItemFocus:t.useCallback(e=>k(e),[k]),onItemShiftTab:t.useCallback(()=>Q(!0),[]),onFocusableItemAdd:t.useCallback(()=>U(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>U(e=>e-1),[]),children:(0,h.jsx)(o.Primitive.div,{tabIndex:M||0===P?-1:0,"data-orientation":a,...C,ref:x,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{A.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!A.current;if(e.target===e.currentTarget&&t&&!M){let t=new CustomEvent(d,f);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=D().filter(e=>e.focusable);E([e.find(e=>e.active),e.find(e=>e.id===F),...e].filter(Boolean).map(e=>e.ref.current),T)}}A.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>Q(!1))})})}),C="RovingFocusGroupItem",O=t.forwardRef((e,s)=>{let{__scopeRovingFocusGroup:i,focusable:n=!0,active:u=!1,tabStopId:l,children:c,...d}=e,f=(0,a.useId)(),p=l||f,m=S(C,i),b=m.currentTabStopId===p,g=v(i),{onFocusableItemAdd:R,onFocusableItemRemove:w,currentTabStopId:T}=m;return t.useEffect(()=>{if(n)return R(),()=>w()},[n,R,w]),(0,h.jsx)(y.ItemSlot,{scope:i,id:p,focusable:n,active:u,children:(0,h.jsx)(o.Primitive.span,{tabIndex:b?0:-1,"data-orientation":m.orientation,...d,ref:s,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{n?m.onItemFocus(p):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>m.onItemFocus(p)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var s;let i=(s=e.key,"rtl"!==r?s:"ArrowLeft"===s?"ArrowRight":"ArrowRight"===s?"ArrowLeft":s);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return x[i]}(e,m.orientation,m.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=g().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,s;"prev"===t&&i.reverse();let n=i.indexOf(e.currentTarget);i=m.loop?(r=i,s=n+1,r.map((e,t)=>r[(s+t)%r.length])):i.slice(n+1)}setTimeout(()=>E(i))}}),children:"function"==typeof c?c({isCurrentTabStop:b,hasTabStop:null!=T}):c})})});O.displayName=C;var x={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function E(e,t=!1){let r=document.activeElement;for(let s of e)if(s===r||(s.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>O,"Root",()=>w,"createRovingFocusGroupScope",()=>g])},68304,e=>{"use strict";var t=e.i(20314),r=e.i(79054),s=e.i(91967),i=e.i(22528),n=e.i(51080),a=e.i(85995),o=e.i(87620),u=e.i(66033),l=e.i(36589),c=e.i(13123),h="Tabs",[d,f]=(0,i.createContextScope)(h,[n.createRovingFocusGroupScope]),p=(0,n.createRovingFocusGroupScope)(),[y,v]=d(h),m=r.forwardRef((e,r)=>{let{__scopeTabs:s,value:i,onValueChange:n,defaultValue:a,orientation:d="horizontal",dir:f,activationMode:p="automatic",...v}=e,m=(0,u.useDirection)(f),[b,g]=(0,l.useControllableState)({prop:i,onChange:n,defaultProp:a??"",caller:h});return(0,t.jsx)(y,{scope:s,baseId:(0,c.useId)(),value:b,onValueChange:g,orientation:d,dir:m,activationMode:p,children:(0,t.jsx)(o.Primitive.div,{dir:m,"data-orientation":d,...v,ref:r})})});m.displayName=h;var b="TabsList",g=r.forwardRef((e,r)=>{let{__scopeTabs:s,loop:i=!0,...a}=e,u=v(b,s),l=p(s);return(0,t.jsx)(n.Root,{asChild:!0,...l,orientation:u.orientation,dir:u.dir,loop:i,children:(0,t.jsx)(o.Primitive.div,{role:"tablist","aria-orientation":u.orientation,...a,ref:r})})});g.displayName=b;var R="TabsTrigger",S=r.forwardRef((e,r)=>{let{__scopeTabs:i,value:a,disabled:u=!1,...l}=e,c=v(R,i),h=p(i),d=C(c.baseId,a),f=O(c.baseId,a),y=a===c.value;return(0,t.jsx)(n.Item,{asChild:!0,...h,focusable:!u,active:y,children:(0,t.jsx)(o.Primitive.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":f,"data-state":y?"active":"inactive","data-disabled":u?"":void 0,disabled:u,id:d,...l,ref:r,onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,e=>{u||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(a)}),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(a)}),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;y||u||!e||c.onValueChange(a)})})})});S.displayName=R;var w="TabsContent",T=r.forwardRef((e,s)=>{let{__scopeTabs:i,value:n,forceMount:u,children:l,...c}=e,h=v(w,i),d=C(h.baseId,n),f=O(h.baseId,n),p=n===h.value,y=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(a.Presence,{present:u||p,children:({present:r})=>(0,t.jsx)(o.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":h.orientation,role:"tabpanel","aria-labelledby":d,hidden:!r,id:f,tabIndex:0,...c,ref:s,style:{...e.style,animationDuration:y.current?"0s":void 0},children:r&&l})})});function C(e,t){return`${e}-trigger-${t}`}function O(e,t){return`${e}-content-${t}`}T.displayName=w,e.s(["Content",()=>T,"List",()=>g,"Root",()=>m,"Tabs",()=>m,"TabsContent",()=>T,"TabsList",()=>g,"TabsTrigger",()=>S,"Trigger",()=>S,"createTabsScope",()=>f],43133);var x=e.i(43133),x=x,E=e.i(31777);let I=x.Root,F=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(x.List,{ref:s,className:(0,E.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...r}));F.displayName=x.List.displayName;let k=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(x.Trigger,{ref:s,className:(0,E.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...r}));k.displayName=x.Trigger.displayName;let M=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)(x.Content,{ref:s,className:(0,E.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...r}));M.displayName=x.Content.displayName,e.s(["Tabs",()=>I,"TabsContent",()=>M,"TabsList",()=>F,"TabsTrigger",()=>k],68304)},26370,48829,e=>{"use strict";var t=e.i(3645);let r=(0,t.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",()=>r],26370);let s=(0,t.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["ChevronUp",()=>s],48829)},99105,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],99105)},33548,e=>{"use strict";let t=(0,e.i(3645).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],33548)},67669,e=>{"use strict";let t=(0,e.i(3645).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],67669)},94365,e=>{"use strict";let t=(0,e.i(3645).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",()=>t],94365)},4520,77501,e=>{"use strict";var t=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};e.s(["Subscribable",()=>t],77501);var r=new class extends t{#t;#r;#s;constructor(){super(),this.#s=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#r||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#s=e,this.#r?.(),this.#r=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#t?this.#t:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",()=>r],4520)},3,68911,e=>{"use strict";e.i(44172);var t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#i=t;#n=!1;setTimeoutProvider(e){this.#i=e}setTimeout(e,t){return this.#i.setTimeout(e,t)}clearTimeout(e){this.#i.clearTimeout(e)}setInterval(e,t){return this.#i.setInterval(e,t)}clearInterval(e){this.#i.clearInterval(e)}};function s(e){setTimeout(e,0)}e.s(["systemSetTimeoutZero",()=>s,"timeoutManager",()=>r],68911);var i="u"<typeof window||"Deno"in globalThis;function n(){}function a(e,t){return"function"==typeof e?e(t):e}function o(e){return"number"==typeof e&&e>=0&&e!==1/0}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t){return"function"==typeof e?e(t):e}function c(e,t){return"function"==typeof e?e(t):e}function h(e,t){let{type:r="all",exact:s,fetchStatus:i,predicate:n,queryKey:a,stale:o}=e;if(a){if(s){if(t.queryHash!==f(a,t.options))return!1}else if(!y(t.queryKey,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!n||!!n(t))}function d(e,t){let{exact:r,status:s,predicate:i,mutationKey:n}=e;if(n){if(!t.options.mutationKey)return!1;if(r){if(p(t.options.mutationKey)!==p(n))return!1}else if(!y(t.options.mutationKey,n))return!1}return(!s||t.state.status===s)&&(!i||!!i(t))}function f(e,t){return(t?.queryKeyHashFn||p)(e)}function p(e){return JSON.stringify(e,(e,t)=>g(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function y(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>y(e[r],t[r]))}var v=Object.prototype.hasOwnProperty;function m(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function g(e){if(!R(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!R(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function R(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return new Promise(t=>{r.setTimeout(t,e)})}function w(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r,s=0){if(t===r)return t;if(s>500)return r;let i=b(t)&&b(r);if(!i&&!(g(t)&&g(r)))return r;let n=(i?t:Object.keys(t)).length,a=i?r:Object.keys(r),o=a.length,u=i?Array(o):{},l=0;for(let c=0;c<o;c++){let o=i?c:a[c],h=t[o],d=r[o];if(h===d){u[o]=h,(i?c<n:v.call(t,o))&&l++;continue}if(null===h||null===d||"object"!=typeof h||"object"!=typeof d){u[o]=d;continue}let f=e(h,d,s+1);u[o]=f,f===h&&l++}return n===o&&l===n?t:u}(e,t):t}function T(e,t,r=0){let s=[...e,t];return r&&s.length>r?s.slice(1):s}function C(e,t,r=0){let s=[t,...e];return r&&s.length>r?s.slice(0,-1):s}var O=Symbol();function x(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==O?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function E(e,t){return"function"==typeof e?e(...t):!!e}function I(e,t,r){let s,i=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),i||(i=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e}e.s(["addConsumeAwareSignal",()=>I,"addToEnd",()=>T,"addToStart",()=>C,"ensureQueryFn",()=>x,"functionalUpdate",()=>a,"hashKey",()=>p,"hashQueryKeyByOptions",()=>f,"isServer",()=>i,"isValidTimeout",()=>o,"matchMutation",()=>d,"matchQuery",()=>h,"noop",()=>n,"partialMatchKey",()=>y,"replaceData",()=>w,"resolveEnabled",()=>c,"resolveStaleTime",()=>l,"shallowEqualObjects",()=>m,"shouldThrowError",()=>E,"skipToken",()=>O,"sleep",()=>S,"timeUntilStale",()=>u],3)},65617,e=>{"use strict";let t;var r=e.i(3),s=(t=()=>r.isServer,{isServer:()=>t(),setIsServer(e){t=e}});e.s(["environmentManager",()=>s])},6786,e=>{"use strict";let t,r,s,i,n,a;var o=e.i(68911).systemSetTimeoutZero,u=(t=[],r=0,s=e=>{e()},i=e=>{e()},n=o,{batch:e=>{let a;r++;try{a=e()}finally{let e;--r||(e=t,t=[],e.length&&n(()=>{i(()=>{e.forEach(e=>{s(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{r?t.push(e):n(()=>{s(e)})},setNotifyFunction:e=>{s=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{n=e}});e.s(["notifyManager",()=>u])},13598,20820,e=>{"use strict";var t=e.i(77501),r=new class extends t.Subscribable{#a=!0;#r;#s;constructor(){super(),this.#s=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#r||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#s=e,this.#r?.(),this.#r=e(this.setOnline.bind(this))}setOnline(e){this.#a!==e&&(this.#a=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#a}};function s(){let e,t,r=new Promise((r,s)=>{e=r,t=s});function s(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{s({status:"fulfilled",value:t}),e(t)},r.reject=e=>{s({status:"rejected",reason:e}),t(e)},r}e.s(["onlineManager",()=>r],13598),e.i(3),e.s(["pendingThenable",()=>s],20820)},28574,20979,19644,34682,e=>{"use strict";e.i(44172);var t=e.i(3),r=e.i(6786),s=e.i(4520),i=e.i(13598),n=e.i(20820),a=e.i(65617);function o(e){return Math.min(1e3*2**e,3e4)}function u(e){return(e??"online")!=="online"||i.onlineManager.isOnline()}var l=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function c(e){let r,c=!1,h=0,d=(0,n.pendingThenable)(),f=()=>s.focusManager.isFocused()&&("always"===e.networkMode||i.onlineManager.isOnline())&&e.canRun(),p=()=>u(e.networkMode)&&e.canRun(),y=e=>{"pending"===d.status&&(r?.(),d.resolve(e))},v=e=>{"pending"===d.status&&(r?.(),d.reject(e))},m=()=>new Promise(t=>{r=e=>{("pending"!==d.status||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,"pending"===d.status&&e.onContinue?.()}),b=()=>{let r;if("pending"!==d.status)return;let s=0===h?e.initialPromise:void 0;try{r=s??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(y).catch(r=>{if("pending"!==d.status)return;let s=e.retry??3*!a.environmentManager.isServer(),i=e.retryDelay??o,n="function"==typeof i?i(h,r):i,u=!0===s||"number"==typeof s&&h<s||"function"==typeof s&&s(h,r);c||!u?v(r):(h++,e.onFail?.(h,r),(0,t.sleep)(n).then(()=>f()?void 0:m()).then(()=>{c?v(r):b()}))})};return{promise:d,status:()=>d.status,cancel:t=>{if("pending"===d.status){let r=new l(t);v(r),e.onCancel?.(r)}},continue:()=>(r?.(),d),cancelRetry:()=>{c=!0},continueRetry:()=>{c=!1},canStart:p,start:()=>(p()?b():m().then(b),d)}}e.s(["CancelledError",()=>l,"canFetch",()=>u,"createRetryer",()=>c],20979);var h=e.i(68911),d=class{#o;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,t.isValidTimeout)(this.gcTime)&&(this.#o=h.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(a.environmentManager.isServer()?1/0:3e5))}clearGcTimeout(){this.#o&&(h.timeoutManager.clearTimeout(this.#o),this.#o=void 0)}};e.s(["Removable",()=>d],19644);var f=class extends d{#u;#l;#c;#h;#d;#f;#p;constructor(e){super(),this.#p=!1,this.#f=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#h=e.client,this.#c=this.#h.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#u=v(this.options),this.state=e.state??this.#u,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#d?.promise}setOptions(e){if(this.options={...this.#f,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=v(this.options);void 0!==e.data&&(this.setState(y(e.data,e.dataUpdatedAt)),this.#u=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#c.remove(this)}setData(e,r){let s=(0,t.replaceData)(this.state.data,e,this.options);return this.#y({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}setState(e,t){this.#y({type:"setState",state:e,setStateOptions:t})}cancel(e){let r=this.#d?.promise;return this.#d?.cancel(e),r?r.then(t.noop).catch(t.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#u}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==(0,t.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t.skipToken||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,t.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,t.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#d?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#d?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#c.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#d&&(this.#p||this.#v()?this.#d.cancel({revert:!0}):this.#d.cancelRetry()),this.scheduleGc()),this.#c.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#v(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#y({type:"invalidate"})}async fetch(e,r){let s;if("idle"!==this.state.fetchStatus&&this.#d?.status()!=="rejected"){if(void 0!==this.state.data&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#d)return this.#d.continueRetry(),this.#d.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let i=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#p=!0,i.signal)})},a=()=>{let e,s=(0,t.ensureQueryFn)(this.options,r),i=(n(e={client:this.#h,queryKey:this.queryKey,meta:this.meta}),e);return(this.#p=!1,this.options.persister)?this.options.persister(s,i,this):s(i)},o=(n(s={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#h,state:this.state,fetchFn:a}),s);this.options.behavior?.onFetch(o,this),this.#l=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#y({type:"fetch",meta:o.fetchOptions?.meta}),this.#d=c({initialPromise:r?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof l&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),i.abort()},onFail:(e,t)=>{this.#y({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#y({type:"pause"})},onContinue:()=>{this.#y({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let e=await this.#d.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#c.config.onSuccess?.(e,this),this.#c.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof l){if(e.silent)return this.#d.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#y({type:"error",error:e}),this.#c.config.onError?.(e,this),this.#c.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#y(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...p(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...y(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?r:void 0,r;case"error":let s=e.error;return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),r.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#c.notify({query:this,type:"updated",action:e})})}};function p(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:u(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function y(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function v(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,s=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",()=>f,"fetchState",()=>p],28574);var m=e.i(79054),b=e.i(20314),g=m.createContext(void 0),R=e=>{let t=m.useContext(g);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},S=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,b.jsx)(g.Provider,{value:e,children:t}));e.s(["QueryClientProvider",()=>S,"useQueryClient",()=>R],34682)},62885,e=>{"use strict";let t;var r=e.i(4520),s=e.i(65617),i=e.i(6786),n=e.i(28574),a=e.i(77501),o=e.i(20820),u=e.i(3),l=e.i(68911),c=class extends a.Subscribable{constructor(e,t){super(),this.options=t,this.#h=e,this.#m=null,this.#b=(0,o.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#h;#g=void 0;#R=void 0;#S=void 0;#w;#T;#b;#m;#C;#O;#x;#E;#I;#F;#k=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#g.addObserver(this),h(this.#g,this.options)?this.#M():this.updateResult(),this.#Q())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#g,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#g,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#j(),this.#D(),this.#g.removeObserver(this)}setOptions(e){let t=this.options,r=this.#g;if(this.options=this.#h.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,u.resolveEnabled)(this.options.enabled,this.#g))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#A(),this.#g.setOptions(this.options),t._defaulted&&!(0,u.shallowEqualObjects)(this.options,t)&&this.#h.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#g,observer:this});let s=this.hasListeners();s&&f(this.#g,r,this.options,t)&&this.#M(),this.updateResult(),s&&(this.#g!==r||(0,u.resolveEnabled)(this.options.enabled,this.#g)!==(0,u.resolveEnabled)(t.enabled,this.#g)||(0,u.resolveStaleTime)(this.options.staleTime,this.#g)!==(0,u.resolveStaleTime)(t.staleTime,this.#g))&&this.#P();let i=this.#U();s&&(this.#g!==r||(0,u.resolveEnabled)(this.options.enabled,this.#g)!==(0,u.resolveEnabled)(t.enabled,this.#g)||i!==this.#F)&&this.#q(i)}getOptimisticResult(e){var t,r;let s=this.#h.getQueryCache().build(this.#h,e),i=this.createResult(s,e);return t=this,r=i,(0,u.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#S=i,this.#T=this.options,this.#w=this.#g.state),i}getCurrentResult(){return this.#S}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#b.status||this.#b.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#k.add(e)}getCurrentQuery(){return this.#g}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#h.defaultQueryOptions(e),r=this.#h.getQueryCache().build(this.#h,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#M({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#S))}#M(e){this.#A();let t=this.#g.fetch(this.options,e);return e?.throwOnError||(t=t.catch(u.noop)),t}#P(){this.#j();let e=(0,u.resolveStaleTime)(this.options.staleTime,this.#g);if(s.environmentManager.isServer()||this.#S.isStale||!(0,u.isValidTimeout)(e))return;let t=(0,u.timeUntilStale)(this.#S.dataUpdatedAt,e);this.#E=l.timeoutManager.setTimeout(()=>{this.#S.isStale||this.updateResult()},t+1)}#U(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#g):this.options.refetchInterval)??!1}#q(e){this.#D(),this.#F=e,!s.environmentManager.isServer()&&!1!==(0,u.resolveEnabled)(this.options.enabled,this.#g)&&(0,u.isValidTimeout)(this.#F)&&0!==this.#F&&(this.#I=l.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#M()},this.#F))}#Q(){this.#P(),this.#q(this.#U())}#j(){this.#E&&(l.timeoutManager.clearTimeout(this.#E),this.#E=void 0)}#D(){this.#I&&(l.timeoutManager.clearInterval(this.#I),this.#I=void 0)}createResult(e,t){let r,s=this.#g,i=this.options,a=this.#S,l=this.#w,c=this.#T,d=e!==s?e.state:this.#R,{state:y}=e,v={...y},m=!1;if(t._optimisticResults){let r=this.hasListeners(),a=!r&&h(e,t),o=r&&f(e,s,t,i);(a||o)&&(v={...v,...(0,n.fetchState)(y.data,e.options)}),"isRestoring"===t._optimisticResults&&(v.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:R}=v;r=v.data;let S=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===R){let e;a?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(e=a.data,S=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#x?.state.data,this.#x):t.placeholderData,void 0!==e&&(R="success",r=(0,u.replaceData)(a?.data,e,t),m=!0)}if(t.select&&void 0!==r&&!S)if(a&&r===l?.data&&t.select===this.#C)r=this.#O;else try{this.#C=t.select,r=t.select(r),r=(0,u.replaceData)(a?.data,r,t),this.#O=r,this.#m=null}catch(e){this.#m=e}this.#m&&(b=this.#m,r=this.#O,g=Date.now(),R="error");let w="fetching"===v.fetchStatus,T="pending"===R,C="error"===R,O=T&&w,x=void 0!==r,E={status:R,fetchStatus:v.fetchStatus,isPending:T,isSuccess:"success"===R,isError:C,isInitialLoading:O,isLoading:O,data:r,dataUpdatedAt:v.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:v.dataUpdateCount>d.dataUpdateCount||v.errorUpdateCount>d.errorUpdateCount,isFetching:w,isRefetching:w&&!T,isLoadingError:C&&!x,isPaused:"paused"===v.fetchStatus,isPlaceholderData:m,isRefetchError:C&&x,isStale:p(e,t),refetch:this.refetch,promise:this.#b,isEnabled:!1!==(0,u.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==E.data,r="error"===E.status&&!t,i=e=>{r?e.reject(E.error):t&&e.resolve(E.data)},n=()=>{i(this.#b=E.promise=(0,o.pendingThenable)())},a=this.#b;switch(a.status){case"pending":e.queryHash===s.queryHash&&i(a);break;case"fulfilled":(r||E.data!==a.value)&&n();break;case"rejected":r&&E.error===a.reason||n()}}return E}updateResult(){let e=this.#S,t=this.createResult(this.#g,this.options);if(this.#w=this.#g.state,this.#T=this.options,void 0!==this.#w.data&&(this.#x=this.#g),(0,u.shallowEqualObjects)(t,e))return;this.#S=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#k.size)return!0;let s=new Set(r??this.#k);return this.options.throwOnError&&s.add("error"),Object.keys(this.#S).some(t=>this.#S[t]!==e[t]&&s.has(t))};this.#L({listeners:r()})}#A(){let e=this.#h.getQueryCache().build(this.#h,this.options);if(e===this.#g)return;let t=this.#g;this.#g=e,this.#R=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#Q()}#L(e){i.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#S)}),this.#h.getQueryCache().notify({query:this.#g,type:"observerResultsUpdated"})})}};function h(e,t){return!1!==(0,u.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,u.resolveEnabled)(t.enabled,e)&&"static"!==(0,u.resolveStaleTime)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&p(e,t)}return!1}function f(e,t,r,s){return(e!==t||!1===(0,u.resolveEnabled)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&p(e,r)}function p(e,t){return!1!==(0,u.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,u.resolveStaleTime)(t.staleTime,e))}e.i(44172);var y=e.i(79054),v=e.i(34682);e.i(20314);var m=y.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),b=y.createContext(!1);b.Provider;var g=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function R(e,t){return function(e,t,r){let n,a=y.useContext(b),o=y.useContext(m),l=(0,v.useQueryClient)(r),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);let h=l.getQueryCache().get(c.queryHash);if(c._optimisticResults=a?"isRestoring":"optimistic",c.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=c.staleTime;c.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof c.gcTime&&(c.gcTime=Math.max(c.gcTime,1e3))}n=h?.state.error&&"function"==typeof c.throwOnError?(0,u.shouldThrowError)(c.throwOnError,[h.state.error,h]):c.throwOnError,(c.suspense||c.experimental_prefetchInRender||n)&&!o.isReset()&&(c.retryOnMount=!1),y.useEffect(()=>{o.clearReset()},[o]);let d=!l.getQueryCache().get(c.queryHash),[f]=y.useState(()=>new t(l,c)),p=f.getOptimisticResult(c),R=!a&&!1!==e.subscribed;if(y.useSyncExternalStore(y.useCallback(e=>{let t=R?f.subscribe(i.notifyManager.batchCalls(e)):u.noop;return f.updateResult(),t},[f,R]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),y.useEffect(()=>{f.setOptions(c)},[c,f]),c?.suspense&&p.isPending)throw g(c,f,o);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&void 0===e.data||(0,u.shouldThrowError)(r,[e.error,s])))({result:p,errorResetBoundary:o,throwOnError:c.throwOnError,query:h,suspense:c.suspense}))throw p.error;if(l.getDefaultOptions().queries?._experimental_afterQuery?.(c,p),c.experimental_prefetchInRender&&!s.environmentManager.isServer()&&p.isLoading&&p.isFetching&&!a){let e=d?g(c,f,o):h?.promise;e?.catch(u.noop).finally(()=>{f.updateResult()})}return c.notifyOnChangeProps?p:f.trackResult(p)}(e,c,t)}e.s(["useQuery",()=>R],62885)}]);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24270,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},34119,94819,e=>{"use strict";var t=e.i(80986);e.s(["CircleCheck",()=>t.default],34119);let r=(0,e.i(3645).default)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Ban",()=>r],94819)},57779,75478,80554,e=>{"use strict";var t=e.i(20314);function r({status:e,className:r=""}){return"idle"===e?null:(0,t.jsx)("span",{className:`absolute -top-0.5 -right-0.5 block rounded-full ${"processing"===e?"h-2.5 w-2.5 animate-pulse bg-blue-500":"h-2 w-2 bg-green-500"} ${r}`})}e.s(["ChatDotIndicator",()=>r],57779);var n=e.i(79054),a=e.i(62885);function o(e){let t=[...e].sort().join(","),{data:r}=(0,a.useQuery)({queryKey:["turn-statuses",t],queryFn:async()=>{if(!t)return{};let e=await fetch(`/api/interactive/chat/turn-statuses?featureIds=${t}`);return e.ok?e.json():{}},refetchInterval:3e3,enabled:e.length>0});return r??{}}e.s(["useTurnStatuses",()=>o],75478);let l=(0,n.createContext)({getStatus:()=>"idle"});function i({scopeIds:e,children:r}){let a=o(e),i=(0,n.useMemo)(()=>({getStatus:e=>a[e]??"idle"}),[a]);return(0,t.jsx)(l.Provider,{value:i,children:r})}function s(e){return(0,n.useContext)(l).getStatus(e)}e.s(["TurnStatusesProvider",()=>i,"useTurnStatus",()=>s],80554)},32494,e=>{"use strict";let t=(0,e.i(3645).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],32494)},79687,e=>{"use strict";var t=e.i(14748);e.s(["AlertCircle",()=>t.default])},39443,e=>{"use strict";var t=e.i(20314),r=e.i(79054);let n=(0,e.i(18354).createLogger)("[SSE]");function a(e,t,r,n){if("u"<typeof EventSource)return()=>{};let a=null,o=!1,l=1e3,i=null,s=null;return!function u(){o||(a=new EventSource(e?`/api/agent-events?runId=${encodeURIComponent(e)}`:"/api/agent-events"),n("connecting"),a.onopen=()=>{n("connected"),s=setTimeout(()=>{s=null,l=1e3},5e3)},a.onerror=()=>{a?.close(),a=null,n("disconnected"),null!==s&&(clearTimeout(s),s=null);let e=l;l=Math.min(2*e,3e4),i=setTimeout(()=>{i=null,u()},e)},a.addEventListener("notification",e=>{let n=JSON.parse(e.data);t(e=>{let t=[...e,n];return t.length>500?t.slice(-250):t}),r(n)}))}(),()=>{o=!0,null!==i&&(clearTimeout(i),i=null),null!==s&&(clearTimeout(s),s=null),a&&(a.close(),a=null)}}let o=(0,r.createContext)(null);function l({children:e,runId:l}){let{events:i,lastEvent:s,connectionStatus:u}=function(e){let[t,o]=(0,r.useState)([]),[l,i]=(0,r.useState)(null),[s,u]=(0,r.useState)("disconnected"),c=e?.runId,d=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{let t=e.data;if(t&&"object"==typeof t)if("notification"===t.type){let e=t.data;n.debug("event received:",e.eventType,e),o(t=>{let r=[...t,e];return r.length>500?r.slice(-250):r}),i(e)}else"status"===t.type&&u(t.status)},[]);return(0,r.useEffect)(()=>{let e="u">typeof location&&new URLSearchParams(location.search).has("sse");if(!navigator.serviceWorker||e)return a(c,o,i,u);let t=!1,r={current:void 0};function n(e){t||(d.current=e,e.postMessage({type:"subscribe",runId:c}),u("connecting"))}function l(){if(t)return;let e=navigator.serviceWorker.controller;e&&(d.current=e,e.postMessage({type:"subscribe",runId:c}),u("connecting"))}return navigator.serviceWorker.addEventListener("message",f),navigator.serviceWorker.addEventListener("controllerchange",l),navigator.serviceWorker.register("/agent-events-sw.js",{scope:"/"}).then(e=>{if(t)return;let l=e.active??e.installing??e.waiting;if(!l){r.current=a(c,o,i,u);return}if("activated"===l.state)n(l);else{let e=()=>{"activated"===l.state&&(l.removeEventListener("statechange",e),n(l))};l.addEventListener("statechange",e)}}).catch(()=>{t||(r.current=a(c,o,i,u))}),()=>{t=!0,navigator.serviceWorker.removeEventListener("message",f),navigator.serviceWorker.removeEventListener("controllerchange",l),d.current?.postMessage({type:"unsubscribe"}),d.current=null,r.current?.()}},[c,f]),{events:t,lastEvent:l,connectionStatus:s}}({runId:l}),c=(0,r.useMemo)(()=>({events:i,lastEvent:s,connectionStatus:u}),[i,s,u]);return(0,t.jsx)(o.Provider,{value:c,children:e})}function i(){let e=(0,r.useContext)(o);if(!e)throw Error("useAgentEventsContext must be used within an <AgentEventsProvider>");return e}e.s(["AgentEventsProvider",()=>l,"useAgentEventsContext",()=>i],39443)},55016,e=>{"use strict";let t=(0,e.i(3645).default)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Clock",()=>t],55016)},71326,e=>{"use strict";var t=e.i(20314),r=e.i(79054),n=e.i(22528),a=e.i(5978),o=e.i(567),l=e.i(91967),i=e.i(86874),s="AlertDialog",[u,c]=(0,n.createContextScope)(s,[o.createDialogScope]),d=(0,o.createDialogScope)(),f=e=>{let{__scopeAlertDialog:r,...n}=e,a=d(r);return(0,t.jsx)(o.Root,{...a,...n,modal:!0})};f.displayName=s;var p=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...a}=e,l=d(n);return(0,t.jsx)(o.Trigger,{...l,...a,ref:r})});p.displayName="AlertDialogTrigger";var g=e=>{let{__scopeAlertDialog:r,...n}=e,a=d(r);return(0,t.jsx)(o.Portal,{...a,...n})};g.displayName="AlertDialogPortal";var h=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...a}=e,l=d(n);return(0,t.jsx)(o.Overlay,{...l,...a,ref:r})});h.displayName="AlertDialogOverlay";var m="AlertDialogContent",[y,v]=u(m),b=(0,i.createSlottable)("AlertDialogContent"),x=r.forwardRef((e,n)=>{let{__scopeAlertDialog:i,children:s,...u}=e,c=d(i),f=r.useRef(null),p=(0,a.useComposedRefs)(n,f),g=r.useRef(null);return(0,t.jsx)(o.WarningProvider,{contentName:m,titleName:j,docsSlug:"alert-dialog",children:(0,t.jsx)(y,{scope:i,cancelRef:g,children:(0,t.jsxs)(o.Content,{role:"alertdialog",...c,...u,ref:p,onOpenAutoFocus:(0,l.composeEventHandlers)(u.onOpenAutoFocus,e=>{e.preventDefault(),g.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,t.jsx)(b,{children:s}),(0,t.jsx)(A,{contentRef:f})]})})})});x.displayName=m;var j="AlertDialogTitle",C=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...a}=e,l=d(n);return(0,t.jsx)(o.Title,{...l,...a,ref:r})});C.displayName=j;var w="AlertDialogDescription",P=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...a}=e,l=d(n);return(0,t.jsx)(o.Description,{...l,...a,ref:r})});P.displayName=w;var D=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...a}=e,l=d(n);return(0,t.jsx)(o.Close,{...l,...a,ref:r})});D.displayName="AlertDialogAction";var S="AlertDialogCancel",k=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...l}=e,{cancelRef:i}=v(S,n),s=d(n),u=(0,a.useComposedRefs)(r,i);return(0,t.jsx)(o.Close,{...s,...l,ref:u})});k.displayName=S;var A=({contentRef:e})=>{let t=`\`${m}\` requires a description for the component to be accessible for screen reader users.
|
|
2
|
+
|
|
3
|
+
You can add a description to the \`${m}\` by passing a \`${w}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
|
+
|
|
5
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${m}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
6
|
+
|
|
7
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return r.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null};e.s(["Action",()=>D,"AlertDialog",()=>f,"AlertDialogAction",()=>D,"AlertDialogCancel",()=>k,"AlertDialogContent",()=>x,"AlertDialogDescription",()=>P,"AlertDialogOverlay",()=>h,"AlertDialogPortal",()=>g,"AlertDialogTitle",()=>C,"AlertDialogTrigger",()=>p,"Cancel",()=>k,"Content",()=>x,"Description",()=>P,"Overlay",()=>h,"Portal",()=>g,"Root",()=>f,"Title",()=>C,"Trigger",()=>p,"createAlertDialogScope",()=>c],28883);var E=e.i(28883),E=E,O=e.i(31777),_=e.i(35364);function R({...e}){return(0,t.jsx)(E.Root,{"data-slot":"alert-dialog",...e})}function T({...e}){return(0,t.jsx)(E.Portal,{"data-slot":"alert-dialog-portal",...e})}function N({className:e,onClick:r,...n}){return(0,t.jsx)(E.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,O.cn)("fixed inset-0 z-50 bg-black/50",e),onClick:e=>{e.stopPropagation(),r?.(e)},...n})}function M({className:e,size:r="default",...n}){return(0,t.jsxs)(T,{children:[(0,t.jsx)(N,{}),(0,t.jsx)(E.Content,{"data-slot":"alert-dialog-content","data-size":r,className:(0,O.cn)("bg-background group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg",e),...n})]})}function L({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,O.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})}function F({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,O.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})}function z({className:e,...r}){return(0,t.jsx)(E.Title,{"data-slot":"alert-dialog-title",className:(0,O.cn)("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})}function I({className:e,...r}){return(0,t.jsx)(E.Description,{"data-slot":"alert-dialog-description",className:(0,O.cn)("text-muted-foreground text-sm",e),...r})}function $({className:e,variant:r="default",size:n="default",...a}){return(0,t.jsx)(_.Button,{variant:r,size:n,asChild:!0,children:(0,t.jsx)(E.Action,{"data-slot":"alert-dialog-action",className:(0,O.cn)(e),...a})})}function U({className:e,variant:r="outline",size:n="default",...a}){return(0,t.jsx)(_.Button,{variant:r,size:n,asChild:!0,children:(0,t.jsx)(E.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,O.cn)(e),...a})})}e.s(["AlertDialog",()=>R,"AlertDialogAction",()=>$,"AlertDialogCancel",()=>U,"AlertDialogContent",()=>M,"AlertDialogDescription",()=>I,"AlertDialogFooter",()=>F,"AlertDialogHeader",()=>L,"AlertDialogTitle",()=>z],71326)},30153,e=>{"use strict";var t=e.i(20314),r=e.i(79054),n=e.i(71326);let a=(0,r.createContext)(null);function o({children:e}){let o=(0,r.useRef)(null),l=(0,r.useRef)(null),[i,s]=(0,r.useState)(!1),u=(0,r.useCallback)(e=>{o.current=e},[]),c=(0,r.useCallback)(e=>{if(o.current?.isDirty){l.current=e,s(!0);return}e()},[]),d=(0,r.useCallback)(()=>{s(!1),o.current?.onReset(),o.current=null,l.current?.(),l.current=null},[]),f=(0,r.useCallback)(()=>{s(!1),l.current=null},[]),p=(0,r.useCallback)(()=>o.current?.isDirty??!1,[]);return(0,t.jsxs)(a,{value:{setGuard:u,guardedNavigate:c,getIsDirty:p},children:[e,(0,t.jsx)(n.AlertDialog,{open:i,children:(0,t.jsxs)(n.AlertDialogContent,{children:[(0,t.jsxs)(n.AlertDialogHeader,{children:[(0,t.jsx)(n.AlertDialogTitle,{children:"Discard unsaved changes?"}),(0,t.jsx)(n.AlertDialogDescription,{children:"You have unsaved changes. Are you sure you want to discard them?"})]}),(0,t.jsxs)(n.AlertDialogFooter,{children:[(0,t.jsx)(n.AlertDialogAction,{variant:"destructive",onClick:d,children:"Discard"}),(0,t.jsx)(n.AlertDialogCancel,{onClick:f,children:"Keep editing"})]})]})})]})}function l(){let e=(0,r.useContext)(a);if(!e)throw Error("useDrawerCloseGuard must be used within DrawerCloseGuardProvider");return e}function i({open:e,isDirty:t,onClose:n,onReset:a}){let{setGuard:o,guardedNavigate:i}=l();return(0,r.useEffect)(()=>(e?o({isDirty:t,onReset:a}):o(null),()=>o(null)),[e,t,a,o]),{attemptClose:(0,r.useCallback)(()=>{i(()=>{a(),n()})},[i,n,a])}}e.s(["DrawerCloseGuardProvider",()=>o,"useDrawerCloseGuard",()=>l,"useGuardedDrawerClose",()=>i])},48109,e=>{"use strict";let t=(0,e.i(3645).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",()=>t],48109)},80986,e=>{"use strict";let t=(0,e.i(3645).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",()=>t])},54277,30090,e=>{"use strict";let t=(0,e.i(3645).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",()=>t],30090),e.s(["CircleX",()=>t],54277)},27069,e=>{"use strict";function t(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",()=>t])},81975,e=>{"use strict";let t=(0,e.i(3645).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);e.s(["Wrench",()=>t],81975)},98127,e=>{"use strict";var t=e.i(20314),r=e.i(31777);function n({className:e,type:n,...a}){return(0,t.jsx)("input",{type:n,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...a})}e.s(["Input",()=>n])},66459,e=>{"use strict";let t=(0,e.i(3645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},12103,e=>{"use strict";let t=(0,e.i(3645).default)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);e.s(["Puzzle",()=>t],12103)},83241,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return a}});let n=e.r(9328);function a({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},90891,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},31218,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return s}});let n=e.r(20314),a=e.r(26036),o=e.r(58988),l=e.r(90891),i=e.r(22193);function s({moduleIds:e}){if("u">typeof window)return null;let t=o.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let s=(0,i.getDeploymentIdQueryOrEmptyString)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${s}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,a.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},84929,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return u}});let n=e.r(20314),a=e.r(79054),o=e.r(83241),l=e.r(31218);function i(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},u=function(e){let t={...s,...e},r=(0,a.lazy)(()=>t.loader().then(i)),u=t.loading;function c(e){let i=u?(0,n.jsx)(u,{isLoading:!0,pastDelay:!0,error:null}):null,s=!t.ssr||!!t.loading,c=s?a.Suspense:a.Fragment,d=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(l.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(c,{...s?{fallback:i}:{},children:d})}return c.displayName="LoadableComponent",c}},47901,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let n=e.r(81258)._(e.r(84929));function a(e,t){let r={};"function"==typeof e&&(r.loader=e);let a={...r,...t};return(0,n.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},13322,61201,e=>{"use strict";var t=e.i(20314),r=e.i(79054),n=e.i(47901),a=e.i(83428),o=e.i(60112),l=e.i(2287),i=e.i(35364);let s=(0,n.default)(()=>e.A(89305).then(e=>e.FileManager),{loadableGenerated:{modules:[15567]},ssr:!1,loading:()=>(0,t.jsx)(u,{})});function u(){return(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(a.Loader2,{className:"text-muted-foreground h-8 w-8 animate-spin"})})}async function c(e){let t=new URLSearchParams;e&&t.set("path",e);let r=await fetch(`/api/directory/list?${t.toString()}`);if(!r.ok)throw Error((await r.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return r.json()}function d({open:e,onOpenChange:n,onSelect:a,initialPath:u}){let[d,f]=(0,r.useState)([]),[p,g]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1),[y,v]=(0,r.useState)(null),b=(0,r.useRef)(!1),x=(0,r.useCallback)(async e=>{m(!0),v(null);try{let t=await c(e);f(t.entries),g(t.currentPath)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";o.toast.error(e)}finally{m(!1)}},[]);(0,r.useEffect)(()=>{e&&!b.current&&(b.current=!0,x(u)),e||(b.current=!1)},[e,u,x]);let j=(0,r.useCallback)(e=>{let t=e.absolutePath;e.isDirectory&&t&&x(t)},[x]),C=(0,r.useCallback)(e=>{1===e.length&&e[0].isDirectory?v(e[0].absolutePath??null):v(null)},[]);function w(){a(null),n(!1)}return(0,t.jsx)(l.Dialog,{open:e,onOpenChange:e=>{e||w()},children:(0,t.jsxs)(l.DialogContent,{className:"flex h-[95dvh] max-w-[95vw] flex-col",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsx)(l.DialogTitle,{children:"Select Folder"}),(0,t.jsx)(l.DialogDescription,{className:"truncate font-mono text-xs",children:p||"Loading..."})]}),(0,t.jsx)("div",{className:"shep-file-manager min-h-0 flex-1 overflow-hidden rounded-md border",children:(0,t.jsx)(s,{files:d.map(e=>({name:e.name,isDirectory:!0,path:`/${e.name}`,absolutePath:e.path,updatedAt:e.updatedAt})),isLoading:h,height:"100%",width:"100%",layout:"list",enableFilePreview:!1,permissions:{upload:!1,delete:!1,create:!1,download:!1,copy:!1,move:!1,rename:!1},onFileOpen:j,onSelectionChange:C,onRefresh:()=>x(p)},p)}),(0,t.jsxs)(l.DialogFooter,{children:[(0,t.jsx)(i.Button,{variant:"outline",onClick:w,children:"Cancel"}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:function(){p&&(a(p),n(!1))},disabled:!p,children:"Select Current Folder"}),(0,t.jsx)(i.Button,{onClick:function(){y&&(a(y),n(!1))},disabled:!y,children:"Select Folder"})]})]})})}e.s(["ReactFileManagerDialog",()=>d],61201),e.s([],13322)},78521,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("0056e1d6badad7cc4ef4f5c2821fde6a50143ec1f4",t.callServer,void 0,t.findSourceMapURL,"pickFolder");async function n(){let e=await r();if(e.error)throw Error(e.error);return e.path}e.s(["pickFolder",()=>n],78521)},5147,e=>{"use strict";var t=e.i(20314),r=e.i(79054);let n={"action-required":"action-needed",running:"in-progress",done:"done",blocked:"blocked",pending:"pending",error:"error",creating:null,deleting:null,archived:null};function a(e){return n[e]}let o=(0,r.createContext)(null);function l({children:e}){let[n,a]=(0,r.useState)([]),[l,i]=(0,r.useState)(!1),s=(0,r.useMemo)(()=>({features:n,setFeatures:a,hasRepositories:l,setHasRepositories:i}),[n,l]);return(0,t.jsx)(o.Provider,{value:s,children:e})}function i(){let e=(0,r.useContext)(o);if(!e)throw Error("useSidebarFeaturesContext must be used within a <SidebarFeaturesProvider>");return e}e.s(["SidebarFeaturesProvider",()=>l,"mapNodeStateToSidebarStatus",()=>a,"useSidebarFeaturesContext",()=>i])},76314,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return s},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return i}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function l(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,l(e));else t.set(r,l(n));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95889,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(44066)._(e.r(76314)),l=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",i=e.hash||"",s=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),s&&"object"==typeof s&&(s=String(o.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${i}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},58464,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return h},ST:function(){return m},WEB_VITALS:function(){return o},execOnce:function(){return l},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return s},isResSent:function(){return f},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return C}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function l(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>i.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function g(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await g(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let h="u">typeof performance,m=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function C(e){return JSON.stringify({message:e.message,stack:e.stack})}},51380,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(58464),a=e.r(53626);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},38670,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},24035,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(44066),l=e.r(20314),i=o._(e.r(79054)),s=e.r(95889),u=e.r(18152),c=e.r(80764),d=e.r(58464),f=e.r(99267);e.r(24270);let p=e.r(59624),g=e.r(51380),h=e.r(95555);function m(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}function y(t){var r;let n,a,o,[s,y]=(0,i.useOptimistic)(p.IDLE_LINK_STATUS),b=(0,i.useRef)(null),{href:x,as:j,children:C,prefetch:w=null,passHref:P,replace:D,shallow:S,scroll:k,onClick:A,onMouseEnter:E,onTouchStart:O,legacyBehavior:_=!1,onNavigate:R,ref:T,unstable_dynamicOnHover:N,...M}=t;n=C,_&&("string"==typeof n||"number"==typeof n)&&(n=(0,l.jsx)("a",{children:n}));let L=i.default.useContext(u.AppRouterContext),F=!1!==w,z=!1!==w?null===(r=w)||"auto"===r?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,{href:I,as:$}=i.default.useMemo(()=>{let e=m(x);return{href:e,as:j?m(j):e}},[x,j]);if(_){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=i.default.Children.only(n)}let U=_?a&&"object"==typeof a&&a.ref:T,B=i.default.useCallback(e=>(null!==L&&(b.current=(0,p.mountLinkInstance)(e,I,L,z,F,y)),()=>{b.current&&((0,p.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,I,L,z,y]),W={ref:(0,c.useMergedRef)(B,U),onClick(t){_||"function"!=typeof A||A(t),_&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!L||t.defaultPrevented||function(t,r,n,a,o,l,s){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(81574);i.default.startTransition(()=>{d(n||r,o?"replace":"push",l??!0,a.current)})}}(t,I,$,b,D,k,R)},onMouseEnter(e){_||"function"!=typeof E||E(e),_&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),L&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===N)},onTouchStart:function(e){_||"function"!=typeof O||O(e),_&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),L&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===N)}};return(0,d.isAbsoluteUrl)($)?W.href=$:_&&!P&&("a"!==a.type||"href"in a.props)||(W.href=(0,f.addBasePath)($)),o=_?i.default.cloneElement(a,W):(0,l.jsx)("a",{...M,...W,children:n}),(0,l.jsx)(v.Provider,{value:s,children:o})}e.r(38670);let v=(0,i.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},89305,e=>{e.v(t=>Promise.all(["static/chunks/6d7b999c99d6d175.js"].map(t=>e.l(t))).then(()=>t(15567)))}]);
|