@shepai/cli 1.86.0 → 1.86.1

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 (165) hide show
  1. package/dist/src/presentation/web/app/api/attachments/upload-from-path/route.d.ts +3 -0
  2. package/dist/src/presentation/web/app/api/attachments/upload-from-path/route.d.ts.map +1 -0
  3. package/dist/src/presentation/web/app/api/attachments/upload-from-path/route.js +120 -0
  4. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  5. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +38 -13
  6. package/dist/tsconfig.build.tsbuildinfo +1 -1
  7. package/package.json +1 -1
  8. package/web/.next/BUILD_ID +1 -1
  9. package/web/.next/app-path-routes-manifest.json +1 -0
  10. package/web/.next/build-manifest.json +2 -2
  11. package/web/.next/fallback-build-manifest.json +2 -2
  12. package/web/.next/prerender-manifest.json +3 -3
  13. package/web/.next/required-server-files.js +1 -1
  14. package/web/.next/required-server-files.json +1 -1
  15. package/web/.next/routes-manifest.json +6 -0
  16. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +18 -18
  17. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  18. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  19. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  20. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +21 -21
  21. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
  22. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  23. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  24. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
  25. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
  26. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  27. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +18 -18
  29. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  30. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  31. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  32. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +21 -21
  33. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
  34. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  35. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  36. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +14 -14
  37. package/web/.next/server/app/(dashboard)/page.js +1 -1
  38. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  39. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  40. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
  41. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
  42. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  43. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  44. package/web/.next/server/app/_global-error/page.js +1 -1
  45. package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  46. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  47. package/web/.next/server/app/_global-error.html +2 -2
  48. package/web/.next/server/app/_global-error.rsc +1 -1
  49. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  50. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  51. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  52. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  53. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  54. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  55. package/web/.next/server/app/_not-found/page.js +1 -1
  56. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  57. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  58. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  59. package/web/.next/server/app/api/attachments/upload-from-path/route/app-paths-manifest.json +3 -0
  60. package/web/.next/server/app/api/attachments/upload-from-path/route/build-manifest.json +11 -0
  61. package/web/.next/server/app/api/attachments/upload-from-path/route/server-reference-manifest.json +4 -0
  62. package/web/.next/server/app/api/attachments/upload-from-path/route.js +7 -0
  63. package/web/.next/server/app/api/attachments/upload-from-path/route.js.map +5 -0
  64. package/web/.next/server/app/api/attachments/upload-from-path/route.js.nft.json +1 -0
  65. package/web/.next/server/app/api/attachments/upload-from-path/route_client-reference-manifest.js +2 -0
  66. package/web/.next/server/app/api/feature-logs/route.js +1 -1
  67. package/web/.next/server/app/api/feature-logs/route.js.nft.json +1 -1
  68. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  69. package/web/.next/server/app/settings/page.js +1 -1
  70. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  71. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  72. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  73. package/web/.next/server/app/skills/page.js +1 -1
  74. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  75. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  77. package/web/.next/server/app/tools/page.js +1 -1
  78. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  79. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  81. package/web/.next/server/app/version/page.js +1 -1
  82. package/web/.next/server/app/version/page.js.nft.json +1 -1
  83. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  84. package/web/.next/server/app-paths-manifest.json +1 -0
  85. package/web/.next/server/chunks/8ba4b_server_app_api_attachments_upload-from-path_route_actions_05020a44.js +3 -0
  86. package/web/.next/server/chunks/8ba4b_server_app_api_attachments_upload-from-path_route_actions_05020a44.js.map +1 -0
  87. package/web/.next/server/chunks/[root-of-the-server]__a5879003._.js +3 -0
  88. package/web/.next/server/chunks/[root-of-the-server]__a5879003._.js.map +1 -0
  89. package/web/.next/server/chunks/{[root-of-the-server]__52c318d1._.js → [root-of-the-server]__d8037e14._.js} +2 -2
  90. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  91. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  92. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js +1 -1
  93. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js.map +1 -1
  94. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js +1 -1
  95. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js.map +1 -1
  96. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  97. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  98. package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js +1 -1
  99. package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js.map +1 -1
  100. package/web/.next/server/chunks/ssr/{[root-of-the-server]__8d9536c4._.js → [root-of-the-server]__248ee887._.js} +2 -2
  101. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  102. package/web/.next/server/chunks/ssr/[root-of-the-server]__4af0afe0._.js +3 -0
  103. package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js +1 -1
  104. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
  105. package/web/.next/server/chunks/ssr/{[root-of-the-server]__f8210f45._.js → [root-of-the-server]__9bc1434f._.js} +2 -2
  106. package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js +1 -1
  107. package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js.map +1 -1
  108. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
  109. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  110. package/web/.next/server/chunks/ssr/{[root-of-the-server]__f1a05100._.js → [root-of-the-server]__b062b383._.js} +2 -2
  111. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js +1 -1
  112. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js.map +1 -1
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js +2 -2
  114. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  115. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  117. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  118. package/web/.next/server/chunks/ssr/{_a2ec151c._.js → _61480424._.js} +2 -2
  119. package/web/.next/server/chunks/ssr/{_a2ec151c._.js.map → _61480424._.js.map} +1 -1
  120. package/web/.next/server/chunks/ssr/_752e01fd._.js +1 -1
  121. package/web/.next/server/chunks/ssr/_752e01fd._.js.map +1 -1
  122. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  123. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  124. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  125. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  126. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  127. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  128. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js +1 -1
  129. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js.map +1 -1
  130. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  131. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  132. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  133. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  134. package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js +2 -2
  135. package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js.map +1 -1
  136. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  137. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +1 -1
  138. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  139. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js.map +1 -1
  140. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  141. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js +2 -2
  143. package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js.map +1 -1
  144. package/web/.next/server/pages/500.html +2 -2
  145. package/web/.next/server/server-reference-manifest.js +1 -1
  146. package/web/.next/server/server-reference-manifest.json +28 -28
  147. package/web/.next/static/chunks/{e49abd7c0c1cdef2.js → 0b3852464455cb56.js} +1 -1
  148. package/web/.next/static/chunks/{8b59757e9f52e364.js → 177579b39fd0f63a.js} +1 -1
  149. package/web/.next/static/chunks/{eafcdd214c540495.js → 866566643c6aaecf.js} +1 -1
  150. package/web/.next/static/chunks/{ba99f8c298491782.js → 8d82ff1402dcf377.js} +1 -1
  151. package/web/.next/static/chunks/{c2e2e1720b4f9a1a.js → 9d59d178a1e154b2.js} +1 -1
  152. package/web/.next/static/chunks/{673af06602f590f0.js → c7a4303d3cf08477.js} +1 -1
  153. package/web/.next/static/chunks/{20e5c07abd2699c2.js → dd6c69087923da49.js} +2 -2
  154. package/web/.next/static/chunks/{c481a0ab2ddddbf4.js → dd6cd59c8f439583.js} +1 -1
  155. package/web/.next/static/chunks/{c267885c32e4091c.js → e1edce9ef55b5824.js} +1 -1
  156. package/web/.next/static/chunks/{98b1c6b413aeb539.js → f46a0078f2ee9c44.js} +1 -1
  157. package/web/.next/server/chunks/ssr/[root-of-the-server]__b65f78cf._.js +0 -3
  158. /package/web/.next/server/chunks/{[root-of-the-server]__52c318d1._.js.map → [root-of-the-server]__d8037e14._.js.map} +0 -0
  159. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__8d9536c4._.js.map → [root-of-the-server]__248ee887._.js.map} +0 -0
  160. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__b65f78cf._.js.map → [root-of-the-server]__4af0afe0._.js.map} +0 -0
  161. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__f8210f45._.js.map → [root-of-the-server]__9bc1434f._.js.map} +0 -0
  162. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__f1a05100._.js.map → [root-of-the-server]__b062b383._.js.map} +0 -0
  163. /package/web/.next/static/{VCU_mY2u0y_7bLsvmLjyS → T8HBuz_VR2eZQbNRNSohp}/_buildManifest.js +0 -0
  164. /package/web/.next/static/{VCU_mY2u0y_7bLsvmLjyS → T8HBuz_VR2eZQbNRNSohp}/_clientMiddlewareManifest.json +0 -0
  165. /package/web/.next/static/{VCU_mY2u0y_7bLsvmLjyS → T8HBuz_VR2eZQbNRNSohp}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(20314),n=e.i(79054),a=e.i(87889),o=e.i(3645);let l=(0,o.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var r=e.i(23925);let i=(0,o.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 s=e.i(38573),d=e.i(49228);let c=(0,o.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),u=(0,o.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),p=(0,o.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),h=(0,o.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var m=e.i(61569),m=m,f=e.i(3214),g=e.i(30702);let x=(0,o.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var v=e.i(60112),w=e.i(31777),b=e.i(41957),y=e.i(98127),j=e.i(35364),k=e.i(51911),C=e.i(2828),S=e.i(26036),N=e.i(27069),I=e.i(91967),P=e.i(87342),M=e.i(5978),E=e.i(22528),T=e.i(66033),A=e.i(53532),R=e.i(41687),D=e.i(56720),L=e.i(13123),F=e.i(52740),H=e.i(39979),B=e.i(87620),V=e.i(86874),_=e.i(29297),O=e.i(36589),W=e.i(5192),z=e.i(23405),U=e.i(1693),K=e.i(73772),G=e.i(13044),q=[" ","Enter","ArrowUp","ArrowDown"],Y=[" ","Enter"],Z="Select",[Q,X,$]=(0,P.createCollection)(Z),[J,ee]=(0,E.createContextScope)(Z,[$,F.createPopperScope]),et=(0,F.createPopperScope)(),[en,ea]=J(Z),[eo,el]=J(Z),er=e=>{let{__scopeSelect:a,children:o,open:l,defaultOpen:r,onOpenChange:i,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:h,disabled:m,required:f,form:g}=e,x=et(a),[v,w]=n.useState(null),[b,y]=n.useState(null),[j,k]=n.useState(!1),C=(0,T.useDirection)(u),[S,N]=(0,O.useControllableState)({prop:l,defaultProp:r??!1,onChange:i,caller:Z}),[I,P]=(0,O.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:Z}),M=n.useRef(null),E=!v||g||!!v.closest("form"),[A,R]=n.useState(new Set),D=Array.from(A).map(e=>e.props.value).join(";");return(0,t.jsx)(F.Root,{...x,children:(0,t.jsxs)(en,{required:f,scope:a,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:j,onValueNodeHasChildrenChange:k,contentId:(0,L.useId)(),value:I,onValueChange:P,open:S,onOpenChange:N,dir:C,triggerPointerDownPosRef:M,disabled:m,children:[(0,t.jsx)(Q.Provider,{scope:a,children:(0,t.jsx)(eo,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{R(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{R(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:o})}),E?(0,t.jsxs)(eq,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:h,value:I,onChange:e=>P(e.target.value),disabled:m,form:g,children:[void 0===I?(0,t.jsx)("option",{value:""}):null,Array.from(A)]},D):null]})})};er.displayName=Z;var ei="SelectTrigger",es=n.forwardRef((e,a)=>{let{__scopeSelect:o,disabled:l=!1,...r}=e,i=et(o),s=ea(ei,o),d=s.disabled||l,c=(0,M.useComposedRefs)(a,s.onTriggerChange),u=X(o),p=n.useRef("touch"),[h,m,f]=eZ(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),a=eQ(t,e,n);void 0!==a&&s.onValueChange(a.value)}),g=e=>{d||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(F.Anchor,{asChild:!0,...i,children:(0,t.jsx)(B.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":eY(s.value)?"":void 0,...r,ref:c,onClick:(0,I.composeEventHandlers)(r.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,I.composeEventHandlers)(r.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,I.composeEventHandlers)(r.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),(!t||" "!==e.key)&&q.includes(e.key)&&(g(),e.preventDefault())})})})});es.displayName=ei;var ed="SelectValue",ec=n.forwardRef((e,n)=>{let{__scopeSelect:a,className:o,style:l,children:r,placeholder:i="",...s}=e,d=ea(ed,a),{onValueNodeHasChildrenChange:c}=d,u=void 0!==r,p=(0,M.useComposedRefs)(n,d.onValueNodeChange);return(0,W.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(B.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eY(d.value)?(0,t.jsx)(t.Fragment,{children:i}):r})});ec.displayName=ed;var eu=n.forwardRef((e,n)=>{let{__scopeSelect:a,children:o,...l}=e;return(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...l,ref:n,children:o||"▼"})});eu.displayName="SelectIcon";var ep=e=>(0,t.jsx)(H.Portal,{asChild:!0,...e});ep.displayName="SelectPortal";var eh="SelectContent",em=n.forwardRef((e,a)=>{let o=ea(eh,e.__scopeSelect),[l,r]=n.useState();return((0,W.useLayoutEffect)(()=>{r(new DocumentFragment)},[]),o.open)?(0,t.jsx)(ev,{...e,ref:a}):l?S.createPortal((0,t.jsx)(ef,{scope:e.__scopeSelect,children:(0,t.jsx)(Q.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),l):null});em.displayName=eh;var[ef,eg]=J(eh),ex=(0,V.createSlot)("SelectContent.RemoveScroll"),ev=n.forwardRef((e,a)=>{let{__scopeSelect:o,position:l="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:m,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...w}=e,b=ea(eh,o),[y,j]=n.useState(null),[k,C]=n.useState(null),S=(0,M.useComposedRefs)(a,e=>j(e)),[N,P]=n.useState(null),[E,T]=n.useState(null),L=X(o),[F,H]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,K.hideOthers)(y)},[y]),(0,R.useFocusGuards)();let V=n.useCallback(e=>{let[t,...n]=L().map(e=>e.ref.current),[a]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(n?.scrollIntoView({block:"nearest"}),n===t&&k&&(k.scrollTop=0),n===a&&k&&(k.scrollTop=k.scrollHeight),n?.focus(),document.activeElement!==o))return},[L,k]),_=n.useCallback(()=>V([N,y]),[V,N,y]);n.useEffect(()=>{F&&_()},[F,_]);let{onOpenChange:O,triggerPointerDownPosRef:W}=b;n.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(W.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(W.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||O(!1),document.removeEventListener("pointermove",t),W.current=null};return null!==W.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,W]),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[z,U]=eZ(e=>{let t=L().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),a=eQ(t,e,n);a&&setTimeout(()=>a.ref.current.focus())}),q=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==b.value&&b.value===t||a)&&(P(e),a&&(B.current=!0))},[b.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==b.value&&b.value===t||a)&&T(e)},[b.value]),Q="popper"===l?eb:ew,$=Q===eb?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:m,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(ef,{scope:o,content:y,viewport:k,onViewportChange:C,itemRefCallback:q,selectedItem:N,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:E,position:l,isPositioned:F,searchRef:z,children:(0,t.jsx)(G.RemoveScroll,{as:ex,allowPinchZoom:!0,children:(0,t.jsx)(D.FocusScope,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,I.composeEventHandlers)(r,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(A.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,t.jsx)(Q,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...w,...$,onPlaced:()=>H(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:(0,I.composeEventHandlers)(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=L().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,a=t.indexOf(n);t=t.slice(a+1)}setTimeout(()=>V(t)),e.preventDefault()}})})})})})})});ev.displayName="SelectContentImpl";var ew=n.forwardRef((e,a)=>{let{__scopeSelect:o,onPlaced:l,...r}=e,i=ea(eh,o),s=eg(eh,o),[d,c]=n.useState(null),[u,p]=n.useState(null),h=(0,M.useComposedRefs)(a,e=>p(e)),m=X(o),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=s,y=n.useCallback(()=>{if(i.trigger&&i.valueNode&&d&&u&&x&&v&&w){let e=i.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),a=w.getBoundingClientRect();if("rtl"!==i.dir){let o=a.left-t.left,l=n.left-o,r=e.left-l,i=e.width+r,s=Math.max(i,t.width),c=window.innerWidth-10,u=(0,N.clamp)(l,[10,Math.max(10,c-s)]);d.style.minWidth=i+"px",d.style.left=u+"px"}else{let o=t.right-a.right,l=window.innerWidth-n.right-o,r=window.innerWidth-e.right-l,i=e.width+r,s=Math.max(i,t.width),c=window.innerWidth-10,u=(0,N.clamp)(l,[10,Math.max(10,c-s)]);d.style.minWidth=i+"px",d.style.right=u+"px"}let o=m(),r=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),h=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),b=p+h+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,b),j=window.getComputedStyle(x),k=parseInt(j.paddingTop,10),C=parseInt(j.paddingBottom,10),S=e.top+e.height/2-10,I=v.offsetHeight/2,P=p+h+(v.offsetTop+I);if(P<=S){let e=o.length>0&&v===o[o.length-1].ref.current;d.style.bottom="0px";let t=Math.max(r-S,I+(e?C:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=P+t+"px"}else{let e=o.length>0&&v===o[0].ref.current;d.style.top="0px";let t=Math.max(S,p+x.offsetTop+(e?k:0)+I);d.style.height=t+(b-P)+"px",x.scrollTop=P-S+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=r+"px",l?.(),requestAnimationFrame(()=>f.current=!0)}},[m,i.trigger,i.valueNode,d,u,x,v,w,i.dir,l]);(0,W.useLayoutEffect)(()=>y(),[y]);let[j,k]=n.useState();(0,W.useLayoutEffect)(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);let C=n.useCallback(e=>{e&&!0===g.current&&(y(),b?.(),g.current=!1)},[y,b]);return(0,t.jsx)(ey,{scope:o,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:C,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,t.jsx)(B.Primitive.div,{...r,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ew.displayName="SelectItemAlignedPosition";var eb=n.forwardRef((e,n)=>{let{__scopeSelect:a,align:o="start",collisionPadding:l=10,...r}=e,i=et(a);return(0,t.jsx)(F.Content,{...i,...r,ref:n,align:o,collisionPadding:l,style:{boxSizing:"border-box",...r.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)"}})});eb.displayName="SelectPopperPosition";var[ey,ej]=J(eh,{}),ek="SelectViewport",eC=n.forwardRef((e,a)=>{let{__scopeSelect:o,nonce:l,...r}=e,i=eg(ek,o),s=ej(ek,o),d=(0,M.useComposedRefs)(a,i.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:l}),(0,t.jsx)(Q.Slot,{scope:o,children:(0,t.jsx)(B.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:(0,I.composeEventHandlers)(r.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:a}=s;if(a?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let a=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<a){let l=o+e,r=Math.min(a,l),i=l-r;n.style.height=r+"px","0px"===n.style.bottom&&(t.scrollTop=i>0?i:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});eC.displayName=ek;var eS="SelectGroup",[eN,eI]=J(eS),eP=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=(0,L.useId)();return(0,t.jsx)(eN,{scope:a,id:l,children:(0,t.jsx)(B.Primitive.div,{role:"group","aria-labelledby":l,...o,ref:n})})});eP.displayName=eS;var eM="SelectLabel",eE=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=eI(eM,a);return(0,t.jsx)(B.Primitive.div,{id:l.id,...o,ref:n})});eE.displayName=eM;var eT="SelectItem",[eA,eR]=J(eT),eD=n.forwardRef((e,a)=>{let{__scopeSelect:o,value:l,disabled:r=!1,textValue:i,...s}=e,d=ea(eT,o),c=eg(eT,o),u=d.value===l,[p,h]=n.useState(i??""),[m,f]=n.useState(!1),g=(0,M.useComposedRefs)(a,e=>c.itemRefCallback?.(e,l,r)),x=(0,L.useId)(),v=n.useRef("touch"),w=()=>{r||(d.onValueChange(l),d.onOpenChange(!1))};if(""===l)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)(eA,{scope:o,value:l,disabled:r,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{h(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(Q.ItemSlot,{scope:o,value:l,disabled:r,textValue:p,children:(0,t.jsx)(B.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:g,onFocus:(0,I.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,I.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,I.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:(0,I.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:(0,I.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,I.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,r?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,I.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,I.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(Y.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});eD.displayName=eT;var eL="SelectItemText",eF=n.forwardRef((e,a)=>{let{__scopeSelect:o,className:l,style:r,...i}=e,s=ea(eL,o),d=eg(eL,o),c=eR(eL,o),u=el(eL,o),[p,h]=n.useState(null),m=(0,M.useComposedRefs)(a,e=>h(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,W.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Primitive.span,{id:c.textId,...i,ref:m}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?S.createPortal(i.children,s.valueNode):null]})});eF.displayName=eL;var eH="SelectItemIndicator",eB=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e;return eR(eH,a).isSelected?(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...o,ref:n}):null});eB.displayName=eH;var eV="SelectScrollUpButton",e_=n.forwardRef((e,a)=>{let o=eg(eV,e.__scopeSelect),l=ej(eV,e.__scopeSelect),[r,i]=n.useState(!1),s=(0,M.useComposedRefs)(a,l.onScrollButtonChange);return(0,W.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){i(t.scrollTop>0)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),r?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});e_.displayName=eV;var eO="SelectScrollDownButton",eW=n.forwardRef((e,a)=>{let o=eg(eO,e.__scopeSelect),l=ej(eO,e.__scopeSelect),[r,i]=n.useState(!1),s=(0,M.useComposedRefs)(a,l.onScrollButtonChange);return(0,W.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)<e)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),r?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eW.displayName=eO;var ez=n.forwardRef((e,a)=>{let{__scopeSelect:o,onAutoScroll:l,...r}=e,i=eg("SelectScrollButton",o),s=n.useRef(null),d=X(o),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,W.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(B.Primitive.div,{"aria-hidden":!0,...r,ref:a,style:{flexShrink:0,...r.style},onPointerDown:(0,I.composeEventHandlers)(r.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(l,50))}),onPointerMove:(0,I.composeEventHandlers)(r.onPointerMove,()=>{i.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(l,50))}),onPointerLeave:(0,I.composeEventHandlers)(r.onPointerLeave,()=>{c()})})}),eU=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e;return(0,t.jsx)(B.Primitive.div,{"aria-hidden":!0,...o,ref:n})});eU.displayName="SelectSeparator";var eK="SelectArrow",eG=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=et(a),r=ea(eK,a),i=eg(eK,a);return r.open&&"popper"===i.position?(0,t.jsx)(F.Arrow,{...l,...o,ref:n}):null});eG.displayName=eK;var eq=n.forwardRef(({__scopeSelect:e,value:a,...o},l)=>{let r=n.useRef(null),i=(0,M.useComposedRefs)(l,r),s=(0,z.usePrevious)(a);return n.useEffect(()=>{let e=r.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==a&&t){let n=new Event("change",{bubbles:!0});t.call(e,a),e.dispatchEvent(n)}},[s,a]),(0,t.jsx)(B.Primitive.select,{...o,style:{...U.VISUALLY_HIDDEN_STYLES,...o.style},ref:i,defaultValue:a})});function eY(e){return""===e||void 0===e}function eZ(e){let t=(0,_.useCallbackRef)(e),a=n.useRef(""),o=n.useRef(0),l=n.useCallback(e=>{let n=a.current+e;t(n),function e(t){a.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),r=n.useCallback(()=>{a.current="",window.clearTimeout(o.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),[a,l,r]}function eQ(e,t,n){var a,o;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,r=n?e.indexOf(n):-1,i=(a=e,o=Math.max(r,0),a.map((e,t)=>a[(o+t)%a.length]));1===l.length&&(i=i.filter(e=>e!==n));let s=i.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return s!==n?s:void 0}eq.displayName="SelectBubbleInput",e.s(["Arrow",()=>eG,"Content",()=>em,"Group",()=>eP,"Icon",()=>eu,"Item",()=>eD,"ItemIndicator",()=>eB,"ItemText",()=>eF,"Label",()=>eE,"Portal",()=>ep,"Root",()=>er,"ScrollDownButton",()=>eW,"ScrollUpButton",()=>e_,"Select",()=>er,"SelectArrow",()=>eG,"SelectContent",()=>em,"SelectGroup",()=>eP,"SelectIcon",()=>eu,"SelectItem",()=>eD,"SelectItemIndicator",()=>eB,"SelectItemText",()=>eF,"SelectLabel",()=>eE,"SelectPortal",()=>ep,"SelectScrollDownButton",()=>eW,"SelectScrollUpButton",()=>e_,"SelectSeparator",()=>eU,"SelectTrigger",()=>es,"SelectValue",()=>ec,"SelectViewport",()=>eC,"Separator",()=>eU,"Trigger",()=>es,"Value",()=>ec,"Viewport",()=>eC,"createSelectScope",()=>ee],83830);var eX=e.i(83830),eX=eX,e$=e.i(99105);let eJ=(0,o.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),e0=eX.Root;eX.Group;let e1=eX.Value,e2=n.forwardRef(({className:e,children:n,...a},o)=>(0,t.jsxs)(eX.Trigger,{ref:o,className:(0,w.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[n,(0,t.jsx)(eX.Icon,{asChild:!0,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));e2.displayName=eX.Trigger.displayName;let e5=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.ScrollUpButton,{ref:a,className:(0,w.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eJ,{className:"h-4 w-4"})}));e5.displayName=eX.ScrollUpButton.displayName;let e3=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.ScrollDownButton,{ref:a,className:(0,w.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4"})}));e3.displayName=eX.ScrollDownButton.displayName;let e4=n.forwardRef(({className:e,children:n,position:a="popper",...o},l)=>(0,t.jsx)(eX.Portal,{children:(0,t.jsxs)(eX.Content,{ref:l,className:(0,w.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...o,children:[(0,t.jsx)(e5,{}),(0,t.jsx)(eX.Viewport,{className:(0,w.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e3,{})]})}));e4.displayName=eX.Content.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.Label,{ref:a,className:(0,w.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=eX.Label.displayName;let e8=n.forwardRef(({className:e,children:n,...a},o)=>(0,t.jsxs)(eX.Item,{ref:o,className:(0,w.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)(eX.ItemIndicator,{children:(0,t.jsx)(r.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eX.ItemText,{children:n})]}));e8.displayName=eX.Item.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.Separator,{ref:a,className:(0,w.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=eX.Separator.displayName;var e6=e.i(21023);let e9=(0,e6.createServerReference)("40a592685354db81ba1b7feeb905125a80fb731561",e6.callServer,void 0,e6.findSourceMapURL,"updateSettingsAction");var e7=e.i(17406),te=e.i(98804),tt=e.i(93752),tt=tt,tn=e.i(83902);function ta(e){return(0,t.jsx)(tt.default,{className:(0,w.cn)("h-4 w-4",e.className),...e})}function to({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function tl({className:e}){return(0,t.jsx)(te.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function ti({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function ts({className:e,...n}){return(0,t.jsx)(tn.Rocket,{className:(0,w.cn)("h-4 w-4",e),...n})}to.displayName="VsCodeIcon",tl.displayName="CursorEditorIcon",tr.displayName="WindsurfIcon",ti.displayName="ZedIcon",ts.displayName="AntigravityIcon";let td={vscode:to,cursor:tl,windsurf:tr,zed:ti,antigravity:ts};var tc=e.i(41413);let tu=[{value:e7.AgentAuthMethod.Session,label:"Session"},{value:e7.AgentAuthMethod.Token,label:"Token"}],tp=[{value:e7.EditorType.VsCode,label:"VS Code"},{value:e7.EditorType.Cursor,label:"Cursor"},{value:e7.EditorType.Windsurf,label:"Windsurf"},{value:e7.EditorType.Zed,label:"Zed"},{value:e7.EditorType.Antigravity,label:"Antigravity"}],th=[{id:"agent",label:"Agent",icon:i},{id:"environment",label:"Environment",icon:s.Terminal},{id:"workflow",label:"Workflow",icon:d.GitBranch},{id:"ci",label:"CI",icon:c},{id:"notifications",label:"Notifications",icon:u},{id:"feature-flags",label:"Flags",icon:p},{id:"database",label:"Database",icon:h}];function tm({label:e,description:n,htmlFor:a,children:o}){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)(b.Label,{htmlFor:a,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),n?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:n}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:o})]})}function tf({label:e,description:n,id:a,testId:o,checked:l,onChange:r}){return(0,t.jsx)(tm,{label:e,description:n,htmlFor:a,children:(0,t.jsx)(k.Switch,{id:a,"data-testid":o,checked:l,onCheckedChange:r,className:"cursor-pointer"})})}function tg({icon:e,title:n,description:a,badge:o,testId:l,children:r}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":l,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}),o?(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:o}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:a})]}),(0,t.jsx)("div",{className:"px-4",children:r})]})}function tx({id:e,testId:n,value:a,onChange:o,onBlur:l,placeholder:r,min:i=1,max:s,step:d=1,suffix:c}){let u=""===a?void 0:parseInt(a,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{o(String(Math.max(i,(u??parseInt(r,10))-d)))},onMouseUp:l,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)(m.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":n,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:a,placeholder:r,onChange:e=>{o(e.target.value.replace(/[^0-9]/g,""))},onBlur:l,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(r,10),o(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:l,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)(f.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function tv({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 tw({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)(g.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function tb({settings:e,shepHome:o,dbFileSize:m}){let{showSaving:f,showSaved:g,save:b}=function(){let[e,t]=(0,n.useTransition)(),[a,o]=(0,n.useState)(!1),[l,r]=(0,n.useState)(!1),i=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!a&&(o(!0),s.current=!1,i.current=setTimeout(()=>{i.current=null,s.current&&(o(!1),r(!0),setTimeout(()=>r(!1),2e3))},350)),!e&&a&&(s.current=!0,i.current||(o(!1),r(!0),setTimeout(()=>r(!1),2e3)))},[e,a]),{showSaving:a,showSaved:l,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e9(e);t.success||v.toast.error(t.error??"Failed to save settings")})},[t])}}(),k=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1},[S,N]=(0,n.useState)(e.agent.type),I=e.agent.authMethod,[P,M]=(0,n.useState)(e.agent.token??""),[E,T]=(0,n.useState)(!1),[A,R]=(0,n.useState)(e.environment.defaultEditor),D=e.environment.shellPreference,[L,F]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[H,B]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[V,_]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[O,W]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[z,U]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[K,G]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[q,Y]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[Z,Q]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[X,$]=(0,n.useState)(e.notifications.inApp.enabled),[J,ee]=(0,n.useState)(e.notifications.browser.enabled),[et,en]=(0,n.useState)(e.notifications.desktop.enabled),[ea,eo]=(0,n.useState)({...e.notifications.events}),[el,er]=(0,n.useState)({...k}),ei=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",es=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",ed=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"";function ec(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eu(e={}){let t=ec(e.ciTimeout??q);return{workflow:{openPrOnImplementationComplete:e.openPr??L,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??H,allowPrd:e.allowPrd??V,allowPlan:e.allowPlan??O,allowMerge:e.allowMerge??z},ciMaxFixAttempts:ec(e.ciMaxFix??K),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:ec(e.ciLogMax??Z)}}}function ep(e={}){return{notifications:{inApp:{enabled:e.inApp??X},browser:{enabled:e.browser??J},desktop:{enabled:e.desktop??et},events:e.events??ea}}}let[eh,em]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=th.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&&em(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let ef=(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)(x,{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,w.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",f?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,w.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",g&&!f?"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:th.map(e=>{let n=e.icon,a=eh===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>ef(e.id),className:(0,w.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",a?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(n,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tg,{icon:i,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:[(0,t.jsx)(tm,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(tc.AgentModelPicker,{initialAgentType:S,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>N(e),className:"w-55"})}),(0,t.jsx)(tm,{label:"Authentication",description:"How the agent authenticates",htmlFor:"auth-method",children:(0,t.jsx)(C.TooltipProvider,{children:(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsxs)(e0,{value:I,disabled:!0,children:[(0,t.jsx)(e2,{id:"auth-method","data-testid":"auth-method-select",className:"w-55 cursor-not-allowed text-xs opacity-60",children:(0,t.jsx)(e1,{})}),(0,t.jsx)(e4,{children:tu.map(e=>(0,t.jsx)(e8,{value:e.value,children:e.label},e.value))})]})})}),(0,t.jsx)(C.TooltipContent,{children:"Coming soon"})]})})}),I===e7.AgentAuthMethod.Token&&(0,t.jsx)(tm,{label:"API Token",htmlFor:"agent-token",children:(0,t.jsxs)("div",{className:"relative w-45",children:[(0,t.jsx)(y.Input,{id:"agent-token","data-testid":"agent-token-input",type:E?"text":"password",value:P,onChange:e=>M(e.target.value),onBlur:()=>{P!==(e.agent.token??"")&&b(function(e={}){let t={type:S,authMethod:I,...e},n={type:t.type,authMethod:t.authMethod};return t.authMethod===e7.AgentAuthMethod.Token&&(n.token=e.token??P),{agent:n}}({token:P}))},placeholder:"Enter token",className:"pr-8"}),(0,t.jsx)(j.Button,{type:"button",variant:"ghost",size:"sm",className:"absolute top-0 right-0 h-full px-2 hover:bg-transparent",onClick:()=>T(!E),"data-testid":"toggle-token-visibility","aria-label":E?"Hide token":"Show token",children:E?(0,t.jsx)(l,{className:"h-3 w-3"}):(0,t.jsx)(a.Eye,{className:"h-3 w-3"})})]})})]}),(0,t.jsx)(tw,{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.jsx)(tg,{icon:s.Terminal,title:"Environment",description:"Editor and shell preferences",testId:"environment-settings-section",children:(0,t.jsx)(tm,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(e0,{value:A,onValueChange:e=>{R(e),b({environment:{defaultEditor:e,shellPreference:D}})},children:[(0,t.jsx)(e2,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(e1,{})}),(0,t.jsx)(e4,{children:tp.map(e=>{var n;let a=(n=e.value)&&n in td?td[n]:ta;return(0,t.jsx)(e8,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(a,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})})}),(0,t.jsx)(tw,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor is used when opening files for review or editing during the development workflow."})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tg,{icon:d.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(tf,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:V,onChange:e=>{_(e),b(eu({allowPrd:e}))}}),(0,t.jsx)(tf,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:O,onChange:e=>{W(e),b(eu({allowPlan:e}))}}),(0,t.jsx)(tf,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:z,onChange:e=>{U(e),b(eu({allowMerge:e}))}}),(0,t.jsx)(tf,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:H,onChange:e=>{B(e),b(eu({pushOnComplete:e}))}}),(0,t.jsx)(tf,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:L,onChange:e=>{F(e),b(eu({openPr:e}))}})]}),(0,t.jsx)(tw,{links:[{label:"Approval gates",href:"https://github.com/shep-ai/cli/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:"Push & PR flags",href:"https://github.com/shep-ai/cli/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:"Control how autonomous each feature run is. Auto-approve skips the human review pause at each phase. Push and PR options control what happens after successful implementation."})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tg,{icon:c,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tm,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(tx,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:K,onChange:G,onBlur:()=>{K!==ei&&b(eu({ciMaxFix:K}))},min:1,max:10})}),(0,t.jsx)(tm,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(tx,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:q,onChange:Y,onBlur:()=>{q!==es&&b(eu({ciTimeout:q}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tm,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(tx,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:Z,onChange:Q,onBlur:()=>{Z!==ed&&b(eu({ciLogMax:Z}))},min:1e3,step:5e3,suffix:"chars"})})]}),(0,t.jsx)(tw,{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-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tg,{icon:u,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(tv,{children:"Channels"}),(0,t.jsx)(tf,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:X,onChange:e=>{$(e),b(ep({inApp:e}))}}),(0,t.jsx)(tf,{label:"Browser",description:"Push notifications via the browser",id:"notif-browser",testId:"switch-browser",checked:J,onChange:e=>{ee(e),b(ep({browser:e}))}}),(0,t.jsx)(tf,{label:"Desktop",description:"Native OS notifications",id:"notif-desktop",testId:"switch-desktop",checked:et,onChange:e=>{en(e),b(ep({desktop:e}))}}),(0,t.jsx)(tv,{children:"Agent Events"}),(0,t.jsx)(tf,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:ea.agentStarted,onChange:e=>{let t={...ea,agentStarted:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:ea.phaseCompleted,onChange:e=>{let t={...ea,phaseCompleted:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:ea.waitingApproval,onChange:e=>{let t={...ea,waitingApproval:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:ea.agentCompleted,onChange:e=>{let t={...ea,agentCompleted:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:ea.agentFailed,onChange:e=>{let t={...ea,agentFailed:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tv,{children:"Pull Request Events"}),(0,t.jsx)(tf,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:ea.prMerged,onChange:e=>{let t={...ea,prMerged:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:ea.prClosed,onChange:e=>{let t={...ea,prClosed:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:ea.prChecksPassed,onChange:e=>{let t={...ea,prChecksPassed:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:ea.prChecksFailed,onChange:e=>{let t={...ea,prChecksFailed:e};eo(t),b(ep({events:t}))}})]}),(0,t.jsx)(tw,{links:[{label:"Notification system",href:"https://github.com/shep-ai/cli/blob/main/specs/021-agent-notifications/spec.yaml"}],children:"Three notification channels keep you in the loop: in-app toasts, browser push notifications, and native desktop alerts. Fine-tune which agent lifecycle events trigger a notification."})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tg,{icon:p,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tf,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:el.skills,onChange:e=>{let t={...el,skills:e};er(t),b({featureFlags:t})}}),(0,t.jsx)(tf,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:el.envDeploy,onChange:e=>{let t={...el,envDeploy:e};er(t),b({featureFlags:t})}}),(0,t.jsx)(tf,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:el.debug,onChange:e=>{let t={...el,debug:e};er(t),b({featureFlags:t})}})]}),(0,t.jsx)(tw,{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)(tg,{icon:h,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tm,{label:"Location",description:"Path to the local SQLite database",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shep-home-path",children:o})}),(0,t.jsx)(tm,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:m})})]}),(0,t.jsx)(tw,{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",()=>tb],41952)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(20314),n=e.i(79054),a=e.i(87889),o=e.i(3645);let l=(0,o.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var r=e.i(23925);let i=(0,o.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 s=e.i(38573),d=e.i(49228);let c=(0,o.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),u=(0,o.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),p=(0,o.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),h=(0,o.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var m=e.i(61569),m=m,f=e.i(3214),g=e.i(30702);let x=(0,o.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var v=e.i(60112),w=e.i(31777),b=e.i(41957),y=e.i(98127),j=e.i(35364),k=e.i(51911),C=e.i(2828),S=e.i(26036),N=e.i(27069),I=e.i(91967),P=e.i(87342),M=e.i(5978),E=e.i(22528),T=e.i(66033),A=e.i(53532),R=e.i(41687),D=e.i(56720),L=e.i(13123),F=e.i(52740),H=e.i(39979),B=e.i(87620),V=e.i(86874),_=e.i(29297),O=e.i(36589),W=e.i(5192),z=e.i(23405),U=e.i(1693),K=e.i(73772),G=e.i(13044),q=[" ","Enter","ArrowUp","ArrowDown"],Y=[" ","Enter"],Z="Select",[Q,X,$]=(0,P.createCollection)(Z),[J,ee]=(0,E.createContextScope)(Z,[$,F.createPopperScope]),et=(0,F.createPopperScope)(),[en,ea]=J(Z),[eo,el]=J(Z),er=e=>{let{__scopeSelect:a,children:o,open:l,defaultOpen:r,onOpenChange:i,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:h,disabled:m,required:f,form:g}=e,x=et(a),[v,w]=n.useState(null),[b,y]=n.useState(null),[j,k]=n.useState(!1),C=(0,T.useDirection)(u),[S,N]=(0,O.useControllableState)({prop:l,defaultProp:r??!1,onChange:i,caller:Z}),[I,P]=(0,O.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:Z}),M=n.useRef(null),E=!v||g||!!v.closest("form"),[A,R]=n.useState(new Set),D=Array.from(A).map(e=>e.props.value).join(";");return(0,t.jsx)(F.Root,{...x,children:(0,t.jsxs)(en,{required:f,scope:a,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:j,onValueNodeHasChildrenChange:k,contentId:(0,L.useId)(),value:I,onValueChange:P,open:S,onOpenChange:N,dir:C,triggerPointerDownPosRef:M,disabled:m,children:[(0,t.jsx)(Q.Provider,{scope:a,children:(0,t.jsx)(eo,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{R(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{R(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:o})}),E?(0,t.jsxs)(eq,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:h,value:I,onChange:e=>P(e.target.value),disabled:m,form:g,children:[void 0===I?(0,t.jsx)("option",{value:""}):null,Array.from(A)]},D):null]})})};er.displayName=Z;var ei="SelectTrigger",es=n.forwardRef((e,a)=>{let{__scopeSelect:o,disabled:l=!1,...r}=e,i=et(o),s=ea(ei,o),d=s.disabled||l,c=(0,M.useComposedRefs)(a,s.onTriggerChange),u=X(o),p=n.useRef("touch"),[h,m,f]=eZ(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),a=eQ(t,e,n);void 0!==a&&s.onValueChange(a.value)}),g=e=>{d||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(F.Anchor,{asChild:!0,...i,children:(0,t.jsx)(B.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":eY(s.value)?"":void 0,...r,ref:c,onClick:(0,I.composeEventHandlers)(r.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,I.composeEventHandlers)(r.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,I.composeEventHandlers)(r.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),(!t||" "!==e.key)&&q.includes(e.key)&&(g(),e.preventDefault())})})})});es.displayName=ei;var ed="SelectValue",ec=n.forwardRef((e,n)=>{let{__scopeSelect:a,className:o,style:l,children:r,placeholder:i="",...s}=e,d=ea(ed,a),{onValueNodeHasChildrenChange:c}=d,u=void 0!==r,p=(0,M.useComposedRefs)(n,d.onValueNodeChange);return(0,W.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(B.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eY(d.value)?(0,t.jsx)(t.Fragment,{children:i}):r})});ec.displayName=ed;var eu=n.forwardRef((e,n)=>{let{__scopeSelect:a,children:o,...l}=e;return(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...l,ref:n,children:o||"▼"})});eu.displayName="SelectIcon";var ep=e=>(0,t.jsx)(H.Portal,{asChild:!0,...e});ep.displayName="SelectPortal";var eh="SelectContent",em=n.forwardRef((e,a)=>{let o=ea(eh,e.__scopeSelect),[l,r]=n.useState();return((0,W.useLayoutEffect)(()=>{r(new DocumentFragment)},[]),o.open)?(0,t.jsx)(ev,{...e,ref:a}):l?S.createPortal((0,t.jsx)(ef,{scope:e.__scopeSelect,children:(0,t.jsx)(Q.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),l):null});em.displayName=eh;var[ef,eg]=J(eh),ex=(0,V.createSlot)("SelectContent.RemoveScroll"),ev=n.forwardRef((e,a)=>{let{__scopeSelect:o,position:l="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:m,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...w}=e,b=ea(eh,o),[y,j]=n.useState(null),[k,C]=n.useState(null),S=(0,M.useComposedRefs)(a,e=>j(e)),[N,P]=n.useState(null),[E,T]=n.useState(null),L=X(o),[F,H]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,K.hideOthers)(y)},[y]),(0,R.useFocusGuards)();let V=n.useCallback(e=>{let[t,...n]=L().map(e=>e.ref.current),[a]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(n?.scrollIntoView({block:"nearest"}),n===t&&k&&(k.scrollTop=0),n===a&&k&&(k.scrollTop=k.scrollHeight),n?.focus(),document.activeElement!==o))return},[L,k]),_=n.useCallback(()=>V([N,y]),[V,N,y]);n.useEffect(()=>{F&&_()},[F,_]);let{onOpenChange:O,triggerPointerDownPosRef:W}=b;n.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(W.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(W.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||O(!1),document.removeEventListener("pointermove",t),W.current=null};return null!==W.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,W]),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[z,U]=eZ(e=>{let t=L().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),a=eQ(t,e,n);a&&setTimeout(()=>a.ref.current.focus())}),q=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==b.value&&b.value===t||a)&&(P(e),a&&(B.current=!0))},[b.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==b.value&&b.value===t||a)&&T(e)},[b.value]),Q="popper"===l?eb:ew,$=Q===eb?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:m,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(ef,{scope:o,content:y,viewport:k,onViewportChange:C,itemRefCallback:q,selectedItem:N,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:E,position:l,isPositioned:F,searchRef:z,children:(0,t.jsx)(G.RemoveScroll,{as:ex,allowPinchZoom:!0,children:(0,t.jsx)(D.FocusScope,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,I.composeEventHandlers)(r,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(A.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,t.jsx)(Q,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...w,...$,onPlaced:()=>H(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:(0,I.composeEventHandlers)(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=L().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,a=t.indexOf(n);t=t.slice(a+1)}setTimeout(()=>V(t)),e.preventDefault()}})})})})})})});ev.displayName="SelectContentImpl";var ew=n.forwardRef((e,a)=>{let{__scopeSelect:o,onPlaced:l,...r}=e,i=ea(eh,o),s=eg(eh,o),[d,c]=n.useState(null),[u,p]=n.useState(null),h=(0,M.useComposedRefs)(a,e=>p(e)),m=X(o),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=s,y=n.useCallback(()=>{if(i.trigger&&i.valueNode&&d&&u&&x&&v&&w){let e=i.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),a=w.getBoundingClientRect();if("rtl"!==i.dir){let o=a.left-t.left,l=n.left-o,r=e.left-l,i=e.width+r,s=Math.max(i,t.width),c=window.innerWidth-10,u=(0,N.clamp)(l,[10,Math.max(10,c-s)]);d.style.minWidth=i+"px",d.style.left=u+"px"}else{let o=t.right-a.right,l=window.innerWidth-n.right-o,r=window.innerWidth-e.right-l,i=e.width+r,s=Math.max(i,t.width),c=window.innerWidth-10,u=(0,N.clamp)(l,[10,Math.max(10,c-s)]);d.style.minWidth=i+"px",d.style.right=u+"px"}let o=m(),r=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),h=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),b=p+h+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,b),j=window.getComputedStyle(x),k=parseInt(j.paddingTop,10),C=parseInt(j.paddingBottom,10),S=e.top+e.height/2-10,I=v.offsetHeight/2,P=p+h+(v.offsetTop+I);if(P<=S){let e=o.length>0&&v===o[o.length-1].ref.current;d.style.bottom="0px";let t=Math.max(r-S,I+(e?C:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=P+t+"px"}else{let e=o.length>0&&v===o[0].ref.current;d.style.top="0px";let t=Math.max(S,p+x.offsetTop+(e?k:0)+I);d.style.height=t+(b-P)+"px",x.scrollTop=P-S+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=r+"px",l?.(),requestAnimationFrame(()=>f.current=!0)}},[m,i.trigger,i.valueNode,d,u,x,v,w,i.dir,l]);(0,W.useLayoutEffect)(()=>y(),[y]);let[j,k]=n.useState();(0,W.useLayoutEffect)(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);let C=n.useCallback(e=>{e&&!0===g.current&&(y(),b?.(),g.current=!1)},[y,b]);return(0,t.jsx)(ey,{scope:o,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:C,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,t.jsx)(B.Primitive.div,{...r,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ew.displayName="SelectItemAlignedPosition";var eb=n.forwardRef((e,n)=>{let{__scopeSelect:a,align:o="start",collisionPadding:l=10,...r}=e,i=et(a);return(0,t.jsx)(F.Content,{...i,...r,ref:n,align:o,collisionPadding:l,style:{boxSizing:"border-box",...r.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)"}})});eb.displayName="SelectPopperPosition";var[ey,ej]=J(eh,{}),ek="SelectViewport",eC=n.forwardRef((e,a)=>{let{__scopeSelect:o,nonce:l,...r}=e,i=eg(ek,o),s=ej(ek,o),d=(0,M.useComposedRefs)(a,i.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:l}),(0,t.jsx)(Q.Slot,{scope:o,children:(0,t.jsx)(B.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:(0,I.composeEventHandlers)(r.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:a}=s;if(a?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let a=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<a){let l=o+e,r=Math.min(a,l),i=l-r;n.style.height=r+"px","0px"===n.style.bottom&&(t.scrollTop=i>0?i:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});eC.displayName=ek;var eS="SelectGroup",[eN,eI]=J(eS),eP=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=(0,L.useId)();return(0,t.jsx)(eN,{scope:a,id:l,children:(0,t.jsx)(B.Primitive.div,{role:"group","aria-labelledby":l,...o,ref:n})})});eP.displayName=eS;var eM="SelectLabel",eE=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=eI(eM,a);return(0,t.jsx)(B.Primitive.div,{id:l.id,...o,ref:n})});eE.displayName=eM;var eT="SelectItem",[eA,eR]=J(eT),eD=n.forwardRef((e,a)=>{let{__scopeSelect:o,value:l,disabled:r=!1,textValue:i,...s}=e,d=ea(eT,o),c=eg(eT,o),u=d.value===l,[p,h]=n.useState(i??""),[m,f]=n.useState(!1),g=(0,M.useComposedRefs)(a,e=>c.itemRefCallback?.(e,l,r)),x=(0,L.useId)(),v=n.useRef("touch"),w=()=>{r||(d.onValueChange(l),d.onOpenChange(!1))};if(""===l)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)(eA,{scope:o,value:l,disabled:r,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{h(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(Q.ItemSlot,{scope:o,value:l,disabled:r,textValue:p,children:(0,t.jsx)(B.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:g,onFocus:(0,I.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,I.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,I.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:(0,I.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:(0,I.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,I.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,r?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,I.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,I.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(Y.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});eD.displayName=eT;var eL="SelectItemText",eF=n.forwardRef((e,a)=>{let{__scopeSelect:o,className:l,style:r,...i}=e,s=ea(eL,o),d=eg(eL,o),c=eR(eL,o),u=el(eL,o),[p,h]=n.useState(null),m=(0,M.useComposedRefs)(a,e=>h(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,W.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Primitive.span,{id:c.textId,...i,ref:m}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?S.createPortal(i.children,s.valueNode):null]})});eF.displayName=eL;var eH="SelectItemIndicator",eB=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e;return eR(eH,a).isSelected?(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...o,ref:n}):null});eB.displayName=eH;var eV="SelectScrollUpButton",e_=n.forwardRef((e,a)=>{let o=eg(eV,e.__scopeSelect),l=ej(eV,e.__scopeSelect),[r,i]=n.useState(!1),s=(0,M.useComposedRefs)(a,l.onScrollButtonChange);return(0,W.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){i(t.scrollTop>0)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),r?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});e_.displayName=eV;var eO="SelectScrollDownButton",eW=n.forwardRef((e,a)=>{let o=eg(eO,e.__scopeSelect),l=ej(eO,e.__scopeSelect),[r,i]=n.useState(!1),s=(0,M.useComposedRefs)(a,l.onScrollButtonChange);return(0,W.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)<e)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),r?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eW.displayName=eO;var ez=n.forwardRef((e,a)=>{let{__scopeSelect:o,onAutoScroll:l,...r}=e,i=eg("SelectScrollButton",o),s=n.useRef(null),d=X(o),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,W.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(B.Primitive.div,{"aria-hidden":!0,...r,ref:a,style:{flexShrink:0,...r.style},onPointerDown:(0,I.composeEventHandlers)(r.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(l,50))}),onPointerMove:(0,I.composeEventHandlers)(r.onPointerMove,()=>{i.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(l,50))}),onPointerLeave:(0,I.composeEventHandlers)(r.onPointerLeave,()=>{c()})})}),eU=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e;return(0,t.jsx)(B.Primitive.div,{"aria-hidden":!0,...o,ref:n})});eU.displayName="SelectSeparator";var eK="SelectArrow",eG=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=et(a),r=ea(eK,a),i=eg(eK,a);return r.open&&"popper"===i.position?(0,t.jsx)(F.Arrow,{...l,...o,ref:n}):null});eG.displayName=eK;var eq=n.forwardRef(({__scopeSelect:e,value:a,...o},l)=>{let r=n.useRef(null),i=(0,M.useComposedRefs)(l,r),s=(0,z.usePrevious)(a);return n.useEffect(()=>{let e=r.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==a&&t){let n=new Event("change",{bubbles:!0});t.call(e,a),e.dispatchEvent(n)}},[s,a]),(0,t.jsx)(B.Primitive.select,{...o,style:{...U.VISUALLY_HIDDEN_STYLES,...o.style},ref:i,defaultValue:a})});function eY(e){return""===e||void 0===e}function eZ(e){let t=(0,_.useCallbackRef)(e),a=n.useRef(""),o=n.useRef(0),l=n.useCallback(e=>{let n=a.current+e;t(n),function e(t){a.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),r=n.useCallback(()=>{a.current="",window.clearTimeout(o.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),[a,l,r]}function eQ(e,t,n){var a,o;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,r=n?e.indexOf(n):-1,i=(a=e,o=Math.max(r,0),a.map((e,t)=>a[(o+t)%a.length]));1===l.length&&(i=i.filter(e=>e!==n));let s=i.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return s!==n?s:void 0}eq.displayName="SelectBubbleInput",e.s(["Arrow",()=>eG,"Content",()=>em,"Group",()=>eP,"Icon",()=>eu,"Item",()=>eD,"ItemIndicator",()=>eB,"ItemText",()=>eF,"Label",()=>eE,"Portal",()=>ep,"Root",()=>er,"ScrollDownButton",()=>eW,"ScrollUpButton",()=>e_,"Select",()=>er,"SelectArrow",()=>eG,"SelectContent",()=>em,"SelectGroup",()=>eP,"SelectIcon",()=>eu,"SelectItem",()=>eD,"SelectItemIndicator",()=>eB,"SelectItemText",()=>eF,"SelectLabel",()=>eE,"SelectPortal",()=>ep,"SelectScrollDownButton",()=>eW,"SelectScrollUpButton",()=>e_,"SelectSeparator",()=>eU,"SelectTrigger",()=>es,"SelectValue",()=>ec,"SelectViewport",()=>eC,"Separator",()=>eU,"Trigger",()=>es,"Value",()=>ec,"Viewport",()=>eC,"createSelectScope",()=>ee],83830);var eX=e.i(83830),eX=eX,e$=e.i(99105);let eJ=(0,o.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),e0=eX.Root;eX.Group;let e1=eX.Value,e2=n.forwardRef(({className:e,children:n,...a},o)=>(0,t.jsxs)(eX.Trigger,{ref:o,className:(0,w.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[n,(0,t.jsx)(eX.Icon,{asChild:!0,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));e2.displayName=eX.Trigger.displayName;let e4=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.ScrollUpButton,{ref:a,className:(0,w.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eJ,{className:"h-4 w-4"})}));e4.displayName=eX.ScrollUpButton.displayName;let e3=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.ScrollDownButton,{ref:a,className:(0,w.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4"})}));e3.displayName=eX.ScrollDownButton.displayName;let e5=n.forwardRef(({className:e,children:n,position:a="popper",...o},l)=>(0,t.jsx)(eX.Portal,{children:(0,t.jsxs)(eX.Content,{ref:l,className:(0,w.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...o,children:[(0,t.jsx)(e4,{}),(0,t.jsx)(eX.Viewport,{className:(0,w.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e3,{})]})}));e5.displayName=eX.Content.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.Label,{ref:a,className:(0,w.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=eX.Label.displayName;let e8=n.forwardRef(({className:e,children:n,...a},o)=>(0,t.jsxs)(eX.Item,{ref:o,className:(0,w.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)(eX.ItemIndicator,{children:(0,t.jsx)(r.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eX.ItemText,{children:n})]}));e8.displayName=eX.Item.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.Separator,{ref:a,className:(0,w.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=eX.Separator.displayName;var e6=e.i(21023);let e9=(0,e6.createServerReference)("40c184002faee44db8cd788e54ce974c1ae204dd14",e6.callServer,void 0,e6.findSourceMapURL,"updateSettingsAction");var e7=e.i(17406),te=e.i(98804),tt=e.i(93752),tt=tt,tn=e.i(83902);function ta(e){return(0,t.jsx)(tt.default,{className:(0,w.cn)("h-4 w-4",e.className),...e})}function to({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function tl({className:e}){return(0,t.jsx)(te.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function ti({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function ts({className:e,...n}){return(0,t.jsx)(tn.Rocket,{className:(0,w.cn)("h-4 w-4",e),...n})}to.displayName="VsCodeIcon",tl.displayName="CursorEditorIcon",tr.displayName="WindsurfIcon",ti.displayName="ZedIcon",ts.displayName="AntigravityIcon";let td={vscode:to,cursor:tl,windsurf:tr,zed:ti,antigravity:ts};var tc=e.i(41413);let tu=[{value:e7.AgentAuthMethod.Session,label:"Session"},{value:e7.AgentAuthMethod.Token,label:"Token"}],tp=[{value:e7.EditorType.VsCode,label:"VS Code"},{value:e7.EditorType.Cursor,label:"Cursor"},{value:e7.EditorType.Windsurf,label:"Windsurf"},{value:e7.EditorType.Zed,label:"Zed"},{value:e7.EditorType.Antigravity,label:"Antigravity"}],th=[{id:"agent",label:"Agent",icon:i},{id:"environment",label:"Environment",icon:s.Terminal},{id:"workflow",label:"Workflow",icon:d.GitBranch},{id:"ci",label:"CI",icon:c},{id:"notifications",label:"Notifications",icon:u},{id:"feature-flags",label:"Flags",icon:p},{id:"database",label:"Database",icon:h}];function tm({label:e,description:n,htmlFor:a,children:o}){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)(b.Label,{htmlFor:a,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),n?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:n}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:o})]})}function tf({label:e,description:n,id:a,testId:o,checked:l,onChange:r}){return(0,t.jsx)(tm,{label:e,description:n,htmlFor:a,children:(0,t.jsx)(k.Switch,{id:a,"data-testid":o,checked:l,onCheckedChange:r,className:"cursor-pointer"})})}function tg({icon:e,title:n,description:a,badge:o,testId:l,children:r}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":l,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}),o?(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:o}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:a})]}),(0,t.jsx)("div",{className:"px-4",children:r})]})}function tx({id:e,testId:n,value:a,onChange:o,onBlur:l,placeholder:r,min:i=1,max:s,step:d=1,suffix:c}){let u=""===a?void 0:parseInt(a,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{o(String(Math.max(i,(u??parseInt(r,10))-d)))},onMouseUp:l,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)(m.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":n,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:a,placeholder:r,onChange:e=>{o(e.target.value.replace(/[^0-9]/g,""))},onBlur:l,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(r,10),o(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:l,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)(f.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function tv({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 tw({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)(g.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function tb({settings:e,shepHome:o,dbFileSize:m}){let{showSaving:f,showSaved:g,save:b}=function(){let[e,t]=(0,n.useTransition)(),[a,o]=(0,n.useState)(!1),[l,r]=(0,n.useState)(!1),i=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!a&&(o(!0),s.current=!1,i.current=setTimeout(()=>{i.current=null,s.current&&(o(!1),r(!0),setTimeout(()=>r(!1),2e3))},350)),!e&&a&&(s.current=!0,i.current||(o(!1),r(!0),setTimeout(()=>r(!1),2e3)))},[e,a]),{showSaving:a,showSaved:l,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e9(e);t.success||v.toast.error(t.error??"Failed to save settings")})},[t])}}(),k=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1},[S,N]=(0,n.useState)(e.agent.type),I=e.agent.authMethod,[P,M]=(0,n.useState)(e.agent.token??""),[E,T]=(0,n.useState)(!1),[A,R]=(0,n.useState)(e.environment.defaultEditor),D=e.environment.shellPreference,[L,F]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[H,B]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[V,_]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[O,W]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[z,U]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[K,G]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[q,Y]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[Z,Q]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[X,$]=(0,n.useState)(e.notifications.inApp.enabled),[J,ee]=(0,n.useState)(e.notifications.browser.enabled),[et,en]=(0,n.useState)(e.notifications.desktop.enabled),[ea,eo]=(0,n.useState)({...e.notifications.events}),[el,er]=(0,n.useState)({...k}),ei=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",es=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",ed=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"";function ec(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eu(e={}){let t=ec(e.ciTimeout??q);return{workflow:{openPrOnImplementationComplete:e.openPr??L,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??H,allowPrd:e.allowPrd??V,allowPlan:e.allowPlan??O,allowMerge:e.allowMerge??z},ciMaxFixAttempts:ec(e.ciMaxFix??K),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:ec(e.ciLogMax??Z)}}}function ep(e={}){return{notifications:{inApp:{enabled:e.inApp??X},browser:{enabled:e.browser??J},desktop:{enabled:e.desktop??et},events:e.events??ea}}}let[eh,em]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=th.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&&em(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let ef=(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)(x,{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,w.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",f?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,w.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",g&&!f?"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:th.map(e=>{let n=e.icon,a=eh===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>ef(e.id),className:(0,w.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",a?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(n,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tg,{icon:i,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:[(0,t.jsx)(tm,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(tc.AgentModelPicker,{initialAgentType:S,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>N(e),className:"w-55"})}),(0,t.jsx)(tm,{label:"Authentication",description:"How the agent authenticates",htmlFor:"auth-method",children:(0,t.jsx)(C.TooltipProvider,{children:(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsxs)(e0,{value:I,disabled:!0,children:[(0,t.jsx)(e2,{id:"auth-method","data-testid":"auth-method-select",className:"w-55 cursor-not-allowed text-xs opacity-60",children:(0,t.jsx)(e1,{})}),(0,t.jsx)(e5,{children:tu.map(e=>(0,t.jsx)(e8,{value:e.value,children:e.label},e.value))})]})})}),(0,t.jsx)(C.TooltipContent,{children:"Coming soon"})]})})}),I===e7.AgentAuthMethod.Token&&(0,t.jsx)(tm,{label:"API Token",htmlFor:"agent-token",children:(0,t.jsxs)("div",{className:"relative w-45",children:[(0,t.jsx)(y.Input,{id:"agent-token","data-testid":"agent-token-input",type:E?"text":"password",value:P,onChange:e=>M(e.target.value),onBlur:()=>{P!==(e.agent.token??"")&&b(function(e={}){let t={type:S,authMethod:I,...e},n={type:t.type,authMethod:t.authMethod};return t.authMethod===e7.AgentAuthMethod.Token&&(n.token=e.token??P),{agent:n}}({token:P}))},placeholder:"Enter token",className:"pr-8"}),(0,t.jsx)(j.Button,{type:"button",variant:"ghost",size:"sm",className:"absolute top-0 right-0 h-full px-2 hover:bg-transparent",onClick:()=>T(!E),"data-testid":"toggle-token-visibility","aria-label":E?"Hide token":"Show token",children:E?(0,t.jsx)(l,{className:"h-3 w-3"}):(0,t.jsx)(a.Eye,{className:"h-3 w-3"})})]})})]}),(0,t.jsx)(tw,{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.jsx)(tg,{icon:s.Terminal,title:"Environment",description:"Editor and shell preferences",testId:"environment-settings-section",children:(0,t.jsx)(tm,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(e0,{value:A,onValueChange:e=>{R(e),b({environment:{defaultEditor:e,shellPreference:D}})},children:[(0,t.jsx)(e2,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(e1,{})}),(0,t.jsx)(e5,{children:tp.map(e=>{var n;let a=(n=e.value)&&n in td?td[n]:ta;return(0,t.jsx)(e8,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(a,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})})}),(0,t.jsx)(tw,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor is used when opening files for review or editing during the development workflow."})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tg,{icon:d.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(tf,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:V,onChange:e=>{_(e),b(eu({allowPrd:e}))}}),(0,t.jsx)(tf,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:O,onChange:e=>{W(e),b(eu({allowPlan:e}))}}),(0,t.jsx)(tf,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:z,onChange:e=>{U(e),b(eu({allowMerge:e}))}}),(0,t.jsx)(tf,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:H,onChange:e=>{B(e),b(eu({pushOnComplete:e}))}}),(0,t.jsx)(tf,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:L,onChange:e=>{F(e),b(eu({openPr:e}))}})]}),(0,t.jsx)(tw,{links:[{label:"Approval gates",href:"https://github.com/shep-ai/cli/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:"Push & PR flags",href:"https://github.com/shep-ai/cli/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:"Control how autonomous each feature run is. Auto-approve skips the human review pause at each phase. Push and PR options control what happens after successful implementation."})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tg,{icon:c,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tm,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(tx,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:K,onChange:G,onBlur:()=>{K!==ei&&b(eu({ciMaxFix:K}))},min:1,max:10})}),(0,t.jsx)(tm,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(tx,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:q,onChange:Y,onBlur:()=>{q!==es&&b(eu({ciTimeout:q}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tm,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(tx,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:Z,onChange:Q,onBlur:()=>{Z!==ed&&b(eu({ciLogMax:Z}))},min:1e3,step:5e3,suffix:"chars"})})]}),(0,t.jsx)(tw,{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-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tg,{icon:u,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(tv,{children:"Channels"}),(0,t.jsx)(tf,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:X,onChange:e=>{$(e),b(ep({inApp:e}))}}),(0,t.jsx)(tf,{label:"Browser",description:"Push notifications via the browser",id:"notif-browser",testId:"switch-browser",checked:J,onChange:e=>{ee(e),b(ep({browser:e}))}}),(0,t.jsx)(tf,{label:"Desktop",description:"Native OS notifications",id:"notif-desktop",testId:"switch-desktop",checked:et,onChange:e=>{en(e),b(ep({desktop:e}))}}),(0,t.jsx)(tv,{children:"Agent Events"}),(0,t.jsx)(tf,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:ea.agentStarted,onChange:e=>{let t={...ea,agentStarted:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:ea.phaseCompleted,onChange:e=>{let t={...ea,phaseCompleted:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:ea.waitingApproval,onChange:e=>{let t={...ea,waitingApproval:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:ea.agentCompleted,onChange:e=>{let t={...ea,agentCompleted:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:ea.agentFailed,onChange:e=>{let t={...ea,agentFailed:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tv,{children:"Pull Request Events"}),(0,t.jsx)(tf,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:ea.prMerged,onChange:e=>{let t={...ea,prMerged:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:ea.prClosed,onChange:e=>{let t={...ea,prClosed:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:ea.prChecksPassed,onChange:e=>{let t={...ea,prChecksPassed:e};eo(t),b(ep({events:t}))}}),(0,t.jsx)(tf,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:ea.prChecksFailed,onChange:e=>{let t={...ea,prChecksFailed:e};eo(t),b(ep({events:t}))}})]}),(0,t.jsx)(tw,{links:[{label:"Notification system",href:"https://github.com/shep-ai/cli/blob/main/specs/021-agent-notifications/spec.yaml"}],children:"Three notification channels keep you in the loop: in-app toasts, browser push notifications, and native desktop alerts. Fine-tune which agent lifecycle events trigger a notification."})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tg,{icon:p,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tf,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:el.skills,onChange:e=>{let t={...el,skills:e};er(t),b({featureFlags:t})}}),(0,t.jsx)(tf,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:el.envDeploy,onChange:e=>{let t={...el,envDeploy:e};er(t),b({featureFlags:t})}}),(0,t.jsx)(tf,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:el.debug,onChange:e=>{let t={...el,debug:e};er(t),b({featureFlags:t})}})]}),(0,t.jsx)(tw,{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)(tg,{icon:h,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tm,{label:"Location",description:"Path to the local SQLite database",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shep-home-path",children:o})}),(0,t.jsx)(tm,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:m})})]}),(0,t.jsx)(tw,{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",()=>tb],41952)}]);