@shepai/cli 1.153.0 → 1.154.0-pr480.e648d12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/apis/json-schema/AgentType.yaml +1 -0
  2. package/dist/packages/core/src/domain/generated/output.d.ts +1 -0
  3. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  4. package/dist/packages/core/src/domain/generated/output.js +1 -0
  5. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  6. package/dist/packages/core/src/infrastructure/di/container.js +4 -0
  7. package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts.map +1 -1
  8. package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-factory.service.js +22 -0
  9. package/dist/packages/core/src/infrastructure/services/agents/common/agent-validator.service.d.ts.map +1 -1
  10. package/dist/packages/core/src/infrastructure/services/agents/common/agent-validator.service.js +1 -0
  11. package/dist/packages/core/src/infrastructure/services/agents/common/executors/codex-cli-executor.service.d.ts +65 -0
  12. package/dist/packages/core/src/infrastructure/services/agents/common/executors/codex-cli-executor.service.d.ts.map +1 -0
  13. package/dist/packages/core/src/infrastructure/services/agents/common/executors/codex-cli-executor.service.js +655 -0
  14. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.d.ts.map +1 -1
  15. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.js +4 -1
  16. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/pr-branding.d.ts +5 -0
  17. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/pr-branding.d.ts.map +1 -0
  18. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/pr-branding.js +4 -0
  19. package/dist/packages/core/src/infrastructure/services/agents/sessions/codex-cli-session.repository.d.ts +62 -0
  20. package/dist/packages/core/src/infrastructure/services/agents/sessions/codex-cli-session.repository.d.ts.map +1 -0
  21. package/dist/packages/core/src/infrastructure/services/agents/sessions/codex-cli-session.repository.js +353 -0
  22. package/dist/packages/core/src/infrastructure/services/git/git-fork.service.d.ts.map +1 -1
  23. package/dist/packages/core/src/infrastructure/services/git/git-fork.service.js +3 -1
  24. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
  25. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +2 -1
  26. package/dist/packages/core/src/infrastructure/services/git/pr-branding.d.ts +17 -0
  27. package/dist/packages/core/src/infrastructure/services/git/pr-branding.d.ts.map +1 -0
  28. package/dist/packages/core/src/infrastructure/services/git/pr-branding.js +31 -0
  29. package/dist/src/presentation/tui/prompts/agent-select.prompt.d.ts +6 -2
  30. package/dist/src/presentation/tui/prompts/agent-select.prompt.d.ts.map +1 -1
  31. package/dist/src/presentation/tui/prompts/agent-select.prompt.js +7 -2
  32. package/dist/src/presentation/web/app/actions/get-all-agent-models.d.ts.map +1 -1
  33. package/dist/src/presentation/web/app/actions/get-all-agent-models.js +4 -2
  34. package/dist/src/presentation/web/components/common/feature-drawer-tabs/event-log-viewer.d.ts.map +1 -1
  35. package/dist/src/presentation/web/components/common/feature-drawer-tabs/event-log-viewer.js +26 -1
  36. package/dist/src/presentation/web/components/common/feature-drawer-tabs/event-log-viewer.stories.d.ts +2 -0
  37. package/dist/src/presentation/web/components/common/feature-drawer-tabs/event-log-viewer.stories.d.ts.map +1 -1
  38. package/dist/src/presentation/web/components/common/feature-drawer-tabs/event-log-viewer.stories.js +21 -0
  39. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.d.ts +1 -1
  40. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.d.ts.map +1 -1
  41. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.js +2 -0
  42. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.stories.d.ts.map +1 -1
  43. package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.stories.js +1 -0
  44. package/dist/src/presentation/web/components/features/settings/AgentModelPicker/AgentModelPicker.stories.d.ts +1 -0
  45. package/dist/src/presentation/web/components/features/settings/AgentModelPicker/AgentModelPicker.stories.d.ts.map +1 -1
  46. package/dist/src/presentation/web/components/features/settings/AgentModelPicker/AgentModelPicker.stories.js +7 -0
  47. package/dist/src/presentation/web/components/features/settings/agent-settings-section.d.ts.map +1 -1
  48. package/dist/src/presentation/web/components/features/settings/agent-settings-section.js +1 -0
  49. package/dist/src/presentation/web/components/features/settings/agent-settings-section.stories.d.ts +1 -0
  50. package/dist/src/presentation/web/components/features/settings/agent-settings-section.stories.d.ts.map +1 -1
  51. package/dist/src/presentation/web/components/features/settings/agent-settings-section.stories.js +8 -0
  52. package/dist/src/presentation/web/lib/parse-log-line.d.ts +1 -1
  53. package/dist/src/presentation/web/lib/parse-log-line.d.ts.map +1 -1
  54. package/dist/src/presentation/web/lib/parse-log-line.js +1 -1
  55. package/dist/tsconfig.build.tsbuildinfo +1 -1
  56. package/package.json +1 -1
  57. package/web/.next/BUILD_ID +1 -1
  58. package/web/.next/build-manifest.json +2 -2
  59. package/web/.next/fallback-build-manifest.json +2 -2
  60. package/web/.next/prerender-manifest.json +3 -3
  61. package/web/.next/required-server-files.js +3 -3
  62. package/web/.next/required-server-files.json +3 -3
  63. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
  64. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  65. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  66. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +26 -26
  67. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  68. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  69. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +29 -29
  70. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  71. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  72. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  73. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  74. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  75. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
  76. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  77. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  78. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +26 -26
  79. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  80. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  81. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  82. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  83. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  84. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +26 -26
  85. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  86. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  87. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +29 -29
  88. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  89. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  90. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  91. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  92. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  93. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
  94. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  95. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  96. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
  97. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  98. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  99. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +26 -26
  100. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  101. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  102. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  103. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  104. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  105. package/web/.next/server/app/_global-error.html +2 -2
  106. package/web/.next/server/app/_global-error.rsc +1 -1
  107. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  108. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  109. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  110. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  111. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  112. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +5 -5
  113. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  114. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  115. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  116. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  117. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  118. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  119. package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  120. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  121. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  122. package/web/.next/server/app/skills/page/server-reference-manifest.json +10 -10
  123. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  124. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  125. package/web/.next/server/app/tools/page/server-reference-manifest.json +10 -10
  126. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  127. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  128. package/web/.next/server/app/version/page/server-reference-manifest.json +5 -5
  129. package/web/.next/server/app/version/page.js.nft.json +1 -1
  130. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  131. package/web/.next/server/chunks/[root-of-the-server]__6565a045._.js +1 -1
  132. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  133. package/web/.next/server/chunks/[root-of-the-server]__beda892a._.js +1 -1
  134. package/web/.next/server/chunks/[root-of-the-server]__beda892a._.js.map +1 -1
  135. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
  136. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  137. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  138. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  139. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +3 -3
  140. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  141. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b150ddf._.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js +1 -1
  143. package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js.map +1 -1
  144. package/web/.next/server/chunks/ssr/[root-of-the-server]__28d0d265._.js +2 -2
  145. package/web/.next/server/chunks/ssr/[root-of-the-server]__28d0d265._.js.map +1 -1
  146. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  147. package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js +1 -1
  148. package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js.map +1 -1
  149. package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js +1 -1
  150. package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js.map +1 -1
  151. package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js +1 -1
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js +1 -1
  154. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js.map +1 -1
  155. package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js +1 -1
  156. package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js.map +1 -1
  157. package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js +1 -1
  158. package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js.map +1 -1
  159. package/web/.next/server/chunks/ssr/[root-of-the-server]__f8dd4422._.js +1 -1
  160. package/web/.next/server/chunks/ssr/[root-of-the-server]__f8dd4422._.js.map +1 -1
  161. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  162. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  163. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  164. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  165. package/web/.next/server/chunks/ssr/_3a0b989f._.js +2 -2
  166. package/web/.next/server/chunks/ssr/_3a0b989f._.js.map +1 -1
  167. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  168. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  169. package/web/.next/server/chunks/ssr/_5f69c13f._.js +1 -1
  170. package/web/.next/server/chunks/ssr/_5f69c13f._.js.map +1 -1
  171. package/web/.next/server/chunks/ssr/_7c5b97c6._.js +1 -1
  172. package/web/.next/server/chunks/ssr/_7c5b97c6._.js.map +1 -1
  173. package/web/.next/server/chunks/ssr/_82c57f10._.js +1 -1
  174. package/web/.next/server/chunks/ssr/_82c57f10._.js.map +1 -1
  175. package/web/.next/server/chunks/ssr/_8401cafd._.js +3 -0
  176. package/web/.next/server/chunks/ssr/{_d9337063._.js.map → _8401cafd._.js.map} +1 -1
  177. package/web/.next/server/chunks/ssr/_9495d50b._.js +1 -1
  178. package/web/.next/server/chunks/ssr/_9495d50b._.js.map +1 -1
  179. package/web/.next/server/chunks/ssr/{_75a563a9._.js → _9ae7a653._.js} +2 -2
  180. package/web/.next/server/chunks/ssr/{_75a563a9._.js.map → _9ae7a653._.js.map} +1 -1
  181. package/web/.next/server/chunks/ssr/_a0e3f7e4._.js +1 -1
  182. package/web/.next/server/chunks/ssr/_a0e3f7e4._.js.map +1 -1
  183. package/web/.next/server/chunks/ssr/_ac4a3873._.js +1 -1
  184. package/web/.next/server/chunks/ssr/{_65e76c9a._.js → _b959e656._.js} +2 -2
  185. package/web/.next/server/chunks/ssr/{_65e76c9a._.js.map → _b959e656._.js.map} +1 -1
  186. package/web/.next/server/chunks/ssr/_ca0aa7f0._.js +1 -1
  187. package/web/.next/server/chunks/ssr/_ca0aa7f0._.js.map +1 -1
  188. package/web/.next/server/chunks/ssr/_cb5a021e._.js +1 -1
  189. package/web/.next/server/chunks/ssr/_cb5a021e._.js.map +1 -1
  190. package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -1
  191. package/web/.next/server/chunks/ssr/_d86175ae._.js +1 -1
  192. package/web/.next/server/chunks/ssr/_d86175ae._.js.map +1 -1
  193. package/web/.next/server/chunks/ssr/_d8bedf13._.js +1 -1
  194. package/web/.next/server/chunks/ssr/_d8bedf13._.js.map +1 -1
  195. package/web/.next/server/chunks/ssr/_fa7efce3._.js +2 -2
  196. package/web/.next/server/chunks/ssr/_fa7efce3._.js.map +1 -1
  197. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  198. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  199. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js +1 -1
  200. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js.map +1 -1
  201. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js +1 -1
  202. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js.map +1 -1
  203. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  204. package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.js +1 -1
  205. package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.js.map +1 -1
  206. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  207. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  208. package/web/.next/server/pages/500.html +2 -2
  209. package/web/.next/server/server-reference-manifest.js +1 -1
  210. package/web/.next/server/server-reference-manifest.json +45 -45
  211. package/web/.next/static/chunks/{9c45b599460d0f60.js → 2201b69bab7f5c23.js} +1 -1
  212. package/web/.next/static/chunks/{58adaad3bab50e74.js → 2491f2aaffeeef95.js} +2 -2
  213. package/web/.next/static/chunks/{51df7b00bbb7d365.js → 34331406b85a7f88.js} +1 -1
  214. package/web/.next/static/chunks/{11074feeacea0319.js → 37bf276f01b6ed2f.js} +1 -1
  215. package/web/.next/static/chunks/{a0101660264c178b.js → 392e09fb07ed3645.js} +2 -2
  216. package/web/.next/static/chunks/{ebdef1415f61f021.js → 3e0f9071bbd21632.js} +1 -1
  217. package/web/.next/static/chunks/3e7df10f4565829a.js +5 -0
  218. package/web/.next/static/chunks/{34417fd25d41b914.js → 3f1a01541ae3b89b.js} +1 -1
  219. package/web/.next/static/chunks/8590bd2e69b24b9e.css +1 -0
  220. package/web/.next/static/chunks/{2a54cf0384becb8f.js → a94b6582730a0415.js} +1 -1
  221. package/web/.next/static/chunks/{634f6f485b81464a.js → d2c957a8a3ede6c9.js} +1 -1
  222. package/web/.next/static/chunks/e24859c0ac035932.js +1 -0
  223. package/web/.next/static/chunks/fdda1d8b67c4c0ee.js +1 -0
  224. package/web/public/icons/agents/openai.svg +3 -0
  225. package/web/.next/server/chunks/ssr/_d9337063._.js +0 -3
  226. package/web/.next/static/chunks/18abd4f8b9c216a3.js +0 -1
  227. package/web/.next/static/chunks/8bbc916241b4c141.js +0 -1
  228. package/web/.next/static/chunks/b70bc188ac05a8be.js +0 -5
  229. package/web/.next/static/chunks/c86594475dcb03d5.css +0 -1
  230. /package/web/.next/static/{zY7W9Btxu_CXSFrwelXeS → q5DI6MeYtBkAF8Og8Qst0}/_buildManifest.js +0 -0
  231. /package/web/.next/static/{zY7W9Btxu_CXSFrwelXeS → q5DI6MeYtBkAF8Og8Qst0}/_clientMiddlewareManifest.json +0 -0
  232. /package/web/.next/static/{zY7W9Btxu_CXSFrwelXeS → q5DI6MeYtBkAF8Og8Qst0}/_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)("40623e557b7331ef1edf8377248d51c488637d1362",e5.callServer,void 0,e5.findSourceMapURL,"updateSettingsAction");var e8=e.i(17406),e6=e.i(98804),e9=e.i(44229),e7=e.i(83902);function te(e){return(0,t.jsx)(e9.Code,{className:(0,b.cn)("h-4 w-4",e.className),...e})}function tt({className:e}){return(0,t.jsx)(e6.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)(e6.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)(e6.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)(e6.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)("40193f0d1093c7a473797114bc3974281c1dfc12f2",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,16868,e=>{"use strict";var t=e.i(43698);e.s(["PaperclipIcon",()=>t.default])},70471,e=>{"use strict";var t=e.i(16298);e.s(["FileText",()=>t.default])},42076,e=>{"use strict";async function t(){let e=await fetch("/api/dialog/pick-files",{method:"POST"});if(!e.ok)throw Error("Failed to open file dialog");let t=await e.json();return t.cancelled?null:t.files}e.s(["pickFiles",()=>t])},83843,e=>{"use strict";let t=(0,e.i(3645).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",()=>t],83843)},51911,e=>{"use strict";var t=e.i(20314),a=e.i(79054),r=e.i(91967),s=e.i(5978),i=e.i(22528),o=e.i(36589),l=e.i(23405),n=e.i(77624),d=e.i(87620),c="Switch",[p,u]=(0,i.createContextScope)(c),[h,m]=p(c),x=a.forwardRef((e,i)=>{let{__scopeSwitch:l,name:n,checked:p,defaultChecked:u,required:m,disabled:x,value:f="on",onCheckedChange:g,form:v,...w}=e,[y,C]=a.useState(null),k=(0,s.useComposedRefs)(i,e=>C(e)),N=a.useRef(!1),T=!y||v||!!y.closest("form"),[S,P]=(0,o.useControllableState)({prop:p,defaultProp:u??!1,onChange:g,caller:c});return(0,t.jsxs)(h,{scope:l,checked:S,disabled:x,children:[(0,t.jsx)(d.Primitive.button,{type:"button",role:"switch","aria-checked":S,"aria-required":m,"data-state":j(S),"data-disabled":x?"":void 0,disabled:x,value:f,...w,ref:k,onClick:(0,r.composeEventHandlers)(e.onClick,e=>{P(e=>!e),T&&(N.current=e.isPropagationStopped(),N.current||e.stopPropagation())})}),T&&(0,t.jsx)(b,{control:y,bubbles:!N.current,name:n,value:f,checked:S,required:m,disabled:x,form:v,style:{transform:"translateX(-100%)"}})]})});x.displayName=c;var f="SwitchThumb",g=a.forwardRef((e,a)=>{let{__scopeSwitch:r,...s}=e,i=m(f,r);return(0,t.jsx)(d.Primitive.span,{"data-state":j(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:a})});g.displayName=f;var b=a.forwardRef(({__scopeSwitch:e,control:r,checked:i,bubbles:o=!0,...d},c)=>{let p=a.useRef(null),u=(0,s.useComposedRefs)(p,c),h=(0,l.usePrevious)(i),m=(0,n.useSize)(r);return a.useEffect(()=>{let e=p.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(h!==i&&t){let a=new Event("click",{bubbles:o});t.call(e,i),e.dispatchEvent(a)}},[h,i,o]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i,...d,tabIndex:-1,ref:u,style:{...d.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function j(e){return e?"checked":"unchecked"}b.displayName="SwitchBubbleInput",e.s(["Root",()=>x,"Switch",()=>x,"SwitchThumb",()=>g,"Thumb",()=>g,"createSwitchScope",()=>u],95291);var v=e.i(95291),v=v,w=e.i(31777);function y({className:e,size:a="default",...r}){return(0,t.jsx)(v.Root,{"data-slot":"switch","data-size":a,className:(0,w.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...r,children:(0,t.jsx)(v.Thumb,{"data-slot":"switch-thumb",className:(0,w.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}e.s(["Switch",()=>y],51911)},15203,e=>{"use strict";var t=e.i(20314),a=e.i(79054),r=e.i(31406),s=e.i(60112),i=e.i(21023);let o=(0,i.createServerReference)("400e4bf9ab63770031d31af55a3151e6b8633a9c92",i.callServer,void 0,i.findSourceMapURL,"createFeature");var l=e.i(16868),n=e.i(83843),d=e.i(97667),c=e.i(53360),p=e.i(55016),u=e.i(91925),h=e.i(83428);let m=(0,e.i(3645).default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);var x=e.i(70471),f=e.i(31777),g=e.i(8361);e.i(1650);var b=e.i(11495),j=e.i(45811),v=e.i(35364),w=e.i(98127),y=e.i(48306),C=e.i(41957),k=e.i(81846),N=e.i(90382),T=e.i(51911),S=e.i(2828),P=e.i(30153);e.i(50032);var R=e.i(86254);let E=(0,i.createServerReference)("40e66f9468e6adad349bcda0bdd3ea3def8bc5d9b7",i.callServer,void 0,i.findSourceMapURL,"getViewerPermission");var F=e.i(41413),D=e.i(25235),z=e.i(78521);e.i(13322);var L=e.i(61201),A=e.i(75921),I=e.i(85245),O=e.i(42076);let U=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]),M=[{id:"allowPrd",label:"PRD",description:"Auto-approve requirements move to planning."},{id:"allowPlan",label:"Plan",description:"Auto-approve planning move to implementation."},{id:"allowMerge",label:"Merge",description:"Auto-approve merge move to Done."}],q={allowPrd:!1,allowPlan:!1,allowMerge:!1};function B({open:e,onClose:r,onSubmit:s,repositoryPath:i,isSubmitting:o=!1,workflowDefaults:n,features:d,repositories:u,initialParentId:h,currentAgentType:w,currentModel:N,initialDescription:D,canPushDirectly:z}){let L=(0,g.useSoundAction)("create"),A=i&&(!u||0===u.length||u.some(e=>e.path===i))?i:"",I=n?.approvalGates??q,B=n?.push??!1,G=n?.openPr??!1,K=n?.ciWatchEnabled!==!1,H=n?.enableEvidence??!1,V=n?.commitEvidence??!1,[Y,J]=(0,a.useState)(D??"");(0,a.useEffect)(()=>{D&&J(D)},[D]);let[X,Z]=(0,a.useState)([]),[Q,_]=(0,a.useState)({...I}),[ee,et]=(0,a.useState)(B),[ea,er]=(0,a.useState)(G),[es,ei]=(0,a.useState)(n?.ciWatchEnabled!==!1),[eo,el]=(0,a.useState)(H),[en,ed]=(0,a.useState)(V),[ec,ep]=(0,a.useState)(void 0),[eu,eh]=(0,a.useState)(!1),[em,ex]=(0,a.useState)(!1),[ef,eg]=(0,a.useState)(!1),[eb,ej]=(0,a.useState)(!0),[ev,ew]=(0,a.useState)(void 0),[ey,eC]=(0,a.useState)(void 0),[ek,eN]=(0,a.useState)(A||void 0),[eT,eS]=(0,a.useState)(u??[]),[eP,eR]=(0,a.useState)(!1),[eE,eF]=(0,a.useState)(null),[eD,ez]=(0,a.useState)(!1),eL=(0,a.useRef)(crypto.randomUUID()),eA=(0,a.useRef)(0),eI=(0,a.useRef)(null);(0,a.useEffect)(()=>{n&&(_({...n.approvalGates}),et(n.push),er(n.openPr),ei(!1!==n.ciWatchEnabled),el(n.enableEvidence),ed(n.commitEvidence))},[n]),(0,a.useEffect)(()=>{eS(u??[])},[u]),(0,a.useEffect)(()=>{e&&h&&ep(h)},[e,h]);let[eO,eU]=(0,a.useState)(z??!1);(0,a.useEffect)(()=>{eU(z??!1)},[z]);let eM=(0,a.useRef)(ek);(0,a.useEffect)(()=>{ek&&ek!==eM.current&&(eM.current=ek,E(ek).then(e=>eU(e.canPushDirectly)).catch(()=>eU(!1)))},[ek]),(0,a.useEffect)(()=>{eO&&(eg(!1),et(B),er(G),ej(!0))},[eO,B,G]);let eq=(0,a.useCallback)(()=>{J(""),Z([]),_({...I}),et(B),er(G),ei(K),el(H),ed(V),ep(void 0),eN(A||void 0),eS(u??[]),eh(!1),ex(!1),eg(!1),ej(!0),ew(void 0),eC(void 0),eF(null),eA.current=0,eR(!1)},[I,B,G,H,K,V,A,u]),eB=""!==Y.trim()||X.length>0,{attemptClose:e$}=(0,P.useGuardedDrawerClose)({open:e,isDirty:eB,onClose:r,onReset:eq}),eW=(0,a.useCallback)(async e=>{for(let t of(eF(null),e)){if(t.size>0xa00000)return void eF(`"${t.name}" exceeds 10 MB limit`);let e=function(e){let t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""}(t.name);if(e&&!U.has(e))return void eF(`File type "${e}" is not allowed`)}for(let t of e){let e=crypto.randomUUID();Z(a=>[...a,{id:e,name:t.name,size:t.size,mimeType:t.type||"application/octet-stream",path:"",loading:!0}]);try{let a=new FormData;a.append("file",t),a.append("sessionId",eL.current);let r=await fetch("/api/attachments/upload",{method:"POST",body:a});if(!r.ok){let t=await r.json().catch(()=>({error:"Upload failed"}));Z(t=>t.filter(t=>t.id!==e)),eF(t.error??"Upload failed");return}let s=await r.json();Z(t=>t.some(t=>t.id!==e&&t.path===s.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...s,id:e,loading:!1}:t))}catch{Z(t=>t.filter(t=>t.id!==e)),eF("Upload failed")}}},[]),eG=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eA.current+=1,1===eA.current&&eR(!0)},[]),eK=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eA.current-=1,0===eA.current&&eR(!1)},[]),eH=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),eV=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eA.current=0,eR(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&eW(t)},[eW]),eY=(0,a.useCallback)(e=>{let t=e.clipboardData?.items;if(!t)return;let a=[];for(let e of Array.from(t))if("file"===e.kind){let t=e.getAsFile();t&&a.push(t)}a.length>0&&(e.preventDefault(),eW(a))},[eW]),eJ=(0,a.useCallback)(e=>{if(e.preventDefault(),!Y.trim())return;let t=ek??A;t&&(L.play(),s({description:Y.trim(),attachments:X.filter(e=>!e.loading),repositoryPath:t,approvalGates:{allowPrd:Q.allowPrd??!1,allowPlan:Q.allowPlan??!1,allowMerge:Q.allowMerge??!1},push:!!ef||ee||ea,openPr:!!ef||ea,ciWatchEnabled:es,enableEvidence:eo,commitEvidence:en,fast:eu,forkAndPr:ef,commitSpecs:eb,...em?{pending:em}:{},...ev?{agentType:ev}:{},...ey?{model:ey}:{},...ec?{parentId:ec}:{},sessionId:eL.current}),eq())},[Y,X,Q,ek,A,s,ee,ea,eo,es,en,eu,ef,eb,em,ev,ey,ec,L,eq]),eX=(0,a.useCallback)(async()=>{try{let e=await (0,O.pickFiles)();if(!e)return;for(let t of e){let e=crypto.randomUUID();Z(a=>[...a,{id:e,name:t.name,size:t.size,mimeType:"application/octet-stream",path:"",loading:!0}]);try{let a=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t.path,sessionId:eL.current})});if(!a.ok){let t=await a.json().catch(()=>({error:"Upload failed"}));Z(t=>t.filter(t=>t.id!==e)),eF(t.error??"Upload failed");return}let r=await a.json();Z(t=>t.some(t=>t.id!==e&&t.path===r.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...r,id:e,loading:!1}:t))}catch{Z(t=>t.filter(t=>t.id!==e)),eF("Upload failed")}}}catch{}},[]),eZ=(0,a.useCallback)(e=>{Z(t=>t.filter(t=>t.id!==e))},[]),eQ=(0,a.useCallback)((e,t)=>{Z(a=>a.map(a=>a.id===e?{...a,notes:t}:a))},[]),e_=(0,a.useRef)(null),e0=(0,a.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),e_.current?.requestSubmit())},[]),e1=(0,a.useCallback)(()=>{ez(!0)},[]),e5=(0,a.useCallback)(()=>{setTimeout(()=>{let e=eI.current?.contains(document.activeElement),t=eI.current?.querySelector('[aria-expanded="true"]')!==null;e||t||ez(!1)},0)},[]),e2=d&&d.length>0,e3=!A&&!ek,e4=!A&&void 0!==u;return(0,t.jsx)(b.BaseDrawer,{open:e,onClose:e$,size:"md",modal:!1,dismissOnOutsideClick:!0,"data-testid":"feature-create-drawer",header:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,t.jsx)(j.DrawerTitle,{children:"NEW FEATURE"})]}),o?(0,t.jsx)(j.DrawerDescription,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsx)(k.Badge,{variant:"secondary",children:"Creating..."})})}):null]}),footer:(0,t.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,t.jsx)(v.Button,{variant:"outline",onClick:e$,disabled:o,children:"Cancel"}),(0,t.jsx)(v.Button,{type:"submit",form:"create-feature-form",disabled:!Y.trim()||o||e3,children:o?"Creating...":"+ Create Feature"})]}),children:(0,t.jsx)("div",{className:"overflow-y-auto p-4",children:(0,t.jsx)(S.TooltipProvider,{delayDuration:400,children:(0,t.jsxs)("form",{ref:e_,id:"create-feature-form",onSubmit:eJ,onKeyDown:e0,className:"flex flex-col gap-4",children:[e4?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-selector-section",children:[(0,t.jsx)(C.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"REPOSITORY"}),(0,t.jsx)(W,{repositories:eT,value:ek,onChange:eN,onAddRepository:e=>{eS(t=>[...t,e]),eN(e.path)},disabled:o})]}):A?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section",children:[(0,t.jsx)(C.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"REPOSITORY"}),(0,t.jsx)("p",{className:"text-sm","data-testid":"repo-readonly-label",children:u?.find(e=>e.path===A)?.name??A.split("/").pop()})]}):null,(0,t.jsxs)("div",{role:"region","aria-label":"File drop zone","data-drag-over":eP?"true":"false",onDragEnter:eG,onDragLeave:eK,onDragOver:eH,onDrop:eV,className:(0,f.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",eP&&"border-primary/50 bg-primary/5"),children:[(0,t.jsx)(C.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"DESCRIBE YOUR FEATURE"}),(0,t.jsxs)("div",{ref:eI,onFocus:e1,onBlur:e5,className:(0,f.cn)("border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]",eD&&"ring-ring/50 border-ring ring-[3px]"),children:[(0,t.jsx)(y.Textarea,{id:"feature-description",placeholder:"e.g. Add GitHub OAuth login with callback handling and token refresh...",value:Y,onChange:e=>J(e.target.value),onPaste:eY,required:!0,disabled:o,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),X.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:X.map(e=>(0,t.jsx)(R.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>eZ(e.id),disabled:o,loading:e.loading,notes:e.notes,onNotesChange:t=>eQ(e.id,t)},e.id))}),eE?(0,t.jsx)("p",{className:"text-destructive px-3 pb-2 text-xs",children:eE}):null,(0,t.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,t.jsx)(F.AgentModelPicker,{initialAgentType:ev??w??"claude-code",initialModel:ey??N??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(e,t)=>{ew(e),eC(t)},disabled:o,className:"w-55"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(T.Switch,{id:"pending-mode",checked:em,onCheckedChange:ex,disabled:o}),(0,t.jsxs)(C.Label,{htmlFor:"pending-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(p.Clock,{className:"h-3.5 w-3.5"}),"Pending"]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Create without starting — start manually later."})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(T.Switch,{id:"fast-mode",checked:eu,onCheckedChange:eh,disabled:o}),(0,t.jsxs)(C.Label,{htmlFor:"fast-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(c.Zap,{className:"h-3.5 w-3.5"}),"Fast Mode"]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Skip SDLC phases and implement directly from your prompt."})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:eX,disabled:o,"aria-label":"Attach files",className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,t.jsx)(l.PaperclipIcon,{className:"h-4 w-4"})})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Attach files"})]})]})]})]}),e2&&void 0!==h?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(C.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"PARENT FEATURE"}),(0,t.jsx)($,{features:d,value:ec,onChange:ep,disabled:o})]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"APPROVE"})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Auto-approve phase transitions without manual review."})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:M.map(e=>(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:`approve-${e.id}`,size:"sm",checked:Q[e.id]??!1,onCheckedChange:t=>_(a=>({...a,[e.id]:t})),disabled:o||eu&&("allowPrd"===e.id||"allowPlan"===e.id)}),(0,t.jsx)(C.Label,{htmlFor:`approve-${e.id}`,className:"cursor-pointer text-xs font-medium",children:e.label})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:eu&&("allowPrd"===e.id||"allowPlan"===e.id)?"Skipped in Fast Mode":e.description})]},e.id))}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{let e=M.every(e=>Q[e.id]),t={};for(let a of M)t[a.id]=!e;_(t)},disabled:o,className:(0,f.cn)("text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors",M.every(e=>Q[e.id])&&"text-primary"),children:"All"})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Toggle all approval gates"})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"EVIDENCE"})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Collect and attach evidence after implementation."})]}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"enable-evidence",size:"sm",checked:eo,onCheckedChange:e=>{el(e),e||ed(!1)},disabled:o}),(0,t.jsx)(C.Label,{htmlFor:"enable-evidence",className:"cursor-pointer text-xs font-medium",children:"Collect"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Capture screenshots and artifacts after implementation."})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"commit-evidence",size:"sm",checked:en,onCheckedChange:ed,disabled:o||!eo||!ea&&!ef}),(0,t.jsx)(C.Label,{htmlFor:"commit-evidence",className:(0,f.cn)("cursor-pointer text-xs font-medium",(!eo||!ea&&!ef)&&"opacity-50"),children:"Add to PR"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ea||ef?eo?"Include evidence in the pull request body.":"Requires evidence collection to be enabled":"Requires PR to be enabled"})]})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-start gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 pt-0.5 text-xs font-semibold tracking-wider",children:"GIT"}),(0,t.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-4",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"push",size:"sm",checked:!!ef||ee||ea,onCheckedChange:e=>{et(e),!e&&ea&&er(!1)},disabled:o||ef}),(0,t.jsx)(C.Label,{htmlFor:"push",className:(0,f.cn)("cursor-pointer text-xs font-medium",ef&&"opacity-50"),children:"Push"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ef?"Enabled — contributing to upstream":"Push branch to remote after implementation."})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"open-pr",size:"sm",checked:!!ef||ea,onCheckedChange:e=>{er(e),e||ed(!1)},disabled:o||ef}),(0,t.jsx)(C.Label,{htmlFor:"open-pr",className:(0,f.cn)("cursor-pointer text-xs font-medium",ef&&"opacity-50"),children:"PR"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ef?"Enabled — contributing to upstream":"Open a pull request after pushing."})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"ci-watch",size:"sm",checked:es,onCheckedChange:ei,disabled:o}),(0,t.jsx)(C.Label,{htmlFor:"ci-watch",className:"cursor-pointer text-xs font-medium",children:"Watch"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Watch CI and auto-fix after push."})]}),(0,t.jsx)("div",{className:"bg-border h-4 w-px shrink-0"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"commit-specs",size:"sm",checked:eb,onCheckedChange:ej,disabled:o}),(0,t.jsxs)(C.Label,{htmlFor:"commit-specs",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(x.FileText,{className:"h-3 w-3"}),"Commit Specs"]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Commit specs to repository."})]}),!eO&&(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"fork-and-pr",size:"sm",checked:ef,onCheckedChange:e=>{eg(e),e&&ej(!1)},disabled:o}),(0,t.jsxs)(C.Label,{htmlFor:"fork-and-pr",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(m,{className:"h-3 w-3"}),"Fork & PR"]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Contribute via fork (PR to upstream)."})]})]})]})]})]})})})})}function $({features:e,value:r,onChange:s,disabled:i}){let[o,l]=(0,a.useState)(!1),[c,p]=(0,a.useState)(""),u=(0,a.useRef)(null),h=e.find(e=>e.id===r),m=c.trim()?e.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())||e.id.toLowerCase().includes(c.toLowerCase())):e,x=(0,a.useCallback)(e=>{s(e),l(!1),p("")},[s]);return(0,a.useEffect)(()=>{o?setTimeout(()=>u.current?.focus(),0):p("")},[o]),(0,t.jsxs)(N.Popover,{open:o,onOpenChange:l,children:[(0,t.jsx)(N.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":o,"aria-label":"Parent Feature",disabled:i,"data-testid":"parent-feature-combobox",className:(0,f.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!h&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:h?`${h.name} (${h.id.slice(0,8)})`:"Select parent feature..."}),(0,t.jsx)(n.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(N.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"parent-feature-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(w.Input,{ref:u,placeholder:"Search features...",value:c,onChange:e=>p(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"parent-feature-search"})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Features",children:[(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":void 0===r,onClick:()=>x(void 0),className:(0,f.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===r&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,t.jsx)(d.CheckIcon,{className:(0,f.cn)("h-4 w-4 shrink-0",void 0!==r&&"invisible")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:"No parent"})]}),0===m.length&&c?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No features found."}):m.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":r===e.id,onClick:()=>x(e.id),className:(0,f.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",r===e.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${e.id}`,children:[(0,t.jsx)(d.CheckIcon,{className:(0,f.cn)("h-4 w-4 shrink-0",r!==e.id&&"invisible")}),(0,t.jsxs)("span",{className:"truncate",children:[e.name," ",(0,t.jsxs)("span",{className:"text-muted-foreground font-mono text-xs",children:["(",e.id.slice(0,8),")"]})]})]},e.id))]})]})})]})}function W({repositories:e,value:r,onChange:s,onAddRepository:i,disabled:o}){let[l,c]=(0,a.useState)(!1),[p,m]=(0,a.useState)(""),[x,g]=(0,a.useState)(!1),[b,j]=(0,a.useState)(null),[v,y]=(0,a.useState)(!1),C=(0,a.useRef)(null),{reactFileManager:k}=(0,A.useFeatureFlags)(),T=e.find(e=>e.path===r),S=p.trim()?e.filter(e=>e.name.toLowerCase().includes(p.toLowerCase())||e.path.toLowerCase().includes(p.toLowerCase())):e,P=(0,a.useCallback)(e=>{s(e),c(!1),m("")},[s]),R=(0,a.useCallback)(async e=>{let t=await (0,I.addRepository)({path:e});if(t.error){j(t.error),g(!1);return}if(t.repository){let e={id:t.repository.id,name:t.repository.name,path:t.repository.path};i?.(e),s(e.path),c(!1),m("")}},[i,s]),E=(0,a.useCallback)(async()=>{if(!x){if(k)return void y(!0);g(!0),j(null);try{let e=await (0,z.pickFolder)();if(!e)return void g(!1);await R(e)}catch{y(!0)}finally{g(!1)}}},[x,k,R]),F=(0,a.useCallback)(async e=>{if(y(!1),e){g(!0),j(null);try{await R(e)}catch(e){j(e instanceof Error?e.message:"Failed to add repository")}finally{g(!1)}}},[R]);return(0,a.useEffect)(()=>{l?setTimeout(()=>C.current?.focus(),0):m("")},[l]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(N.Popover,{open:l,onOpenChange:c,children:[(0,t.jsx)(N.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",role:"combobox","aria-expanded":l,"aria-label":"Repository",disabled:o,"data-testid":"repository-combobox",className:(0,f.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!T&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:T?T.name:"Select repository..."}),(0,t.jsx)(n.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(N.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"repository-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(w.Input,{ref:C,placeholder:"Search repositories...",value:p,onChange:e=>m(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"repository-search"})}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===S.length?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm","data-testid":"repository-empty",children:"No repositories found."}):S.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":r===e.path,onClick:()=>P(e.path),className:(0,f.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",r===e.path&&"bg-accent/50"),"data-testid":`repository-option-${e.id}`,children:[(0,t.jsx)(d.CheckIcon,{className:(0,f.cn)("h-4 w-4 shrink-0",r!==e.path&&"invisible")}),(0,t.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,t.jsx)("span",{className:"truncate",children:e.name}),(0,t.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))}),(0,t.jsx)(D.Separator,{}),(0,t.jsxs)("button",{type:"button",onClick:E,disabled:x,className:"hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm","data-testid":"add-repository-item",children:[x?(0,t.jsx)(h.Loader2,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,t.jsx)(u.FolderPlus,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:"Add new repository..."})]}),b?(0,t.jsx)("p",{className:"px-3 pb-2 text-xs text-red-500","data-testid":"add-repository-error",children:b}):null]})})]}),(0,t.jsx)(L.ReactFileManagerDialog,{open:v,onOpenChange:e=>{e||y(!1)},onSelect:F})]})}function G({repositoryPath:e,initialParentId:i,initialDescription:l,features:n,repositories:d,workflowDefaults:c,currentAgentType:p,currentModel:u,canPushDirectly:h}){let m=(0,r.useRouter)(),[x,f]=(0,a.useState)(!1),g=(0,r.usePathname)().startsWith("/create"),b=!x&&g;(0,a.useEffect)(()=>{!g&&x&&f(!1)},[g,x]);let j=(0,a.useCallback)(()=>{m.push("/")},[m]),v=(0,a.useCallback)(e=>{f(!0),m.push("/"),o(e).then(t=>{t.error?s.toast.error(t.error):window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.feature.repositoryPath,parentId:e.parentId}}))}).catch(()=>{s.toast.error("Failed to create feature"),f(!1)})},[m]);return(0,t.jsx)(B,{open:b,onClose:j,onSubmit:v,repositoryPath:e,features:n,repositories:d,workflowDefaults:c,initialParentId:i,initialDescription:l,isSubmitting:x,currentAgentType:p,currentModel:u,canPushDirectly:h})}e.s(["CreateDrawerClient",()=>G],15203)}]);