@shepai/cli 1.148.0 → 1.149.0

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 (193) hide show
  1. package/dist/src/presentation/web/app/api/agent-events/route.js +1 -1
  2. package/dist/src/presentation/web/app/api/sessions/route.d.ts.map +1 -1
  3. package/dist/src/presentation/web/app/api/sessions/route.js +2 -268
  4. package/dist/src/presentation/web/app/api/sessions-batch/route.d.ts +17 -0
  5. package/dist/src/presentation/web/app/api/sessions-batch/route.d.ts.map +1 -0
  6. package/dist/src/presentation/web/app/api/sessions-batch/route.js +61 -0
  7. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.d.ts +1 -1
  8. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.d.ts.map +1 -1
  9. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.js +15 -73
  10. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.stories.d.ts.map +1 -1
  11. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.stories.js +18 -17
  12. package/dist/src/presentation/web/components/features/control-center/control-center.d.ts.map +1 -1
  13. package/dist/src/presentation/web/components/features/control-center/control-center.js +2 -1
  14. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  15. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +4 -1
  16. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
  17. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +32 -33
  18. package/dist/src/presentation/web/hooks/sessions-provider.d.ts +12 -0
  19. package/dist/src/presentation/web/hooks/sessions-provider.d.ts.map +1 -0
  20. package/dist/src/presentation/web/hooks/sessions-provider.js +57 -0
  21. package/dist/src/presentation/web/hooks/use-deploy-action.d.ts.map +1 -1
  22. package/dist/src/presentation/web/hooks/use-deploy-action.js +8 -54
  23. package/dist/src/presentation/web/lib/session-scanner.d.ts +27 -0
  24. package/dist/src/presentation/web/lib/session-scanner.d.ts.map +1 -0
  25. package/dist/src/presentation/web/lib/session-scanner.js +255 -0
  26. package/dist/tsconfig.build.tsbuildinfo +1 -1
  27. package/package.json +1 -1
  28. package/web/.next/BUILD_ID +1 -1
  29. package/web/.next/app-path-routes-manifest.json +1 -0
  30. package/web/.next/build-manifest.json +2 -2
  31. package/web/.next/fallback-build-manifest.json +2 -2
  32. package/web/.next/prerender-manifest.json +3 -3
  33. package/web/.next/required-server-files.js +2 -2
  34. package/web/.next/required-server-files.json +2 -2
  35. package/web/.next/routes-manifest.json +6 -0
  36. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
  37. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  38. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  39. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +28 -28
  40. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  41. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  42. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  43. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  44. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  45. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
  46. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  47. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  48. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  49. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  50. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +28 -28
  52. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  53. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  54. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  55. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  56. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
  58. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  59. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  60. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
  61. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  62. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  63. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  64. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  65. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  66. package/web/.next/server/app/_global-error.html +2 -2
  67. package/web/.next/server/app/_global-error.rsc +1 -1
  68. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  69. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  70. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  71. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  72. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  73. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
  74. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  75. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  76. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  77. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  78. package/web/.next/server/app/api/sessions/route.js +2 -3
  79. package/web/.next/server/app/api/sessions/route.js.nft.json +1 -1
  80. package/web/.next/server/app/api/sessions-batch/route/app-paths-manifest.json +3 -0
  81. package/web/.next/server/app/api/sessions-batch/route/build-manifest.json +11 -0
  82. package/web/.next/server/app/api/sessions-batch/route/server-reference-manifest.json +4 -0
  83. package/web/.next/server/app/api/sessions-batch/route.js +7 -0
  84. package/web/.next/server/app/api/sessions-batch/route.js.map +5 -0
  85. package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -0
  86. package/web/.next/server/app/api/sessions-batch/route_client-reference-manifest.js +2 -0
  87. package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  88. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  89. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  90. package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
  91. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  92. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  93. package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
  94. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  95. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  96. package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
  97. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  98. package/web/.next/server/app-paths-manifest.json +1 -0
  99. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js +1 -1
  100. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
  101. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_sessions-batch_route_actions_4859f283.js +3 -0
  102. package/web/.next/server/chunks/[root-of-the-server]__0d33c29e._.js +3 -0
  103. package/web/.next/server/chunks/[root-of-the-server]__0d33c29e._.js.map +1 -0
  104. package/web/.next/server/chunks/[root-of-the-server]__2f61738a._.js +3 -0
  105. package/web/.next/server/chunks/[root-of-the-server]__2f61738a._.js.map +1 -0
  106. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  107. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  108. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  109. package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js +2 -2
  110. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js +1 -1
  111. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js.map +1 -1
  112. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +1 -1
  114. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
  115. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
  117. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
  118. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  119. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  120. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js +1 -1
  121. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js.map +1 -1
  122. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +1 -1
  123. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +1 -1
  124. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js +1 -1
  125. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js.map +1 -1
  126. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js +1 -1
  127. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js.map +1 -1
  128. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  129. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  130. package/web/.next/server/chunks/ssr/_0c5f56e3._.js +2 -2
  131. package/web/.next/server/chunks/ssr/_0c5f56e3._.js.map +1 -1
  132. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  133. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  134. package/web/.next/server/chunks/ssr/_1b719e7f._.js +1 -1
  135. package/web/.next/server/chunks/ssr/_1b719e7f._.js.map +1 -1
  136. package/web/.next/server/chunks/ssr/_37e8548b._.js +1 -1
  137. package/web/.next/server/chunks/ssr/_37e8548b._.js.map +1 -1
  138. package/web/.next/server/chunks/ssr/{_fe63a7f9._.js → _458e9a64._.js} +2 -2
  139. package/web/.next/server/chunks/ssr/{_fe63a7f9._.js.map → _458e9a64._.js.map} +1 -1
  140. package/web/.next/server/chunks/ssr/_5022e2b1._.js +4 -0
  141. package/web/.next/server/chunks/ssr/_5022e2b1._.js.map +1 -0
  142. package/web/.next/server/chunks/ssr/_55d763e2._.js +1 -1
  143. package/web/.next/server/chunks/ssr/_55d763e2._.js.map +1 -1
  144. package/web/.next/server/chunks/ssr/_6256a985._.js +1 -1
  145. package/web/.next/server/chunks/ssr/_6256a985._.js.map +1 -1
  146. package/web/.next/server/chunks/ssr/_64bdfc6f._.js +2 -2
  147. package/web/.next/server/chunks/ssr/_64bdfc6f._.js.map +1 -1
  148. package/web/.next/server/chunks/ssr/_8fcc39d4._.js +1 -1
  149. package/web/.next/server/chunks/ssr/_b71645b4._.js +1 -1
  150. package/web/.next/server/chunks/ssr/_b71645b4._.js.map +1 -1
  151. package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
  152. package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  154. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  155. package/web/.next/server/chunks/ssr/{src_presentation_web_7b2fda40._.js → src_presentation_web_35159458._.js} +2 -2
  156. package/web/.next/server/chunks/ssr/{src_presentation_web_7b2fda40._.js.map → src_presentation_web_35159458._.js.map} +1 -1
  157. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
  158. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
  159. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
  160. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
  161. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  162. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  163. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  165. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  166. package/web/.next/server/pages/500.html +2 -2
  167. package/web/.next/server/server-reference-manifest.js +1 -1
  168. package/web/.next/server/server-reference-manifest.json +44 -44
  169. package/web/.next/static/chunks/{0137d4850cab3c45.js → 24b1c1e60fd3b7b5.js} +2 -2
  170. package/web/.next/static/chunks/{c731682077fbac4f.js → 3e7a130816229439.js} +1 -1
  171. package/web/.next/static/chunks/{7c5131e33516a325.js → 3f1b33498b472b00.js} +1 -1
  172. package/web/.next/static/chunks/{04869f1d3f5d9071.js → 4ef564fb1174e497.js} +1 -1
  173. package/web/.next/static/chunks/75834e430247b325.js +1 -0
  174. package/web/.next/static/chunks/79dc2e2f1c2ff519.js +1 -0
  175. package/web/.next/static/chunks/{063a24b49d9818a0.js → a086f8dfef2c3325.js} +1 -1
  176. package/web/.next/static/chunks/{48850e202dd814ac.js → a6363f73e05ccf47.js} +1 -1
  177. package/web/.next/static/chunks/{6f76e63ead3fac2e.js → b7126c0b3a97e77e.js} +1 -1
  178. package/web/.next/static/chunks/d3df6e6434e16519.js +1 -0
  179. package/web/.next/static/chunks/eaca60cc3ab0bf9f.js +2 -0
  180. package/web/.next/static/chunks/{9dad6769d10a32df.js → fe5d48f8ca483935.js} +1 -1
  181. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_ff60e4a5.js +0 -3
  182. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_ff60e4a5.js.map +0 -1
  183. package/web/.next/server/chunks/[externals]__448264a3._.js +0 -3
  184. package/web/.next/server/chunks/ssr/_4533d6f8._.js +0 -4
  185. package/web/.next/server/chunks/ssr/_4533d6f8._.js.map +0 -1
  186. package/web/.next/static/chunks/21e82fee1a7e1668.js +0 -1
  187. package/web/.next/static/chunks/682563e4503cbd58.js +0 -1
  188. package/web/.next/static/chunks/683b1d85e789c2eb.js +0 -2
  189. package/web/.next/static/chunks/d62ae5e449d87057.js +0 -1
  190. /package/web/.next/server/chunks/{[externals]__448264a3._.js.map → 744ca_web__next-internal_server_app_api_sessions-batch_route_actions_4859f283.js.map} +0 -0
  191. /package/web/.next/static/{zYKuE1zbe1UWwAJv5EVwg → 1CQHYZVn3VajyhdvnsCaw}/_buildManifest.js +0 -0
  192. /package/web/.next/static/{zYKuE1zbe1UWwAJv5EVwg → 1CQHYZVn3VajyhdvnsCaw}/_clientMiddlewareManifest.json +0 -0
  193. /package/web/.next/static/{zYKuE1zbe1UWwAJv5EVwg → 1CQHYZVn3VajyhdvnsCaw}/_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),r=e.i(23925),a=e.i(3645);let i=(0,a.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var l=e.i(38573),o=e.i(49228);let s=(0,a.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,a.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,a.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,a.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,a.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(60112),v=e.i(31777),w=e.i(41957),b=e.i(51911),y=e.i(26036),S=e.i(27069),j=e.i(91967),C=e.i(87342),k=e.i(5978),I=e.i(22528),M=e.i(66033),N=e.i(53532),P=e.i(41687),R=e.i(56720),E=e.i(13123),T=e.i(52740),A=e.i(39979),D=e.i(87620),F=e.i(86874),H=e.i(29297),L=e.i(36589),B=e.i(5192),z=e.i(23405),_=e.i(1693),V=e.i(73772),W=e.i(13044),O=[" ","Enter","ArrowUp","ArrowDown"],U=[" ","Enter"],K="Select",[q,G,$]=(0,C.createCollection)(K),[Y,Z]=(0,I.createContextScope)(K,[$,T.createPopperScope]),X=(0,T.createPopperScope)(),[Q,J]=Y(K),[ee,et]=Y(K),en=e=>{let{__scopeSelect:r,children:a,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=X(r),[v,w]=n.useState(null),[b,y]=n.useState(null),[S,j]=n.useState(!1),C=(0,M.useDirection)(u),[k,I]=(0,L.useControllableState)({prop:i,defaultProp:l??!1,onChange:o,caller:K}),[N,P]=(0,L.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:K}),R=n.useRef(null),A=!v||g||!!v.closest("form"),[D,F]=n.useState(new Set),H=Array.from(D).map(e=>e.props.value).join(";");return(0,t.jsx)(T.Root,{...x,children:(0,t.jsxs)(Q,{required:f,scope:r,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:(0,E.useId)(),value:N,onValueChange:P,open:k,onOpenChange:I,dir:C,triggerPointerDownPosRef:R,disabled:h,children:[(0,t.jsx)(q.Provider,{scope:r,children:(0,t.jsx)(ee,{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:a})}),A?(0,t.jsxs)(eO,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:m,value:N,onChange:e=>P(e.target.value),disabled:h,form:g,children:[void 0===N?(0,t.jsx)("option",{value:""}):null,Array.from(D)]},H):null]})})};en.displayName=K;var er="SelectTrigger",ea=n.forwardRef((e,r)=>{let{__scopeSelect:a,disabled:i=!1,...l}=e,o=X(a),s=J(er,a),d=s.disabled||i,c=(0,k.useComposedRefs)(r,s.onTriggerChange),u=G(a),p=n.useRef("touch"),[m,h,f]=eK(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=eq(t,e,n);void 0!==r&&s.onValueChange(r.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)(T.Anchor,{asChild:!0,...o,children:(0,t.jsx)(D.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":eU(s.value)?"":void 0,...l,ref:c,onClick:(0,j.composeEventHandlers)(l.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,j.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,j.composeEventHandlers)(l.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&O.includes(e.key)&&(g(),e.preventDefault())})})})});ea.displayName=er;var ei="SelectValue",el=n.forwardRef((e,n)=>{let{__scopeSelect:r,className:a,style:i,children:l,placeholder:o="",...s}=e,d=J(ei,r),{onValueNodeHasChildrenChange:c}=d,u=void 0!==l,p=(0,k.useComposedRefs)(n,d.onValueNodeChange);return(0,B.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(D.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eU(d.value)?(0,t.jsx)(t.Fragment,{children:o}):l})});el.displayName=ei;var eo=n.forwardRef((e,n)=>{let{__scopeSelect:r,children:a,...i}=e;return(0,t.jsx)(D.Primitive.span,{"aria-hidden":!0,...i,ref:n,children:a||"▼"})});eo.displayName="SelectIcon";var es=e=>(0,t.jsx)(A.Portal,{asChild:!0,...e});es.displayName="SelectPortal";var ed="SelectContent",ec=n.forwardRef((e,r)=>{let a=J(ed,e.__scopeSelect),[i,l]=n.useState();return((0,B.useLayoutEffect)(()=>{l(new DocumentFragment)},[]),a.open)?(0,t.jsx)(eh,{...e,ref:r}):i?y.createPortal((0,t.jsx)(eu,{scope:e.__scopeSelect,children:(0,t.jsx)(q.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});ec.displayName=ed;var[eu,ep]=Y(ed),em=(0,F.createSlot)("SelectContent.RemoveScroll"),eh=n.forwardRef((e,r)=>{let{__scopeSelect:a,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,...w}=e,b=J(ed,a),[y,S]=n.useState(null),[C,I]=n.useState(null),M=(0,k.useComposedRefs)(r,e=>S(e)),[E,T]=n.useState(null),[A,D]=n.useState(null),F=G(a),[H,L]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,V.hideOthers)(y)},[y]),(0,P.useFocusGuards)();let z=n.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[r]=n.slice(-1),a=document.activeElement;for(let n of e)if(n===a||(n?.scrollIntoView({block:"nearest"}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==a))return},[F,C]),_=n.useCallback(()=>z([E,y]),[z,E,y]);n.useEffect(()=>{H&&_()},[H,_]);let{onOpenChange:O,triggerPointerDownPosRef:U}=b;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)||O(!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,O,U]),n.useEffect(()=>{let e=()=>O(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[O]);let[K,q]=eK(e=>{let t=F().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=eq(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),$=n.useCallback((e,t,n)=>{let r=!B.current&&!n;(void 0!==b.value&&b.value===t||r)&&(T(e),r&&(B.current=!0))},[b.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let r=!B.current&&!n;(void 0!==b.value&&b.value===t||r)&&D(e)},[b.value]),X="popper"===i?eg:ef,Q=X===eg?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(eu,{scope:a,content:y,viewport:C,onViewportChange:I,itemRefCallback:$,selectedItem:E,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:A,position:i,isPositioned:H,searchRef:K,children:(0,t.jsx)(W.RemoveScroll,{as:em,allowPinchZoom:!0,children:(0,t.jsx)(R.FocusScope,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,j.composeEventHandlers)(l,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(N.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,t.jsx)(X,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...w,...Q,onPlaced:()=>L(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:(0,j.composeEventHandlers)(w.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,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});eh.displayName="SelectContentImpl";var ef=n.forwardRef((e,r)=>{let{__scopeSelect:a,onPlaced:i,...l}=e,o=J(ed,a),s=ep(ed,a),[d,c]=n.useState(null),[u,p]=n.useState(null),m=(0,k.useComposedRefs)(r,e=>p(e)),h=G(a),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=s,y=n.useCallback(()=>{if(o.trigger&&o.valueNode&&d&&u&&x&&v&&w){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),r=w.getBoundingClientRect();if("rtl"!==o.dir){let a=r.left-t.left,i=n.left-a,l=e.left-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,S.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.left=u+"px"}else{let a=t.right-r.right,i=window.innerWidth-n.right-a,l=window.innerWidth-e.right-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,S.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.right=u+"px"}let a=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),b=p+m+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,b),j=window.getComputedStyle(x),C=parseInt(j.paddingTop,10),k=parseInt(j.paddingBottom,10),I=e.top+e.height/2-10,M=v.offsetHeight/2,N=p+m+(v.offsetTop+M);if(N<=I){let e=a.length>0&&v===a[a.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=a.length>0&&v===a[0].ref.current;d.style.top="0px";let t=Math.max(I,p+x.offsetTop+(e?C:0)+M);d.style.height=t+(b-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,w,o.dir,i]);(0,B.useLayoutEffect)(()=>y(),[y]);let[j,C]=n.useState();(0,B.useLayoutEffect)(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let I=n.useCallback(e=>{e&&!0===g.current&&(y(),b?.(),g.current=!1)},[y,b]);return(0,t.jsx)(ex,{scope:a,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:I,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,t.jsx)(D.Primitive.div,{...l,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});ef.displayName="SelectItemAlignedPosition";var eg=n.forwardRef((e,n)=>{let{__scopeSelect:r,align:a="start",collisionPadding:i=10,...l}=e,o=X(r);return(0,t.jsx)(T.Content,{...o,...l,ref:n,align:a,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)"}})});eg.displayName="SelectPopperPosition";var[ex,ev]=Y(ed,{}),ew="SelectViewport",eb=n.forwardRef((e,r)=>{let{__scopeSelect:a,nonce:i,...l}=e,o=ep(ew,a),s=ev(ew,a),d=(0,k.useComposedRefs)(r,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)(q.Slot,{scope:a,children:(0,t.jsx)(D.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:(0,j.composeEventHandlers)(l.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,a=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(a<r){let i=a+e,l=Math.min(r,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})})})]})});eb.displayName=ew;var ey="SelectGroup",[eS,ej]=Y(ey),eC=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=(0,E.useId)();return(0,t.jsx)(eS,{scope:r,id:i,children:(0,t.jsx)(D.Primitive.div,{role:"group","aria-labelledby":i,...a,ref:n})})});eC.displayName=ey;var ek="SelectLabel",eI=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=ej(ek,r);return(0,t.jsx)(D.Primitive.div,{id:i.id,...a,ref:n})});eI.displayName=ek;var eM="SelectItem",[eN,eP]=Y(eM),eR=n.forwardRef((e,r)=>{let{__scopeSelect:a,value:i,disabled:l=!1,textValue:o,...s}=e,d=J(eM,a),c=ep(eM,a),u=d.value===i,[p,m]=n.useState(o??""),[h,f]=n.useState(!1),g=(0,k.useComposedRefs)(r,e=>c.itemRefCallback?.(e,i,l)),x=(0,E.useId)(),v=n.useRef("touch"),w=()=>{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)(eN,{scope:a,value:i,disabled:l,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(q.ItemSlot,{scope:a,value:i,disabled:l,textValue:p,children:(0,t.jsx)(D.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,j.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,j.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,j.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:(0,j.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:(0,j.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,j.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,l?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,j.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,j.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(U.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});eR.displayName=eM;var eE="SelectItemText",eT=n.forwardRef((e,r)=>{let{__scopeSelect:a,className:i,style:l,...o}=e,s=J(eE,a),d=ep(eE,a),c=eP(eE,a),u=et(eE,a),[p,m]=n.useState(null),h=(0,k.useComposedRefs)(r,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,B.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Primitive.span,{id:c.textId,...o,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?y.createPortal(o.children,s.valueNode):null]})});eT.displayName=eE;var eA="SelectItemIndicator",eD=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return eP(eA,r).isSelected?(0,t.jsx)(D.Primitive.span,{"aria-hidden":!0,...a,ref:n}):null});eD.displayName=eA;var eF="SelectScrollUpButton",eH=n.forwardRef((e,r)=>{let a=ep(eF,e.__scopeSelect),i=ev(eF,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,k.useComposedRefs)(r,i.onScrollButtonChange);return(0,B.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){o(t.scrollTop>0)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),l?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eH.displayName=eF;var eL="SelectScrollDownButton",eB=n.forwardRef((e,r)=>{let a=ep(eL,e.__scopeSelect),i=ev(eL,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,k.useComposedRefs)(r,i.onScrollButtonChange);return(0,B.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),l?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eB.displayName=eL;var ez=n.forwardRef((e,r)=>{let{__scopeSelect:a,onAutoScroll:i,...l}=e,o=ep("SelectScrollButton",a),s=n.useRef(null),d=G(a),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,B.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(D.Primitive.div,{"aria-hidden":!0,...l,ref:r,style:{flexShrink:0,...l.style},onPointerDown:(0,j.composeEventHandlers)(l.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(i,50))}),onPointerMove:(0,j.composeEventHandlers)(l.onPointerMove,()=>{o.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(i,50))}),onPointerLeave:(0,j.composeEventHandlers)(l.onPointerLeave,()=>{c()})})}),e_=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return(0,t.jsx)(D.Primitive.div,{"aria-hidden":!0,...a,ref:n})});e_.displayName="SelectSeparator";var eV="SelectArrow",eW=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=X(r),l=J(eV,r),o=ep(eV,r);return l.open&&"popper"===o.position?(0,t.jsx)(T.Arrow,{...i,...a,ref:n}):null});eW.displayName=eV;var eO=n.forwardRef(({__scopeSelect:e,value:r,...a},i)=>{let l=n.useRef(null),o=(0,k.useComposedRefs)(i,l),s=(0,z.usePrevious)(r);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(D.Primitive.select,{...a,style:{..._.VISUALLY_HIDDEN_STYLES,...a.style},ref:o,defaultValue:r})});function eU(e){return""===e||void 0===e}function eK(e){let t=(0,H.useCallbackRef)(e),r=n.useRef(""),a=n.useRef(0),i=n.useCallback(e=>{let n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(a.current),""!==t&&(a.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),l=n.useCallback(()=>{r.current="",window.clearTimeout(a.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(a.current),[]),[r,i,l]}function eq(e,t,n){var r,a;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1,o=(r=e,a=Math.max(l,0),r.map((e,t)=>r[(a+t)%r.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}eO.displayName="SelectBubbleInput",e.s(["Arrow",()=>eW,"Content",()=>ec,"Group",()=>eC,"Icon",()=>eo,"Item",()=>eR,"ItemIndicator",()=>eD,"ItemText",()=>eT,"Label",()=>eI,"Portal",()=>es,"Root",()=>en,"ScrollDownButton",()=>eB,"ScrollUpButton",()=>eH,"Select",()=>en,"SelectArrow",()=>eW,"SelectContent",()=>ec,"SelectGroup",()=>eC,"SelectIcon",()=>eo,"SelectItem",()=>eR,"SelectItemIndicator",()=>eD,"SelectItemText",()=>eT,"SelectLabel",()=>eI,"SelectPortal",()=>es,"SelectScrollDownButton",()=>eB,"SelectScrollUpButton",()=>eH,"SelectSeparator",()=>e_,"SelectTrigger",()=>ea,"SelectValue",()=>el,"SelectViewport",()=>eb,"Separator",()=>e_,"Trigger",()=>ea,"Value",()=>el,"Viewport",()=>eb,"createSelectScope",()=>Z],83830);var eG=e.i(83830),eG=eG,e$=e.i(99105);let eY=(0,a.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),eZ=eG.Root;eG.Group;let eX=eG.Value,eQ=n.forwardRef(({className:e,children:n,...r},a)=>(0,t.jsxs)(eG.Trigger,{ref:a,className:(0,v.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),...r,children:[n,(0,t.jsx)(eG.Icon,{asChild:!0,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));eQ.displayName=eG.Trigger.displayName;let eJ=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.ScrollUpButton,{ref:r,className:(0,v.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eY,{className:"h-4 w-4"})}));eJ.displayName=eG.ScrollUpButton.displayName;let e0=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.ScrollDownButton,{ref:r,className:(0,v.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4"})}));e0.displayName=eG.ScrollDownButton.displayName;let e1=n.forwardRef(({className:e,children:n,position:r="popper",...a},i)=>(0,t.jsx)(eG.Portal,{children:(0,t.jsxs)(eG.Content,{ref:i,className:(0,v.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"===r&&"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:r,...a,children:[(0,t.jsx)(eJ,{}),(0,t.jsx)(eG.Viewport,{className:(0,v.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e0,{})]})}));e1.displayName=eG.Content.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.Label,{ref:r,className:(0,v.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=eG.Label.displayName;let e2=n.forwardRef(({className:e,children:n,...a},i)=>(0,t.jsxs)(eG.Item,{ref:i,className:(0,v.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),...a,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(eG.ItemIndicator,{children:(0,t.jsx)(r.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eG.ItemText,{children:n})]}));e2.displayName=eG.Item.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.Separator,{ref:r,className:(0,v.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=eG.Separator.displayName;var e3=e.i(21023);let e5=(0,e3.createServerReference)("40a42248485dc9a49daf53ab9f5f907f7203ed0f81",e3.callServer,void 0,e3.findSourceMapURL,"updateSettingsAction");var e4=e.i(17406),e8=e.i(98804),e6=e.i(44229),e9=e.i(83902);function e7(e){return(0,t.jsx)(e6.Code,{className:(0,v.cn)("h-4 w-4",e.className),...e})}function te({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tt({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tn({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function ta({className:e,...n}){return(0,t.jsx)(e9.Rocket,{className:(0,v.cn)("h-4 w-4",e),...n})}te.displayName="VsCodeIcon",tt.displayName="CursorEditorIcon",tn.displayName="WindsurfIcon",tr.displayName="ZedIcon",ta.displayName="AntigravityIcon";let ti={vscode:te,cursor:tt,windsurf:tn,zed:tr,antigravity:ta};var tl=e.i(41413),to=e.i(77624),ts=["PageUp","PageDown"],td=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tc={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tu="Slider",[tp,tm,th]=(0,C.createCollection)(tu),[tf,tg]=(0,I.createContextScope)(tu,[th]),[tx,tv]=tf(tu),tw=n.forwardRef((e,r)=>{let{name:a,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),w=n.useRef(0),b="horizontal"===s,[y=[],C]=(0,L.useControllableState)({prop:p,defaultProp:u,onChange:e=>{let t=[...v.current];t[w.current]?.focus(),m(e)}}),k=n.useRef(y);function I(e,t,{commit:n}={commit:!1}){let r,a=(String(o).split(".")[1]||"").length,s=Math.round((Math.round((e-i)/o)*o+i)*(r=Math.pow(10,a)))/r,d=(0,S.clamp)(s,[i,l]);C((e=[])=>{let r=function(e=[],t,n){let r=[...e];return r[n]=t,r.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}(r,c*o))return e;{w.current=r.indexOf(d);let t=String(r)!==String(e);return t&&n&&h(r),t?r:e}})}return(0,t.jsx)(tx,{scope:e.__scopeSlider,name:a,disabled:d,min:i,max:l,valueIndexToChangeRef:w,thumbs:v.current,values:y,orientation:s,form:g,children:(0,t.jsx)(tp.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(tp.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(b?tS:tj,{"aria-disabled":d,"data-disabled":d?"":void 0,...x,ref:r,onPointerDown:(0,j.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)),r=Math.min(...n);return n.indexOf(r)}(y,e);I(e,t)},onSlideMove:d?void 0:function(e){I(e,w.current)},onSlideEnd:d?void 0:function(){let e=k.current[w.current];y[w.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=ts.includes(e.key)||e.shiftKey&&td.includes(e.key),r=w.current;I(y[r]+o*(n?10:1)*t,r,{commit:!0})}}})})})})});tw.displayName=tu;var[tb,ty]=tf(tu,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tS=n.forwardRef((e,r)=>{let{min:a,max:i,dir:l,inverted:o,onSlideStart:s,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...p}=e,[m,h]=n.useState(null),f=(0,k.useComposedRefs)(r,e=>h(e)),g=n.useRef(void 0),x=(0,M.useDirection)(l),v="ltr"===x,w=v&&!o||!v&&o;function b(e){let t=g.current||m.getBoundingClientRect(),n=tD([0,t.width],w?[a,i]:[i,a]);return g.current=t,n(e-t.left)}return(0,t.jsx)(tb,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:(0,t.jsx)(tC,{dir:x,"data-orientation":"horizontal",...p,ref:f,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=b(e.clientX);s?.(t)},onSlideMove:e=>{let t=b(e.clientX);d?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=tc[w?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),tj=n.forwardRef((e,r)=>{let{min:a,max:i,inverted:l,onSlideStart:o,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=e,p=n.useRef(null),m=(0,k.useComposedRefs)(r,p),h=n.useRef(void 0),f=!l;function g(e){let t=h.current||p.current.getBoundingClientRect(),n=tD([0,t.height],f?[i,a]:[a,i]);return h.current=t,n(e-t.top)}return(0,t.jsx)(tb,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,t.jsx)(tC,{"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=tc[f?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),tC=n.forwardRef((e,n)=>{let{__scopeSlider:r,onSlideStart:a,onSlideMove:i,onSlideEnd:l,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:d,...c}=e,u=tv(tu,r);return(0,t.jsx)(D.Primitive.span,{...c,ref:n,onKeyDown:(0,j.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(o(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):ts.concat(td).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:(0,j.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():a(e)}),onPointerMove:(0,j.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:(0,j.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),l(e))})})}),tk="SliderTrack",tI=n.forwardRef((e,n)=>{let{__scopeSlider:r,...a}=e,i=tv(tk,r);return(0,t.jsx)(D.Primitive.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...a,ref:n})});tI.displayName=tk;var tM="SliderRange",tN=n.forwardRef((e,r)=>{let{__scopeSlider:a,...i}=e,l=tv(tM,a),o=ty(tM,a),s=n.useRef(null),d=(0,k.useComposedRefs)(r,s),c=l.values.length,u=l.values.map(e=>tA(e,l.min,l.max)),p=c>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(D.Primitive.span,{"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,...i,ref:d,style:{...e.style,[o.startEdge]:p+"%",[o.endEdge]:m+"%"}})});tN.displayName=tM;var tP="SliderThumb",tR=n.forwardRef((e,r)=>{let a=tm(e.__scopeSlider),[i,l]=n.useState(null),o=(0,k.useComposedRefs)(r,e=>l(e)),s=n.useMemo(()=>i?a().findIndex(e=>e.ref.current===i):-1,[a,i]);return(0,t.jsx)(tE,{...e,ref:o,index:s})}),tE=n.forwardRef((e,r)=>{var a,i,l,o,s;let d,c,{__scopeSlider:u,index:p,name:m,...h}=e,f=tv(tP,u),g=ty(tP,u),[x,v]=n.useState(null),w=(0,k.useComposedRefs)(r,e=>v(e)),b=!x||f.form||!!x.closest("form"),y=(0,to.useSize)(x),S=f.values[p],C=void 0===S?0:tA(S,f.min,f.max),I=(a=p,(i=f.values.length)>2?`Value ${a+1} of ${i}`:2===i?["Minimum","Maximum"][a]:void 0),M=y?.[g.size],N=M?(l=M,o=C,s=g.direction,c=tD([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(${C}% + ${N}px)`},children:[(0,t.jsx)(tp.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(D.Primitive.span,{role:"slider","aria-label":e["aria-label"]||I,"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:w,style:void 0===S?{display:"none"}:e.style,onFocus:(0,j.composeEventHandlers)(e.onFocus,()=>{f.valueIndexToChangeRef.current=p})})}),b&&(0,t.jsx)(tT,{name:m??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:S},p)]})});tR.displayName=tP;var tT=n.forwardRef(({__scopeSlider:e,value:r,...a},i)=>{let l=n.useRef(null),o=(0,k.useComposedRefs)(l,i),s=(0,z.usePrevious)(r);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==r&&t){let n=new Event("input",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(D.Primitive.input,{style:{display:"none"},...a,ref:o,defaultValue:r})});function tA(e,t,n){return(0,S.clamp)(100/(n-t)*(e-t),[0,100])}function tD(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}tT.displayName="RadioBubbleInput",e.s(["Range",()=>tN,"Root",()=>tw,"Slider",()=>tw,"SliderRange",()=>tN,"SliderThumb",()=>tR,"SliderTrack",()=>tI,"Thumb",()=>tR,"Track",()=>tI,"createSliderScope",()=>tg],29991);var tF=e.i(29991),tF=tF;function tH({className:e,defaultValue:r,value:a,min:i=0,max:l=100,...o}){let s=n.useMemo(()=>Array.isArray(a)?a:Array.isArray(r)?r:[i,l],[a,r,i,l]);return(0,t.jsxs)(tF.Root,{"data-slot":"slider",defaultValue:r,value:a,min:i,max:l,className:(0,v.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)(tF.Track,{"data-slot":"slider-track",className:(0,v.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)(tF.Range,{"data-slot":"slider-range",className:(0,v.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,n)=>(0,t.jsx)(tF.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 tL=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],tB=tL.length-1;function tz(e){let t=0,n=Math.abs(e-tL[0]);for(let r=1;r<tL.length;r++){let a=Math.abs(e-tL[r]);a<n&&(n=a,t=r)}return t}function t_({id:e,testId:r,value:a,onChange:i,onBlur:l,defaultSeconds:o=1800}){var s;let d,c,u=(""===a?o:parseInt(a,10))||o,[p,m]=(0,n.useState)(()=>tz(u)),h=tz(u);h!==p&&tL[p]!==u&&m(h);let f=(0,n.useCallback)(([e])=>{m(e),i(String(tL[e]))},[i]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(tH,{id:e,"data-testid":r,min:0,max:tB,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=tL[p])/3600),c=Math.round(s%3600/60),0===d?`${c}m`:0===c?`${d}h`:`${d}h ${c}m`)})]})}let tV=[{value:e4.EditorType.VsCode,label:"VS Code"},{value:e4.EditorType.Cursor,label:"Cursor"},{value:e4.EditorType.Windsurf,label:"Windsurf"},{value:e4.EditorType.Zed,label:"Zed"},{value:e4.EditorType.Antigravity,label:"Antigravity"}],tW=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],tO=[{id:"agent",label:"Agent",icon:i},{id:"environment",label:"Environment",icon:l.Terminal},{id:"workflow",label:"Workflow",icon:o.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:"database",label:"Database",icon:u}];function tU({label:e,description:n,htmlFor:r,children:a}){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:r,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:a})]})}function tK({label:e,description:n,id:r,testId:a,checked:i,onChange:l,disabled:o}){return(0,t.jsx)(tU,{label:e,description:n,htmlFor:r,children:(0,t.jsx)(b.Switch,{id:r,"data-testid":a,checked:i,onCheckedChange:l,disabled:o,className:(0,v.cn)("cursor-pointer",o&&"cursor-not-allowed opacity-50")})})}function tq({icon:e,title:n,description:r,badge:a,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}),a?(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:a}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:r})]}),(0,t.jsx)("div",{className:"px-4",children:l})]})}function tG({id:e,testId:n,value:r,onChange:a,onBlur:i,placeholder:l,min:o=1,max:s,step:d=1,suffix:c}){let u=""===r?void 0:parseInt(r,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:()=>{a(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:r,placeholder:l,onChange:e=>{a(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),a(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 t$({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 tY({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 tZ({settings:e,shepHome:a,dbFileSize:p,availableTerminals:m}){let{showSaving:h,showSaved:w,save:b}=function(){let[e,t]=(0,n.useTransition)(),[r,a]=(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&&!r&&(a(!0),s.current=!1,o.current=setTimeout(()=>{o.current=null,s.current&&(a(!1),l(!0),setTimeout(()=>l(!1),2e3))},350)),!e&&r&&(s.current=!0,o.current||(a(!1),l(!0),setTimeout(()=>l(!1),2e3)))},[e,r]),{showSaving:r,showSaved:i,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e5(e);t.success||x.toast.error(t.error??"Failed to save settings")})},[t])}}(),y=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1},[S,j]=(0,n.useState)(e.agent.type),[C,k]=(0,n.useState)(e.environment.defaultEditor),[I,M]=(0,n.useState)(e.environment.shellPreference),[N,P]=(0,n.useState)(e.environment.terminalPreference??e4.TerminalType.System),R=m?m.filter(e=>e.available):[{id:e4.TerminalType.System,name:"System Terminal",available:!0}],[E,T]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[A,D]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[F,H]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[L,B]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[z,_]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[V,W]=(0,n.useState)(e.workflow.enableEvidence),[O,U]=(0,n.useState)(e.workflow.commitEvidence),[K,q]=(0,n.useState)(!1!==e.workflow.ciWatchEnabled),[G,$]=(0,n.useState)(!1!==e.workflow.hideCiStatus),[Y,Z]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[X,Q]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[J,ee]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[et,en]=(0,n.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),er=e.workflow.stageTimeouts,[ea,ei]=(0,n.useState)(String(Math.round((er?.analyzeMs??18e5)/1e3))),[el,eo]=(0,n.useState)(String(Math.round((er?.requirementsMs??18e5)/1e3))),[es,ed]=(0,n.useState)(String(Math.round((er?.researchMs??18e5)/1e3))),[ec,eu]=(0,n.useState)(String(Math.round((er?.planMs??18e5)/1e3))),[ep,em]=(0,n.useState)(String(Math.round((er?.implementMs??18e5)/1e3))),[eh,ef]=(0,n.useState)(String(Math.round((er?.mergeMs??18e5)/1e3))),eg=e.workflow.analyzeRepoTimeouts,[ex,ev]=(0,n.useState)(String(Math.round((eg?.analyzeMs??6e5)/1e3))),[ew,eb]=(0,n.useState)(e.notifications.inApp.enabled),[ey,eS]=(0,n.useState)({...e.notifications.events}),[ej,eC]=(0,n.useState)({...y}),ek=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",eI=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",eM=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",eN=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"",eP=er?.analyzeMs!=null?String(Math.round(er.analyzeMs/1e3)):"",eR=er?.requirementsMs!=null?String(Math.round(er.requirementsMs/1e3)):"",eE=er?.researchMs!=null?String(Math.round(er.researchMs/1e3)):"",eT=er?.planMs!=null?String(Math.round(er.planMs/1e3)):"",eA=er?.implementMs!=null?String(Math.round(er.implementMs/1e3)):"",eD=er?.mergeMs!=null?String(Math.round(er.mergeMs/1e3)):"",eF=eg?.analyzeMs!=null?String(Math.round(eg.analyzeMs/1e3)):"";function eH(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eL(e){if(void 0===e)return;let t=eH(e);return null!=t?1e3*t:void 0}function eB(e={}){let t=eH(e.ciTimeout??X);return{workflow:{openPrOnImplementationComplete:e.openPr??E,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??A,allowPrd:e.allowPrd??F,allowPlan:e.allowPlan??L,allowMerge:e.allowMerge??z},enableEvidence:e.enableEvidence??V,commitEvidence:e.commitEvidence??O,ciWatchEnabled:e.ciWatchEnabled??K,hideCiStatus:e.hideCiStatus??G,ciMaxFixAttempts:eH(e.ciMaxFix??Y),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:eH(e.ciLogMax??J),ciWatchPollIntervalSeconds:eH(e.ciPollInterval??et),stageTimeouts:{analyzeMs:eL(e.analyzeTimeout??ea),requirementsMs:eL(e.requirementsTimeout??el),researchMs:eL(e.researchTimeout??es),planMs:eL(e.planTimeout??ec),implementMs:eL(e.implementTimeout??ep),mergeMs:eL(e.mergeTimeout??eh)},analyzeRepoTimeouts:{analyzeMs:eL(e.analyzeRepoTimeout??ex)}}}}function ez(e={}){return{notifications:{inApp:{enabled:e.inApp??ew},events:e.events??ey}}}let[e_,eV]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=tO.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&&eV(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let eW=(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,v.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,v.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)(r.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:tO.map(e=>{let n=e.icon,r=e_===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>eW(e.id),className:(0,v.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",r?"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)(tq,{icon:i,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:(0,t.jsx)(tU,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(tl.AgentModelPicker,{initialAgentType:S,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>j(e),className:"w-55"})})}),(0,t.jsx)(tY,{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)(tq,{icon:l.Terminal,title:"Environment",description:"Editor, shell, and terminal preferences",testId:"environment-settings-section",children:[(0,t.jsx)(tU,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(eZ,{value:C,onValueChange:e=>{k(e),b({environment:{defaultEditor:e,shellPreference:I,terminalPreference:N}})},children:[(0,t.jsx)(eQ,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:tV.map(e=>{var n;let r=(n=e.value)&&n in ti?ti[n]:e7;return(0,t.jsx)(e2,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(tU,{label:"Shell",description:"Default shell for generated scripts",htmlFor:"shell-preference",children:(0,t.jsxs)(eZ,{value:I,onValueChange:e=>{M(e),b({environment:{defaultEditor:C,shellPreference:e,terminalPreference:N}})},children:[(0,t.jsx)(eQ,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:tW.map(e=>(0,t.jsx)(e2,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(tU,{label:"Terminal",description:"Terminal emulator for shell sessions",htmlFor:"terminal-preference",children:(0,t.jsxs)(eZ,{value:N,onValueChange:e=>{P(e),b({environment:{defaultEditor:C,shellPreference:I,terminalPreference:e}})},children:[(0,t.jsx)(eQ,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:R.map(e=>(0,t.jsx)(e2,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)(tY,{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)(tq,{icon:o.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(t$,{children:"Approve"}),(0,t.jsx)(tK,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:F,onChange:e=>{H(e),b(eB({allowPrd:e}))}}),(0,t.jsx)(tK,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:L,onChange:e=>{B(e),b(eB({allowPlan:e}))}}),(0,t.jsx)(tK,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:z,onChange:e=>{_(e),b(eB({allowMerge:e}))}}),(0,t.jsx)(t$,{children:"Evidence"}),(0,t.jsx)(tK,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:V,onChange:e=>{W(e),e?b(eB({enableEvidence:e})):(U(!1),b(eB({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tK,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:O,disabled:!V||!E,onChange:e=>{U(e),b(eB({commitEvidence:e}))}}),(0,t.jsx)(t$,{children:"Git"}),(0,t.jsx)(tK,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:A,onChange:e=>{D(e),b(eB({pushOnComplete:e}))}}),(0,t.jsx)(tK,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:E,onChange:e=>{T(e),e?b(eB({openPr:e})):(U(!1),b(eB({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(tK,{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:K,onChange:e=>{q(e),b(eB({ciWatchEnabled:e}))}})]}),(0,t.jsx)(tY,{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)(tq,{icon:s,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tU,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(tG,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:Y,onChange:Z,onBlur:()=>{Y!==ek&&b(eB({ciMaxFix:Y}))},min:1,max:10})}),(0,t.jsx)(tU,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(tG,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:X,onChange:Q,onBlur:()=>{X!==eI&&b(eB({ciTimeout:X}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tU,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(tG,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:J,onChange:ee,onBlur:()=>{J!==eM&&b(eB({ciLogMax:J}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(tU,{label:"Poll interval",description:"How often to check GitHub for CI status updates",htmlFor:"ci-poll-interval",children:(0,t.jsx)(tG,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:et,onChange:en,onBlur:()=>{et!==eN&&b(eB({ciPollInterval:et}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(tK,{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:G,onChange:e=>{$(e),b(eB({hideCiStatus:e}))}})]}),(0,t.jsx)(tY,{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)(tq,{icon:g.Timer,title:"Stage Timeouts",description:"Maximum execution time per agent stage",testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(t$,{children:"Feature Agent"}),(0,t.jsx)(tU,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze",children:(0,t.jsx)(t_,{id:"timeout-analyze",testId:"timeout-analyze-input",value:ea,onChange:ei,onBlur:()=>{ea!==eP&&b(eB({analyzeTimeout:ea}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Requirements",description:"Requirements gathering timeout",htmlFor:"timeout-requirements",children:(0,t.jsx)(t_,{id:"timeout-requirements",testId:"timeout-requirements-input",value:el,onChange:eo,onBlur:()=>{el!==eR&&b(eB({requirementsTimeout:el}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Research",description:"Technical research timeout",htmlFor:"timeout-research",children:(0,t.jsx)(t_,{id:"timeout-research",testId:"timeout-research-input",value:es,onChange:ed,onBlur:()=>{es!==eE&&b(eB({researchTimeout:es}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Plan",description:"Implementation planning timeout",htmlFor:"timeout-plan",children:(0,t.jsx)(t_,{id:"timeout-plan",testId:"timeout-plan-input",value:ec,onChange:eu,onBlur:()=>{ec!==eT&&b(eB({planTimeout:ec}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Implement",description:"Code implementation timeout",htmlFor:"timeout-implement",children:(0,t.jsx)(t_,{id:"timeout-implement",testId:"timeout-implement-input",value:ep,onChange:em,onBlur:()=>{ep!==eA&&b(eB({implementTimeout:ep}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Merge",description:"PR creation and merge timeout",htmlFor:"timeout-merge",children:(0,t.jsx)(t_,{id:"timeout-merge",testId:"timeout-merge-input",value:eh,onChange:ef,onBlur:()=>{eh!==eD&&b(eB({mergeTimeout:eh}))},defaultSeconds:1800})}),(0,t.jsx)(t$,{children:"Analyze Repository Agent"}),(0,t.jsx)(tU,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(t_,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:ex,onChange:ev,onBlur:()=>{ex!==eF&&b(eB({analyzeRepoTimeout:ex}))},defaultSeconds:600})})]}),(0,t.jsx)(tY,{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)(tq,{icon:d,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(t$,{children:"Channels"}),(0,t.jsx)(tK,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:ew,onChange:e=>{eb(e),b(ez({inApp:e}))}}),(0,t.jsx)(t$,{children:"Agent Events"}),(0,t.jsx)(tK,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:ey.agentStarted,onChange:e=>{let t={...ey,agentStarted:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:ey.phaseCompleted,onChange:e=>{let t={...ey,phaseCompleted:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:ey.waitingApproval,onChange:e=>{let t={...ey,waitingApproval:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:ey.agentCompleted,onChange:e=>{let t={...ey,agentCompleted:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:ey.agentFailed,onChange:e=>{let t={...ey,agentFailed:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(t$,{children:"Pull Request Events"}),(0,t.jsx)(tK,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:ey.prMerged,onChange:e=>{let t={...ey,prMerged:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:ey.prClosed,onChange:e=>{let t={...ey,prClosed:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:ey.prChecksPassed,onChange:e=>{let t={...ey,prChecksPassed:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:ey.prChecksFailed,onChange:e=>{let t={...ey,prChecksFailed:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"PR blocked",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:ey.prBlocked,onChange:e=>{let t={...ey,prBlocked:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"Merge review ready",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:ey.mergeReviewReady,onChange:e=>{let t={...ey,mergeReviewReady:e};eS(t),b(ez({events:t}))}})]}),(0,t.jsx)(tY,{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)(tq,{icon:c,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tK,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:ej.skills,onChange:e=>{let t={...ej,skills:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:ej.envDeploy,onChange:e=>{let t={...ej,envDeploy:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:ej.debug,onChange:e=>{let t={...ej,debug:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"GitHub Import",description:"Enable GitHub repository import in the web UI",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:ej.githubImport,onChange:e=>{let t={...ej,githubImport:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Adopt Branch",description:"Import existing branches as tracked features",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:ej.adoptBranch,onChange:e=>{let t={...ej,adoptBranch:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Git Rebase & Sync",description:"Enable git rebase-on-main and sync-main operations",id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:ej.gitRebaseSync,onChange:e=>{let t={...ej,gitRebaseSync:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{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:ej.reactFileManager,onChange:e=>{let t={...ej,reactFileManager:e};eC(t),b({featureFlags:t})}})]}),(0,t.jsx)(tY,{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-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:u,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tU,{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:a})}),(0,t.jsx)(tU,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:p})})]}),(0,t.jsx)(tY,{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",()=>tZ],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),r=e.i(23925),a=e.i(3645);let i=(0,a.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var l=e.i(38573),o=e.i(49228);let s=(0,a.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,a.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,a.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,a.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,a.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(60112),v=e.i(31777),w=e.i(41957),b=e.i(51911),y=e.i(26036),S=e.i(27069),j=e.i(91967),C=e.i(87342),k=e.i(5978),I=e.i(22528),M=e.i(66033),N=e.i(53532),P=e.i(41687),R=e.i(56720),E=e.i(13123),T=e.i(52740),A=e.i(39979),D=e.i(87620),F=e.i(86874),H=e.i(29297),L=e.i(36589),B=e.i(5192),z=e.i(23405),_=e.i(1693),V=e.i(73772),W=e.i(13044),O=[" ","Enter","ArrowUp","ArrowDown"],U=[" ","Enter"],K="Select",[q,G,$]=(0,C.createCollection)(K),[Y,Z]=(0,I.createContextScope)(K,[$,T.createPopperScope]),X=(0,T.createPopperScope)(),[Q,J]=Y(K),[ee,et]=Y(K),en=e=>{let{__scopeSelect:r,children:a,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=X(r),[v,w]=n.useState(null),[b,y]=n.useState(null),[S,j]=n.useState(!1),C=(0,M.useDirection)(u),[k,I]=(0,L.useControllableState)({prop:i,defaultProp:l??!1,onChange:o,caller:K}),[N,P]=(0,L.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:K}),R=n.useRef(null),A=!v||g||!!v.closest("form"),[D,F]=n.useState(new Set),H=Array.from(D).map(e=>e.props.value).join(";");return(0,t.jsx)(T.Root,{...x,children:(0,t.jsxs)(Q,{required:f,scope:r,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:(0,E.useId)(),value:N,onValueChange:P,open:k,onOpenChange:I,dir:C,triggerPointerDownPosRef:R,disabled:h,children:[(0,t.jsx)(q.Provider,{scope:r,children:(0,t.jsx)(ee,{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:a})}),A?(0,t.jsxs)(eO,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:m,value:N,onChange:e=>P(e.target.value),disabled:h,form:g,children:[void 0===N?(0,t.jsx)("option",{value:""}):null,Array.from(D)]},H):null]})})};en.displayName=K;var er="SelectTrigger",ea=n.forwardRef((e,r)=>{let{__scopeSelect:a,disabled:i=!1,...l}=e,o=X(a),s=J(er,a),d=s.disabled||i,c=(0,k.useComposedRefs)(r,s.onTriggerChange),u=G(a),p=n.useRef("touch"),[m,h,f]=eK(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=eq(t,e,n);void 0!==r&&s.onValueChange(r.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)(T.Anchor,{asChild:!0,...o,children:(0,t.jsx)(D.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":eU(s.value)?"":void 0,...l,ref:c,onClick:(0,j.composeEventHandlers)(l.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,j.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,j.composeEventHandlers)(l.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&O.includes(e.key)&&(g(),e.preventDefault())})})})});ea.displayName=er;var ei="SelectValue",el=n.forwardRef((e,n)=>{let{__scopeSelect:r,className:a,style:i,children:l,placeholder:o="",...s}=e,d=J(ei,r),{onValueNodeHasChildrenChange:c}=d,u=void 0!==l,p=(0,k.useComposedRefs)(n,d.onValueNodeChange);return(0,B.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(D.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eU(d.value)?(0,t.jsx)(t.Fragment,{children:o}):l})});el.displayName=ei;var eo=n.forwardRef((e,n)=>{let{__scopeSelect:r,children:a,...i}=e;return(0,t.jsx)(D.Primitive.span,{"aria-hidden":!0,...i,ref:n,children:a||"▼"})});eo.displayName="SelectIcon";var es=e=>(0,t.jsx)(A.Portal,{asChild:!0,...e});es.displayName="SelectPortal";var ed="SelectContent",ec=n.forwardRef((e,r)=>{let a=J(ed,e.__scopeSelect),[i,l]=n.useState();return((0,B.useLayoutEffect)(()=>{l(new DocumentFragment)},[]),a.open)?(0,t.jsx)(eh,{...e,ref:r}):i?y.createPortal((0,t.jsx)(eu,{scope:e.__scopeSelect,children:(0,t.jsx)(q.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});ec.displayName=ed;var[eu,ep]=Y(ed),em=(0,F.createSlot)("SelectContent.RemoveScroll"),eh=n.forwardRef((e,r)=>{let{__scopeSelect:a,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,...w}=e,b=J(ed,a),[y,S]=n.useState(null),[C,I]=n.useState(null),M=(0,k.useComposedRefs)(r,e=>S(e)),[E,T]=n.useState(null),[A,D]=n.useState(null),F=G(a),[H,L]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,V.hideOthers)(y)},[y]),(0,P.useFocusGuards)();let z=n.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[r]=n.slice(-1),a=document.activeElement;for(let n of e)if(n===a||(n?.scrollIntoView({block:"nearest"}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==a))return},[F,C]),_=n.useCallback(()=>z([E,y]),[z,E,y]);n.useEffect(()=>{H&&_()},[H,_]);let{onOpenChange:O,triggerPointerDownPosRef:U}=b;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)||O(!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,O,U]),n.useEffect(()=>{let e=()=>O(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[O]);let[K,q]=eK(e=>{let t=F().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=eq(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),$=n.useCallback((e,t,n)=>{let r=!B.current&&!n;(void 0!==b.value&&b.value===t||r)&&(T(e),r&&(B.current=!0))},[b.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let r=!B.current&&!n;(void 0!==b.value&&b.value===t||r)&&D(e)},[b.value]),X="popper"===i?eg:ef,Q=X===eg?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(eu,{scope:a,content:y,viewport:C,onViewportChange:I,itemRefCallback:$,selectedItem:E,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:A,position:i,isPositioned:H,searchRef:K,children:(0,t.jsx)(W.RemoveScroll,{as:em,allowPinchZoom:!0,children:(0,t.jsx)(R.FocusScope,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,j.composeEventHandlers)(l,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(N.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,t.jsx)(X,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...w,...Q,onPlaced:()=>L(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:(0,j.composeEventHandlers)(w.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,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});eh.displayName="SelectContentImpl";var ef=n.forwardRef((e,r)=>{let{__scopeSelect:a,onPlaced:i,...l}=e,o=J(ed,a),s=ep(ed,a),[d,c]=n.useState(null),[u,p]=n.useState(null),m=(0,k.useComposedRefs)(r,e=>p(e)),h=G(a),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=s,y=n.useCallback(()=>{if(o.trigger&&o.valueNode&&d&&u&&x&&v&&w){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),r=w.getBoundingClientRect();if("rtl"!==o.dir){let a=r.left-t.left,i=n.left-a,l=e.left-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,S.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.left=u+"px"}else{let a=t.right-r.right,i=window.innerWidth-n.right-a,l=window.innerWidth-e.right-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,S.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.right=u+"px"}let a=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),b=p+m+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,b),j=window.getComputedStyle(x),C=parseInt(j.paddingTop,10),k=parseInt(j.paddingBottom,10),I=e.top+e.height/2-10,M=v.offsetHeight/2,N=p+m+(v.offsetTop+M);if(N<=I){let e=a.length>0&&v===a[a.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=a.length>0&&v===a[0].ref.current;d.style.top="0px";let t=Math.max(I,p+x.offsetTop+(e?C:0)+M);d.style.height=t+(b-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,w,o.dir,i]);(0,B.useLayoutEffect)(()=>y(),[y]);let[j,C]=n.useState();(0,B.useLayoutEffect)(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let I=n.useCallback(e=>{e&&!0===g.current&&(y(),b?.(),g.current=!1)},[y,b]);return(0,t.jsx)(ex,{scope:a,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:I,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,t.jsx)(D.Primitive.div,{...l,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});ef.displayName="SelectItemAlignedPosition";var eg=n.forwardRef((e,n)=>{let{__scopeSelect:r,align:a="start",collisionPadding:i=10,...l}=e,o=X(r);return(0,t.jsx)(T.Content,{...o,...l,ref:n,align:a,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)"}})});eg.displayName="SelectPopperPosition";var[ex,ev]=Y(ed,{}),ew="SelectViewport",eb=n.forwardRef((e,r)=>{let{__scopeSelect:a,nonce:i,...l}=e,o=ep(ew,a),s=ev(ew,a),d=(0,k.useComposedRefs)(r,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)(q.Slot,{scope:a,children:(0,t.jsx)(D.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:(0,j.composeEventHandlers)(l.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,a=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(a<r){let i=a+e,l=Math.min(r,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})})})]})});eb.displayName=ew;var ey="SelectGroup",[eS,ej]=Y(ey),eC=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=(0,E.useId)();return(0,t.jsx)(eS,{scope:r,id:i,children:(0,t.jsx)(D.Primitive.div,{role:"group","aria-labelledby":i,...a,ref:n})})});eC.displayName=ey;var ek="SelectLabel",eI=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=ej(ek,r);return(0,t.jsx)(D.Primitive.div,{id:i.id,...a,ref:n})});eI.displayName=ek;var eM="SelectItem",[eN,eP]=Y(eM),eR=n.forwardRef((e,r)=>{let{__scopeSelect:a,value:i,disabled:l=!1,textValue:o,...s}=e,d=J(eM,a),c=ep(eM,a),u=d.value===i,[p,m]=n.useState(o??""),[h,f]=n.useState(!1),g=(0,k.useComposedRefs)(r,e=>c.itemRefCallback?.(e,i,l)),x=(0,E.useId)(),v=n.useRef("touch"),w=()=>{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)(eN,{scope:a,value:i,disabled:l,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(q.ItemSlot,{scope:a,value:i,disabled:l,textValue:p,children:(0,t.jsx)(D.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,j.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,j.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,j.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:(0,j.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:(0,j.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,j.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,l?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,j.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,j.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(U.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});eR.displayName=eM;var eE="SelectItemText",eT=n.forwardRef((e,r)=>{let{__scopeSelect:a,className:i,style:l,...o}=e,s=J(eE,a),d=ep(eE,a),c=eP(eE,a),u=et(eE,a),[p,m]=n.useState(null),h=(0,k.useComposedRefs)(r,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,B.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Primitive.span,{id:c.textId,...o,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?y.createPortal(o.children,s.valueNode):null]})});eT.displayName=eE;var eA="SelectItemIndicator",eD=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return eP(eA,r).isSelected?(0,t.jsx)(D.Primitive.span,{"aria-hidden":!0,...a,ref:n}):null});eD.displayName=eA;var eF="SelectScrollUpButton",eH=n.forwardRef((e,r)=>{let a=ep(eF,e.__scopeSelect),i=ev(eF,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,k.useComposedRefs)(r,i.onScrollButtonChange);return(0,B.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){o(t.scrollTop>0)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),l?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eH.displayName=eF;var eL="SelectScrollDownButton",eB=n.forwardRef((e,r)=>{let a=ep(eL,e.__scopeSelect),i=ev(eL,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,k.useComposedRefs)(r,i.onScrollButtonChange);return(0,B.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),l?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eB.displayName=eL;var ez=n.forwardRef((e,r)=>{let{__scopeSelect:a,onAutoScroll:i,...l}=e,o=ep("SelectScrollButton",a),s=n.useRef(null),d=G(a),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,B.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(D.Primitive.div,{"aria-hidden":!0,...l,ref:r,style:{flexShrink:0,...l.style},onPointerDown:(0,j.composeEventHandlers)(l.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(i,50))}),onPointerMove:(0,j.composeEventHandlers)(l.onPointerMove,()=>{o.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(i,50))}),onPointerLeave:(0,j.composeEventHandlers)(l.onPointerLeave,()=>{c()})})}),e_=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return(0,t.jsx)(D.Primitive.div,{"aria-hidden":!0,...a,ref:n})});e_.displayName="SelectSeparator";var eV="SelectArrow",eW=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=X(r),l=J(eV,r),o=ep(eV,r);return l.open&&"popper"===o.position?(0,t.jsx)(T.Arrow,{...i,...a,ref:n}):null});eW.displayName=eV;var eO=n.forwardRef(({__scopeSelect:e,value:r,...a},i)=>{let l=n.useRef(null),o=(0,k.useComposedRefs)(i,l),s=(0,z.usePrevious)(r);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(D.Primitive.select,{...a,style:{..._.VISUALLY_HIDDEN_STYLES,...a.style},ref:o,defaultValue:r})});function eU(e){return""===e||void 0===e}function eK(e){let t=(0,H.useCallbackRef)(e),r=n.useRef(""),a=n.useRef(0),i=n.useCallback(e=>{let n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(a.current),""!==t&&(a.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),l=n.useCallback(()=>{r.current="",window.clearTimeout(a.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(a.current),[]),[r,i,l]}function eq(e,t,n){var r,a;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1,o=(r=e,a=Math.max(l,0),r.map((e,t)=>r[(a+t)%r.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}eO.displayName="SelectBubbleInput",e.s(["Arrow",()=>eW,"Content",()=>ec,"Group",()=>eC,"Icon",()=>eo,"Item",()=>eR,"ItemIndicator",()=>eD,"ItemText",()=>eT,"Label",()=>eI,"Portal",()=>es,"Root",()=>en,"ScrollDownButton",()=>eB,"ScrollUpButton",()=>eH,"Select",()=>en,"SelectArrow",()=>eW,"SelectContent",()=>ec,"SelectGroup",()=>eC,"SelectIcon",()=>eo,"SelectItem",()=>eR,"SelectItemIndicator",()=>eD,"SelectItemText",()=>eT,"SelectLabel",()=>eI,"SelectPortal",()=>es,"SelectScrollDownButton",()=>eB,"SelectScrollUpButton",()=>eH,"SelectSeparator",()=>e_,"SelectTrigger",()=>ea,"SelectValue",()=>el,"SelectViewport",()=>eb,"Separator",()=>e_,"Trigger",()=>ea,"Value",()=>el,"Viewport",()=>eb,"createSelectScope",()=>Z],83830);var eG=e.i(83830),eG=eG,e$=e.i(99105);let eY=(0,a.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),eZ=eG.Root;eG.Group;let eX=eG.Value,eQ=n.forwardRef(({className:e,children:n,...r},a)=>(0,t.jsxs)(eG.Trigger,{ref:a,className:(0,v.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),...r,children:[n,(0,t.jsx)(eG.Icon,{asChild:!0,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));eQ.displayName=eG.Trigger.displayName;let eJ=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.ScrollUpButton,{ref:r,className:(0,v.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eY,{className:"h-4 w-4"})}));eJ.displayName=eG.ScrollUpButton.displayName;let e0=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.ScrollDownButton,{ref:r,className:(0,v.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4"})}));e0.displayName=eG.ScrollDownButton.displayName;let e1=n.forwardRef(({className:e,children:n,position:r="popper",...a},i)=>(0,t.jsx)(eG.Portal,{children:(0,t.jsxs)(eG.Content,{ref:i,className:(0,v.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"===r&&"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:r,...a,children:[(0,t.jsx)(eJ,{}),(0,t.jsx)(eG.Viewport,{className:(0,v.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e0,{})]})}));e1.displayName=eG.Content.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.Label,{ref:r,className:(0,v.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=eG.Label.displayName;let e2=n.forwardRef(({className:e,children:n,...a},i)=>(0,t.jsxs)(eG.Item,{ref:i,className:(0,v.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),...a,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(eG.ItemIndicator,{children:(0,t.jsx)(r.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eG.ItemText,{children:n})]}));e2.displayName=eG.Item.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eG.Separator,{ref:r,className:(0,v.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=eG.Separator.displayName;var e3=e.i(21023);let e5=(0,e3.createServerReference)("40c4fd10a919dea18d7d5101d786e01214e003b0eb",e3.callServer,void 0,e3.findSourceMapURL,"updateSettingsAction");var e4=e.i(17406),e8=e.i(98804),e6=e.i(44229),e9=e.i(83902);function e7(e){return(0,t.jsx)(e6.Code,{className:(0,v.cn)("h-4 w-4",e.className),...e})}function te({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tt({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tn({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(e8.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,v.cn)("rounded-sm object-contain",e)})}function ta({className:e,...n}){return(0,t.jsx)(e9.Rocket,{className:(0,v.cn)("h-4 w-4",e),...n})}te.displayName="VsCodeIcon",tt.displayName="CursorEditorIcon",tn.displayName="WindsurfIcon",tr.displayName="ZedIcon",ta.displayName="AntigravityIcon";let ti={vscode:te,cursor:tt,windsurf:tn,zed:tr,antigravity:ta};var tl=e.i(41413),to=e.i(77624),ts=["PageUp","PageDown"],td=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tc={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tu="Slider",[tp,tm,th]=(0,C.createCollection)(tu),[tf,tg]=(0,I.createContextScope)(tu,[th]),[tx,tv]=tf(tu),tw=n.forwardRef((e,r)=>{let{name:a,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),w=n.useRef(0),b="horizontal"===s,[y=[],C]=(0,L.useControllableState)({prop:p,defaultProp:u,onChange:e=>{let t=[...v.current];t[w.current]?.focus(),m(e)}}),k=n.useRef(y);function I(e,t,{commit:n}={commit:!1}){let r,a=(String(o).split(".")[1]||"").length,s=Math.round((Math.round((e-i)/o)*o+i)*(r=Math.pow(10,a)))/r,d=(0,S.clamp)(s,[i,l]);C((e=[])=>{let r=function(e=[],t,n){let r=[...e];return r[n]=t,r.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}(r,c*o))return e;{w.current=r.indexOf(d);let t=String(r)!==String(e);return t&&n&&h(r),t?r:e}})}return(0,t.jsx)(tx,{scope:e.__scopeSlider,name:a,disabled:d,min:i,max:l,valueIndexToChangeRef:w,thumbs:v.current,values:y,orientation:s,form:g,children:(0,t.jsx)(tp.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(tp.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(b?tS:tj,{"aria-disabled":d,"data-disabled":d?"":void 0,...x,ref:r,onPointerDown:(0,j.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)),r=Math.min(...n);return n.indexOf(r)}(y,e);I(e,t)},onSlideMove:d?void 0:function(e){I(e,w.current)},onSlideEnd:d?void 0:function(){let e=k.current[w.current];y[w.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=ts.includes(e.key)||e.shiftKey&&td.includes(e.key),r=w.current;I(y[r]+o*(n?10:1)*t,r,{commit:!0})}}})})})})});tw.displayName=tu;var[tb,ty]=tf(tu,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tS=n.forwardRef((e,r)=>{let{min:a,max:i,dir:l,inverted:o,onSlideStart:s,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...p}=e,[m,h]=n.useState(null),f=(0,k.useComposedRefs)(r,e=>h(e)),g=n.useRef(void 0),x=(0,M.useDirection)(l),v="ltr"===x,w=v&&!o||!v&&o;function b(e){let t=g.current||m.getBoundingClientRect(),n=tD([0,t.width],w?[a,i]:[i,a]);return g.current=t,n(e-t.left)}return(0,t.jsx)(tb,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:(0,t.jsx)(tC,{dir:x,"data-orientation":"horizontal",...p,ref:f,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=b(e.clientX);s?.(t)},onSlideMove:e=>{let t=b(e.clientX);d?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=tc[w?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),tj=n.forwardRef((e,r)=>{let{min:a,max:i,inverted:l,onSlideStart:o,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=e,p=n.useRef(null),m=(0,k.useComposedRefs)(r,p),h=n.useRef(void 0),f=!l;function g(e){let t=h.current||p.current.getBoundingClientRect(),n=tD([0,t.height],f?[i,a]:[a,i]);return h.current=t,n(e-t.top)}return(0,t.jsx)(tb,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,t.jsx)(tC,{"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=tc[f?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),tC=n.forwardRef((e,n)=>{let{__scopeSlider:r,onSlideStart:a,onSlideMove:i,onSlideEnd:l,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:d,...c}=e,u=tv(tu,r);return(0,t.jsx)(D.Primitive.span,{...c,ref:n,onKeyDown:(0,j.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(o(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):ts.concat(td).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:(0,j.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():a(e)}),onPointerMove:(0,j.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:(0,j.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),l(e))})})}),tk="SliderTrack",tI=n.forwardRef((e,n)=>{let{__scopeSlider:r,...a}=e,i=tv(tk,r);return(0,t.jsx)(D.Primitive.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...a,ref:n})});tI.displayName=tk;var tM="SliderRange",tN=n.forwardRef((e,r)=>{let{__scopeSlider:a,...i}=e,l=tv(tM,a),o=ty(tM,a),s=n.useRef(null),d=(0,k.useComposedRefs)(r,s),c=l.values.length,u=l.values.map(e=>tA(e,l.min,l.max)),p=c>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(D.Primitive.span,{"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,...i,ref:d,style:{...e.style,[o.startEdge]:p+"%",[o.endEdge]:m+"%"}})});tN.displayName=tM;var tP="SliderThumb",tR=n.forwardRef((e,r)=>{let a=tm(e.__scopeSlider),[i,l]=n.useState(null),o=(0,k.useComposedRefs)(r,e=>l(e)),s=n.useMemo(()=>i?a().findIndex(e=>e.ref.current===i):-1,[a,i]);return(0,t.jsx)(tE,{...e,ref:o,index:s})}),tE=n.forwardRef((e,r)=>{var a,i,l,o,s;let d,c,{__scopeSlider:u,index:p,name:m,...h}=e,f=tv(tP,u),g=ty(tP,u),[x,v]=n.useState(null),w=(0,k.useComposedRefs)(r,e=>v(e)),b=!x||f.form||!!x.closest("form"),y=(0,to.useSize)(x),S=f.values[p],C=void 0===S?0:tA(S,f.min,f.max),I=(a=p,(i=f.values.length)>2?`Value ${a+1} of ${i}`:2===i?["Minimum","Maximum"][a]:void 0),M=y?.[g.size],N=M?(l=M,o=C,s=g.direction,c=tD([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(${C}% + ${N}px)`},children:[(0,t.jsx)(tp.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(D.Primitive.span,{role:"slider","aria-label":e["aria-label"]||I,"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:w,style:void 0===S?{display:"none"}:e.style,onFocus:(0,j.composeEventHandlers)(e.onFocus,()=>{f.valueIndexToChangeRef.current=p})})}),b&&(0,t.jsx)(tT,{name:m??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:S},p)]})});tR.displayName=tP;var tT=n.forwardRef(({__scopeSlider:e,value:r,...a},i)=>{let l=n.useRef(null),o=(0,k.useComposedRefs)(l,i),s=(0,z.usePrevious)(r);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==r&&t){let n=new Event("input",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(D.Primitive.input,{style:{display:"none"},...a,ref:o,defaultValue:r})});function tA(e,t,n){return(0,S.clamp)(100/(n-t)*(e-t),[0,100])}function tD(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}tT.displayName="RadioBubbleInput",e.s(["Range",()=>tN,"Root",()=>tw,"Slider",()=>tw,"SliderRange",()=>tN,"SliderThumb",()=>tR,"SliderTrack",()=>tI,"Thumb",()=>tR,"Track",()=>tI,"createSliderScope",()=>tg],29991);var tF=e.i(29991),tF=tF;function tH({className:e,defaultValue:r,value:a,min:i=0,max:l=100,...o}){let s=n.useMemo(()=>Array.isArray(a)?a:Array.isArray(r)?r:[i,l],[a,r,i,l]);return(0,t.jsxs)(tF.Root,{"data-slot":"slider",defaultValue:r,value:a,min:i,max:l,className:(0,v.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)(tF.Track,{"data-slot":"slider-track",className:(0,v.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)(tF.Range,{"data-slot":"slider-range",className:(0,v.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,n)=>(0,t.jsx)(tF.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 tL=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],tB=tL.length-1;function tz(e){let t=0,n=Math.abs(e-tL[0]);for(let r=1;r<tL.length;r++){let a=Math.abs(e-tL[r]);a<n&&(n=a,t=r)}return t}function t_({id:e,testId:r,value:a,onChange:i,onBlur:l,defaultSeconds:o=1800}){var s;let d,c,u=(""===a?o:parseInt(a,10))||o,[p,m]=(0,n.useState)(()=>tz(u)),h=tz(u);h!==p&&tL[p]!==u&&m(h);let f=(0,n.useCallback)(([e])=>{m(e),i(String(tL[e]))},[i]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(tH,{id:e,"data-testid":r,min:0,max:tB,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=tL[p])/3600),c=Math.round(s%3600/60),0===d?`${c}m`:0===c?`${d}h`:`${d}h ${c}m`)})]})}let tV=[{value:e4.EditorType.VsCode,label:"VS Code"},{value:e4.EditorType.Cursor,label:"Cursor"},{value:e4.EditorType.Windsurf,label:"Windsurf"},{value:e4.EditorType.Zed,label:"Zed"},{value:e4.EditorType.Antigravity,label:"Antigravity"}],tW=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],tO=[{id:"agent",label:"Agent",icon:i},{id:"environment",label:"Environment",icon:l.Terminal},{id:"workflow",label:"Workflow",icon:o.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:"database",label:"Database",icon:u}];function tU({label:e,description:n,htmlFor:r,children:a}){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:r,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:a})]})}function tK({label:e,description:n,id:r,testId:a,checked:i,onChange:l,disabled:o}){return(0,t.jsx)(tU,{label:e,description:n,htmlFor:r,children:(0,t.jsx)(b.Switch,{id:r,"data-testid":a,checked:i,onCheckedChange:l,disabled:o,className:(0,v.cn)("cursor-pointer",o&&"cursor-not-allowed opacity-50")})})}function tq({icon:e,title:n,description:r,badge:a,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}),a?(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:a}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:r})]}),(0,t.jsx)("div",{className:"px-4",children:l})]})}function tG({id:e,testId:n,value:r,onChange:a,onBlur:i,placeholder:l,min:o=1,max:s,step:d=1,suffix:c}){let u=""===r?void 0:parseInt(r,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:()=>{a(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:r,placeholder:l,onChange:e=>{a(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),a(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 t$({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 tY({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 tZ({settings:e,shepHome:a,dbFileSize:p,availableTerminals:m}){let{showSaving:h,showSaved:w,save:b}=function(){let[e,t]=(0,n.useTransition)(),[r,a]=(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&&!r&&(a(!0),s.current=!1,o.current=setTimeout(()=>{o.current=null,s.current&&(a(!1),l(!0),setTimeout(()=>l(!1),2e3))},350)),!e&&r&&(s.current=!0,o.current||(a(!1),l(!0),setTimeout(()=>l(!1),2e3)))},[e,r]),{showSaving:r,showSaved:i,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e5(e);t.success||x.toast.error(t.error??"Failed to save settings")})},[t])}}(),y=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1},[S,j]=(0,n.useState)(e.agent.type),[C,k]=(0,n.useState)(e.environment.defaultEditor),[I,M]=(0,n.useState)(e.environment.shellPreference),[N,P]=(0,n.useState)(e.environment.terminalPreference??e4.TerminalType.System),R=m?m.filter(e=>e.available):[{id:e4.TerminalType.System,name:"System Terminal",available:!0}],[E,T]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[A,D]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[F,H]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[L,B]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[z,_]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[V,W]=(0,n.useState)(e.workflow.enableEvidence),[O,U]=(0,n.useState)(e.workflow.commitEvidence),[K,q]=(0,n.useState)(!1!==e.workflow.ciWatchEnabled),[G,$]=(0,n.useState)(!1!==e.workflow.hideCiStatus),[Y,Z]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[X,Q]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[J,ee]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[et,en]=(0,n.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),er=e.workflow.stageTimeouts,[ea,ei]=(0,n.useState)(String(Math.round((er?.analyzeMs??18e5)/1e3))),[el,eo]=(0,n.useState)(String(Math.round((er?.requirementsMs??18e5)/1e3))),[es,ed]=(0,n.useState)(String(Math.round((er?.researchMs??18e5)/1e3))),[ec,eu]=(0,n.useState)(String(Math.round((er?.planMs??18e5)/1e3))),[ep,em]=(0,n.useState)(String(Math.round((er?.implementMs??18e5)/1e3))),[eh,ef]=(0,n.useState)(String(Math.round((er?.mergeMs??18e5)/1e3))),eg=e.workflow.analyzeRepoTimeouts,[ex,ev]=(0,n.useState)(String(Math.round((eg?.analyzeMs??6e5)/1e3))),[ew,eb]=(0,n.useState)(e.notifications.inApp.enabled),[ey,eS]=(0,n.useState)({...e.notifications.events}),[ej,eC]=(0,n.useState)({...y}),ek=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",eI=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",eM=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",eN=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"",eP=er?.analyzeMs!=null?String(Math.round(er.analyzeMs/1e3)):"",eR=er?.requirementsMs!=null?String(Math.round(er.requirementsMs/1e3)):"",eE=er?.researchMs!=null?String(Math.round(er.researchMs/1e3)):"",eT=er?.planMs!=null?String(Math.round(er.planMs/1e3)):"",eA=er?.implementMs!=null?String(Math.round(er.implementMs/1e3)):"",eD=er?.mergeMs!=null?String(Math.round(er.mergeMs/1e3)):"",eF=eg?.analyzeMs!=null?String(Math.round(eg.analyzeMs/1e3)):"";function eH(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eL(e){if(void 0===e)return;let t=eH(e);return null!=t?1e3*t:void 0}function eB(e={}){let t=eH(e.ciTimeout??X);return{workflow:{openPrOnImplementationComplete:e.openPr??E,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??A,allowPrd:e.allowPrd??F,allowPlan:e.allowPlan??L,allowMerge:e.allowMerge??z},enableEvidence:e.enableEvidence??V,commitEvidence:e.commitEvidence??O,ciWatchEnabled:e.ciWatchEnabled??K,hideCiStatus:e.hideCiStatus??G,ciMaxFixAttempts:eH(e.ciMaxFix??Y),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:eH(e.ciLogMax??J),ciWatchPollIntervalSeconds:eH(e.ciPollInterval??et),stageTimeouts:{analyzeMs:eL(e.analyzeTimeout??ea),requirementsMs:eL(e.requirementsTimeout??el),researchMs:eL(e.researchTimeout??es),planMs:eL(e.planTimeout??ec),implementMs:eL(e.implementTimeout??ep),mergeMs:eL(e.mergeTimeout??eh)},analyzeRepoTimeouts:{analyzeMs:eL(e.analyzeRepoTimeout??ex)}}}}function ez(e={}){return{notifications:{inApp:{enabled:e.inApp??ew},events:e.events??ey}}}let[e_,eV]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=tO.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&&eV(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let eW=(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,v.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,v.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)(r.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:tO.map(e=>{let n=e.icon,r=e_===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>eW(e.id),className:(0,v.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",r?"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)(tq,{icon:i,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:(0,t.jsx)(tU,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(tl.AgentModelPicker,{initialAgentType:S,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>j(e),className:"w-55"})})}),(0,t.jsx)(tY,{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)(tq,{icon:l.Terminal,title:"Environment",description:"Editor, shell, and terminal preferences",testId:"environment-settings-section",children:[(0,t.jsx)(tU,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(eZ,{value:C,onValueChange:e=>{k(e),b({environment:{defaultEditor:e,shellPreference:I,terminalPreference:N}})},children:[(0,t.jsx)(eQ,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:tV.map(e=>{var n;let r=(n=e.value)&&n in ti?ti[n]:e7;return(0,t.jsx)(e2,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(tU,{label:"Shell",description:"Default shell for generated scripts",htmlFor:"shell-preference",children:(0,t.jsxs)(eZ,{value:I,onValueChange:e=>{M(e),b({environment:{defaultEditor:C,shellPreference:e,terminalPreference:N}})},children:[(0,t.jsx)(eQ,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:tW.map(e=>(0,t.jsx)(e2,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(tU,{label:"Terminal",description:"Terminal emulator for shell sessions",htmlFor:"terminal-preference",children:(0,t.jsxs)(eZ,{value:N,onValueChange:e=>{P(e),b({environment:{defaultEditor:C,shellPreference:I,terminalPreference:e}})},children:[(0,t.jsx)(eQ,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eX,{})}),(0,t.jsx)(e1,{children:R.map(e=>(0,t.jsx)(e2,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)(tY,{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)(tq,{icon:o.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(t$,{children:"Approve"}),(0,t.jsx)(tK,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:F,onChange:e=>{H(e),b(eB({allowPrd:e}))}}),(0,t.jsx)(tK,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:L,onChange:e=>{B(e),b(eB({allowPlan:e}))}}),(0,t.jsx)(tK,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:z,onChange:e=>{_(e),b(eB({allowMerge:e}))}}),(0,t.jsx)(t$,{children:"Evidence"}),(0,t.jsx)(tK,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:V,onChange:e=>{W(e),e?b(eB({enableEvidence:e})):(U(!1),b(eB({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tK,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:O,disabled:!V||!E,onChange:e=>{U(e),b(eB({commitEvidence:e}))}}),(0,t.jsx)(t$,{children:"Git"}),(0,t.jsx)(tK,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:A,onChange:e=>{D(e),b(eB({pushOnComplete:e}))}}),(0,t.jsx)(tK,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:E,onChange:e=>{T(e),e?b(eB({openPr:e})):(U(!1),b(eB({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(tK,{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:K,onChange:e=>{q(e),b(eB({ciWatchEnabled:e}))}})]}),(0,t.jsx)(tY,{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)(tq,{icon:s,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tU,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(tG,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:Y,onChange:Z,onBlur:()=>{Y!==ek&&b(eB({ciMaxFix:Y}))},min:1,max:10})}),(0,t.jsx)(tU,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(tG,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:X,onChange:Q,onBlur:()=>{X!==eI&&b(eB({ciTimeout:X}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tU,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(tG,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:J,onChange:ee,onBlur:()=>{J!==eM&&b(eB({ciLogMax:J}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(tU,{label:"Poll interval",description:"How often to check GitHub for CI status updates",htmlFor:"ci-poll-interval",children:(0,t.jsx)(tG,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:et,onChange:en,onBlur:()=>{et!==eN&&b(eB({ciPollInterval:et}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(tK,{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:G,onChange:e=>{$(e),b(eB({hideCiStatus:e}))}})]}),(0,t.jsx)(tY,{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)(tq,{icon:g.Timer,title:"Stage Timeouts",description:"Maximum execution time per agent stage",testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(t$,{children:"Feature Agent"}),(0,t.jsx)(tU,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze",children:(0,t.jsx)(t_,{id:"timeout-analyze",testId:"timeout-analyze-input",value:ea,onChange:ei,onBlur:()=>{ea!==eP&&b(eB({analyzeTimeout:ea}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Requirements",description:"Requirements gathering timeout",htmlFor:"timeout-requirements",children:(0,t.jsx)(t_,{id:"timeout-requirements",testId:"timeout-requirements-input",value:el,onChange:eo,onBlur:()=>{el!==eR&&b(eB({requirementsTimeout:el}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Research",description:"Technical research timeout",htmlFor:"timeout-research",children:(0,t.jsx)(t_,{id:"timeout-research",testId:"timeout-research-input",value:es,onChange:ed,onBlur:()=>{es!==eE&&b(eB({researchTimeout:es}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Plan",description:"Implementation planning timeout",htmlFor:"timeout-plan",children:(0,t.jsx)(t_,{id:"timeout-plan",testId:"timeout-plan-input",value:ec,onChange:eu,onBlur:()=>{ec!==eT&&b(eB({planTimeout:ec}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Implement",description:"Code implementation timeout",htmlFor:"timeout-implement",children:(0,t.jsx)(t_,{id:"timeout-implement",testId:"timeout-implement-input",value:ep,onChange:em,onBlur:()=>{ep!==eA&&b(eB({implementTimeout:ep}))},defaultSeconds:1800})}),(0,t.jsx)(tU,{label:"Merge",description:"PR creation and merge timeout",htmlFor:"timeout-merge",children:(0,t.jsx)(t_,{id:"timeout-merge",testId:"timeout-merge-input",value:eh,onChange:ef,onBlur:()=>{eh!==eD&&b(eB({mergeTimeout:eh}))},defaultSeconds:1800})}),(0,t.jsx)(t$,{children:"Analyze Repository Agent"}),(0,t.jsx)(tU,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(t_,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:ex,onChange:ev,onBlur:()=>{ex!==eF&&b(eB({analyzeRepoTimeout:ex}))},defaultSeconds:600})})]}),(0,t.jsx)(tY,{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)(tq,{icon:d,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(t$,{children:"Channels"}),(0,t.jsx)(tK,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:ew,onChange:e=>{eb(e),b(ez({inApp:e}))}}),(0,t.jsx)(t$,{children:"Agent Events"}),(0,t.jsx)(tK,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:ey.agentStarted,onChange:e=>{let t={...ey,agentStarted:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:ey.phaseCompleted,onChange:e=>{let t={...ey,phaseCompleted:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:ey.waitingApproval,onChange:e=>{let t={...ey,waitingApproval:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:ey.agentCompleted,onChange:e=>{let t={...ey,agentCompleted:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:ey.agentFailed,onChange:e=>{let t={...ey,agentFailed:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(t$,{children:"Pull Request Events"}),(0,t.jsx)(tK,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:ey.prMerged,onChange:e=>{let t={...ey,prMerged:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:ey.prClosed,onChange:e=>{let t={...ey,prClosed:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:ey.prChecksPassed,onChange:e=>{let t={...ey,prChecksPassed:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:ey.prChecksFailed,onChange:e=>{let t={...ey,prChecksFailed:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"PR blocked",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:ey.prBlocked,onChange:e=>{let t={...ey,prBlocked:e};eS(t),b(ez({events:t}))}}),(0,t.jsx)(tK,{label:"Merge review ready",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:ey.mergeReviewReady,onChange:e=>{let t={...ey,mergeReviewReady:e};eS(t),b(ez({events:t}))}})]}),(0,t.jsx)(tY,{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)(tq,{icon:c,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tK,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:ej.skills,onChange:e=>{let t={...ej,skills:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:ej.envDeploy,onChange:e=>{let t={...ej,envDeploy:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:ej.debug,onChange:e=>{let t={...ej,debug:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"GitHub Import",description:"Enable GitHub repository import in the web UI",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:ej.githubImport,onChange:e=>{let t={...ej,githubImport:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Adopt Branch",description:"Import existing branches as tracked features",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:ej.adoptBranch,onChange:e=>{let t={...ej,adoptBranch:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{label:"Git Rebase & Sync",description:"Enable git rebase-on-main and sync-main operations",id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:ej.gitRebaseSync,onChange:e=>{let t={...ej,gitRebaseSync:e};eC(t),b({featureFlags:t})}}),(0,t.jsx)(tK,{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:ej.reactFileManager,onChange:e=>{let t={...ej,reactFileManager:e};eC(t),b({featureFlags:t})}})]}),(0,t.jsx)(tY,{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-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tq,{icon:u,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tU,{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:a})}),(0,t.jsx)(tU,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:p})})]}),(0,t.jsx)(tY,{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",()=>tZ],41952)}]);
@@ -1,3 +0,0 @@
1
- module.exports=[87913,e=>{"use strict";var t=e.i(22925),r=e.i(62995),a=e.i(14112),n=e.i(31716),i=e.i(16340),s=e.i(40522),l=e.i(21994),o=e.i(5802),u=e.i(17171),c=e.i(177),d=e.i(43685),p=e.i(84832),m=e.i(92435),f=e.i(41260),h=e.i(80556),g=e.i(93695);e.i(97230);var R=e.i(35162),w=e.i(27980),y=e.i(66680),v=e.i(60526),E=e.i(50227),P=e.i(12714);function A(e){return e.replace(/[/\\.]/g,"-")}async function x(e){let t;try{t=await (0,P.readdir)(e)}catch{return[]}let r=t.filter(e=>e.endsWith(".jsonl"));return(await Promise.allSettled(r.map(async t=>{let r=(0,E.join)(e,t),a=await (0,P.stat)(r);return{name:t,filePath:r,mtime:a.mtime.getTime()}}))).filter(e=>"fulfilled"===e.status).map(e=>e.value)}async function C(e,t,r=!1){let a=A(e),n=(0,E.join)((0,v.homedir)(),".claude","projects"),i=(0,E.join)(n,a),s=await x(i);if(r)try{let t=await (0,P.readdir)(n),r=t.filter(e=>e!==a&&e.startsWith(a)),i=e.replace(/\\/g,"/"),l=(0,y.createHash)("sha256").update(i).digest("hex").slice(0,16),o=(0,E.join)((0,v.homedir)(),".shep").replace(/\\/g,"/"),u=A((0,E.join)(o,"repos",l)),c=t.filter(e=>e.startsWith(u)&&!r.includes(e)&&e!==a),d=[...r,...c];for(let e of(await Promise.all(d.map(e=>x((0,E.join)(n,e))))))s=s.concat(e)}catch{}let l=s.sort((e,t)=>t.mtime-e.mtime).slice(0,t);return(await Promise.allSettled(l.map(async t=>S(t.filePath,t.name,t.mtime,e)))).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e)}async function S(t,r,a,n){let{createReadStream:i}=await e.A(6714),s=r.replace(".jsonl",""),l=null,o=null,u=0,c=await new Promise(e=>{let r=[],a=0,n=i(t,{end:8191});n.on("data",e=>{r.push(e),a+=e.length}),n.on("end",()=>e(Buffer.concat(r,a).toString("utf-8"))),n.on("error",()=>e(""))});if(!c)return null;for(let e of c.split("\n").filter(e=>e.trim()))try{let t=JSON.parse(e);if("user"===t.type||"assistant"===t.type){let e=t.message?.role;("user"===e||"assistant"===e)&&(u++,t.timestamp&&(o??=t.timestamp),"user"===e&&null===l&&(l=N(t.message?.content)))}}catch{break}if(0===u)return null;let d=new Date(a).toISOString();return{id:s,agentType:"claude-code",preview:l,messageCount:u,firstMessageAt:o,lastMessageAt:d,createdAt:o??d,projectPath:n,filePath:t,_mtime:a}}async function T(e,t){let r,a=e.replace(/^\//,"").replace(/\./g,"").replace(/[/\\]/g,"-"),n=(0,E.join)((0,v.homedir)(),".cursor","projects",a,"agent-transcripts");try{r=await (0,P.readdir)(n)}catch{return[]}let i=(await Promise.allSettled(r.map(async e=>{let t=(0,E.join)(n,e),r=await (0,P.stat)(t);if(r.isFile()&&e.endsWith(".jsonl"))return{name:e,filePath:t,mtime:r.mtime.getTime()};if(r.isDirectory()){let r=(0,E.join)(t,`${e}.jsonl`);try{let t=await (0,P.stat)(r);return{name:`${e}.jsonl`,filePath:r,mtime:t.mtime.getTime()}}catch{}}return null}))).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e).sort((e,t)=>t.mtime-e.mtime).slice(0,t);return(await Promise.allSettled(i.map(async t=>j(t.filePath,t.name,t.mtime,e)))).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e)}async function j(t,r,a,n){let{createReadStream:i}=await e.A(6714),s=r.replace(".jsonl",""),l=await new Promise(e=>{let r=[],a=0,n=i(t,{end:8191});n.on("data",e=>{r.push(e),a+=e.length}),n.on("end",()=>e(Buffer.concat(r,a).toString("utf-8"))),n.on("error",()=>e(""))});if(!l)return null;let o=null,u=0;for(let e of l.split("\n").filter(e=>e.trim()))try{let t=JSON.parse(e);("user"===t.role||"assistant"===t.role)&&(u++,"user"===t.role&&null===o&&(o=N(t.message?.content)))}catch{break}if(0===u)return null;let c=new Date(a).toISOString();return{id:s,agentType:"cursor",preview:o,messageCount:u,firstMessageAt:c,lastMessageAt:c,createdAt:c,projectPath:n,filePath:t,_mtime:a}}function N(e){if("string"==typeof e)return e;if(Array.isArray(e)){for(let t of e)if("object"==typeof t&&null!==t&&"text"===t.type&&"string"==typeof t.text)return t.text}return null}async function b(e){let t=new URL(e.url),r=t.searchParams.get("repositoryPath"),a=parseInt(t.searchParams.get("limit")??"10",10),n="true"===t.searchParams.get("includeWorktrees");if(!r?.trim())return w.NextResponse.json({error:"repositoryPath is required"},{status:400});try{let[e,t]=await Promise.all([C(r,a,n),T(r,a)]),i=[...e,...t].sort((e,t)=>t._mtime-e._mtime).slice(0,Math.min(a,50));return w.NextResponse.json({sessions:i.map(({_mtime:e,...t})=>t)})}catch(e){return console.error("[API] GET /api/sessions error:",e),w.NextResponse.json({error:String(e)},{status:500})}}e.s(["GET",()=>b,"dynamic",0,"force-dynamic"],17276);var O=e.i(17276);let _=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/sessions/route",pathname:"/api/sessions",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/sessions/route.ts",nextConfigOutput:"standalone",userland:O}),{workAsyncStorage:I,workUnitAsyncStorage:H,serverHooks:M}=_;function U(){return(0,a.patchFetch)({workAsyncStorage:I,workUnitAsyncStorage:H})}async function k(e,t,a){_.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/sessions/route";w=w.replace(/\/index$/,"")||"/";let y=await _.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:E,nextConfig:P,parsedUrl:A,isDraftMode:x,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:T,revalidateOnlyGenerated:j,resolvedPathname:N,clientReferenceManifest:b,serverActionsManifest:O}=y,I=(0,l.normalizeAppPath)(w),H=!!(C.dynamicRoutes[I]||C.routes[N]),M=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,A,!1):t.end("This page could not be found"),null);if(H&&!x){let e=!!C.routes[N],t=C.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(P.experimental.adapterPath)return await M();throw new g.NoFallbackError}}let U=null;!H||_.isDev||x||(U="/index"===(U=N)?"/":U);let k=!0===_.isDev||!H,D=H&&!k;O&&b&&(0,s.setManifestsSingleton)({page:w,clientReferenceManifest:b,serverActionsManifest:O});let q=e.method||"GET",$=(0,i.getTracer)(),F=$.getActiveScopeSpan(),K={params:E,prerenderManifest:C,renderOpts:{experimental:{authInterrupts:!!P.experimental.authInterrupts},cacheComponents:!!P.cacheComponents,supportsDynamicResponse:k,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:P.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>_.onRequestError(e,t,a,n,S)},sharedContext:{buildId:v}},B=new o.NodeNextRequest(e),W=new o.NodeNextResponse(t),L=u.NextRequestAdapter.fromNodeNextRequest(B,(0,u.signalFromNodeResponse)(t));try{let s=async e=>_.handle(L,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${q} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${q} ${w}`)}),l=!!(0,n.getRequestMeta)(e,"minimalMode"),o=async n=>{var i,o;let u=async({previousCacheEntry:r})=>{try{if(!l&&T&&j&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let o=K.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let u=K.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(B,W,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(i.headers);u&&(t[h.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await _.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,S),t}},c=await _.handleResponse({req:e,nextConfig:P,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:j,responseGenerator:u,waitUntil:a.waitUntil,isMinimalMode:l});if(!H)return null;if((null==c||null==(i=c.value)?void 0:i.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(o=c.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});l||t.setHeader("x-nextjs-cache",T?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),x&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,m.fromNodeOutgoingHttpHeaders)(c.value.headers);return l&&H||g.delete(h.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,f.getCacheControlHeader)(c.cacheControl)),await (0,p.sendResponse)(B,W,new Response(c.value.body,{headers:g,status:c.value.status||200})),null};F?await o(F):await $.withPropagatedContext(e.headers,()=>$.trace(c.BaseServerSpan.handleRequest,{spanName:`${q} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":q,"http.target":e.url}},o))}catch(t){if(t instanceof g.NoFallbackError||await _.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,S),H)throw t;return await (0,p.sendResponse)(B,W,new Response(null,{status:500})),null}}e.s(["handler",()=>k,"patchFetch",()=>U,"routeModule",()=>_,"serverHooks",()=>M,"workAsyncStorage",()=>I,"workUnitAsyncStorage",()=>H],87913)}];
2
-
3
- //# sourceMappingURL=403f9_next_dist_esm_build_templates_app-route_ff60e4a5.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../src/presentation/web/app/api/sessions/route.ts","../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { NextResponse } from 'next/server';\nimport { createHash } from 'node:crypto';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { readdir, stat } from 'node:fs/promises';\n\nexport const dynamic = 'force-dynamic';\n\ninterface SessionResult {\n id: string;\n agentType: string;\n preview: string | null;\n messageCount: number;\n firstMessageAt: string | null;\n lastMessageAt: string | null;\n createdAt: string | null;\n projectPath: string;\n filePath: string;\n /** mtime for sorting — not sent to client */\n _mtime: number;\n}\n\n// ── Path encoding helpers ─────────────────────────────────────────────\n\n/**\n * Claude Code encodes paths by replacing '/', '\\', '.' with '-'.\n * e.g. /home/user/.shep/repos/abc → -home-user--shep-repos-abc\n */\nfunction claudeEncodePath(p: string): string {\n return p.replace(/[/\\\\.]/g, '-');\n}\n\n/**\n * Cursor encodes paths by stripping the leading '/', removing dots,\n * and replacing '/' and '\\' with '-'.\n * e.g. /home/user/.shep/repos/abc → home-user-shep-repos-abc\n */\nfunction cursorEncodePath(p: string): string {\n return p.replace(/^\\//, '').replace(/\\./g, '').replace(/[/\\\\]/g, '-');\n}\n\n// ── Claude Code session scanner ───────────────────────────────────────\n\n/**\n * Collect .jsonl session files from a single Claude project directory.\n */\nasync function collectJsonlFiles(\n projectDir: string\n): Promise<{ name: string; filePath: string; mtime: number }[]> {\n let entries: string[];\n try {\n entries = await readdir(projectDir);\n } catch {\n return [];\n }\n const jsonlFiles = entries.filter((e) => e.endsWith('.jsonl'));\n const fileInfos = await Promise.allSettled(\n jsonlFiles.map(async (name) => {\n const filePath = join(projectDir, name);\n const s = await stat(filePath);\n return { name, filePath, mtime: s.mtime.getTime() };\n })\n );\n return fileInfos\n .filter(\n (r): r is PromiseFulfilledResult<{ name: string; filePath: string; mtime: number }> =>\n r.status === 'fulfilled'\n )\n .map((r) => r.value);\n}\n\nasync function scanClaudeSessions(\n repositoryPath: string,\n limit: number,\n includeWorktrees = false\n): Promise<SessionResult[]> {\n const dirName = claudeEncodePath(repositoryPath);\n const projectsRoot = join(homedir(), '.claude', 'projects');\n\n // Collect files from the exact directory\n const primaryDir = join(projectsRoot, dirName);\n let allFiles = await collectJsonlFiles(primaryDir);\n\n // When includeWorktrees is set, also scan:\n // 1. Directories whose name starts with the encoded repo path (git worktrees, .worktrees)\n // 2. Shep worktree directories (~/.shep/repos/<hash>/wt/*) which use a hash of the repo path\n if (includeWorktrees) {\n try {\n const allDirs = await readdir(projectsRoot);\n\n // Match git-style worktrees (same prefix as repo path)\n const prefixMatches = allDirs.filter((d) => d !== dirName && d.startsWith(dirName));\n\n // Match shep worktrees: compute repo hash → find dirs starting with encoded shep path\n const normalizedRepoPath = repositoryPath.replace(/\\\\/g, '/');\n const repoHash = createHash('sha256').update(normalizedRepoPath).digest('hex').slice(0, 16);\n const shepHome = join(homedir(), '.shep').replace(/\\\\/g, '/');\n const shepWorktreePrefix = claudeEncodePath(join(shepHome, 'repos', repoHash));\n const shepMatches = allDirs.filter(\n (d) => d.startsWith(shepWorktreePrefix) && !prefixMatches.includes(d) && d !== dirName\n );\n\n const worktreeDirs = [...prefixMatches, ...shepMatches];\n const worktreeResults = await Promise.all(\n worktreeDirs.map((d) => collectJsonlFiles(join(projectsRoot, d)))\n );\n for (const files of worktreeResults) {\n allFiles = allFiles.concat(files);\n }\n } catch {\n // projectsRoot doesn't exist — no sessions at all\n }\n }\n\n const valid = allFiles.sort((a, b) => b.mtime - a.mtime).slice(0, limit);\n\n // Parse each file\n const results = await Promise.allSettled(\n valid.map(async (fi) => parseClaudeSession(fi.filePath, fi.name, fi.mtime, repositoryPath))\n );\n\n return results\n .filter((r): r is PromiseFulfilledResult<SessionResult | null> => r.status === 'fulfilled')\n .map((r) => r.value)\n .filter((s): s is SessionResult => s !== null);\n}\n\n/**\n * Read the first N bytes of a file to extract preview and timestamps\n * without loading the entire (potentially multi-MB) session file.\n */\nconst PREVIEW_READ_BYTES = 8_192; // 8KB is enough for first few messages\n\nasync function parseClaudeSession(\n filePath: string,\n fileName: string,\n mtime: number,\n repositoryPath: string\n): Promise<SessionResult | null> {\n const { createReadStream } = await import('node:fs');\n const id = fileName.replace('.jsonl', '');\n\n // Read only the first chunk to extract preview and first timestamp\n let preview: string | null = null;\n let firstTimestamp: string | null = null;\n let messageCount = 0;\n\n const head = await new Promise<string>((resolve) => {\n const chunks: Buffer[] = [];\n let size = 0;\n const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n size += chunk.length;\n });\n stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));\n stream.on('error', () => resolve(''));\n });\n\n if (!head) return null;\n\n const lines = head.split('\\n').filter((l) => l.trim());\n for (const line of lines) {\n try {\n const entry = JSON.parse(line) as {\n type?: string;\n timestamp?: string;\n message?: { role?: string; content?: unknown };\n };\n if (entry.type === 'user' || entry.type === 'assistant') {\n const role = entry.message?.role;\n if (role === 'user' || role === 'assistant') {\n messageCount++;\n if (entry.timestamp) {\n firstTimestamp ??= entry.timestamp;\n }\n if (role === 'user' && preview === null) {\n preview = extractText(entry.message?.content);\n }\n }\n }\n } catch {\n break;\n }\n }\n\n if (messageCount === 0) return null;\n\n // Use mtime as lastMessageAt — avoids reading entire file for last line\n const mtimeIso = new Date(mtime).toISOString();\n return {\n id,\n agentType: 'claude-code',\n preview,\n messageCount,\n firstMessageAt: firstTimestamp,\n lastMessageAt: mtimeIso,\n createdAt: firstTimestamp ?? mtimeIso,\n projectPath: repositoryPath,\n filePath,\n _mtime: mtime,\n };\n}\n\n// ── Cursor session scanner ────────────────────────────────────────────\n\nasync function scanCursorSessions(repositoryPath: string, limit: number): Promise<SessionResult[]> {\n const dirName = cursorEncodePath(repositoryPath);\n const transcriptsDir = join(homedir(), '.cursor', 'projects', dirName, 'agent-transcripts');\n\n let entries: string[];\n try {\n entries = await readdir(transcriptsDir);\n } catch {\n return [];\n }\n\n // Cursor has two session structures:\n // 1. Flat: agent-transcripts/<uuid>.jsonl\n // 2. Nested: agent-transcripts/<uuid>/<uuid>.jsonl\n const fileInfos = await Promise.allSettled(\n entries.map(async (entry) => {\n const entryPath = join(transcriptsDir, entry);\n const s = await stat(entryPath);\n\n if (s.isFile() && entry.endsWith('.jsonl')) {\n // Flat structure\n return { name: entry, filePath: entryPath, mtime: s.mtime.getTime() };\n }\n\n if (s.isDirectory()) {\n // Nested structure — look for <uuid>.jsonl inside\n const jsonlPath = join(entryPath, `${entry}.jsonl`);\n try {\n const jsonlStat = await stat(jsonlPath);\n return {\n name: `${entry}.jsonl`,\n filePath: jsonlPath,\n mtime: jsonlStat.mtime.getTime(),\n };\n } catch {\n return null;\n }\n }\n\n return null;\n })\n );\n\n const valid = fileInfos\n .filter(\n (\n r\n ): r is PromiseFulfilledResult<{\n name: string;\n filePath: string;\n mtime: number;\n } | null> => r.status === 'fulfilled'\n )\n .map((r) => r.value)\n .filter((v): v is { name: string; filePath: string; mtime: number } => v !== null)\n .sort((a, b) => b.mtime - a.mtime)\n .slice(0, limit);\n\n const results = await Promise.allSettled(\n valid.map(async (fi) => parseCursorSession(fi.filePath, fi.name, fi.mtime, repositoryPath))\n );\n\n return results\n .filter((r): r is PromiseFulfilledResult<SessionResult | null> => r.status === 'fulfilled')\n .map((r) => r.value)\n .filter((s): s is SessionResult => s !== null);\n}\n\nasync function parseCursorSession(\n filePath: string,\n fileName: string,\n mtime: number,\n repositoryPath: string\n): Promise<SessionResult | null> {\n const { createReadStream } = await import('node:fs');\n const id = fileName.replace('.jsonl', '');\n\n // Read only the first chunk for preview extraction\n const head = await new Promise<string>((resolve) => {\n const chunks: Buffer[] = [];\n let size = 0;\n const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n size += chunk.length;\n });\n stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));\n stream.on('error', () => resolve(''));\n });\n\n if (!head) return null;\n\n let preview: string | null = null;\n let messageCount = 0;\n\n const lines = head.split('\\n').filter((l) => l.trim());\n for (const line of lines) {\n try {\n const entry = JSON.parse(line) as {\n role?: string;\n message?: { content?: unknown };\n };\n if (entry.role === 'user' || entry.role === 'assistant') {\n messageCount++;\n if (entry.role === 'user' && preview === null) {\n preview = extractText(entry.message?.content);\n }\n }\n } catch {\n break;\n }\n }\n\n if (messageCount === 0) return null;\n\n const mtimeIso = new Date(mtime).toISOString();\n return {\n id,\n agentType: 'cursor',\n preview,\n messageCount,\n firstMessageAt: mtimeIso,\n lastMessageAt: mtimeIso,\n createdAt: mtimeIso,\n projectPath: repositoryPath,\n filePath,\n _mtime: mtime,\n };\n}\n\n// ── Shared helpers ────────────────────────────────────────────────────\n\nfunction extractText(content: unknown): string | null {\n if (typeof content === 'string') return content;\n if (Array.isArray(content)) {\n for (const block of content) {\n if (typeof block === 'object' && block !== null) {\n const b = block as Record<string, unknown>;\n if (b.type === 'text' && typeof b.text === 'string') return b.text;\n }\n }\n }\n return null;\n}\n\n// ── Route handler ─────────────────────────────────────────────────────\n\n/**\n * GET /api/sessions?repositoryPath=<path>&limit=<n>\n *\n * Returns agent sessions from all supported providers (Claude Code, Cursor)\n * filtered by repository path, merged and sorted by recency.\n */\nexport async function GET(request: Request) {\n const url = new URL(request.url);\n const repositoryPath = url.searchParams.get('repositoryPath');\n const limit = parseInt(url.searchParams.get('limit') ?? '10', 10);\n const includeWorktrees = url.searchParams.get('includeWorktrees') === 'true';\n\n if (!repositoryPath?.trim()) {\n return NextResponse.json({ error: 'repositoryPath is required' }, { status: 400 });\n }\n\n try {\n // Scan all providers in parallel\n const [claudeSessions, cursorSessions] = await Promise.all([\n scanClaudeSessions(repositoryPath, limit, includeWorktrees),\n scanCursorSessions(repositoryPath, limit),\n ]);\n\n // Merge and sort by mtime descending, apply limit\n const allSessions = [...claudeSessions, ...cursorSessions]\n .sort((a, b) => b._mtime - a._mtime)\n .slice(0, Math.min(limit, 50));\n\n return NextResponse.json({\n sessions: allSessions.map(({ _mtime, ...s }) => s),\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[API] GET /api/sessions error:', error);\n return NextResponse.json({ error: String(error) }, { status: 500 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/sessions/route\",\n pathname: \"/api/sessions\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/sessions/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/sessions/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"uCCAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA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js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,s)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,s)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,r,s)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,r,s)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,r,s)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},12714,(e,r,s)=>{r.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(e,r,s)=>{r.exports=e.x("node:path",()=>require("node:path"))},60526,(e,r,s)=>{r.exports=e.x("node:os",()=>require("node:os"))},66680,(e,r,s)=>{r.exports=e.x("node:crypto",()=>require("node:crypto"))},6714,e=>{e.v(r=>Promise.all(["server/chunks/[externals]_node:fs_ddf6f167._.js"].map(r=>e.l(r))).then(()=>r(2157)))}];
2
-
3
- //# sourceMappingURL=%5Bexternals%5D__448264a3._.js.map