decocms 2.176.0 → 2.176.2

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 (318) hide show
  1. package/dist/client/assets/{AlertCircle-PBJUtpjc.js → AlertCircle-BWr4XQe9.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-CddYwC43.js → AlignLeft-BJyvDaBk.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-LiBnMzQV.js → ArrowDown-BPMtK04S.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-BHzi0YLf.js → ArrowLeft-GOjXvqCa.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-WIHiBhdv.js → ArrowUp-DqOjcDuh.js} +1 -1
  6. package/dist/client/assets/{Building02-c7FCt8-6.js → Building02-D_v8ZXC2.js} +1 -1
  7. package/dist/client/assets/{Check-Bme4aNg5.js → Check-DAFdA2oM.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-BSVa-h_Y.js → CheckCircle-BL2mIAJn.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-e9BOcL0K.js → CheckVerified02-YYsvmiw4.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-jyPVRLzp.js → ChevronDown-C-3qjfHK.js} +1 -1
  11. package/dist/client/assets/{ChevronLeft-Bn35AKxx.js → ChevronLeft-Dugo1z8_.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-Ct9VK1GH.js → ChevronRight-B3gSyJmK.js} +1 -1
  13. package/dist/client/assets/{ChevronUp-B5BOcmGB.js → ChevronUp-Rk5dLXNx.js} +1 -1
  14. package/dist/client/assets/{Clock-Bwl2wOhM.js → Clock-Ccv6eV04.js} +1 -1
  15. package/dist/client/assets/{Code01-DygQPwlG.js → Code01-CoEt5nyY.js} +1 -1
  16. package/dist/client/assets/{Container-BeAIfNvy.js → Container-CQmXt7Nc.js} +1 -1
  17. package/dist/client/assets/{Copy01-ekqsSfJN.js → Copy01-D7uh0hW0.js} +1 -1
  18. package/dist/client/assets/{Dataflow03-BGqN1hrV.js → Dataflow03-ccC0qbkR.js} +1 -1
  19. package/dist/client/assets/{DotsHorizontal-BYFCLgks.js → DotsHorizontal-C3QGwRko.js} +1 -1
  20. package/dist/client/assets/{DotsVertical-Dn5mVo7u.js → DotsVertical-D5tMnzaQ.js} +1 -1
  21. package/dist/client/assets/{Download01-DQJbGhrI.js → Download01-BDm0aKH5.js} +1 -1
  22. package/dist/client/assets/{Edit01-BxDvpu_b.js → Edit01-DEd4k1xo.js} +1 -1
  23. package/dist/client/assets/{Edit05-Bta0rpFO.js → Edit05-RRC6ol7j.js} +1 -1
  24. package/dist/client/assets/{Eye-DN-kY_sb.js → Eye-MRRTHIte.js} +1 -1
  25. package/dist/client/assets/{EyeOff-E0TupCAH.js → EyeOff-CgRP1cSC.js} +1 -1
  26. package/dist/client/assets/{File02-Cyzf2kpD.js → File02-DdRvGWJN.js} +1 -1
  27. package/dist/client/assets/{File06-Ba0KxpWu.js → File06-DbRSeish.js} +1 -1
  28. package/dist/client/assets/{FilterLines-Ce9H-AFe.js → FilterLines-nV8jE7JI.js} +1 -1
  29. package/dist/client/assets/{Globe01-Cks65mCV.js → Globe01-Bb7jNfEM.js} +1 -1
  30. package/dist/client/assets/{Globe02-CB2InS06.js → Globe02-CDBspixd.js} +1 -1
  31. package/dist/client/assets/{Grid01-BvWQ72pJ.js → Grid01-COkHqk9k.js} +1 -1
  32. package/dist/client/assets/{Home02-C33y4DXe.js → Home02-Bjdq3zLu.js} +1 -1
  33. package/dist/client/assets/{Image01-B9BH_f0p.js → Image01-D4-tispo.js} +1 -1
  34. package/dist/client/assets/{Inbox01-ZPruuuHz.js → Inbox01-DiWhz3sk.js} +1 -1
  35. package/dist/client/assets/{InfoCircle-ETSHVG2F.js → InfoCircle-tftxVx0C.js} +1 -1
  36. package/dist/client/assets/{Key01-CdH7i8vY.js → Key01-Cv0XYLbb.js} +1 -1
  37. package/dist/client/assets/{LayersTwo01-8gQGsURS.js → LayersTwo01-DdRcHsrK.js} +1 -1
  38. package/dist/client/assets/{LayoutLeft-Bn9kcy6T.js → LayoutLeft-BuqgN7z4.js} +1 -1
  39. package/dist/client/assets/{Link01-B4s1G5Jr.js → Link01-Bo114MSv.js} +1 -1
  40. package/dist/client/assets/{LinkExternal01-B5VTVW6k.js → LinkExternal01-Div7VvWd.js} +1 -1
  41. package/dist/client/assets/{List-BU70NJSh.js → List-_Z2X7aPf.js} +1 -1
  42. package/dist/client/assets/{Loading01-Dt16NixZ.js → Loading01-BYjTtpy0.js} +1 -1
  43. package/dist/client/assets/{Lock01-DZeZ3WxC.js → Lock01-j13GCiRT.js} +1 -1
  44. package/dist/client/assets/{Play-WAyK_VUq.js → Play-BOK5c4Hp.js} +1 -1
  45. package/dist/client/assets/{Plus-DN4FtVmx.js → Plus-1vH_gFoY.js} +1 -1
  46. package/dist/client/assets/{RefreshCcw01-B88e0cNw.js → RefreshCcw01-ghOVEWuz.js} +1 -1
  47. package/dist/client/assets/{Save01-BCInJWrH.js → Save01-43mxrIvD.js} +1 -1
  48. package/dist/client/assets/{SearchMd-BQseJVRu.js → SearchMd-Dn4cWwEm.js} +1 -1
  49. package/dist/client/assets/{Settings01-CS4vVmx5.js → Settings01-B3FNPQBg.js} +1 -1
  50. package/dist/client/assets/{Shield01-BZpNsAZG.js → Shield01-0suO3hAe.js} +1 -1
  51. package/dist/client/assets/{Terminal-BDeJ6lHB.js → Terminal-CvfSVl9m.js} +1 -1
  52. package/dist/client/assets/{Tool01-xNX6v26H.js → Tool01-3i6uRXKJ.js} +1 -1
  53. package/dist/client/assets/{Trash01-PnuUudMl.js → Trash01-Dmi4vR7Q.js} +1 -1
  54. package/dist/client/assets/{Upload01-CSDtabhZ.js → Upload01-Cqh5tD2o.js} +1 -1
  55. package/dist/client/assets/{Users03-rAyzQyh3.js → Users03-CUiUl0DH.js} +1 -1
  56. package/dist/client/assets/{X-CxZVsh3L.js → X-Car5B1de.js} +1 -1
  57. package/dist/client/assets/{XClose-hdsxwv2G.js → XClose-D08ltwBw.js} +1 -1
  58. package/dist/client/assets/{Zap-azdz5wfI.js → Zap-CbjhdbUU.js} +1 -1
  59. package/dist/client/assets/{agent-connections-preview-XZw5-X3u.js → agent-connections-preview-Dv4euUYL.js} +1 -1
  60. package/dist/client/assets/{agent-detail-BJSxCMs1.js → agent-detail-BignzT6b.js} +1 -1
  61. package/dist/client/assets/{agents-DQWRQl2B.js → agents-DRDlT25N.js} +1 -1
  62. package/dist/client/assets/{ai-providers-logos-DPOiBl7V.js → ai-providers-logos-4n_w8l7D.js} +1 -1
  63. package/dist/client/assets/{alert-dialog-DdwA_v8c.js → alert-dialog-BZtQAioB.js} +1 -1
  64. package/dist/client/assets/{auth-catchall-WCsr2pQN.js → auth-catchall-BorI3Y5Q.js} +1 -1
  65. package/dist/client/assets/{automation-detail-BZk6VK2r.js → automation-detail-MAP63xhb.js} +1 -1
  66. package/dist/client/assets/{automations-B0oZ4Oep.js → automations-CXEh0WQH.js} +1 -1
  67. package/dist/client/assets/{avatar-CXKBBJaI.js → avatar-DEdDAQ0j.js} +1 -1
  68. package/dist/client/assets/{badge-BfLRgdaW.js → badge-BTw8dF6C.js} +1 -1
  69. package/dist/client/assets/{binder-B5Q0NNkg.js → binder-B2xnCBeC.js} +1 -1
  70. package/dist/client/assets/{breadcrumb-BhQI8Xw3.js → breadcrumb-CcE89MsN.js} +1 -1
  71. package/dist/client/assets/{card-B8QXMrj8.js → card-B6XTMOTf.js} +1 -1
  72. package/dist/client/assets/{checkbox-C5Om9oxx.js → checkbox-BA_JFbx4.js} +1 -1
  73. package/dist/client/assets/{collapsible-MCSgly5t.js → collapsible-CW12HasT.js} +1 -1
  74. package/dist/client/assets/{collection-detail-CrytnlOI.js → collection-detail-DTZ81ye0.js} +1 -1
  75. package/dist/client/assets/{collection-display-button-D7NovPlc.js → collection-display-button-BJQ_VSFQ.js} +1 -1
  76. package/dist/client/assets/{collection-search-DDX1Zkg7.js → collection-search-D6ILFEtf.js} +1 -1
  77. package/dist/client/assets/{collection-table-wrapper-YGokzak8.js → collection-table-wrapper-D0JGm79B.js} +1 -1
  78. package/dist/client/assets/{collection-tabs-D8NPXaOU.js → collection-tabs-fsXO7rse.js} +1 -1
  79. package/dist/client/assets/{command-BVlE6-p8.js → command-DwfoahUI.js} +1 -1
  80. package/dist/client/assets/{connection-card-D0Hulz9h.js → connection-card-CoZ_ixiG.js} +1 -1
  81. package/dist/client/assets/{connection-detail-C-Ge5CVn.js → connection-detail-BPi4jlBF.js} +1 -1
  82. package/dist/client/assets/{connection-status-CxcA3Thg.js → connection-status-CulzjjXt.js} +1 -1
  83. package/dist/client/assets/{connections-DWyHpNQR.js → connections-2fSWPLii.js} +1 -1
  84. package/dist/client/assets/{constants-CKGlP4oN.js → constants-CLw0F8Mm.js} +1 -1
  85. package/dist/client/assets/constants-D3bMpbG0.js +1 -0
  86. package/dist/client/assets/{context-ow-zK3BP.js → context-ClUgEsLK.js} +1 -1
  87. package/dist/client/assets/{create-organization-dialog-CFn_U9MK.js → create-organization-dialog-CNZiViYc.js} +1 -1
  88. package/dist/client/assets/{create-project-dialog-Rt5_XeVq.js → create-project-dialog-QYAKiAC_.js} +1 -1
  89. package/dist/client/assets/{danger-CgzhgW7h.js → danger-1mM9iHWV.js} +1 -1
  90. package/dist/client/assets/{danger-zone-CvDs5VVH.js → danger-zone-DSO2EIjr.js} +1 -1
  91. package/dist/client/assets/{dependencies-BbmKfxYe.js → dependencies-DtSMIESZ.js} +1 -1
  92. package/dist/client/assets/{dialog-COv8XUO0.js → dialog-ZIc7OUaM.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-Cr1iKfFo.js → dropdown-menu-EcTFyr4x.js} +1 -1
  94. package/dist/client/assets/{dynamic-plugin-layout-BIVc19gr.js → dynamic-plugin-layout-D40fWFup.js} +1 -1
  95. package/dist/client/assets/{editable-task-title-CrGgc8Hx.js → editable-task-title-CeJC7Fwa.js} +1 -1
  96. package/dist/client/assets/{empty-state-DsQ7yRoE.js → empty-state-gZUVmgL7.js} +1 -1
  97. package/dist/client/assets/{empty-state-CsEI90cv.js → empty-state-m7QcZ687.js} +1 -1
  98. package/dist/client/assets/{env-vars-editor-r00KzDtj.js → env-vars-editor-CIM7XauD.js} +1 -1
  99. package/dist/client/assets/{extract-connection-data-D46U8dB4.js → extract-connection-data-DEaEvOm7.js} +1 -1
  100. package/dist/client/assets/{file-browser-C8BCEBfL.js → file-browser-ChPNBU91.js} +2 -2
  101. package/dist/client/assets/{form-CZrleug2.js → form-Cd_AEgzv.js} +1 -1
  102. package/dist/client/assets/{general-39EgW9sq.js → general-mH6Dkpor.js} +1 -1
  103. package/dist/client/assets/{grid-view-CYvRmpTY.js → grid-view-C9tD8dqF.js} +1 -1
  104. package/dist/client/assets/{home-CwDvuqcO.js → home-icifeNIm.js} +1 -1
  105. package/dist/client/assets/{index-cEL2CgNm.js → index-BPs3Pxaa.js} +1 -1
  106. package/dist/client/assets/{index-Bc75bxbq.js → index-Bg2XE05Y.js} +1 -1
  107. package/dist/client/assets/{index-B23wyLB_.js → index-BrqeZa9X.js} +1 -1
  108. package/dist/client/assets/{index-DRLd-piX.js → index-CRi6734Z.js} +1 -1
  109. package/dist/client/assets/{index-CVyJGNS2.js → index-CfjT_Fv-.js} +1 -1
  110. package/dist/client/assets/{index-CT-515LV.js → index-Cg4edYBM.js} +1 -1
  111. package/dist/client/assets/{index-sEMWxAyS.js → index-Cz_J9f63.js} +1 -1
  112. package/dist/client/assets/{index-CsqngJxb.js → index-DKWOGpkx.js} +1 -1
  113. package/dist/client/assets/{index-BlBXXIdz.js → index-Dk4FCobs.js} +1 -1
  114. package/dist/client/assets/{index-iqPDmcBY.js → index-DxqOk4x4.js} +1 -1
  115. package/dist/client/assets/{index-B_DxRVw1.js → index-OyLnxARk.js} +3 -3
  116. package/dist/client/assets/{infiniteQueryObserver-DNhlrWmr.js → infiniteQueryObserver-BkZg7AVk.js} +1 -1
  117. package/dist/client/assets/{input-DqwWeNgs.js → input-B4YrZuiK.js} +1 -1
  118. package/dist/client/assets/{integration-icon-Dv0HduyT.js → integration-icon-B3aufi6R.js} +1 -1
  119. package/dist/client/assets/{label--AQoxbpU.js → label-BoRKSV_h.js} +1 -1
  120. package/dist/client/assets/{layout-Cji69-Fr.js → layout-C2-eT_B4.js} +1 -1
  121. package/dist/client/assets/{layout-CDyeWvbl.js → layout-DwPAPIK-.js} +1 -1
  122. package/dist/client/assets/{login-D1A8YvmQ.js → login-CYxKPB-k.js} +1 -1
  123. package/dist/client/assets/{logo-upload-BlIbeyor.js → logo-upload-DsXuRpYi.js} +1 -1
  124. package/dist/client/assets/{mcp-app-renderer-D7CJTHIn.js → mcp-app-renderer-KZyUYhBW.js} +1 -1
  125. package/dist/client/assets/{mcp-server-card-PhaJL10h.js → mcp-server-card-mO0UAT9W.js} +1 -1
  126. package/dist/client/assets/{mcp-server-detail-BInJ9Okh.js → mcp-server-detail-CyByMkle.js} +2 -2
  127. package/dist/client/assets/{members-WK1ZXtTy.js → members-3oNbzlXC.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-Dgc89AWr.js → monaco-editor-DDZgyrgO.js} +1 -1
  129. package/dist/client/assets/{monitoring-Co1Fc87j.js → monitoring-Xs5hJ6u_.js} +1 -1
  130. package/dist/client/assets/{monitoring-dashboard-edit-BllFPC-c.js → monitoring-dashboard-edit-C_1U7sTf.js} +1 -1
  131. package/dist/client/assets/{monitoring-dashboard-view-CztiwjLo.js → monitoring-dashboard-view-DcMyYV2C.js} +1 -1
  132. package/dist/client/assets/{monitoring-stats-row-C4WAOhN_.js → monitoring-stats-row-CIKRC_fM.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-ai-provider-Bcscfh1C.js → oauth-callback-ai-provider-CX0oMmvR.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-oApNt2lX.js → oauth-callback-kezpwk-4.js} +1 -1
  135. package/dist/client/assets/{org-ai-providers-BHi1kOOt.js → org-ai-providers-dfJpkNdu.js} +1 -1
  136. package/dist/client/assets/{page-Dpk4jTO5.js → page-Y307a-9q.js} +1 -1
  137. package/dist/client/assets/{page-BZV8vSMw.js → page-y0K-3s3k.js} +1 -1
  138. package/dist/client/assets/{plugin-empty-state-BqFvCCv9.js → plugin-empty-state-BB0mg-1W.js} +1 -1
  139. package/dist/client/assets/{plugin-empty-state-DGylhF1c.js → plugin-empty-state-DwyPPEO0.js} +1 -1
  140. package/dist/client/assets/{plugin-header-B9UGjso3.js → plugin-header-BMLNemwj.js} +1 -1
  141. package/dist/client/assets/{plugin-header-CMHji8Df.js → plugin-header-DNeIXlLi.js} +1 -1
  142. package/dist/client/assets/plugins-CVEdGukW.js +1 -0
  143. package/dist/client/assets/{popover-DOnHuwq3.js → popover-BKHsia9C.js} +1 -1
  144. package/dist/client/assets/{project-app-view-fPmiutKj.js → project-app-view-C7kPLPhi.js} +1 -1
  145. package/dist/client/assets/{project-layout-CDVw6pd9.js → project-layout-C_1_eCl-.js} +1 -1
  146. package/dist/client/assets/{project-plugins-DwwhiaLk.js → project-plugins-BgoKgZwd.js} +1 -1
  147. package/dist/client/assets/{projects-list-BY_yiyPl.js → projects-list-B3H-urrL.js} +1 -1
  148. package/dist/client/assets/{registry-layout-4qwa3Yrl.js → registry-layout-BHOAsCzG.js} +1 -1
  149. package/dist/client/assets/{registry-utils--TC_kKCq.js → registry-utils-D0qx2c0_.js} +1 -1
  150. package/dist/client/assets/{reset-password-ChK1U3PS.js → reset-password-o3nCvS90.js} +1 -1
  151. package/dist/client/assets/{resizable-DXBCOl3J.js → resizable-1OPd79St.js} +1 -1
  152. package/dist/client/assets/{save-actions-ChdDeTz6.js → save-actions-DQ0FV8E3.js} +1 -1
  153. package/dist/client/assets/{scroll-area-ACn8ZLYT.js → scroll-area-BSQHcCri.js} +1 -1
  154. package/dist/client/assets/{select-BM9jpLT2.js → select-Ctls6rHz.js} +1 -1
  155. package/dist/client/assets/{select-virtual-mcp-DzKjKtT5.js → select-virtual-mcp-CEX-N6yN.js} +1 -1
  156. package/dist/client/assets/{sheet-DCDIRpJJ.js → sheet-MAyp9_-H.js} +1 -1
  157. package/dist/client/assets/{shell-layout-BTXUcCYK.js → shell-layout-8MdYJa94.js} +2 -2
  158. package/dist/client/assets/{sidebar-settings-Dy0o9qBx.js → sidebar-settings-BtI4Obrm.js} +1 -1
  159. package/dist/client/assets/{skeleton-BkpiIfDB.js → skeleton-DAvz6Hk5.js} +1 -1
  160. package/dist/client/assets/{spinner-tJ67zxkj.js → spinner-CItj22uq.js} +1 -1
  161. package/dist/client/assets/{store-invite-CTVa-Zvm.js → store-invite-Dr9c1QQu.js} +1 -1
  162. package/dist/client/assets/{switch-BE6ziGyo.js → switch-BunRXVYQ.js} +1 -1
  163. package/dist/client/assets/{table-BOA7X4H8.js → table-DHN8Pbh9.js} +1 -1
  164. package/dist/client/assets/{tabs-BQ5doEBy.js → tabs-kzZLmFuM.js} +1 -1
  165. package/dist/client/assets/{task-status-B3QSknHK.js → task-status-D6cPLJpA.js} +1 -1
  166. package/dist/client/assets/tasks-CZAS_EEA.js +1 -0
  167. package/dist/client/assets/{tasks-panel-BXchRGWe.js → tasks-panel-6uv7gp5j.js} +1 -1
  168. package/dist/client/assets/{textarea-BDS2584p.js → textarea-CpLkXx5p.js} +1 -1
  169. package/dist/client/assets/{time-range-picker-CWEE6Pax.js → time-range-picker-CYn_bf9F.js} +1 -1
  170. package/dist/client/assets/{toggle-group-B9XVwguR.js → toggle-group-C-kSfPqI.js} +1 -1
  171. package/dist/client/assets/{tools-list-DO_G3ceo.js → tools-list-GuN2kaNF.js} +1 -1
  172. package/dist/client/assets/{tooltip-Bm11lCIm.js → tooltip--UA5heKX.js} +1 -1
  173. package/dist/client/assets/{topbar-portal-XGVG-nsS.js → topbar-portal-M3PPIThx.js} +1 -1
  174. package/dist/client/assets/{types-BnNswHwQ.js → types-DoomhLgW.js} +1 -1
  175. package/dist/client/assets/{use-automations-nu85KLSx.js → use-automations-D5ELbflL.js} +1 -1
  176. package/dist/client/assets/{use-collections-aokT1D_C.js → use-collections-DXLoMYCx.js} +1 -1
  177. package/dist/client/assets/{use-connection-DA77pjoV.js → use-connection-B7ll8uNa.js} +1 -1
  178. package/dist/client/assets/{use-copy-CPgIfOPM.js → use-copy-XD9UDj7l.js} +1 -1
  179. package/dist/client/assets/{use-create-virtual-mcp-Dd303mOp.js → use-create-virtual-mcp-BvSTYw2n.js} +1 -1
  180. package/dist/client/assets/{use-infinite-scroll-DXKnZJHX.js → use-infinite-scroll-CSG4wWka.js} +1 -1
  181. package/dist/client/assets/{use-install-from-registry-C_csgcCs.js → use-install-from-registry-1KLotWZ_.js} +1 -1
  182. package/dist/client/assets/{use-list-state-CFQBiz4L.js → use-list-state-CVKHwo0P.js} +1 -1
  183. package/dist/client/assets/{use-mcp-prompts-Dw4CvfV3.js → use-mcp-prompts-DyPVjaKa.js} +1 -1
  184. package/dist/client/assets/{use-mcp-resources-CFkkQw1d.js → use-mcp-resources-CFTlLllB.js} +1 -1
  185. package/dist/client/assets/{use-mcp-tools-C3Vj1u8m.js → use-mcp-tools-S01H2JtZ.js} +1 -1
  186. package/dist/client/assets/{use-members-BbXqk449.js → use-members-BXkvGAIM.js} +1 -1
  187. package/dist/client/assets/{use-mobile-BarAf2zx.js → use-mobile-CgJAXGMs.js} +1 -1
  188. package/dist/client/assets/{use-project-CPyjDcpX.js → use-project-C2o9r0US.js} +1 -1
  189. package/dist/client/assets/{use-store-discovery-DupAMgFS.js → use-store-discovery-W6XcrfUT.js} +1 -1
  190. package/dist/client/assets/{use-view-mode-qVlfLymN.js → use-view-mode-CGzXYNrX.js} +1 -1
  191. package/dist/client/assets/{use-virtual-mcp-FAfRsySa.js → use-virtual-mcp-B8SbBr9v.js} +1 -1
  192. package/dist/client/assets/useInfiniteQuery-C9KaycVy.js +1 -0
  193. package/dist/client/assets/{useMutation-d1AXy22c.js → useMutation-B_6d8oLI.js} +1 -1
  194. package/dist/client/assets/useQuery-Brtj4EoG.js +1 -0
  195. package/dist/client/assets/useSuspenseInfiniteQuery-DD7d1y3B.js +1 -0
  196. package/dist/client/assets/{user-z34A3977.js → user-BLAfg6Ev.js} +1 -1
  197. package/dist/client/assets/{workflow-D77B4RT7.js → workflow-DHe_PiQF.js} +1 -1
  198. package/dist/client/index.html +1 -1
  199. package/dist/server/cli.js +230 -230
  200. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  201. package/dist/server/node_modules/pg-int8/README.md +16 -0
  202. package/dist/server/node_modules/pg-int8/index.js +100 -0
  203. package/dist/server/node_modules/pg-int8/package.json +24 -0
  204. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  205. package/dist/server/node_modules/{xtend/LICENSE → postgres-bytea/license} +2 -1
  206. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  207. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  208. package/dist/server/node_modules/postgres-date/index.js +116 -0
  209. package/dist/server/node_modules/{pg-connection-string/LICENSE → postgres-date/license} +5 -5
  210. package/dist/server/node_modules/postgres-date/package.json +33 -0
  211. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  212. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  213. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  214. package/dist/server/node_modules/{pg-cloudflare/LICENSE → postgres-interval/license} +6 -6
  215. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  216. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  217. package/dist/server/node_modules/split2/LICENSE +13 -0
  218. package/dist/server/node_modules/split2/README.md +85 -0
  219. package/dist/server/node_modules/split2/bench.js +27 -0
  220. package/dist/server/node_modules/split2/index.js +141 -0
  221. package/dist/server/node_modules/split2/package.json +39 -0
  222. package/dist/server/node_modules/split2/test.js +409 -0
  223. package/dist/server/server.js +2 -2
  224. package/package.json +1 -1
  225. package/dist/client/assets/constants-DqZ0hFNm.js +0 -1
  226. package/dist/client/assets/plugins-DcIPR0Gj.js +0 -1
  227. package/dist/client/assets/tasks-BqsZZgtJ.js +0 -1
  228. package/dist/client/assets/useInfiniteQuery-CCGqKrT7.js +0 -1
  229. package/dist/client/assets/useQuery-B8Io0Oda.js +0 -1
  230. package/dist/client/assets/useSuspenseInfiniteQuery-DsCmMd3U.js +0 -1
  231. package/dist/server/node_modules/pg-cloudflare/README.md +0 -112
  232. package/dist/server/node_modules/pg-cloudflare/dist/empty.d.ts +0 -2
  233. package/dist/server/node_modules/pg-cloudflare/dist/empty.js +0 -6
  234. package/dist/server/node_modules/pg-cloudflare/dist/empty.js.map +0 -1
  235. package/dist/server/node_modules/pg-cloudflare/dist/index.d.ts +0 -31
  236. package/dist/server/node_modules/pg-cloudflare/dist/index.js +0 -152
  237. package/dist/server/node_modules/pg-cloudflare/dist/index.js.map +0 -1
  238. package/dist/server/node_modules/pg-cloudflare/esm/index.mjs +0 -3
  239. package/dist/server/node_modules/pg-cloudflare/package.json +0 -39
  240. package/dist/server/node_modules/pg-cloudflare/src/empty.ts +0 -3
  241. package/dist/server/node_modules/pg-cloudflare/src/index.ts +0 -166
  242. package/dist/server/node_modules/pg-cloudflare/src/types.d.ts +0 -25
  243. package/dist/server/node_modules/pg-connection-string/README.md +0 -105
  244. package/dist/server/node_modules/pg-connection-string/esm/index.mjs +0 -8
  245. package/dist/server/node_modules/pg-connection-string/index.d.ts +0 -36
  246. package/dist/server/node_modules/pg-connection-string/index.js +0 -231
  247. package/dist/server/node_modules/pg-connection-string/package.json +0 -52
  248. package/dist/server/node_modules/pg-pool/LICENSE +0 -21
  249. package/dist/server/node_modules/pg-pool/README.md +0 -357
  250. package/dist/server/node_modules/pg-pool/esm/index.mjs +0 -5
  251. package/dist/server/node_modules/pg-pool/index.js +0 -517
  252. package/dist/server/node_modules/pg-pool/package.json +0 -51
  253. package/dist/server/node_modules/pg-protocol/LICENSE +0 -21
  254. package/dist/server/node_modules/pg-protocol/README.md +0 -3
  255. package/dist/server/node_modules/pg-protocol/dist/b.d.ts +0 -1
  256. package/dist/server/node_modules/pg-protocol/dist/b.js +0 -23
  257. package/dist/server/node_modules/pg-protocol/dist/b.js.map +0 -1
  258. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +0 -15
  259. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +0 -55
  260. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +0 -1
  261. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +0 -16
  262. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +0 -81
  263. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +0 -1
  264. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +0 -1
  265. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +0 -530
  266. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +0 -1
  267. package/dist/server/node_modules/pg-protocol/dist/index.d.ts +0 -6
  268. package/dist/server/node_modules/pg-protocol/dist/index.js +0 -15
  269. package/dist/server/node_modules/pg-protocol/dist/index.js.map +0 -1
  270. package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +0 -162
  271. package/dist/server/node_modules/pg-protocol/dist/messages.js +0 -160
  272. package/dist/server/node_modules/pg-protocol/dist/messages.js.map +0 -1
  273. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +0 -1
  274. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +0 -252
  275. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +0 -1
  276. package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +0 -24
  277. package/dist/server/node_modules/pg-protocol/dist/parser.js +0 -324
  278. package/dist/server/node_modules/pg-protocol/dist/parser.js.map +0 -1
  279. package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +0 -42
  280. package/dist/server/node_modules/pg-protocol/dist/serializer.js +0 -189
  281. package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +0 -1
  282. package/dist/server/node_modules/pg-protocol/esm/index.js +0 -11
  283. package/dist/server/node_modules/pg-protocol/package.json +0 -45
  284. package/dist/server/node_modules/pg-protocol/src/b.ts +0 -25
  285. package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +0 -58
  286. package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +0 -85
  287. package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +0 -575
  288. package/dist/server/node_modules/pg-protocol/src/index.ts +0 -11
  289. package/dist/server/node_modules/pg-protocol/src/messages.ts +0 -262
  290. package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +0 -276
  291. package/dist/server/node_modules/pg-protocol/src/parser.ts +0 -413
  292. package/dist/server/node_modules/pg-protocol/src/serializer.ts +0 -274
  293. package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +0 -67
  294. package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +0 -166
  295. package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +0 -1
  296. package/dist/server/node_modules/pg-types/.travis.yml +0 -7
  297. package/dist/server/node_modules/pg-types/Makefile +0 -14
  298. package/dist/server/node_modules/pg-types/README.md +0 -75
  299. package/dist/server/node_modules/pg-types/index.d.ts +0 -137
  300. package/dist/server/node_modules/pg-types/index.js +0 -47
  301. package/dist/server/node_modules/pg-types/index.test-d.ts +0 -21
  302. package/dist/server/node_modules/pg-types/lib/arrayParser.js +0 -11
  303. package/dist/server/node_modules/pg-types/lib/binaryParsers.js +0 -257
  304. package/dist/server/node_modules/pg-types/lib/builtins.js +0 -73
  305. package/dist/server/node_modules/pg-types/lib/textParsers.js +0 -215
  306. package/dist/server/node_modules/pg-types/package.json +0 -42
  307. package/dist/server/node_modules/pg-types/test/index.js +0 -24
  308. package/dist/server/node_modules/pg-types/test/types.js +0 -597
  309. package/dist/server/node_modules/pgpass/README.md +0 -74
  310. package/dist/server/node_modules/pgpass/lib/helper.js +0 -233
  311. package/dist/server/node_modules/pgpass/lib/index.js +0 -23
  312. package/dist/server/node_modules/pgpass/package.json +0 -41
  313. package/dist/server/node_modules/xtend/.jshintrc +0 -30
  314. package/dist/server/node_modules/xtend/README.md +0 -32
  315. package/dist/server/node_modules/xtend/immutable.js +0 -19
  316. package/dist/server/node_modules/xtend/mutable.js +0 -17
  317. package/dist/server/node_modules/xtend/package.json +0 -55
  318. package/dist/server/node_modules/xtend/test.js +0 -103
