@samanhappy/mcphub 1.0.31 → 1.0.32

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 (267) hide show
  1. package/dist/betterAuth.js +13 -5
  2. package/dist/betterAuth.js.map +1 -1
  3. package/dist/cli/commands/cache.js.map +1 -1
  4. package/dist/cli/commands/call.js +2 -2
  5. package/dist/cli/commands/call.js.map +1 -1
  6. package/dist/cli/commands/config.js.map +1 -1
  7. package/dist/cli/commands/discover.js.map +1 -1
  8. package/dist/cli/commands/export.js.map +1 -1
  9. package/dist/cli/commands/groups.js.map +1 -1
  10. package/dist/cli/commands/install.js +1 -1
  11. package/dist/cli/commands/install.js.map +1 -1
  12. package/dist/cli/commands/keys.js.map +1 -1
  13. package/dist/cli/commands/login.js.map +1 -1
  14. package/dist/cli/commands/servers.js.map +1 -1
  15. package/dist/cli/commands/tools.js +2 -2
  16. package/dist/cli/commands/tools.js.map +1 -1
  17. package/dist/cli/context.js +1 -1
  18. package/dist/cli/context.js.map +1 -1
  19. package/dist/cli/http.js +3 -1
  20. package/dist/cli/http.js.map +1 -1
  21. package/dist/clients/openapi.js +62 -7
  22. package/dist/clients/openapi.js.map +1 -1
  23. package/dist/config/DaoConfigService.js +3 -2
  24. package/dist/config/DaoConfigService.js.map +1 -1
  25. package/dist/config/configManager.js +9 -8
  26. package/dist/config/configManager.js.map +1 -1
  27. package/dist/config/index.js +30 -6
  28. package/dist/config/index.js.map +1 -1
  29. package/dist/config/jwt.js +2 -1
  30. package/dist/config/jwt.js.map +1 -1
  31. package/dist/config/migrationUtils.js +46 -45
  32. package/dist/config/migrationUtils.js.map +1 -1
  33. package/dist/constants/oauthServerDefaults.js.map +1 -1
  34. package/dist/controllers/activityController.js +6 -5
  35. package/dist/controllers/activityController.js.map +1 -1
  36. package/dist/controllers/authController.js +5 -4
  37. package/dist/controllers/authController.js.map +1 -1
  38. package/dist/controllers/bearerKeyController.js +7 -6
  39. package/dist/controllers/bearerKeyController.js.map +1 -1
  40. package/dist/controllers/betterAuthController.js +2 -1
  41. package/dist/controllers/betterAuthController.js.map +1 -1
  42. package/dist/controllers/builtinPromptController.js +13 -5
  43. package/dist/controllers/builtinPromptController.js.map +1 -1
  44. package/dist/controllers/builtinResourceController.js +14 -6
  45. package/dist/controllers/builtinResourceController.js.map +1 -1
  46. package/dist/controllers/changelogController.js +5 -2
  47. package/dist/controllers/changelogController.js.map +1 -1
  48. package/dist/controllers/cloudController.js +11 -10
  49. package/dist/controllers/cloudController.js.map +1 -1
  50. package/dist/controllers/configController.js +4 -3
  51. package/dist/controllers/configController.js.map +1 -1
  52. package/dist/controllers/contextCostController.js +3 -2
  53. package/dist/controllers/contextCostController.js.map +1 -1
  54. package/dist/controllers/groupController.js +2 -1
  55. package/dist/controllers/groupController.js.map +1 -1
  56. package/dist/controllers/healthController.js +2 -1
  57. package/dist/controllers/healthController.js.map +1 -1
  58. package/dist/controllers/hostedInternalController.js +2 -1
  59. package/dist/controllers/hostedInternalController.js.map +1 -1
  60. package/dist/controllers/logController.js +5 -4
  61. package/dist/controllers/logController.js.map +1 -1
  62. package/dist/controllers/mcpbController.js +17 -7
  63. package/dist/controllers/mcpbController.js.map +1 -1
  64. package/dist/controllers/oauthCallbackController.js +28 -27
  65. package/dist/controllers/oauthCallbackController.js.map +1 -1
  66. package/dist/controllers/oauthClientController.js +7 -6
  67. package/dist/controllers/oauthClientController.js.map +1 -1
  68. package/dist/controllers/oauthDynamicRegistrationController.js +22 -4
  69. package/dist/controllers/oauthDynamicRegistrationController.js.map +1 -1
  70. package/dist/controllers/oauthServerController.js +22 -11
  71. package/dist/controllers/oauthServerController.js.map +1 -1
  72. package/dist/controllers/openApiController.js +7 -6
  73. package/dist/controllers/openApiController.js.map +1 -1
  74. package/dist/controllers/promptController.js +2 -1
  75. package/dist/controllers/promptController.js.map +1 -1
  76. package/dist/controllers/registryController.js +4 -3
  77. package/dist/controllers/registryController.js.map +1 -1
  78. package/dist/controllers/serverController.js +46 -34
  79. package/dist/controllers/serverController.js.map +1 -1
  80. package/dist/controllers/templateController.js +2 -1
  81. package/dist/controllers/templateController.js.map +1 -1
  82. package/dist/controllers/toolController.js +2 -1
  83. package/dist/controllers/toolController.js.map +1 -1
  84. package/dist/dao/DaoFactory.js +3 -2
  85. package/dist/dao/DaoFactory.js.map +1 -1
  86. package/dist/dao/ServerDao.js.map +1 -1
  87. package/dist/dao/UserConfigDaoDbImpl.js.map +1 -1
  88. package/dist/dao/UserDao.js.map +1 -1
  89. package/dist/dao/base/JsonFileBaseDao.js +3 -2
  90. package/dist/dao/base/JsonFileBaseDao.js.map +1 -1
  91. package/dist/dao/examples.js +35 -34
  92. package/dist/dao/examples.js.map +1 -1
  93. package/dist/db/connection.js +59 -58
  94. package/dist/db/connection.js.map +1 -1
  95. package/dist/db/index.js +2 -1
  96. package/dist/db/index.js.map +1 -1
  97. package/dist/db/repositories/ServerRepository.js +3 -3
  98. package/dist/db/repositories/ServerRepository.js.map +1 -1
  99. package/dist/db/repositories/SystemConfigRepository.js +2 -1
  100. package/dist/db/repositories/SystemConfigRepository.js.map +1 -1
  101. package/dist/db/repositories/UserConfigRepository.js.map +1 -1
  102. package/dist/db/repositories/VectorEmbeddingRepository.js +6 -5
  103. package/dist/db/repositories/VectorEmbeddingRepository.js.map +1 -1
  104. package/dist/index.js +28 -19
  105. package/dist/index.js.map +1 -1
  106. package/dist/middlewares/auth.js +4 -3
  107. package/dist/middlewares/auth.js.map +1 -1
  108. package/dist/middlewares/index.js +2 -1
  109. package/dist/middlewares/index.js.map +1 -1
  110. package/dist/middlewares/userContext.js +7 -6
  111. package/dist/middlewares/userContext.js.map +1 -1
  112. package/dist/models/OAuth.js +7 -6
  113. package/dist/models/OAuth.js.map +1 -1
  114. package/dist/models/User.js +13 -12
  115. package/dist/models/User.js.map +1 -1
  116. package/dist/routes/index.js +9 -9
  117. package/dist/routes/index.js.map +1 -1
  118. package/dist/scripts/dao-demo.js +28 -27
  119. package/dist/scripts/dao-demo.js.map +1 -1
  120. package/dist/server.js +36 -30
  121. package/dist/server.js.map +1 -1
  122. package/dist/services/activityLoggingService.js +3 -2
  123. package/dist/services/activityLoggingService.js.map +1 -1
  124. package/dist/services/betterAuthConfig.js +1 -4
  125. package/dist/services/betterAuthConfig.js.map +1 -1
  126. package/dist/services/betterAuthSession.js +8 -7
  127. package/dist/services/betterAuthSession.js.map +1 -1
  128. package/dist/services/changelogService.js +5 -2
  129. package/dist/services/changelogService.js.map +1 -1
  130. package/dist/services/cloudService.js +10 -9
  131. package/dist/services/cloudService.js.map +1 -1
  132. package/dist/services/contextCostService.js +6 -2
  133. package/dist/services/contextCostService.js.map +1 -1
  134. package/dist/services/groupService.js +8 -7
  135. package/dist/services/groupService.js.map +1 -1
  136. package/dist/services/hostedAuthService.js +3 -2
  137. package/dist/services/hostedAuthService.js.map +1 -1
  138. package/dist/services/hostedControlPlaneClient.js.map +1 -1
  139. package/dist/services/hostedEventSubscriber.js +9 -8
  140. package/dist/services/hostedEventSubscriber.js.map +1 -1
  141. package/dist/services/hostedRuntimeCatalogNames.js +1 -3
  142. package/dist/services/hostedRuntimeCatalogNames.js.map +1 -1
  143. package/dist/services/keepAliveService.js +7 -6
  144. package/dist/services/keepAliveService.js.map +1 -1
  145. package/dist/services/marketService.js +2 -1
  146. package/dist/services/marketService.js.map +1 -1
  147. package/dist/services/mcpOAuthProvider.js +22 -21
  148. package/dist/services/mcpOAuthProvider.js.map +1 -1
  149. package/dist/services/mcpService.js +133 -121
  150. package/dist/services/mcpService.js.map +1 -1
  151. package/dist/services/oauthClientRegistration.js +30 -29
  152. package/dist/services/oauthClientRegistration.js.map +1 -1
  153. package/dist/services/oauthServerService.js +22 -17
  154. package/dist/services/oauthServerService.js.map +1 -1
  155. package/dist/services/oauthService.js +16 -15
  156. package/dist/services/oauthService.js.map +1 -1
  157. package/dist/services/oauthSettingsStore.js +4 -3
  158. package/dist/services/oauthSettingsStore.js.map +1 -1
  159. package/dist/services/openApiGeneratorService.js +1 -3
  160. package/dist/services/openApiGeneratorService.js.map +1 -1
  161. package/dist/services/registry.js +2 -1
  162. package/dist/services/registry.js.map +1 -1
  163. package/dist/services/requestContextService.js.map +1 -1
  164. package/dist/services/smartRoutingService.js +6 -5
  165. package/dist/services/smartRoutingService.js.map +1 -1
  166. package/dist/services/sseService.js +52 -51
  167. package/dist/services/sseService.js.map +1 -1
  168. package/dist/services/templateService.js +57 -12
  169. package/dist/services/templateService.js.map +1 -1
  170. package/dist/services/toolResultCompressionService.js +8 -5
  171. package/dist/services/toolResultCompressionService.js.map +1 -1
  172. package/dist/services/upstreamOAuthDisconnectService.js +9 -6
  173. package/dist/services/upstreamOAuthDisconnectService.js.map +1 -1
  174. package/dist/services/userService.js +5 -4
  175. package/dist/services/userService.js.map +1 -1
  176. package/dist/services/vectorSearchService.js +126 -112
  177. package/dist/services/vectorSearchService.js.map +1 -1
  178. package/dist/utils/cacheUtils.js +5 -4
  179. package/dist/utils/cacheUtils.js.map +1 -1
  180. package/dist/utils/corsOrigin.js +42 -0
  181. package/dist/utils/corsOrigin.js.map +1 -0
  182. package/dist/utils/dbRetry.js +2 -5
  183. package/dist/utils/dbRetry.js.map +1 -1
  184. package/dist/utils/frontendShell.js +2 -1
  185. package/dist/utils/frontendShell.js.map +1 -1
  186. package/dist/utils/i18n.js.map +1 -1
  187. package/dist/utils/logger.js +170 -0
  188. package/dist/utils/logger.js.map +1 -0
  189. package/dist/utils/migration.js +51 -50
  190. package/dist/utils/migration.js.map +1 -1
  191. package/dist/utils/parameterConversion.js +2 -1
  192. package/dist/utils/parameterConversion.js.map +1 -1
  193. package/dist/utils/path.js +9 -8
  194. package/dist/utils/path.js.map +1 -1
  195. package/dist/utils/proxyTrust.js.map +1 -1
  196. package/dist/utils/rateLimit.js +8 -0
  197. package/dist/utils/rateLimit.js.map +1 -1
  198. package/dist/utils/requireAdmin.js +15 -0
  199. package/dist/utils/requireAdmin.js.map +1 -0
  200. package/dist/utils/serverConfigPersistence.js.map +1 -1
  201. package/dist/utils/serverShutdown.js +3 -2
  202. package/dist/utils/serverShutdown.js.map +1 -1
  203. package/dist/utils/smartRouting.js +4 -3
  204. package/dist/utils/smartRouting.js.map +1 -1
  205. package/dist/utils/ssrf.js +19 -6
  206. package/dist/utils/ssrf.js.map +1 -1
  207. package/dist/utils/tokenCost.js.map +1 -1
  208. package/dist/utils/tokenTruncation.js +9 -4
  209. package/dist/utils/tokenTruncation.js.map +1 -1
  210. package/dist/utils/version.js +3 -2
  211. package/dist/utils/version.js.map +1 -1
  212. package/frontend/dist/assets/{ActivityPage-Dx53zxEM.js → ActivityPage-C6m1hGLq.js} +2 -2
  213. package/frontend/dist/assets/{ActivityPage-Dx53zxEM.js.map → ActivityPage-C6m1hGLq.js.map} +1 -1
  214. package/frontend/dist/assets/{ConfirmDialog-CYfXEuyU.js → ConfirmDialog-BCMNzi21.js} +2 -2
  215. package/frontend/dist/assets/{ConfirmDialog-CYfXEuyU.js.map → ConfirmDialog-BCMNzi21.js.map} +1 -1
  216. package/frontend/dist/assets/{Dashboard-ZYVsSvOw.js → Dashboard-DFKfjPff.js} +2 -2
  217. package/frontend/dist/assets/{Dashboard-ZYVsSvOw.js.map → Dashboard-DFKfjPff.js.map} +1 -1
  218. package/frontend/dist/assets/{DeleteDialog-DNe-zTEl.js → DeleteDialog-D9ycSRvn.js} +2 -2
  219. package/frontend/dist/assets/{DeleteDialog-DNe-zTEl.js.map → DeleteDialog-D9ycSRvn.js.map} +1 -1
  220. package/frontend/dist/assets/{EndpointCopy-ngxLPeDF.js → EndpointCopy-CP_Fb1To.js} +2 -2
  221. package/frontend/dist/assets/{EndpointCopy-ngxLPeDF.js.map → EndpointCopy-CP_Fb1To.js.map} +1 -1
  222. package/frontend/dist/assets/{GroupsPage-JPtupGpI.js → GroupsPage-Cwfm5q-a.js} +2 -2
  223. package/frontend/dist/assets/{GroupsPage-JPtupGpI.js.map → GroupsPage-Cwfm5q-a.js.map} +1 -1
  224. package/frontend/dist/assets/{LoginPage-B6rU3Ugr.js → LoginPage-CnF44h_n.js} +2 -2
  225. package/frontend/dist/assets/{LoginPage-B6rU3Ugr.js.map → LoginPage-CnF44h_n.js.map} +1 -1
  226. package/frontend/dist/assets/{LogsPage-CXq382fb.js → LogsPage-BFIpICsM.js} +2 -2
  227. package/frontend/dist/assets/{LogsPage-CXq382fb.js.map → LogsPage-BFIpICsM.js.map} +1 -1
  228. package/frontend/dist/assets/{MarketPage-BGnQQyXK.js → MarketPage-Du-NqiEl.js} +2 -2
  229. package/frontend/dist/assets/{MarketPage-BGnQQyXK.js.map → MarketPage-Du-NqiEl.js.map} +1 -1
  230. package/frontend/dist/assets/{OAuthConsentPage-C-n6tv3-.js → OAuthConsentPage-zqXUvKMF.js} +2 -2
  231. package/frontend/dist/assets/{OAuthConsentPage-C-n6tv3-.js.map → OAuthConsentPage-zqXUvKMF.js.map} +1 -1
  232. package/frontend/dist/assets/{Pagination-DLSuQ8hw.js → Pagination-Dwko3g48.js} +2 -2
  233. package/frontend/dist/assets/{Pagination-DLSuQ8hw.js.map → Pagination-Dwko3g48.js.map} +1 -1
  234. package/frontend/dist/assets/{PromptsPage-BLpy76K4.js → PromptsPage-Cm8ykiI4.js} +2 -2
  235. package/frontend/dist/assets/{PromptsPage-BLpy76K4.js.map → PromptsPage-Cm8ykiI4.js.map} +1 -1
  236. package/frontend/dist/assets/{ResourcesPage-C5nynRqE.js → ResourcesPage-UMyO6mQ4.js} +2 -2
  237. package/frontend/dist/assets/{ResourcesPage-C5nynRqE.js.map → ResourcesPage-UMyO6mQ4.js.map} +1 -1
  238. package/frontend/dist/assets/{ServersPage-Ca5W9cPW.js → ServersPage-B0RoM8ez.js} +8 -8
  239. package/frontend/dist/assets/ServersPage-B0RoM8ez.js.map +1 -0
  240. package/frontend/dist/assets/{SettingsPage-DgFBjp_O.js → SettingsPage-BTB-36-n.js} +2 -2
  241. package/frontend/dist/assets/{SettingsPage-DgFBjp_O.js.map → SettingsPage-BTB-36-n.js.map} +1 -1
  242. package/frontend/dist/assets/{StatusDot-CmSkukx0.js → StatusDot-BAMXeT2x.js} +2 -2
  243. package/frontend/dist/assets/{StatusDot-CmSkukx0.js.map → StatusDot-BAMXeT2x.js.map} +1 -1
  244. package/frontend/dist/assets/{ToggleGroup-sG_2LQom.js → ToggleGroup-Cfgt5lJo.js} +2 -2
  245. package/frontend/dist/assets/{ToggleGroup-sG_2LQom.js.map → ToggleGroup-Cfgt5lJo.js.map} +1 -1
  246. package/frontend/dist/assets/{UsersPage-PHkFXLL8.js → UsersPage-DlzYf7Su.js} +2 -2
  247. package/frontend/dist/assets/{UsersPage-PHkFXLL8.js.map → UsersPage-DlzYf7Su.js.map} +1 -1
  248. package/frontend/dist/assets/{contextCost-D_iNNbhX.js → contextCost-kp2vZYp7.js} +2 -2
  249. package/frontend/dist/assets/{contextCost-D_iNNbhX.js.map → contextCost-kp2vZYp7.js.map} +1 -1
  250. package/frontend/dist/assets/{framework-vendor-I9Y6AgD5.js → framework-vendor-BHAQX05P.js} +3 -3
  251. package/frontend/dist/assets/{framework-vendor-I9Y6AgD5.js.map → framework-vendor-BHAQX05P.js.map} +1 -1
  252. package/frontend/dist/assets/{i18n-vendor-y9bLzIeh.js → i18n-vendor-CMcB7XUR.js} +2 -2
  253. package/frontend/dist/assets/{i18n-vendor-y9bLzIeh.js.map → i18n-vendor-CMcB7XUR.js.map} +1 -1
  254. package/frontend/dist/assets/{icons-vendor-BFl4A9fq.js → icons-vendor-HZHHWeTa.js} +2 -2
  255. package/frontend/dist/assets/{icons-vendor-BFl4A9fq.js.map → icons-vendor-HZHHWeTa.js.map} +1 -1
  256. package/frontend/dist/assets/{index-CLugsCsy.js → index-CvXw771N.js} +3 -3
  257. package/frontend/dist/assets/{index-CLugsCsy.js.map → index-CvXw771N.js.map} +1 -1
  258. package/frontend/dist/assets/{resourceService-33rS8QGJ.js → resourceService-D2QmlFby.js} +2 -2
  259. package/frontend/dist/assets/{resourceService-33rS8QGJ.js.map → resourceService-D2QmlFby.js.map} +1 -1
  260. package/frontend/dist/assets/useSettingsData-CeCvZ2nU.js +2 -0
  261. package/frontend/dist/assets/{useSettingsData-fK2bv9oN.js.map → useSettingsData-CeCvZ2nU.js.map} +1 -1
  262. package/frontend/dist/assets/{variableDetection-ByJ_cnxa.js → variableDetection-DKPiHkxr.js} +2 -2
  263. package/frontend/dist/assets/{variableDetection-ByJ_cnxa.js.map → variableDetection-DKPiHkxr.js.map} +1 -1
  264. package/frontend/dist/index.html +4 -4
  265. package/package.json +2 -2
  266. package/frontend/dist/assets/ServersPage-Ca5W9cPW.js.map +0 -1
  267. package/frontend/dist/assets/useSettingsData-fK2bv9oN.js +0 -2
