@shepai/cli 1.120.0 → 1.121.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/src/presentation/web/components/common/feature-list-item/feature-list-item.stories.d.ts +1 -0
  2. package/dist/src/presentation/web/components/common/feature-list-item/feature-list-item.stories.d.ts.map +1 -1
  3. package/dist/src/presentation/web/components/common/feature-list-item/feature-list-item.stories.js +8 -0
  4. package/dist/src/presentation/web/components/common/feature-status-badges/feature-status-badges.stories.js +6 -6
  5. package/dist/src/presentation/web/components/common/feature-status-config.d.ts +1 -1
  6. package/dist/src/presentation/web/components/common/feature-status-config.d.ts.map +1 -1
  7. package/dist/src/presentation/web/components/common/feature-status-config.js +8 -1
  8. package/dist/src/presentation/web/components/common/feature-status-group/feature-status-group.stories.d.ts +1 -0
  9. package/dist/src/presentation/web/components/common/feature-status-group/feature-status-group.stories.d.ts.map +1 -1
  10. package/dist/src/presentation/web/components/common/feature-status-group/feature-status-group.stories.js +7 -0
  11. package/dist/src/presentation/web/hooks/sidebar-features-context.js +1 -1
  12. package/dist/tsconfig.build.tsbuildinfo +1 -1
  13. package/package.json +1 -1
  14. package/web/.next/BUILD_ID +1 -1
  15. package/web/.next/build-manifest.json +2 -2
  16. package/web/.next/fallback-build-manifest.json +2 -2
  17. package/web/.next/prerender-manifest.json +3 -3
  18. package/web/.next/required-server-files.js +2 -2
  19. package/web/.next/required-server-files.json +2 -2
  20. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +21 -21
  21. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  22. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  23. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +27 -27
  24. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  25. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  26. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +27 -27
  27. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  28. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  29. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +19 -19
  30. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  31. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  32. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +21 -21
  33. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  34. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  35. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +27 -27
  36. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  37. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  38. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +27 -27
  39. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  40. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  41. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +19 -19
  42. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  43. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  44. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +19 -19
  45. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  46. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/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.nft.json +1 -1
  56. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
  58. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  59. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  60. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  61. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  62. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  63. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  64. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  65. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  66. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  67. package/web/.next/server/app/version/page.js.nft.json +1 -1
  68. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  69. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  70. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  71. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  72. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js +1 -1
  73. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js.map +1 -1
  74. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js +1 -1
  75. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js.map +1 -1
  76. package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +1 -1
  77. package/web/.next/server/chunks/ssr/[root-of-the-server]__3b14e5a0._.js +1 -1
  78. package/web/.next/server/chunks/ssr/[root-of-the-server]__3b14e5a0._.js.map +1 -1
  79. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +1 -1
  80. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +1 -1
  81. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  82. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  83. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  84. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  85. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  86. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  87. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b59c03e._.js +1 -1
  88. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b59c03e._.js.map +1 -1
  89. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +2 -2
  90. package/web/.next/server/chunks/ssr/[root-of-the-server]__994ad9fe._.js +1 -1
  91. package/web/.next/server/chunks/ssr/[root-of-the-server]__994ad9fe._.js.map +1 -1
  92. package/web/.next/server/chunks/ssr/[root-of-the-server]__a022445f._.js +2 -2
  93. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +2 -2
  94. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9c1cfee._.js +1 -1
  95. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9c1cfee._.js.map +1 -1
  96. package/web/.next/server/chunks/ssr/{_16e2ff25._.js → _0314651a._.js} +2 -2
  97. package/web/.next/server/chunks/ssr/{_16e2ff25._.js.map → _0314651a._.js.map} +1 -1
  98. package/web/.next/server/chunks/ssr/_0dc2cfd3._.js +3 -0
  99. package/web/.next/server/chunks/ssr/_0dc2cfd3._.js.map +1 -0
  100. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  101. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  102. package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
  103. package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
  104. package/web/.next/server/chunks/ssr/{_c93f4352._.js → _68cc9b82._.js} +2 -2
  105. package/web/.next/server/chunks/ssr/{_c93f4352._.js.map → _68cc9b82._.js.map} +1 -1
  106. package/web/.next/server/chunks/ssr/_73a34cb2._.js +3 -0
  107. package/web/.next/server/chunks/ssr/{_503b26e9._.js.map → _73a34cb2._.js.map} +1 -1
  108. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  109. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  110. package/web/.next/server/chunks/ssr/{_f605354c._.js → _f1a649e3._.js} +3 -3
  111. package/web/.next/server/chunks/ssr/_f1a649e3._.js.map +1 -0
  112. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  113. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  114. package/web/.next/server/chunks/ssr/src_presentation_web_0835b28e._.js +2 -2
  115. package/web/.next/server/chunks/ssr/src_presentation_web_0835b28e._.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js +1 -1
  117. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js.map +1 -1
  118. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  119. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  120. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  121. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  122. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  123. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  124. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  125. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  126. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  127. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  128. package/web/.next/server/chunks/ssr/src_presentation_web_e8034a29._.js +2 -2
  129. package/web/.next/server/chunks/ssr/src_presentation_web_e8034a29._.js.map +1 -1
  130. package/web/.next/server/pages/500.html +2 -2
  131. package/web/.next/server/server-reference-manifest.js +1 -1
  132. package/web/.next/server/server-reference-manifest.json +33 -33
  133. package/web/.next/static/chunks/0cc5f5ca1696267a.js +1 -0
  134. package/web/.next/static/chunks/0d2af96e64960ef5.css +1 -0
  135. package/web/.next/static/chunks/{f518c011aaa1941e.js → 2132807f96110232.js} +1 -1
  136. package/web/.next/static/chunks/{abb2b485cb0da264.js → 4b58ac6e7721f9ea.js} +1 -1
  137. package/web/.next/static/chunks/{263497416e5198a3.js → 4c22a50608db401a.js} +1 -1
  138. package/web/.next/static/chunks/5186e2254580afd1.js +11 -0
  139. package/web/.next/static/chunks/{a5ff70a7709ec5af.js → 8ded2620c2272c27.js} +2 -2
  140. package/web/.next/static/chunks/{71161130b2462279.js → 96eeeb28e06de78c.js} +1 -1
  141. package/web/.next/static/chunks/{943a2b78e452a2fb.js → 9fdfff0a8c69ecd2.js} +2 -2
  142. package/web/.next/static/chunks/c6a68bd98c2c0446.js +1 -0
  143. package/web/.next/static/chunks/{51244236801cad96.js → f22c2cdecc7a523b.js} +1 -1
  144. package/web/.next/static/chunks/{57e0b981e00941e4.js → f27e3d3959bf91e6.js} +1 -1
  145. package/web/.next/server/chunks/ssr/_503b26e9._.js +0 -3
  146. package/web/.next/server/chunks/ssr/_ab069e13._.js +0 -3
  147. package/web/.next/server/chunks/ssr/_ab069e13._.js.map +0 -1
  148. package/web/.next/server/chunks/ssr/_f605354c._.js.map +0 -1
  149. package/web/.next/static/chunks/027d779d1dd1535e.js +0 -1
  150. package/web/.next/static/chunks/700fc491c912dd68.js +0 -1
  151. package/web/.next/static/chunks/844405e9e0f44c8b.js +0 -11
  152. package/web/.next/static/chunks/d2739454715e5ef2.css +0 -1
  153. /package/web/.next/static/{oxdz8EAvGqpg8JW3gRSSs → Fg0DqzWA5hDmVmj5X9iq-}/_buildManifest.js +0 -0
  154. /package/web/.next/static/{oxdz8EAvGqpg8JW3gRSSs → Fg0DqzWA5hDmVmj5X9iq-}/_clientMiddlewareManifest.json +0 -0
  155. /package/web/.next/static/{oxdz8EAvGqpg8JW3gRSSs → Fg0DqzWA5hDmVmj5X9iq-}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(87889),a=e.i(3645);let i=(0,a.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 o=e.i(23925),l=e.i(26370),s=e.i(38573),d=e.i(49228);let c=(0,a.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),u=(0,a.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),p=(0,a.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),m=(0,a.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var h=e.i(10714),h=h,f=e.i(3214),g=e.i(30702);let x=(0,a.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),v=(0,a.default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);var w=e.i(60112),b=e.i(31777),y=e.i(41957),j=e.i(98127),S=e.i(35364),C=e.i(51911),k=e.i(2828),I=e.i(26036),M=e.i(27069),N=e.i(91967),P=e.i(87342),E=e.i(5978),R=e.i(22528),T=e.i(66033),A=e.i(53532),D=e.i(41687),L=e.i(56720),F=e.i(13123),H=e.i(52740),z=e.i(39979),B=e.i(87620),_=e.i(86874),V=e.i(29297),W=e.i(36589),O=e.i(5192),U=e.i(23405),K=e.i(1693),q=e.i(73772),G=e.i(13044),$=[" ","Enter","ArrowUp","ArrowDown"],Y=[" ","Enter"],Z="Select",[X,Q,J]=(0,P.createCollection)(Z),[ee,et]=(0,R.createContextScope)(Z,[J,H.createPopperScope]),en=(0,H.createPopperScope)(),[er,ea]=ee(Z),[ei,eo]=ee(Z),el=e=>{let{__scopeSelect:r,children:a,open:i,defaultOpen:o,onOpenChange:l,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:m,disabled:h,required:f,form:g}=e,x=en(r),[v,w]=n.useState(null),[b,y]=n.useState(null),[j,S]=n.useState(!1),C=(0,T.useDirection)(u),[k,I]=(0,W.useControllableState)({prop:i,defaultProp:o??!1,onChange:l,caller:Z}),[M,N]=(0,W.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:Z}),P=n.useRef(null),E=!v||g||!!v.closest("form"),[R,A]=n.useState(new Set),D=Array.from(R).map(e=>e.props.value).join(";");return(0,t.jsx)(H.Root,{...x,children:(0,t.jsxs)(er,{required:f,scope:r,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:j,onValueNodeHasChildrenChange:S,contentId:(0,F.useId)(),value:M,onValueChange:N,open:k,onOpenChange:I,dir:C,triggerPointerDownPosRef:P,disabled:h,children:[(0,t.jsx)(X.Provider,{scope:r,children:(0,t.jsx)(ei,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{A(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:a})}),E?(0,t.jsxs)(e$,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:m,value:M,onChange:e=>N(e.target.value),disabled:h,form:g,children:[void 0===M?(0,t.jsx)("option",{value:""}):null,Array.from(R)]},D):null]})})};el.displayName=Z;var es="SelectTrigger",ed=n.forwardRef((e,r)=>{let{__scopeSelect:a,disabled:i=!1,...o}=e,l=en(a),s=ea(es,a),d=s.disabled||i,c=(0,E.useComposedRefs)(r,s.onTriggerChange),u=Q(a),p=n.useRef("touch"),[m,h,f]=eZ(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=eX(t,e,n);void 0!==r&&s.onValueChange(r.value)}),g=e=>{d||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(H.Anchor,{asChild:!0,...l,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,...o,ref:c,onClick:(0,N.composeEventHandlers)(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,N.composeEventHandlers)(o.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,N.composeEventHandlers)(o.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&$.includes(e.key)&&(g(),e.preventDefault())})})})});ed.displayName=es;var ec="SelectValue",eu=n.forwardRef((e,n)=>{let{__scopeSelect:r,className:a,style:i,children:o,placeholder:l="",...s}=e,d=ea(ec,r),{onValueNodeHasChildrenChange:c}=d,u=void 0!==o,p=(0,E.useComposedRefs)(n,d.onValueNodeChange);return(0,O.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:l}):o})});eu.displayName=ec;var ep=n.forwardRef((e,n)=>{let{__scopeSelect:r,children:a,...i}=e;return(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...i,ref:n,children:a||"▼"})});ep.displayName="SelectIcon";var em=e=>(0,t.jsx)(z.Portal,{asChild:!0,...e});em.displayName="SelectPortal";var eh="SelectContent",ef=n.forwardRef((e,r)=>{let a=ea(eh,e.__scopeSelect),[i,o]=n.useState();return((0,O.useLayoutEffect)(()=>{o(new DocumentFragment)},[]),a.open)?(0,t.jsx)(ew,{...e,ref:r}):i?I.createPortal((0,t.jsx)(eg,{scope:e.__scopeSelect,children:(0,t.jsx)(X.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});ef.displayName=eh;var[eg,ex]=ee(eh),ev=(0,_.createSlot)("SelectContent.RemoveScroll"),ew=n.forwardRef((e,r)=>{let{__scopeSelect:a,position:i="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...w}=e,b=ea(eh,a),[y,j]=n.useState(null),[S,C]=n.useState(null),k=(0,E.useComposedRefs)(r,e=>j(e)),[I,M]=n.useState(null),[P,R]=n.useState(null),T=Q(a),[F,H]=n.useState(!1),z=n.useRef(!1);n.useEffect(()=>{if(y)return(0,q.hideOthers)(y)},[y]),(0,D.useFocusGuards)();let B=n.useCallback(e=>{let[t,...n]=T().map(e=>e.ref.current),[r]=n.slice(-1),a=document.activeElement;for(let n of e)if(n===a||(n?.scrollIntoView({block:"nearest"}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==a))return},[T,S]),_=n.useCallback(()=>B([I,y]),[B,I,y]);n.useEffect(()=>{F&&_()},[F,_]);let{onOpenChange:V,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)||V(!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,V,W]),n.useEffect(()=>{let e=()=>V(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[V]);let[O,U]=eZ(e=>{let t=T().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=eX(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),K=n.useCallback((e,t,n)=>{let r=!z.current&&!n;(void 0!==b.value&&b.value===t||r)&&(M(e),r&&(z.current=!0))},[b.value]),$=n.useCallback(()=>y?.focus(),[y]),Y=n.useCallback((e,t,n)=>{let r=!z.current&&!n;(void 0!==b.value&&b.value===t||r)&&R(e)},[b.value]),Z="popper"===i?ey:eb,X=Z===ey?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(eg,{scope:a,content:y,viewport:S,onViewportChange:C,itemRefCallback:K,selectedItem:I,onItemLeave:$,itemTextRefCallback:Y,focusSelectedItem:_,selectedItemText:P,position:i,isPositioned:F,searchRef:O,children:(0,t.jsx)(G.RemoveScroll,{as:ev,allowPinchZoom:!0,children:(0,t.jsx)(L.FocusScope,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,N.composeEventHandlers)(o,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(A.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,t.jsx)(Z,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...w,...X,onPlaced:()=>H(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:(0,N.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=T().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>B(t)),e.preventDefault()}})})})})})})});ew.displayName="SelectContentImpl";var eb=n.forwardRef((e,r)=>{let{__scopeSelect:a,onPlaced:i,...o}=e,l=ea(eh,a),s=ex(eh,a),[d,c]=n.useState(null),[u,p]=n.useState(null),m=(0,E.useComposedRefs)(r,e=>p(e)),h=Q(a),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=s,y=n.useCallback(()=>{if(l.trigger&&l.valueNode&&d&&u&&x&&v&&w){let e=l.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=l.valueNode.getBoundingClientRect(),r=w.getBoundingClientRect();if("rtl"!==l.dir){let a=r.left-t.left,i=n.left-a,o=e.left-i,l=e.width+o,s=Math.max(l,t.width),c=window.innerWidth-10,u=(0,M.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=l+"px",d.style.left=u+"px"}else{let a=t.right-r.right,i=window.innerWidth-n.right-a,o=window.innerWidth-e.right-i,l=e.width+o,s=Math.max(l,t.width),c=window.innerWidth-10,u=(0,M.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=l+"px",d.style.right=u+"px"}let a=h(),o=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),m=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),b=p+m+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,b),j=window.getComputedStyle(x),S=parseInt(j.paddingTop,10),C=parseInt(j.paddingBottom,10),k=e.top+e.height/2-10,I=v.offsetHeight/2,N=p+m+(v.offsetTop+I);if(N<=k){let e=a.length>0&&v===a[a.length-1].ref.current;d.style.bottom="0px";let t=Math.max(o-k,I+(e?C:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=N+t+"px"}else{let e=a.length>0&&v===a[0].ref.current;d.style.top="0px";let t=Math.max(k,p+x.offsetTop+(e?S:0)+I);d.style.height=t+(b-N)+"px",x.scrollTop=N-k+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=o+"px",i?.(),requestAnimationFrame(()=>f.current=!0)}},[h,l.trigger,l.valueNode,d,u,x,v,w,l.dir,i]);(0,O.useLayoutEffect)(()=>y(),[y]);let[j,S]=n.useState();(0,O.useLayoutEffect)(()=>{u&&S(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)(ej,{scope:a,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,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});eb.displayName="SelectItemAlignedPosition";var ey=n.forwardRef((e,n)=>{let{__scopeSelect:r,align:a="start",collisionPadding:i=10,...o}=e,l=en(r);return(0,t.jsx)(H.Content,{...l,...o,ref:n,align:a,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}})});ey.displayName="SelectPopperPosition";var[ej,eS]=ee(eh,{}),eC="SelectViewport",ek=n.forwardRef((e,r)=>{let{__scopeSelect:a,nonce:i,...o}=e,l=ex(eC,a),s=eS(eC,a),d=(0,E.useComposedRefs)(r,l.onViewportChange),c=n.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,t.jsx)(X.Slot,{scope:a,children:(0,t.jsx)(B.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:(0,N.composeEventHandlers)(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,a=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(a<r){let i=a+e,o=Math.min(r,i),l=i-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});ek.displayName=eC;var eI="SelectGroup",[eM,eN]=ee(eI),eP=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=(0,F.useId)();return(0,t.jsx)(eM,{scope:r,id:i,children:(0,t.jsx)(B.Primitive.div,{role:"group","aria-labelledby":i,...a,ref:n})})});eP.displayName=eI;var eE="SelectLabel",eR=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=eN(eE,r);return(0,t.jsx)(B.Primitive.div,{id:i.id,...a,ref:n})});eR.displayName=eE;var eT="SelectItem",[eA,eD]=ee(eT),eL=n.forwardRef((e,r)=>{let{__scopeSelect:a,value:i,disabled:o=!1,textValue:l,...s}=e,d=ea(eT,a),c=ex(eT,a),u=d.value===i,[p,m]=n.useState(l??""),[h,f]=n.useState(!1),g=(0,E.useComposedRefs)(r,e=>c.itemRefCallback?.(e,i,o)),x=(0,F.useId)(),v=n.useRef("touch"),w=()=>{o||(d.onValueChange(i),d.onOpenChange(!1))};if(""===i)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(eA,{scope:a,value:i,disabled:o,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(X.ItemSlot,{scope:a,value:i,disabled:o,textValue:p,children:(0,t.jsx)(B.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:g,onFocus:(0,N.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,N.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,N.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:(0,N.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:(0,N.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,N.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,o?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,N.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,N.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(Y.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});eL.displayName=eT;var eF="SelectItemText",eH=n.forwardRef((e,r)=>{let{__scopeSelect:a,className:i,style:o,...l}=e,s=ea(eF,a),d=ex(eF,a),c=eD(eF,a),u=eo(eF,a),[p,m]=n.useState(null),h=(0,E.useComposedRefs)(r,e=>m(e),c.onItemTextChange,e=>d.itemTextRefCallback?.(e,c.value,c.disabled)),f=p?.textContent,g=n.useMemo(()=>(0,t.jsx)("option",{value:c.value,disabled:c.disabled,children:f},c.value),[c.disabled,c.value,f]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=u;return(0,O.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Primitive.span,{id:c.textId,...l,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?I.createPortal(l.children,s.valueNode):null]})});eH.displayName=eF;var ez="SelectItemIndicator",eB=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return eD(ez,r).isSelected?(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...a,ref:n}):null});eB.displayName=ez;var e_="SelectScrollUpButton",eV=n.forwardRef((e,r)=>{let a=ex(e_,e.__scopeSelect),i=eS(e_,e.__scopeSelect),[o,l]=n.useState(!1),s=(0,E.useComposedRefs)(r,i.onScrollButtonChange);return(0,O.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){l(t.scrollTop>0)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),o?(0,t.jsx)(eU,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eV.displayName=e_;var eW="SelectScrollDownButton",eO=n.forwardRef((e,r)=>{let a=ex(eW,e.__scopeSelect),i=eS(eW,e.__scopeSelect),[o,l]=n.useState(!1),s=(0,E.useComposedRefs)(r,i.onScrollButtonChange);return(0,O.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;l(Math.ceil(t.scrollTop)<e)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),o?(0,t.jsx)(eU,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eO.displayName=eW;var eU=n.forwardRef((e,r)=>{let{__scopeSelect:a,onAutoScroll:i,...o}=e,l=ex("SelectScrollButton",a),s=n.useRef(null),d=Q(a),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,O.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,...o,ref:r,style:{flexShrink:0,...o.style},onPointerDown:(0,N.composeEventHandlers)(o.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(i,50))}),onPointerMove:(0,N.composeEventHandlers)(o.onPointerMove,()=>{l.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(i,50))}),onPointerLeave:(0,N.composeEventHandlers)(o.onPointerLeave,()=>{c()})})}),eK=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return(0,t.jsx)(B.Primitive.div,{"aria-hidden":!0,...a,ref:n})});eK.displayName="SelectSeparator";var eq="SelectArrow",eG=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=en(r),o=ea(eq,r),l=ex(eq,r);return o.open&&"popper"===l.position?(0,t.jsx)(H.Arrow,{...i,...a,ref:n}):null});eG.displayName=eq;var e$=n.forwardRef(({__scopeSelect:e,value:r,...a},i)=>{let o=n.useRef(null),l=(0,E.useComposedRefs)(i,o),s=(0,U.usePrevious)(r);return n.useEffect(()=>{let e=o.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(B.Primitive.select,{...a,style:{...K.VISUALLY_HIDDEN_STYLES,...a.style},ref:l,defaultValue:r})});function eY(e){return""===e||void 0===e}function eZ(e){let t=(0,V.useCallbackRef)(e),r=n.useRef(""),a=n.useRef(0),i=n.useCallback(e=>{let n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(a.current),""!==t&&(a.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),o=n.useCallback(()=>{r.current="",window.clearTimeout(a.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(a.current),[]),[r,i,o]}function eX(e,t,n){var r,a;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1,l=(r=e,a=Math.max(o,0),r.map((e,t)=>r[(a+t)%r.length]));1===i.length&&(l=l.filter(e=>e!==n));let s=l.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}e$.displayName="SelectBubbleInput",e.s(["Arrow",()=>eG,"Content",()=>ef,"Group",()=>eP,"Icon",()=>ep,"Item",()=>eL,"ItemIndicator",()=>eB,"ItemText",()=>eH,"Label",()=>eR,"Portal",()=>em,"Root",()=>el,"ScrollDownButton",()=>eO,"ScrollUpButton",()=>eV,"Select",()=>el,"SelectArrow",()=>eG,"SelectContent",()=>ef,"SelectGroup",()=>eP,"SelectIcon",()=>ep,"SelectItem",()=>eL,"SelectItemIndicator",()=>eB,"SelectItemText",()=>eH,"SelectLabel",()=>eR,"SelectPortal",()=>em,"SelectScrollDownButton",()=>eO,"SelectScrollUpButton",()=>eV,"SelectSeparator",()=>eK,"SelectTrigger",()=>ed,"SelectValue",()=>eu,"SelectViewport",()=>ek,"Separator",()=>eK,"Trigger",()=>ed,"Value",()=>eu,"Viewport",()=>ek,"createSelectScope",()=>et],83830);var eQ=e.i(83830),eQ=eQ,eJ=e.i(99105);let e0=(0,a.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),e1=eQ.Root;eQ.Group;let e2=eQ.Value,e3=n.forwardRef(({className:e,children:n,...r},a)=>(0,t.jsxs)(eQ.Trigger,{ref:a,className:(0,b.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,(0,t.jsx)(eQ.Icon,{asChild:!0,children:(0,t.jsx)(eJ.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));e3.displayName=eQ.Trigger.displayName;let e5=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eQ.ScrollUpButton,{ref:r,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(e0,{className:"h-4 w-4"})}));e5.displayName=eQ.ScrollUpButton.displayName;let e4=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eQ.ScrollDownButton,{ref:r,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eJ.ChevronDown,{className:"h-4 w-4"})}));e4.displayName=eQ.ScrollDownButton.displayName;let e8=n.forwardRef(({className:e,children:n,position:r="popper",...a},i)=>(0,t.jsx)(eQ.Portal,{children:(0,t.jsxs)(eQ.Content,{ref:i,className:(0,b.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...a,children:[(0,t.jsx)(e5,{}),(0,t.jsx)(eQ.Viewport,{className:(0,b.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e4,{})]})}));e8.displayName=eQ.Content.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eQ.Label,{ref:r,className:(0,b.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=eQ.Label.displayName;let e6=n.forwardRef(({className:e,children:n,...r},a)=>(0,t.jsxs)(eQ.Item,{ref:a,className:(0,b.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(eQ.ItemIndicator,{children:(0,t.jsx)(o.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eQ.ItemText,{children:n})]}));e6.displayName=eQ.Item.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eQ.Separator,{ref:r,className:(0,b.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=eQ.Separator.displayName;var e7=e.i(21023);let e9=(0,e7.createServerReference)("40931e04ed38332cd1d5a727e3ff3b822d83f7736c",e7.callServer,void 0,e7.findSourceMapURL,"updateSettingsAction");var te=e.i(17406),tt=e.i(98804),tn=e.i(44229),tr=e.i(83902);function ta(e){return(0,t.jsx)(tn.Code,{className:(0,b.cn)("h-4 w-4",e.className),...e})}function ti({className:e}){return(0,t.jsx)(tt.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function to({className:e}){return(0,t.jsx)(tt.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function tl({className:e}){return(0,t.jsx)(tt.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function ts({className:e}){return(0,t.jsx)(tt.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function td({className:e,...n}){return(0,t.jsx)(tr.Rocket,{className:(0,b.cn)("h-4 w-4",e),...n})}ti.displayName="VsCodeIcon",to.displayName="CursorEditorIcon",tl.displayName="WindsurfIcon",ts.displayName="ZedIcon",td.displayName="AntigravityIcon";let tc={vscode:ti,cursor:to,windsurf:tl,zed:ts,antigravity:td};var tu=e.i(41413),tp=e.i(77624),tm=["PageUp","PageDown"],th=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tf={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tg="Slider",[tx,tv,tw]=(0,P.createCollection)(tg),[tb,ty]=(0,R.createContextScope)(tg,[tw]),[tj,tS]=tb(tg),tC=n.forwardRef((e,r)=>{let{name:a,min:i=0,max:o=100,step:l=1,orientation:s="horizontal",disabled:d=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[i],value:p,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:f=!1,form:g,...x}=e,v=n.useRef(new Set),w=n.useRef(0),b="horizontal"===s,[y=[],j]=(0,W.useControllableState)({prop:p,defaultProp:u,onChange:e=>{let t=[...v.current];t[w.current]?.focus(),m(e)}}),S=n.useRef(y);function C(e,t,{commit:n}={commit:!1}){let r,a=(String(l).split(".")[1]||"").length,s=Math.round((Math.round((e-i)/l)*l+i)*(r=Math.pow(10,a)))/r,d=(0,M.clamp)(s,[i,o]);j((e=[])=>{let r=function(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}(e,d,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,n)=>e[n+1]-t))>=t;return!0}(r,c*l))return e;{w.current=r.indexOf(d);let t=String(r)!==String(e);return t&&n&&h(r),t?r:e}})}return(0,t.jsx)(tj,{scope:e.__scopeSlider,name:a,disabled:d,min:i,max:o,valueIndexToChangeRef:w,thumbs:v.current,values:y,orientation:s,form:g,children:(0,t.jsx)(tx.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(tx.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(b?tM:tN,{"aria-disabled":d,"data-disabled":d?"":void 0,...x,ref:r,onPointerDown:(0,N.composeEventHandlers)(x.onPointerDown,()=>{d||(S.current=y)}),min:i,max:o,inverted:f,onSlideStart:d?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}(y,e);C(e,t)},onSlideMove:d?void 0:function(e){C(e,w.current)},onSlideEnd:d?void 0:function(){let e=S.current[w.current];y[w.current]!==e&&h(y)},onHomeKeyDown:()=>!d&&C(i,0,{commit:!0}),onEndKeyDown:()=>!d&&C(o,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!d){let n=tm.includes(e.key)||e.shiftKey&&th.includes(e.key),r=w.current;C(y[r]+l*(n?10:1)*t,r,{commit:!0})}}})})})})});tC.displayName=tg;var[tk,tI]=tb(tg,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tM=n.forwardRef((e,r)=>{let{min:a,max:i,dir:o,inverted:l,onSlideStart:s,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...p}=e,[m,h]=n.useState(null),f=(0,E.useComposedRefs)(r,e=>h(e)),g=n.useRef(void 0),x=(0,T.useDirection)(o),v="ltr"===x,w=v&&!l||!v&&l;function b(e){let t=g.current||m.getBoundingClientRect(),n=tB([0,t.width],w?[a,i]:[i,a]);return g.current=t,n(e-t.left)}return(0,t.jsx)(tk,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:(0,t.jsx)(tP,{dir:x,"data-orientation":"horizontal",...p,ref:f,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=b(e.clientX);s?.(t)},onSlideMove:e=>{let t=b(e.clientX);d?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=tf[w?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),tN=n.forwardRef((e,r)=>{let{min:a,max:i,inverted:o,onSlideStart:l,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=e,p=n.useRef(null),m=(0,E.useComposedRefs)(r,p),h=n.useRef(void 0),f=!o;function g(e){let t=h.current||p.current.getBoundingClientRect(),n=tB([0,t.height],f?[i,a]:[a,i]);return h.current=t,n(e-t.top)}return(0,t.jsx)(tk,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,t.jsx)(tP,{"data-orientation":"vertical",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=g(e.clientY);l?.(t)},onSlideMove:e=>{let t=g(e.clientY);s?.(t)},onSlideEnd:()=>{h.current=void 0,d?.()},onStepKeyDown:e=>{let t=tf[f?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),tP=n.forwardRef((e,n)=>{let{__scopeSlider:r,onSlideStart:a,onSlideMove:i,onSlideEnd:o,onHomeKeyDown:l,onEndKeyDown:s,onStepKeyDown:d,...c}=e,u=tS(tg,r);return(0,t.jsx)(B.Primitive.span,{...c,ref:n,onKeyDown:(0,N.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(l(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):tm.concat(th).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:(0,N.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():a(e)}),onPointerMove:(0,N.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:(0,N.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),o(e))})})}),tE="SliderTrack",tR=n.forwardRef((e,n)=>{let{__scopeSlider:r,...a}=e,i=tS(tE,r);return(0,t.jsx)(B.Primitive.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...a,ref:n})});tR.displayName=tE;var tT="SliderRange",tA=n.forwardRef((e,r)=>{let{__scopeSlider:a,...i}=e,o=tS(tT,a),l=tI(tT,a),s=n.useRef(null),d=(0,E.useComposedRefs)(r,s),c=o.values.length,u=o.values.map(e=>tz(e,o.min,o.max)),p=c>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(B.Primitive.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...i,ref:d,style:{...e.style,[l.startEdge]:p+"%",[l.endEdge]:m+"%"}})});tA.displayName=tT;var tD="SliderThumb",tL=n.forwardRef((e,r)=>{let a=tv(e.__scopeSlider),[i,o]=n.useState(null),l=(0,E.useComposedRefs)(r,e=>o(e)),s=n.useMemo(()=>i?a().findIndex(e=>e.ref.current===i):-1,[a,i]);return(0,t.jsx)(tF,{...e,ref:l,index:s})}),tF=n.forwardRef((e,r)=>{var a,i,o,l,s;let d,c,{__scopeSlider:u,index:p,name:m,...h}=e,f=tS(tD,u),g=tI(tD,u),[x,v]=n.useState(null),w=(0,E.useComposedRefs)(r,e=>v(e)),b=!x||f.form||!!x.closest("form"),y=(0,tp.useSize)(x),j=f.values[p],S=void 0===j?0:tz(j,f.min,f.max),C=(a=p,(i=f.values.length)>2?`Value ${a+1} of ${i}`:2===i?["Minimum","Maximum"][a]:void 0),k=y?.[g.size],I=k?(o=k,l=S,s=g.direction,c=tB([0,50],[0,d=o/2]),(d-c(l)*s)*s):0;return n.useEffect(()=>{if(x)return f.thumbs.add(x),()=>{f.thumbs.delete(x)}},[x,f.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[g.startEdge]:`calc(${S}% + ${I}px)`},children:[(0,t.jsx)(tx.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(B.Primitive.span,{role:"slider","aria-label":e["aria-label"]||C,"aria-valuemin":f.min,"aria-valuenow":j,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...h,ref:w,style:void 0===j?{display:"none"}:e.style,onFocus:(0,N.composeEventHandlers)(e.onFocus,()=>{f.valueIndexToChangeRef.current=p})})}),b&&(0,t.jsx)(tH,{name:m??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:j},p)]})});tL.displayName=tD;var tH=n.forwardRef(({__scopeSlider:e,value:r,...a},i)=>{let o=n.useRef(null),l=(0,E.useComposedRefs)(o,i),s=(0,U.usePrevious)(r);return n.useEffect(()=>{let e=o.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==r&&t){let n=new Event("input",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(B.Primitive.input,{style:{display:"none"},...a,ref:l,defaultValue:r})});function tz(e,t,n){return(0,M.clamp)(100/(n-t)*(e-t),[0,100])}function tB(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}tH.displayName="RadioBubbleInput",e.s(["Range",()=>tA,"Root",()=>tC,"Slider",()=>tC,"SliderRange",()=>tA,"SliderThumb",()=>tL,"SliderTrack",()=>tR,"Thumb",()=>tL,"Track",()=>tR,"createSliderScope",()=>ty],29991);var t_=e.i(29991),t_=t_;function tV({className:e,defaultValue:r,value:a,min:i=0,max:o=100,...l}){let s=n.useMemo(()=>Array.isArray(a)?a:Array.isArray(r)?r:[i,o],[a,r,i,o]);return(0,t.jsxs)(t_.Root,{"data-slot":"slider",defaultValue:r,value:a,min:i,max:o,className:(0,b.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...l,children:[(0,t.jsx)(t_.Track,{"data-slot":"slider-track",className:(0,b.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(t_.Range,{"data-slot":"slider-range",className:(0,b.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,n)=>(0,t.jsx)(t_.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},n))]})}let tW=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],tO=tW.length-1;function tU(e){let t=0,n=Math.abs(e-tW[0]);for(let r=1;r<tW.length;r++){let a=Math.abs(e-tW[r]);a<n&&(n=a,t=r)}return t}function tK({id:e,testId:r,value:a,onChange:i,onBlur:o,defaultSeconds:l=1800}){var s;let d,c,u=(""===a?l:parseInt(a,10))||l,[p,m]=(0,n.useState)(()=>tU(u)),h=tU(u);h!==p&&tW[p]!==u&&m(h);let f=(0,n.useCallback)(([e])=>{m(e),i(String(tW[e]))},[i]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(tV,{id:e,"data-testid":r,min:0,max:tO,step:1,value:[p],onValueChange:f,onValueCommit:()=>o(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-right text-xs tabular-nums",children:(d=Math.floor((s=tW[p])/3600),c=Math.round(s%3600/60),0===d?`${c}m`:0===c?`${d}h`:`${d}h ${c}m`)})]})}let tq=[{value:te.AgentAuthMethod.Session,label:"Session"},{value:te.AgentAuthMethod.Token,label:"Token"}],tG=[{value:te.EditorType.VsCode,label:"VS Code"},{value:te.EditorType.Cursor,label:"Cursor"},{value:te.EditorType.Windsurf,label:"Windsurf"},{value:te.EditorType.Zed,label:"Zed"},{value:te.EditorType.Antigravity,label:"Antigravity"}],t$=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],tY=[{id:"agent",label:"Agent",icon:l.Bot},{id:"environment",label:"Environment",icon:s.Terminal},{id:"workflow",label:"Workflow",icon:d.GitBranch},{id:"ci",label:"CI",icon:c},{id:"stage-timeouts",label:"Timeouts",icon:v},{id:"notifications",label:"Notifications",icon:u},{id:"feature-flags",label:"Flags",icon:p},{id:"database",label:"Database",icon:m}];function tZ({label:e,description:n,htmlFor:r,children:a}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(y.Label,{htmlFor:r,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),n?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:n}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a})]})}function tX({label:e,description:n,id:r,testId:a,checked:i,onChange:o,disabled:l}){return(0,t.jsx)(tZ,{label:e,description:n,htmlFor:r,children:(0,t.jsx)(C.Switch,{id:r,"data-testid":a,checked:i,onCheckedChange:o,disabled:l,className:(0,b.cn)("cursor-pointer",l&&"cursor-not-allowed opacity-50")})})}function tQ({icon:e,title:n,description:r,badge:a,testId:i,children:o}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":i,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:n}),a?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:a}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:r})]}),(0,t.jsx)("div",{className:"px-4",children:o})]})}function tJ({id:e,testId:n,value:r,onChange:a,onBlur:i,placeholder:o,min:l=1,max:s,step:d=1,suffix:c}){let u=""===r?void 0:parseInt(r,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{a(String(Math.max(l,(u??parseInt(o,10))-d)))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":"Decrease",children:(0,t.jsx)(h.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":n,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:r,placeholder:o,onChange:e=>{a(e.target.value.replace(/[^0-9]/g,""))},onBlur:i,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=u??parseInt(o,10),a(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":"Increase",children:(0,t.jsx)(f.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function t0({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 t1({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 t2({settings:e,shepHome:a,dbFileSize:h,availableTerminals:f}){let{showSaving:g,showSaved:y,save:C}=function(){let[e,t]=(0,n.useTransition)(),[r,a]=(0,n.useState)(!1),[i,o]=(0,n.useState)(!1),l=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!r&&(a(!0),s.current=!1,l.current=setTimeout(()=>{l.current=null,s.current&&(a(!1),o(!0),setTimeout(()=>o(!1),2e3))},350)),!e&&r&&(s.current=!0,l.current||(a(!1),o(!0),setTimeout(()=>o(!1),2e3)))},[e,r]),{showSaving:r,showSaved:i,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e9(e);t.success||w.toast.error(t.error??"Failed to save settings")})},[t])}}(),I=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1},[M,N]=(0,n.useState)(e.agent.type),P=e.agent.authMethod,[E,R]=(0,n.useState)(e.agent.token??""),[T,A]=(0,n.useState)(!1),[D,L]=(0,n.useState)(e.environment.defaultEditor),[F,H]=(0,n.useState)(e.environment.shellPreference),[z,B]=(0,n.useState)(e.environment.terminalPreference??te.TerminalType.System),_=f?f.filter(e=>e.available):[{id:te.TerminalType.System,name:"System Terminal",available:!0}],[V,W]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[O,U]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[K,q]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[G,$]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[Y,Z]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[X,Q]=(0,n.useState)(e.workflow.enableEvidence),[J,ee]=(0,n.useState)(e.workflow.commitEvidence),[et,en]=(0,n.useState)(!1!==e.workflow.ciWatchEnabled),[er,ea]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[ei,eo]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[el,es]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[ed,ec]=(0,n.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),eu=e.workflow.stageTimeouts,[ep,em]=(0,n.useState)(String(Math.round((eu?.analyzeMs??18e5)/1e3))),[eh,ef]=(0,n.useState)(String(Math.round((eu?.requirementsMs??18e5)/1e3))),[eg,ex]=(0,n.useState)(String(Math.round((eu?.researchMs??18e5)/1e3))),[ev,ew]=(0,n.useState)(String(Math.round((eu?.planMs??18e5)/1e3))),[eb,ey]=(0,n.useState)(String(Math.round((eu?.implementMs??18e5)/1e3))),[ej,eS]=(0,n.useState)(String(Math.round((eu?.mergeMs??18e5)/1e3))),eC=e.workflow.analyzeRepoTimeouts,[ek,eI]=(0,n.useState)(String(Math.round((eC?.analyzeMs??6e5)/1e3))),[eM,eN]=(0,n.useState)(e.notifications.inApp.enabled),[eP,eE]=(0,n.useState)(e.notifications.browser.enabled),[eR,eT]=(0,n.useState)(e.notifications.desktop.enabled),[eA,eD]=(0,n.useState)({...e.notifications.events}),[eL,eF]=(0,n.useState)({...I}),eH=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",ez=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",eB=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",e_=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"",eV=eu?.analyzeMs!=null?String(Math.round(eu.analyzeMs/1e3)):"",eW=eu?.requirementsMs!=null?String(Math.round(eu.requirementsMs/1e3)):"",eO=eu?.researchMs!=null?String(Math.round(eu.researchMs/1e3)):"",eU=eu?.planMs!=null?String(Math.round(eu.planMs/1e3)):"",eK=eu?.implementMs!=null?String(Math.round(eu.implementMs/1e3)):"",eq=eu?.mergeMs!=null?String(Math.round(eu.mergeMs/1e3)):"",eG=eC?.analyzeMs!=null?String(Math.round(eC.analyzeMs/1e3)):"";function e$(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eY(e){if(void 0===e)return;let t=e$(e);return null!=t?1e3*t:void 0}function eZ(e={}){let t=e$(e.ciTimeout??ei);return{workflow:{openPrOnImplementationComplete:e.openPr??V,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??O,allowPrd:e.allowPrd??K,allowPlan:e.allowPlan??G,allowMerge:e.allowMerge??Y},enableEvidence:e.enableEvidence??X,commitEvidence:e.commitEvidence??J,ciWatchEnabled:e.ciWatchEnabled??et,ciMaxFixAttempts:e$(e.ciMaxFix??er),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:e$(e.ciLogMax??el),ciWatchPollIntervalSeconds:e$(e.ciPollInterval??ed),stageTimeouts:{analyzeMs:eY(e.analyzeTimeout??ep),requirementsMs:eY(e.requirementsTimeout??eh),researchMs:eY(e.researchTimeout??eg),planMs:eY(e.planTimeout??ev),implementMs:eY(e.implementTimeout??eb),mergeMs:eY(e.mergeTimeout??ej)},analyzeRepoTimeouts:{analyzeMs:eY(e.analyzeRepoTimeout??ek)}}}}function eX(e={}){return{notifications:{inApp:{enabled:e.inApp??eM},browser:{enabled:e.browser??eP},desktop:{enabled:e.desktop??eR},events:e.events??eA}}}let[eQ,eJ]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=tY.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&&eJ(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let e0=(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,b.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",g?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,b.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",y&&!g?"opacity-100":"opacity-0"),children:[(0,t.jsx)(o.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:tY.map(e=>{let n=e.icon,r=eQ===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>e0(e.id),className:(0,b.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",r?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(n,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:l.Bot,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:[(0,t.jsx)(tZ,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(tu.AgentModelPicker,{initialAgentType:M,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>N(e),className:"w-55"})}),(0,t.jsx)(tZ,{label:"Authentication",description:"How the agent authenticates",htmlFor:"auth-method",children:(0,t.jsx)(k.TooltipProvider,{children:(0,t.jsxs)(k.Tooltip,{children:[(0,t.jsx)(k.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsxs)(e1,{value:P,disabled:!0,children:[(0,t.jsx)(e3,{id:"auth-method","data-testid":"auth-method-select",className:"w-55 cursor-not-allowed text-xs opacity-60",children:(0,t.jsx)(e2,{})}),(0,t.jsx)(e8,{children:tq.map(e=>(0,t.jsx)(e6,{value:e.value,children:e.label},e.value))})]})})}),(0,t.jsx)(k.TooltipContent,{children:"Coming soon"})]})})}),P===te.AgentAuthMethod.Token&&(0,t.jsx)(tZ,{label:"API Token",htmlFor:"agent-token",children:(0,t.jsxs)("div",{className:"relative w-45",children:[(0,t.jsx)(j.Input,{id:"agent-token","data-testid":"agent-token-input",type:T?"text":"password",value:E,onChange:e=>R(e.target.value),onBlur:()=>{E!==(e.agent.token??"")&&C(function(e={}){let t={type:M,authMethod:P,...e},n={type:t.type,authMethod:t.authMethod};return t.authMethod===te.AgentAuthMethod.Token&&(n.token=e.token??E),{agent:n}}({token:E}))},placeholder:"Enter token",className:"pr-8"}),(0,t.jsx)(S.Button,{type:"button",variant:"ghost",size:"sm",className:"absolute top-0 right-0 h-full px-2 hover:bg-transparent",onClick:()=>A(!T),"data-testid":"toggle-token-visibility","aria-label":T?"Hide token":"Show token",children:T?(0,t.jsx)(i,{className:"h-3 w-3"}):(0,t.jsx)(r.Eye,{className:"h-3 w-3"})})]})})]}),(0,t.jsx)(t1,{links:[{label:"Agent system",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/agent-system.md"},{label:"Adding agents",href:"https://github.com/shep-ai/cli/blob/main/docs/development/adding-agents.md"},{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Choose which AI coding agent powers your features. Each agent supports different models and capabilities. Authentication is resolved automatically via your active session."})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:s.Terminal,title:"Environment",description:"Editor, shell, and terminal preferences",testId:"environment-settings-section",children:[(0,t.jsx)(tZ,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(e1,{value:D,onValueChange:e=>{L(e),C({environment:{defaultEditor:e,shellPreference:F,terminalPreference:z}})},children:[(0,t.jsx)(e3,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(e2,{})}),(0,t.jsx)(e8,{children:tG.map(e=>{var n;let r=(n=e.value)&&n in tc?tc[n]:ta;return(0,t.jsx)(e6,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(tZ,{label:"Shell",description:"Default shell for generated scripts",htmlFor:"shell-preference",children:(0,t.jsxs)(e1,{value:F,onValueChange:e=>{H(e),C({environment:{defaultEditor:D,shellPreference:e,terminalPreference:z}})},children:[(0,t.jsx)(e3,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(e2,{})}),(0,t.jsx)(e8,{children:t$.map(e=>(0,t.jsx)(e6,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(tZ,{label:"Terminal",description:"Terminal emulator for shell sessions",htmlFor:"terminal-preference",children:(0,t.jsxs)(e1,{value:z,onValueChange:e=>{B(e),C({environment:{defaultEditor:D,shellPreference:F,terminalPreference:e}})},children:[(0,t.jsx)(e3,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(e2,{})}),(0,t.jsx)(e8,{children:_.map(e=>(0,t.jsx)(e6,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)(t1,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor opens files for review. The shell setting controls generated scripts. The terminal emulator is launched when opening shell sessions from the web UI."})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:d.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(t0,{children:"Approve"}),(0,t.jsx)(tX,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:K,onChange:e=>{q(e),C(eZ({allowPrd:e}))}}),(0,t.jsx)(tX,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:G,onChange:e=>{$(e),C(eZ({allowPlan:e}))}}),(0,t.jsx)(tX,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:Y,onChange:e=>{Z(e),C(eZ({allowMerge:e}))}}),(0,t.jsx)(t0,{children:"Evidence"}),(0,t.jsx)(tX,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:X,onChange:e=>{Q(e),e?C(eZ({enableEvidence:e})):(ee(!1),C(eZ({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tX,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:J,disabled:!X||!V,onChange:e=>{ee(e),C(eZ({commitEvidence:e}))}}),(0,t.jsx)(t0,{children:"Git"}),(0,t.jsx)(tX,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:O,onChange:e=>{U(e),C(eZ({pushOnComplete:e}))}}),(0,t.jsx)(tX,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:V,onChange:e=>{W(e),e?C(eZ({openPr:e})):(ee(!1),C(eZ({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(tX,{label:"Watch CI after push",description:"Monitor CI and auto-fix failures. Disable to avoid rate limits.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:et,onChange:e=>{en(e),C(eZ({ciWatchEnabled:e}))}})]}),(0,t.jsx)(t1,{links:[{label:"Approval gates",href:"https://github.com/shep-ai/cli/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:"Push & PR flags",href:"https://github.com/shep-ai/cli/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:"Control how autonomous each feature run is. Auto-approve skips the human review pause at each phase. Push and PR options control what happens after successful implementation."})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:c,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tZ,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(tJ,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:er,onChange:ea,onBlur:()=>{er!==eH&&C(eZ({ciMaxFix:er}))},min:1,max:10})}),(0,t.jsx)(tZ,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(tJ,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:ei,onChange:eo,onBlur:()=>{ei!==ez&&C(eZ({ciTimeout:ei}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tZ,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(tJ,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:el,onChange:es,onBlur:()=>{el!==eB&&C(eZ({ciLogMax:el}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(tZ,{label:"Poll interval",description:"How often to check GitHub for CI status updates",htmlFor:"ci-poll-interval",children:(0,t.jsx)(tJ,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:ed,onChange:ec,onBlur:()=>{ed!==e_&&C(eZ({ciPollInterval:ed}))},min:5,step:5,suffix:"sec"})})]}),(0,t.jsx)(t1,{links:[{label:"CI/CD pipeline",href:"https://github.com/shep-ai/cli/blob/main/docs/development/cicd.md"},{label:"CI security gates",href:"https://github.com/shep-ai/cli/blob/main/specs/003-cicd-security-gates/spec.md"}],children:"When a feature completes, the agent can watch CI and auto-fix failures. These limits prevent runaway retries and control how much log output is sent to the agent for analysis."})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:v,title:"Stage Timeouts",description:"Maximum execution time per agent stage",testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(t0,{children:"Feature Agent"}),(0,t.jsx)(tZ,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze",children:(0,t.jsx)(tK,{id:"timeout-analyze",testId:"timeout-analyze-input",value:ep,onChange:em,onBlur:()=>{ep!==eV&&C(eZ({analyzeTimeout:ep}))},defaultSeconds:1800})}),(0,t.jsx)(tZ,{label:"Requirements",description:"Requirements gathering timeout",htmlFor:"timeout-requirements",children:(0,t.jsx)(tK,{id:"timeout-requirements",testId:"timeout-requirements-input",value:eh,onChange:ef,onBlur:()=>{eh!==eW&&C(eZ({requirementsTimeout:eh}))},defaultSeconds:1800})}),(0,t.jsx)(tZ,{label:"Research",description:"Technical research timeout",htmlFor:"timeout-research",children:(0,t.jsx)(tK,{id:"timeout-research",testId:"timeout-research-input",value:eg,onChange:ex,onBlur:()=>{eg!==eO&&C(eZ({researchTimeout:eg}))},defaultSeconds:1800})}),(0,t.jsx)(tZ,{label:"Plan",description:"Implementation planning timeout",htmlFor:"timeout-plan",children:(0,t.jsx)(tK,{id:"timeout-plan",testId:"timeout-plan-input",value:ev,onChange:ew,onBlur:()=>{ev!==eU&&C(eZ({planTimeout:ev}))},defaultSeconds:1800})}),(0,t.jsx)(tZ,{label:"Implement",description:"Code implementation timeout",htmlFor:"timeout-implement",children:(0,t.jsx)(tK,{id:"timeout-implement",testId:"timeout-implement-input",value:eb,onChange:ey,onBlur:()=>{eb!==eK&&C(eZ({implementTimeout:eb}))},defaultSeconds:1800})}),(0,t.jsx)(tZ,{label:"Merge",description:"PR creation and merge timeout",htmlFor:"timeout-merge",children:(0,t.jsx)(tK,{id:"timeout-merge",testId:"timeout-merge-input",value:ej,onChange:eS,onBlur:()=>{ej!==eq&&C(eZ({mergeTimeout:ej}))},defaultSeconds:1800})}),(0,t.jsx)(t0,{children:"Analyze Repository Agent"}),(0,t.jsx)(tZ,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(tK,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:ek,onChange:eI,onBlur:()=>{ek!==eG&&C(eZ({analyzeRepoTimeout:ek}))},defaultSeconds:600})})]}),(0,t.jsx)(t1,{children:"Each agent has independently configurable stage timeouts. When a stage exceeds its timeout, the agent is terminated. Longer timeouts are useful for complex implementations. Feature agent defaults to 30 minutes per stage. Analyze repository agent defaults to 10 minutes."})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:u,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(t0,{children:"Channels"}),(0,t.jsx)(tX,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:eM,onChange:e=>{eN(e),C(eX({inApp:e}))}}),(0,t.jsx)(tX,{label:"Browser",description:"Push notifications via the browser",id:"notif-browser",testId:"switch-browser",checked:eP,onChange:e=>{eE(e),C(eX({browser:e}))}}),(0,t.jsx)(tX,{label:"Desktop",description:"Native OS notifications",id:"notif-desktop",testId:"switch-desktop",checked:eR,onChange:e=>{eT(e),C(eX({desktop:e}))}}),(0,t.jsx)(t0,{children:"Agent Events"}),(0,t.jsx)(tX,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:eA.agentStarted,onChange:e=>{let t={...eA,agentStarted:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:eA.phaseCompleted,onChange:e=>{let t={...eA,phaseCompleted:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:eA.waitingApproval,onChange:e=>{let t={...eA,waitingApproval:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:eA.agentCompleted,onChange:e=>{let t={...eA,agentCompleted:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:eA.agentFailed,onChange:e=>{let t={...eA,agentFailed:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(t0,{children:"Pull Request Events"}),(0,t.jsx)(tX,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:eA.prMerged,onChange:e=>{let t={...eA,prMerged:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:eA.prClosed,onChange:e=>{let t={...eA,prClosed:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:eA.prChecksPassed,onChange:e=>{let t={...eA,prChecksPassed:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:eA.prChecksFailed,onChange:e=>{let t={...eA,prChecksFailed:e};eD(t),C(eX({events:t}))}})]}),(0,t.jsx)(t1,{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)(tQ,{icon:p,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tX,{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};eF(t),C({featureFlags:t})}}),(0,t.jsx)(tX,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:eL.envDeploy,onChange:e=>{let t={...eL,envDeploy:e};eF(t),C({featureFlags:t})}}),(0,t.jsx)(tX,{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};eF(t),C({featureFlags:t})}})]}),(0,t.jsx)(t1,{children:"Experimental features that are still under development. Enable at your own risk — they may change or be removed in future versions. Debug mode adds verbose logging useful for troubleshooting."})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:m,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tZ,{label:"Location",description:"Path to the local SQLite database",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shep-home-path",children:a})}),(0,t.jsx)(tZ,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:h})})]}),(0,t.jsx)(t1,{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",()=>t2],41952)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(20314),n=e.i(79054),r=e.i(87889),a=e.i(3645);let i=(0,a.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 o=e.i(23925),l=e.i(26370),s=e.i(38573),d=e.i(49228);let c=(0,a.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),u=(0,a.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),p=(0,a.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),m=(0,a.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var h=e.i(10714),h=h,f=e.i(3214),g=e.i(30702);let x=(0,a.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),v=(0,a.default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);var w=e.i(60112),b=e.i(31777),y=e.i(41957),j=e.i(98127),S=e.i(35364),C=e.i(51911),k=e.i(2828),I=e.i(26036),M=e.i(27069),N=e.i(91967),P=e.i(87342),E=e.i(5978),R=e.i(22528),T=e.i(66033),A=e.i(53532),D=e.i(41687),L=e.i(56720),F=e.i(13123),H=e.i(52740),z=e.i(39979),B=e.i(87620),_=e.i(86874),V=e.i(29297),W=e.i(36589),O=e.i(5192),U=e.i(23405),K=e.i(1693),q=e.i(73772),G=e.i(13044),$=[" ","Enter","ArrowUp","ArrowDown"],Y=[" ","Enter"],Z="Select",[X,Q,J]=(0,P.createCollection)(Z),[ee,et]=(0,R.createContextScope)(Z,[J,H.createPopperScope]),en=(0,H.createPopperScope)(),[er,ea]=ee(Z),[ei,eo]=ee(Z),el=e=>{let{__scopeSelect:r,children:a,open:i,defaultOpen:o,onOpenChange:l,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:m,disabled:h,required:f,form:g}=e,x=en(r),[v,w]=n.useState(null),[b,y]=n.useState(null),[j,S]=n.useState(!1),C=(0,T.useDirection)(u),[k,I]=(0,W.useControllableState)({prop:i,defaultProp:o??!1,onChange:l,caller:Z}),[M,N]=(0,W.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:Z}),P=n.useRef(null),E=!v||g||!!v.closest("form"),[R,A]=n.useState(new Set),D=Array.from(R).map(e=>e.props.value).join(";");return(0,t.jsx)(H.Root,{...x,children:(0,t.jsxs)(er,{required:f,scope:r,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:j,onValueNodeHasChildrenChange:S,contentId:(0,F.useId)(),value:M,onValueChange:N,open:k,onOpenChange:I,dir:C,triggerPointerDownPosRef:P,disabled:h,children:[(0,t.jsx)(X.Provider,{scope:r,children:(0,t.jsx)(ei,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{A(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:a})}),E?(0,t.jsxs)(e$,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:m,value:M,onChange:e=>N(e.target.value),disabled:h,form:g,children:[void 0===M?(0,t.jsx)("option",{value:""}):null,Array.from(R)]},D):null]})})};el.displayName=Z;var es="SelectTrigger",ed=n.forwardRef((e,r)=>{let{__scopeSelect:a,disabled:i=!1,...o}=e,l=en(a),s=ea(es,a),d=s.disabled||i,c=(0,E.useComposedRefs)(r,s.onTriggerChange),u=Q(a),p=n.useRef("touch"),[m,h,f]=eZ(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=eX(t,e,n);void 0!==r&&s.onValueChange(r.value)}),g=e=>{d||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(H.Anchor,{asChild:!0,...l,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,...o,ref:c,onClick:(0,N.composeEventHandlers)(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,N.composeEventHandlers)(o.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,N.composeEventHandlers)(o.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&$.includes(e.key)&&(g(),e.preventDefault())})})})});ed.displayName=es;var ec="SelectValue",eu=n.forwardRef((e,n)=>{let{__scopeSelect:r,className:a,style:i,children:o,placeholder:l="",...s}=e,d=ea(ec,r),{onValueNodeHasChildrenChange:c}=d,u=void 0!==o,p=(0,E.useComposedRefs)(n,d.onValueNodeChange);return(0,O.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:l}):o})});eu.displayName=ec;var ep=n.forwardRef((e,n)=>{let{__scopeSelect:r,children:a,...i}=e;return(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...i,ref:n,children:a||"▼"})});ep.displayName="SelectIcon";var em=e=>(0,t.jsx)(z.Portal,{asChild:!0,...e});em.displayName="SelectPortal";var eh="SelectContent",ef=n.forwardRef((e,r)=>{let a=ea(eh,e.__scopeSelect),[i,o]=n.useState();return((0,O.useLayoutEffect)(()=>{o(new DocumentFragment)},[]),a.open)?(0,t.jsx)(ew,{...e,ref:r}):i?I.createPortal((0,t.jsx)(eg,{scope:e.__scopeSelect,children:(0,t.jsx)(X.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});ef.displayName=eh;var[eg,ex]=ee(eh),ev=(0,_.createSlot)("SelectContent.RemoveScroll"),ew=n.forwardRef((e,r)=>{let{__scopeSelect:a,position:i="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...w}=e,b=ea(eh,a),[y,j]=n.useState(null),[S,C]=n.useState(null),k=(0,E.useComposedRefs)(r,e=>j(e)),[I,M]=n.useState(null),[P,R]=n.useState(null),T=Q(a),[F,H]=n.useState(!1),z=n.useRef(!1);n.useEffect(()=>{if(y)return(0,q.hideOthers)(y)},[y]),(0,D.useFocusGuards)();let B=n.useCallback(e=>{let[t,...n]=T().map(e=>e.ref.current),[r]=n.slice(-1),a=document.activeElement;for(let n of e)if(n===a||(n?.scrollIntoView({block:"nearest"}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==a))return},[T,S]),_=n.useCallback(()=>B([I,y]),[B,I,y]);n.useEffect(()=>{F&&_()},[F,_]);let{onOpenChange:V,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)||V(!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,V,W]),n.useEffect(()=>{let e=()=>V(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[V]);let[O,U]=eZ(e=>{let t=T().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=eX(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),K=n.useCallback((e,t,n)=>{let r=!z.current&&!n;(void 0!==b.value&&b.value===t||r)&&(M(e),r&&(z.current=!0))},[b.value]),$=n.useCallback(()=>y?.focus(),[y]),Y=n.useCallback((e,t,n)=>{let r=!z.current&&!n;(void 0!==b.value&&b.value===t||r)&&R(e)},[b.value]),Z="popper"===i?ey:eb,X=Z===ey?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(eg,{scope:a,content:y,viewport:S,onViewportChange:C,itemRefCallback:K,selectedItem:I,onItemLeave:$,itemTextRefCallback:Y,focusSelectedItem:_,selectedItemText:P,position:i,isPositioned:F,searchRef:O,children:(0,t.jsx)(G.RemoveScroll,{as:ev,allowPinchZoom:!0,children:(0,t.jsx)(L.FocusScope,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,N.composeEventHandlers)(o,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(A.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,t.jsx)(Z,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...w,...X,onPlaced:()=>H(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:(0,N.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=T().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>B(t)),e.preventDefault()}})})})})})})});ew.displayName="SelectContentImpl";var eb=n.forwardRef((e,r)=>{let{__scopeSelect:a,onPlaced:i,...o}=e,l=ea(eh,a),s=ex(eh,a),[d,c]=n.useState(null),[u,p]=n.useState(null),m=(0,E.useComposedRefs)(r,e=>p(e)),h=Q(a),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=s,y=n.useCallback(()=>{if(l.trigger&&l.valueNode&&d&&u&&x&&v&&w){let e=l.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=l.valueNode.getBoundingClientRect(),r=w.getBoundingClientRect();if("rtl"!==l.dir){let a=r.left-t.left,i=n.left-a,o=e.left-i,l=e.width+o,s=Math.max(l,t.width),c=window.innerWidth-10,u=(0,M.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=l+"px",d.style.left=u+"px"}else{let a=t.right-r.right,i=window.innerWidth-n.right-a,o=window.innerWidth-e.right-i,l=e.width+o,s=Math.max(l,t.width),c=window.innerWidth-10,u=(0,M.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=l+"px",d.style.right=u+"px"}let a=h(),o=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),m=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),b=p+m+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,b),j=window.getComputedStyle(x),S=parseInt(j.paddingTop,10),C=parseInt(j.paddingBottom,10),k=e.top+e.height/2-10,I=v.offsetHeight/2,N=p+m+(v.offsetTop+I);if(N<=k){let e=a.length>0&&v===a[a.length-1].ref.current;d.style.bottom="0px";let t=Math.max(o-k,I+(e?C:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=N+t+"px"}else{let e=a.length>0&&v===a[0].ref.current;d.style.top="0px";let t=Math.max(k,p+x.offsetTop+(e?S:0)+I);d.style.height=t+(b-N)+"px",x.scrollTop=N-k+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=o+"px",i?.(),requestAnimationFrame(()=>f.current=!0)}},[h,l.trigger,l.valueNode,d,u,x,v,w,l.dir,i]);(0,O.useLayoutEffect)(()=>y(),[y]);let[j,S]=n.useState();(0,O.useLayoutEffect)(()=>{u&&S(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)(ej,{scope:a,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,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});eb.displayName="SelectItemAlignedPosition";var ey=n.forwardRef((e,n)=>{let{__scopeSelect:r,align:a="start",collisionPadding:i=10,...o}=e,l=en(r);return(0,t.jsx)(H.Content,{...l,...o,ref:n,align:a,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}})});ey.displayName="SelectPopperPosition";var[ej,eS]=ee(eh,{}),eC="SelectViewport",ek=n.forwardRef((e,r)=>{let{__scopeSelect:a,nonce:i,...o}=e,l=ex(eC,a),s=eS(eC,a),d=(0,E.useComposedRefs)(r,l.onViewportChange),c=n.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,t.jsx)(X.Slot,{scope:a,children:(0,t.jsx)(B.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:(0,N.composeEventHandlers)(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,a=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(a<r){let i=a+e,o=Math.min(r,i),l=i-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});ek.displayName=eC;var eI="SelectGroup",[eM,eN]=ee(eI),eP=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=(0,F.useId)();return(0,t.jsx)(eM,{scope:r,id:i,children:(0,t.jsx)(B.Primitive.div,{role:"group","aria-labelledby":i,...a,ref:n})})});eP.displayName=eI;var eE="SelectLabel",eR=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=eN(eE,r);return(0,t.jsx)(B.Primitive.div,{id:i.id,...a,ref:n})});eR.displayName=eE;var eT="SelectItem",[eA,eD]=ee(eT),eL=n.forwardRef((e,r)=>{let{__scopeSelect:a,value:i,disabled:o=!1,textValue:l,...s}=e,d=ea(eT,a),c=ex(eT,a),u=d.value===i,[p,m]=n.useState(l??""),[h,f]=n.useState(!1),g=(0,E.useComposedRefs)(r,e=>c.itemRefCallback?.(e,i,o)),x=(0,F.useId)(),v=n.useRef("touch"),w=()=>{o||(d.onValueChange(i),d.onOpenChange(!1))};if(""===i)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(eA,{scope:a,value:i,disabled:o,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(X.ItemSlot,{scope:a,value:i,disabled:o,textValue:p,children:(0,t.jsx)(B.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:g,onFocus:(0,N.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,N.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,N.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:(0,N.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:(0,N.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,N.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,o?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,N.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,N.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(Y.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});eL.displayName=eT;var eF="SelectItemText",eH=n.forwardRef((e,r)=>{let{__scopeSelect:a,className:i,style:o,...l}=e,s=ea(eF,a),d=ex(eF,a),c=eD(eF,a),u=eo(eF,a),[p,m]=n.useState(null),h=(0,E.useComposedRefs)(r,e=>m(e),c.onItemTextChange,e=>d.itemTextRefCallback?.(e,c.value,c.disabled)),f=p?.textContent,g=n.useMemo(()=>(0,t.jsx)("option",{value:c.value,disabled:c.disabled,children:f},c.value),[c.disabled,c.value,f]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=u;return(0,O.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Primitive.span,{id:c.textId,...l,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?I.createPortal(l.children,s.valueNode):null]})});eH.displayName=eF;var ez="SelectItemIndicator",eB=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return eD(ez,r).isSelected?(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...a,ref:n}):null});eB.displayName=ez;var e_="SelectScrollUpButton",eV=n.forwardRef((e,r)=>{let a=ex(e_,e.__scopeSelect),i=eS(e_,e.__scopeSelect),[o,l]=n.useState(!1),s=(0,E.useComposedRefs)(r,i.onScrollButtonChange);return(0,O.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){l(t.scrollTop>0)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),o?(0,t.jsx)(eU,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eV.displayName=e_;var eW="SelectScrollDownButton",eO=n.forwardRef((e,r)=>{let a=ex(eW,e.__scopeSelect),i=eS(eW,e.__scopeSelect),[o,l]=n.useState(!1),s=(0,E.useComposedRefs)(r,i.onScrollButtonChange);return(0,O.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;l(Math.ceil(t.scrollTop)<e)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),o?(0,t.jsx)(eU,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eO.displayName=eW;var eU=n.forwardRef((e,r)=>{let{__scopeSelect:a,onAutoScroll:i,...o}=e,l=ex("SelectScrollButton",a),s=n.useRef(null),d=Q(a),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,O.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,...o,ref:r,style:{flexShrink:0,...o.style},onPointerDown:(0,N.composeEventHandlers)(o.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(i,50))}),onPointerMove:(0,N.composeEventHandlers)(o.onPointerMove,()=>{l.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(i,50))}),onPointerLeave:(0,N.composeEventHandlers)(o.onPointerLeave,()=>{c()})})}),eK=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e;return(0,t.jsx)(B.Primitive.div,{"aria-hidden":!0,...a,ref:n})});eK.displayName="SelectSeparator";var eq="SelectArrow",eG=n.forwardRef((e,n)=>{let{__scopeSelect:r,...a}=e,i=en(r),o=ea(eq,r),l=ex(eq,r);return o.open&&"popper"===l.position?(0,t.jsx)(H.Arrow,{...i,...a,ref:n}):null});eG.displayName=eq;var e$=n.forwardRef(({__scopeSelect:e,value:r,...a},i)=>{let o=n.useRef(null),l=(0,E.useComposedRefs)(i,o),s=(0,U.usePrevious)(r);return n.useEffect(()=>{let e=o.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(B.Primitive.select,{...a,style:{...K.VISUALLY_HIDDEN_STYLES,...a.style},ref:l,defaultValue:r})});function eY(e){return""===e||void 0===e}function eZ(e){let t=(0,V.useCallbackRef)(e),r=n.useRef(""),a=n.useRef(0),i=n.useCallback(e=>{let n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(a.current),""!==t&&(a.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),o=n.useCallback(()=>{r.current="",window.clearTimeout(a.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(a.current),[]),[r,i,o]}function eX(e,t,n){var r,a;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1,l=(r=e,a=Math.max(o,0),r.map((e,t)=>r[(a+t)%r.length]));1===i.length&&(l=l.filter(e=>e!==n));let s=l.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}e$.displayName="SelectBubbleInput",e.s(["Arrow",()=>eG,"Content",()=>ef,"Group",()=>eP,"Icon",()=>ep,"Item",()=>eL,"ItemIndicator",()=>eB,"ItemText",()=>eH,"Label",()=>eR,"Portal",()=>em,"Root",()=>el,"ScrollDownButton",()=>eO,"ScrollUpButton",()=>eV,"Select",()=>el,"SelectArrow",()=>eG,"SelectContent",()=>ef,"SelectGroup",()=>eP,"SelectIcon",()=>ep,"SelectItem",()=>eL,"SelectItemIndicator",()=>eB,"SelectItemText",()=>eH,"SelectLabel",()=>eR,"SelectPortal",()=>em,"SelectScrollDownButton",()=>eO,"SelectScrollUpButton",()=>eV,"SelectSeparator",()=>eK,"SelectTrigger",()=>ed,"SelectValue",()=>eu,"SelectViewport",()=>ek,"Separator",()=>eK,"Trigger",()=>ed,"Value",()=>eu,"Viewport",()=>ek,"createSelectScope",()=>et],83830);var eQ=e.i(83830),eQ=eQ,eJ=e.i(99105);let e0=(0,a.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),e1=eQ.Root;eQ.Group;let e2=eQ.Value,e3=n.forwardRef(({className:e,children:n,...r},a)=>(0,t.jsxs)(eQ.Trigger,{ref:a,className:(0,b.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,(0,t.jsx)(eQ.Icon,{asChild:!0,children:(0,t.jsx)(eJ.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));e3.displayName=eQ.Trigger.displayName;let e5=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eQ.ScrollUpButton,{ref:r,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(e0,{className:"h-4 w-4"})}));e5.displayName=eQ.ScrollUpButton.displayName;let e4=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eQ.ScrollDownButton,{ref:r,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eJ.ChevronDown,{className:"h-4 w-4"})}));e4.displayName=eQ.ScrollDownButton.displayName;let e8=n.forwardRef(({className:e,children:n,position:r="popper",...a},i)=>(0,t.jsx)(eQ.Portal,{children:(0,t.jsxs)(eQ.Content,{ref:i,className:(0,b.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...a,children:[(0,t.jsx)(e5,{}),(0,t.jsx)(eQ.Viewport,{className:(0,b.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e4,{})]})}));e8.displayName=eQ.Content.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eQ.Label,{ref:r,className:(0,b.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=eQ.Label.displayName;let e6=n.forwardRef(({className:e,children:n,...r},a)=>(0,t.jsxs)(eQ.Item,{ref:a,className:(0,b.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(eQ.ItemIndicator,{children:(0,t.jsx)(o.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eQ.ItemText,{children:n})]}));e6.displayName=eQ.Item.displayName,n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eQ.Separator,{ref:r,className:(0,b.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=eQ.Separator.displayName;var e9=e.i(21023);let e7=(0,e9.createServerReference)("40197af34a8f3278e67dc64cefd1bea9ca47216ead",e9.callServer,void 0,e9.findSourceMapURL,"updateSettingsAction");var te=e.i(17406),tt=e.i(98804),tn=e.i(44229),tr=e.i(83902);function ta(e){return(0,t.jsx)(tn.Code,{className:(0,b.cn)("h-4 w-4",e.className),...e})}function ti({className:e}){return(0,t.jsx)(tt.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function to({className:e}){return(0,t.jsx)(tt.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function tl({className:e}){return(0,t.jsx)(tt.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function ts({className:e}){return(0,t.jsx)(tt.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function td({className:e,...n}){return(0,t.jsx)(tr.Rocket,{className:(0,b.cn)("h-4 w-4",e),...n})}ti.displayName="VsCodeIcon",to.displayName="CursorEditorIcon",tl.displayName="WindsurfIcon",ts.displayName="ZedIcon",td.displayName="AntigravityIcon";let tc={vscode:ti,cursor:to,windsurf:tl,zed:ts,antigravity:td};var tu=e.i(41413),tp=e.i(77624),tm=["PageUp","PageDown"],th=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tf={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tg="Slider",[tx,tv,tw]=(0,P.createCollection)(tg),[tb,ty]=(0,R.createContextScope)(tg,[tw]),[tj,tS]=tb(tg),tC=n.forwardRef((e,r)=>{let{name:a,min:i=0,max:o=100,step:l=1,orientation:s="horizontal",disabled:d=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[i],value:p,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:f=!1,form:g,...x}=e,v=n.useRef(new Set),w=n.useRef(0),b="horizontal"===s,[y=[],j]=(0,W.useControllableState)({prop:p,defaultProp:u,onChange:e=>{let t=[...v.current];t[w.current]?.focus(),m(e)}}),S=n.useRef(y);function C(e,t,{commit:n}={commit:!1}){let r,a=(String(l).split(".")[1]||"").length,s=Math.round((Math.round((e-i)/l)*l+i)*(r=Math.pow(10,a)))/r,d=(0,M.clamp)(s,[i,o]);j((e=[])=>{let r=function(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}(e,d,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,n)=>e[n+1]-t))>=t;return!0}(r,c*l))return e;{w.current=r.indexOf(d);let t=String(r)!==String(e);return t&&n&&h(r),t?r:e}})}return(0,t.jsx)(tj,{scope:e.__scopeSlider,name:a,disabled:d,min:i,max:o,valueIndexToChangeRef:w,thumbs:v.current,values:y,orientation:s,form:g,children:(0,t.jsx)(tx.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(tx.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(b?tM:tN,{"aria-disabled":d,"data-disabled":d?"":void 0,...x,ref:r,onPointerDown:(0,N.composeEventHandlers)(x.onPointerDown,()=>{d||(S.current=y)}),min:i,max:o,inverted:f,onSlideStart:d?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}(y,e);C(e,t)},onSlideMove:d?void 0:function(e){C(e,w.current)},onSlideEnd:d?void 0:function(){let e=S.current[w.current];y[w.current]!==e&&h(y)},onHomeKeyDown:()=>!d&&C(i,0,{commit:!0}),onEndKeyDown:()=>!d&&C(o,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!d){let n=tm.includes(e.key)||e.shiftKey&&th.includes(e.key),r=w.current;C(y[r]+l*(n?10:1)*t,r,{commit:!0})}}})})})})});tC.displayName=tg;var[tk,tI]=tb(tg,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tM=n.forwardRef((e,r)=>{let{min:a,max:i,dir:o,inverted:l,onSlideStart:s,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...p}=e,[m,h]=n.useState(null),f=(0,E.useComposedRefs)(r,e=>h(e)),g=n.useRef(void 0),x=(0,T.useDirection)(o),v="ltr"===x,w=v&&!l||!v&&l;function b(e){let t=g.current||m.getBoundingClientRect(),n=tB([0,t.width],w?[a,i]:[i,a]);return g.current=t,n(e-t.left)}return(0,t.jsx)(tk,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:(0,t.jsx)(tP,{dir:x,"data-orientation":"horizontal",...p,ref:f,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=b(e.clientX);s?.(t)},onSlideMove:e=>{let t=b(e.clientX);d?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=tf[w?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),tN=n.forwardRef((e,r)=>{let{min:a,max:i,inverted:o,onSlideStart:l,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=e,p=n.useRef(null),m=(0,E.useComposedRefs)(r,p),h=n.useRef(void 0),f=!o;function g(e){let t=h.current||p.current.getBoundingClientRect(),n=tB([0,t.height],f?[i,a]:[a,i]);return h.current=t,n(e-t.top)}return(0,t.jsx)(tk,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,t.jsx)(tP,{"data-orientation":"vertical",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=g(e.clientY);l?.(t)},onSlideMove:e=>{let t=g(e.clientY);s?.(t)},onSlideEnd:()=>{h.current=void 0,d?.()},onStepKeyDown:e=>{let t=tf[f?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),tP=n.forwardRef((e,n)=>{let{__scopeSlider:r,onSlideStart:a,onSlideMove:i,onSlideEnd:o,onHomeKeyDown:l,onEndKeyDown:s,onStepKeyDown:d,...c}=e,u=tS(tg,r);return(0,t.jsx)(B.Primitive.span,{...c,ref:n,onKeyDown:(0,N.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(l(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):tm.concat(th).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:(0,N.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():a(e)}),onPointerMove:(0,N.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:(0,N.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),o(e))})})}),tE="SliderTrack",tR=n.forwardRef((e,n)=>{let{__scopeSlider:r,...a}=e,i=tS(tE,r);return(0,t.jsx)(B.Primitive.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...a,ref:n})});tR.displayName=tE;var tT="SliderRange",tA=n.forwardRef((e,r)=>{let{__scopeSlider:a,...i}=e,o=tS(tT,a),l=tI(tT,a),s=n.useRef(null),d=(0,E.useComposedRefs)(r,s),c=o.values.length,u=o.values.map(e=>tz(e,o.min,o.max)),p=c>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(B.Primitive.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...i,ref:d,style:{...e.style,[l.startEdge]:p+"%",[l.endEdge]:m+"%"}})});tA.displayName=tT;var tD="SliderThumb",tL=n.forwardRef((e,r)=>{let a=tv(e.__scopeSlider),[i,o]=n.useState(null),l=(0,E.useComposedRefs)(r,e=>o(e)),s=n.useMemo(()=>i?a().findIndex(e=>e.ref.current===i):-1,[a,i]);return(0,t.jsx)(tF,{...e,ref:l,index:s})}),tF=n.forwardRef((e,r)=>{var a,i,o,l,s;let d,c,{__scopeSlider:u,index:p,name:m,...h}=e,f=tS(tD,u),g=tI(tD,u),[x,v]=n.useState(null),w=(0,E.useComposedRefs)(r,e=>v(e)),b=!x||f.form||!!x.closest("form"),y=(0,tp.useSize)(x),j=f.values[p],S=void 0===j?0:tz(j,f.min,f.max),C=(a=p,(i=f.values.length)>2?`Value ${a+1} of ${i}`:2===i?["Minimum","Maximum"][a]:void 0),k=y?.[g.size],I=k?(o=k,l=S,s=g.direction,c=tB([0,50],[0,d=o/2]),(d-c(l)*s)*s):0;return n.useEffect(()=>{if(x)return f.thumbs.add(x),()=>{f.thumbs.delete(x)}},[x,f.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[g.startEdge]:`calc(${S}% + ${I}px)`},children:[(0,t.jsx)(tx.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(B.Primitive.span,{role:"slider","aria-label":e["aria-label"]||C,"aria-valuemin":f.min,"aria-valuenow":j,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...h,ref:w,style:void 0===j?{display:"none"}:e.style,onFocus:(0,N.composeEventHandlers)(e.onFocus,()=>{f.valueIndexToChangeRef.current=p})})}),b&&(0,t.jsx)(tH,{name:m??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:j},p)]})});tL.displayName=tD;var tH=n.forwardRef(({__scopeSlider:e,value:r,...a},i)=>{let o=n.useRef(null),l=(0,E.useComposedRefs)(o,i),s=(0,U.usePrevious)(r);return n.useEffect(()=>{let e=o.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==r&&t){let n=new Event("input",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,t.jsx)(B.Primitive.input,{style:{display:"none"},...a,ref:l,defaultValue:r})});function tz(e,t,n){return(0,M.clamp)(100/(n-t)*(e-t),[0,100])}function tB(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}tH.displayName="RadioBubbleInput",e.s(["Range",()=>tA,"Root",()=>tC,"Slider",()=>tC,"SliderRange",()=>tA,"SliderThumb",()=>tL,"SliderTrack",()=>tR,"Thumb",()=>tL,"Track",()=>tR,"createSliderScope",()=>ty],29991);var t_=e.i(29991),t_=t_;function tV({className:e,defaultValue:r,value:a,min:i=0,max:o=100,...l}){let s=n.useMemo(()=>Array.isArray(a)?a:Array.isArray(r)?r:[i,o],[a,r,i,o]);return(0,t.jsxs)(t_.Root,{"data-slot":"slider",defaultValue:r,value:a,min:i,max:o,className:(0,b.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...l,children:[(0,t.jsx)(t_.Track,{"data-slot":"slider-track",className:(0,b.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(t_.Range,{"data-slot":"slider-range",className:(0,b.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,n)=>(0,t.jsx)(t_.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},n))]})}let tW=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],tO=tW.length-1;function tU(e){let t=0,n=Math.abs(e-tW[0]);for(let r=1;r<tW.length;r++){let a=Math.abs(e-tW[r]);a<n&&(n=a,t=r)}return t}function tK({id:e,testId:r,value:a,onChange:i,onBlur:o,defaultSeconds:l=1800}){var s;let d,c,u=(""===a?l:parseInt(a,10))||l,[p,m]=(0,n.useState)(()=>tU(u)),h=tU(u);h!==p&&tW[p]!==u&&m(h);let f=(0,n.useCallback)(([e])=>{m(e),i(String(tW[e]))},[i]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(tV,{id:e,"data-testid":r,min:0,max:tO,step:1,value:[p],onValueChange:f,onValueCommit:()=>o(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-right text-xs tabular-nums",children:(d=Math.floor((s=tW[p])/3600),c=Math.round(s%3600/60),0===d?`${c}m`:0===c?`${d}h`:`${d}h ${c}m`)})]})}let tq=[{value:te.AgentAuthMethod.Session,label:"Session"},{value:te.AgentAuthMethod.Token,label:"Token"}],tG=[{value:te.EditorType.VsCode,label:"VS Code"},{value:te.EditorType.Cursor,label:"Cursor"},{value:te.EditorType.Windsurf,label:"Windsurf"},{value:te.EditorType.Zed,label:"Zed"},{value:te.EditorType.Antigravity,label:"Antigravity"}],t$=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],tY=[{id:"agent",label:"Agent",icon:l.Bot},{id:"environment",label:"Environment",icon:s.Terminal},{id:"workflow",label:"Workflow",icon:d.GitBranch},{id:"ci",label:"CI",icon:c},{id:"stage-timeouts",label:"Timeouts",icon:v},{id:"notifications",label:"Notifications",icon:u},{id:"feature-flags",label:"Flags",icon:p},{id:"database",label:"Database",icon:m}];function tZ({label:e,description:n,htmlFor:r,children:a}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(y.Label,{htmlFor:r,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),n?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:n}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a})]})}function tX({label:e,description:n,id:r,testId:a,checked:i,onChange:o,disabled:l}){return(0,t.jsx)(tZ,{label:e,description:n,htmlFor:r,children:(0,t.jsx)(C.Switch,{id:r,"data-testid":a,checked:i,onCheckedChange:o,disabled:l,className:(0,b.cn)("cursor-pointer",l&&"cursor-not-allowed opacity-50")})})}function tQ({icon:e,title:n,description:r,badge:a,testId:i,children:o}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":i,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:n}),a?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:a}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:r})]}),(0,t.jsx)("div",{className:"px-4",children:o})]})}function tJ({id:e,testId:n,value:r,onChange:a,onBlur:i,placeholder:o,min:l=1,max:s,step:d=1,suffix:c}){let u=""===r?void 0:parseInt(r,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{a(String(Math.max(l,(u??parseInt(o,10))-d)))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":"Decrease",children:(0,t.jsx)(h.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":n,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:r,placeholder:o,onChange:e=>{a(e.target.value.replace(/[^0-9]/g,""))},onBlur:i,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=u??parseInt(o,10),a(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":"Increase",children:(0,t.jsx)(f.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function t0({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 t1({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 t2({settings:e,shepHome:a,dbFileSize:h,availableTerminals:f}){let{showSaving:g,showSaved:y,save:C}=function(){let[e,t]=(0,n.useTransition)(),[r,a]=(0,n.useState)(!1),[i,o]=(0,n.useState)(!1),l=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!r&&(a(!0),s.current=!1,l.current=setTimeout(()=>{l.current=null,s.current&&(a(!1),o(!0),setTimeout(()=>o(!1),2e3))},350)),!e&&r&&(s.current=!0,l.current||(a(!1),o(!0),setTimeout(()=>o(!1),2e3)))},[e,r]),{showSaving:r,showSaved:i,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e7(e);t.success||w.toast.error(t.error??"Failed to save settings")})},[t])}}(),I=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1},[M,N]=(0,n.useState)(e.agent.type),P=e.agent.authMethod,[E,R]=(0,n.useState)(e.agent.token??""),[T,A]=(0,n.useState)(!1),[D,L]=(0,n.useState)(e.environment.defaultEditor),[F,H]=(0,n.useState)(e.environment.shellPreference),[z,B]=(0,n.useState)(e.environment.terminalPreference??te.TerminalType.System),_=f?f.filter(e=>e.available):[{id:te.TerminalType.System,name:"System Terminal",available:!0}],[V,W]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[O,U]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[K,q]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[G,$]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[Y,Z]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[X,Q]=(0,n.useState)(e.workflow.enableEvidence),[J,ee]=(0,n.useState)(e.workflow.commitEvidence),[et,en]=(0,n.useState)(!1!==e.workflow.ciWatchEnabled),[er,ea]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[ei,eo]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[el,es]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[ed,ec]=(0,n.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),eu=e.workflow.stageTimeouts,[ep,em]=(0,n.useState)(String(Math.round((eu?.analyzeMs??18e5)/1e3))),[eh,ef]=(0,n.useState)(String(Math.round((eu?.requirementsMs??18e5)/1e3))),[eg,ex]=(0,n.useState)(String(Math.round((eu?.researchMs??18e5)/1e3))),[ev,ew]=(0,n.useState)(String(Math.round((eu?.planMs??18e5)/1e3))),[eb,ey]=(0,n.useState)(String(Math.round((eu?.implementMs??18e5)/1e3))),[ej,eS]=(0,n.useState)(String(Math.round((eu?.mergeMs??18e5)/1e3))),eC=e.workflow.analyzeRepoTimeouts,[ek,eI]=(0,n.useState)(String(Math.round((eC?.analyzeMs??6e5)/1e3))),[eM,eN]=(0,n.useState)(e.notifications.inApp.enabled),[eP,eE]=(0,n.useState)(e.notifications.browser.enabled),[eR,eT]=(0,n.useState)(e.notifications.desktop.enabled),[eA,eD]=(0,n.useState)({...e.notifications.events}),[eL,eF]=(0,n.useState)({...I}),eH=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",ez=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",eB=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",e_=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"",eV=eu?.analyzeMs!=null?String(Math.round(eu.analyzeMs/1e3)):"",eW=eu?.requirementsMs!=null?String(Math.round(eu.requirementsMs/1e3)):"",eO=eu?.researchMs!=null?String(Math.round(eu.researchMs/1e3)):"",eU=eu?.planMs!=null?String(Math.round(eu.planMs/1e3)):"",eK=eu?.implementMs!=null?String(Math.round(eu.implementMs/1e3)):"",eq=eu?.mergeMs!=null?String(Math.round(eu.mergeMs/1e3)):"",eG=eC?.analyzeMs!=null?String(Math.round(eC.analyzeMs/1e3)):"";function e$(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eY(e){if(void 0===e)return;let t=e$(e);return null!=t?1e3*t:void 0}function eZ(e={}){let t=e$(e.ciTimeout??ei);return{workflow:{openPrOnImplementationComplete:e.openPr??V,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??O,allowPrd:e.allowPrd??K,allowPlan:e.allowPlan??G,allowMerge:e.allowMerge??Y},enableEvidence:e.enableEvidence??X,commitEvidence:e.commitEvidence??J,ciWatchEnabled:e.ciWatchEnabled??et,ciMaxFixAttempts:e$(e.ciMaxFix??er),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:e$(e.ciLogMax??el),ciWatchPollIntervalSeconds:e$(e.ciPollInterval??ed),stageTimeouts:{analyzeMs:eY(e.analyzeTimeout??ep),requirementsMs:eY(e.requirementsTimeout??eh),researchMs:eY(e.researchTimeout??eg),planMs:eY(e.planTimeout??ev),implementMs:eY(e.implementTimeout??eb),mergeMs:eY(e.mergeTimeout??ej)},analyzeRepoTimeouts:{analyzeMs:eY(e.analyzeRepoTimeout??ek)}}}}function eX(e={}){return{notifications:{inApp:{enabled:e.inApp??eM},browser:{enabled:e.browser??eP},desktop:{enabled:e.desktop??eR},events:e.events??eA}}}let[eQ,eJ]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=tY.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&&eJ(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let e0=(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,b.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",g?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,b.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",y&&!g?"opacity-100":"opacity-0"),children:[(0,t.jsx)(o.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:tY.map(e=>{let n=e.icon,r=eQ===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>e0(e.id),className:(0,b.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",r?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(n,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:l.Bot,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:[(0,t.jsx)(tZ,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(tu.AgentModelPicker,{initialAgentType:M,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>N(e),className:"w-55"})}),(0,t.jsx)(tZ,{label:"Authentication",description:"How the agent authenticates",htmlFor:"auth-method",children:(0,t.jsx)(k.TooltipProvider,{children:(0,t.jsxs)(k.Tooltip,{children:[(0,t.jsx)(k.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsxs)(e1,{value:P,disabled:!0,children:[(0,t.jsx)(e3,{id:"auth-method","data-testid":"auth-method-select",className:"w-55 cursor-not-allowed text-xs opacity-60",children:(0,t.jsx)(e2,{})}),(0,t.jsx)(e8,{children:tq.map(e=>(0,t.jsx)(e6,{value:e.value,children:e.label},e.value))})]})})}),(0,t.jsx)(k.TooltipContent,{children:"Coming soon"})]})})}),P===te.AgentAuthMethod.Token&&(0,t.jsx)(tZ,{label:"API Token",htmlFor:"agent-token",children:(0,t.jsxs)("div",{className:"relative w-45",children:[(0,t.jsx)(j.Input,{id:"agent-token","data-testid":"agent-token-input",type:T?"text":"password",value:E,onChange:e=>R(e.target.value),onBlur:()=>{E!==(e.agent.token??"")&&C(function(e={}){let t={type:M,authMethod:P,...e},n={type:t.type,authMethod:t.authMethod};return t.authMethod===te.AgentAuthMethod.Token&&(n.token=e.token??E),{agent:n}}({token:E}))},placeholder:"Enter token",className:"pr-8"}),(0,t.jsx)(S.Button,{type:"button",variant:"ghost",size:"sm",className:"absolute top-0 right-0 h-full px-2 hover:bg-transparent",onClick:()=>A(!T),"data-testid":"toggle-token-visibility","aria-label":T?"Hide token":"Show token",children:T?(0,t.jsx)(i,{className:"h-3 w-3"}):(0,t.jsx)(r.Eye,{className:"h-3 w-3"})})]})})]}),(0,t.jsx)(t1,{links:[{label:"Agent system",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/agent-system.md"},{label:"Adding agents",href:"https://github.com/shep-ai/cli/blob/main/docs/development/adding-agents.md"},{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Choose which AI coding agent powers your features. Each agent supports different models and capabilities. Authentication is resolved automatically via your active session."})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:s.Terminal,title:"Environment",description:"Editor, shell, and terminal preferences",testId:"environment-settings-section",children:[(0,t.jsx)(tZ,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(e1,{value:D,onValueChange:e=>{L(e),C({environment:{defaultEditor:e,shellPreference:F,terminalPreference:z}})},children:[(0,t.jsx)(e3,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(e2,{})}),(0,t.jsx)(e8,{children:tG.map(e=>{var n;let r=(n=e.value)&&n in tc?tc[n]:ta;return(0,t.jsx)(e6,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(tZ,{label:"Shell",description:"Default shell for generated scripts",htmlFor:"shell-preference",children:(0,t.jsxs)(e1,{value:F,onValueChange:e=>{H(e),C({environment:{defaultEditor:D,shellPreference:e,terminalPreference:z}})},children:[(0,t.jsx)(e3,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(e2,{})}),(0,t.jsx)(e8,{children:t$.map(e=>(0,t.jsx)(e6,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(tZ,{label:"Terminal",description:"Terminal emulator for shell sessions",htmlFor:"terminal-preference",children:(0,t.jsxs)(e1,{value:z,onValueChange:e=>{B(e),C({environment:{defaultEditor:D,shellPreference:F,terminalPreference:e}})},children:[(0,t.jsx)(e3,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(e2,{})}),(0,t.jsx)(e8,{children:_.map(e=>(0,t.jsx)(e6,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)(t1,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor opens files for review. The shell setting controls generated scripts. The terminal emulator is launched when opening shell sessions from the web UI."})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:d.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(t0,{children:"Approve"}),(0,t.jsx)(tX,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:K,onChange:e=>{q(e),C(eZ({allowPrd:e}))}}),(0,t.jsx)(tX,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:G,onChange:e=>{$(e),C(eZ({allowPlan:e}))}}),(0,t.jsx)(tX,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:Y,onChange:e=>{Z(e),C(eZ({allowMerge:e}))}}),(0,t.jsx)(t0,{children:"Evidence"}),(0,t.jsx)(tX,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:X,onChange:e=>{Q(e),e?C(eZ({enableEvidence:e})):(ee(!1),C(eZ({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tX,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:J,disabled:!X||!V,onChange:e=>{ee(e),C(eZ({commitEvidence:e}))}}),(0,t.jsx)(t0,{children:"Git"}),(0,t.jsx)(tX,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:O,onChange:e=>{U(e),C(eZ({pushOnComplete:e}))}}),(0,t.jsx)(tX,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:V,onChange:e=>{W(e),e?C(eZ({openPr:e})):(ee(!1),C(eZ({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(tX,{label:"Watch CI after push",description:"Monitor CI and auto-fix failures. Disable to avoid rate limits.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:et,onChange:e=>{en(e),C(eZ({ciWatchEnabled:e}))}})]}),(0,t.jsx)(t1,{links:[{label:"Approval gates",href:"https://github.com/shep-ai/cli/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:"Push & PR flags",href:"https://github.com/shep-ai/cli/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:"Control how autonomous each feature run is. Auto-approve skips the human review pause at each phase. Push and PR options control what happens after successful implementation."})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:c,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tZ,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(tJ,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:er,onChange:ea,onBlur:()=>{er!==eH&&C(eZ({ciMaxFix:er}))},min:1,max:10})}),(0,t.jsx)(tZ,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(tJ,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:ei,onChange:eo,onBlur:()=>{ei!==ez&&C(eZ({ciTimeout:ei}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tZ,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(tJ,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:el,onChange:es,onBlur:()=>{el!==eB&&C(eZ({ciLogMax:el}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(tZ,{label:"Poll interval",description:"How often to check GitHub for CI status updates",htmlFor:"ci-poll-interval",children:(0,t.jsx)(tJ,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:ed,onChange:ec,onBlur:()=>{ed!==e_&&C(eZ({ciPollInterval:ed}))},min:5,step:5,suffix:"sec"})})]}),(0,t.jsx)(t1,{links:[{label:"CI/CD pipeline",href:"https://github.com/shep-ai/cli/blob/main/docs/development/cicd.md"},{label:"CI security gates",href:"https://github.com/shep-ai/cli/blob/main/specs/003-cicd-security-gates/spec.md"}],children:"When a feature completes, the agent can watch CI and auto-fix failures. These limits prevent runaway retries and control how much log output is sent to the agent for analysis."})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:v,title:"Stage Timeouts",description:"Maximum execution time per agent stage",testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(t0,{children:"Feature Agent"}),(0,t.jsx)(tZ,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze",children:(0,t.jsx)(tK,{id:"timeout-analyze",testId:"timeout-analyze-input",value:ep,onChange:em,onBlur:()=>{ep!==eV&&C(eZ({analyzeTimeout:ep}))},defaultSeconds:1800})}),(0,t.jsx)(tZ,{label:"Requirements",description:"Requirements gathering timeout",htmlFor:"timeout-requirements",children:(0,t.jsx)(tK,{id:"timeout-requirements",testId:"timeout-requirements-input",value:eh,onChange:ef,onBlur:()=>{eh!==eW&&C(eZ({requirementsTimeout:eh}))},defaultSeconds:1800})}),(0,t.jsx)(tZ,{label:"Research",description:"Technical research timeout",htmlFor:"timeout-research",children:(0,t.jsx)(tK,{id:"timeout-research",testId:"timeout-research-input",value:eg,onChange:ex,onBlur:()=>{eg!==eO&&C(eZ({researchTimeout:eg}))},defaultSeconds:1800})}),(0,t.jsx)(tZ,{label:"Plan",description:"Implementation planning timeout",htmlFor:"timeout-plan",children:(0,t.jsx)(tK,{id:"timeout-plan",testId:"timeout-plan-input",value:ev,onChange:ew,onBlur:()=>{ev!==eU&&C(eZ({planTimeout:ev}))},defaultSeconds:1800})}),(0,t.jsx)(tZ,{label:"Implement",description:"Code implementation timeout",htmlFor:"timeout-implement",children:(0,t.jsx)(tK,{id:"timeout-implement",testId:"timeout-implement-input",value:eb,onChange:ey,onBlur:()=>{eb!==eK&&C(eZ({implementTimeout:eb}))},defaultSeconds:1800})}),(0,t.jsx)(tZ,{label:"Merge",description:"PR creation and merge timeout",htmlFor:"timeout-merge",children:(0,t.jsx)(tK,{id:"timeout-merge",testId:"timeout-merge-input",value:ej,onChange:eS,onBlur:()=>{ej!==eq&&C(eZ({mergeTimeout:ej}))},defaultSeconds:1800})}),(0,t.jsx)(t0,{children:"Analyze Repository Agent"}),(0,t.jsx)(tZ,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(tK,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:ek,onChange:eI,onBlur:()=>{ek!==eG&&C(eZ({analyzeRepoTimeout:ek}))},defaultSeconds:600})})]}),(0,t.jsx)(t1,{children:"Each agent has independently configurable stage timeouts. When a stage exceeds its timeout, the agent is terminated. Longer timeouts are useful for complex implementations. Feature agent defaults to 30 minutes per stage. Analyze repository agent defaults to 10 minutes."})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:u,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(t0,{children:"Channels"}),(0,t.jsx)(tX,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:eM,onChange:e=>{eN(e),C(eX({inApp:e}))}}),(0,t.jsx)(tX,{label:"Browser",description:"Push notifications via the browser",id:"notif-browser",testId:"switch-browser",checked:eP,onChange:e=>{eE(e),C(eX({browser:e}))}}),(0,t.jsx)(tX,{label:"Desktop",description:"Native OS notifications",id:"notif-desktop",testId:"switch-desktop",checked:eR,onChange:e=>{eT(e),C(eX({desktop:e}))}}),(0,t.jsx)(t0,{children:"Agent Events"}),(0,t.jsx)(tX,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:eA.agentStarted,onChange:e=>{let t={...eA,agentStarted:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:eA.phaseCompleted,onChange:e=>{let t={...eA,phaseCompleted:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:eA.waitingApproval,onChange:e=>{let t={...eA,waitingApproval:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:eA.agentCompleted,onChange:e=>{let t={...eA,agentCompleted:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:eA.agentFailed,onChange:e=>{let t={...eA,agentFailed:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(t0,{children:"Pull Request Events"}),(0,t.jsx)(tX,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:eA.prMerged,onChange:e=>{let t={...eA,prMerged:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:eA.prClosed,onChange:e=>{let t={...eA,prClosed:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:eA.prChecksPassed,onChange:e=>{let t={...eA,prChecksPassed:e};eD(t),C(eX({events:t}))}}),(0,t.jsx)(tX,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:eA.prChecksFailed,onChange:e=>{let t={...eA,prChecksFailed:e};eD(t),C(eX({events:t}))}})]}),(0,t.jsx)(t1,{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)(tQ,{icon:p,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tX,{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};eF(t),C({featureFlags:t})}}),(0,t.jsx)(tX,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:eL.envDeploy,onChange:e=>{let t={...eL,envDeploy:e};eF(t),C({featureFlags:t})}}),(0,t.jsx)(tX,{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};eF(t),C({featureFlags:t})}})]}),(0,t.jsx)(t1,{children:"Experimental features that are still under development. Enable at your own risk — they may change or be removed in future versions. Debug mode adds verbose logging useful for troubleshooting."})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tQ,{icon:m,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tZ,{label:"Location",description:"Path to the local SQLite database",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shep-home-path",children:a})}),(0,t.jsx)(tZ,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:h})})]}),(0,t.jsx)(t1,{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",()=>t2],41952)}]);
@@ -1,3 +0,0 @@
1
- module.exports=[34644,a=>{"use strict";let b=(0,a.i(25700).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"}]]);a.s(["Bot",()=>b],34644)},38702,16223,a=>{"use strict";var b=a.i(10973),c=a.i(85536);function d({icon:a,title:d,description:e,action:f,className:g,...h}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",g),...h,children:[a?(0,b.jsx)("div",{className:"text-muted-foreground",children:a}):null,(0,b.jsx)("h3",{className:"text-lg font-semibold",children:d}),e?(0,b.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:e}):null,f?(0,b.jsx)("div",{className:"mt-2",children:f}):null]})}a.s(["EmptyState",()=>d],16223),a.s([],38702)},14121,41543,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("00fbd910614f811201cb63e1d55722e0d87d6d6d13",b.callServer,void 0,b.findSourceMapURL,"getAllAgentModels");a.s(["getAllAgentModels",()=>c],14121);let d=(0,b.createServerReference)("603d22d68a333b54bac78b112ee4464a92f099e2b5",b.callServer,void 0,b.findSourceMapURL,"updateAgentAndModel");a.s(["updateAgentAndModel",()=>d],41543)},74364,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("40079f9319ef6b45a240322e970f356b2e5727baf0",b.callServer,void 0,b.findSourceMapURL,"addRepository");a.s(["addRepository",()=>c])},55628,a=>{"use strict";var b=a.i(96960),c=a.i(76996),d=a.i(20502),e=a.i(10423);function f(a){let[f,g]=(0,b.useState)(!1),[h,i]=(0,b.useState)(!1),[j,k]=(0,b.useState)(!1),[l,m]=(0,b.useState)(null),[n,o]=(0,b.useState)(null),[p,q]=(0,b.useState)(null),r=(0,b.useRef)(null),s=(0,b.useRef)(null),t=(0,b.useRef)(null);(0,b.useEffect)(()=>()=>{r.current&&clearTimeout(r.current),s.current&&clearTimeout(s.current),t.current&&clearTimeout(t.current)},[]);let u=(0,b.useCallback)(async(b,c,d,e,f)=>{if(a&&!f){e.current&&clearTimeout(e.current),c(!0),d(null);try{let a=await b();if(!a.success){let b=a.error??"An unexpected error occurred";d(b),e.current=setTimeout(()=>d(null),5e3)}}catch(a){d(a instanceof Error?a.message:"An unexpected error occurred"),e.current=setTimeout(()=>d(null),5e3)}finally{c(!1)}}},[a]);return{openInIde:(0,b.useCallback)(()=>u(()=>(0,c.openIde)({repositoryPath:a.repositoryPath}),g,m,r,f),[u,f,a]),openInShell:(0,b.useCallback)(()=>u(()=>(0,d.openShell)({repositoryPath:a.repositoryPath}),i,o,s,h),[u,h,a]),openFolder:(0,b.useCallback)(()=>u(()=>(0,e.openFolder)(a.repositoryPath),k,q,t,j),[u,j,a]),ideLoading:f,shellLoading:h,folderLoading:j,ideError:l,shellError:n,folderError:p}}a.s(["useRepositoryActions",()=>f])}];
2
-
3
- //# sourceMappingURL=_503b26e9._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[42642,a=>{"use strict";let b=(0,a.i(25700).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);a.s(["default",()=>b])},3942,a=>{"use strict";let b=(0,a.i(25700).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);a.s(["Zap",()=>b],3942)},10606,a=>{"use strict";var b=a.i(51969);a.s(["CheckIcon",()=>b.default])},46168,a=>{"use strict";let b=(0,a.i(25700).default)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["Clock",()=>b],46168)},71238,a=>{"use strict";let b=(0,a.i(25700).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);a.s(["ExternalLink",()=>b],71238)},63698,a=>{"use strict";let b=(0,a.i(25700).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",()=>b],63698)},58339,a=>{"use strict";var b=a.i(10973),c=a.i(42261),d=a.i(85536);let e=(0,c.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function f({className:a,variant:c,...f}){return(0,b.jsx)("div",{className:(0,d.cn)(e({variant:c}),a),...f})}a.s(["Badge",()=>f])},78454,a=>{"use strict";a.i(24255),a.s([])},3195,a=>{"use strict";let b=(0,a.i(25700).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);a.s(["FolderOpen",()=>b],3195)},50488,76996,20502,10423,a=>{"use strict";let b=(0,a.i(25700).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);a.s(["Code2",()=>b],50488);var c=a.i(25674);let d=(0,c.createServerReference)("4086ae478c11bad20c273ddf1bfcb7a31008a2acbe",c.callServer,void 0,c.findSourceMapURL,"openIde");a.s(["openIde",()=>d],76996);let e=(0,c.createServerReference)("40924061abebca73f102855d3c908ce3b1edf845de",c.callServer,void 0,c.findSourceMapURL,"openShell");a.s(["openShell",()=>e],20502);let f=(0,c.createServerReference)("40600c159079cb5d863e397573336914c0615a122d",c.callServer,void 0,c.findSourceMapURL,"openFolder");a.s(["openFolder",()=>f],10423)},77127,a=>{"use strict";var b=a.i(96960),c=a.i(59653),d=a.i(63496),e=a.i(6175),f=a.i(7420),g=a.i(5472),h=a.i(66873),i=a.i(79406),j=a.i(17329),k=a.i(48939),l=a.i(10973),m="rovingFocusGroup.onEntryFocus",n={bubbles:!1,cancelable:!0},o="RovingFocusGroup",[p,q,r]=(0,d.createCollection)(o),[s,t]=(0,f.createContextScope)(o,[r]),[u,v]=s(o),w=b.forwardRef((a,b)=>(0,l.jsx)(p.Provider,{scope:a.__scopeRovingFocusGroup,children:(0,l.jsx)(p.Slot,{scope:a.__scopeRovingFocusGroup,children:(0,l.jsx)(x,{...a,ref:b})})}));w.displayName=o;var x=b.forwardRef((a,d)=>{let{__scopeRovingFocusGroup:f,orientation:g,loop:p=!1,dir:r,currentTabStopId:s,defaultCurrentTabStopId:t,onCurrentTabStopIdChange:v,onEntryFocus:w,preventScrollOnEntryFocus:x=!1,...y}=a,z=b.useRef(null),A=(0,e.useComposedRefs)(d,z),C=(0,k.useDirection)(r),[D,E]=(0,j.useControllableState)({prop:s,defaultProp:t??null,onChange:v,caller:o}),[F,G]=b.useState(!1),H=(0,i.useCallbackRef)(w),I=q(f),J=b.useRef(!1),[K,L]=b.useState(0);return b.useEffect(()=>{let a=z.current;if(a)return a.addEventListener(m,H),()=>a.removeEventListener(m,H)},[H]),(0,l.jsx)(u,{scope:f,orientation:g,dir:C,loop:p,currentTabStopId:D,onItemFocus:b.useCallback(a=>E(a),[E]),onItemShiftTab:b.useCallback(()=>G(!0),[]),onFocusableItemAdd:b.useCallback(()=>L(a=>a+1),[]),onFocusableItemRemove:b.useCallback(()=>L(a=>a-1),[]),children:(0,l.jsx)(h.Primitive.div,{tabIndex:F||0===K?-1:0,"data-orientation":g,...y,ref:A,style:{outline:"none",...a.style},onMouseDown:(0,c.composeEventHandlers)(a.onMouseDown,()=>{J.current=!0}),onFocus:(0,c.composeEventHandlers)(a.onFocus,a=>{let b=!J.current;if(a.target===a.currentTarget&&b&&!F){let b=new CustomEvent(m,n);if(a.currentTarget.dispatchEvent(b),!b.defaultPrevented){let a=I().filter(a=>a.focusable);B([a.find(a=>a.active),a.find(a=>a.id===D),...a].filter(Boolean).map(a=>a.ref.current),x)}}J.current=!1}),onBlur:(0,c.composeEventHandlers)(a.onBlur,()=>G(!1))})})}),y="RovingFocusGroupItem",z=b.forwardRef((a,d)=>{let{__scopeRovingFocusGroup:e,focusable:f=!0,active:i=!1,tabStopId:j,children:k,...m}=a,n=(0,g.useId)(),o=j||n,r=v(y,e),s=r.currentTabStopId===o,t=q(e),{onFocusableItemAdd:u,onFocusableItemRemove:w,currentTabStopId:x}=r;return b.useEffect(()=>{if(f)return u(),()=>w()},[f,u,w]),(0,l.jsx)(p.ItemSlot,{scope:e,id:o,focusable:f,active:i,children:(0,l.jsx)(h.Primitive.span,{tabIndex:s?0:-1,"data-orientation":r.orientation,...m,ref:d,onMouseDown:(0,c.composeEventHandlers)(a.onMouseDown,a=>{f?r.onItemFocus(o):a.preventDefault()}),onFocus:(0,c.composeEventHandlers)(a.onFocus,()=>r.onItemFocus(o)),onKeyDown:(0,c.composeEventHandlers)(a.onKeyDown,a=>{if("Tab"===a.key&&a.shiftKey)return void r.onItemShiftTab();if(a.target!==a.currentTarget)return;let b=function(a,b,c){var d;let e=(d=a.key,"rtl"!==c?d:"ArrowLeft"===d?"ArrowRight":"ArrowRight"===d?"ArrowLeft":d);if(!("vertical"===b&&["ArrowLeft","ArrowRight"].includes(e))&&!("horizontal"===b&&["ArrowUp","ArrowDown"].includes(e)))return A[e]}(a,r.orientation,r.dir);if(void 0!==b){if(a.metaKey||a.ctrlKey||a.altKey||a.shiftKey)return;a.preventDefault();let e=t().filter(a=>a.focusable).map(a=>a.ref.current);if("last"===b)e.reverse();else if("prev"===b||"next"===b){var c,d;"prev"===b&&e.reverse();let f=e.indexOf(a.currentTarget);e=r.loop?(c=e,d=f+1,c.map((a,b)=>c[(d+b)%c.length])):e.slice(f+1)}setTimeout(()=>B(e))}}),children:"function"==typeof k?k({isCurrentTabStop:s,hasTabStop:null!=x}):k})})});z.displayName=y;var A={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function B(a,b=!1){let c=document.activeElement;for(let d of a)if(d===c||(d.focus({preventScroll:b}),document.activeElement!==c))return}a.s(["Item",()=>z,"Root",()=>w,"createRovingFocusGroupScope",()=>t])},98410,a=>{"use strict";let b=(0,a.i(25700).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",()=>b],98410)},4019,67075,a=>{"use strict";let b=(0,a.i(25700).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["Circle",()=>b],4019);var c=a.i(2811);a.s(["CheckCircle2",()=>c.default],67075)},96853,71716,a=>{"use strict";var b=a.i(25700);let c=(0,b.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);a.s(["default",()=>c],96853);let d=(0,b.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);a.s(["ChevronDown",()=>d],71716)},64005,a=>{"use strict";var b=a.i(96960);function c(a){let c=b.useRef({value:a,previous:a});return b.useMemo(()=>(c.current.value!==a&&(c.current.previous=c.current.value,c.current.value=a),c.current.previous),[a])}a.s(["usePrevious",()=>c])},584,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(66873),e=c.forwardRef((a,c)=>(0,b.jsx)(d.Primitive.label,{...a,ref:c,onMouseDown:b=>{b.target.closest("button, input, select, textarea")||(a.onMouseDown?.(b),!b.defaultPrevented&&b.detail>1&&b.preventDefault())}}));e.displayName="Label",a.s(["Label",()=>e,"Root",()=>e],59967);var f=a.i(59967),f=f,g=a.i(42261),h=a.i(85536);let i=(0,g.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),j=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(f.Root,{ref:d,className:(0,h.cn)(i(),a),...c}));j.displayName=f.Root.displayName,a.s(["Label",()=>j],584)},3410,a=>{"use strict";let b=(0,a.i(25700).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",()=>b],3410)},94132,a=>{"use strict";let b=(0,a.i(25700).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",()=>b],94132)},72016,51969,a=>{"use strict";let b=(0,a.i(25700).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["default",()=>b],51969),a.s(["Check",()=>b],72016)},63496,a=>{"use strict";var b=a.i(96960),c=a.i(7420),d=a.i(6175),e=a.i(90986),f=a.i(10973);function g(a){let g=a+"CollectionProvider",[h,i]=(0,c.createContextScope)(g),[j,k]=h(g,{collectionRef:{current:null},itemMap:new Map}),l=a=>{let{scope:c,children:d}=a,e=b.default.useRef(null),g=b.default.useRef(new Map).current;return(0,f.jsx)(j,{scope:c,itemMap:g,collectionRef:e,children:d})};l.displayName=g;let m=a+"CollectionSlot",n=(0,e.createSlot)(m),o=b.default.forwardRef((a,b)=>{let{scope:c,children:e}=a,g=k(m,c),h=(0,d.useComposedRefs)(b,g.collectionRef);return(0,f.jsx)(n,{ref:h,children:e})});o.displayName=m;let p=a+"CollectionItemSlot",q="data-radix-collection-item",r=(0,e.createSlot)(p),s=b.default.forwardRef((a,c)=>{let{scope:e,children:g,...h}=a,i=b.default.useRef(null),j=(0,d.useComposedRefs)(c,i),l=k(p,e);return b.default.useEffect(()=>(l.itemMap.set(i,{ref:i,...h}),()=>void l.itemMap.delete(i))),(0,f.jsx)(r,{...{[q]:""},ref:j,children:g})});return s.displayName=p,[{Provider:l,Slot:o,ItemSlot:s},function(c){let d=k(a+"CollectionConsumer",c);return b.default.useCallback(()=>{let a=d.collectionRef.current;if(!a)return[];let b=Array.from(a.querySelectorAll(`[${q}]`));return Array.from(d.itemMap.values()).sort((a,c)=>b.indexOf(a.ref.current)-b.indexOf(c.ref.current))},[d.collectionRef,d.itemMap])},i]}var h=new WeakMap;function i(a,b){var c,d;let e,f,g;if("at"in Array.prototype)return Array.prototype.at.call(a,b);let h=(c=a,d=b,e=c.length,(g=(f=j(d))>=0?f:e+f)<0||g>=e?-1:g);return -1===h?void 0:a[h]}function j(a){return a!=a||0===a?0:Math.trunc(a)}(class a extends Map{#a;constructor(a){super(a),this.#a=[...super.keys()],h.set(this,!0)}set(a,b){return h.get(this)&&(this.has(a)?this.#a[this.#a.indexOf(a)]=a:this.#a.push(a)),super.set(a,b),this}insert(a,b,c){let d,e=this.has(b),f=this.#a.length,g=j(a),h=g>=0?g:f+g,i=h<0||h>=f?-1:h;if(i===this.size||e&&i===this.size-1||-1===i)return this.set(b,c),this;let k=this.size+ +!e;g<0&&h++;let l=[...this.#a],m=!1;for(let a=h;a<k;a++)if(h===a){let f=l[a];l[a]===b&&(f=l[a+1]),e&&this.delete(b),d=this.get(f),this.set(b,c)}else{m||l[a-1]!==b||(m=!0);let c=l[m?a:a-1],e=d;d=this.get(c),this.delete(c),this.set(c,e)}return this}with(b,c,d){let e=new a(this);return e.insert(b,c,d),e}before(a){let b=this.#a.indexOf(a)-1;if(!(b<0))return this.entryAt(b)}setBefore(a,b,c){let d=this.#a.indexOf(a);return -1===d?this:this.insert(d,b,c)}after(a){let b=this.#a.indexOf(a);if(-1!==(b=-1===b||b===this.size-1?-1:b+1))return this.entryAt(b)}setAfter(a,b,c){let d=this.#a.indexOf(a);return -1===d?this:this.insert(d+1,b,c)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#a=[],super.clear()}delete(a){let b=super.delete(a);return b&&this.#a.splice(this.#a.indexOf(a),1),b}deleteAt(a){let b=this.keyAt(a);return void 0!==b&&this.delete(b)}at(a){let b=i(this.#a,a);if(void 0!==b)return this.get(b)}entryAt(a){let b=i(this.#a,a);if(void 0!==b)return[b,this.get(b)]}indexOf(a){return this.#a.indexOf(a)}keyAt(a){return i(this.#a,a)}from(a,b){let c=this.indexOf(a);if(-1===c)return;let d=c+b;return d<0&&(d=0),d>=this.size&&(d=this.size-1),this.at(d)}keyFrom(a,b){let c=this.indexOf(a);if(-1===c)return;let d=c+b;return d<0&&(d=0),d>=this.size&&(d=this.size-1),this.keyAt(d)}find(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return d;c++}}findIndex(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return c;c++}return -1}filter(b,c){let d=[],e=0;for(let a of this)Reflect.apply(b,c,[a,e,this])&&d.push(a),e++;return new a(d)}map(b,c){let d=[],e=0;for(let a of this)d.push([a[0],Reflect.apply(b,c,[a,e,this])]),e++;return new a(d)}reduce(...a){let[b,c]=a,d=0,e=c??this.at(0);for(let c of this)e=0===d&&1===a.length?c:Reflect.apply(b,this,[e,c,d,this]),d++;return e}reduceRight(...a){let[b,c]=a,d=c??this.at(-1);for(let c=this.size-1;c>=0;c--){let e=this.at(c);d=c===this.size-1&&1===a.length?e:Reflect.apply(b,this,[d,e,c,this])}return d}toSorted(b){return new a([...this.entries()].sort(b))}toReversed(){let b=new a;for(let a=this.size-1;a>=0;a--){let c=this.keyAt(a),d=this.get(c);b.set(c,d)}return b}toSpliced(...b){let c=[...this.entries()];return c.splice(...b),new a(c)}slice(b,c){let d=new a,e=this.size-1;if(void 0===b)return d;b<0&&(b+=this.size),void 0!==c&&c>0&&(e=c-1);for(let a=b;a<=e;a++){let b=this.keyAt(a),c=this.get(b);d.set(b,c)}return d}every(a,b){let c=0;for(let d of this){if(!Reflect.apply(a,b,[d,c,this]))return!1;c++}return!0}some(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return!0;c++}return!1}}),a.s(["createCollection",()=>g])}];
2
-
3
- //# sourceMappingURL=_ab069e13._.js.map