@@ -1 +1 @@
1
- import{at as Q,r as x,f as p,j as e,B as g,y as T,d as ne,S as W,N as ae,c as ie}from"./index-B_DxRVw1.js";import{u as B}from"./useMutation-d1AXy22c.js";import{I}from"./input-DqwWeNgs.js";function oe({redirectUrl:s,callbackUrl:r="/"}){const{emailAndPassword:l,resetPassword:u,emailOtp:i,socialProviders:d}=Q(),[n,j]=x.useState(""),[y,V]=x.useState(""),[b,_]=x.useState(""),[C,O]=x.useState(""),[A,L]=x.useState(!1),[R,N]=x.useState(()=>!l.enabled&&i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=x.useState(""),[$,Y]=x.useState(!1),m=R==="signUp",f=R==="forgotPassword",v=R==="emailOtp",z=B({mutationFn:async({email:t,password:a,name:M})=>{try{if(m){const h=await p.signUp.email({email:t,password:a,name:M||""});if(h.error)throw new Error(h.error.message||"Sign up failed");return h}else{const h=await p.signIn.email({email:t,password:a});if(h.error)throw new Error(h.error.message||"Sign in failed");return h}}catch(h){throw h instanceof Error?h:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r}}),F=B({mutationFn:async({email:t})=>{const a=await p.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{Y(!0)}}),k=B({mutationFn:async({email:t})=>{const a=await p.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{L(!0)}}),E=B({mutationFn:async({email:t,otp:a})=>{const M=await p.signIn.emailOtp({email:t,otp:a});if(M.error)throw new Error(M.error.message||"Invalid code");return M},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r}}),q=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),D=()=>{n.trim()&&!q(n)&&S("Invalid email address")},X=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}z.mutate({email:n,password:y,name:b})},Z=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}F.mutate({email:n})},ee=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}k.mutate({email:n})},te=t=>{t.preventDefault(),E.mutate({email:n,otp:C})},P=t=>a=>{t(a.target.value),G&&z.reset(),H&&F.reset(),J&&(k.reset(),E.reset()),t===j&&c&&S("")},U=t=>{N(t),_(""),O(""),L(!1),S(""),Y(!1),z.reset(),F.reset(),k.reset(),E.reset()},o=z.isPending||F.isPending||k.isPending||E.isPending,G=z.error,H=F.error,J=k.error||E.error,w=m?n.trim()&&y.trim()&&b.trim():f?n.trim():v?A?C.trim():n.trim():n.trim()&&y.trim(),se=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},K=G||H||J,re=f?"Reset your password":v?A?"Enter verification code":"Sign in with email code":m?"Create your account":"Login or signup below";return e.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e.jsx("div",{className:"text-center space-y-1",children:e.jsx("p",{className:"text-sm text-foreground/70",children:re})}),K&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:se(K)}),$&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!f&&d.enabled&&e.jsx("div",{className:"grid gap-3",children:d.providers.map(t=>e.jsxs(g,{type:"button",variant:"outline",size:"lg",className:"w-full font-medium",disabled:o,onClick:()=>{p.signIn.social({provider:t.name,callbackURL:s??r})},children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:"h-5 w-5","aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!f&&d.enabled&&(l.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),v&&i.enabled&&e.jsx(e.Fragment,{children:A?e.jsxs("form",{onSubmit:te,className:"grid gap-4",children:[e.jsxs("div",{className:"rounded-xl bg-muted/50 p-3 text-sm text-muted-foreground text-center",children:["Code sent to ",n]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:C,onChange:P(O),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code"})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Verifying...":"Verify"}),e.jsx(g,{type:"button",variant:"ghost",onClick:()=>{L(!1),O(""),k.reset(),E.reset()},disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:D,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send code"})]})}),f&&l.enabled&&!$&&e.jsxs("form",{onSubmit:Z,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:D,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send reset link"})]}),!f&&!v&&l.enabled&&e.jsxs("form",{onSubmit:X,className:"grid gap-4",children:[e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",m?"max-h-[200px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsxs("div",{className:T("p-1",!m&&"pointer-events-none"),children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:b,onChange:P(_),required:!0,disabled:o||!m,"aria-hidden":!m})]})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:D,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!m&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>U("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:P(V),required:!0,disabled:o})]}),e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",w?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:T("p-1",!w&&"pointer-events-none"),children:e.jsx(g,{type:"submit",disabled:o||!w,className:T("w-full font-semibold"),size:"lg","aria-hidden":!w,children:o?m?"Creating account...":"Signing in...":"Continue"})})})]}),!f&&i.enabled&&l.enabled&&!v&&e.jsx("div",{className:"text-center",children:e.jsx(g,{type:"button",variant:"link",onClick:()=>U("emailOtp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with email code instead"})}),v&&l.enabled&&e.jsx("div",{className:"text-center",children:e.jsx(g,{type:"button",variant:"link",onClick:()=>U("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with password instead"})}),e.jsx("div",{className:"text-center",children:f?e.jsx(g,{type:"button",variant:"link",onClick:()=>U("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"}):!v&&l.enabled?e.jsx(g,{type:"button",variant:"link",onClick:()=>U(m?"signIn":"signUp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:m?"Already have an account? Sign in":"Don't have an account? Sign up"}):null}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground pt-4",children:[e.jsx("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Terms of Service"}),e.jsx("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Privacy Policy"})]})]})}function le({redirectTo:s}){const[r,l]=x.useState(null);return x.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let d=0;d<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));d++)await new Promise(n=>setTimeout(n,Math.min(1e3*2**d,1e4)));if(!i?.ok){const d=await i?.json().catch(()=>({}));throw new Error(d?.error||"Auto-login failed")}if(!u){const d=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=d}}catch(i){u||l(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),r?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",r]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx(W,{})}function de(s){if(!s.client_id||s.response_type!=="code")return null;const r=new URLSearchParams;return s.client_id&&r.set("client_id",s.client_id),s.redirect_uri&&r.set("redirect_uri",s.redirect_uri),s.response_type&&r.set("response_type",s.response_type),s.state&&r.set("state",s.state),s.scope&&r.set("scope",s.scope),s.code_challenge&&r.set("code_challenge",s.code_challenge),s.code_challenge_method&&r.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${r.toString()}`}function ce(s){const r=ie.c(5),{callbackURL:l,providerId:u}=s;let i,d;r[0]!==l||r[1]!==u?(i=()=>{(async()=>await p.signIn.sso({providerId:u,callbackURL:l}))()},d=[u,l],r[0]=l,r[1]=u,r[2]=i,r[3]=d):(i=r[2],d=r[3]),x.useEffect(i,d);let n;return r[4]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx(W,{}),r[4]=n):n=r[4],n}function he(){const s=p.useSession(),r=ne({from:"/login"}),{next:l="/",client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:V}=r,b=l.startsWith("/")&&!l.startsWith("//")?l:"/",{sso:_,emailAndPassword:C,magicLink:O,emailOtp:A,socialProviders:L,localMode:R}=Q(),N=de({client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:V}),c=N||b;return s.data?N?(window.location.href=N,e.jsx(W,{})):e.jsx(ae,{to:b}):R?e.jsx(le,{redirectTo:c}):_.enabled?e.jsx(ce,{callbackURL:c,providerId:_.providerId}):C.enabled||O.enabled||A.enabled||L.enabled?e.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-brand to-brand/75 p-4",children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--brand-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx(oe,{redirectUrl:N,callbackUrl:b})]})]}):e.jsx("div",{children:"No login options available"})}export{he as default};
1
+ import{at as Q,r as x,f as p,j as e,B as g,y as T,d as ne,S as W,N as ae,c as ie}from"./index-OyLnxARk.js";import{u as B}from"./useMutation-B_6d8oLI.js";import{I}from"./input-B4YrZuiK.js";function oe({redirectUrl:s,callbackUrl:r="/"}){const{emailAndPassword:l,resetPassword:u,emailOtp:i,socialProviders:d}=Q(),[n,j]=x.useState(""),[y,V]=x.useState(""),[b,_]=x.useState(""),[C,O]=x.useState(""),[A,L]=x.useState(!1),[R,N]=x.useState(()=>!l.enabled&&i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=x.useState(""),[$,Y]=x.useState(!1),m=R==="signUp",f=R==="forgotPassword",v=R==="emailOtp",z=B({mutationFn:async({email:t,password:a,name:M})=>{try{if(m){const h=await p.signUp.email({email:t,password:a,name:M||""});if(h.error)throw new Error(h.error.message||"Sign up failed");return h}else{const h=await p.signIn.email({email:t,password:a});if(h.error)throw new Error(h.error.message||"Sign in failed");return h}}catch(h){throw h instanceof Error?h:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r}}),F=B({mutationFn:async({email:t})=>{const a=await p.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{Y(!0)}}),k=B({mutationFn:async({email:t})=>{const a=await p.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{L(!0)}}),E=B({mutationFn:async({email:t,otp:a})=>{const M=await p.signIn.emailOtp({email:t,otp:a});if(M.error)throw new Error(M.error.message||"Invalid code");return M},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r}}),q=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),D=()=>{n.trim()&&!q(n)&&S("Invalid email address")},X=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}z.mutate({email:n,password:y,name:b})},Z=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}F.mutate({email:n})},ee=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}k.mutate({email:n})},te=t=>{t.preventDefault(),E.mutate({email:n,otp:C})},P=t=>a=>{t(a.target.value),G&&z.reset(),H&&F.reset(),J&&(k.reset(),E.reset()),t===j&&c&&S("")},U=t=>{N(t),_(""),O(""),L(!1),S(""),Y(!1),z.reset(),F.reset(),k.reset(),E.reset()},o=z.isPending||F.isPending||k.isPending||E.isPending,G=z.error,H=F.error,J=k.error||E.error,w=m?n.trim()&&y.trim()&&b.trim():f?n.trim():v?A?C.trim():n.trim():n.trim()&&y.trim(),se=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},K=G||H||J,re=f?"Reset your password":v?A?"Enter verification code":"Sign in with email code":m?"Create your account":"Login or signup below";return e.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e.jsx("div",{className:"text-center space-y-1",children:e.jsx("p",{className:"text-sm text-foreground/70",children:re})}),K&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:se(K)}),$&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!f&&d.enabled&&e.jsx("div",{className:"grid gap-3",children:d.providers.map(t=>e.jsxs(g,{type:"button",variant:"outline",size:"lg",className:"w-full font-medium",disabled:o,onClick:()=>{p.signIn.social({provider:t.name,callbackURL:s??r})},children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:"h-5 w-5","aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!f&&d.enabled&&(l.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),v&&i.enabled&&e.jsx(e.Fragment,{children:A?e.jsxs("form",{onSubmit:te,className:"grid gap-4",children:[e.jsxs("div",{className:"rounded-xl bg-muted/50 p-3 text-sm text-muted-foreground text-center",children:["Code sent to ",n]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:C,onChange:P(O),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code"})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Verifying...":"Verify"}),e.jsx(g,{type:"button",variant:"ghost",onClick:()=>{L(!1),O(""),k.reset(),E.reset()},disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:D,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send code"})]})}),f&&l.enabled&&!$&&e.jsxs("form",{onSubmit:Z,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:D,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send reset link"})]}),!f&&!v&&l.enabled&&e.jsxs("form",{onSubmit:X,className:"grid gap-4",children:[e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",m?"max-h-[200px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsxs("div",{className:T("p-1",!m&&"pointer-events-none"),children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:b,onChange:P(_),required:!0,disabled:o||!m,"aria-hidden":!m})]})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:D,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!m&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>U("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:P(V),required:!0,disabled:o})]}),e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",w?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:T("p-1",!w&&"pointer-events-none"),children:e.jsx(g,{type:"submit",disabled:o||!w,className:T("w-full font-semibold"),size:"lg","aria-hidden":!w,children:o?m?"Creating account...":"Signing in...":"Continue"})})})]}),!f&&i.enabled&&l.enabled&&!v&&e.jsx("div",{className:"text-center",children:e.jsx(g,{type:"button",variant:"link",onClick:()=>U("emailOtp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with email code instead"})}),v&&l.enabled&&e.jsx("div",{className:"text-center",children:e.jsx(g,{type:"button",variant:"link",onClick:()=>U("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with password instead"})}),e.jsx("div",{className:"text-center",children:f?e.jsx(g,{type:"button",variant:"link",onClick:()=>U("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"}):!v&&l.enabled?e.jsx(g,{type:"button",variant:"link",onClick:()=>U(m?"signIn":"signUp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:m?"Already have an account? Sign in":"Don't have an account? Sign up"}):null}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground pt-4",children:[e.jsx("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Terms of Service"}),e.jsx("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Privacy Policy"})]})]})}function le({redirectTo:s}){const[r,l]=x.useState(null);return x.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let d=0;d<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));d++)await new Promise(n=>setTimeout(n,Math.min(1e3*2**d,1e4)));if(!i?.ok){const d=await i?.json().catch(()=>({}));throw new Error(d?.error||"Auto-login failed")}if(!u){const d=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=d}}catch(i){u||l(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),r?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",r]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx(W,{})}function de(s){if(!s.client_id||s.response_type!=="code")return null;const r=new URLSearchParams;return s.client_id&&r.set("client_id",s.client_id),s.redirect_uri&&r.set("redirect_uri",s.redirect_uri),s.response_type&&r.set("response_type",s.response_type),s.state&&r.set("state",s.state),s.scope&&r.set("scope",s.scope),s.code_challenge&&r.set("code_challenge",s.code_challenge),s.code_challenge_method&&r.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${r.toString()}`}function ce(s){const r=ie.c(5),{callbackURL:l,providerId:u}=s;let i,d;r[0]!==l||r[1]!==u?(i=()=>{(async()=>await p.signIn.sso({providerId:u,callbackURL:l}))()},d=[u,l],r[0]=l,r[1]=u,r[2]=i,r[3]=d):(i=r[2],d=r[3]),x.useEffect(i,d);let n;return r[4]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx(W,{}),r[4]=n):n=r[4],n}function he(){const s=p.useSession(),r=ne({from:"/login"}),{next:l="/",client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:V}=r,b=l.startsWith("/")&&!l.startsWith("//")?l:"/",{sso:_,emailAndPassword:C,magicLink:O,emailOtp:A,socialProviders:L,localMode:R}=Q(),N=de({client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:V}),c=N||b;return s.data?N?(window.location.href=N,e.jsx(W,{})):e.jsx(ae,{to:b}):R?e.jsx(le,{redirectTo:c}):_.enabled?e.jsx(ce,{callbackURL:c,providerId:_.providerId}):C.enabled||O.enabled||A.enabled||L.enabled?e.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-brand to-brand/75 p-4",children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--brand-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx(oe,{redirectUrl:N,callbackUrl:b})]})]}):e.jsx("div",{children:"No login options available"})}export{he as default};
@@ -1 +1 @@
1
- import{c as F,r as B,v as w,j as t,B as k}from"./index-B_DxRVw1.js";import{i as E}from"./Upload01-CSDtabhZ.js";import{i as S}from"./X-CxZVsh3L.js";function M(L){const e=F.c(28),{value:s,onChange:l,name:b,disabled:r}=L,a=B.useRef(null);let f;e[0]!==l?(f=y=>{const N=y.target.files?.[0];if(N){if(N.size>2097152){w.error("Image must be smaller than 2MB");return}const o=new FileReader;o.onerror=()=>{const C=o.error;console.error("FileReader error:",C),w.error(C?.message||"Failed to read image file. Please try again."),a.current&&(a.current.value="")},o.onloadend=()=>{o.readyState===FileReader.DONE&&o.result&&l(o.result),a.current&&(a.current.value="")},o.readAsDataURL(N)}},e[0]=l,e[1]=f):f=e[1];const v=f;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{a.current?.click()},e[2]=h):h=e[2];const R=h;let x;e[3]!==l?(x=y=>{y.stopPropagation(),l("")},e[3]=l,e[4]=x):x=e[4];const n=x;let i;e[5]!==r||e[6]!==v?(i=t.jsx("input",{type:"file",ref:a,className:"hidden",accept:"image/*",onChange:v,disabled:r}),e[5]=r,e[6]=v,e[7]=i):i=e[7];let c;e[8]!==r||e[9]!==n||e[10]!==b||e[11]!==s?(c=s?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:t.jsx("img",{src:s,alt:b||"Logo",className:"w-full h-full object-cover"})}),t.jsx("button",{type:"button",onClick:n,disabled:r,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:t.jsx(S,{className:"h-3 w-3"})})]}):t.jsxs("button",{type:"button",onClick:R,disabled:r,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(E,{className:"h-5 w-5"}),t.jsx("span",{className:"text-xs",children:"Upload"})]}),e[8]=r,e[9]=n,e[10]=b,e[11]=s,e[12]=c):c=e[12];const j=s?"Change Logo":"Upload Logo";let d;e[13]!==r||e[14]!==j?(d=t.jsx(k,{type:"button",variant:"outline",size:"sm",onClick:R,disabled:r,className:"mb-2",children:j}),e[13]=r,e[14]=j,e[15]=d):d=e[15];let m;e[16]!==r||e[17]!==n||e[18]!==s?(m=s&&t.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:n,disabled:r,className:"ml-2",children:"Remove"}),e[16]=r,e[17]=n,e[18]=s,e[19]=m):m=e[19];let p;e[20]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[20]=p):p=e[20];let u;e[21]!==d||e[22]!==m?(u=t.jsxs("div",{className:"flex-1",children:[d,m,p]}),e[21]=d,e[22]=m,e[23]=u):u=e[23];let g;return e[24]!==u||e[25]!==i||e[26]!==c?(g=t.jsxs("div",{className:"flex items-start gap-4",children:[i,c,u]}),e[24]=u,e[25]=i,e[26]=c,e[27]=g):g=e[27],g}export{M as L};
1
+ import{c as F,r as B,v as w,j as t,B as k}from"./index-OyLnxARk.js";import{i as E}from"./Upload01-Cqh5tD2o.js";import{i as S}from"./X-Car5B1de.js";function M(L){const e=F.c(28),{value:s,onChange:l,name:b,disabled:r}=L,a=B.useRef(null);let f;e[0]!==l?(f=y=>{const N=y.target.files?.[0];if(N){if(N.size>2097152){w.error("Image must be smaller than 2MB");return}const o=new FileReader;o.onerror=()=>{const C=o.error;console.error("FileReader error:",C),w.error(C?.message||"Failed to read image file. Please try again."),a.current&&(a.current.value="")},o.onloadend=()=>{o.readyState===FileReader.DONE&&o.result&&l(o.result),a.current&&(a.current.value="")},o.readAsDataURL(N)}},e[0]=l,e[1]=f):f=e[1];const v=f;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{a.current?.click()},e[2]=h):h=e[2];const R=h;let x;e[3]!==l?(x=y=>{y.stopPropagation(),l("")},e[3]=l,e[4]=x):x=e[4];const n=x;let i;e[5]!==r||e[6]!==v?(i=t.jsx("input",{type:"file",ref:a,className:"hidden",accept:"image/*",onChange:v,disabled:r}),e[5]=r,e[6]=v,e[7]=i):i=e[7];let c;e[8]!==r||e[9]!==n||e[10]!==b||e[11]!==s?(c=s?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:t.jsx("img",{src:s,alt:b||"Logo",className:"w-full h-full object-cover"})}),t.jsx("button",{type:"button",onClick:n,disabled:r,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:t.jsx(S,{className:"h-3 w-3"})})]}):t.jsxs("button",{type:"button",onClick:R,disabled:r,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(E,{className:"h-5 w-5"}),t.jsx("span",{className:"text-xs",children:"Upload"})]}),e[8]=r,e[9]=n,e[10]=b,e[11]=s,e[12]=c):c=e[12];const j=s?"Change Logo":"Upload Logo";let d;e[13]!==r||e[14]!==j?(d=t.jsx(k,{type:"button",variant:"outline",size:"sm",onClick:R,disabled:r,className:"mb-2",children:j}),e[13]=r,e[14]=j,e[15]=d):d=e[15];let m;e[16]!==r||e[17]!==n||e[18]!==s?(m=s&&t.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:n,disabled:r,className:"ml-2",children:"Remove"}),e[16]=r,e[17]=n,e[18]=s,e[19]=m):m=e[19];let p;e[20]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[20]=p):p=e[20];let u;e[21]!==d||e[22]!==m?(u=t.jsxs("div",{className:"flex-1",children:[d,m,p]}),e[21]=d,e[22]=m,e[23]=u):u=e[23];let g;return e[24]!==u||e[25]!==i||e[26]!==c?(g=t.jsxs("div",{className:"flex items-start gap-4",children:[i,c,u]}),e[24]=u,e[25]=i,e[26]=c,e[27]=g):g=e[27],g}export{M as L};
@@ -1,4 +1,4 @@
1
- import{r as O,c as V,y as _,j as d}from"./index-B_DxRVw1.js";import{u as Q}from"./use-mcp-resources-CFkkQw1d.js";import{o as q,N as K,A as Y}from"./types-BnNswHwQ.js";const $=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function G(o,e={}){const n=`<meta http-equiv="Content-Security-Policy" content="${X(e)}">`,s=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,c=o.match(s);if(c){const i=(c.index??0)+c[0].length;return o.slice(0,i)+`
1
+ import{r as O,c as V,y as _,j as d}from"./index-OyLnxARk.js";import{u as Q}from"./use-mcp-resources-CFTlLllB.js";import{o as q,N as K,A as Y}from"./types-DoomhLgW.js";const $=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function G(o,e={}){const n=`<meta http-equiv="Content-Security-Policy" content="${X(e)}">`,s=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,c=o.match(s);if(c){const i=(c.index??0)+c[0].length;return o.slice(0,i)+`
2
2
  `+n+o.slice(i)}const a=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,r=o.match(a);if(r){const i=(r.index??0)+r[0].length;return o.slice(0,i)+`
3
3
  <head>
4
4
  `+n+`
@@ -1 +1 @@
1
- import{r as Z,c as V,y as H,j as n,B as J}from"./index-B_DxRVw1.js";import{a as K,b as Q,T as X}from"./tooltip-Bm11lCIm.js";import{i as F}from"./CheckVerified02-e9BOcL0K.js";import{s as Y}from"./Globe02-CB2InS06.js";import{i as ee}from"./Lock01-DZeZ3WxC.js";import{s as te}from"./Plus-DN4FtVmx.js";import{i as se}from"./Terminal-BDeJ6lHB.js";import{C as le}from"./card-B8QXMrj8.js";import{I as ie}from"./integration-icon-Dv0HduyT.js";import{g as ne}from"./registry-utils--TC_kKCq.js";const W=({size:s=24,color:e="currentColor",...i})=>Z.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},Z.createElement("path",{d:"M6 6h.01M6 18h.01m-.81-8h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 8.48 22 7.92 22 6.8V5.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 2 19.92 2 18.8 2H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 3.52 2 4.08 2 5.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 10 4.08 10 5.2 10Zm0 12h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 20.48 22 19.92 22 18.8v-1.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 14 19.92 14 18.8 14H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 15.52 2 16.08 2 17.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 22 4.08 22 5.2 22Z"}));W.displayName="Server01";function ae(s){if(!s.includes("/"))return s;const e=s.split("/"),i=e[0],l=e[1];if(!i||!l)return s;if(i.includes(".")){const a=i.split("."),r=a[a.length-1]||i,c=l.replace(/^mcp-?/,"").replace(/-?mcp$/,"").replace(/^server-?/,"").replace(/-?server$/,"");return!c||c.length<2?r:c}return l}function re(s){const e=V.c(2),{protocol:i,className:l}=s;let a;return e[0]!==l?(a={http:n.jsx(Y,{className:l}),sse:n.jsx(W,{className:l}),stdio:n.jsx(se,{className:l})},e[0]=l,e[1]=a):a=e[1],a[i]}function ce(s){switch(s){case"http":return"HTTP";case"sse":return"SSE";case"stdio":return"STDIO"}}function oe(s){const e=V.c(9),{protocol:i}=s;let l;e[0]!==i?(l=H("flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium shrink-0",{http:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",sse:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",stdio:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400"}[i]),e[0]=i,e[1]=l):l=e[1];let a,r;e[2]!==i?(a=n.jsx(re,{protocol:i,className:"w-3 h-3"}),r=ce(i),e[2]=i,e[3]=a,e[4]=r):(a=e[3],r=e[4]);let c;return e[5]!==l||e[6]!==a||e[7]!==r?(c=n.jsxs("div",{className:l,children:[a,r]}),e[5]=l,e[6]=a,e[7]=r,e[8]=c):c=e[8],c}function me(s){const e=V.c(73),{icon:i,displayName:l,description:a,onClick:r}=s,t=(s.variant??"store")==="server",m=t?s.hostname:null,f=t?s.protocol:null,p=t?s.isInstalling:!1,x=t?s.actionLabel:void 0,d=t?null:s.scopeName,o=t?!1:s.isVerified,u=t?!1:s.isOfficial,h=t?!0:s.canInstall,R=t?"p-4":"p-6";let g;e[0]!==R?(g=H("cursor-pointer hover:bg-muted/50 transition-colors",R),e[0]=R,e[1]=g):g=e[1];const A=t?"gap-3":"gap-4";let v;e[2]!==A?(v=H("flex flex-col h-full relative",A),e[2]=A,e[3]=v):v=e[3];const G=t?"sm":"md";let j;e[4]!==l||e[5]!==i||e[6]!==G?(j=n.jsx(ie,{icon:i,name:l,size:G,className:"shadow-sm shrink-0"}),e[4]=l,e[5]=i,e[6]=G,e[7]=j):j=e[7];const U=t?"text-sm":"text-base";let N;e[8]!==U?(N=H("flex items-center gap-2 font-medium min-w-0",U),e[8]=U,e[9]=N):N=e[9];let C;e[10]!==l?(C=n.jsx("span",{className:"truncate",children:l}),e[10]=l,e[11]=C):C=e[11];let b;e[12]!==u||e[13]!==t?(b=!t&&u&&n.jsx(F,{size:16,className:"text-primary shrink-0"}),e[12]=u,e[13]=t,e[14]=b):b=e[14];let k;e[15]!==u||e[16]!==t||e[17]!==o?(k=!t&&!u&&o&&n.jsx(F,{size:16,className:"text-success shrink-0"}),e[15]=u,e[16]=t,e[17]=o,e[18]=k):k=e[18];let y;e[19]!==h||e[20]!==t?(y=!t&&!h&&n.jsx(ee,{size:16,className:"text-muted-foreground shrink-0"}),e[19]=h,e[20]=t,e[21]=y):y=e[21];let I;e[22]!==t||e[23]!==f?(I=t&&f&&n.jsx(oe,{protocol:f}),e[22]=t,e[23]=f,e[24]=I):I=e[24];let w;e[25]!==k||e[26]!==y||e[27]!==I||e[28]!==N||e[29]!==C||e[30]!==b?(w=n.jsx(K,{asChild:!0,children:n.jsxs("div",{className:N,children:[C,b,k,y,I]})}),e[25]=k,e[26]=y,e[27]=I,e[28]=N,e[29]=C,e[30]=b,e[31]=w):w=e[31];let S;e[32]!==l?(S=n.jsx("p",{children:l}),e[32]=l,e[33]=S):S=e[33];let $;e[34]!==h||e[35]!==t?($=!t&&!h&&n.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[34]=h,e[35]=t,e[36]=$):$=e[36];let P;e[37]!==S||e[38]!==$?(P=n.jsxs(Q,{children:[S,$]}),e[37]=S,e[38]=$,e[39]=P):P=e[39];let T;e[40]!==w||e[41]!==P?(T=n.jsxs(X,{children:[w,P]}),e[40]=w,e[41]=P,e[42]=T):T=e[42];let _;e[43]!==m||e[44]!==t||e[45]!==d?(_=(d||m)&&n.jsx("div",{className:H("text-muted-foreground truncate",t?"text-xs mt-0.5":"text-sm"),children:d||m}),e[43]=m,e[44]=t,e[45]=d,e[46]=_):_=e[46];let z;e[47]!==T||e[48]!==_?(z=n.jsx("div",{className:"flex gap-2 items-start min-w-0 flex-1",children:n.jsxs("div",{className:"min-w-0 flex-1",children:[T,_]})}),e[47]=T,e[48]=_,e[49]=z):z=e[49];let D;e[50]!==z||e[51]!==j?(D=n.jsxs("div",{className:"flex gap-3",children:[j,z]}),e[50]=z,e[51]=j,e[52]=D):D=e[52];let E;e[53]!==a?(E=a&&n.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:a}),e[53]=a,e[54]=E):E=e[54];let M;e[55]!==a||e[56]!==t?(M=!a&&!t&&n.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:"No description available"}),e[55]=a,e[56]=t,e[57]=M):M=e[57];let L;e[58]!==x||e[59]!==p||e[60]!==t||e[61]!==r?(L=t&&n.jsxs(J,{variant:"outline",size:"sm",onClick:q=>{q.stopPropagation(),r()},disabled:p,className:"w-full mt-auto cursor-pointer",children:[n.jsx(te,{size:16}),p?"Connecting...":x||"Connect"]}),e[58]=x,e[59]=p,e[60]=t,e[61]=r,e[62]=L):L=e[62];let B;e[63]!==D||e[64]!==E||e[65]!==M||e[66]!==L||e[67]!==v?(B=n.jsxs("div",{className:v,children:[D,E,M,L]}),e[63]=D,e[64]=E,e[65]=M,e[66]=L,e[67]=v,e[68]=B):B=e[68];let O;return e[69]!==r||e[70]!==g||e[71]!==B?(O=n.jsx(le,{className:g,onClick:r,children:B}),e[69]=r,e[70]=g,e[71]=B,e[72]=O):O=e[72],O}function de(s){const e=s.server,i=s._meta?.["mcp.mesh"],l=i?.friendly_name||s.name||e?.title||s.title||s.id||"Unnamed Item",a=i?.short_description||i?.mesh_description||e?.description||s.description||null,r=e?.icons?.[0]?.src||ne(e?.repository)||null,c=i?.verified??!1,t=i?.official??!1,m=(e?.remotes?.length??0)>0,f=(e?.packages?.length??0)>0,p=m||f;let x=l,d=null;if(l.includes("/")){const o=l.split("/");o.length>=2&&(d=o[0]||null,x=ae(l))}if(!d){const o=i?.scopeName,u=i?.appName;o&&u?d=`${o}/${u}`:o&&(d=o)}return!d&&s.id?.includes("/")&&(d=s.id),i?.friendly_name&&(x=i.friendly_name),{icon:r,scopeName:d,displayName:x,description:a,isVerified:c,isOfficial:t,canInstall:p}}function ke(s){const e=V.c(19),{items:i,title:l,onItemClick:a}=s;let r,c,t,m,f;if(e[0]!==i||e[1]!==a||e[2]!==l){f=Symbol.for("react.early_return_sentinel");e:{const d=i.filter(fe);if(d.length===0){f=null;break e}t="flex flex-col gap-4",e[8]!==l?(m=l&&n.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:n.jsx("h2",{className:"text-lg font-medium",children:l})}),e[8]=l,e[9]=m):m=e[9],r="grid grid-cols-4 gap-4";let o;e[10]!==a?(o=u=>{const h=de(u);return n.jsx(me,{...h,onClick:()=>a(u)},u.id)},e[10]=a,e[11]=o):o=e[11],c=d.map(o)}e[0]=i,e[1]=a,e[2]=l,e[3]=r,e[4]=c,e[5]=t,e[6]=m,e[7]=f}else r=e[3],c=e[4],t=e[5],m=e[6],f=e[7];if(f!==Symbol.for("react.early_return_sentinel"))return f;let p;e[12]!==r||e[13]!==c?(p=n.jsx("div",{className:r,children:c}),e[12]=r,e[13]=c,e[14]=p):p=e[14];let x;return e[15]!==t||e[16]!==m||e[17]!==p?(x=n.jsxs("div",{className:t,children:[m,p]}),e[15]=t,e[16]=m,e[17]=p,e[18]=x):x=e[18],x}function fe(s){return s!=null}export{ke as M,me as a,W as b,ae as e};
1
+ import{r as Z,c as V,y as H,j as n,B as J}from"./index-OyLnxARk.js";import{a as K,b as Q,T as X}from"./tooltip--UA5heKX.js";import{i as F}from"./CheckVerified02-YYsvmiw4.js";import{s as Y}from"./Globe02-CDBspixd.js";import{i as ee}from"./Lock01-j13GCiRT.js";import{s as te}from"./Plus-1vH_gFoY.js";import{i as se}from"./Terminal-CvfSVl9m.js";import{C as le}from"./card-B6XTMOTf.js";import{I as ie}from"./integration-icon-B3aufi6R.js";import{g as ne}from"./registry-utils-D0qx2c0_.js";const W=({size:s=24,color:e="currentColor",...i})=>Z.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},Z.createElement("path",{d:"M6 6h.01M6 18h.01m-.81-8h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 8.48 22 7.92 22 6.8V5.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 2 19.92 2 18.8 2H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 3.52 2 4.08 2 5.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 10 4.08 10 5.2 10Zm0 12h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 20.48 22 19.92 22 18.8v-1.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 14 19.92 14 18.8 14H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 15.52 2 16.08 2 17.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 22 4.08 22 5.2 22Z"}));W.displayName="Server01";function ae(s){if(!s.includes("/"))return s;const e=s.split("/"),i=e[0],l=e[1];if(!i||!l)return s;if(i.includes(".")){const a=i.split("."),r=a[a.length-1]||i,c=l.replace(/^mcp-?/,"").replace(/-?mcp$/,"").replace(/^server-?/,"").replace(/-?server$/,"");return!c||c.length<2?r:c}return l}function re(s){const e=V.c(2),{protocol:i,className:l}=s;let a;return e[0]!==l?(a={http:n.jsx(Y,{className:l}),sse:n.jsx(W,{className:l}),stdio:n.jsx(se,{className:l})},e[0]=l,e[1]=a):a=e[1],a[i]}function ce(s){switch(s){case"http":return"HTTP";case"sse":return"SSE";case"stdio":return"STDIO"}}function oe(s){const e=V.c(9),{protocol:i}=s;let l;e[0]!==i?(l=H("flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium shrink-0",{http:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",sse:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",stdio:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400"}[i]),e[0]=i,e[1]=l):l=e[1];let a,r;e[2]!==i?(a=n.jsx(re,{protocol:i,className:"w-3 h-3"}),r=ce(i),e[2]=i,e[3]=a,e[4]=r):(a=e[3],r=e[4]);let c;return e[5]!==l||e[6]!==a||e[7]!==r?(c=n.jsxs("div",{className:l,children:[a,r]}),e[5]=l,e[6]=a,e[7]=r,e[8]=c):c=e[8],c}function me(s){const e=V.c(73),{icon:i,displayName:l,description:a,onClick:r}=s,t=(s.variant??"store")==="server",m=t?s.hostname:null,f=t?s.protocol:null,p=t?s.isInstalling:!1,x=t?s.actionLabel:void 0,d=t?null:s.scopeName,o=t?!1:s.isVerified,u=t?!1:s.isOfficial,h=t?!0:s.canInstall,R=t?"p-4":"p-6";let g;e[0]!==R?(g=H("cursor-pointer hover:bg-muted/50 transition-colors",R),e[0]=R,e[1]=g):g=e[1];const A=t?"gap-3":"gap-4";let v;e[2]!==A?(v=H("flex flex-col h-full relative",A),e[2]=A,e[3]=v):v=e[3];const G=t?"sm":"md";let j;e[4]!==l||e[5]!==i||e[6]!==G?(j=n.jsx(ie,{icon:i,name:l,size:G,className:"shadow-sm shrink-0"}),e[4]=l,e[5]=i,e[6]=G,e[7]=j):j=e[7];const U=t?"text-sm":"text-base";let N;e[8]!==U?(N=H("flex items-center gap-2 font-medium min-w-0",U),e[8]=U,e[9]=N):N=e[9];let C;e[10]!==l?(C=n.jsx("span",{className:"truncate",children:l}),e[10]=l,e[11]=C):C=e[11];let b;e[12]!==u||e[13]!==t?(b=!t&&u&&n.jsx(F,{size:16,className:"text-primary shrink-0"}),e[12]=u,e[13]=t,e[14]=b):b=e[14];let k;e[15]!==u||e[16]!==t||e[17]!==o?(k=!t&&!u&&o&&n.jsx(F,{size:16,className:"text-success shrink-0"}),e[15]=u,e[16]=t,e[17]=o,e[18]=k):k=e[18];let y;e[19]!==h||e[20]!==t?(y=!t&&!h&&n.jsx(ee,{size:16,className:"text-muted-foreground shrink-0"}),e[19]=h,e[20]=t,e[21]=y):y=e[21];let I;e[22]!==t||e[23]!==f?(I=t&&f&&n.jsx(oe,{protocol:f}),e[22]=t,e[23]=f,e[24]=I):I=e[24];let w;e[25]!==k||e[26]!==y||e[27]!==I||e[28]!==N||e[29]!==C||e[30]!==b?(w=n.jsx(K,{asChild:!0,children:n.jsxs("div",{className:N,children:[C,b,k,y,I]})}),e[25]=k,e[26]=y,e[27]=I,e[28]=N,e[29]=C,e[30]=b,e[31]=w):w=e[31];let S;e[32]!==l?(S=n.jsx("p",{children:l}),e[32]=l,e[33]=S):S=e[33];let $;e[34]!==h||e[35]!==t?($=!t&&!h&&n.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[34]=h,e[35]=t,e[36]=$):$=e[36];let P;e[37]!==S||e[38]!==$?(P=n.jsxs(Q,{children:[S,$]}),e[37]=S,e[38]=$,e[39]=P):P=e[39];let T;e[40]!==w||e[41]!==P?(T=n.jsxs(X,{children:[w,P]}),e[40]=w,e[41]=P,e[42]=T):T=e[42];let _;e[43]!==m||e[44]!==t||e[45]!==d?(_=(d||m)&&n.jsx("div",{className:H("text-muted-foreground truncate",t?"text-xs mt-0.5":"text-sm"),children:d||m}),e[43]=m,e[44]=t,e[45]=d,e[46]=_):_=e[46];let z;e[47]!==T||e[48]!==_?(z=n.jsx("div",{className:"flex gap-2 items-start min-w-0 flex-1",children:n.jsxs("div",{className:"min-w-0 flex-1",children:[T,_]})}),e[47]=T,e[48]=_,e[49]=z):z=e[49];let D;e[50]!==z||e[51]!==j?(D=n.jsxs("div",{className:"flex gap-3",children:[j,z]}),e[50]=z,e[51]=j,e[52]=D):D=e[52];let E;e[53]!==a?(E=a&&n.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:a}),e[53]=a,e[54]=E):E=e[54];let M;e[55]!==a||e[56]!==t?(M=!a&&!t&&n.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:"No description available"}),e[55]=a,e[56]=t,e[57]=M):M=e[57];let L;e[58]!==x||e[59]!==p||e[60]!==t||e[61]!==r?(L=t&&n.jsxs(J,{variant:"outline",size:"sm",onClick:q=>{q.stopPropagation(),r()},disabled:p,className:"w-full mt-auto cursor-pointer",children:[n.jsx(te,{size:16}),p?"Connecting...":x||"Connect"]}),e[58]=x,e[59]=p,e[60]=t,e[61]=r,e[62]=L):L=e[62];let B;e[63]!==D||e[64]!==E||e[65]!==M||e[66]!==L||e[67]!==v?(B=n.jsxs("div",{className:v,children:[D,E,M,L]}),e[63]=D,e[64]=E,e[65]=M,e[66]=L,e[67]=v,e[68]=B):B=e[68];let O;return e[69]!==r||e[70]!==g||e[71]!==B?(O=n.jsx(le,{className:g,onClick:r,children:B}),e[69]=r,e[70]=g,e[71]=B,e[72]=O):O=e[72],O}function de(s){const e=s.server,i=s._meta?.["mcp.mesh"],l=i?.friendly_name||s.name||e?.title||s.title||s.id||"Unnamed Item",a=i?.short_description||i?.mesh_description||e?.description||s.description||null,r=e?.icons?.[0]?.src||ne(e?.repository)||null,c=i?.verified??!1,t=i?.official??!1,m=(e?.remotes?.length??0)>0,f=(e?.packages?.length??0)>0,p=m||f;let x=l,d=null;if(l.includes("/")){const o=l.split("/");o.length>=2&&(d=o[0]||null,x=ae(l))}if(!d){const o=i?.scopeName,u=i?.appName;o&&u?d=`${o}/${u}`:o&&(d=o)}return!d&&s.id?.includes("/")&&(d=s.id),i?.friendly_name&&(x=i.friendly_name),{icon:r,scopeName:d,displayName:x,description:a,isVerified:c,isOfficial:t,canInstall:p}}function ke(s){const e=V.c(19),{items:i,title:l,onItemClick:a}=s;let r,c,t,m,f;if(e[0]!==i||e[1]!==a||e[2]!==l){f=Symbol.for("react.early_return_sentinel");e:{const d=i.filter(fe);if(d.length===0){f=null;break e}t="flex flex-col gap-4",e[8]!==l?(m=l&&n.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:n.jsx("h2",{className:"text-lg font-medium",children:l})}),e[8]=l,e[9]=m):m=e[9],r="grid grid-cols-4 gap-4";let o;e[10]!==a?(o=u=>{const h=de(u);return n.jsx(me,{...h,onClick:()=>a(u)},u.id)},e[10]=a,e[11]=o):o=e[11],c=d.map(o)}e[0]=i,e[1]=a,e[2]=l,e[3]=r,e[4]=c,e[5]=t,e[6]=m,e[7]=f}else r=e[3],c=e[4],t=e[5],m=e[6],f=e[7];if(f!==Symbol.for("react.early_return_sentinel"))return f;let p;e[12]!==r||e[13]!==c?(p=n.jsx("div",{className:r,children:c}),e[12]=r,e[13]=c,e[14]=p):p=e[14];let x;return e[15]!==t||e[16]!==m||e[17]!==p?(x=n.jsxs("div",{className:t,children:[m,p]}),e[15]=t,e[16]=m,e[17]=p,e[18]=x):x=e[18],x}function fe(s){return s!=null}export{ke as M,me as a,W as b,ae as e};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B_DxRVw1.js","assets/index-Dzbrw6kA.css","assets/index-BlBXXIdz.js","assets/use-collections-aokT1D_C.js","assets/useMutation-d1AXy22c.js","assets/constants-CKGlP4oN.js","assets/use-connection-DA77pjoV.js","assets/use-mcp-tools-C3Vj1u8m.js","assets/useQuery-B8Io0Oda.js","assets/use-mcp-resources-CFkkQw1d.js","assets/use-mcp-prompts-Dw4CvfV3.js","assets/use-virtual-mcp-FAfRsySa.js","assets/decopilot-events-Brt4gAR6.js","assets/usage-BW6ztpN6.js"])))=>i.map(i=>d[i]);
2
- import{r as Y,c as F,j as t,B as se,v as fe,y as Fe,K as le,bT as pe,u as ke,e as Ie,O as ie,g as He,d as Oe,aw as Ge,f as qe,J as Ke}from"./index-B_DxRVw1.js";import{i as We}from"./AlertCircle-PBJUtpjc.js";import{i as xe}from"./Loading01-Dt16NixZ.js";import{P as ue,a as Qe}from"./index-CsqngJxb.js";import{c as Ye,T as Je,a as Xe,b as Ze}from"./tooltip-Bm11lCIm.js";import{i as et}from"./Check-Bme4aNg5.js";import{a as tt}from"./Copy01-ekqsSfJN.js";import{I as Te}from"./integration-icon-Dv0HduyT.js";import{i as st}from"./CheckCircle-BSVa-h_Y.js";import{t as rt}from"./ChevronDown-jyPVRLzp.js";import{s as be}from"./Plus-DN4FtVmx.js";import{a as ot,c as nt,b as it,D as lt}from"./dropdown-menu-Cr1iKfFo.js";import{n as ye}from"./LinkExternal01-B5VTVW6k.js";import{E as at}from"./empty-state-DsQ7yRoE.js";import{u as ae}from"./useQuery-B8Io0Oda.js";import{i as ct}from"./File06-Ba0KxpWu.js";import{j as Le,u as dt,f as mt,k as je,b as ut,l as ft,g as pt}from"./registry-utils--TC_kKCq.js";import{m as Ne}from"./marked.esm-BaswSlok.js";import{a as xt}from"./tools-list-DO_G3ceo.js";import{C as ht}from"./collection-tabs-D8NPXaOU.js";import{s as gt}from"./Globe02-CB2InS06.js";import{a as vt,b as bt,e as yt}from"./mcp-server-card-PhaJL10h.js";import{i as jt}from"./Terminal-BDeJ6lHB.js";import{B as Nt,a as wt,b as we,d as Ct,e as St,c as _t}from"./breadcrumb-BhQI8Xw3.js";import{a as kt,b as It,u as Tt}from"./use-connection-DA77pjoV.js";import{u as Lt}from"./constants-CKGlP4oN.js";import{u as Pt}from"./use-mcp-tools-C3Vj1u8m.js";import{e as Mt}from"./extract-connection-data-D46U8dB4.js";import{s as Rt}from"./slugify-CEUa2lfQ.js";import{i as Et}from"./InfoCircle-ETSHVG2F.js";import"./useMutation-d1AXy22c.js";import"./index-DRLd-piX.js";import"./Container-BeAIfNvy.js";import"./ChevronRight-Ct9VK1GH.js";import"./binder-B5Q0NNkg.js";import"./collection-display-button-D7NovPlc.js";import"./ArrowDown-LiBnMzQV.js";import"./ArrowUp-WIHiBhdv.js";import"./Grid01-BvWQ72pJ.js";import"./List-BU70NJSh.js";import"./badge-BfLRgdaW.js";import"./collection-search-DDX1Zkg7.js";import"./SearchMd-BQseJVRu.js";import"./input-DqwWeNgs.js";import"./collection-table-wrapper-YGokzak8.js";import"./table-BOA7X4H8.js";import"./card-B8QXMrj8.js";import"./types-BnNswHwQ.js";import"./Eye-DN-kY_sb.js";import"./LayersTwo01-8gQGsURS.js";import"./layout-CDyeWvbl.js";import"./CheckVerified02-e9BOcL0K.js";import"./Lock01-DZeZ3WxC.js";import"./use-collections-aokT1D_C.js";import"./constants-DqZ0hFNm.js";import"./generate-id-Dyweu44Y.js";const Pe=({size:r=24,color:e="currentColor",...s})=>Y.createElement("svg",{viewBox:"0 0 24 24",width:r,height:r,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},Y.createElement("path",{d:"m21 21-3.5-3.5m2.5-6a8.5 8.5 0 1 1-17 0 8.5 8.5 0 0 1 17 0Z"}));Pe.displayName="SearchLg";function Dt(r){return r.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function $t(r){return r.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,s)=>{let o=e;return s.includes("target=")?o=o.replace(/target="[^"]*"/gi,'target="_blank"'):o=o.replace(/>/,' target="_blank">'),s.includes("rel=")?o=o.replace(/rel="[^"]*"/gi,'rel="noopener noreferrer"'):o=o.replace(/>/,' rel="noopener noreferrer">'),o})}function At(r){let e=Dt(r);return e=$t(e),e}async function Ut(r,e){try{const s=await fetch(`https://api.github.com/repos/${r}/${e}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!s.ok){if(s.status===404)return null;throw new Error(`Failed to fetch README: ${s.statusText}`)}const o=await s.text();return At(o)}catch(s){return console.error("Error fetching README:",s),null}}function Vt(r){const e=F.c(3),{message:s}=r,o=s===void 0?"Loading MCP Server details...":s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(xe,{size:48,className:"animate-spin mb-4"}),e[0]=n):n=e[0];let l;return e[1]!==o?(l=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,t.jsx("p",{className:"text-sm text-muted-foreground",children:o})]}),e[1]=o,e[2]=l):l=e[2],l}function Bt(r){const e=F.c(9),{error:s,onBack:o}=r,n=s instanceof Error?s.message:s;let l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(We,{size:48,className:"text-destructive mb-4"}),a=t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading MCP Server"}),e[0]=l,e[1]=a):(l=e[0],a=e[1]);let m;e[2]!==n?(m=t.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:n}),e[2]=n,e[3]=m):m=e[3];let c;e[4]!==o?(c=t.jsx("button",{onClick:o,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back"}),e[4]=o,e[5]=c):c=e[5];let d;return e[6]!==m||e[7]!==c?(d=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[l,a,m,c]}),e[6]=m,e[7]=c,e[8]=d):d=e[8],d}function zt(r){const e=F.c(5),{onBack:s}=r;let o,n,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Pe,{size:48,className:"text-muted-foreground mb-4"}),n=t.jsx("h3",{className:"text-lg font-medium mb-2",children:"MCP Server not found"}),l=t.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:"The MCP Server you're looking for doesn't exist in this store."}),e[0]=o,e[1]=n,e[2]=l):(o=e[0],n=e[1],l=e[2]);let a;return e[3]!==s?(a=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[o,n,l,t.jsx("button",{onClick:s,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back to Store"})]}),e[3]=s,e[4]=a):a=e[4],a}function Ft(r){const e=F.c(11),{breadcrumb:s,shareUrl:o}=r,[n,l]=Y.useState(!1);let a;e[0]!==o?(a=async()=>{o&&(await navigator.clipboard.writeText(o),l(!0),fe.success("Share link copied to clipboard"),setTimeout(()=>l(!1),2e3))},e[0]=o,e[1]=a):a=e[1];const m=a;let c;e[2]!==s?(c=t.jsx(ue.Header.Left,{children:s}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==n||e[5]!==m||e[6]!==o?(d=o&&t.jsx(ue.Header.Right,{children:t.jsx(Ye,{children:t.jsxs(Je,{children:[t.jsx(Xe,{asChild:!0,children:t.jsxs(se,{variant:"outline",size:"sm",onClick:m,className:"gap-1.5 cursor-pointer",children:[n?t.jsx(et,{size:16,className:"text-green-600"}):t.jsx(tt,{size:16}),t.jsx("span",{children:n?"Copied!":"Share"})]})}),t.jsx(Ze,{children:t.jsx("p",{children:"Copy a universal link anyone can use to find this MCP"})})]})})}),e[4]=n,e[5]=m,e[6]=o,e[7]=d):d=e[7];let v;return e[8]!==c||e[9]!==d?(v=t.jsxs(ue.Header,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=v):v=e[10],v}function Ce(r){const e=F.c(28),{versions:s,selectedIndex:o,onSelect:n,isInstalling:l,variant:a,showLabel:m}=r,c=l===void 0?!1:l,d=a===void 0?"default":a,v=m===void 0?!1:m,x=s[o],S=v?"sm":"default",u=d==="default"&&"rounded-l-none px-2 border-l-2 border-l-white/50";let g;e[0]!==u?(g=Fe("shrink-0 cursor-pointer",u),e[0]=u,e[1]=g):g=e[1];let f;e[2]!==x?.server?.version||e[3]!==v?(f=v&&t.jsxs("span",{className:"mr-1",children:["v",x?.server?.version||"unknown"]}),e[2]=x?.server?.version,e[3]=v,e[4]=f):f=e[4];const b=v?14:20;let h;e[5]!==b?(h=t.jsx(rt,{size:b}),e[5]=b,e[6]=h):h=e[6];let p;e[7]!==c||e[8]!==S||e[9]!==g||e[10]!==f||e[11]!==h||e[12]!==d?(p=t.jsx(ot,{asChild:!0,children:t.jsxs(se,{variant:d,disabled:c,size:S,className:g,children:[f,h]})}),e[7]=c,e[8]=S,e[9]=g,e[10]=f,e[11]=h,e[12]=d,e[13]=p):p=e[13];let w;if(e[14]!==c||e[15]!==n||e[16]!==o||e[17]!==s){let T;e[19]!==c||e[20]!==n||e[21]!==o?(T=(_,k)=>{const M=_._meta?.["io.modelcontextprotocol.registry/official"];return t.jsx(nt,{onClick:()=>n(k),disabled:c,className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center justify-between gap-2 w-full",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("div",{className:"font-medium text-sm",children:["v",_.server?.version||"unknown"]}),M?.isLatest&&t.jsx("div",{className:"text-xs text-muted-foreground/50 font-semibold",children:"LATEST"})]}),k===o&&t.jsx(st,{size:16,className:"text-muted-foreground shrink-0"})]})},k)},e[19]=c,e[20]=n,e[21]=o,e[22]=T):T=e[22],w=s.map(T),e[14]=c,e[15]=n,e[16]=o,e[17]=s,e[18]=w}else w=e[18];let j;e[23]!==w?(j=t.jsx(it,{align:"end",className:"w-56 max-h-[300px] overflow-y-auto",children:w}),e[23]=w,e[24]=j):j=e[24];let L;return e[25]!==p||e[26]!==j?(L=t.jsxs(lt,{children:[p,j]}),e[25]=p,e[26]=j,e[27]=L):L=e[27],L}function Ht(r){const e=F.c(46),{data:s,itemVersions:o,onInstall:n,canInstall:l,isInstalling:a,hideInstallControls:m,selectedVersionIndex:c,onVersionChange:d}=r,v=l===void 0?!0:l,x=a===void 0?!1:a,S=m===void 0?!1:m,[u,g]=Y.useState(0),f=c??u;let b;e[0]!==d?(b=$=>{g($),d?.($)},e[0]=d,e[1]=b):b=e[1];const h=b,p=o[f]||o[0];let w;e[2]!==p?.server?.remotes?(w=p?.server?.remotes??[],e[2]=p?.server?.remotes,e[3]=w):w=e[3];const j=w;let L;e[4]!==p?.server?.packages?(L=p?.server?.packages??[],e[4]=p?.server?.packages,e[5]=L):L=e[5];const _=L.length>0,k=j.length>0,M=j.findIndex(Gt),y=M>=0?M:0;let J;e[6]!==y||e[7]!==_||e[8]!==k||e[9]!==n||e[10]!==f?(J=()=>{k?n(f,y,void 0):_&&n(f,void 0,0)},e[6]=y,e[7]=_,e[8]=k,e[9]=n,e[10]=f,e[11]=J):J=e[11];const N=J;let R;e[12]!==o||e[13]!==n||e[14]!==h?(R=$=>{h($);const O=o[$],W=O?.server?.remotes??[],q=O?.server?.packages??[];if(W.length>0){const oe=W.findIndex(Ot);n($,oe>=0?oe:0,void 0)}else q.length>0&&n($,void 0,0)},e[12]=o,e[13]=n,e[14]=h,e[15]=R):R=e[15];const V=R;let B;e[16]!==s.icon||e[17]!==s.name?(B=t.jsx(Te,{icon:s.icon,name:s.name,size:"lg",className:"shrink-0 shadow-sm"}),e[16]=s.icon,e[17]=s.name,e[18]=B):B=e[18];let K;e[19]!==s.name?(K=t.jsx("h1",{className:"text-3xl font-medium",children:s.name}),e[19]=s.name,e[20]=K):K=e[20];let H;e[21]!==s.verified?(H=s.verified&&t.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[21]=s.verified,e[22]=H):H=e[22];let I;e[23]!==K||e[24]!==H?(I=t.jsxs("div",{className:"flex items-center gap-2",children:[K,H]}),e[23]=K,e[24]=H,e[25]=I):I=e[25];let C;e[26]!==s.shortDescription?(C=s.shortDescription&&t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.shortDescription}),e[26]=s.shortDescription,e[27]=C):C=e[27];let U;e[28]!==I||e[29]!==C?(U=t.jsxs("div",{className:"flex-1 min-w-0",children:[I,C]}),e[28]=I,e[29]=C,e[30]=U):U=e[30];let E;e[31]!==v||e[32]!==N||e[33]!==V||e[34]!==S||e[35]!==x||e[36]!==o||e[37]!==f||e[38]!==h?(E=v&&!S?t.jsx("div",{className:"shrink-0 flex items-center gap-2",children:o.length>1?t.jsxs("div",{className:"flex",children:[t.jsxs(se,{variant:"default",size:"sm",onClick:N,disabled:x,className:"shrink-0 rounded-r-none cursor-pointer",children:[t.jsx(be,{size:20}),x?"Connecting...":"Connect"]}),t.jsx(Ce,{versions:o,selectedIndex:f,onSelect:V,isInstalling:x,variant:"outline"})]}):t.jsxs(se,{variant:"default",size:"sm",onClick:N,disabled:o.length===0||x,className:"shrink-0 cursor-pointer",children:[t.jsx(be,{size:20}),x?"Connecting...":"Connect"]})}):S?o.length>1?t.jsx("div",{className:"shrink-0",children:t.jsx(Ce,{versions:o,selectedIndex:f,onSelect:h,isInstalling:x,variant:"outline",showLabel:!0})}):null:t.jsx("div",{className:"shrink-0 px-4 py-2 text-sm text-muted-foreground bg-muted rounded-lg",children:"Cannot be connected"}),e[31]=v,e[32]=N,e[33]=V,e[34]=S,e[35]=x,e[36]=o,e[37]=f,e[38]=h,e[39]=E):E=e[39];let D;e[40]!==U||e[41]!==E?(D=t.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[U,E]}),e[40]=U,e[41]=E,e[42]=D):D=e[42];let z;return e[43]!==D||e[44]!==B?(z=t.jsxs("div",{className:"flex items-center gap-4 py-8 px-5 border-b border-border",children:[B,D]}),e[43]=D,e[44]=B,e[45]=z):z=e[45],z}function Ot(r){return r.type?.toLowerCase()==="http"||r.type?.toLowerCase()==="streamable-http"}function Gt(r){return r.type?.toLowerCase()==="http"||r.type?.toLowerCase()==="streamable-http"}function qt(r){if(!r)return"—";try{const e=new Date(r);return isNaN(e.getTime())?"—":e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function Kt(r){const e=F.c(47),{data:s,publisherInfo:o,selectedItem:n}=r;let l;e[0]!==s.description?(l=s.description&&t.jsxs("div",{className:"px-5 pb-5 border-b border-border",children:[t.jsx("h2",{className:"text-base font-medium mb-3",children:"Overview"}),t.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s.description})]}),e[0]=s.description,e[1]=l):l=e[1];const a=s.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":s.publisher;let m;e[2]!==o.logo||e[3]!==a?(m=t.jsx(Te,{icon:o.logo,name:a,size:"sm",className:"shrink-0 shadow-sm"}),e[2]=o.logo,e[3]=a,e[4]=m):m=e[4];let c;e[5]!==s.publisher?(c=s.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":s.publisher.charAt(0).toUpperCase()+s.publisher.slice(1),e[5]=s.publisher,e[6]=c):c=e[6];let d;e[7]!==c?(d=t.jsx("div",{className:"font-medium",children:c}),e[7]=c,e[8]=d):d=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"text-xs text-muted-foreground",children:"Publisher"}),e[9]=v):v=e[9];let x;e[10]!==d?(x=t.jsxs("div",{children:[d,v]}),e[10]=d,e[11]=x):x=e[11];let S;e[12]!==m||e[13]!==x?(S=t.jsx("div",{className:"px-5 border-b border-border",children:t.jsxs("div",{className:"flex items-center gap-3 py-5",children:[m,x]})}),e[12]=m,e[13]=x,e[14]=S):S=e[14];let u;e[15]!==s.version?(u=s.version&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Version"}),t.jsxs("span",{className:"text-muted-foreground uppercase text-xs",children:["v",s.version]})]}),e[15]=s.version,e[16]=u):u=e[16];let g;e[17]!==s.tags?(g=s.tags&&s.tags.length>0&&t.jsxs("div",{className:"flex justify-between items-start text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Tags"}),t.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:s.tags.map(Qt)})]}),e[17]=s.tags,e[18]=g):g=e[18];let f;e[19]!==s.categories?(f=s.categories&&s.categories.length>0&&t.jsxs("div",{className:"flex justify-between items-start text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Categories"}),t.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:s.categories.map(Wt)})]}),e[19]=s.categories,e[20]=f):f=e[20];let b;e[21]!==s.connectionType?(b=s.connectionType&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Connection Type"}),t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:s.connectionType})]}),e[21]=s.connectionType,e[22]=b):b=e[22];let h;e[23]!==s.schemaVersion?(h=s.schemaVersion&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Schema Version"}),t.jsx("span",{className:"text-muted-foreground text-xs",children:s.schemaVersion})]}),e[23]=s.schemaVersion,e[24]=h):h=e[24];let p;e[25]!==s.websiteUrl?(p=s.websiteUrl&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Website"}),t.jsxs("a",{href:s.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[t.jsx("span",{children:"Visit"}),t.jsx(ye,{size:14})]})]}),e[25]=s.websiteUrl,e[26]=p):p=e[26];let w;e[27]!==s.repository?(w=s.repository?.url&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Source"}),t.jsxs("a",{href:s.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[t.jsx("span",{children:"GitHub"}),t.jsx(ye,{size:14})]})]}),e[27]=s.repository,e[28]=w):w=e[28];let j;e[29]!==g||e[30]!==f||e[31]!==b||e[32]!==h||e[33]!==p||e[34]!==w||e[35]!==u?(j=t.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[u,g,f,b,h,p,w]}),e[29]=g,e[30]=f,e[31]=b,e[32]=h,e[33]=p,e[34]=w,e[35]=u,e[36]=j):j=e[36];let L;e[37]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[37]=L):L=e[37];let T;e[38]!==n.updated_at?(T=qt(n.updated_at),e[38]=n.updated_at,e[39]=T):T=e[39];let _;e[40]!==T?(_=t.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[L,t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:T})]}),e[40]=T,e[41]=_):_=e[41];let k;return e[42]!==l||e[43]!==j||e[44]!==_||e[45]!==S?(k=t.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[l,S,j,_]}),e[42]=l,e[43]=j,e[44]=_,e[45]=S,e[46]=k):k=e[46],k}function Wt(r){return t.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:r},r)}function Qt(r){return t.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:r},r)}function Se(r){const e=F.c(18),{repository:s,html:o,isLoading:n,queryKey:l}=r;let a,m,c,d;e[0]!==o||e[1]!==l||e[2]!==s?(a=s?Le(s):null,m=!!a&&o===void 0,d=ae,c=l??le.githubReadme(a?.owner,a?.repo),e[0]=o,e[1]=l,e[2]=s,e[3]=a,e[4]=m,e[5]=c,e[6]=d):(a=e[3],m=e[4],c=e[5],d=e[6]);let v;e[7]!==a?(v=async()=>a?Ut(a.owner,a.repo):null,e[7]=a,e[8]=v):v=e[8];let x;e[9]!==m||e[10]!==c||e[11]!==v?(x={queryKey:c,queryFn:v,enabled:m,staleTime:36e5,gcTime:864e5},e[9]=m,e[10]=c,e[11]=v,e[12]=x):x=e[12];const{data:S,isLoading:u}=d(x),g=o??S;if(n??(m&&u)){let p;return e[13]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(xe,{size:32,className:"animate-spin text-muted-foreground"})}),e[13]=p):p=e[13],p}if(!g){let p;return e[14]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[t.jsx(ct,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),t.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]}),e[14]=p):p=e[14],p}let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b={backgroundColor:"transparent"},e[15]=b):b=e[15];let h;return e[16]!==g?(h=t.jsx("div",{className:"p-5 markdown-body",style:b,dangerouslySetInnerHTML:{__html:g}}),e[16]=g,e[17]=h):h=e[17],h}const Yt=[{value:"http",label:"HTTP"},{value:"sse",label:"SSE"},{value:"stdio",label:"STDIO"},{value:"all",label:"All"}],Jt={docs:"Documentation",bindings:"Workers Bindings",builds:"Workers Builds",observability:"Observability",radar:"Radar",containers:"Containers",browser:"Browser Rendering",logs:"Logpush",autorag:"AutoRAG",auditlogs:"Audit Logs",graphql:"GraphQL",dex:"DEX Monitoring",casb:"CASB"};function Xt(r){if(!r)return"Local";try{return new URL(r).hostname}catch{return r}}function Zt(r){if(!r)return"local";try{const e=new URL(r).hostname;return e.split(".")[0]||e}catch{return"unknown"}}function es(r){const e=Jt[r.toLowerCase()];return e||r.replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function ts(r){if(!r)return"http";const e=r.toLowerCase();return e==="sse"?"sse":e==="stdio"?"stdio":"http"}function ss(r){return r.map((e,s)=>{const o=ts(e.type),n=Xt(e.url),l=Zt(e.url),a=e.title||e.name||es(l);return{index:s,protocol:o,url:e.url,hostname:n,serviceName:l,displayName:a,name:e.name,title:e.title,description:e.description,_type:e._type,_index:e._index}})}function rs(r){const e=F.c(2),{protocol:s,className:o}=r;let n;return e[0]!==o?(n={http:t.jsx(gt,{className:o}),sse:t.jsx(bt,{className:o}),stdio:t.jsx(jt,{className:o})},e[0]=o,e[1]=n):n=e[1],n[s]}function os(r){const e=F.c(10),{options:s,selected:o,onSelect:n}=r;if(s.length<=1)return null;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("span",{className:"text-sm text-muted-foreground",children:"Protocol:"}),e[0]=l):l=e[0];let a;if(e[1]!==n||e[2]!==s||e[3]!==o){let c;e[5]!==n||e[6]!==o?(c=d=>t.jsxs(se,{variant:o===d.value?"default":"outline",size:"sm",onClick:()=>n(d.value),className:"cursor-pointer",children:[t.jsx(rs,{protocol:d.value==="all"?"http":d.value,className:"w-4 h-4 mr-1"}),d.label]},d.value),e[5]=n,e[6]=o,e[7]=c):c=e[7],a=s.map(c),e[1]=n,e[2]=s,e[3]=o,e[4]=a}else a=e[4];let m;return e[8]!==a?(m=t.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l,t.jsx("div",{className:"flex gap-1",children:a})]}),e[8]=a,e[9]=m):m=e[9],m}function ns(r){const e=F.c(11),{servers:s,onInstall:o,isInstalling:n,icon:l,mcpName:a,showStdio:m}=r,c=n===void 0?!1:n,d=m===void 0?!1:m,v=d?s:s.filter(cs),x=ss(v),S=x.length<13?"all":"http",[u,g]=Y.useState(S);let f;e:{if(u==="all"){f="all";break e}let y;if(e[0]!==u?(y=N=>N.protocol===u,e[0]=u,e[1]=y):y=e[1],x.some(y)){f=u;break e}if(x.length<13){f="all";break e}f=x[0]?.protocol??"http"}const b=f,h=b==="all"?x:x.filter(y=>y.protocol===b),p=new Set(x.map(as));let w=Yt.filter(y=>y.value==="all"||p.has(y.value));d||(w=w.filter(ls));const j=p.size<=1?w.filter(is):w,L="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4";let T;e[2]!==l||e[3]!==c||e[4]!==a||e[5]!==o?(T=y=>t.jsx(vt,{variant:"server",icon:l??null,displayName:y.displayName,description:y.description??null,hostname:y.hostname,protocol:y.protocol,isInstalling:c,onClick:()=>o({type:y.protocol,url:y.url,name:y.name,title:y.title,description:y.description,_type:y._type,_index:y._index})},`${y.hostname}-${y.protocol}-${y.index}`),e[2]=l,e[3]=c,e[4]=a,e[5]=o,e[6]=T):T=e[6];const _=h.map(T);let k;e[7]!==_?(k=t.jsx("div",{className:L,children:_}),e[7]=_,e[8]=k):k=e[8];let M;return e[9]!==h.length?(M=h.length===0&&t.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No servers match the selected filter."}),e[9]=h.length,e[10]=M):M=e[10],t.jsxs("div",{className:"p-5",children:[t.jsx(os,{options:j,selected:b,onSelect:g}),k,M]})}function is(r){return r.value!=="all"}function ls(r){return r.value!=="stdio"}function as(r){return r.protocol}function cs(r){return r.type?.toLowerCase()!=="stdio"}async function _e(r){return(await pe(async()=>{const{default:s}=await import("./purify.es-CovBOfck.js");return{default:s}},[])).default.sanitize(r,{USE_PROFILES:{html:!0},FORBID_TAGS:["style","form"],FORBID_ATTR:["style"]})}function ds(r){const e=F.c(53),{data:s,availableTabs:o,effectiveActiveTabId:n,effectiveTools:l,isLoadingTools:a,onTabChange:m,servers:c,onInstallServer:d,isInstalling:v,mcpIcon:x,mcpName:S,showStdio:u}=r,g=a===void 0?!1:a;let f;e[0]!==c?(f=c===void 0?[]:c,e[0]=c,e[1]=f):f=e[1];const b=f,h=v===void 0?!1:v,p=u===void 0?!1:u;let w;e[2]!==s.readmeMarkdown?(w=s.readmeMarkdown?.trim(),e[2]=s.readmeMarkdown,e[3]=w):w=e[3];const j=!!w;let L;e[4]!==s.readmeUrl?(L=s.readmeUrl?.trim(),e[4]=s.readmeUrl,e[5]=L):L=e[5];const T=!!L;let _;e[6]!==s.readmeMarkdown?(_=le.storeReadmeUrl(`embedded:${s.readmeMarkdown}`),e[6]=s.readmeMarkdown,e[7]=_):_=e[7];let k;e[8]!==s.readmeMarkdown?(k=async()=>{const q=Ne.parse(s.readmeMarkdown??"",{async:!1});return _e(q)},e[8]=s.readmeMarkdown,e[9]=k):k=e[9];let M;e[10]!==j||e[11]!==_||e[12]!==k?(M={queryKey:_,queryFn:k,enabled:j,staleTime:1/0},e[10]=j,e[11]=_,e[12]=k,e[13]=M):M=e[13];const{data:y,isLoading:J}=ae(M);let N;e[14]!==s.readmeUrl?(N=le.storeReadmeUrl(s.readmeUrl),e[14]=s.readmeUrl,e[15]=N):N=e[15];let R;e[16]!==s.readmeUrl?(R=async()=>{if(!s.readmeUrl)return null;const q=await fetch(s.readmeUrl);if(!q.ok)throw new Error(`Failed to fetch README (${q.status})`);const re=await q.text();return _e(Ne.parse(re,{async:!1}))},e[16]=s.readmeUrl,e[17]=R):R=e[17];const V=T&&!j;let B;e[18]!==N||e[19]!==R||e[20]!==V?(B={queryKey:N,queryFn:R,enabled:V,staleTime:36e5,gcTime:864e5},e[18]=N,e[19]=R,e[20]=V,e[21]=B):B=e[21];const{data:K,isLoading:H}=ae(B),I=y??K??null,C=j&&J||!j&&H;let U;e[22]!==l?(U=l.map(ms),e[22]=l,e[23]=U):U=e[23];const E=U;let D;e[24]!==o||e[25]!==n||e[26]!==m?(D=o.length>0&&t.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:t.jsx(ht,{tabs:o,activeTab:n,onTabChange:m})}),e[24]=o,e[25]=n,e[26]=m,e[27]=D):D=e[27];let z;e[28]!==n||e[29]!==h||e[30]!==x||e[31]!==S||e[32]!==d||e[33]!==b||e[34]!==p?(z=n==="servers"&&b.length>0&&t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(ns,{servers:b,onInstall:q=>d?.(q),isInstalling:h,icon:x,mcpName:S,showStdio:p})}),e[28]=n,e[29]=h,e[30]=x,e[31]=S,e[32]=d,e[33]=b,e[34]=p,e[35]=z):z=e[35];let $;e[36]!==n||e[37]!==l.length||e[38]!==g||e[39]!==E?($=n==="tools"&&t.jsx("div",{className:"flex flex-col flex-1",children:g?t.jsxs("div",{className:"flex items-center justify-center p-8",children:[t.jsx(xe,{size:24,className:"animate-spin"}),t.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Loading tools..."})]}):l.length>0?t.jsx(xt,{tools:E,showToolbar:!1,emptyMessage:"This MCP Server doesn't have any tools."}):t.jsx(at,{image:null,title:"No tools available",description:"This MCP Server doesn't have any tools."})}),e[36]=n,e[37]=l.length,e[38]=g,e[39]=E,e[40]=$):$=e[40];let O;e[41]!==I||e[42]!==C||e[43]!==s.repository||e[44]!==n||e[45]!==j||e[46]!==T?(O=n==="readme"&&t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:j||T?t.jsx(Se,{html:I,isLoading:C}):t.jsx(Se,{repository:s?.repository})}),e[41]=I,e[42]=C,e[43]=s.repository,e[44]=n,e[45]=j,e[46]=T,e[47]=O):O=e[47];let W;return e[48]!==D||e[49]!==z||e[50]!==$||e[51]!==O?(W=t.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[D,z,$,O]}),e[48]=D,e[49]=z,e[50]=$,e[51]=O,e[52]=W):W=e[52],W}function ms(r){const e=r;return{name:e.name||"",description:e.description||void 0}}function us(r,e){if(!r||!e)return;const s=e.toLowerCase();return r.find(o=>o.app_name?.toLowerCase()===s||o.app_id?.toLowerCase()===s||o.title.toLowerCase()===s)||r.find(o=>o.title.toLowerCase().includes(s))}function fs(r,e,s,o,n){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:o?.icon||void 0,count:n??r.length};const l=e.toLowerCase(),a=r.filter(c=>(c._meta?.["io.modelcontextprotocol.registry/official"]?"io.modelcontextprotocol.registry/official":c.publisher||c._meta?.["mcp.mesh"]?.scopeName||"Unknown").toLowerCase()===l);return{logo:s?.icon||a[0]?.publisher_logo||a[0]?.icon||void 0,count:a.length}}function ps(r){const e=r._meta?.["mcp.mesh"],s=r._meta?.["io.modelcontextprotocol.registry/official"],o=r.server??{},n=ut(o?.remotes?.[0]?.type),l=ft(o?.$schema),a=r.id?.includes("/")?r.id.split("/")[0]:void 0,m=s?"io.modelcontextprotocol.registry/official":r.publisher||e?.scopeName||a||"Unknown",c=pt(o.repository),d=r.icon||r.image||r.logo||o.icons?.[0]?.src||c||null,v=r.name||r.title||r.server?.title||"Unnamed Item",x=yt(v),S=e?.friendly_name||x,u=e?.mesh_description||r.description||r.summary||o?.description||"",g=e?.short_description||null,f=typeof e?.readme=="string"?e.readme:null,b=typeof e?.readme_url=="string"?e.readme_url:null,h=e?.tags||[],p=e?.categories||[];return{name:S,description:u,shortDescription:g,readmeMarkdown:f,readmeUrl:b,icon:d,verified:r.verified||e?.verified,publisher:m,version:o.version||null,websiteUrl:o.websiteUrl||null,repository:o.repository||null,schemaVersion:l??null,connectionType:n,connectionUrl:o?.remotes?.[0]?.url||null,remoteUrl:o?.remotes?.[0]?.url||null,tags:h,categories:p,tools:r.tools||o.tools||e?.tools||[],models:r.models||o.models||e?.models||[],emails:r.emails||o.emails||e?.emails||[],analytics:r.analytics||o.analytics||e?.analytics,cdn:r.cdn||o.cdn||e?.cdn}}class xs extends Y.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,s){console.error("Store MCP server detail error:",e,s)}render(){return this.state.hasError?t.jsx(Bt,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function hs(){const{org:r}=ke(),e=Ie(),{appName:s}=He({strict:!1}),{registryId:o,serverName:n,stdio:l}=Oe({strict:!1}),[a,m]=Qe(Ge.storeShowStdio(),()=>!1),c=l==="true"?!0:l==="false"?!1:a;l!==void 0&&l==="true"!==a&&m(l==="true");const[d,v]=Y.useState(null),[x,S]=Y.useState(null),[u,g]=Y.useState(null),f=kt(),b=It(),{data:h}=qe.useSession(),p=dt(b),w=o||p[0]?.id||"",j=Tt(w),L=mt(j?.tools),T=je(j?.tools??null,"_VERSIONS"),_=je(j?.tools??null,"_GET"),k=!!n;let M="",y={};k?(M=T||_,y={name:n}):(M=L,y={});const J=Lt({connectionId:w||null,orgId:r.id}),{data:N}=Pt({client:J,toolName:M,toolArguments:y,select:i=>i.structuredContent??i});let R=[],V=[],B=null;if(N){if(Array.isArray(N))R=N;else if(typeof N=="object"&&N!==null)if("totalCount"in N&&typeof N.totalCount=="number"&&(B=N.totalCount),"item"in N&&N.item){const i=N.item;R=[{id:i.id||"",title:i.title,server:i.server,_meta:i._meta}]}else{let i;"versions"in N&&Array.isArray(N.versions)?i="versions":"servers"in N&&Array.isArray(N.servers)?i="servers":i=Object.keys(N).find(P=>Array.isArray(N[P])),i&&(R=N[i],(i==="versions"||M?.includes("VERSIONS"))&&(V=R))}}const K=(()=>{const i=V.findIndex(P=>P._meta?.["io.modelcontextprotocol.registry/official"]?.isLatest===!0);return i>=0?i:0})(),H=x??K;let I=R.find(i=>{const P=i.name||i.title||i.server?.title||"";return Rt(P)===s});!I&&n&&(I=R.find(i=>i.id===n||i.server?.name===n||i.name===n||i.title===n));const C=I?ps(I):null,U=(C?.tools?.length||0)>0,E=I?.server?.remotes?.[0]?.url||null,D=!U&&!!E,z=ae({queryKey:le.remoteMcpTools(E),queryFn:async()=>{if(!E)return[];const{Client:i}=await pe(async()=>{const{Client:X}=await import("./index-B_DxRVw1.js").then(A=>A.cW);return{Client:X}},__vite__mapDeps([0,1])),{StreamableHTTPClientTransport:P}=await pe(async()=>{const{StreamableHTTPClientTransport:X}=await import("./index-BlBXXIdz.js");return{StreamableHTTPClientTransport:X}},__vite__mapDeps([2,0,1,3,4,5,6,7,8,9,10,11,12,13])),G=new i({name:"mesh-store",version:"1.0.0"}),Q=new P(new URL(E),{requestInit:{headers:{Accept:"application/json, text/event-stream","Content-Type":"application/json"}}});try{return await G.connect(Q),((await G.listTools()).tools||[]).map(A=>({name:A.name,description:A.description}))}finally{await G.close().catch(console.error)}},enabled:D}),$=D&&z.isLoading,O=z.data??[],W=U?C?.tools||[]:O,q=us(b,C?.publisher),re=C?fs(R,C.publisher,q,j??null,B):{count:0},oe=C?.repository?Le(C.repository):null,Me=I?.server?.remotes??[],Re=I?.server?.packages??[],ce=[...Me.map((i,P)=>({...i,_type:"remote",_index:P})),...Re.map((i,P)=>({type:"stdio",url:void 0,name:i.name||i.identifier,title:i.name||i.identifier?.replace(/^@[^/]+\//,""),description:i.environmentVariables?.length?`Requires ${i.environmentVariables.length} environment variable(s)`:void 0,_type:"package",_index:P}))],he=c?ce:ce.filter(i=>i.type?.toLowerCase()!=="stdio"),ge=he.length>1,Z=[{id:"servers",label:"Servers",count:he.length,visible:ge},{id:"readme",label:"README",visible:!!C?.readmeMarkdown||!!C?.readmeUrl||!!C?.repository&&!!oe},{id:"tools",label:"Tools",count:W.length,visible:U||O.length>0||!!E}].filter(i=>i.visible),Ee=Z.find(i=>i.id==="servers")?.id||Z.find(i=>i.id==="readme")?.id||Z[0]?.id||"overview",De=d&&Z.find(i=>i.id===d)?d:Ee,de=async(i,P,G,Q)=>{const X=V[i??0]||I;if(!X||!r||!h?.user?.id)return;const A=Mt(X,r.id,h.user.id,{remoteIndex:G===void 0?P??0:void 0,packageIndex:G}),ee=A.connection_type==="STDIO",ne=!!A.connection_url,ze=ee&&A.connection_headers&&typeof A.connection_headers=="object"&&"command"in A.connection_headers;if(!ne&&!ze){fe.error("This MCP Server cannot be connected: no connection method available");return}Q&&(A.title=Q);try{const{id:te}=await f.create.mutateAsync(A);e({to:"/$org/$project/mcps/$connectionId",params:{org:r.slug,project:ie,connectionId:te}})}catch(te){fe.error(`Failed to connect MCP Server: ${te instanceof Error?te.message:String(te)}`)}},me=async(i,P,G)=>{const Q=V[i??0]||I;if(!Q)return;const X=Q.id??Q.title,A=b.filter(ee=>ee.app_name===X||ee.title===Q.title);if(A.length>0){const ne=`${Q.title||"MCP Server"} (${A.length+1})`;g({step:"warning",existing:A,pendingArgs:[i,P,G],suggestedName:ne,customName:ne});return}de(i,P,G)},$e=()=>{e({to:"/$org/$project/store",params:{org:r.slug,project:ie}})};if(!I)return t.jsx(zt,{onBack:$e});if(!C)return null;const Ae=(I?.server?.remotes?.length??0)>0,Ue=(I?.server?.packages?.length??0)>0,ve=Ae||Ue,Ve=t.jsx(Nt,{children:t.jsxs(wt,{children:[t.jsx(we,{children:t.jsx(Ct,{asChild:!0,children:t.jsx(Ke,{to:"/$org/$project/store",params:{org:r.slug,project:ie},children:"Store"})})}),t.jsx(St,{}),t.jsx(we,{children:t.jsx(_t,{children:C.name})})]})}),Be=(()=>{const i=new URL(`/store/${encodeURIComponent(s||"")}`,window.location.origin);return n&&i.searchParams.set("serverName",n),i.href})();return t.jsxs("div",{className:"flex flex-col h-full border-l border-border",children:[u&&t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:()=>g(null),children:t.jsx("div",{className:"bg-background border rounded-lg shadow-lg p-6 max-w-md w-full mx-4",onClick:i=>i.stopPropagation(),children:u.step==="warning"?t.jsxs(t.Fragment,{children:[t.jsx("h3",{className:"text-lg font-semibold mb-2",children:"MCP Already Installed"}),t.jsxs("p",{className:"text-sm text-muted-foreground mb-3",children:["You already have"," ",t.jsx("strong",{children:u.existing.length})," instance",u.existing.length!==1?"s":""," of this MCP installed:"]}),t.jsx("ul",{className:"text-sm space-y-1 mb-4 max-h-32 overflow-auto",children:u.existing.map(i=>t.jsxs("li",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("span",{className:"font-medium text-foreground",children:i.title}),t.jsxs("span",{className:"text-xs",children:["(",i.created_at?new Date(i.created_at).toLocaleDateString():"—",")"]})]},i.id))}),t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-md border hover:bg-muted/50 transition-colors",onClick:()=>g(null),children:"Cancel"}),t.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",onClick:()=>g({...u,step:"rename"}),children:"Install Anyway"})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Choose a name"}),t.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Give this instance a different name to distinguish it, or keep the suggested one."}),t.jsx("input",{type:"text",className:"w-full rounded-md border bg-transparent px-3 py-2 text-sm mb-4 focus:outline-none focus:ring-2 focus:ring-primary",value:u.customName,onChange:i=>g({...u,customName:i.target.value}),onKeyDown:i=>{if(i.key==="Enter"){const P=u.customName.trim()||u.suggestedName,G=u.pendingArgs;g(null),de(...G,P)}},autoFocus:!0}),t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-md border hover:bg-muted/50 transition-colors",onClick:()=>g({...u,step:"warning"}),children:"Back"}),t.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",onClick:()=>{const i=u.customName.trim()||u.suggestedName,P=u.pendingArgs;g(null),de(...P,i)},children:"Install"})]})]})})}),t.jsx(Ft,{breadcrumb:Ve,shareUrl:Be}),t.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.jsx("div",{className:"h-full",children:t.jsxs("div",{className:"h-full",children:[!ve&&t.jsxs("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-900",children:[t.jsx(Et,{size:16,className:"inline mr-2"}),"This MCP Server cannot be connected - no connection method available."]}),t.jsx(Ht,{data:C,itemVersions:V.length>0?V:[I],onInstall:me,canInstall:ve,isInstalling:f.create.isPending,hideInstallControls:ge,selectedVersionIndex:H,onVersionChange:S}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 min-h-[677px]",children:[t.jsx(Kt,{data:C,publisherInfo:re,selectedItem:I}),t.jsx(ds,{data:C,availableTabs:Z,effectiveActiveTabId:De,effectiveTools:W,isLoadingTools:$,onTabChange:v,servers:ce,onInstallServer:i=>{i._type==="remote"?me(H,i._index,void 0):me(H,void 0,i._index)},isInstalling:f.create.isPending,mcpIcon:C.icon,mcpName:C.name,showStdio:c})]})]})})})]})}function br(){const r=F.c(6),{org:e}=ke(),s=Ie();let o;r[0]!==s||r[1]!==e.slug?(o=()=>{s({to:"/$org/$project/store",params:{org:e.slug,project:ie}})},r[0]=s,r[1]=e.slug,r[2]=o):o=r[2];const n=o;let l;r[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Y.Suspense,{fallback:t.jsx(Vt,{}),children:t.jsx(hs,{})}),r[3]=l):l=r[3];let a;return r[4]!==n?(a=t.jsx(xs,{onBack:n,children:l}),r[4]=n,r[5]=a):a=r[5],a}export{br as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-OyLnxARk.js","assets/index-Dzbrw6kA.css","assets/index-Dk4FCobs.js","assets/use-collections-DXLoMYCx.js","assets/useMutation-B_6d8oLI.js","assets/constants-CLw0F8Mm.js","assets/use-connection-B7ll8uNa.js","assets/use-mcp-tools-S01H2JtZ.js","assets/useQuery-Brtj4EoG.js","assets/use-mcp-resources-CFTlLllB.js","assets/use-mcp-prompts-DyPVjaKa.js","assets/use-virtual-mcp-B8SbBr9v.js","assets/decopilot-events-Brt4gAR6.js","assets/usage-BW6ztpN6.js"])))=>i.map(i=>d[i]);
2
+ import{r as Y,c as F,j as t,B as se,v as fe,y as Fe,K as le,bT as pe,u as ke,e as Ie,O as ie,g as He,d as Oe,aw as Ge,f as qe,J as Ke}from"./index-OyLnxARk.js";import{i as We}from"./AlertCircle-BWr4XQe9.js";import{i as xe}from"./Loading01-BYjTtpy0.js";import{P as ue,a as Qe}from"./index-DKWOGpkx.js";import{c as Ye,T as Je,a as Xe,b as Ze}from"./tooltip--UA5heKX.js";import{i as et}from"./Check-DAFdA2oM.js";import{a as tt}from"./Copy01-D7uh0hW0.js";import{I as Te}from"./integration-icon-B3aufi6R.js";import{i as st}from"./CheckCircle-BL2mIAJn.js";import{t as rt}from"./ChevronDown-C-3qjfHK.js";import{s as be}from"./Plus-1vH_gFoY.js";import{a as ot,c as nt,b as it,D as lt}from"./dropdown-menu-EcTFyr4x.js";import{n as ye}from"./LinkExternal01-Div7VvWd.js";import{E as at}from"./empty-state-gZUVmgL7.js";import{u as ae}from"./useQuery-Brtj4EoG.js";import{i as ct}from"./File06-DbRSeish.js";import{j as Le,u as dt,f as mt,k as je,b as ut,l as ft,g as pt}from"./registry-utils-D0qx2c0_.js";import{m as Ne}from"./marked.esm-BaswSlok.js";import{a as xt}from"./tools-list-GuN2kaNF.js";import{C as ht}from"./collection-tabs-fsXO7rse.js";import{s as gt}from"./Globe02-CDBspixd.js";import{a as vt,b as bt,e as yt}from"./mcp-server-card-mO0UAT9W.js";import{i as jt}from"./Terminal-CvfSVl9m.js";import{B as Nt,a as wt,b as we,d as Ct,e as St,c as _t}from"./breadcrumb-CcE89MsN.js";import{a as kt,b as It,u as Tt}from"./use-connection-B7ll8uNa.js";import{u as Lt}from"./constants-CLw0F8Mm.js";import{u as Pt}from"./use-mcp-tools-S01H2JtZ.js";import{e as Mt}from"./extract-connection-data-DEaEvOm7.js";import{s as Rt}from"./slugify-CEUa2lfQ.js";import{i as Et}from"./InfoCircle-tftxVx0C.js";import"./useMutation-B_6d8oLI.js";import"./index-CRi6734Z.js";import"./Container-CQmXt7Nc.js";import"./ChevronRight-B3gSyJmK.js";import"./binder-B2xnCBeC.js";import"./collection-display-button-BJQ_VSFQ.js";import"./ArrowDown-BPMtK04S.js";import"./ArrowUp-DqOjcDuh.js";import"./Grid01-COkHqk9k.js";import"./List-_Z2X7aPf.js";import"./badge-BTw8dF6C.js";import"./collection-search-D6ILFEtf.js";import"./SearchMd-Dn4cWwEm.js";import"./input-B4YrZuiK.js";import"./collection-table-wrapper-D0JGm79B.js";import"./table-DHN8Pbh9.js";import"./card-B6XTMOTf.js";import"./types-DoomhLgW.js";import"./Eye-MRRTHIte.js";import"./LayersTwo01-DdRcHsrK.js";import"./layout-DwPAPIK-.js";import"./CheckVerified02-YYsvmiw4.js";import"./Lock01-j13GCiRT.js";import"./use-collections-DXLoMYCx.js";import"./constants-D3bMpbG0.js";import"./generate-id-Dyweu44Y.js";const Pe=({size:r=24,color:e="currentColor",...s})=>Y.createElement("svg",{viewBox:"0 0 24 24",width:r,height:r,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},Y.createElement("path",{d:"m21 21-3.5-3.5m2.5-6a8.5 8.5 0 1 1-17 0 8.5 8.5 0 0 1 17 0Z"}));Pe.displayName="SearchLg";function Dt(r){return r.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function $t(r){return r.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,s)=>{let o=e;return s.includes("target=")?o=o.replace(/target="[^"]*"/gi,'target="_blank"'):o=o.replace(/>/,' target="_blank">'),s.includes("rel=")?o=o.replace(/rel="[^"]*"/gi,'rel="noopener noreferrer"'):o=o.replace(/>/,' rel="noopener noreferrer">'),o})}function At(r){let e=Dt(r);return e=$t(e),e}async function Ut(r,e){try{const s=await fetch(`https://api.github.com/repos/${r}/${e}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!s.ok){if(s.status===404)return null;throw new Error(`Failed to fetch README: ${s.statusText}`)}const o=await s.text();return At(o)}catch(s){return console.error("Error fetching README:",s),null}}function Vt(r){const e=F.c(3),{message:s}=r,o=s===void 0?"Loading MCP Server details...":s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(xe,{size:48,className:"animate-spin mb-4"}),e[0]=n):n=e[0];let l;return e[1]!==o?(l=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,t.jsx("p",{className:"text-sm text-muted-foreground",children:o})]}),e[1]=o,e[2]=l):l=e[2],l}function Bt(r){const e=F.c(9),{error:s,onBack:o}=r,n=s instanceof Error?s.message:s;let l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(We,{size:48,className:"text-destructive mb-4"}),a=t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading MCP Server"}),e[0]=l,e[1]=a):(l=e[0],a=e[1]);let m;e[2]!==n?(m=t.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:n}),e[2]=n,e[3]=m):m=e[3];let c;e[4]!==o?(c=t.jsx("button",{onClick:o,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back"}),e[4]=o,e[5]=c):c=e[5];let d;return e[6]!==m||e[7]!==c?(d=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[l,a,m,c]}),e[6]=m,e[7]=c,e[8]=d):d=e[8],d}function zt(r){const e=F.c(5),{onBack:s}=r;let o,n,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Pe,{size:48,className:"text-muted-foreground mb-4"}),n=t.jsx("h3",{className:"text-lg font-medium mb-2",children:"MCP Server not found"}),l=t.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:"The MCP Server you're looking for doesn't exist in this store."}),e[0]=o,e[1]=n,e[2]=l):(o=e[0],n=e[1],l=e[2]);let a;return e[3]!==s?(a=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[o,n,l,t.jsx("button",{onClick:s,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back to Store"})]}),e[3]=s,e[4]=a):a=e[4],a}function Ft(r){const e=F.c(11),{breadcrumb:s,shareUrl:o}=r,[n,l]=Y.useState(!1);let a;e[0]!==o?(a=async()=>{o&&(await navigator.clipboard.writeText(o),l(!0),fe.success("Share link copied to clipboard"),setTimeout(()=>l(!1),2e3))},e[0]=o,e[1]=a):a=e[1];const m=a;let c;e[2]!==s?(c=t.jsx(ue.Header.Left,{children:s}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==n||e[5]!==m||e[6]!==o?(d=o&&t.jsx(ue.Header.Right,{children:t.jsx(Ye,{children:t.jsxs(Je,{children:[t.jsx(Xe,{asChild:!0,children:t.jsxs(se,{variant:"outline",size:"sm",onClick:m,className:"gap-1.5 cursor-pointer",children:[n?t.jsx(et,{size:16,className:"text-green-600"}):t.jsx(tt,{size:16}),t.jsx("span",{children:n?"Copied!":"Share"})]})}),t.jsx(Ze,{children:t.jsx("p",{children:"Copy a universal link anyone can use to find this MCP"})})]})})}),e[4]=n,e[5]=m,e[6]=o,e[7]=d):d=e[7];let v;return e[8]!==c||e[9]!==d?(v=t.jsxs(ue.Header,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=v):v=e[10],v}function Ce(r){const e=F.c(28),{versions:s,selectedIndex:o,onSelect:n,isInstalling:l,variant:a,showLabel:m}=r,c=l===void 0?!1:l,d=a===void 0?"default":a,v=m===void 0?!1:m,x=s[o],S=v?"sm":"default",u=d==="default"&&"rounded-l-none px-2 border-l-2 border-l-white/50";let g;e[0]!==u?(g=Fe("shrink-0 cursor-pointer",u),e[0]=u,e[1]=g):g=e[1];let f;e[2]!==x?.server?.version||e[3]!==v?(f=v&&t.jsxs("span",{className:"mr-1",children:["v",x?.server?.version||"unknown"]}),e[2]=x?.server?.version,e[3]=v,e[4]=f):f=e[4];const b=v?14:20;let h;e[5]!==b?(h=t.jsx(rt,{size:b}),e[5]=b,e[6]=h):h=e[6];let p;e[7]!==c||e[8]!==S||e[9]!==g||e[10]!==f||e[11]!==h||e[12]!==d?(p=t.jsx(ot,{asChild:!0,children:t.jsxs(se,{variant:d,disabled:c,size:S,className:g,children:[f,h]})}),e[7]=c,e[8]=S,e[9]=g,e[10]=f,e[11]=h,e[12]=d,e[13]=p):p=e[13];let w;if(e[14]!==c||e[15]!==n||e[16]!==o||e[17]!==s){let T;e[19]!==c||e[20]!==n||e[21]!==o?(T=(_,k)=>{const M=_._meta?.["io.modelcontextprotocol.registry/official"];return t.jsx(nt,{onClick:()=>n(k),disabled:c,className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center justify-between gap-2 w-full",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("div",{className:"font-medium text-sm",children:["v",_.server?.version||"unknown"]}),M?.isLatest&&t.jsx("div",{className:"text-xs text-muted-foreground/50 font-semibold",children:"LATEST"})]}),k===o&&t.jsx(st,{size:16,className:"text-muted-foreground shrink-0"})]})},k)},e[19]=c,e[20]=n,e[21]=o,e[22]=T):T=e[22],w=s.map(T),e[14]=c,e[15]=n,e[16]=o,e[17]=s,e[18]=w}else w=e[18];let j;e[23]!==w?(j=t.jsx(it,{align:"end",className:"w-56 max-h-[300px] overflow-y-auto",children:w}),e[23]=w,e[24]=j):j=e[24];let L;return e[25]!==p||e[26]!==j?(L=t.jsxs(lt,{children:[p,j]}),e[25]=p,e[26]=j,e[27]=L):L=e[27],L}function Ht(r){const e=F.c(46),{data:s,itemVersions:o,onInstall:n,canInstall:l,isInstalling:a,hideInstallControls:m,selectedVersionIndex:c,onVersionChange:d}=r,v=l===void 0?!0:l,x=a===void 0?!1:a,S=m===void 0?!1:m,[u,g]=Y.useState(0),f=c??u;let b;e[0]!==d?(b=$=>{g($),d?.($)},e[0]=d,e[1]=b):b=e[1];const h=b,p=o[f]||o[0];let w;e[2]!==p?.server?.remotes?(w=p?.server?.remotes??[],e[2]=p?.server?.remotes,e[3]=w):w=e[3];const j=w;let L;e[4]!==p?.server?.packages?(L=p?.server?.packages??[],e[4]=p?.server?.packages,e[5]=L):L=e[5];const _=L.length>0,k=j.length>0,M=j.findIndex(Gt),y=M>=0?M:0;let J;e[6]!==y||e[7]!==_||e[8]!==k||e[9]!==n||e[10]!==f?(J=()=>{k?n(f,y,void 0):_&&n(f,void 0,0)},e[6]=y,e[7]=_,e[8]=k,e[9]=n,e[10]=f,e[11]=J):J=e[11];const N=J;let R;e[12]!==o||e[13]!==n||e[14]!==h?(R=$=>{h($);const O=o[$],W=O?.server?.remotes??[],q=O?.server?.packages??[];if(W.length>0){const oe=W.findIndex(Ot);n($,oe>=0?oe:0,void 0)}else q.length>0&&n($,void 0,0)},e[12]=o,e[13]=n,e[14]=h,e[15]=R):R=e[15];const V=R;let B;e[16]!==s.icon||e[17]!==s.name?(B=t.jsx(Te,{icon:s.icon,name:s.name,size:"lg",className:"shrink-0 shadow-sm"}),e[16]=s.icon,e[17]=s.name,e[18]=B):B=e[18];let K;e[19]!==s.name?(K=t.jsx("h1",{className:"text-3xl font-medium",children:s.name}),e[19]=s.name,e[20]=K):K=e[20];let H;e[21]!==s.verified?(H=s.verified&&t.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[21]=s.verified,e[22]=H):H=e[22];let I;e[23]!==K||e[24]!==H?(I=t.jsxs("div",{className:"flex items-center gap-2",children:[K,H]}),e[23]=K,e[24]=H,e[25]=I):I=e[25];let C;e[26]!==s.shortDescription?(C=s.shortDescription&&t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.shortDescription}),e[26]=s.shortDescription,e[27]=C):C=e[27];let U;e[28]!==I||e[29]!==C?(U=t.jsxs("div",{className:"flex-1 min-w-0",children:[I,C]}),e[28]=I,e[29]=C,e[30]=U):U=e[30];let E;e[31]!==v||e[32]!==N||e[33]!==V||e[34]!==S||e[35]!==x||e[36]!==o||e[37]!==f||e[38]!==h?(E=v&&!S?t.jsx("div",{className:"shrink-0 flex items-center gap-2",children:o.length>1?t.jsxs("div",{className:"flex",children:[t.jsxs(se,{variant:"default",size:"sm",onClick:N,disabled:x,className:"shrink-0 rounded-r-none cursor-pointer",children:[t.jsx(be,{size:20}),x?"Connecting...":"Connect"]}),t.jsx(Ce,{versions:o,selectedIndex:f,onSelect:V,isInstalling:x,variant:"outline"})]}):t.jsxs(se,{variant:"default",size:"sm",onClick:N,disabled:o.length===0||x,className:"shrink-0 cursor-pointer",children:[t.jsx(be,{size:20}),x?"Connecting...":"Connect"]})}):S?o.length>1?t.jsx("div",{className:"shrink-0",children:t.jsx(Ce,{versions:o,selectedIndex:f,onSelect:h,isInstalling:x,variant:"outline",showLabel:!0})}):null:t.jsx("div",{className:"shrink-0 px-4 py-2 text-sm text-muted-foreground bg-muted rounded-lg",children:"Cannot be connected"}),e[31]=v,e[32]=N,e[33]=V,e[34]=S,e[35]=x,e[36]=o,e[37]=f,e[38]=h,e[39]=E):E=e[39];let D;e[40]!==U||e[41]!==E?(D=t.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[U,E]}),e[40]=U,e[41]=E,e[42]=D):D=e[42];let z;return e[43]!==D||e[44]!==B?(z=t.jsxs("div",{className:"flex items-center gap-4 py-8 px-5 border-b border-border",children:[B,D]}),e[43]=D,e[44]=B,e[45]=z):z=e[45],z}function Ot(r){return r.type?.toLowerCase()==="http"||r.type?.toLowerCase()==="streamable-http"}function Gt(r){return r.type?.toLowerCase()==="http"||r.type?.toLowerCase()==="streamable-http"}function qt(r){if(!r)return"—";try{const e=new Date(r);return isNaN(e.getTime())?"—":e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function Kt(r){const e=F.c(47),{data:s,publisherInfo:o,selectedItem:n}=r;let l;e[0]!==s.description?(l=s.description&&t.jsxs("div",{className:"px-5 pb-5 border-b border-border",children:[t.jsx("h2",{className:"text-base font-medium mb-3",children:"Overview"}),t.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s.description})]}),e[0]=s.description,e[1]=l):l=e[1];const a=s.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":s.publisher;let m;e[2]!==o.logo||e[3]!==a?(m=t.jsx(Te,{icon:o.logo,name:a,size:"sm",className:"shrink-0 shadow-sm"}),e[2]=o.logo,e[3]=a,e[4]=m):m=e[4];let c;e[5]!==s.publisher?(c=s.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":s.publisher.charAt(0).toUpperCase()+s.publisher.slice(1),e[5]=s.publisher,e[6]=c):c=e[6];let d;e[7]!==c?(d=t.jsx("div",{className:"font-medium",children:c}),e[7]=c,e[8]=d):d=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"text-xs text-muted-foreground",children:"Publisher"}),e[9]=v):v=e[9];let x;e[10]!==d?(x=t.jsxs("div",{children:[d,v]}),e[10]=d,e[11]=x):x=e[11];let S;e[12]!==m||e[13]!==x?(S=t.jsx("div",{className:"px-5 border-b border-border",children:t.jsxs("div",{className:"flex items-center gap-3 py-5",children:[m,x]})}),e[12]=m,e[13]=x,e[14]=S):S=e[14];let u;e[15]!==s.version?(u=s.version&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Version"}),t.jsxs("span",{className:"text-muted-foreground uppercase text-xs",children:["v",s.version]})]}),e[15]=s.version,e[16]=u):u=e[16];let g;e[17]!==s.tags?(g=s.tags&&s.tags.length>0&&t.jsxs("div",{className:"flex justify-between items-start text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Tags"}),t.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:s.tags.map(Qt)})]}),e[17]=s.tags,e[18]=g):g=e[18];let f;e[19]!==s.categories?(f=s.categories&&s.categories.length>0&&t.jsxs("div",{className:"flex justify-between items-start text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Categories"}),t.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:s.categories.map(Wt)})]}),e[19]=s.categories,e[20]=f):f=e[20];let b;e[21]!==s.connectionType?(b=s.connectionType&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Connection Type"}),t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:s.connectionType})]}),e[21]=s.connectionType,e[22]=b):b=e[22];let h;e[23]!==s.schemaVersion?(h=s.schemaVersion&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Schema Version"}),t.jsx("span",{className:"text-muted-foreground text-xs",children:s.schemaVersion})]}),e[23]=s.schemaVersion,e[24]=h):h=e[24];let p;e[25]!==s.websiteUrl?(p=s.websiteUrl&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Website"}),t.jsxs("a",{href:s.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[t.jsx("span",{children:"Visit"}),t.jsx(ye,{size:14})]})]}),e[25]=s.websiteUrl,e[26]=p):p=e[26];let w;e[27]!==s.repository?(w=s.repository?.url&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Source"}),t.jsxs("a",{href:s.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[t.jsx("span",{children:"GitHub"}),t.jsx(ye,{size:14})]})]}),e[27]=s.repository,e[28]=w):w=e[28];let j;e[29]!==g||e[30]!==f||e[31]!==b||e[32]!==h||e[33]!==p||e[34]!==w||e[35]!==u?(j=t.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[u,g,f,b,h,p,w]}),e[29]=g,e[30]=f,e[31]=b,e[32]=h,e[33]=p,e[34]=w,e[35]=u,e[36]=j):j=e[36];let L;e[37]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[37]=L):L=e[37];let T;e[38]!==n.updated_at?(T=qt(n.updated_at),e[38]=n.updated_at,e[39]=T):T=e[39];let _;e[40]!==T?(_=t.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[L,t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:T})]}),e[40]=T,e[41]=_):_=e[41];let k;return e[42]!==l||e[43]!==j||e[44]!==_||e[45]!==S?(k=t.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[l,S,j,_]}),e[42]=l,e[43]=j,e[44]=_,e[45]=S,e[46]=k):k=e[46],k}function Wt(r){return t.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:r},r)}function Qt(r){return t.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:r},r)}function Se(r){const e=F.c(18),{repository:s,html:o,isLoading:n,queryKey:l}=r;let a,m,c,d;e[0]!==o||e[1]!==l||e[2]!==s?(a=s?Le(s):null,m=!!a&&o===void 0,d=ae,c=l??le.githubReadme(a?.owner,a?.repo),e[0]=o,e[1]=l,e[2]=s,e[3]=a,e[4]=m,e[5]=c,e[6]=d):(a=e[3],m=e[4],c=e[5],d=e[6]);let v;e[7]!==a?(v=async()=>a?Ut(a.owner,a.repo):null,e[7]=a,e[8]=v):v=e[8];let x;e[9]!==m||e[10]!==c||e[11]!==v?(x={queryKey:c,queryFn:v,enabled:m,staleTime:36e5,gcTime:864e5},e[9]=m,e[10]=c,e[11]=v,e[12]=x):x=e[12];const{data:S,isLoading:u}=d(x),g=o??S;if(n??(m&&u)){let p;return e[13]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(xe,{size:32,className:"animate-spin text-muted-foreground"})}),e[13]=p):p=e[13],p}if(!g){let p;return e[14]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[t.jsx(ct,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),t.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]}),e[14]=p):p=e[14],p}let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b={backgroundColor:"transparent"},e[15]=b):b=e[15];let h;return e[16]!==g?(h=t.jsx("div",{className:"p-5 markdown-body",style:b,dangerouslySetInnerHTML:{__html:g}}),e[16]=g,e[17]=h):h=e[17],h}const Yt=[{value:"http",label:"HTTP"},{value:"sse",label:"SSE"},{value:"stdio",label:"STDIO"},{value:"all",label:"All"}],Jt={docs:"Documentation",bindings:"Workers Bindings",builds:"Workers Builds",observability:"Observability",radar:"Radar",containers:"Containers",browser:"Browser Rendering",logs:"Logpush",autorag:"AutoRAG",auditlogs:"Audit Logs",graphql:"GraphQL",dex:"DEX Monitoring",casb:"CASB"};function Xt(r){if(!r)return"Local";try{return new URL(r).hostname}catch{return r}}function Zt(r){if(!r)return"local";try{const e=new URL(r).hostname;return e.split(".")[0]||e}catch{return"unknown"}}function es(r){const e=Jt[r.toLowerCase()];return e||r.replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function ts(r){if(!r)return"http";const e=r.toLowerCase();return e==="sse"?"sse":e==="stdio"?"stdio":"http"}function ss(r){return r.map((e,s)=>{const o=ts(e.type),n=Xt(e.url),l=Zt(e.url),a=e.title||e.name||es(l);return{index:s,protocol:o,url:e.url,hostname:n,serviceName:l,displayName:a,name:e.name,title:e.title,description:e.description,_type:e._type,_index:e._index}})}function rs(r){const e=F.c(2),{protocol:s,className:o}=r;let n;return e[0]!==o?(n={http:t.jsx(gt,{className:o}),sse:t.jsx(bt,{className:o}),stdio:t.jsx(jt,{className:o})},e[0]=o,e[1]=n):n=e[1],n[s]}function os(r){const e=F.c(10),{options:s,selected:o,onSelect:n}=r;if(s.length<=1)return null;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("span",{className:"text-sm text-muted-foreground",children:"Protocol:"}),e[0]=l):l=e[0];let a;if(e[1]!==n||e[2]!==s||e[3]!==o){let c;e[5]!==n||e[6]!==o?(c=d=>t.jsxs(se,{variant:o===d.value?"default":"outline",size:"sm",onClick:()=>n(d.value),className:"cursor-pointer",children:[t.jsx(rs,{protocol:d.value==="all"?"http":d.value,className:"w-4 h-4 mr-1"}),d.label]},d.value),e[5]=n,e[6]=o,e[7]=c):c=e[7],a=s.map(c),e[1]=n,e[2]=s,e[3]=o,e[4]=a}else a=e[4];let m;return e[8]!==a?(m=t.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l,t.jsx("div",{className:"flex gap-1",children:a})]}),e[8]=a,e[9]=m):m=e[9],m}function ns(r){const e=F.c(11),{servers:s,onInstall:o,isInstalling:n,icon:l,mcpName:a,showStdio:m}=r,c=n===void 0?!1:n,d=m===void 0?!1:m,v=d?s:s.filter(cs),x=ss(v),S=x.length<13?"all":"http",[u,g]=Y.useState(S);let f;e:{if(u==="all"){f="all";break e}let y;if(e[0]!==u?(y=N=>N.protocol===u,e[0]=u,e[1]=y):y=e[1],x.some(y)){f=u;break e}if(x.length<13){f="all";break e}f=x[0]?.protocol??"http"}const b=f,h=b==="all"?x:x.filter(y=>y.protocol===b),p=new Set(x.map(as));let w=Yt.filter(y=>y.value==="all"||p.has(y.value));d||(w=w.filter(ls));const j=p.size<=1?w.filter(is):w,L="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4";let T;e[2]!==l||e[3]!==c||e[4]!==a||e[5]!==o?(T=y=>t.jsx(vt,{variant:"server",icon:l??null,displayName:y.displayName,description:y.description??null,hostname:y.hostname,protocol:y.protocol,isInstalling:c,onClick:()=>o({type:y.protocol,url:y.url,name:y.name,title:y.title,description:y.description,_type:y._type,_index:y._index})},`${y.hostname}-${y.protocol}-${y.index}`),e[2]=l,e[3]=c,e[4]=a,e[5]=o,e[6]=T):T=e[6];const _=h.map(T);let k;e[7]!==_?(k=t.jsx("div",{className:L,children:_}),e[7]=_,e[8]=k):k=e[8];let M;return e[9]!==h.length?(M=h.length===0&&t.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No servers match the selected filter."}),e[9]=h.length,e[10]=M):M=e[10],t.jsxs("div",{className:"p-5",children:[t.jsx(os,{options:j,selected:b,onSelect:g}),k,M]})}function is(r){return r.value!=="all"}function ls(r){return r.value!=="stdio"}function as(r){return r.protocol}function cs(r){return r.type?.toLowerCase()!=="stdio"}async function _e(r){return(await pe(async()=>{const{default:s}=await import("./purify.es-CovBOfck.js");return{default:s}},[])).default.sanitize(r,{USE_PROFILES:{html:!0},FORBID_TAGS:["style","form"],FORBID_ATTR:["style"]})}function ds(r){const e=F.c(53),{data:s,availableTabs:o,effectiveActiveTabId:n,effectiveTools:l,isLoadingTools:a,onTabChange:m,servers:c,onInstallServer:d,isInstalling:v,mcpIcon:x,mcpName:S,showStdio:u}=r,g=a===void 0?!1:a;let f;e[0]!==c?(f=c===void 0?[]:c,e[0]=c,e[1]=f):f=e[1];const b=f,h=v===void 0?!1:v,p=u===void 0?!1:u;let w;e[2]!==s.readmeMarkdown?(w=s.readmeMarkdown?.trim(),e[2]=s.readmeMarkdown,e[3]=w):w=e[3];const j=!!w;let L;e[4]!==s.readmeUrl?(L=s.readmeUrl?.trim(),e[4]=s.readmeUrl,e[5]=L):L=e[5];const T=!!L;let _;e[6]!==s.readmeMarkdown?(_=le.storeReadmeUrl(`embedded:${s.readmeMarkdown}`),e[6]=s.readmeMarkdown,e[7]=_):_=e[7];let k;e[8]!==s.readmeMarkdown?(k=async()=>{const q=Ne.parse(s.readmeMarkdown??"",{async:!1});return _e(q)},e[8]=s.readmeMarkdown,e[9]=k):k=e[9];let M;e[10]!==j||e[11]!==_||e[12]!==k?(M={queryKey:_,queryFn:k,enabled:j,staleTime:1/0},e[10]=j,e[11]=_,e[12]=k,e[13]=M):M=e[13];const{data:y,isLoading:J}=ae(M);let N;e[14]!==s.readmeUrl?(N=le.storeReadmeUrl(s.readmeUrl),e[14]=s.readmeUrl,e[15]=N):N=e[15];let R;e[16]!==s.readmeUrl?(R=async()=>{if(!s.readmeUrl)return null;const q=await fetch(s.readmeUrl);if(!q.ok)throw new Error(`Failed to fetch README (${q.status})`);const re=await q.text();return _e(Ne.parse(re,{async:!1}))},e[16]=s.readmeUrl,e[17]=R):R=e[17];const V=T&&!j;let B;e[18]!==N||e[19]!==R||e[20]!==V?(B={queryKey:N,queryFn:R,enabled:V,staleTime:36e5,gcTime:864e5},e[18]=N,e[19]=R,e[20]=V,e[21]=B):B=e[21];const{data:K,isLoading:H}=ae(B),I=y??K??null,C=j&&J||!j&&H;let U;e[22]!==l?(U=l.map(ms),e[22]=l,e[23]=U):U=e[23];const E=U;let D;e[24]!==o||e[25]!==n||e[26]!==m?(D=o.length>0&&t.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:t.jsx(ht,{tabs:o,activeTab:n,onTabChange:m})}),e[24]=o,e[25]=n,e[26]=m,e[27]=D):D=e[27];let z;e[28]!==n||e[29]!==h||e[30]!==x||e[31]!==S||e[32]!==d||e[33]!==b||e[34]!==p?(z=n==="servers"&&b.length>0&&t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(ns,{servers:b,onInstall:q=>d?.(q),isInstalling:h,icon:x,mcpName:S,showStdio:p})}),e[28]=n,e[29]=h,e[30]=x,e[31]=S,e[32]=d,e[33]=b,e[34]=p,e[35]=z):z=e[35];let $;e[36]!==n||e[37]!==l.length||e[38]!==g||e[39]!==E?($=n==="tools"&&t.jsx("div",{className:"flex flex-col flex-1",children:g?t.jsxs("div",{className:"flex items-center justify-center p-8",children:[t.jsx(xe,{size:24,className:"animate-spin"}),t.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Loading tools..."})]}):l.length>0?t.jsx(xt,{tools:E,showToolbar:!1,emptyMessage:"This MCP Server doesn't have any tools."}):t.jsx(at,{image:null,title:"No tools available",description:"This MCP Server doesn't have any tools."})}),e[36]=n,e[37]=l.length,e[38]=g,e[39]=E,e[40]=$):$=e[40];let O;e[41]!==I||e[42]!==C||e[43]!==s.repository||e[44]!==n||e[45]!==j||e[46]!==T?(O=n==="readme"&&t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:j||T?t.jsx(Se,{html:I,isLoading:C}):t.jsx(Se,{repository:s?.repository})}),e[41]=I,e[42]=C,e[43]=s.repository,e[44]=n,e[45]=j,e[46]=T,e[47]=O):O=e[47];let W;return e[48]!==D||e[49]!==z||e[50]!==$||e[51]!==O?(W=t.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[D,z,$,O]}),e[48]=D,e[49]=z,e[50]=$,e[51]=O,e[52]=W):W=e[52],W}function ms(r){const e=r;return{name:e.name||"",description:e.description||void 0}}function us(r,e){if(!r||!e)return;const s=e.toLowerCase();return r.find(o=>o.app_name?.toLowerCase()===s||o.app_id?.toLowerCase()===s||o.title.toLowerCase()===s)||r.find(o=>o.title.toLowerCase().includes(s))}function fs(r,e,s,o,n){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:o?.icon||void 0,count:n??r.length};const l=e.toLowerCase(),a=r.filter(c=>(c._meta?.["io.modelcontextprotocol.registry/official"]?"io.modelcontextprotocol.registry/official":c.publisher||c._meta?.["mcp.mesh"]?.scopeName||"Unknown").toLowerCase()===l);return{logo:s?.icon||a[0]?.publisher_logo||a[0]?.icon||void 0,count:a.length}}function ps(r){const e=r._meta?.["mcp.mesh"],s=r._meta?.["io.modelcontextprotocol.registry/official"],o=r.server??{},n=ut(o?.remotes?.[0]?.type),l=ft(o?.$schema),a=r.id?.includes("/")?r.id.split("/")[0]:void 0,m=s?"io.modelcontextprotocol.registry/official":r.publisher||e?.scopeName||a||"Unknown",c=pt(o.repository),d=r.icon||r.image||r.logo||o.icons?.[0]?.src||c||null,v=r.name||r.title||r.server?.title||"Unnamed Item",x=yt(v),S=e?.friendly_name||x,u=e?.mesh_description||r.description||r.summary||o?.description||"",g=e?.short_description||null,f=typeof e?.readme=="string"?e.readme:null,b=typeof e?.readme_url=="string"?e.readme_url:null,h=e?.tags||[],p=e?.categories||[];return{name:S,description:u,shortDescription:g,readmeMarkdown:f,readmeUrl:b,icon:d,verified:r.verified||e?.verified,publisher:m,version:o.version||null,websiteUrl:o.websiteUrl||null,repository:o.repository||null,schemaVersion:l??null,connectionType:n,connectionUrl:o?.remotes?.[0]?.url||null,remoteUrl:o?.remotes?.[0]?.url||null,tags:h,categories:p,tools:r.tools||o.tools||e?.tools||[],models:r.models||o.models||e?.models||[],emails:r.emails||o.emails||e?.emails||[],analytics:r.analytics||o.analytics||e?.analytics,cdn:r.cdn||o.cdn||e?.cdn}}class xs extends Y.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,s){console.error("Store MCP server detail error:",e,s)}render(){return this.state.hasError?t.jsx(Bt,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function hs(){const{org:r}=ke(),e=Ie(),{appName:s}=He({strict:!1}),{registryId:o,serverName:n,stdio:l}=Oe({strict:!1}),[a,m]=Qe(Ge.storeShowStdio(),()=>!1),c=l==="true"?!0:l==="false"?!1:a;l!==void 0&&l==="true"!==a&&m(l==="true");const[d,v]=Y.useState(null),[x,S]=Y.useState(null),[u,g]=Y.useState(null),f=kt(),b=It(),{data:h}=qe.useSession(),p=dt(b),w=o||p[0]?.id||"",j=Tt(w),L=mt(j?.tools),T=je(j?.tools??null,"_VERSIONS"),_=je(j?.tools??null,"_GET"),k=!!n;let M="",y={};k?(M=T||_,y={name:n}):(M=L,y={});const J=Lt({connectionId:w||null,orgId:r.id}),{data:N}=Pt({client:J,toolName:M,toolArguments:y,select:i=>i.structuredContent??i});let R=[],V=[],B=null;if(N){if(Array.isArray(N))R=N;else if(typeof N=="object"&&N!==null)if("totalCount"in N&&typeof N.totalCount=="number"&&(B=N.totalCount),"item"in N&&N.item){const i=N.item;R=[{id:i.id||"",title:i.title,server:i.server,_meta:i._meta}]}else{let i;"versions"in N&&Array.isArray(N.versions)?i="versions":"servers"in N&&Array.isArray(N.servers)?i="servers":i=Object.keys(N).find(P=>Array.isArray(N[P])),i&&(R=N[i],(i==="versions"||M?.includes("VERSIONS"))&&(V=R))}}const K=(()=>{const i=V.findIndex(P=>P._meta?.["io.modelcontextprotocol.registry/official"]?.isLatest===!0);return i>=0?i:0})(),H=x??K;let I=R.find(i=>{const P=i.name||i.title||i.server?.title||"";return Rt(P)===s});!I&&n&&(I=R.find(i=>i.id===n||i.server?.name===n||i.name===n||i.title===n));const C=I?ps(I):null,U=(C?.tools?.length||0)>0,E=I?.server?.remotes?.[0]?.url||null,D=!U&&!!E,z=ae({queryKey:le.remoteMcpTools(E),queryFn:async()=>{if(!E)return[];const{Client:i}=await pe(async()=>{const{Client:X}=await import("./index-OyLnxARk.js").then(A=>A.cW);return{Client:X}},__vite__mapDeps([0,1])),{StreamableHTTPClientTransport:P}=await pe(async()=>{const{StreamableHTTPClientTransport:X}=await import("./index-Dk4FCobs.js");return{StreamableHTTPClientTransport:X}},__vite__mapDeps([2,0,1,3,4,5,6,7,8,9,10,11,12,13])),G=new i({name:"mesh-store",version:"1.0.0"}),Q=new P(new URL(E),{requestInit:{headers:{Accept:"application/json, text/event-stream","Content-Type":"application/json"}}});try{return await G.connect(Q),((await G.listTools()).tools||[]).map(A=>({name:A.name,description:A.description}))}finally{await G.close().catch(console.error)}},enabled:D}),$=D&&z.isLoading,O=z.data??[],W=U?C?.tools||[]:O,q=us(b,C?.publisher),re=C?fs(R,C.publisher,q,j??null,B):{count:0},oe=C?.repository?Le(C.repository):null,Me=I?.server?.remotes??[],Re=I?.server?.packages??[],ce=[...Me.map((i,P)=>({...i,_type:"remote",_index:P})),...Re.map((i,P)=>({type:"stdio",url:void 0,name:i.name||i.identifier,title:i.name||i.identifier?.replace(/^@[^/]+\//,""),description:i.environmentVariables?.length?`Requires ${i.environmentVariables.length} environment variable(s)`:void 0,_type:"package",_index:P}))],he=c?ce:ce.filter(i=>i.type?.toLowerCase()!=="stdio"),ge=he.length>1,Z=[{id:"servers",label:"Servers",count:he.length,visible:ge},{id:"readme",label:"README",visible:!!C?.readmeMarkdown||!!C?.readmeUrl||!!C?.repository&&!!oe},{id:"tools",label:"Tools",count:W.length,visible:U||O.length>0||!!E}].filter(i=>i.visible),Ee=Z.find(i=>i.id==="servers")?.id||Z.find(i=>i.id==="readme")?.id||Z[0]?.id||"overview",De=d&&Z.find(i=>i.id===d)?d:Ee,de=async(i,P,G,Q)=>{const X=V[i??0]||I;if(!X||!r||!h?.user?.id)return;const A=Mt(X,r.id,h.user.id,{remoteIndex:G===void 0?P??0:void 0,packageIndex:G}),ee=A.connection_type==="STDIO",ne=!!A.connection_url,ze=ee&&A.connection_headers&&typeof A.connection_headers=="object"&&"command"in A.connection_headers;if(!ne&&!ze){fe.error("This MCP Server cannot be connected: no connection method available");return}Q&&(A.title=Q);try{const{id:te}=await f.create.mutateAsync(A);e({to:"/$org/$project/mcps/$connectionId",params:{org:r.slug,project:ie,connectionId:te}})}catch(te){fe.error(`Failed to connect MCP Server: ${te instanceof Error?te.message:String(te)}`)}},me=async(i,P,G)=>{const Q=V[i??0]||I;if(!Q)return;const X=Q.id??Q.title,A=b.filter(ee=>ee.app_name===X||ee.title===Q.title);if(A.length>0){const ne=`${Q.title||"MCP Server"} (${A.length+1})`;g({step:"warning",existing:A,pendingArgs:[i,P,G],suggestedName:ne,customName:ne});return}de(i,P,G)},$e=()=>{e({to:"/$org/$project/store",params:{org:r.slug,project:ie}})};if(!I)return t.jsx(zt,{onBack:$e});if(!C)return null;const Ae=(I?.server?.remotes?.length??0)>0,Ue=(I?.server?.packages?.length??0)>0,ve=Ae||Ue,Ve=t.jsx(Nt,{children:t.jsxs(wt,{children:[t.jsx(we,{children:t.jsx(Ct,{asChild:!0,children:t.jsx(Ke,{to:"/$org/$project/store",params:{org:r.slug,project:ie},children:"Store"})})}),t.jsx(St,{}),t.jsx(we,{children:t.jsx(_t,{children:C.name})})]})}),Be=(()=>{const i=new URL(`/store/${encodeURIComponent(s||"")}`,window.location.origin);return n&&i.searchParams.set("serverName",n),i.href})();return t.jsxs("div",{className:"flex flex-col h-full border-l border-border",children:[u&&t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:()=>g(null),children:t.jsx("div",{className:"bg-background border rounded-lg shadow-lg p-6 max-w-md w-full mx-4",onClick:i=>i.stopPropagation(),children:u.step==="warning"?t.jsxs(t.Fragment,{children:[t.jsx("h3",{className:"text-lg font-semibold mb-2",children:"MCP Already Installed"}),t.jsxs("p",{className:"text-sm text-muted-foreground mb-3",children:["You already have"," ",t.jsx("strong",{children:u.existing.length})," instance",u.existing.length!==1?"s":""," of this MCP installed:"]}),t.jsx("ul",{className:"text-sm space-y-1 mb-4 max-h-32 overflow-auto",children:u.existing.map(i=>t.jsxs("li",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("span",{className:"font-medium text-foreground",children:i.title}),t.jsxs("span",{className:"text-xs",children:["(",i.created_at?new Date(i.created_at).toLocaleDateString():"—",")"]})]},i.id))}),t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-md border hover:bg-muted/50 transition-colors",onClick:()=>g(null),children:"Cancel"}),t.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",onClick:()=>g({...u,step:"rename"}),children:"Install Anyway"})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Choose a name"}),t.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Give this instance a different name to distinguish it, or keep the suggested one."}),t.jsx("input",{type:"text",className:"w-full rounded-md border bg-transparent px-3 py-2 text-sm mb-4 focus:outline-none focus:ring-2 focus:ring-primary",value:u.customName,onChange:i=>g({...u,customName:i.target.value}),onKeyDown:i=>{if(i.key==="Enter"){const P=u.customName.trim()||u.suggestedName,G=u.pendingArgs;g(null),de(...G,P)}},autoFocus:!0}),t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-md border hover:bg-muted/50 transition-colors",onClick:()=>g({...u,step:"warning"}),children:"Back"}),t.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",onClick:()=>{const i=u.customName.trim()||u.suggestedName,P=u.pendingArgs;g(null),de(...P,i)},children:"Install"})]})]})})}),t.jsx(Ft,{breadcrumb:Ve,shareUrl:Be}),t.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.jsx("div",{className:"h-full",children:t.jsxs("div",{className:"h-full",children:[!ve&&t.jsxs("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-900",children:[t.jsx(Et,{size:16,className:"inline mr-2"}),"This MCP Server cannot be connected - no connection method available."]}),t.jsx(Ht,{data:C,itemVersions:V.length>0?V:[I],onInstall:me,canInstall:ve,isInstalling:f.create.isPending,hideInstallControls:ge,selectedVersionIndex:H,onVersionChange:S}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 min-h-[677px]",children:[t.jsx(Kt,{data:C,publisherInfo:re,selectedItem:I}),t.jsx(ds,{data:C,availableTabs:Z,effectiveActiveTabId:De,effectiveTools:W,isLoadingTools:$,onTabChange:v,servers:ce,onInstallServer:i=>{i._type==="remote"?me(H,i._index,void 0):me(H,void 0,i._index)},isInstalling:f.create.isPending,mcpIcon:C.icon,mcpName:C.name,showStdio:c})]})]})})})]})}function br(){const r=F.c(6),{org:e}=ke(),s=Ie();let o;r[0]!==s||r[1]!==e.slug?(o=()=>{s({to:"/$org/$project/store",params:{org:e.slug,project:ie}})},r[0]=s,r[1]=e.slug,r[2]=o):o=r[2];const n=o;let l;r[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Y.Suspense,{fallback:t.jsx(Vt,{}),children:t.jsx(hs,{})}),r[3]=l):l=r[3];let a;return r[4]!==n?(a=t.jsx(xs,{onBack:n,children:l}),r[4]=n,r[5]=a):a=r[5],a}export{br as default};