@@ -1,4 +1,4 @@
1
- import{r as h,R as U,j as e}from"./framework-vendor-I9Y6AgD5.js";import{m as se,d as _,i as me,e as X}from"./index-CLugsCsy.js";import{f as B,u as Y,a as Z,p as ue}from"./contextCost-D_iNNbhX.js";import{u as ne}from"./useSettingsData-fK2bv9oN.js";import{g as pe}from"./toolDescription-Dw3sa28K.js";import{u as $}from"./i18n-vendor-y9bLzIeh.js";import{W as xe,g as he,F as ge,C as be,q as V,G as fe,y as ye,w as je,T as ve,u as Ne,z as te,H as ke,P as re,l as Se,X as we}from"./icons-vendor-BFl4A9fq.js";import{D as Ce}from"./DeleteDialog-DNe-zTEl.js";const Ee={tools:[],prompts:[],resources:[]},ae={tools:"all",prompts:"all",resources:"all"},le=({servers:n,value:p,onChange:t,className:d,serverCosts:y=[]})=>{const{t:c}=$(),{nameSeparator:b}=ne(),[C,A]=h.useState(new Set),m=U.useMemo(()=>p.map(s=>typeof s=="string"?{name:s,...ae}:{...s,tools:s.tools||"all",prompts:s.prompts||"all",resources:s.resources||"all"}),[p]),N=U.useMemo(()=>n.filter(s=>s.enabled!==!1),[n]);U.useEffect(()=>{const s=new Set(m.map(a=>a.name)),l=new Set(N.map(a=>a.name));A(a=>{const f=new Set;return a.forEach(i=>{(s.has(i)||l.has(i))&&f.add(i)}),f})},[m,N]);const k=s=>{if(m.findIndex(a=>a.name===s)>=0){const a=m.filter(f=>f.name!==s);t(a)}else{const a=[...m,{name:s,...ae}];t(a)}},E=s=>{A(l=>{const a=new Set(l);return a.has(s)?a.delete(s):a.add(s),a})},S=s=>["tools","prompts","resources"].some(l=>{const a=s[l];return a==="all"||Array.isArray(a)&&a.length>0}),D=(s,l,a,f=!1)=>{const i=m.find(z=>z.name===s),R={...i?{...i}:{name:s,...Ee},[l]:a};if(!S(R)){const z=m.filter(v=>v.name!==s);t(z),f||A(v=>{const q=new Set(v);return q.delete(s),q});return}if(i){t(m.map(z=>z.name===s?R:z));return}t([...m,R])},u=(s,l)=>{const a=m.find(i=>i.name===s);if(!a)return;const f={...a};l?f.alias=l:delete f.alias,t(m.map(i=>i.name===s?f:i))},g=(s,l)=>{const a=`${s}${b}`;return l.startsWith(a)?l.slice(a.length):l},x=(s,l)=>l==="tools"?(s.tools||[]).filter(a=>a.enabled!==!1).map(a=>({key:a.name,value:g(s.name,a.name),description:a.description,defaultDescription:a.defaultDescription,hasDescriptionOverride:a.hasDescriptionOverride})):l==="prompts"?(s.prompts||[]).filter(a=>a.enabled!==!1).map(a=>({key:a.name,value:g(s.name,a.name),description:a.description})):(s.resources||[]).filter(a=>a.enabled!==!1).map(a=>({key:a.uri,value:a.uri,description:a.description})),r=U.useMemo(()=>{const s=new Map;return y.forEach(l=>{const a=new Map;l.items.forEach(f=>a.set(f.name,f.cost)),s.set(l.name,a)}),s},[y]),o=s=>r.get(s)??new Map,j=(s,l)=>{const a=o(s.name);return x(s,l).filter(f=>T(s.name,l,f.value)).reduce((f,i)=>f+(a.get(i.key)??0),0)},I=s=>["tools","prompts","resources"].reduce((l,a)=>l+j(s,a),0),F=(s,l,a)=>{const f=N.find(z=>z.name===s);if(!f)return;const i=x(f,l).map(z=>z.value),P=m.find(z=>z.name===s);if(!P){D(s,l,[a]);return}const R=P[l];if(R==="all"){const z=i.filter(v=>v!==a);D(s,l,z);return}if(Array.isArray(R)){if(R.includes(a)){D(s,l,R.filter(v=>v!==a));return}const z=[...R,a];D(s,l,z.length===i.length?"all":z);return}D(s,l,[a])},M=s=>{const l=m.find(a=>a.name===s);return!!(l&&S(l))},w=s=>{const l=m.find(a=>a.name===s);return l?["tools","prompts","resources"].some(a=>{const f=l[a];return Array.isArray(f)&&f.length>0}):!1},T=(s,l,a)=>{const f=m.find(P=>P.name===s);if(!f)return!1;const i=f[l];return i==="all"?!0:Array.isArray(i)?i.includes(a):!1},O=(s,l)=>{const a=m.find(P=>P.name===s.name);if(!a)return 0;const f=x(s,l),i=a[l];if(i==="all")return f.length;if(Array.isArray(i)){const P=new Set(f.map(R=>R.value));return i.filter(R=>P.has(R)).length}return 0},W=[{key:"tools",titleKey:"groups.toolSelection",countKey:"groups.toolsSelected",allKey:"groups.allTools"},{key:"prompts",titleKey:"groups.promptSelection",countKey:"groups.promptsSelected",allKey:"groups.allPrompts"},{key:"resources",titleKey:"groups.resourceSelection",countKey:"groups.resourcesSelected",allKey:"groups.allResources"}],J=s=>W.map(({key:l})=>({key:l,count:O(s,l)})).filter(l=>l.count>0);return e.jsxs("div",{className:se("space-y-4",d),children:[e.jsx("div",{className:"space-y-3",children:N.map(s=>{const l=M(s.name),a=w(s.name),f=C.has(s.name),i=m.find(v=>v.name===s.name),P=J(s),R=W.filter(({key:v})=>x(s,v).length>0),z=o(s.name);return e.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg hover:border-gray-300 hover:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 transition-colors",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 cursor-pointer rounded-lg transition-colors",onClick:()=>E(s.name),children:[e.jsxs("div",{className:"flex items-center space-x-3",onClick:v=>{v.stopPropagation(),k(s.name)},children:[e.jsx("input",{type:"checkbox",checked:l||a,onChange:()=>k(s.name),className:"w-4 h-4 text-blue-600 bg-gray-100 dark:bg-gray-800 border-gray-300 rounded focus:ring-blue-500"}),e.jsx("span",{className:"font-medium text-gray-900 cursor-pointer select-none",children:s.name})]}),e.jsxs("div",{className:"flex items-center space-x-3",children:[I(s)>0&&e.jsxs("span",{className:"text-sm text-gray-400 hub-mono",title:c("cost.estimate"),children:["Σ ",B(I(s))]}),P.map(({key:v,count:q})=>e.jsxs("span",{className:"text-sm text-green-600 flex items-center gap-1",children:[v==="tools"?e.jsx(xe,{size:14}):v==="prompts"?e.jsx(he,{size:14}):e.jsx(ge,{size:14})," ",q]},v)),R.length>0&&e.jsx("button",{type:"button",className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",children:e.jsx("svg",{className:se("w-5 h-5 transition-transform",f&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),f&&R.length>0&&e.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 p-3",children:e.jsxs("div",{className:"space-y-4",children:[i&&e.jsxs("div",{className:"space-y-1",onClick:v=>v.stopPropagation(),children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600",children:c("groups.alias")}),e.jsx("input",{type:"text",value:i.alias||"",placeholder:s.name,onChange:v=>u(s.name,v.target.value),className:"w-full rounded-md border border-gray-300 bg-white px-2.5 py-1.5 text-sm text-gray-800 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-900 dark:text-gray-100"})]}),R.map(({key:v,titleKey:q,countKey:ie,allKey:ce})=>{const K=x(s,v),Q=O(s,v),H=(i==null?void 0:i[v])==="all"||Q===K.length;return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700",children:c(q)}),e.jsxs("div",{className:"flex items-center gap-3",children:[i&&e.jsx("span",{className:"text-xs text-green-600",children:H?`(${c(ce)} ${K.length}/${K.length})`:`(${c(ie)} ${Q}/${K.length})`}),i&&j(s,v)>0&&e.jsxs("span",{className:"text-xs text-gray-400 hub-mono",title:c("cost.estimate"),children:["Σ ",B(j(s,v))]}),e.jsx("button",{type:"button",onClick:()=>{D(s.name,v,H?[]:"all",!0)},className:"text-sm text-blue-600 hover:text-blue-800 transition-colors",children:c(H?"groups.selectNone":"groups.selectAll")})]})]}),e.jsx("div",{className:"grid grid-cols-1 gap-2 max-h-32 overflow-y-auto",children:K.map(G=>{const de=T(s.name,v,G.value),L=v==="tools"?pe({description:G.description,defaultDescription:G.defaultDescription,hasDescriptionOverride:G.hasDescriptionOverride},c("tool.noDescription")):null,ee=L!=null&&L.hasDescriptionOverride?c("tool.defaultDescriptionTooltip",{description:L.defaultDescription}):G.description;return e.jsxs("label",{className:"flex min-w-0 items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:de,onChange:()=>F(s.name,v,G.value),className:"w-3 h-3 text-blue-600 bg-gray-100 dark:bg-gray-800 border-gray-300 rounded focus:ring-blue-500"}),e.jsx("span",{className:"text-gray-700 break-all whitespace-nowrap flex-shrink-0",children:G.value}),(G.description||(L==null?void 0:L.hasDescriptionOverride))&&e.jsxs("span",{className:"min-w-0 flex items-center gap-1 text-gray-400 text-xs truncate",children:[e.jsx("span",{className:"truncate",title:ee||void 0,children:L?L.currentDescription:G.description}),(L==null?void 0:L.hasDescriptionOverride)&&e.jsx("span",{className:"inline-flex flex-shrink-0 items-center rounded-full border border-amber-200 bg-amber-50 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 dark:border-amber-700/60 dark:bg-amber-900/20 dark:text-amber-300",title:ee||void 0,children:c("tool.descriptionModifiedBadge")})]}),z.get(G.key)!=null&&e.jsxs("span",{className:"text-xs text-gray-400 hub-mono whitespace-nowrap ml-auto flex-shrink-0",title:c("cost.estimate"),children:["Σ ",B(z.get(G.key))]})]},G.key)})})]},v)})]})})]},s.name)})}),N.length===0&&e.jsx("p",{className:"text-gray-500 text-sm",children:c("groups.noServerOptions")})]})},De=({onAdd:n,onCancel:p})=>{const{t}=$(),{createGroup:d}=_(),{allServers:y}=Y(),{serverCosts:c}=Z(),[b,C]=h.useState([]),[A,m]=h.useState(null),[N,k]=h.useState(!1),[E,S]=h.useState({name:"",description:"",servers:[]});h.useEffect(()=>{C(y.filter(g=>g.enabled!==!1))},[y]);const D=g=>{const{name:x,value:r}=g.target;S(o=>({...o,[x]:r}))},u=async g=>{g.preventDefault(),k(!0),m(null);try{if(!E.name.trim()){m(t("groups.nameRequired")),k(!1);return}const x=await d(E.name,E.description,E.servers);if(!x||!x.success){m((x==null?void 0:x.message)||t("groups.createError")),k(!1);return}n()}catch(x){m(x instanceof Error?x.message:String(x)),k(!1)}};return e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-3xl w-full max-h-[90vh] flex flex-col",children:[e.jsxs("div",{className:"p-6 flex-shrink-0",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:t("groups.addNew")}),A&&e.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded-md border border-gray-200 dark:border-gray-700",children:A})]}),e.jsxs("form",{onSubmit:u,className:"flex flex-col flex-1 min-h-0",children:[e.jsx("div",{className:"flex-1 overflow-y-auto px-6",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[t("groups.name")," *"]}),e.jsx("input",{type:"text",id:"name",name:"name",value:E.name,onChange:D,className:"w-full border border-gray-300 rounded-md px-3 py-2 text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:t("groups.namePlaceholder"),required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:t("groups.configureCapabilities")}),e.jsx(le,{servers:b,value:E.servers,onChange:g=>S(x=>({...x,servers:g})),className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4 bg-gray-50 dark:bg-gray-800",serverCosts:c})]})]})}),e.jsxs("div",{className:"flex justify-end space-x-2 p-5 pt-3 border-t border-[var(--hub-line-2)] flex-shrink-0",children:[e.jsx("button",{type:"button",onClick:p,className:"hub-btn",disabled:N,children:t("common.cancel")}),e.jsx("button",{type:"submit",className:"hub-btn primary",disabled:N,children:t(N?"common.submitting":"common.create")})]})]})]})})},Ae=({group:n,onEdit:p,onCancel:t})=>{const{t:d}=$(),{updateGroup:y}=_(),{allServers:c}=Y(),{serverCosts:b}=Z(),[C,A]=h.useState([]),[m,N]=h.useState(null),[k,E]=h.useState(!1),[S,D]=h.useState({name:n.name,description:n.description||"",servers:n.servers||[]});h.useEffect(()=>{A(c.filter(x=>x.enabled!==!1))},[c]);const u=x=>{const{name:r,value:o}=x.target;D(j=>({...j,[r]:o}))},g=async x=>{x.preventDefault(),E(!0),N(null);try{if(!S.name.trim()){N(d("groups.nameRequired")),E(!1);return}const r=await y(n.id,{name:S.name,description:S.description,servers:S.servers});if(!r||!r.success){N((r==null?void 0:r.message)||d("groups.updateError")),E(!1);return}p()}catch(r){N(r instanceof Error?r.message:String(r)),E(!1)}};return e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-3xl w-full max-h-[90vh] flex flex-col",children:[e.jsxs("div",{className:"p-6 flex-shrink-0",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:d("groups.edit")}),m&&e.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded-md border border-gray-200 dark:border-gray-700",children:m})]}),e.jsxs("form",{onSubmit:g,className:"flex flex-col flex-1 min-h-0",children:[e.jsx("div",{className:"flex-1 overflow-y-auto px-6",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[d("groups.name")," *"]}),e.jsx("input",{type:"text",id:"name",name:"name",value:S.name,onChange:u,className:"w-full border border-gray-300 rounded-md px-3 py-2 text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:d("groups.namePlaceholder"),required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:d("groups.configureCapabilities")}),e.jsx(le,{servers:C,value:S.servers,onChange:x=>D(r=>({...r,servers:x})),className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4 bg-gray-50 dark:bg-gray-800",serverCosts:b})]})]})}),e.jsxs("div",{className:"flex justify-end space-x-2 p-5 pt-3 border-t border-[var(--hub-line-2)] flex-shrink-0",children:[e.jsx("button",{type:"button",onClick:t,className:"hub-btn",disabled:k,children:d("common.cancel")}),e.jsx("button",{type:"submit",className:"hub-btn primary",disabled:k,children:d(k?"common.submitting":"common.save")})]})]})]})})},Ie=n=>n.map(p=>typeof p=="string"?p:p.name),oe=(n,p)=>{const t=n.servers.find(d=>typeof d=="string"?d===p:d.name===p);return t?typeof t=="string"?{name:t,tools:"all",prompts:"all",resources:"all"}:t:{name:p,tools:"all",prompts:"all",resources:"all"}},Te=(n,p)=>{var d;return((d=oe(n,p).alias)==null?void 0:d.trim())||p},ze=async n=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(n),!0}catch{}try{const p=document.createElement("textarea");p.value=n,p.style.position="fixed",p.style.left="-9999px",document.body.appendChild(p),p.focus(),p.select();const t=document.execCommand("copy");return document.body.removeChild(p),t}catch{return!1}},Fe=({group:n,servers:p,onEdit:t,onDelete:d,cost:y})=>{var M;const{t:c}=$(),{showToast:b}=me(),{installConfig:C,nameSeparator:A}=ne(),m=((M=C==null?void 0:C.baseUrl)==null?void 0:M.replace(/\/+$/,""))||"",[N,k]=h.useState(!1),[E,S]=h.useState(!1),[D,u]=h.useState(!1),g=h.useRef(null);h.useEffect(()=>{const w=T=>{g.current&&!g.current.contains(T.target)&&u(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[]);const x=async w=>{await ze(w)?(S(!0),u(!1),b(c("common.copySuccess")||"Copied","success"),setTimeout(()=>S(!1),1500)):b(c("common.copyFailed")||"Copy failed","error")},r=`${m}/mcp/${n.name}`,o=Ie(n.servers),j=p.filter(w=>o.includes(w.name)),I=w=>{const T=oe(n,w.name),O=`${w.name}${A}`,W=w.tools||[],J=w.prompts||[],s=w.resources||[],l=Array.isArray(T.tools)?W.filter(i=>{if(i.enabled===!1)return!1;const P=i.name.startsWith(O)?i.name.slice(O.length):i.name;return T.tools.includes(P)}).length:W.filter(i=>i.enabled!==!1).length,a=Array.isArray(T.prompts)?J.filter(i=>{if(i.enabled===!1)return!1;const P=i.name.startsWith(O)?i.name.slice(O.length):i.name;return T.prompts.includes(P)}).length:J.filter(i=>i.enabled!==!1).length,f=Array.isArray(T.resources)?s.filter(i=>i.enabled!==!1&&T.resources.includes(i.uri)).length:s.filter(i=>i.enabled!==!1).length;return{visibleTools:l,totalTools:W.length,visiblePrompts:a,totalPrompts:J.length,visibleResources:f,totalResources:s.length}},F=j.reduce((w,T)=>w+I(T).visibleTools,0);return e.jsxs("div",{className:"hub-card flex h-full flex-col overflow-visible",children:[e.jsxs("div",{className:"flex items-start gap-3 px-4 py-3",style:{borderBottom:"1px solid var(--hub-line-2)"},children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{style:{fontSize:15,fontWeight:600,letterSpacing:"-0.015em"},children:n.name}),e.jsx("span",{className:"hub-mono",style:{fontSize:11,color:"var(--hub-ink-3)",padding:"0 6px",border:"1px solid var(--hub-line)",borderRadius:4,height:18,display:"inline-flex",alignItems:"center"},title:n.id,children:n.id})]}),n.description&&e.jsx("div",{style:{fontSize:12.5,color:"var(--hub-ink-3)",marginTop:2},children:n.description})]}),e.jsxs("div",{className:"flex items-center gap-1",ref:g,children:[e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:()=>u(w=>!w),className:"hub-icon-btn sm",title:c("common.copy"),children:E?e.jsx(be,{size:13,className:"text-[var(--hub-ok)]"}):e.jsx(V,{size:13})}),D&&e.jsxs("div",{className:"absolute top-full right-0 mt-1 z-20 hub-card",style:{minWidth:160,padding:4},children:[e.jsxs("button",{onClick:()=>x(n.id),className:"flex items-center gap-2 w-full px-2.5 py-1.5 text-[13px] rounded-md hover:bg-[var(--hub-surface-hover)] text-left",children:[e.jsx(V,{size:12})," ",c("common.copyId")]}),e.jsxs("button",{onClick:()=>x(r),className:"flex items-center gap-2 w-full px-2.5 py-1.5 text-[13px] rounded-md hover:bg-[var(--hub-surface-hover)] text-left",children:[e.jsx(fe,{size:12})," ",c("common.copyUrl")]}),e.jsxs("button",{onClick:()=>x(JSON.stringify({mcpServers:{mcphub:{url:r,headers:{Authorization:"Bearer <your-access-token>"}}}},null,2)),className:"flex items-center gap-2 w-full px-2.5 py-1.5 text-[13px] rounded-md hover:bg-[var(--hub-surface-hover)] text-left",children:[e.jsx(ye,{size:12})," ",c("common.copyJson")]})]})]}),e.jsx("button",{onClick:()=>t(n),className:"hub-icon-btn sm",title:c("groups.edit"),children:e.jsx(je,{size:13})}),e.jsx("button",{onClick:()=>k(!0),className:"hub-icon-btn sm",title:c("groups.delete"),style:{color:"var(--hub-ink-3)"},children:e.jsx(ve,{size:13})})]})]}),e.jsxs("div",{className:"grid flex-1 items-center gap-3 px-4 py-3",style:{gridTemplateColumns:"1fr 80px 1fr",minHeight:180},children:[e.jsx("div",{className:"flex flex-col gap-1.5",children:j.length===0?e.jsx("div",{style:{fontSize:12,color:"var(--hub-ink-3)"},children:c("groups.noServers")}):j.map(w=>{const T=I(w);return e.jsxs("div",{className:"flex items-center gap-2.5 px-2.5 py-1.5 rounded-md",style:{background:"var(--hub-bg-2)",border:"1px solid var(--hub-line-2)"},children:[e.jsx("span",{className:"inline-block flex-shrink-0",style:{width:6,height:6,borderRadius:50,background:w.status==="connected"?"var(--hub-ok)":w.status==="connecting"?"var(--hub-warn)":"var(--hub-err)"}}),e.jsx("span",{className:"hub-mono truncate flex-1",style:{fontSize:12.5},children:e.jsx("span",{title:w.name,children:Te(n,w.name)})}),e.jsxs("span",{className:"hub-mono hub-num flex-shrink-0",style:{fontSize:11,color:"var(--hub-ink-3)"},children:[T.visibleTools,"/",T.totalTools," tools"]})]},w.name)})}),e.jsxs("svg",{width:"80",height:"80",viewBox:"0 0 80 80",className:"self-center",children:[j.length===0?e.jsx("path",{d:"M0,40 C30,40 50,40 80,40",stroke:"var(--hub-line)",strokeWidth:"1",fill:"none",strokeDasharray:"3 3"}):j.map((w,T)=>{const O=12+60/Math.max(j.length,1)*(T+.5);return e.jsx("path",{d:`M0,${O} C 30,${O} 50,40 80,40`,stroke:"var(--hub-line)",strokeWidth:"1",fill:"none",strokeDasharray:"3 3"},T)}),e.jsx("circle",{cx:"80",cy:"40",r:"4",fill:"var(--hub-ink)"})]}),e.jsxs("div",{className:"px-3 py-2.5 rounded-md",style:{border:"1px solid var(--hub-line)",background:"var(--hub-bg-2)"},children:[e.jsx("div",{className:"hub-sect",style:{marginBottom:4},children:"endpoint"}),e.jsxs("div",{className:"hub-mono break-all",style:{fontSize:12,color:"var(--hub-ink-2)",lineHeight:1.4},children:[e.jsx("span",{style:{color:"var(--hub-ink-3)"},children:"/mcp/"}),e.jsx("b",{style:{color:"var(--hub-ink)",fontWeight:600},children:n.name})]}),e.jsx("div",{className:"flex gap-1.5 mt-2",children:e.jsxs("button",{className:"hub-btn sm flex-1 justify-center",onClick:()=>x(r),children:[e.jsx(V,{size:11})," ",c("common.copy")]})})]})]}),e.jsxs("div",{className:"flex justify-between items-center px-4 py-2",style:{borderTop:"1px solid var(--hub-line-2)",background:"var(--hub-bg-2)",fontSize:12,color:"var(--hub-ink-3)"},children:[e.jsxs("div",{children:[e.jsxs("div",{className:"hub-mono",children:[e.jsx("span",{style:{color:"var(--hub-ink-2)"},children:j.length})," ",c("nav.servers").toLowerCase()," ·"," ",e.jsx("span",{style:{color:"var(--hub-ink-2)"},children:F})," ",c("server.tools").toLowerCase()]}),y&&e.jsxs("div",{className:"hub-mono mt-1",style:{fontSize:11.5,color:"var(--hub-ink-3)"},children:[e.jsxs("div",{title:c("cost.estimate"),children:[c("cost.totalFootprint"),": ",B(y.direct.exposed),"/",B(y.direct.gross)]}),y.smartRouting&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[c("cost.smartRouting"),": ",B(y.smartRouting.base)," (",c("cost.saved",{percent:ue(y.direct.exposed,y.smartRouting.base)}),")"]}),e.jsxs("div",{title:c("cost.smartRoutingPdHint"),children:[c("cost.smartRoutingPd"),":"," ",B(y.smartRouting.progressiveDisclosure)]})]}),y.connectedCount<y.totalCount&&e.jsx("div",{children:c("cost.connectedOf",{connected:y.connectedCount,total:y.totalCount})})]})]}),e.jsxs("button",{className:"hub-btn ghost sm",style:{color:"var(--hub-ink-3)"},onClick:()=>t(n),children:[c("groups.configureTools")||c("groups.edit"),e.jsx(Ne,{size:11,style:{transform:"rotate(-90deg)"}})]})]}),e.jsx(Ce,{isOpen:N,onClose:()=>k(!1),onConfirm:()=>{d(n.id),k(!1)},serverName:n.name,isGroup:!0})]})},Re=({onSuccess:n,onCancel:p})=>{const{t}=$(),[d,y]=h.useState(""),[c,b]=h.useState(null),[C,A]=h.useState(!1),[m,N]=h.useState(null),k=`{
1
+ import{r as h,R as U,j as e}from"./framework-vendor-BHAQX05P.js";import{m as se,d as _,i as me,e as X}from"./index-CvXw771N.js";import{f as B,u as Y,a as Z,p as ue}from"./contextCost-kp2vZYp7.js";import{u as ne}from"./useSettingsData-CeCvZ2nU.js";import{g as pe}from"./toolDescription-Dw3sa28K.js";import{u as $}from"./i18n-vendor-CMcB7XUR.js";import{W as xe,g as he,F as ge,C as be,q as V,G as fe,y as ye,w as je,T as ve,u as Ne,z as te,H as ke,P as re,l as Se,X as we}from"./icons-vendor-HZHHWeTa.js";import{D as Ce}from"./DeleteDialog-D9ycSRvn.js";const Ee={tools:[],prompts:[],resources:[]},ae={tools:"all",prompts:"all",resources:"all"},le=({servers:n,value:p,onChange:t,className:d,serverCosts:y=[]})=>{const{t:c}=$(),{nameSeparator:b}=ne(),[C,A]=h.useState(new Set),m=U.useMemo(()=>p.map(s=>typeof s=="string"?{name:s,...ae}:{...s,tools:s.tools||"all",prompts:s.prompts||"all",resources:s.resources||"all"}),[p]),N=U.useMemo(()=>n.filter(s=>s.enabled!==!1),[n]);U.useEffect(()=>{const s=new Set(m.map(a=>a.name)),l=new Set(N.map(a=>a.name));A(a=>{const f=new Set;return a.forEach(i=>{(s.has(i)||l.has(i))&&f.add(i)}),f})},[m,N]);const k=s=>{if(m.findIndex(a=>a.name===s)>=0){const a=m.filter(f=>f.name!==s);t(a)}else{const a=[...m,{name:s,...ae}];t(a)}},E=s=>{A(l=>{const a=new Set(l);return a.has(s)?a.delete(s):a.add(s),a})},S=s=>["tools","prompts","resources"].some(l=>{const a=s[l];return a==="all"||Array.isArray(a)&&a.length>0}),D=(s,l,a,f=!1)=>{const i=m.find(z=>z.name===s),R={...i?{...i}:{name:s,...Ee},[l]:a};if(!S(R)){const z=m.filter(v=>v.name!==s);t(z),f||A(v=>{const q=new Set(v);return q.delete(s),q});return}if(i){t(m.map(z=>z.name===s?R:z));return}t([...m,R])},u=(s,l)=>{const a=m.find(i=>i.name===s);if(!a)return;const f={...a};l?f.alias=l:delete f.alias,t(m.map(i=>i.name===s?f:i))},g=(s,l)=>{const a=`${s}${b}`;return l.startsWith(a)?l.slice(a.length):l},x=(s,l)=>l==="tools"?(s.tools||[]).filter(a=>a.enabled!==!1).map(a=>({key:a.name,value:g(s.name,a.name),description:a.description,defaultDescription:a.defaultDescription,hasDescriptionOverride:a.hasDescriptionOverride})):l==="prompts"?(s.prompts||[]).filter(a=>a.enabled!==!1).map(a=>({key:a.name,value:g(s.name,a.name),description:a.description})):(s.resources||[]).filter(a=>a.enabled!==!1).map(a=>({key:a.uri,value:a.uri,description:a.description})),r=U.useMemo(()=>{const s=new Map;return y.forEach(l=>{const a=new Map;l.items.forEach(f=>a.set(f.name,f.cost)),s.set(l.name,a)}),s},[y]),o=s=>r.get(s)??new Map,j=(s,l)=>{const a=o(s.name);return x(s,l).filter(f=>T(s.name,l,f.value)).reduce((f,i)=>f+(a.get(i.key)??0),0)},I=s=>["tools","prompts","resources"].reduce((l,a)=>l+j(s,a),0),F=(s,l,a)=>{const f=N.find(z=>z.name===s);if(!f)return;const i=x(f,l).map(z=>z.value),P=m.find(z=>z.name===s);if(!P){D(s,l,[a]);return}const R=P[l];if(R==="all"){const z=i.filter(v=>v!==a);D(s,l,z);return}if(Array.isArray(R)){if(R.includes(a)){D(s,l,R.filter(v=>v!==a));return}const z=[...R,a];D(s,l,z.length===i.length?"all":z);return}D(s,l,[a])},M=s=>{const l=m.find(a=>a.name===s);return!!(l&&S(l))},w=s=>{const l=m.find(a=>a.name===s);return l?["tools","prompts","resources"].some(a=>{const f=l[a];return Array.isArray(f)&&f.length>0}):!1},T=(s,l,a)=>{const f=m.find(P=>P.name===s);if(!f)return!1;const i=f[l];return i==="all"?!0:Array.isArray(i)?i.includes(a):!1},O=(s,l)=>{const a=m.find(P=>P.name===s.name);if(!a)return 0;const f=x(s,l),i=a[l];if(i==="all")return f.length;if(Array.isArray(i)){const P=new Set(f.map(R=>R.value));return i.filter(R=>P.has(R)).length}return 0},W=[{key:"tools",titleKey:"groups.toolSelection",countKey:"groups.toolsSelected",allKey:"groups.allTools"},{key:"prompts",titleKey:"groups.promptSelection",countKey:"groups.promptsSelected",allKey:"groups.allPrompts"},{key:"resources",titleKey:"groups.resourceSelection",countKey:"groups.resourcesSelected",allKey:"groups.allResources"}],J=s=>W.map(({key:l})=>({key:l,count:O(s,l)})).filter(l=>l.count>0);return e.jsxs("div",{className:se("space-y-4",d),children:[e.jsx("div",{className:"space-y-3",children:N.map(s=>{const l=M(s.name),a=w(s.name),f=C.has(s.name),i=m.find(v=>v.name===s.name),P=J(s),R=W.filter(({key:v})=>x(s,v).length>0),z=o(s.name);return e.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg hover:border-gray-300 hover:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 transition-colors",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 cursor-pointer rounded-lg transition-colors",onClick:()=>E(s.name),children:[e.jsxs("div",{className:"flex items-center space-x-3",onClick:v=>{v.stopPropagation(),k(s.name)},children:[e.jsx("input",{type:"checkbox",checked:l||a,onChange:()=>k(s.name),className:"w-4 h-4 text-blue-600 bg-gray-100 dark:bg-gray-800 border-gray-300 rounded focus:ring-blue-500"}),e.jsx("span",{className:"font-medium text-gray-900 cursor-pointer select-none",children:s.name})]}),e.jsxs("div",{className:"flex items-center space-x-3",children:[I(s)>0&&e.jsxs("span",{className:"text-sm text-gray-400 hub-mono",title:c("cost.estimate"),children:["Σ ",B(I(s))]}),P.map(({key:v,count:q})=>e.jsxs("span",{className:"text-sm text-green-600 flex items-center gap-1",children:[v==="tools"?e.jsx(xe,{size:14}):v==="prompts"?e.jsx(he,{size:14}):e.jsx(ge,{size:14})," ",q]},v)),R.length>0&&e.jsx("button",{type:"button",className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",children:e.jsx("svg",{className:se("w-5 h-5 transition-transform",f&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),f&&R.length>0&&e.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 p-3",children:e.jsxs("div",{className:"space-y-4",children:[i&&e.jsxs("div",{className:"space-y-1",onClick:v=>v.stopPropagation(),children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600",children:c("groups.alias")}),e.jsx("input",{type:"text",value:i.alias||"",placeholder:s.name,onChange:v=>u(s.name,v.target.value),className:"w-full rounded-md border border-gray-300 bg-white px-2.5 py-1.5 text-sm text-gray-800 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-900 dark:text-gray-100"})]}),R.map(({key:v,titleKey:q,countKey:ie,allKey:ce})=>{const K=x(s,v),Q=O(s,v),H=(i==null?void 0:i[v])==="all"||Q===K.length;return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700",children:c(q)}),e.jsxs("div",{className:"flex items-center gap-3",children:[i&&e.jsx("span",{className:"text-xs text-green-600",children:H?`(${c(ce)} ${K.length}/${K.length})`:`(${c(ie)} ${Q}/${K.length})`}),i&&j(s,v)>0&&e.jsxs("span",{className:"text-xs text-gray-400 hub-mono",title:c("cost.estimate"),children:["Σ ",B(j(s,v))]}),e.jsx("button",{type:"button",onClick:()=>{D(s.name,v,H?[]:"all",!0)},className:"text-sm text-blue-600 hover:text-blue-800 transition-colors",children:c(H?"groups.selectNone":"groups.selectAll")})]})]}),e.jsx("div",{className:"grid grid-cols-1 gap-2 max-h-32 overflow-y-auto",children:K.map(G=>{const de=T(s.name,v,G.value),L=v==="tools"?pe({description:G.description,defaultDescription:G.defaultDescription,hasDescriptionOverride:G.hasDescriptionOverride},c("tool.noDescription")):null,ee=L!=null&&L.hasDescriptionOverride?c("tool.defaultDescriptionTooltip",{description:L.defaultDescription}):G.description;return e.jsxs("label",{className:"flex min-w-0 items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:de,onChange:()=>F(s.name,v,G.value),className:"w-3 h-3 text-blue-600 bg-gray-100 dark:bg-gray-800 border-gray-300 rounded focus:ring-blue-500"}),e.jsx("span",{className:"text-gray-700 break-all whitespace-nowrap flex-shrink-0",children:G.value}),(G.description||(L==null?void 0:L.hasDescriptionOverride))&&e.jsxs("span",{className:"min-w-0 flex items-center gap-1 text-gray-400 text-xs truncate",children:[e.jsx("span",{className:"truncate",title:ee||void 0,children:L?L.currentDescription:G.description}),(L==null?void 0:L.hasDescriptionOverride)&&e.jsx("span",{className:"inline-flex flex-shrink-0 items-center rounded-full border border-amber-200 bg-amber-50 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 dark:border-amber-700/60 dark:bg-amber-900/20 dark:text-amber-300",title:ee||void 0,children:c("tool.descriptionModifiedBadge")})]}),z.get(G.key)!=null&&e.jsxs("span",{className:"text-xs text-gray-400 hub-mono whitespace-nowrap ml-auto flex-shrink-0",title:c("cost.estimate"),children:["Σ ",B(z.get(G.key))]})]},G.key)})})]},v)})]})})]},s.name)})}),N.length===0&&e.jsx("p",{className:"text-gray-500 text-sm",children:c("groups.noServerOptions")})]})},De=({onAdd:n,onCancel:p})=>{const{t}=$(),{createGroup:d}=_(),{allServers:y}=Y(),{serverCosts:c}=Z(),[b,C]=h.useState([]),[A,m]=h.useState(null),[N,k]=h.useState(!1),[E,S]=h.useState({name:"",description:"",servers:[]});h.useEffect(()=>{C(y.filter(g=>g.enabled!==!1))},[y]);const D=g=>{const{name:x,value:r}=g.target;S(o=>({...o,[x]:r}))},u=async g=>{g.preventDefault(),k(!0),m(null);try{if(!E.name.trim()){m(t("groups.nameRequired")),k(!1);return}const x=await d(E.name,E.description,E.servers);if(!x||!x.success){m((x==null?void 0:x.message)||t("groups.createError")),k(!1);return}n()}catch(x){m(x instanceof Error?x.message:String(x)),k(!1)}};return e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-3xl w-full max-h-[90vh] flex flex-col",children:[e.jsxs("div",{className:"p-6 flex-shrink-0",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:t("groups.addNew")}),A&&e.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded-md border border-gray-200 dark:border-gray-700",children:A})]}),e.jsxs("form",{onSubmit:u,className:"flex flex-col flex-1 min-h-0",children:[e.jsx("div",{className:"flex-1 overflow-y-auto px-6",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[t("groups.name")," *"]}),e.jsx("input",{type:"text",id:"name",name:"name",value:E.name,onChange:D,className:"w-full border border-gray-300 rounded-md px-3 py-2 text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:t("groups.namePlaceholder"),required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:t("groups.configureCapabilities")}),e.jsx(le,{servers:b,value:E.servers,onChange:g=>S(x=>({...x,servers:g})),className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4 bg-gray-50 dark:bg-gray-800",serverCosts:c})]})]})}),e.jsxs("div",{className:"flex justify-end space-x-2 p-5 pt-3 border-t border-[var(--hub-line-2)] flex-shrink-0",children:[e.jsx("button",{type:"button",onClick:p,className:"hub-btn",disabled:N,children:t("common.cancel")}),e.jsx("button",{type:"submit",className:"hub-btn primary",disabled:N,children:t(N?"common.submitting":"common.create")})]})]})]})})},Ae=({group:n,onEdit:p,onCancel:t})=>{const{t:d}=$(),{updateGroup:y}=_(),{allServers:c}=Y(),{serverCosts:b}=Z(),[C,A]=h.useState([]),[m,N]=h.useState(null),[k,E]=h.useState(!1),[S,D]=h.useState({name:n.name,description:n.description||"",servers:n.servers||[]});h.useEffect(()=>{A(c.filter(x=>x.enabled!==!1))},[c]);const u=x=>{const{name:r,value:o}=x.target;D(j=>({...j,[r]:o}))},g=async x=>{x.preventDefault(),E(!0),N(null);try{if(!S.name.trim()){N(d("groups.nameRequired")),E(!1);return}const r=await y(n.id,{name:S.name,description:S.description,servers:S.servers});if(!r||!r.success){N((r==null?void 0:r.message)||d("groups.updateError")),E(!1);return}p()}catch(r){N(r instanceof Error?r.message:String(r)),E(!1)}};return e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-3xl w-full max-h-[90vh] flex flex-col",children:[e.jsxs("div",{className:"p-6 flex-shrink-0",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:d("groups.edit")}),m&&e.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded-md border border-gray-200 dark:border-gray-700",children:m})]}),e.jsxs("form",{onSubmit:g,className:"flex flex-col flex-1 min-h-0",children:[e.jsx("div",{className:"flex-1 overflow-y-auto px-6",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[d("groups.name")," *"]}),e.jsx("input",{type:"text",id:"name",name:"name",value:S.name,onChange:u,className:"w-full border border-gray-300 rounded-md px-3 py-2 text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:d("groups.namePlaceholder"),required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:d("groups.configureCapabilities")}),e.jsx(le,{servers:C,value:S.servers,onChange:x=>D(r=>({...r,servers:x})),className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4 bg-gray-50 dark:bg-gray-800",serverCosts:b})]})]})}),e.jsxs("div",{className:"flex justify-end space-x-2 p-5 pt-3 border-t border-[var(--hub-line-2)] flex-shrink-0",children:[e.jsx("button",{type:"button",onClick:t,className:"hub-btn",disabled:k,children:d("common.cancel")}),e.jsx("button",{type:"submit",className:"hub-btn primary",disabled:k,children:d(k?"common.submitting":"common.save")})]})]})]})})},Ie=n=>n.map(p=>typeof p=="string"?p:p.name),oe=(n,p)=>{const t=n.servers.find(d=>typeof d=="string"?d===p:d.name===p);return t?typeof t=="string"?{name:t,tools:"all",prompts:"all",resources:"all"}:t:{name:p,tools:"all",prompts:"all",resources:"all"}},Te=(n,p)=>{var d;return((d=oe(n,p).alias)==null?void 0:d.trim())||p},ze=async n=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(n),!0}catch{}try{const p=document.createElement("textarea");p.value=n,p.style.position="fixed",p.style.left="-9999px",document.body.appendChild(p),p.focus(),p.select();const t=document.execCommand("copy");return document.body.removeChild(p),t}catch{return!1}},Fe=({group:n,servers:p,onEdit:t,onDelete:d,cost:y})=>{var M;const{t:c}=$(),{showToast:b}=me(),{installConfig:C,nameSeparator:A}=ne(),m=((M=C==null?void 0:C.baseUrl)==null?void 0:M.replace(/\/+$/,""))||"",[N,k]=h.useState(!1),[E,S]=h.useState(!1),[D,u]=h.useState(!1),g=h.useRef(null);h.useEffect(()=>{const w=T=>{g.current&&!g.current.contains(T.target)&&u(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[]);const x=async w=>{await ze(w)?(S(!0),u(!1),b(c("common.copySuccess")||"Copied","success"),setTimeout(()=>S(!1),1500)):b(c("common.copyFailed")||"Copy failed","error")},r=`${m}/mcp/${n.name}`,o=Ie(n.servers),j=p.filter(w=>o.includes(w.name)),I=w=>{const T=oe(n,w.name),O=`${w.name}${A}`,W=w.tools||[],J=w.prompts||[],s=w.resources||[],l=Array.isArray(T.tools)?W.filter(i=>{if(i.enabled===!1)return!1;const P=i.name.startsWith(O)?i.name.slice(O.length):i.name;return T.tools.includes(P)}).length:W.filter(i=>i.enabled!==!1).length,a=Array.isArray(T.prompts)?J.filter(i=>{if(i.enabled===!1)return!1;const P=i.name.startsWith(O)?i.name.slice(O.length):i.name;return T.prompts.includes(P)}).length:J.filter(i=>i.enabled!==!1).length,f=Array.isArray(T.resources)?s.filter(i=>i.enabled!==!1&&T.resources.includes(i.uri)).length:s.filter(i=>i.enabled!==!1).length;return{visibleTools:l,totalTools:W.length,visiblePrompts:a,totalPrompts:J.length,visibleResources:f,totalResources:s.length}},F=j.reduce((w,T)=>w+I(T).visibleTools,0);return e.jsxs("div",{className:"hub-card flex h-full flex-col overflow-visible",children:[e.jsxs("div",{className:"flex items-start gap-3 px-4 py-3",style:{borderBottom:"1px solid var(--hub-line-2)"},children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{style:{fontSize:15,fontWeight:600,letterSpacing:"-0.015em"},children:n.name}),e.jsx("span",{className:"hub-mono",style:{fontSize:11,color:"var(--hub-ink-3)",padding:"0 6px",border:"1px solid var(--hub-line)",borderRadius:4,height:18,display:"inline-flex",alignItems:"center"},title:n.id,children:n.id})]}),n.description&&e.jsx("div",{style:{fontSize:12.5,color:"var(--hub-ink-3)",marginTop:2},children:n.description})]}),e.jsxs("div",{className:"flex items-center gap-1",ref:g,children:[e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:()=>u(w=>!w),className:"hub-icon-btn sm",title:c("common.copy"),children:E?e.jsx(be,{size:13,className:"text-[var(--hub-ok)]"}):e.jsx(V,{size:13})}),D&&e.jsxs("div",{className:"absolute top-full right-0 mt-1 z-20 hub-card",style:{minWidth:160,padding:4},children:[e.jsxs("button",{onClick:()=>x(n.id),className:"flex items-center gap-2 w-full px-2.5 py-1.5 text-[13px] rounded-md hover:bg-[var(--hub-surface-hover)] text-left",children:[e.jsx(V,{size:12})," ",c("common.copyId")]}),e.jsxs("button",{onClick:()=>x(r),className:"flex items-center gap-2 w-full px-2.5 py-1.5 text-[13px] rounded-md hover:bg-[var(--hub-surface-hover)] text-left",children:[e.jsx(fe,{size:12})," ",c("common.copyUrl")]}),e.jsxs("button",{onClick:()=>x(JSON.stringify({mcpServers:{mcphub:{url:r,headers:{Authorization:"Bearer <your-access-token>"}}}},null,2)),className:"flex items-center gap-2 w-full px-2.5 py-1.5 text-[13px] rounded-md hover:bg-[var(--hub-surface-hover)] text-left",children:[e.jsx(ye,{size:12})," ",c("common.copyJson")]})]})]}),e.jsx("button",{onClick:()=>t(n),className:"hub-icon-btn sm",title:c("groups.edit"),children:e.jsx(je,{size:13})}),e.jsx("button",{onClick:()=>k(!0),className:"hub-icon-btn sm",title:c("groups.delete"),style:{color:"var(--hub-ink-3)"},children:e.jsx(ve,{size:13})})]})]}),e.jsxs("div",{className:"grid flex-1 items-center gap-3 px-4 py-3",style:{gridTemplateColumns:"1fr 80px 1fr",minHeight:180},children:[e.jsx("div",{className:"flex flex-col gap-1.5",children:j.length===0?e.jsx("div",{style:{fontSize:12,color:"var(--hub-ink-3)"},children:c("groups.noServers")}):j.map(w=>{const T=I(w);return e.jsxs("div",{className:"flex items-center gap-2.5 px-2.5 py-1.5 rounded-md",style:{background:"var(--hub-bg-2)",border:"1px solid var(--hub-line-2)"},children:[e.jsx("span",{className:"inline-block flex-shrink-0",style:{width:6,height:6,borderRadius:50,background:w.status==="connected"?"var(--hub-ok)":w.status==="connecting"?"var(--hub-warn)":"var(--hub-err)"}}),e.jsx("span",{className:"hub-mono truncate flex-1",style:{fontSize:12.5},children:e.jsx("span",{title:w.name,children:Te(n,w.name)})}),e.jsxs("span",{className:"hub-mono hub-num flex-shrink-0",style:{fontSize:11,color:"var(--hub-ink-3)"},children:[T.visibleTools,"/",T.totalTools," tools"]})]},w.name)})}),e.jsxs("svg",{width:"80",height:"80",viewBox:"0 0 80 80",className:"self-center",children:[j.length===0?e.jsx("path",{d:"M0,40 C30,40 50,40 80,40",stroke:"var(--hub-line)",strokeWidth:"1",fill:"none",strokeDasharray:"3 3"}):j.map((w,T)=>{const O=12+60/Math.max(j.length,1)*(T+.5);return e.jsx("path",{d:`M0,${O} C 30,${O} 50,40 80,40`,stroke:"var(--hub-line)",strokeWidth:"1",fill:"none",strokeDasharray:"3 3"},T)}),e.jsx("circle",{cx:"80",cy:"40",r:"4",fill:"var(--hub-ink)"})]}),e.jsxs("div",{className:"px-3 py-2.5 rounded-md",style:{border:"1px solid var(--hub-line)",background:"var(--hub-bg-2)"},children:[e.jsx("div",{className:"hub-sect",style:{marginBottom:4},children:"endpoint"}),e.jsxs("div",{className:"hub-mono break-all",style:{fontSize:12,color:"var(--hub-ink-2)",lineHeight:1.4},children:[e.jsx("span",{style:{color:"var(--hub-ink-3)"},children:"/mcp/"}),e.jsx("b",{style:{color:"var(--hub-ink)",fontWeight:600},children:n.name})]}),e.jsx("div",{className:"flex gap-1.5 mt-2",children:e.jsxs("button",{className:"hub-btn sm flex-1 justify-center",onClick:()=>x(r),children:[e.jsx(V,{size:11})," ",c("common.copy")]})})]})]}),e.jsxs("div",{className:"flex justify-between items-center px-4 py-2",style:{borderTop:"1px solid var(--hub-line-2)",background:"var(--hub-bg-2)",fontSize:12,color:"var(--hub-ink-3)"},children:[e.jsxs("div",{children:[e.jsxs("div",{className:"hub-mono",children:[e.jsx("span",{style:{color:"var(--hub-ink-2)"},children:j.length})," ",c("nav.servers").toLowerCase()," ·"," ",e.jsx("span",{style:{color:"var(--hub-ink-2)"},children:F})," ",c("server.tools").toLowerCase()]}),y&&e.jsxs("div",{className:"hub-mono mt-1",style:{fontSize:11.5,color:"var(--hub-ink-3)"},children:[e.jsxs("div",{title:c("cost.estimate"),children:[c("cost.totalFootprint"),": ",B(y.direct.exposed),"/",B(y.direct.gross)]}),y.smartRouting&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[c("cost.smartRouting"),": ",B(y.smartRouting.base)," (",c("cost.saved",{percent:ue(y.direct.exposed,y.smartRouting.base)}),")"]}),e.jsxs("div",{title:c("cost.smartRoutingPdHint"),children:[c("cost.smartRoutingPd"),":"," ",B(y.smartRouting.progressiveDisclosure)]})]}),y.connectedCount<y.totalCount&&e.jsx("div",{children:c("cost.connectedOf",{connected:y.connectedCount,total:y.totalCount})})]})]}),e.jsxs("button",{className:"hub-btn ghost sm",style:{color:"var(--hub-ink-3)"},onClick:()=>t(n),children:[c("groups.configureTools")||c("groups.edit"),e.jsx(Ne,{size:11,style:{transform:"rotate(-90deg)"}})]})]}),e.jsx(Ce,{isOpen:N,onClose:()=>k(!1),onConfirm:()=>{d(n.id),k(!1)},serverName:n.name,isGroup:!0})]})},Re=({onSuccess:n,onCancel:p})=>{const{t}=$(),[d,y]=h.useState(""),[c,b]=h.useState(null),[C,A]=h.useState(!1),[m,N]=h.useState(null),k=`{
2
2
  "groups": [
3
3
  {
4
4
  "name": "AI Assistants",
@@ -30,4 +30,4 @@ Supports:
30
30
  - All groups will be imported in a single efficient batch operation.`,E=r=>{try{const o=JSON.parse(r.trim());if(!o.groups||!Array.isArray(o.groups))return b(t("groupImport.invalidFormat")),null;for(const j of o.groups)if(!j.name||typeof j.name!="string")return b(t("groupImport.missingName")),null;return o}catch{return b(t("groupImport.parseError")),null}},S=()=>{b(null);const r=E(d);r&&N(r.groups)},D=async()=>{if(m){A(!0),b(null);try{const r=await X("/groups/batch",{groups:m});if(r.success){const{successCount:o,failureCount:j,results:I}=r;if(j>0){const F=I.filter(M=>!M.success).map(M=>`${M.name}: ${M.message||t("groupImport.addFailed")}`);b(t("groupImport.partialSuccess",{count:o,total:m.length})+`
31
31
  `+F.join(`
32
32
  `))}o>0&&n()}else b(r.message||t("groupImport.importFailed"))}catch(r){console.error("Import error:",r),b(t("groupImport.importFailed"))}finally{A(!1)}}},u=r=>e.jsx("span",{className:"text-gray-500 ml-2",children:t(`groups.${r}`)}),g=(r,o)=>{if(!o||o==="all")return null;const j=Array.isArray(o)?o.join(", "):o;return e.jsx("span",{className:"text-gray-500 ml-2",children:t(`groups.${r}`,{items:j})})},x=r=>!r||r.length===0?e.jsx("span",{className:"text-gray-500",children:t("groups.noServers")}):e.jsx("div",{className:"space-y-1",children:r.map((o,j)=>typeof o=="string"?e.jsxs("div",{className:"text-sm",children:["• ",o]},j):e.jsxs("div",{className:"text-sm",children:["• ",o.name,o.tools&&o.tools!=="all"&&e.jsxs("span",{className:"text-gray-500 ml-2",children:["(",Array.isArray(o.tools)?o.tools.join(", "):o.tools,")"]}),o.tools==="all"&&u("previewAllTools"),g("previewPrompts",o.prompts),o.prompts==="all"&&u("previewAllPrompts"),g("previewResources",o.resources),o.resources==="all"&&u("previewAllResources")]},j))});return e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:t("groupImport.title")}),e.jsx("button",{onClick:p,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),c&&e.jsx("div",{className:"mb-4 bg-red-50 border-l-4 border-red-500 p-4 rounded",children:e.jsx("p",{className:"text-red-700 whitespace-pre-wrap",children:c})}),m?e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:t("groupImport.previewTitle")}),e.jsx("div",{className:"space-y-3",children:m.map((r,o)=>e.jsx("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-medium text-gray-900",children:r.name}),r.description&&e.jsx("p",{className:"text-sm text-gray-600 mt-1",children:r.description}),e.jsxs("div",{className:"mt-2 text-sm text-gray-600",children:[e.jsxs("strong",{children:[t("groups.servers"),":"]}),e.jsx("div",{className:"mt-1",children:x(r.servers)})]})]})})},o))})]}),e.jsxs("div",{className:"flex justify-end space-x-4",children:[e.jsx("button",{onClick:()=>N(null),disabled:C,className:"hub-btn",children:t("common.back")}),e.jsx("button",{onClick:D,disabled:C,className:"hub-btn primary",children:C?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"animate-spin h-4 w-4 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),t("groupImport.importing")]}):t("groupImport.import")})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:t("groupImport.inputLabel")}),e.jsx("textarea",{value:d,onChange:r=>y(r.target.value),className:"w-full h-96 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 font-mono text-sm",placeholder:k}),e.jsx("p",{className:"text-xs text-gray-500 mt-2",children:t("groupImport.inputHelp")})]}),e.jsxs("div",{className:"flex justify-end space-x-4",children:[e.jsx("button",{onClick:p,className:"hub-btn",children:t("common.cancel")}),e.jsx("button",{onClick:S,disabled:!d.trim(),className:"hub-btn primary",children:t("groupImport.preview")})]})]})]})})},Pe=({groups:n,onCancel:p})=>{const{t}=$(),[d,y]=h.useState(""),[c,b]=h.useState(""),[C,A]=h.useState([]),[m,N]=h.useState(!1),[k,E]=h.useState(!1),[S,D]=h.useState(null),u=r=>{A(o=>o.includes(r)?o.filter(j=>j!==r):[...o,r])},g=()=>{C.length===n.length?A([]):A(n.map(r=>r.id))},x=async()=>{if(!d.trim()){D(t("template.nameRequired"));return}E(!0),D(null);try{const r=await X("/templates/export",{name:d.trim(),description:c.trim()||void 0,groupIds:C.length>0?C:void 0,includeDisabledServers:m});if(r.success&&r.data){const o=r.data,j=new Blob([JSON.stringify(o,null,2)],{type:"application/json"}),I=URL.createObjectURL(j),F=document.createElement("a");F.href=I,F.download=`${o.name.replace(/[^a-zA-Z0-9-_]/g,"_")}.mcphub-template.json`,document.body.appendChild(F),F.click(),document.body.removeChild(F),URL.revokeObjectURL(I),p()}else D(r.message||t("template.exportFailed"))}catch(r){console.error("Export error:",r),D(t("template.exportFailed"))}finally{E(!1)}};return e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6 w-full max-w-3xl max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:t("template.exportTitle")}),e.jsx("button",{onClick:p,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),S&&e.jsx("div",{className:"mb-4 bg-red-50 border-l-4 border-red-500 p-4 rounded",children:e.jsx("p",{className:"text-red-700",children:S})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[t("template.name")," *"]}),e.jsx("input",{type:"text",value:d,onChange:r=>y(r.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:t("template.namePlaceholder")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:t("template.description")}),e.jsx("input",{type:"text",value:c,onChange:r=>b(r.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:t("template.descriptionPlaceholder")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:t("template.selectGroups")}),e.jsx("button",{onClick:g,className:"text-sm text-blue-600 hover:text-blue-800",children:C.length===n.length?t("template.deselectAll"):t("template.selectAll")})]}),e.jsx("p",{className:"text-xs text-gray-500 mb-2",children:t("template.selectGroupsHelp")}),e.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-md max-h-48 overflow-y-auto",children:n.map(r=>e.jsxs("label",{className:"flex items-center px-3 py-2 hover:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:C.includes(r.id),onChange:()=>u(r.id),className:"mr-3 h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-sm font-medium text-gray-900",children:r.name}),r.description&&e.jsx("span",{className:"text-xs text-gray-500 ml-2",children:r.description})]})]},r.id))})]}),e.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:m,onChange:r=>N(r.target.checked),className:"h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"}),e.jsx("span",{className:"text-sm text-gray-700",children:t("template.includeDisabled")})]})]}),e.jsx("div",{className:"mt-4 p-3 bg-blue-50 border border-blue-200 rounded-md",children:e.jsx("p",{className:"text-sm text-blue-700",children:t("template.exportNote")})}),e.jsxs("div",{className:"flex justify-end space-x-4 mt-6",children:[e.jsx("button",{onClick:p,className:"hub-btn",children:t("common.cancel")}),e.jsx("button",{onClick:x,disabled:k||!d.trim(),className:"hub-btn primary",children:t(k?"template.exporting":"template.export")})]})]})})},Ge=({onSuccess:n,onCancel:p})=>{const{t}=$(),[d,y]=h.useState(null),[c,b]=h.useState(null),[C,A]=h.useState(!1),[m,N]=h.useState(null),k=h.useRef(null),E=u=>{var r;b(null),y(null),N(null);const g=(r=u.target.files)==null?void 0:r[0];if(!g)return;const x=new FileReader;x.onload=o=>{var j;try{const I=JSON.parse((j=o.target)==null?void 0:j.result);if(!I.version||!I.name||!I.servers||!I.groups){b(t("template.invalidFormat"));return}y(I)}catch{b(t("template.parseError"))}},x.readAsText(g)},S=u=>{if(b(null),y(null),N(null),!!u.trim())try{const g=JSON.parse(u.trim());if(!g.version||!g.name||!g.servers||!g.groups){b(t("template.invalidFormat"));return}y(g)}catch{b(t("template.parseError"))}},D=async()=>{if(d){A(!0),b(null);try{const u=await X("/templates/import",d);u.data?(N(u.data),u.data.success&&n()):b(u.message||t("template.importFailed"))}catch(u){console.error("Import error:",u),b(t("template.importFailed"))}finally{A(!1)}}};return e.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:t("template.importTitle")}),e.jsx("button",{onClick:p,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),c&&e.jsx("div",{className:"mb-4 bg-red-50 border-l-4 border-red-500 p-4 rounded",children:e.jsx("p",{className:"text-red-700",children:c})}),m&&e.jsxs("div",{className:`mb-4 p-4 rounded border-l-4 ${m.success?"bg-green-50 border-green-500":"bg-yellow-50 border-yellow-500"}`,children:[e.jsx("p",{className:m.success?"text-green-700":"text-yellow-700",children:t("template.importResult",{serversCreated:m.serversCreated,serversSkipped:m.serversSkipped,groupsCreated:m.groupsCreated,groupsSkipped:m.groupsSkipped})}),m.requiredEnvVars.length>0&&e.jsxs("div",{className:"mt-2 p-2 bg-orange-50 border border-orange-200 rounded",children:[e.jsx("p",{className:"text-sm font-medium text-orange-800",children:t("template.envVarsNeeded")}),e.jsx("ul",{className:"mt-1 text-sm text-orange-700",children:m.requiredEnvVars.map(u=>e.jsx("li",{className:"font-mono",children:u},u))})]})]}),d?e.jsxs("div",{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-800 rounded-md",children:[e.jsx("h3",{className:"font-medium text-gray-900",children:d.name}),d.description&&e.jsx("p",{className:"text-sm text-gray-600 mt-1",children:d.description}),e.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[t("template.version"),": ",d.version," | ",t("template.createdAt"),":"," ",new Date(d.createdAt).toLocaleDateString()]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:[t("template.servers")," (",Object.keys(d.servers).length,")"]}),e.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-md divide-y divide-gray-200 dark:divide-gray-700 max-h-40 overflow-y-auto",children:Object.entries(d.servers).map(([u,g])=>e.jsxs("div",{className:"px-3 py-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-900",children:u}),e.jsx("span",{className:"text-xs text-gray-500 ml-2",children:g.type||"stdio"})]},u))})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:[t("template.groups")," (",d.groups.length,")"]}),e.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-md divide-y divide-gray-200 dark:divide-gray-700 max-h-40 overflow-y-auto",children:d.groups.map((u,g)=>e.jsxs("div",{className:"px-3 py-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-900",children:u.name}),u.description&&e.jsx("span",{className:"text-xs text-gray-500 ml-2",children:u.description}),e.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[u.servers.length," ",t("template.serversInGroup")]})]},g))})]}),d.requiredEnvVars.length>0&&e.jsxs("div",{className:"p-3 bg-orange-50 border border-orange-200 rounded-md",children:[e.jsx("h4",{className:"text-sm font-medium text-orange-800",children:t("template.envVarsNeeded")}),e.jsx("ul",{className:"mt-1 text-sm text-orange-700 font-mono",children:d.requiredEnvVars.map(u=>e.jsx("li",{children:u},u))})]})]}),e.jsxs("div",{className:"flex justify-end space-x-4 mt-6",children:[e.jsx("button",{onClick:()=>{y(null),N(null),k.current&&(k.current.value="")},className:"hub-btn",children:t("common.back")}),e.jsx("button",{onClick:D,disabled:C,className:"hub-btn primary",children:t(C?"template.importing":"template.import")})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"flex items-center justify-between mb-2",children:e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:t("template.uploadFile")})}),e.jsx("div",{className:"flex items-center space-x-4",children:e.jsx("input",{ref:k,type:"file",accept:".json",onChange:E,className:"block text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100"})})]}),e.jsxs("div",{className:"relative my-4",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("div",{className:"w-full border-t border-gray-300"})}),e.jsx("div",{className:"relative flex justify-center text-sm",children:e.jsx("span",{className:"bg-white dark:bg-gray-800 px-2 text-gray-500",children:t("template.or")})})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:t("template.pasteJson")}),e.jsx("textarea",{className:"w-full h-64 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 font-mono text-sm",placeholder:t("template.pastePlaceholder"),onChange:u=>S(u.target.value)})]}),e.jsx("div",{className:"flex justify-end space-x-4",children:e.jsx("button",{onClick:p,className:"hub-btn",children:t("common.cancel")})})]})]})})},Ke=()=>{const{t:n}=$(),{groups:p,loading:t,error:d,setError:y,deleteGroup:c,triggerRefresh:b}=_(),{allServers:C}=Y({refreshOnMount:!0}),{groupCosts:A,refetch:m}=Z();h.useEffect(()=>{m()},[p,C,m]);const[N,k]=h.useState(null),[E,S]=h.useState(!1),[D,u]=h.useState(!1),[g,x]=h.useState(!1),[r,o]=h.useState(!1),j=async I=>{const F=await c(I);(!F||!F.success)&&y((F==null?void 0:F.message)||n("groups.deleteError"))};return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-end justify-between gap-4 mb-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"hub-h1",children:n("pages.groups.title")}),e.jsxs("p",{className:"hub-sub",children:[e.jsx("span",{className:"hub-num",children:p.length})," ",n("nav.groups").toLowerCase()]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{className:"hub-btn",onClick:()=>u(!0),children:[e.jsx(te,{size:13})," ",n("groupImport.button")]}),e.jsxs("button",{className:"hub-btn",onClick:()=>x(!0),children:[e.jsx(ke,{size:13})," ",n("template.exportButton")]}),e.jsxs("button",{className:"hub-btn",onClick:()=>o(!0),children:[e.jsx(te,{size:13})," ",n("template.importButton")]}),e.jsxs("button",{className:"hub-btn primary",onClick:()=>S(!0),children:[e.jsx(re,{size:13})," ",n("groups.add")]})]})]}),d&&e.jsxs("div",{className:"hub-card flex items-center justify-between gap-3 mb-4",style:{padding:"10px 14px",borderColor:"oklch(0.85 0.1 25)",background:"oklch(0.97 0.03 25)",color:"oklch(0.4 0.18 25)"},children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(Se,{size:14,className:"flex-shrink-0"}),e.jsx("span",{className:"truncate text-[13px]",children:d})]}),e.jsx("button",{className:"hub-icon-btn sm",onClick:()=>y(null),children:e.jsx(we,{size:13})})]}),t?e.jsx("div",{className:"hub-card p-6 text-center",style:{color:"var(--hub-ink-3)"},children:n("app.loading")}):p.length===0?e.jsx("div",{className:"hub-card p-10 text-center",style:{color:"var(--hub-ink-3)"},children:n("groups.noGroups")}):e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3.5",children:[p.map(I=>e.jsx(Fe,{group:I,servers:C,onEdit:k,onDelete:j,cost:A.find(F=>F.id===I.id)},I.id)),e.jsx("button",{onClick:()=>S(!0),className:"flex items-center justify-center text-[var(--hub-ink-3)] hover:text-[var(--hub-ink-2)] transition-colors",style:{border:"1px dashed var(--hub-line)",borderRadius:10,minHeight:200,background:"transparent",cursor:"pointer"},children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"grid place-items-center mx-auto mb-2",style:{width:36,height:36,borderRadius:10,border:"1px solid var(--hub-line)"},children:e.jsx(re,{size:16})}),e.jsx("div",{style:{fontSize:13,fontWeight:500,color:"var(--hub-ink-2)"},children:n("groups.add")}),e.jsx("div",{style:{fontSize:12,marginTop:2},children:n("groups.addNew")})]})})]}),E&&e.jsx(De,{onAdd:()=>{S(!1),b()},onCancel:()=>S(!1)}),D&&e.jsx(Re,{onSuccess:()=>{u(!1),b()},onCancel:()=>u(!1)}),N&&e.jsx(Ae,{group:N,onEdit:()=>{k(null),b()},onCancel:()=>k(null)}),g&&e.jsx(Pe,{groups:p,onCancel:()=>x(!1)}),r&&e.jsx(Ge,{onSuccess:()=>{o(!1),b()},onCancel:()=>o(!1)})]})};export{Ke as default};
33
- //# sourceMappingURL=GroupsPage-JPtupGpI.js.map
33
+ //# sourceMappingURL=GroupsPage-Cwfm5q-a.js.map