decocms 4.99.5 → 4.99.7
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.
- package/dist/client/assets/{AlertCircle-J91Uub-h.js → AlertCircle-DHJMAy0z.js} +1 -1
- package/dist/client/assets/{AreaChart-DGW_057K.js → AreaChart-BP3LRAVY.js} +1 -1
- package/dist/client/assets/{ArrowRight-zq5HcvPy.js → ArrowRight-ZH8AfOrt.js} +1 -1
- package/dist/client/assets/{ArrowUp-CFRuLeGc.js → ArrowUp-BEvOvB39.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DzIyesUw.js → ArrowUpRight-CB2lmsga.js} +1 -1
- package/dist/client/assets/{Check-DjOk0Rkq.js → Check-8S_h-pNf.js} +1 -1
- package/dist/client/assets/{CheckCircle-MGAobGZ1.js → CheckCircle-8lNaIJZX.js} +1 -1
- package/dist/client/assets/{ChevronDown-BjlTvh0G.js → ChevronDown-D19e4E2W.js} +1 -1
- package/dist/client/assets/{ChevronRight-BlnNawqe.js → ChevronRight-DMiFqEFB.js} +1 -1
- package/dist/client/assets/{ChevronUp-CBeaIN1f.js → ChevronUp-CDr-5amA.js} +1 -1
- package/dist/client/assets/{Copy01-Bs6JU_rS.js → Copy01-CVgcePVg.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bn-DgixF.js → DotsVertical-Ddcp5zYy.js} +1 -1
- package/dist/client/assets/{Eye-x9PmMwPD.js → Eye-DjxTeGvc.js} +1 -1
- package/dist/client/assets/{FilterLines-DB1N8tt3.js → FilterLines-sMM8U03Q.js} +1 -1
- package/dist/client/assets/{Globe01-DwSYSUPv.js → Globe01-ByEypwqT.js} +1 -1
- package/dist/client/assets/{Globe04-D8q7ictx.js → Globe04-CLktRX73.js} +1 -1
- package/dist/client/assets/{HardDrive-BiWjqtYm.js → HardDrive-LZLUcrQT.js} +1 -1
- package/dist/client/assets/{Image01-D5Tiku0_.js → Image01-BC4H1plu.js} +1 -1
- package/dist/client/assets/{Key01-CPUmZmyM.js → Key01-BJ5pxmk5.js} +1 -1
- package/dist/client/assets/{LayoutLeft-41ARqh32.js → LayoutLeft-BY0vokwF.js} +1 -1
- package/dist/client/assets/{LinkExternal01-EQdea3eE.js → LinkExternal01-BE6iPh6Z.js} +1 -1
- package/dist/client/assets/{Monitor01-BRhDD-NM.js → Monitor01-D5bQ7ld2.js} +1 -1
- package/dist/client/assets/{Package-wPIBeGdH.js → Package-Dgaviqf5.js} +1 -1
- package/dist/client/assets/{Palette-g63KMu4R.js → Palette-BLetgCYz.js} +1 -1
- package/dist/client/assets/{Play-DhCU58Zq.js → Play-D4uEf4_3.js} +1 -1
- package/dist/client/assets/{Plus-D9_97xSP.js → Plus-B99BOqFt.js} +1 -1
- package/dist/client/assets/{SearchLg-B9lGHCRw.js → SearchLg-0vJ_NGT1.js} +1 -1
- package/dist/client/assets/{SearchMd-DdLJZdaD.js → SearchMd--QTHPVfW.js} +1 -1
- package/dist/client/assets/{Settings02-Dscqhciu.js → Settings02-Dg48gy-m.js} +1 -1
- package/dist/client/assets/{Shield01-DKl0qTL-.js → Shield01-XjAbmrcl.js} +1 -1
- package/dist/client/assets/{Star01-B1FJC3Am.js → Star01-DBzet7vh.js} +1 -1
- package/dist/client/assets/{Stars01-RWgObMJM.js → Stars01-DBeF8eO9.js} +1 -1
- package/dist/client/assets/{Stars02-BsoNwBLM.js → Stars02-DF0mhAvh.js} +1 -1
- package/dist/client/assets/{Sun-C9YcQwfr.js → Sun-DWQi7hi9.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DVNbwjti.js → SwitchHorizontal01-g8c5_DAA.js} +1 -1
- package/dist/client/assets/{Tool01-BAl3vunP.js → Tool01-BsH7bOGE.js} +1 -1
- package/dist/client/assets/{Tool02-DFxQ4jst.js → Tool02-CpEmuwVJ.js} +1 -1
- package/dist/client/assets/{Trash01-O50YwY-1.js → Trash01-sz1B1ubO.js} +1 -1
- package/dist/client/assets/{TrendUp01-VNmE5Tgl.js → TrendUp01-DFaJzXrF.js} +1 -1
- package/dist/client/assets/{Upload01-CfQLoJy4.js → Upload01-DZkj6_Us.js} +1 -1
- package/dist/client/assets/{User01-Dg9bjRZN.js → User01-Cy4n4fwd.js} +1 -1
- package/dist/client/assets/{Users01-CYkL6UM4.js → Users01-CiJE_Dg-.js} +1 -1
- package/dist/client/assets/{Users03-B0NmsIht.js → Users03-Dqh1PO2N.js} +1 -1
- package/dist/client/assets/{X-CjNSNcc_.js → X-BFNxuShY.js} +1 -1
- package/dist/client/assets/{XCircle-7VCYmnt6.js → XCircle-Cv1eNWoM.js} +1 -1
- package/dist/client/assets/{XClose-dMfYUtdK.js → XClose-Ckol2oql.js} +1 -1
- package/dist/client/assets/{Zap-D62dIluk.js → Zap-DTU6QUr-.js} +1 -1
- package/dist/client/assets/{ZapSquare-Drpj68fr.js → ZapSquare-CdnVBk-J.js} +1 -1
- package/dist/client/assets/{ZoomOut-CGN0hYNp.js → ZoomOut-IrGAWsFW.js} +1 -1
- package/dist/client/assets/{access-gate-wAnqH70g.js → access-gate-DAiHI_Ya.js} +1 -1
- package/dist/client/assets/{add-section-modal-BZEroarm.js → add-section-modal-PTtjM0qv.js} +1 -1
- package/dist/client/assets/{agent-icon-CtYPYl8e.js → agent-icon-DJ-fLRqx.js} +1 -1
- package/dist/client/assets/{agents-list-C-sMRTm0.js → agents-list-Ddn36hvr.js} +1 -1
- package/dist/client/assets/{ai-providers-Cp9N95wJ.js → ai-providers-4RQyfXJ9.js} +1 -1
- package/dist/client/assets/{alert-Dvg8aKcv.js → alert-D564TwSW.js} +1 -1
- package/dist/client/assets/{alert-dialog-CqJGfT9S.js → alert-dialog-S-vKrHdP.js} +1 -1
- package/dist/client/assets/{app-editor-DldMJ5vX.js → app-editor-BnYQVlSC.js} +1 -1
- package/dist/client/assets/{auth-8muKPtVE.js → auth-LsRMSxpZ.js} +1 -1
- package/dist/client/assets/{auth-catchall-D-1RECn5.js → auth-catchall-CdzEQEu6.js} +1 -1
- package/dist/client/assets/{auth-entry-CY6lJZZo.js → auth-entry-DcFUSq-U.js} +1 -1
- package/dist/client/assets/{auth-split-layout-hf3Nbp6x.js → auth-split-layout-CTdOwwE2.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BMiVZlf1.js → authenticate-and-persist-oauth-ccpCvQUL.js} +1 -1
- package/dist/client/assets/{automation-list-row-BbxdWFMF.js → automation-list-row-B36cFYnc.js} +1 -1
- package/dist/client/assets/{automation-runs-BLbKrLbu.js → automation-runs-C5OD2vNu.js} +1 -1
- package/dist/client/assets/{automations-BbSreRZJ.js → automations-_IDwlRt9.js} +1 -1
- package/dist/client/assets/{autosend-BUd9WB8h.js → autosend-DwCcNXOp.js} +1 -1
- package/dist/client/assets/{avatar-CS23QZhy.js → avatar-CDCXeyeq.js} +1 -1
- package/dist/client/assets/{badge-T9uXWFRv.js → badge-CLbg8brP.js} +1 -1
- package/dist/client/assets/{block-document-BB_MEYxn.js → block-document-pbbZw2CP.js} +1 -1
- package/dist/client/assets/{brand-context-DBgo1tSF.js → brand-context-CLwWQD4a.js} +1 -1
- package/dist/client/assets/{buckets-aSaKX72w.js → buckets-C6jFjZP6.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BkJrSAoE.js → bulk-category-panel-BJgqFyPw.js} +1 -1
- package/dist/client/assets/{calendar-ks6BD9H-.js → calendar-CIg2EEBJ.js} +2 -2
- package/dist/client/assets/{capability-load-error-CZBjXSsy.js → capability-load-error-Dx6CWw4N.js} +1 -1
- package/dist/client/assets/{card-Bx6QHURH.js → card-CGoHKQKX.js} +1 -1
- package/dist/client/assets/{category-editor-4inNz6pa.js → category-editor-CxVEA7RL.js} +1 -1
- package/dist/client/assets/{chat-context-BXDTFRX2.js → chat-context-BpdINg7c.js} +1 -1
- package/dist/client/assets/{checkbox-CwZjKbuN.js → checkbox-DiEGmfR1.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DjZJeUqq.js → cli-auth-success-BGVZ5nYN.js} +1 -1
- package/dist/client/assets/{collection-detail-CIcSoyso.js → collection-detail-DZbpwovT.js} +1 -1
- package/dist/client/assets/{collection-display-button-Dw9HSlqD.js → collection-display-button-Dn4BN1AT.js} +1 -1
- package/dist/client/assets/{collection-search-yE9i1JpT.js → collection-search-DT4BSCdW.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DYJ3BxFA.js → collection-table-wrapper-CXhf1hUH.js} +1 -1
- package/dist/client/assets/{collection-tabs-lcAbgNE1.js → collection-tabs-CG0FZsKM.js} +1 -1
- package/dist/client/assets/{command-BQsf8lh7.js → command-KNTOL3kj.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-C1YGwd6f.js → commerce-onboarding-BMEY1DKe.js} +1 -1
- package/dist/client/assets/{companions-core-DJL49WEJ.js → companions-core-FTf4qGMY.js} +1 -1
- package/dist/client/assets/{connect-4EE7AjWu.js → connect-BE9doFql.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-Dgmm6p4t.js → connect-desktop-dialog-BoS5Hu9R.js} +1 -1
- package/dist/client/assets/{connection-card-BNONqDF0.js → connection-card-Dbj_E-0a.js} +1 -1
- package/dist/client/assets/connection-detail-V6mFx9e6.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CziK-zQe.js → connection-form-helpers-D0VhJo5T.js} +1 -1
- package/dist/client/assets/{connections-BvKdHoZn.js → connections-fj3C3XzM.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-G44vPfdr.js → decopilot-sse-pool-DlsoDrW9.js} +1 -1
- package/dist/client/assets/{dialog-r8u0MUEv.js → dialog-CwEHiSMU.js} +1 -1
- package/dist/client/assets/{domain-settings-yE9n8NFS.js → domain-settings-lLJfdhn2.js} +1 -1
- package/dist/client/assets/{drawer-amjbQ1uR.js → drawer-NqC3cUty.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dei8Q_a1.js → dropdown-menu-Dui6084c.js} +1 -1
- package/dist/client/assets/{empty-state-C49ydxC4.js → empty-state--30EXuZG.js} +1 -1
- package/dist/client/assets/{extract-connection-data-mhnZKB4s.js → extract-connection-data-5mcb4Mog.js} +1 -1
- package/dist/client/assets/{file-explorer-Dqu_g-z2.js → file-explorer-CgOnjl_S.js} +1 -1
- package/dist/client/assets/{file-type-icon-s1AYVhlx.js → file-type-icon-P_pN9_xH.js} +1 -1
- package/dist/client/assets/{files-Di-EwWTF.js → files-BLAFPbYz.js} +1 -1
- package/dist/client/assets/{form-CN-qLPrG.js → form-5ox058mH.js} +1 -1
- package/dist/client/assets/{general-BFBUA-8Z.js → general-6JhynIjZ.js} +1 -1
- package/dist/client/assets/{github-repo-picker-zaOZVO9r.js → github-repo-picker-BqET8_zQ.js} +1 -1
- package/dist/client/assets/{hooks-nUkCrdoV.js → hooks-Dcj3etNr.js} +1 -1
- package/dist/client/assets/{index-Bno4yz27.js → index-BELfS11E.js} +1 -1
- package/dist/client/assets/{index-DQhABf9k.js → index-BGTjziYz.js} +1 -1
- package/dist/client/assets/{index-DlS-BCyi.js → index-BNV2EeGI.js} +1 -1
- package/dist/client/assets/{index-DkwplL3u.js → index-BaeEjqV7.js} +7 -7
- package/dist/client/assets/index-BbdMwuvN.js +5 -0
- package/dist/client/assets/{index-D2Mh9ro-.js → index-BhPaswkE.js} +26 -26
- package/dist/client/assets/{index-62Y3YKMH.js → index-C5X0kiyr.js} +1 -1
- package/dist/client/assets/{index-BkqJXOXg.js → index-C6ytuOGZ.js} +1 -1
- package/dist/client/assets/index-C9qzt0Jn.js +8 -0
- package/dist/client/assets/{index-O8TVt4ln.js → index-CRmtvsLd.js} +1 -1
- package/dist/client/assets/{index-B2Zh7GaR.js → index-Cr82fBda.js} +1 -1
- package/dist/client/assets/{index-D7q_jeuX.js → index-CyNeJz90.js} +1 -1
- package/dist/client/assets/{index-BxSMt2vi.js → index-DZ0C-1Pb.js} +1 -1
- package/dist/client/assets/{index-QsyWpWi_.js → index-qob9QDNh.js} +1 -1
- package/dist/client/assets/{index-redirect-CShRS7Nt.js → index-redirect-sMiFiL_K.js} +1 -1
- package/dist/client/assets/{input-Bs4Ffj-i.js → input-PlhR5OQl.js} +1 -1
- package/dist/client/assets/{integration-icon-CLaWof0d.js → integration-icon-DmDjDu1T.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-d_ifYDCC.js → invite-member-dialog-D79xzFG6.js} +1 -1
- package/dist/client/assets/{label-PLcboP7g.js → label-Dgx54R9B.js} +1 -1
- package/dist/client/assets/{layout-DuOkHyU1.js → layout-kKX1t2sP.js} +1 -1
- package/dist/client/assets/{login-DhUXtx91.js → login-wAm8iucL.js} +1 -1
- package/dist/client/assets/{mcp-oauth-fPq59FMN.js → mcp-oauth-uiWOIXGl.js} +1 -1
- package/dist/client/assets/{members-CRhEQ1if.js → members-Df7bjsef.js} +1 -1
- package/dist/client/assets/{monaco-editor-DmZdPmcD.js → monaco-editor-BkhNLbLQ.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D_IpCfog.js → monitoring-stats-row-C_chKCRP.js} +1 -1
- package/dist/client/assets/{multi-select-w-HSBG-3.js → multi-select-Ds_o80Ow.js} +1 -1
- package/dist/client/assets/{oauth-callback-1Dt9dB0b.js → oauth-callback-DDD-Q2b4.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BfALoi7e.js → oauth-callback-ai-provider-B5_IzB1y.js} +1 -1
- package/dist/client/assets/{onboarding-yxraLW_i.js → onboarding-B1v12Kxf.js} +1 -1
- package/dist/client/assets/{org-install-CtNuDgfM.js → org-install-ix32v6HG.js} +1 -1
- package/dist/client/assets/{org-layout-DW1ZCNfI.js → org-layout-D3jsdku6.js} +1 -1
- package/dist/client/assets/{organization-choice-DxwzTiu1.js → organization-choice-DG8veEJJ.js} +1 -1
- package/dist/client/assets/{orgs-B2myolWS.js → orgs-DwwYSo1F.js} +1 -1
- package/dist/client/assets/{page-seo-form-BqUXt7Z6.js → page-seo-form-B6-Tjapj.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CPcGy_lc.js +1 -0
- package/dist/client/assets/{popover-dJsEu16j.js → popover-Cc-bUxo9.js} +1 -1
- package/dist/client/assets/{post-editor-CC9AZZzw.js → post-editor-C4wur674.js} +1 -1
- package/dist/client/assets/{primitives-3QoIUjH8.js → primitives-DzhLuT4o.js} +1 -1
- package/dist/client/assets/{profile-Clqi3ySh.js → profile-MRaW8Iku.js} +1 -1
- package/dist/client/assets/project-app-view-Dp8aqKn9.js +1 -0
- package/dist/client/assets/record-editor-DNp_YJwU.js +1 -0
- package/dist/client/assets/{redirect-editor-DAN_MR8b.js → redirect-editor-LLRc4D2K.js} +1 -1
- package/dist/client/assets/registry-bT72xUUs.js +2 -0
- package/dist/client/assets/registry-layout-DkldcL5a.js +27 -0
- package/dist/client/assets/{reports-CvSn0zzp.js → reports-B-PUwpKU.js} +1 -1
- package/dist/client/assets/{require-capability-C-CrR8hY.js → require-capability-DLiPnWvZ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-5DCNYuJP.js → required-auth-layout-BZ6DGJsb.js} +1 -1
- package/dist/client/assets/{reset-password-BKcGpfv2.js → reset-password-C9volMkn.js} +1 -1
- package/dist/client/assets/{roles-B3y8_zlh.js → roles-CiGDH8Hn.js} +1 -1
- package/dist/client/assets/{search-input-DN6JD2TK.js → search-input-CXhpX-Xz.js} +1 -1
- package/dist/client/assets/{secrets-BZ-aOIok.js → secrets-C5-PbNw_.js} +1 -1
- package/dist/client/assets/{sections-editor-BSc99DEX.js → sections-editor-BYYH09fn.js} +1 -1
- package/dist/client/assets/{select-DF9H4oT6.js → select-BHlpCdw9.js} +1 -1
- package/dist/client/assets/{select-model-CdLCtXSm.js → select-model-DiTMTOsS.js} +1 -1
- package/dist/client/assets/{self-tool-result-BPwxO5jg.js → self-tool-result-BYT5inCm.js} +1 -1
- package/dist/client/assets/{seo-editor-CPM96FoU.js → seo-editor-BMESJKUG.js} +1 -1
- package/dist/client/assets/{settings-layout-Barhr06a.js → settings-layout-BEVTWuIu.js} +1 -1
- package/dist/client/assets/{settings-section-DDGk5ElL.js → settings-section-DYCGsxoQ.js} +1 -1
- package/dist/client/assets/{shell-controls-Ceefvwp_.js → shell-controls-CyEjGQVX.js} +1 -1
- package/dist/client/assets/{shell-layout-Bt6f2nRK.js → shell-layout-DlEDxOSH.js} +1 -1
- package/dist/client/assets/{sidebar-oM27377K.js → sidebar-BT5oq5Py.js} +1 -1
- package/dist/client/assets/{skeleton-MaaZV4Ig.js → skeleton-DR0dV7Rx.js} +1 -1
- package/dist/client/assets/{sso-GO2gGD4c.js → sso-CSnQvRdb.js} +1 -1
- package/dist/client/assets/{store-CSgdi-rs.js → store-DCbdRWaM.js} +1 -1
- package/dist/client/assets/store-registry-C2gPY7Xh.js +2 -0
- package/dist/client/assets/{studio-tools-CRofv6kx.js → studio-tools-BSpHTnkI.js} +1 -1
- package/dist/client/assets/{switch-CGJLGYj-.js → switch-DNcfs8uV.js} +1 -1
- package/dist/client/assets/{table-DAruPHNm.js → table-BO7AXCJj.js} +1 -1
- package/dist/client/assets/{tabs-CfOwWKj_.js → tabs-BOn-uUO8.js} +1 -1
- package/dist/client/assets/{textarea-EgMsnMGx.js → textarea-2FS82hTt.js} +1 -1
- package/dist/client/assets/{toggle-group-nEH6HUl5.js → toggle-group-Bp5y9M5o.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BLNCzLRX.js → toolbar-icon-button-BX6tvqZL.js} +1 -1
- package/dist/client/assets/{toolbar-CSzeGnpN.js → toolbar-lB-S2vpV.js} +1 -1
- package/dist/client/assets/{tooltip-RwubIrk3.js → tooltip-D9NGFdPV.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DFrHUIak.js → use-ai-providers-BQWD6Fbv.js} +1 -1
- package/dist/client/assets/{use-api-keys-DhM_ltaH.js → use-api-keys-B9APB1Uz.js} +1 -1
- package/dist/client/assets/{use-automations-BawZrvuR.js → use-automations-Vb2lhz9-.js} +1 -1
- package/dist/client/assets/{use-autosave-CEjG1rfs.js → use-autosave-0f1y6oqV.js} +1 -1
- package/dist/client/assets/{use-capability-CnZkm8yn.js → use-capability-COYHR3-p.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BXZQ77A9.js → use-clock-tick-BRgf5NQf.js} +1 -1
- package/dist/client/assets/{use-connection-JJtv7wMS.js → use-connection-DpuO4fNw.js} +1 -1
- package/dist/client/assets/{use-copy-DL_GuuBr.js → use-copy-BeT4l9EL.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BdlAg89u.js → use-create-virtual-mcp-41F9ENXu.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CZ0cO5Jj.js → use-debounced-autosave-CRjEG81o.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BhoMmzhz.js → use-debounced-value-NzmZPT1j.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BGo8j1Yc.js → use-deco-credits-BICXIEvI.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DfE0yMCX.js → use-decopilot-events-B2udrR1E.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Ds4684TM.js → use-delete-connection-I4CFeUrd.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-uwffFpAT.js → use-deployment-admin-D5UxXiFy.js} +1 -1
- package/dist/client/assets/{use-file-configs-DPt1ulPg.js → use-file-configs-BxxfQuJb.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BGAnkyVV.js → use-infinite-scroll-Czt7JOf8.js} +1 -1
- package/dist/client/assets/{use-join-requests-BS6rJ47D.js → use-join-requests-BAcrUcz7.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DKRnh2ne.js → use-mcp-auth-status-CnFSrLEj.js} +1 -1
- package/dist/client/assets/{use-mcp-client-zgLHxopZ.js → use-mcp-client-tcmKmN21.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cna1RUcM.js → use-mcp-tools-DIqHvolA.js} +1 -1
- package/dist/client/assets/{use-members-D4Dxs4Z9.js → use-members-atWSP-WF.js} +1 -1
- package/dist/client/assets/{use-mobile-BZt0_HZC.js → use-mobile-2yLfYt8o.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DXn0UYRZ.js → use-navigate-to-agent-BAhIUAJc.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DjhZfc0h.js → use-org-auth-client-CF9Xv674.js} +1 -1
- package/dist/client/assets/{use-org-sso-BIOecJHF.js → use-org-sso-D55i4f0_.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Cs1xUzsm.js → use-organization-roles-CTaZXibc.js} +1 -1
- package/dist/client/assets/{use-organization-settings-bo82Mkc7.js → use-organization-settings-Coxn0MdD.js} +1 -1
- package/dist/client/assets/{use-registry-app-Bv1lWRnY.js → use-registry-app-hSt4mgU8.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bwkj2-ri.js → use-registry-connections-Mt2VCkjn.js} +1 -1
- package/dist/client/assets/{use-secrets-BnYUDcFo.js → use-secrets-CgXohDMi.js} +1 -1
- package/dist/client/assets/{use-status-sounds-De32pzYK.js → use-status-sounds-BADjzMyd.js} +1 -1
- package/dist/client/assets/{use-view-mode-Rnz2KAlb.js → use-view-mode-h6gpir15.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DTy2Jioe.js → use-virtual-mcp-MeqW96-1.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C6O0Jfl2.js +1 -0
- package/dist/client/assets/{useRouterState-BmHr7Mxz.js → useRouterState-N0q5mOQR.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DrfctcYn.js +1 -0
- package/dist/client/assets/{users-CWuh8uw1.js → users-CJv38_2t.js} +1 -1
- package/dist/client/assets/{variant-calendar-B9EFnu4F.js → variant-calendar-erhHGjtK.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Dmpuhz8L.js → view-mode-toggle-Wr5FnjMg.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/connection-detail-DM2y__WQ.js +0 -1
- package/dist/client/assets/index-D6HjjW9T.js +0 -8
- package/dist/client/assets/index-_puxHiaG.js +0 -5
- package/dist/client/assets/page-seo-sheet-D30upM6c.js +0 -1
- package/dist/client/assets/project-app-view-ES4Fr-fj.js +0 -1
- package/dist/client/assets/record-editor-wkuaBZHh.js +0 -1
- package/dist/client/assets/registry-CYo4fah1.js +0 -2
- package/dist/client/assets/registry-layout-C5xC0Wus.js +0 -27
- package/dist/client/assets/store-registry-DdONRjVB.js +0 -2
- package/dist/client/assets/useInfiniteQuery-C0q03X4e.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CObvZUjI.js +0 -1
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import{c as J,F as be,n as Le,o as Ae,e as we,t as G,b as ce,r as T,j as t,B as Q,k as Ye,m as ee,b8 as Ks,b9 as Hs}from"./index-DkwplL3u.js";import{i as Xt,a as ms,t as Vs,c as Gs,n as Qs,b as Ys}from"./Tool02-DFxQ4jst.js";import{i as We}from"./CheckCircle-MGAobGZ1.js";import{s as Lt,c as Ws,b as Js,i as Zs,a as Xs}from"./Settings02-Dscqhciu.js";import{S as ze,u as Ue,W as er}from"./use-mcp-client-zgLHxopZ.js";import{u as gs}from"./useInfiniteQuery-C0q03X4e.js";import{u as De}from"./studio-tools-CRofv6kx.js";import{B as H}from"./badge-T9uXWFRv.js";import{I as ye}from"./input-Bs4Ffj-i.js";import{D as pt,a as Pe,b as ht,c as ft,d as es,k as ts,j as tr}from"./dropdown-menu-Dei8Q_a1.js";import{c as At,e as Ut,a as Je,d as pe,b as Ft,T as he}from"./table-DAruPHNm.js";import{a as sr,T as ss}from"./toggle-group-nEH6HUl5.js";import{u as rr}from"./use-view-mode-Rnz2KAlb.js";import{i as $t}from"./DotsVertical-Bn-DgixF.js";import{i as ir}from"./FilterLines-DB1N8tt3.js";import{n as nr,i as xs}from"./Globe01-DwSYSUPv.js";import{i as ar}from"./SearchMd-DdLJZdaD.js";import{e as yt,d as jt,b as vt,h as bt,a as Nt,c as Ct}from"./dialog-r8u0MUEv.js";import{i as tt}from"./AlertCircle-J91Uub-h.js";import{i as rs}from"./Upload01-CfQLoJy4.js";import{A as st,a as rt,b as it,c as nt,g as at,d as ot,e as lt,f as ct}from"./alert-dialog-CqJGfT9S.js";import{C as ue}from"./card-Bx6QHURH.js";import{s as dt}from"./Trash01-O50YwY-1.js";import{L as ae}from"./label-PLcboP7g.js";import{S as or,a as lr,b as cr,c as dr,d as Dt}from"./select-DF9H4oT6.js";import{S as Ge}from"./switch-CGJLGYj-.js";import{T as wt}from"./textarea-EgMsnMGx.js";import{i as ur}from"./ArrowRight-zq5HcvPy.js";import{i as mr}from"./X-CjNSNcc_.js";import{a as gr,i as xr}from"./XCircle-7VCYmnt6.js";import{t as pr}from"./ChevronDown-BjlTvh0G.js";import{n as hr}from"./ChevronUp-CBeaIN1f.js";import{C as is}from"./checkbox-CwZjKbuN.js";import{s as ps}from"./Eye-x9PmMwPD.js";import{n as fr}from"./LinkExternal01-EQdea3eE.js";import{u as yr}from"./use-infinite-scroll-BGAnkyVV.js";import{u as Tt}from"./use-copy-DL_GuuBr.js";import{i as Mt}from"./Check-DjOk0Rkq.js";import{a as qt}from"./Copy01-Bs6JU_rS.js";import{i as jr}from"./Key01-CPUmZmyM.js";import{s as vr}from"./Plus-D9_97xSP.js";import{T as br,a as Nr,b as Cr}from"./tooltip-RwubIrk3.js";import{i as wr,a as _r}from"./mcp-oauth-fPq59FMN.js";import{i as Pr}from"./Play-DhCU58Zq.js";import"./auth-8muKPtVE.js";import"./ChevronRight-BlnNawqe.js";import"./use-mobile-BZt0_HZC.js";const Ve="private-registry",Rr=`
|
|
2
|
-
You are an MCP tool tester running automated integration checks.
|
|
3
|
-
|
|
4
|
-
Goal:
|
|
5
|
-
- Validate that this MCP and its tools work end-to-end.
|
|
6
|
-
- Prefer realistic sequences where one tool output feeds the next tool input.
|
|
7
|
-
- Example chain: list -> pick id -> get/update/delete.
|
|
8
|
-
|
|
9
|
-
Rules:
|
|
10
|
-
- Try to execute as many tools as possible.
|
|
11
|
-
- If a tool requires context, first call discovery/list tools to obtain valid IDs.
|
|
12
|
-
- If you create test data, clean it up when possible.
|
|
13
|
-
- If one tool fails, continue testing the remaining tools.
|
|
14
|
-
- If a tool returns input validation errors, fix the arguments and retry that tool.
|
|
15
|
-
- For tools that require identifiers (fileId, folderId, etc), always get IDs from previous list/get calls.
|
|
16
|
-
- Keep calls focused and safe.
|
|
17
|
-
|
|
18
|
-
At the end, provide a concise summary of:
|
|
19
|
-
- What passed
|
|
20
|
-
- What failed
|
|
21
|
-
- What could not be tested and why
|
|
22
|
-
- If some tool needs user-specific context (email/account/tenant), explicitly output a "CONTEXT_REQUIRED" note with what is needed.
|
|
23
|
-
`.trim(),Y={all:["private-registry"],items:()=>[...Y.all,"items"],itemsList:(s,e,r,i)=>[...Y.items(),"list",{search:s,tags:e,categories:r,limit:i}],item:s=>[...Y.items(),"item",s],filters:()=>[...Y.all,"filters"],registryConfig:()=>[...Y.all,"registry-config"],registryConfigByPlugin:(s,e)=>[...Y.registryConfig(),s,e],publishRequests:()=>[...Y.all,"publish-requests"],publishRequestsByOrg:s=>[...Y.publishRequests(),"org",s],publishRequestsList:(s,e,r)=>[...Y.publishRequests(),"list",{status:s??"all",sortBy:e??"created_at",sortDirection:r??"desc"}],publishRequestsListByOrg:(s,e,r,i)=>[...Y.publishRequestsByOrg(s),"list",{status:e??"all",sortBy:r??"created_at",sortDirection:i??"desc"}],publishRequestsCount:()=>[...Y.publishRequests(),"count"],publishRequestsCountByOrg:s=>[...Y.publishRequestsByOrg(s),"count"],publishApiKeys:()=>[...Y.all,"publish-api-keys"],monitor:s=>[...Y.all,"monitor",s],monitorRuns:s=>[...Y.monitor(s),"runs"],monitorRunsList:(s,e)=>[...Y.monitorRuns(s),"list",{status:e??"all"}],monitorRun:(s,e)=>[...Y.monitorRuns(s),"run",e??"none"],monitorResults:s=>[...Y.monitor(s),"results"],monitorResultsList:(s,e,r)=>[...Y.monitorResults(s),"list",{runId:e??"none",status:r??"all"}],monitorConnections:s=>[...Y.monitor(s),"connections"],monitorConnectionAuthProbe:(s,e)=>[...Y.monitorConnections(s),"auth-probe",e]};async function Se(s,e,r){const i=await s.callTool({name:e,arguments:r});if(!i||typeof i!="object")throw new Error(`Invalid tool response for ${e}`);if(i.isError){const n=i.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(n)}return i.structuredContent??i}function Ir(){const s=J.c(11),e=Ae(),{org:r}=be();let i;s[0]!==r.id||s[1]!==r.slug?(i={connectionId:ze,orgId:r.id,orgSlug:r.slug},s[0]=r.id,s[1]=r.slug,s[2]=i):i=s[2];const n=Ue(i);let l;s[3]!==n?(l=async a=>Se(n,"REGISTRY_MONITOR_RUN_START",{config:a}),s[3]=n,s[4]=l):l=s[4];let c;s[5]!==r.id||s[6]!==e?(c=async()=>{await Promise.all([e.invalidateQueries({queryKey:Y.monitorRuns(r.id)}),e.invalidateQueries({queryKey:Y.monitorResults(r.id)})])},s[5]=r.id,s[6]=e,s[7]=c):c=s[7];let o;return s[8]!==l||s[9]!==c?(o={mutationFn:l,onSuccess:c},s[8]=l,s[9]=c,s[10]=o):o=s[10],we(o)}function kr(){const s=J.c(11),e=Ae(),{org:r}=be();let i;s[0]!==r.id||s[1]!==r.slug?(i={connectionId:ze,orgId:r.id,orgSlug:r.slug},s[0]=r.id,s[1]=r.slug,s[2]=i):i=s[2];const n=Ue(i);let l;s[3]!==n?(l=async a=>Se(n,"REGISTRY_MONITOR_RUN_CANCEL",{runId:a}),s[3]=n,s[4]=l):l=s[4];let c;s[5]!==r.id||s[6]!==e?(c=async(a,u)=>{await Promise.all([e.invalidateQueries({queryKey:Y.monitorRuns(r.id)}),e.invalidateQueries({queryKey:Y.monitorRun(r.id,u)})])},s[5]=r.id,s[6]=e,s[7]=c):c=s[7];let o;return s[8]!==l||s[9]!==c?(o={mutationFn:l,onSuccess:c},s[8]=l,s[9]=c,s[10]=o):o=s[10],we(o)}function Pt(s){const e=J.c(12),{org:r}=be();let i;e[0]!==r.id||e[1]!==r.slug?(i={connectionId:ze,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=i):i=e[2];const n=Ue(i);let l;e[3]!==r.id||e[4]!==s?(l=Y.monitorRunsList(r.id,s),e[3]=r.id,e[4]=s,e[5]=l):l=e[5];let c;e[6]!==n||e[7]!==s?(c=async()=>Se(n,"REGISTRY_MONITOR_RUN_LIST",{status:s,limit:100}),e[6]=n,e[7]=s,e[8]=c):c=e[8];let o;return e[9]!==l||e[10]!==c?(o={queryKey:l,queryFn:c,staleTime:5e3},e[9]=l,e[10]=c,e[11]=o):o=e[11],Le(o)}function zt(s){const e=J.c(13),{org:r}=be();let i;e[0]!==r.id||e[1]!==r.slug?(i={connectionId:ze,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=i):i=e[2];const n=Ue(i);let l;e[3]!==r.id||e[4]!==s?(l=Y.monitorRun(r.id,s),e[3]=r.id,e[4]=s,e[5]=l):l=e[5];let c;e[6]!==n||e[7]!==s?(c=async()=>Se(n,"REGISTRY_MONITOR_RUN_GET",{runId:s}),e[6]=n,e[7]=s,e[8]=c):c=e[8];const o=!!s;let a;return e[9]!==l||e[10]!==c||e[11]!==o?(a={queryKey:l,queryFn:c,enabled:o,refetchInterval:Sr},e[9]=l,e[10]=c,e[11]=o,e[12]=a):a=e[12],Le(a)}function Sr(s){return s.state.data?.run?.status==="running"?5e3:!1}function ut(s,e,r){const i=J.c(16),{org:n}=be();let l;i[0]!==n.id||i[1]!==n.slug?(l={connectionId:ze,orgId:n.id,orgSlug:n.slug},i[0]=n.id,i[1]=n.slug,i[2]=l):l=i[2];const c=Ue(l);let o;i[3]!==n.id||i[4]!==s||i[5]!==e?(o=Y.monitorResultsList(n.id,s,e),i[3]=n.id,i[4]=s,i[5]=e,i[6]=o):o=i[6];let a;i[7]!==c||i[8]!==s||i[9]!==e?(a=async()=>Se(c,"REGISTRY_MONITOR_RESULT_LIST",{runId:s,status:e,limit:200,offset:0}),i[7]=c,i[8]=s,i[9]=e,i[10]=a):a=i[10];const u=!!s,d=r==="running"?2500:!1;let m;return i[11]!==o||i[12]!==a||i[13]!==u||i[14]!==d?(m={queryKey:o,queryFn:a,enabled:u,staleTime:5e3,refetchInterval:d},i[11]=o,i[12]=a,i[13]=u,i[14]=d,i[15]=m):m=i[15],Le(m)}function hs(){const s=J.c(10),{org:e}=be();let r;s[0]!==e.id||s[1]!==e.slug?(r={connectionId:ze,orgId:e.id,orgSlug:e.slug},s[0]=e.id,s[1]=e.slug,s[2]=r):r=s[2];const i=Ue(r);let n;s[3]!==e.id?(n=Y.monitorConnections(e.id),s[3]=e.id,s[4]=n):n=s[4];let l;s[5]!==i?(l=async()=>Se(i,"REGISTRY_MONITOR_CONNECTION_LIST",{}),s[5]=i,s[6]=l):l=s[6];let c;return s[7]!==n||s[8]!==l?(c={queryKey:n,queryFn:l,staleTime:1e4},s[7]=n,s[8]=l,s[9]=c):c=s[9],Le(c)}function Dr(){const s=J.c(11),e=Ae(),{org:r}=be();let i;s[0]!==r.id||s[1]!==r.slug?(i={connectionId:ze,orgId:r.id,orgSlug:r.slug},s[0]=r.id,s[1]=r.slug,s[2]=i):i=s[2];const n=Ue(i);let l;s[3]!==n?(l=async()=>Se(n,"REGISTRY_MONITOR_CONNECTION_SYNC",{}),s[3]=n,s[4]=l):l=s[4];let c;s[5]!==r.id||s[6]!==e?(c=async()=>{await e.invalidateQueries({queryKey:Y.monitorConnections(r.id)})},s[5]=r.id,s[6]=e,s[7]=c):c=s[7];let o;return s[8]!==l||s[9]!==c?(o={mutationFn:l,onSuccess:c},s[8]=l,s[9]=c,s[10]=o):o=s[10],we(o)}function Tr(){const s=J.c(11),e=Ae(),{org:r}=be();let i;s[0]!==r.id||s[1]!==r.slug?(i={connectionId:ze,orgId:r.id,orgSlug:r.slug},s[0]=r.id,s[1]=r.slug,s[2]=i):i=s[2];const n=Ue(i);let l;s[3]!==n?(l=async a=>{const{connectionId:u,authStatus:d}=a;return Se(n,"REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH",{connectionId:u,authStatus:d})},s[3]=n,s[4]=l):l=s[4];let c;s[5]!==r.id||s[6]!==e?(c=async()=>{await e.invalidateQueries({queryKey:Y.monitorConnections(r.id)})},s[5]=r.id,s[6]=e,s[7]=c):c=s[7];let o;return s[8]!==l||s[9]!==c?(o={mutationFn:l,onSuccess:c},s[8]=l,s[9]=c,s[10]=o):o=s[10],we(o)}const ns={monitorMode:"health_check",onFailure:"none",schedule:"manual",cronExpression:"",scheduleEventId:"",perMcpTimeoutMs:3e4,perToolTimeoutMs:1e4,maxAgentSteps:15,testPublicOnly:!1,testPrivateOnly:!1,includePendingRequests:!1,agentContext:""};function fs(){const s=J.c(34),{org:e,project:r}=be();let i;s[0]!==e.id||s[1]!==e.slug?(i={connectionId:ze,orgId:e.id,orgSlug:e.slug},s[0]=e.id,s[1]=e.slug,s[2]=i):i=s[2];const n=Ue(i),l=Ae();let c;s[3]!==r.id?(c=Y.registryConfigByPlugin(r.id??"",Ve),s[3]=r.id,s[4]=c):c=s[4];let o;s[5]!==n||s[6]!==r.id?(o=async()=>Se(n,"VIRTUAL_MCP_PLUGIN_CONFIG_GET",{virtualMcpId:r.id,pluginId:Ve}),s[5]=n,s[6]=r.id,s[7]=o):o=s[7];const a=!!r.id;let u;s[8]!==c||s[9]!==o||s[10]!==a?(u={queryKey:c,queryFn:o,enabled:a},s[8]=c,s[9]=o,s[10]=a,s[11]=u):u=s[11];const d=Le(u),m=d.data?.config?.settings,f=m&&typeof m=="object"?m.testConfig:void 0,g=typeof(m?m.monitorMode??m.testMode:void 0)=="string";let x;s[12]!==f?(x=f??{},s[12]=f,s[13]=x):x=s[13];let h;s[14]!==g||s[15]!==m||s[16]!==f?(h=g&&!f?m:{},s[14]=g,s[15]=m,s[16]=f,s[17]=h):h=s[17];let j;s[18]!==x||s[19]!==h?(j={...ns,...x,...h},s[18]=x,s[19]=h,s[20]=j):j=s[20];const N=j;let w;s[21]!==n||s[22]!==r.id?(w=async P=>{const S=(await Se(n,"VIRTUAL_MCP_PLUGIN_CONFIG_GET",{virtualMcpId:r.id,pluginId:Ve}))?.config?.settings??{};return Se(n,"VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE",{virtualMcpId:r.id,pluginId:Ve,settings:{...S,testConfig:{...ns,...S.testConfig??{},...P}}})},s[21]=n,s[22]=r.id,s[23]=w):w=s[23];let _;s[24]!==r.id||s[25]!==l?(_=async()=>{await l.invalidateQueries({queryKey:Y.registryConfigByPlugin(r.id??"",Ve)})},s[24]=r.id,s[25]=l,s[26]=_):_=s[26];let b;s[27]!==w||s[28]!==_?(b={mutationFn:w,onSuccess:_},s[27]=w,s[28]=_,s[29]=b):b=s[29];const L=we(b);let k;return s[30]!==d.isLoading||s[31]!==L||s[32]!==N?(k={settings:N,isLoading:d.isLoading,saveMutation:L},s[30]=d.isLoading,s[31]=L,s[32]=N,s[33]=k):k=s[33],k}function Mr(){const s=J.c(3),e=Pt("completed"),r=e.data?.items?.[0]?.id,i=e.data?.items?.[0]?.status,n=ut(r,"failed",i),l=n.data?.items?.length??0,c=e.isLoading||n.isLoading;let o;return s[0]!==l||s[1]!==c?(o={brokenCount:l,isLoading:c},s[0]=l,s[1]=c,s[2]=o):o=s[2],o}const ys=24;function qr(s){return s.trim()}async function ve(s,e,r){return s.call(e,r)}function js(s){const e=J.c(17),r=De();let i,n,l,c;e[0]!==s.categories||e[1]!==s.limit||e[2]!==s.search||e[3]!==s.tags?(n=qr(s.search),i=s.limit??ys,c=gs,l=Y.itemsList(n,s.tags,s.categories,i),e[0]=s.categories,e[1]=s.limit,e[2]=s.search,e[3]=s.tags,e[4]=i,e[5]=n,e[6]=l,e[7]=c):(i=e[4],n=e[5],l=e[6],c=e[7]);let o;e[8]!==i||e[9]!==s.categories||e[10]!==s.tags||e[11]!==n||e[12]!==r?(o=async u=>{const{pageParam:d}=u,m=n.length>0?{operator:"or",conditions:[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n},{field:["id"],operator:"contains",value:n},{field:["server","name"],operator:"contains",value:n}]}:void 0;return ve(r,"REGISTRY_ITEM_LIST",{cursor:d,limit:i,tags:s.tags.length?s.tags:void 0,categories:s.categories.length?s.categories:void 0,where:m})},e[8]=i,e[9]=s.categories,e[10]=s.tags,e[11]=n,e[12]=r,e[13]=o):o=e[13];let a;return e[14]!==l||e[15]!==o?(a={queryKey:l,queryFn:o,initialPageParam:void 0,getNextPageParam:Er,staleTime:3e4},e[14]=l,e[15]=o,e[16]=a):a=e[16],c(a)}function Er(s){return s.nextCursor}function Lr(){const s=J.c(6),e=De();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r=Y.filters(),s[0]=r):r=s[0];let i;s[1]!==e?(i=async()=>ve(e,"REGISTRY_ITEM_FILTERS",{}),s[1]=e,s[2]=i):i=s[2];let n;s[3]===Symbol.for("react.memo_cache_sentinel")?(n={tags:[],categories:[]},s[3]=n):n=s[3];let l;return s[4]!==i?(l={queryKey:r,queryFn:i,placeholderData:n,staleTime:6e4},s[4]=i,s[5]=l):l=s[5],Le(l)}function Ot(){const s=J.c(27),e=Ae(),r=De();let i;s[0]!==e?(i=async()=>{await Promise.all([e.invalidateQueries({queryKey:Y.items()}),e.invalidateQueries({queryKey:Y.filters()})])},s[0]=e,s[1]=i):i=s[1];const n=i;let l;s[2]!==r?(l=async N=>(await ve(r,"REGISTRY_ITEM_CREATE",{data:N})).item,s[2]=r,s[3]=l):l=s[3];let c;s[4]!==n||s[5]!==l?(c={mutationFn:l,onSuccess:n},s[4]=n,s[5]=l,s[6]=c):c=s[6];const o=we(c);let a;s[7]!==r?(a=async N=>{const{id:w,data:_}=N;return(await ve(r,"REGISTRY_ITEM_UPDATE",{id:w,data:_})).item},s[7]=r,s[8]=a):a=s[8];let u;s[9]!==n||s[10]!==a?(u={mutationFn:a,onSuccess:n},s[9]=n,s[10]=a,s[11]=u):u=s[11];const d=we(u);let m;s[12]!==r?(m=async N=>(await ve(r,"REGISTRY_ITEM_DELETE",{id:N})).item,s[12]=r,s[13]=m):m=s[13];let f;s[14]!==n||s[15]!==m?(f={mutationFn:m,onSuccess:n},s[14]=n,s[15]=m,s[16]=f):f=s[16];const p=we(f);let g;s[17]!==r?(g=async N=>ve(r,"REGISTRY_ITEM_BULK_CREATE",{items:N}),s[17]=r,s[18]=g):g=s[18];let x;s[19]!==n||s[20]!==g?(x={mutationFn:g,onSuccess:n},s[19]=n,s[20]=g,s[21]=x):x=s[21];const h=we(x);let j;return s[22]!==h||s[23]!==o||s[24]!==p||s[25]!==d?(j={createMutation:o,updateMutation:d,deleteMutation:p,bulkCreateMutation:h},s[22]=h,s[23]=o,s[24]=p,s[25]=d,s[26]=j):j=s[26],j}function vs(s){const e=J.c(24),{org:r}=be(),i=De(),n=Ae(),l=er.SELF(r.id),c=Le({queryKey:Y.registryConfigByPlugin(l,s),queryFn:async()=>ve(i,"VIRTUAL_MCP_PLUGIN_CONFIG_GET",{virtualMcpId:l,pluginId:s}),staleTime:6e4}),o=Y.registryConfigByPlugin(l,s);let a;e[0]!==s||e[1]!==l||e[2]!==i?(a=async R=>{const A=(await ve(i,"VIRTUAL_MCP_PLUGIN_CONFIG_GET",{virtualMcpId:l,pluginId:s}))?.config?.settings??{};return ve(i,"VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE",{virtualMcpId:l,pluginId:s,settings:{...A,...R}})},e[0]=s,e[1]=l,e[2]=i,e[3]=a):a=e[3];let u;e[4]!==n||e[5]!==o?(u=async()=>{await n.invalidateQueries({queryKey:o})},e[4]=n,e[5]=o,e[6]=u):u=e[6];let d;e[7]!==a||e[8]!==u?(d={mutationFn:a,onSuccess:u,onError:Ar},e[7]=a,e[8]=u,e[9]=d):d=e[9];const m=we(d);let f;e[10]!==m?(f=R=>{m.mutate(R)},e[10]=m,e[11]=f):f=e[11];const p=f,g=c.data?.config?.settings?.registryName??"Private Registry",x=c.data?.config?.settings?.registryIcon??"",h=c.data?.config?.settings?.acceptPublishRequests??!1,j=c.data?.config?.settings?.requireApiToken??!1,N=c.data?.config?.settings?.storePrivateOnly??!1,w=c.data?.config?.settings?.rateLimitEnabled??!0,b=c.data?.config?.settings?.rateLimitWindow==="minute"?"minute":"hour",L=c.data?.config?.settings?.rateLimitMax,k=typeof L=="number"&&L>=1?Math.floor(L):100;let P;return e[12]!==h||e[13]!==m.isPending||e[14]!==c.isLoading||e[15]!==w||e[16]!==k||e[17]!==b||e[18]!==x||e[19]!==g||e[20]!==j||e[21]!==N||e[22]!==p?(P={registryName:g,registryIcon:x,acceptPublishRequests:h,requireApiToken:j,storePrivateOnly:N,rateLimitEnabled:w,rateLimitWindow:b,rateLimitMax:k,isLoadingConfig:c.isLoading,isSaving:m.isPending,updateConfig:p},e[12]=h,e[13]=m.isPending,e[14]=c.isLoading,e[15]=w,e[16]=k,e[17]=b,e[18]=x,e[19]=g,e[20]=j,e[21]=N,e[22]=p,e[23]=P):P=e[23],P}function Ar(s){G.error(s instanceof Error?s.message:"Failed to save registry settings")}function Ur(s){const e=J.c(13),{org:r}=be(),i=De();let n;e[0]!==r.id||e[1]!==s.sortBy||e[2]!==s.sortDirection||e[3]!==s.status?(n=Y.publishRequestsListByOrg(r.id,s.status,s.sortBy,s.sortDirection),e[0]=r.id,e[1]=s.sortBy,e[2]=s.sortDirection,e[3]=s.status,e[4]=n):n=e[4];let l;e[5]!==s.sortBy||e[6]!==s.sortDirection||e[7]!==s.status||e[8]!==i?(l=async o=>{const{pageParam:a}=o;return ve(i,"REGISTRY_PUBLISH_REQUEST_LIST",{status:s.status,sortBy:s.sortBy,sortDirection:s.sortDirection,limit:ys,offset:a})},e[5]=s.sortBy,e[6]=s.sortDirection,e[7]=s.status,e[8]=i,e[9]=l):l=e[9];let c;return e[10]!==n||e[11]!==l?(c={queryKey:n,queryFn:l,initialPageParam:0,getNextPageParam:Fr,staleTime:3e4,refetchOnMount:!0},e[10]=n,e[11]=l,e[12]=c):c=e[12],gs(c)}function Fr(s,e){const r=e.reduce($r,0);return r<s.totalCount?r:void 0}function $r(s,e){return s+e.items.length}function zr(){const s=J.c(7),{org:e}=be(),r=De();let i;s[0]!==e.id?(i=Y.publishRequestsCountByOrg(e.id),s[0]=e.id,s[1]=i):i=s[1];let n;s[2]!==r?(n=async()=>ve(r,"REGISTRY_PUBLISH_REQUEST_COUNT",{}),s[2]=r,s[3]=n):n=s[3];let l;return s[4]!==i||s[5]!==n?(l={queryKey:i,queryFn:n,staleTime:3e4},s[4]=i,s[5]=n,s[6]=l):l=s[6],Le(l)}function Or(){const s=J.c(15),e=Ae(),r=De();let i;s[0]!==e?(i=async()=>{await Promise.all([e.invalidateQueries({queryKey:Y.publishRequests()})])},s[0]=e,s[1]=i):i=s[1];const n=i;let l;s[2]!==r?(l=async f=>ve(r,"REGISTRY_PUBLISH_REQUEST_REVIEW",f),s[2]=r,s[3]=l):l=s[3];let c;s[4]!==n||s[5]!==l?(c={mutationFn:l,onSuccess:n},s[4]=n,s[5]=l,s[6]=c):c=s[6];const o=we(c);let a;s[7]!==r?(a=async f=>ve(r,"REGISTRY_PUBLISH_REQUEST_DELETE",{id:f}),s[7]=r,s[8]=a):a=s[8];let u;s[9]!==n||s[10]!==a?(u={mutationFn:a,onSuccess:n},s[9]=n,s[10]=a,s[11]=u):u=s[11];const d=we(u);let m;return s[12]!==d||s[13]!==o?(m={reviewMutation:o,deleteMutation:d},s[12]=d,s[13]=o,s[14]=m):m=s[14],m}function Br(){const s=J.c(3),e=De();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r=Y.publishApiKeys(),s[0]=r):r=s[0];let i;return s[1]!==e?(i={queryKey:r,queryFn:async()=>ve(e,"REGISTRY_PUBLISH_API_KEY_LIST",{}),staleTime:3e4},s[1]=e,s[2]=i):i=s[2],Le(i)}function Kr(){const s=J.c(17),e=Ae(),r=De();let i;s[0]!==r?(i=async f=>ve(r,"REGISTRY_PUBLISH_API_KEY_GENERATE",{name:f}),s[0]=r,s[1]=i):i=s[1];let n;s[2]!==e?(n=async()=>{await e.invalidateQueries({queryKey:Y.publishApiKeys()})},s[2]=e,s[3]=n):n=s[3];let l;s[4]!==i||s[5]!==n?(l={mutationFn:i,onSuccess:n},s[4]=i,s[5]=n,s[6]=l):l=s[6];const c=we(l);let o;s[7]!==r?(o=async f=>ve(r,"REGISTRY_PUBLISH_API_KEY_REVOKE",{keyId:f}),s[7]=r,s[8]=o):o=s[8];let a;s[9]!==e?(a=async()=>{await e.invalidateQueries({queryKey:Y.publishApiKeys()})},s[9]=e,s[10]=a):a=s[10];let u;s[11]!==o||s[12]!==a?(u={mutationFn:o,onSuccess:a},s[11]=o,s[12]=a,s[13]=u):u=s[13];const d=we(u);let m;return s[14]!==c||s[15]!==d?(m={generateMutation:c,revokeMutation:d},s[14]=c,s[15]=d,s[16]=m):m=s[16],m}function as(s){return s?s.split(/[;|]/).map(e=>e.trim()).filter(Boolean):[]}function os(s){const e=[];let r="",i=!1;for(let n=0;n<s.length;n+=1){const l=s[n],c=s[n+1];if(l==='"'){i&&c==='"'?(r+='"',n+=1):i=!i;continue}if(l===","&&!i){e.push(r.trim()),r="";continue}r+=l}return e.push(r.trim()),e}const Hr=["id","title"],Vr=["id","title","description","remote_url","remote_type","tags","categories","is_public"];function Gr(s){const e=s.split(/\r?\n/).map(u=>u.trim()).filter(Boolean);if(e.length<2)return{items:[],warnings:[{line:0,message:"CSV must have a header row and at least one data row"}],skipped:0};const r=os(e[0]??""),i=new Map,n=[];r.forEach((u,d)=>{const m=u.toLowerCase().trim();m&&i.set(m,d)});for(const u of Hr)i.has(u)||n.push({line:1,message:`Missing required column: "${u}"`});for(const u of r){const d=u.toLowerCase().trim();d&&!Vr.includes(d)&&n.push({line:1,message:`Unknown column "${u}" will be ignored`})}if(!i.has("id")||!i.has("title"))return{items:[],warnings:n,skipped:0};const l=(u,d)=>{const m=i.get(d);return typeof m=="number"?u[m]??"":""},c=[],o=new Set;let a=0;for(let u=1;u<e.length;u+=1){const d=os(e[u]??""),m=l(d,"id").trim(),f=l(d,"title").trim();if(!m){n.push({line:u+1,message:"Missing id — row skipped"}),a+=1;continue}if(!f){n.push({line:u+1,message:`Missing title for id="${m}" — row skipped`}),a+=1;continue}if(o.has(m)){n.push({line:u+1,message:`Duplicate id="${m}" — row skipped`}),a+=1;continue}o.add(m);const p=l(d,"description").trim(),g=l(d,"remote_url").trim(),h=l(d,"remote_type").trim().toLowerCase()==="sse"?"sse":"http",j=as(l(d,"tags")),N=as(l(d,"categories")),w=l(d,"is_public").trim().toLowerCase(),_=w==="true"||w==="1"||w==="yes";c.push({id:m,title:f,description:p||null,is_public:_,_meta:{"mcp.mesh":{...j.length>0?{tags:j}:{},...N.length>0?{categories:N}:{}}},server:{name:m,title:f,description:p||void 0,remotes:g?[{type:h,url:g}]:[]}})}return{items:c,warnings:n,skipped:a}}const Qr=`id,title,description,remote_url,remote_type,tags,categories,is_public
|
|
24
|
-
my-mcp-server,My MCP Server,A useful MCP server,https://example.com/mcp,http,ai|tools,productivity,true
|
|
25
|
-
another-server,Another Server,Another useful server,https://example2.com/mcp,http,data|analytics,data-processing,false`;function Yr(){const s=new Blob([Qr],{type:"text/csv;charset=utf-8"}),e=URL.createObjectURL(s),r=document.createElement("a");r.href=e,r.download="registry-import-template.csv",r.click(),URL.revokeObjectURL(e)}function Wr(s){const e=J.c(101),{open:r,onOpenChange:i,isImporting:n,onImport:l}=s,c=n===void 0?!1:n,o=ce(),[a,u]=T.useState(null),[d,m]=T.useState(null),[f,p]=T.useState(null),g=T.useRef(null);let x;e[0]!==i?(x=q=>{i(q),q||(u(null),m(null),p(null),g.current&&(g.current.value=""))},e[0]=i,e[1]=x):x=e[1];const h=x;let j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j=async q=>{if(!q)return;p(q.name),m(null);const O=await q.text();u(Gr(O))},e[2]=j):j=e[2];const N=j;let w;e[3]!==l||e[4]!==a?(w=async()=>{if(!a?.items.length)return;const q=await l(a.items);m(q)},e[3]=l,e[4]=a,e[5]=w):w=e[5];const _=w;let b,L,k,P,R,S,A,M,v,I,U;if(e[6]!==f||e[7]!==_||e[8]!==h||e[9]!==d||e[10]!==c||e[11]!==r||e[12]!==a||e[13]!==o){const q=a?.items??[];let O;e[25]!==a?.warnings?(O=a?.warnings??[],e[25]=a?.warnings,e[26]=O):O=e[26];const y=O;let E;e[27]!==y?(E=y.some(Zr),e[27]=y,e[28]=E):E=e[28];const W=E,Z=d!==null;k=yt,R=r,S=h,L=jt,I="sm:max-w-3xl max-h-[85vh] flex flex-col";let te;e[29]!==o?(te=o("registry.csvImportDialog.title"),e[29]=o,e[30]=te):te=e[30];let me;e[31]!==te?(me=t.jsx(vt,{children:te}),e[31]=te,e[32]=me):me=e[32];let se;e[33]!==o?(se=o("registry.csvImportDialog.description"),e[33]=o,e[34]=se):se=e[34];let ne;e[35]!==se?(ne=t.jsx(bt,{children:se}),e[35]=se,e[36]=ne):ne=e[36],e[37]!==me||e[38]!==ne?(U=t.jsxs(Nt,{children:[me,ne]}),e[37]=me,e[38]=ne,e[39]=U):U=e[39];let ge;e[40]===Symbol.for("react.memo_cache_sentinel")?(ge=()=>g.current?.click(),e[40]=ge):ge=e[40];let de;e[41]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(rs,{size:14}),e[41]=de):de=e[41];let ie;e[42]!==f||e[43]!==o?(ie=o(f?"registry.csvImportDialog.changeFile":"registry.csvImportDialog.chooseCsvFile"),e[42]=f,e[43]=o,e[44]=ie):ie=e[44];let C;e[45]!==c||e[46]!==ie?(C=t.jsxs(Q,{variant:"outline",size:"sm",className:"gap-1.5",onClick:ge,disabled:c,children:[de,ie]}),e[45]=c,e[46]=ie,e[47]=C):C=e[47];let B;e[48]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx("input",{ref:g,type:"file",accept:".csv,text/csv",className:"hidden",onChange:je=>N(je.target.files?.[0]??null)}),e[48]=B):B=e[48];let K;e[49]!==f?(K=f&&t.jsx("span",{className:"text-sm text-muted-foreground truncate",children:f}),e[49]=f,e[50]=K):K=e[50];let re;e[51]===Symbol.for("react.memo_cache_sentinel")?(re=t.jsx("div",{className:"flex-1"}),e[51]=re):re=e[51];let xe;e[52]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsx(nr,{size:14}),e[52]=xe):xe=e[52];let oe;e[53]!==o?(oe=o("registry.csvImportDialog.downloadTemplate"),e[53]=o,e[54]=oe):oe=e[54];let Re;e[55]!==oe?(Re=t.jsxs(Q,{variant:"ghost",size:"sm",className:"gap-1.5 text-xs text-muted-foreground",onClick:Yr,children:[xe,oe]}),e[55]=oe,e[56]=Re):Re=e[56];let Ne;e[57]!==C||e[58]!==K||e[59]!==Re?(Ne=t.jsxs("div",{className:"flex items-center gap-3",children:[C,B,K,re,Re]}),e[57]=C,e[58]=K,e[59]=Re,e[60]=Ne):Ne=e[60];let z;e[61]!==o||e[62]!==y?(z=y.length>0&&t.jsx("div",{className:"rounded-lg border border-warning/20 bg-warning/10 p-3 grid gap-1",children:y.map((je,Oe)=>t.jsxs("p",{className:"text-xs text-warning flex items-start gap-1.5",children:[t.jsx(tt,{size:12,className:"shrink-0 mt-0.5"}),t.jsxs("span",{children:[je.line>0&&t.jsx("span",{className:"font-mono text-[10px] mr-1",children:o("registry.csvImportDialog.linePrefix",{line:je.line})}),je.message]})]},`${je.line}-${Oe}`))}),e[61]=o,e[62]=y,e[63]=z):z=e[63];const le=q.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-sm font-medium",children:o("registry.csvImportDialog.preview")}),t.jsx(H,{variant:"secondary",children:o("registry.csvImportDialog.itemsCount",{count:q.length})}),a?.skipped?t.jsx(H,{variant:"outline",className:"text-warning",children:o("registry.csvImportDialog.skippedCount",{count:a.skipped})}):null]}),t.jsx("div",{className:"border rounded-lg overflow-hidden",children:t.jsx("div",{className:"max-h-[300px] overflow-y-auto",children:t.jsxs(At,{children:[t.jsx(Ut,{children:t.jsxs(Je,{children:[t.jsx(pe,{className:"w-[140px]",children:o("registry.csvImportDialog.tableIdHeader")}),t.jsx(pe,{children:o("registry.csvImportDialog.tableTitleHeader")}),t.jsx(pe,{children:o("registry.csvImportDialog.tableUrlHeader")}),t.jsx(pe,{className:"w-[80px] text-center",children:o("registry.csvImportDialog.tablePublicHeader")}),t.jsx(pe,{children:o("registry.csvImportDialog.tableTagsHeader")})]})}),t.jsx(Ft,{children:q.map(je=>t.jsxs(Je,{children:[t.jsx(he,{className:"font-mono text-xs",children:je.id}),t.jsx(he,{className:"text-sm",children:je.title}),t.jsx(he,{className:"text-xs text-muted-foreground max-w-[200px] truncate",children:je.server.remotes?.[0]?.url??t.jsx("span",{className:"italic",children:o("registry.csvImportDialog.tableNoneValue")})}),t.jsx(he,{className:"text-center",children:je.is_public?t.jsx(H,{variant:"secondary",className:"text-[10px] bg-success/10 text-success",children:o("registry.csvImportDialog.tableYesValue")}):t.jsx("span",{className:"text-xs text-muted-foreground",children:o("registry.csvImportDialog.tableNoValue")})}),t.jsx(he,{className:"text-xs text-muted-foreground",children:(je._meta?.["mcp.mesh"]?.tags??[]).join(", ")||"-"})]},je.id))})]})})})]});let Ie;e[64]!==d||e[65]!==o?(Ie=d&&t.jsxs("div",{className:"rounded-lg border p-3 grid gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[t.jsx(We,{size:16,className:"text-success"}),o("registry.csvImportDialog.importedCount",{count:d.created})]}),d.errors.length>0&&t.jsx("div",{className:"grid gap-1 mt-1",children:d.errors.map(Jr)})]}),e[64]=d,e[65]=o,e[66]=Ie):Ie=e[66];let _e;e[67]!==Z||e[68]!==a||e[69]!==o?(_e=!a&&!Z&&t.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[t.jsx(rs,{size:32,className:"text-muted-foreground/40 mb-3"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:o("registry.csvImportDialog.emptyStateHint")}),t.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Required columns: ",t.jsx("code",{children:"id"}),", ",t.jsx("code",{children:"title"}),". Optional:"," ",t.jsx("code",{children:"description"}),", ",t.jsx("code",{children:"remote_url"}),","," ",t.jsx("code",{children:"remote_type"}),", ",t.jsx("code",{children:"tags"}),","," ",t.jsx("code",{children:"categories"}),", ",t.jsx("code",{children:"is_public"}),"."]}),t.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Use ",t.jsx("code",{children:"|"})," or ",t.jsx("code",{children:";"})," to separate multiple tags/categories within a cell."]})]}),e[67]=Z,e[68]=a,e[69]=o,e[70]=_e):_e=e[70],e[71]!==Ne||e[72]!==z||e[73]!==le||e[74]!==Ie||e[75]!==_e?(P=t.jsxs("div",{className:"flex-1 overflow-y-auto grid gap-4 pr-1",children:[Ne,z,le,Ie,_e]}),e[71]=Ne,e[72]=z,e[73]=le,e[74]=Ie,e[75]=_e,e[76]=P):P=e[76],b=Ct,A="gap-2 sm:gap-0";let Fe;e[77]!==h?(Fe=()=>h(!1),e[77]=h,e[78]=Fe):Fe=e[78];let Te;e[79]!==Z||e[80]!==o?(Te=o(Z?"registry.csvImportDialog.doneButton":"registry.csvImportDialog.cancelButton"),e[79]=Z,e[80]=o,e[81]=Te):Te=e[81],e[82]!==Fe||e[83]!==Te?(M=t.jsx(Q,{variant:"outline",onClick:Fe,children:Te}),e[82]=Fe,e[83]=Te,e[84]=M):M=e[84],v=!Z&&t.jsx(Q,{onClick:_,disabled:c||q.length===0||W,children:c?o("registry.csvImportDialog.importingButton"):o("registry.csvImportDialog.importButton",{count:q.length})}),e[6]=f,e[7]=_,e[8]=h,e[9]=d,e[10]=c,e[11]=r,e[12]=a,e[13]=o,e[14]=b,e[15]=L,e[16]=k,e[17]=P,e[18]=R,e[19]=S,e[20]=A,e[21]=M,e[22]=v,e[23]=I,e[24]=U}else b=e[14],L=e[15],k=e[16],P=e[17],R=e[18],S=e[19],A=e[20],M=e[21],v=e[22],I=e[23],U=e[24];let $;e[85]!==b||e[86]!==A||e[87]!==M||e[88]!==v?($=t.jsxs(b,{className:A,children:[M,v]}),e[85]=b,e[86]=A,e[87]=M,e[88]=v,e[89]=$):$=e[89];let D;e[90]!==L||e[91]!==P||e[92]!==$||e[93]!==I||e[94]!==U?(D=t.jsxs(L,{className:I,children:[U,P,$]}),e[90]=L,e[91]=P,e[92]=$,e[93]=I,e[94]=U,e[95]=D):D=e[95];let F;return e[96]!==k||e[97]!==R||e[98]!==S||e[99]!==D?(F=t.jsx(k,{open:R,onOpenChange:S,children:D}),e[96]=k,e[97]=R,e[98]=S,e[99]=D,e[100]=F):F=e[100],F}function Jr(s){return t.jsxs("p",{className:"text-xs text-destructive flex items-start gap-1.5",children:[t.jsx(tt,{size:12,className:"shrink-0 mt-0.5"}),t.jsxs("span",{children:[t.jsx("span",{className:"font-mono",children:s.id}),": ",s.error]})]},s.id)}function Zr(s){return s.message.startsWith("Missing required column:")}function Xr(s){const e=J.c(34),{open:r,onOpenChange:i,title:n,isDeleting:l,onConfirm:c}=s,o=l===void 0?!1:l,a=ce();let u;e[0]!==a?(u=a("registry.deleteConfirmDialog.title"),e[0]=a,e[1]=u):u=e[1];let d;e[2]!==u?(d=t.jsx(st,{children:u}),e[2]=u,e[3]=d):d=e[3];let m;e[4]!==a||e[5]!==n?(m=a("registry.deleteConfirmDialog.description",{title:n}),e[4]=a,e[5]=n,e[6]=m):m=e[6];let f;e[7]!==m?(f=t.jsx(rt,{children:m}),e[7]=m,e[8]=f):f=e[8];let p;e[9]!==d||e[10]!==f?(p=t.jsxs(it,{children:[d,f]}),e[9]=d,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==a?(g=a("registry.deleteConfirmDialog.cancel"),e[12]=a,e[13]=g):g=e[13];let x;e[14]!==o||e[15]!==g?(x=t.jsx(nt,{disabled:o,children:g}),e[14]=o,e[15]=g,e[16]=x):x=e[16];let h;e[17]!==o||e[18]!==a?(h=a(o?"registry.deleteConfirmDialog.deleting":"registry.deleteConfirmDialog.delete"),e[17]=o,e[18]=a,e[19]=h):h=e[19];let j;e[20]!==o||e[21]!==c||e[22]!==h?(j=t.jsx(at,{disabled:o,onClick:c,children:h}),e[20]=o,e[21]=c,e[22]=h,e[23]=j):j=e[23];let N;e[24]!==j||e[25]!==x?(N=t.jsxs(ot,{children:[x,j]}),e[24]=j,e[25]=x,e[26]=N):N=e[26];let w;e[27]!==N||e[28]!==p?(w=t.jsxs(lt,{children:[p,N]}),e[27]=N,e[28]=p,e[29]=w):w=e[29];let _;return e[30]!==i||e[31]!==r||e[32]!==w?(_=t.jsx(ct,{open:r,onOpenChange:i,children:w}),e[30]=i,e[31]=r,e[32]=w,e[33]=_):_=e[33],_}function ei(s){const[e]=s.id.split("/");return e??"provider"}function ti(s){return s._meta?.["mcp.mesh"]?.tags??[]}function si(s){return s._meta?.["mcp.mesh"]?.categories??[]}function ri(s){return s.server?.icons?.[0]?.src??null}function ii(s){const e=J.c(107),{item:r,onEdit:i,onDelete:n,onToggleVerified:l,onToggleOfficial:c}=s,o=ce();let a;e[0]!==r?(a=ri(r),e[0]=r,e[1]=a):a=e[1];const u=a,d=r._meta?.["mcp.mesh"]?.verified===!0,m=r._meta?.["mcp.mesh"]?.official===!0;let f;e[2]!==r?(f=[...ti(r),...si(r)],e[2]=r,e[3]=f):f=e[3];const p=f;let g;e[4]!==p?(g=p.slice(0,3),e[4]=p,e[5]=g):g=e[5];const x=g,h=Math.max(0,p.length-x.length);let j;e[6]!==u||e[7]!==r.title?(j=t.jsx("div",{className:"size-10 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0 flex items-center justify-center",children:u?t.jsx("img",{src:u,alt:r.title,className:"h-full w-full object-cover",loading:"lazy"}):t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:r.title.charAt(0).toUpperCase()})}),e[6]=u,e[7]=r.title,e[8]=j):j=e[8];let N;e[9]!==r.title?(N=t.jsx("p",{className:"font-medium truncate",children:r.title}),e[9]=r.title,e[10]=N):N=e[10];let w;e[11]!==r?(w=ei(r),e[11]=r,e[12]=w):w=e[12];let _;e[13]!==w?(_=t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:w}),e[13]=w,e[14]=_):_=e[14];let b;e[15]!==r.is_public||e[16]!==o?(b=r.is_public?t.jsxs(H,{variant:"default",className:"gap-1",children:[t.jsx(xs,{size:10}),o("registry.registryItemCard.public")]}):t.jsx(H,{variant:"secondary",children:o("registry.registryItemCard.private")}),e[15]=r.is_public,e[16]=o,e[17]=b):b=e[17];let L;e[18]!==m||e[19]!==o?(L=m&&t.jsxs(H,{variant:"outline",className:"gap-1 text-primary",children:[t.jsx(Xt,{size:10}),o("registry.registryItemCard.official")]}),e[18]=m,e[19]=o,e[20]=L):L=e[20];let k;e[21]!==m||e[22]!==d||e[23]!==o?(k=!m&&d&&t.jsxs(H,{variant:"outline",className:"gap-1 text-success",children:[t.jsx(Xt,{size:10}),o("registry.registryItemCard.verified")]}),e[21]=m,e[22]=d,e[23]=o,e[24]=k):k=e[24];let P;e[25]!==k||e[26]!==_||e[27]!==b||e[28]!==L?(P=t.jsxs("div",{className:"flex items-center gap-2",children:[_,b,L,k]}),e[25]=k,e[26]=_,e[27]=b,e[28]=L,e[29]=P):P=e[29];let R;e[30]!==P||e[31]!==N?(R=t.jsxs("div",{className:"min-w-0 flex-1",children:[N,P]}),e[30]=P,e[31]=N,e[32]=R):R=e[32];let S;e[33]!==R||e[34]!==j?(S=t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[j,R]}),e[33]=R,e[34]=j,e[35]=S):S=e[35];let A;e[36]!==r.title||e[37]!==o?(A=o("registry.registryItemCard.actionsFor",{title:r.title}),e[36]=r.title,e[37]=o,e[38]=A):A=e[38];let M;e[39]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx($t,{size:18}),e[39]=M):M=e[39];let v;e[40]!==A?(v=t.jsx(pt,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0","aria-label":A,children:M})}),e[40]=A,e[41]=v):v=e[41];let I;e[42]!==r||e[43]!==i?(I=()=>i(r),e[42]=r,e[43]=i,e[44]=I):I=e[44];let U;e[45]!==o?(U=o("registry.registryItemCard.edit"),e[45]=o,e[46]=U):U=e[46];let $;e[47]!==I||e[48]!==U?($=t.jsx(Pe,{onClick:I,children:U}),e[47]=I,e[48]=U,e[49]=$):$=e[49];let D;e[50]!==r||e[51]!==l?(D=()=>l(r),e[50]=r,e[51]=l,e[52]=D):D=e[52];let F;e[53]!==d||e[54]!==o?(F=o(d?"registry.registryItemCard.unmarkAsVerified":"registry.registryItemCard.markAsVerified"),e[53]=d,e[54]=o,e[55]=F):F=e[55];let q;e[56]!==D||e[57]!==F?(q=t.jsx(Pe,{onClick:D,children:F}),e[56]=D,e[57]=F,e[58]=q):q=e[58];let O;e[59]!==r||e[60]!==c?(O=()=>c(r),e[59]=r,e[60]=c,e[61]=O):O=e[61];let y;e[62]!==m||e[63]!==o?(y=o(m?"registry.registryItemCard.unmarkAsOfficial":"registry.registryItemCard.markAsOfficial"),e[62]=m,e[63]=o,e[64]=y):y=e[64];let E;e[65]!==O||e[66]!==y?(E=t.jsx(Pe,{onClick:O,children:y}),e[65]=O,e[66]=y,e[67]=E):E=e[67];let W;e[68]!==r||e[69]!==n?(W=()=>n(r),e[68]=r,e[69]=n,e[70]=W):W=e[70];let Z;e[71]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(dt,{size:14}),e[71]=Z):Z=e[71];let te;e[72]!==o?(te=o("registry.registryItemCard.delete"),e[72]=o,e[73]=te):te=e[73];let me;e[74]!==W||e[75]!==te?(me=t.jsxs(Pe,{variant:"destructive",onClick:W,children:[Z,te]}),e[74]=W,e[75]=te,e[76]=me):me=e[76];let se;e[77]!==$||e[78]!==q||e[79]!==E||e[80]!==me?(se=t.jsxs(ht,{align:"end",children:[$,q,E,me]}),e[77]=$,e[78]=q,e[79]=E,e[80]=me,e[81]=se):se=e[81];let ne;e[82]!==v||e[83]!==se?(ne=t.jsxs(ft,{children:[v,se]}),e[82]=v,e[83]=se,e[84]=ne):ne=e[84];let ge;e[85]!==S||e[86]!==ne?(ge=t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[S,ne]}),e[85]=S,e[86]=ne,e[87]=ge):ge=e[87];let de;e[88]!==r._meta||e[89]!==r.description||e[90]!==r.server||e[91]!==o?(de=r._meta?.["mcp.mesh"]?.short_description||r.description||r.server.description||o("registry.registryItemCard.noDescriptionProvided"),e[88]=r._meta,e[89]=r.description,e[90]=r.server,e[91]=o,e[92]=de):de=e[92];let ie;e[93]!==de?(ie=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 min-h-10",children:de}),e[93]=de,e[94]=ie):ie=e[94];let C;e[95]!==r.id||e[96]!==x?(C=x.map(xe=>t.jsx(H,{variant:"secondary",children:xe},`${r.id}-badge-${xe}`)),e[95]=r.id,e[96]=x,e[97]=C):C=e[97];let B;e[98]!==h?(B=h>0&&t.jsxs(H,{variant:"outline",children:["+",h]}),e[98]=h,e[99]=B):B=e[99];let K;e[100]!==C||e[101]!==B?(K=t.jsxs("div",{className:"flex flex-wrap gap-1",children:[C,B]}),e[100]=C,e[101]=B,e[102]=K):K=e[102];let re;return e[103]!==ge||e[104]!==ie||e[105]!==K?(re=t.jsxs(ue,{className:"p-4 gap-4 transition-colors hover:bg-muted/50",children:[ge,ie,K]}),e[103]=ge,e[104]=ie,e[105]=K,e[106]=re):re=e[106],re}function bs(s){const e=J.c(33),{value:r,onChange:i,onBlur:n,onFileUpload:l,error:c,isUploading:o}=s,a=o===void 0?!1:o,u=ce(),[d,m]=T.useState(!1),[f,p]=T.useState(!1),g=T.useRef(null);let x;e[0]!==a?(x=I=>{I.preventDefault(),a||m(!0)},e[0]=a,e[1]=x):x=e[1];const h=x;let j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j=I=>{I.preventDefault(),m(!1)},e[2]=j):j=e[2];const N=j;let w;e[3]!==a||e[4]!==l?(w=async I=>{if(I.preventDefault(),m(!1),a)return;const U=I.dataTransfer.files[0];U&&await l(U)},e[3]=a,e[4]=l,e[5]=w):w=e[5];const _=w;let b;e[6]!==a||e[7]!==l?(b=async I=>{const U=I.target.files?.[0];U&&!a&&await l(U),I.target.value=""},e[6]=a,e[7]=l,e[8]=b):b=e[8];const L=b,k=r.length>0;let P;e[9]!==u?(P=u("registry.imageUpload.image"),e[9]=u,e[10]=P):P=e[10];let R;e[11]!==P?(R=t.jsx(ae,{children:P}),e[11]=P,e[12]=R):R=e[12];let S;e[13]!==h||e[14]!==_||e[15]!==k||e[16]!==d||e[17]!==a||e[18]!==n||e[19]!==i||e[20]!==f||e[21]!==u||e[22]!==r?(S=k?t.jsx("div",{className:"relative group min-h-[180px] rounded-xl border border-border overflow-hidden bg-muted/10",children:t.jsxs("div",{className:"flex items-center gap-3 p-3 h-full",children:[t.jsx("div",{className:"size-20 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0",children:t.jsx("img",{src:r,alt:u("registry.imageUpload.previewAlt"),className:"w-full h-full object-cover"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r}),t.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[t.jsxs(Q,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>g.current?.click(),disabled:a,children:[t.jsx(Lt,{className:"size-3"}),u("registry.imageUpload.change")]}),t.jsxs(Q,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5 text-destructive hover:text-destructive",onClick:()=>{i(""),p(!1)},disabled:a,children:[t.jsx(dt,{className:"size-3"}),u("registry.imageUpload.remove")]})]})]})]})}):a?t.jsxs("div",{className:"relative min-h-[180px] rounded-xl border border-border bg-muted/10 flex flex-col items-center justify-center gap-3",children:[t.jsx(Ye,{className:"size-8 animate-spin text-muted-foreground"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:u("registry.imageUpload.uploadingImage")})]}):t.jsxs("div",{className:ee("relative min-h-[180px] rounded-xl border-2 border-dashed transition-colors cursor-pointer flex flex-col",d?"border-primary bg-primary/5":"border-border hover:border-muted-foreground/40 hover:bg-muted/30"),onDragOver:h,onDragLeave:N,onDrop:_,onClick:()=>g.current?.click(),children:[t.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-6 px-4 flex-1",children:[t.jsx("div",{className:ee("size-10 rounded-lg flex items-center justify-center transition-colors",d?"bg-primary/10 text-primary":"bg-muted/50 text-muted-foreground"),children:t.jsx(Ws,{size:20})}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:u(d?"registry.imageUpload.dropImageHere":"registry.imageUpload.clickOrDragToUpload")}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:u("registry.imageUpload.supportedFormats")})]})]}),f?t.jsx("div",{className:"border-t border-border px-3 py-2",onClick:ni,children:t.jsx(ye,{placeholder:u("registry.imageUpload.urlPlaceholder"),value:r,className:"text-xs h-8",onChange:I=>i(I.target.value),onBlur:n})}):t.jsx("div",{className:"border-t border-border px-4 py-2",children:t.jsxs("button",{type:"button",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors w-full justify-center",onClick:I=>{I.stopPropagation(),p(!0)},children:[t.jsx(gr,{className:"size-3"}),u("registry.imageUpload.orPasteImageUrl")]})})]}),e[13]=h,e[14]=_,e[15]=k,e[16]=d,e[17]=a,e[18]=n,e[19]=i,e[20]=f,e[21]=u,e[22]=r,e[23]=S):S=e[23];let A;e[24]!==L?(A=t.jsx("input",{ref:g,type:"file",accept:"image/*",className:"hidden",onChange:L}),e[24]=L,e[25]=A):A=e[25];let M;e[26]!==c?(M=c&&t.jsx("p",{className:"text-xs text-destructive",children:c}),e[26]=c,e[27]=M):M=e[27];let v;return e[28]!==M||e[29]!==R||e[30]!==S||e[31]!==A?(v=t.jsxs("div",{className:"grid gap-1.5",children:[R,S,A,M]}),e[28]=M,e[29]=R,e[30]=S,e[31]=A,e[32]=v):v=e[32],v}function ni(s){return s.stopPropagation()}function Ns(){const[s,e]=T.useState("idle"),[r,i]=T.useState(null),n=De();return{discover:async(o,a)=>{if(!o)return null;e("loading"),i(null);try{const u=await n.call("REGISTRY_DISCOVER_TOOLS",{url:o,type:a==="sse"?"sse":"http"});return u.error?ai(u.error)?(i(u.error),e("auth_required"),null):(i(u.error),e("error"),null):!u.tools||u.tools.length===0?(i("No tools found on this MCP server."),e("error"),null):(e("success"),u.tools)}catch(u){const d=u instanceof Error?u.message:String(u);return i(d||"Could not discover tools."),e("error"),null}},discoverStatus:s,discoverError:r,resetDiscover:()=>{e("idle"),i(null)}}}function ai(s){const e=s.toLowerCase();return e.includes("authentication")||e.includes("unauthorized")||e.includes("credentials")}function oi(s){const e=J.c(62),{tools:r,onChange:i,remoteUrl:n,remoteType:l,externalDiscoverStatus:c,externalDiscoverError:o}=s,a=ce(),[u,d]=T.useState(r.length>0),{discover:m,discoverStatus:f,discoverError:p,resetDiscover:g}=Ns(),x=c??f,h=o??p;let j;e[0]!==m||e[1]!==i||e[2]!==l||e[3]!==n?(j=async()=>{if(!n)return;const y=await m(n,l??"http");y&&(i(y),d(!0))},e[0]=m,e[1]=i,e[2]=l,e[3]=n,e[4]=j):j=e[4];const N=j;let w;e[5]!==i||e[6]!==g?(w=()=>{i([]),g()},e[5]=i,e[6]=g,e[7]=w):w=e[7];const _=w;let b;e[8]!==u?(b=()=>d(!u),e[8]=u,e[9]=b):b=e[9];let L;e[10]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(ms,{size:14,className:"text-muted-foreground"}),e[10]=L):L=e[10];let k;e[11]!==a?(k=a("registry.toolsEditor.tools"),e[11]=a,e[12]=k):k=e[12];let P;e[13]!==k?(P=t.jsx("span",{children:k}),e[13]=k,e[14]=P):P=e[14];let R;e[15]!==r.length?(R=r.length>0&&t.jsx(H,{variant:"secondary",className:"text-xs px-1.5 py-0",children:r.length}),e[15]=r.length,e[16]=R):R=e[16];let S;e[17]!==u?(S=u?t.jsx(hr,{size:14,className:"text-muted-foreground"}):t.jsx(pr,{size:14,className:"text-muted-foreground"}),e[17]=u,e[18]=S):S=e[18];let A;e[19]!==b||e[20]!==P||e[21]!==R||e[22]!==S?(A=t.jsxs("button",{type:"button",className:"flex items-center gap-2 text-sm font-medium cursor-pointer",onClick:b,children:[L,P,R,S]}),e[19]=b,e[20]=P,e[21]=R,e[22]=S,e[23]=A):A=e[23];let M;e[24]!==_||e[25]!==a||e[26]!==r.length?(M=r.length>0&&t.jsxs(Q,{type:"button",variant:"ghost",size:"sm",className:"h-7 text-xs gap-1.5 text-muted-foreground",onClick:_,children:[t.jsx(dt,{size:12}),a("registry.toolsEditor.clear")]}),e[24]=_,e[25]=a,e[26]=r.length,e[27]=M):M=e[27];let v;e[28]!==x||e[29]!==N||e[30]!==n||e[31]!==a||e[32]!==r.length?(v=n&&t.jsxs(Q,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5 border-success/30 text-success shadow-[0_0_8px_color-mix(in_oklch,var(--success)_30%,transparent)] hover:shadow-[0_0_14px_color-mix(in_oklch,var(--success)_50%,transparent)] hover:border-success/50 transition-all",onClick:N,disabled:x==="loading",children:[x==="loading"?t.jsx(Ye,{size:12,className:"animate-spin"}):t.jsx(Lt,{size:12}),x==="loading"?a("registry.toolsEditor.discovering"):r.length>0?a("registry.toolsEditor.refresh"):a("registry.toolsEditor.autoDiscover")]}),e[28]=x,e[29]=N,e[30]=n,e[31]=a,e[32]=r.length,e[33]=v):v=e[33];let I;e[34]!==M||e[35]!==v?(I=t.jsxs("div",{className:"flex items-center gap-2",children:[M,v]}),e[34]=M,e[35]=v,e[36]=I):I=e[36];let U;e[37]!==I||e[38]!==A?(U=t.jsxs("div",{className:"flex items-center justify-between",children:[A,I]}),e[37]=I,e[38]=A,e[39]=U):U=e[39];let $;e[40]!==x||e[41]!==a||e[42]!==r.length?($=x==="success"&&t.jsxs("div",{className:"flex items-center gap-2 text-xs text-success bg-success/10 rounded-lg px-3 py-2",children:[t.jsx(We,{size:14,className:"shrink-0"}),t.jsx("span",{children:a("registry.toolsEditor.discoveredSuccess",{count:r.length})})]}),e[40]=x,e[41]=a,e[42]=r.length,e[43]=$):$=e[43];let D;e[44]!==h||e[45]!==x?(D=x==="error"&&h&&t.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[t.jsx(tt,{size:14,className:"shrink-0"}),t.jsx("span",{children:h})]}),e[44]=h,e[45]=x,e[46]=D):D=e[46];let F;e[47]!==u||e[48]!==r?(F=u&&r.length>0&&t.jsx("div",{className:"rounded-xl border border-border divide-y divide-border overflow-hidden max-h-48 overflow-y-auto",children:r.map(li)}),e[47]=u,e[48]=r,e[49]=F):F=e[49];let q;e[50]!==x||e[51]!==u||e[52]!==n||e[53]!==a||e[54]!==r.length?(q=u&&r.length===0&&x==="idle"&&t.jsx("p",{className:"text-xs text-muted-foreground px-1",children:a(n?"registry.toolsEditor.emptyHintWithUrl":"registry.toolsEditor.emptyHintWithoutUrl")}),e[50]=x,e[51]=u,e[52]=n,e[53]=a,e[54]=r.length,e[55]=q):q=e[55];let O;return e[56]!==U||e[57]!==$||e[58]!==D||e[59]!==F||e[60]!==q?(O=t.jsxs("div",{className:"space-y-3",children:[U,$,D,F,q]}),e[56]=U,e[57]=$,e[58]=D,e[59]=F,e[60]=q,e[61]=O):O=e[61],O}function li(s){return t.jsx("div",{className:"flex items-center gap-3 px-3 py-2",children:t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-mono truncate",children:s.name}),s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description})]})},s.name)}function Cs(s){const{org:e}=be(),[r,i]=T.useState(!1),l=typeof window<"u"&&window.location.hostname==="localhost"?`${e.id}_dev-assets`:null,c=Ue({connectionId:l??"noop",orgId:e.id,orgSlug:e.slug});return{uploadImage:async(a,u)=>{if(!l)return G.error("Image upload requires an object-storage connection. Configure one in plugin settings."),null;if(!a.type.startsWith("image/"))return G.error("Only image files are supported"),null;if(a.size>5*1024*1024)return G.error("Image size must be less than 5MB"),null;i(!0);try{const d=await c.callTool({name:"PUT_PRESIGNED_URL",arguments:{key:u,contentType:a.type}}),m=d.structuredContent?.url||d.url;if(!m)throw new Error("Failed to get presigned URL");const f=await fetch(m,{method:"PUT",body:a,headers:{"Content-Type":a.type}});if(!f.ok)throw new Error(`Upload failed: ${f.statusText}`);const p=await c.callTool({name:"GET_PRESIGNED_URL",arguments:{key:u,expiresIn:31536e3}}),g=p.structuredContent?.url||p.url;if(!g)throw new Error("Failed to get public URL");return g}catch(d){return console.error("Image upload failed:",d),G.error(d instanceof Error?d.message:"Failed to upload image. Please try again."),null}finally{i(!1)}},isUploading:r}}const ci=new Set(["http","sse","stdio"]),di=/^[a-z0-9]+(?:[/-][a-z0-9._-]+)*$/,ui=["internal","automation","support","sales","ops","ai"],mi=["productivity","communication","customer-support","development","data","operations"],gi=["registry.registryItemDialog.essentials","registry.registryItemDialog.details","registry.registryItemDialog.advanced"],xi="h-7 text-xs border-success/30 text-success shadow-[0_0_8px_color-mix(in_oklch,var(--success)_30%,transparent)] hover:shadow-[0_0_14px_color-mix(in_oklch,var(--success)_50%,transparent)] hover:border-success/50 transition-all";function ls(s){return s.replace(/^https?:\/\//i,"").trim()}function et(s){const e=s.trim();return e?/^https?:\/\//i.test(e)?e:`https://${e}`:""}function Qe(s){return s.trim().toLowerCase()}function _t(s){return Array.from(new Set(s.map(Qe).filter(e=>e.length>0)))}function Ke(s){return s.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9._-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function pi(s){const e=J.c(5),{current:r}=s,i=ce();let n;e[0]!==r||e[1]!==i?(n=gi.map((c,o)=>{const a=o+1,u=a===r,d=a<r;return t.jsxs("div",{className:"flex items-center gap-1.5",children:[o>0&&t.jsx("div",{className:ee("w-4 h-px",d?"bg-primary":"bg-border")}),t.jsxs("div",{className:ee("flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs transition-colors",u?"bg-primary/10 text-primary font-medium":d?"text-primary":"text-muted-foreground"),children:[t.jsx("span",{className:ee("size-5 rounded-full inline-flex items-center justify-center text-[10px] font-semibold shrink-0",u?"bg-primary text-primary-foreground":d?"bg-primary/20 text-primary":"bg-muted text-muted-foreground"),children:a}),t.jsx("span",{className:"hidden sm:inline",children:i(c)})]})]},c)}),e[0]=r,e[1]=i,e[2]=n):n=e[2];let l;return e[3]!==n?(l=t.jsx("div",{className:"flex items-center gap-1.5",children:n}),e[3]=n,e[4]=l):l=e[4],l}function hi(s){const e=J.c(32),{id:r,labelKey:i,values:n,availableOptions:l,placeholderKey:c,onChange:o}=s,a=ce(),[u,d]=T.useState(""),[m,f]=T.useState(!1);let p,g,x,h,j;if(e[0]!==l||e[1]!==r||e[2]!==u||e[3]!==m||e[4]!==i||e[5]!==o||e[6]!==c||e[7]!==a||e[8]!==n){const _=_t(l),b=_t(n),L=new Set(b),k=Qe(u),P=_.filter(D=>!L.has(D)).filter(D=>k?D.includes(k):!0).slice(0,8),R=D=>{const F=Qe(D);!F||L.has(F)||o([...b,F])},S=D=>{o(b.filter(F=>F!==D))},A=()=>{const D=u.split(/[,\n;]/).map(Qe).filter(Boolean);if(D.length===0)return;const F=[...b];for(const q of D)F.includes(q)||F.push(q);o(F),d("")},M=k;h="grid gap-2";let v;e[14]!==i||e[15]!==a?(v=a(i),e[14]=i,e[15]=a,e[16]=v):v=e[16],e[17]!==r||e[18]!==v?(j=t.jsx(ae,{htmlFor:r,children:v}),e[17]=r,e[18]=v,e[19]=j):j=e[19],p="relative";let I;e[20]!==r?(I=()=>{const D=document.getElementById(r);D instanceof HTMLInputElement&&D.focus()},e[20]=r,e[21]=I):I=e[21];let U;e[22]===Symbol.for("react.memo_cache_sentinel")?(U=()=>f(!0),e[22]=U):U=e[22];let $;e[23]===Symbol.for("react.memo_cache_sentinel")?($=D=>d(D.target.value),e[23]=$):$=e[23],g=t.jsx("div",{className:"min-h-9 w-full rounded-xl border border-input bg-background px-2.5 py-1.5 text-sm focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",onClick:I,children:t.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[b.map(D=>t.jsxs(H,{variant:"secondary",className:"gap-1",children:[D,t.jsx("button",{type:"button",onClick:F=>{F.preventDefault(),F.stopPropagation(),S(D)},children:t.jsx(mr,{size:12})})]},`${r}-${D}`)),t.jsx("input",{id:r,className:"flex-1 min-w-[120px] bg-transparent outline-none border-none text-sm",placeholder:b.length?"":a(c),value:u,onFocus:U,onBlur:()=>{f(!1),A()},onChange:$,onKeyDown:D=>{if(D.key==="Enter"||D.key===","){D.preventDefault(),A();return}D.key==="Backspace"&&!u&&b.length&&S(b[b.length-1]??"")}})]})}),x=m&&t.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-xl border border-border bg-background shadow-lg max-h-56 overflow-y-auto",children:P.length>0?P.map(D=>t.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:yi,onClick:()=>{R(D),d("")},children:D},`${r}-suggestion-${D}`)):M?t.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:fi,onClick:()=>{R(M),d("")},children:a("registry.registryItemDialog.createTag",{value:M})}):t.jsx("div",{className:"px-2.5 py-1.5 text-sm text-muted-foreground",children:a("registry.registryItemDialog.typeToSearchOrCreate")})}),e[0]=l,e[1]=r,e[2]=u,e[3]=m,e[4]=i,e[5]=o,e[6]=c,e[7]=a,e[8]=n,e[9]=p,e[10]=g,e[11]=x,e[12]=h,e[13]=j}else p=e[9],g=e[10],x=e[11],h=e[12],j=e[13];let N;e[24]!==p||e[25]!==g||e[26]!==x?(N=t.jsxs("div",{className:p,children:[g,x]}),e[24]=p,e[25]=g,e[26]=x,e[27]=N):N=e[27];let w;return e[28]!==h||e[29]!==j||e[30]!==N?(w=t.jsxs("div",{className:h,children:[j,N]}),e[28]=h,e[29]=j,e[30]=N,e[31]=w):w=e[31],w}function fi(s){return s.preventDefault()}function yi(s){return s.preventDefault()}function ji({id:s,value:e,availableOptions:r,onChange:i}){const n=ce(),[l,c]=T.useState(e),[o,a]=T.useState(!1),u=T.useRef(e);u.current!==e&&(u.current=e,c(e));const d=_t([...mi,...r,e]).filter(Boolean),m=Qe(l),f=d.filter(g=>m?g.includes(m):!0).slice(0,8),p=g=>{const x=Qe(g);i(x),c(x),a(!1)};return t.jsxs("div",{className:"grid gap-2",children:[t.jsx(ae,{htmlFor:s,children:n("registry.registryItemDialog.category")}),t.jsxs("div",{className:"relative",children:[t.jsx(ye,{id:s,className:"h-9 text-sm",placeholder:n("registry.registryItemDialog.selectOrCreateCategory"),value:l,onFocus:()=>{c(e),a(!0)},onBlur:()=>{p(l)},onChange:g=>c(g.target.value),onKeyDown:g=>{g.key==="Enter"&&(g.preventDefault(),p(l))}}),e&&t.jsx("button",{type:"button",className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs text-muted-foreground hover:text-foreground",onMouseDown:g=>g.preventDefault(),onClick:()=>{i(""),c("")},children:n("registry.registryItemDialog.clear")}),o&&t.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-xl border border-border bg-background shadow-lg max-h-56 overflow-y-auto",children:f.length>0?f.map(g=>t.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:x=>x.preventDefault(),onClick:()=>p(g),children:g},`${s}-${g}`)):m?t.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:g=>g.preventDefault(),onClick:()=>p(m),children:n("registry.registryItemDialog.createCategory",{value:m})}):t.jsx("div",{className:"px-2.5 py-1.5 text-sm text-muted-foreground",children:n("registry.registryItemDialog.typeToSearchOrCreate")})})]})]})}function vi({open:s,onOpenChange:e,item:r,draft:i,availableTags:n=[],availableCategories:l=[],isSubmitting:c=!1,onSubmit:o}){const a=ce(),{org:u}=be(),{uploadImage:d,isUploading:m}=Cs(),{discover:f,discoverStatus:p,discoverError:g,resetDiscover:x}=Ns(),h=!!r,j=i?._meta?.["mcp.mesh"],N=r?.title??i?.title??"",w=r?.id?.split("/")[0]??i?.id?.split("/")[0]??"",_=r?.description??i?.description??"",b=r?._meta?.["mcp.mesh"]?.short_description??j?.short_description??"",L=r?._meta?.["mcp.mesh"]?.owner??j?.owner??"",k=r?.server?.repository?.url??i?.server?.repository?.url??"",P=r?._meta?.["mcp.mesh"]?.readme??j?.readme??"",R=r?._meta?.["mcp.mesh"]?.readme_url??j?.readme_url??"",S=ls(r?.server?.remotes?.[0]?.url??i?.server?.remotes?.[0]?.url??""),A=r?.server?.remotes?.[0]?.type??i?.server?.remotes?.[0]?.type??"http",M=r?._meta?.["mcp.mesh"]?.tags??j?.tags??[],v=r?._meta?.["mcp.mesh"]?.categories?.[0]??j?.categories?.[0]??"",I=r?.server?.icons?.[0]?.src??i?.server?.icons?.[0]?.src??"",U=r?._meta?.["mcp.mesh"]?.tools??j?.tools??[],$=r?.is_public??i?.is_public??!1,D=r?._meta?.["mcp.mesh"]?.verified??j?.verified??!1,F=r?._meta?.["mcp.mesh"]?.official??j?.official??!1,[q,O]=T.useState(1),[y,E]=T.useState(N),[W,Z]=T.useState(w),[te,me]=T.useState(_),[se,ne]=T.useState(b),[ge,de]=T.useState(L),[ie,C]=T.useState(k),[B,K]=T.useState(P),[re,xe]=T.useState(R),[oe,Re]=T.useState(P?"content":"link"),[Ne,z]=T.useState(S),[le,Ie]=T.useState(A),[_e,Fe]=T.useState(M),[Te,je]=T.useState(v),[Oe,Rt]=T.useState(I),[ke,mt]=T.useState(U),[Bt,Kt]=T.useState($),[Ht,Vt]=T.useState(D),[Gt,Qt]=T.useState(F),[fe,Ze]=T.useState({}),Yt=()=>{O(1),E(N),Z(w),me(_),ne(b),de(L),C(k),K(P),xe(R),Re(P?"content":"link"),z(S),Ie(A),Fe(M),je(v),Rt(I),mt(U),Kt($),Vt(D),Qt(F),Ze({}),x(),gt.current="",$e.current&&(clearTimeout($e.current),$e.current=null)},Is=async V=>{if(!V)return;const X=h?r?.id:`${W}/${y}`.toLowerCase(),Ce=Ke(X||"temp"),Me=V.name.split(".").pop()||"png",qe=`registry/${u.id}/${Ce}/icon.${Me}`,Be=await d(V,qe);Be?(Rt(Be),Ze(Ee=>({...Ee,imageUrl:void 0}))):Ze(Ee=>({...Ee,imageUrl:a("registry.registryItemDialog.failedToUploadImage")}))},$e=T.useRef(null),gt=T.useRef(""),It=T.useRef(le);It.current=le;const Wt=V=>{!V&&$e.current&&(clearTimeout($e.current),$e.current=null),e(V),V||Yt()},ks=async()=>{const V=et(Ne);if(!V)return;gt.current=V;const X=await f(V,It.current);X&&mt(X)},Ss=V=>{$e.current&&clearTimeout($e.current);const X=et(V);!X||X===gt.current||V.includes(".")&&($e.current=setTimeout(async()=>{gt.current=X;const Ce=await f(X,It.current);Ce&&mt(Ce)},800))},Jt=V=>{const X={};if(V===1){const Ce=Ke(W),Me=Ke(y),qe=`${Ce}/${Me}`;y.trim()||(X.title=a("registry.registryItemDialog.nameIsRequired")),h||(Ce?Me?di.test(qe)||(X.provider=a("registry.registryItemDialog.useValidIdFormat")):X.title=a("registry.registryItemDialog.nameMustContainValidCharacters"):X.provider=a("registry.registryItemDialog.providerIsRequired"));const Be=et(Ne),Ee=le.trim().toLowerCase();if(Ee!=="stdio"&&Be)try{const Xe=new URL(Be);["http:","https:"].includes(Xe.protocol)||(X.remoteUrl=a("registry.registryItemDialog.remoteUrlMustBeHttps"))}catch{X.remoteUrl=a("registry.registryItemDialog.remoteUrlIsInvalid")}if(Ee&&!ci.has(Ee)&&(X.remoteType=a("registry.registryItemDialog.remoteTypeMustBe")),Oe.trim()&&!Oe.trim().startsWith("data:image/"))try{const kt=new URL(Oe.trim());["http:","https:"].includes(kt.protocol)||(X.imageUrl=a("registry.registryItemDialog.imageUrlMustBeHttps"))}catch{X.imageUrl=a("registry.registryItemDialog.imageUrlIsInvalid")}}if(V===2&&(te.length>1500&&(X.description=a("registry.registryItemDialog.descriptionMaxLength")),se.trim().length>160&&(X.shortDescription=a("registry.registryItemDialog.shortDescriptionMaxLength"))),V===3){const Ce=re.trim();if(Ce)try{const qe=new URL(Ce);["http:","https:"].includes(qe.protocol)||(X.readmeUrl=a("registry.registryItemDialog.readmeUrlMustBeHttps"))}catch{X.readmeUrl=a("registry.registryItemDialog.readmeUrlIsInvalid")}B.trim().length>5e4&&(X.readme=a("registry.registryItemDialog.readmeMaxLength"));const Me=ie.trim();if(Me)try{const qe=new URL(Me);["http:","https:"].includes(qe.protocol)||(X.repositoryUrl=a("registry.registryItemDialog.repositoryUrlMustBeHttps"))}catch{X.repositoryUrl=a("registry.registryItemDialog.repositoryUrlIsInvalid")}}return Ze(X),Object.values(X).every(Ce=>Ce===void 0)},Ds=()=>{Jt(q)&&q<3&&O(q+1)},Ts=()=>{q>1&&O(q-1)},Ms=async()=>{if(!Jt(3))return;const V=y.trim(),X=Ke(W),Ce=Ke(V),Me=`${X}/${Ce}`,qe=et(Ne),Be=le.trim().toLowerCase(),Ee=Oe.trim(),Xe=ie.trim(),kt=se.trim(),As=B.trim(),Us=re.trim(),Fs=_t(_e),$s=Te?[Qe(Te)]:[],zs=r?r.server?.name??r.id:"",Os=(h?zs:Me).trim(),St=te.trim(),Bs=ge.trim(),Zt={title:V,description:St.length>0?St:null,is_public:Bt,_meta:{"mcp.mesh":{verified:Ht,official:Gt,tags:Fs,categories:$s,short_description:kt||null,owner:Bs||null,readme:As||null,readme_url:Us||null,...ke.length>0?{tools:ke}:{}}},server:{name:Os,title:V,description:St||void 0,icons:Ee?[{src:Ee}]:[],repository:Xe?{url:Xe}:void 0,remotes:qe?[{type:Be||"http",url:qe}]:[]}};if(h&&r){await o({id:r.id,data:Zt}),e(!1);return}await o({id:Me,...Zt}),e(!1),Yt()},qs=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"row-span-2 grid gap-3 content-start",children:[t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{htmlFor:"registry-item-provider",children:a("registry.registryItemDialog.provider")}),t.jsx(ye,{id:"registry-item-provider",className:"h-9 text-sm",placeholder:"acme",value:W,onChange:V=>Z(V.target.value),disabled:h}),!h&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("registry.registryItemDialog.itemId")," ",t.jsx("span",{className:"font-mono",children:`${Ke(W)||"provider"}/${Ke(y)||"name"}`})]}),fe.provider&&t.jsx("p",{className:"text-xs text-destructive",children:fe.provider})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{htmlFor:"registry-item-title",children:a("registry.registryItemDialog.name")}),t.jsx(ye,{id:"registry-item-title",className:"h-9 text-sm",placeholder:"Internal MCP",value:y,onChange:V=>E(V.target.value)}),fe.title&&t.jsx("p",{className:"text-xs text-destructive",children:fe.title})]})]}),t.jsx("div",{className:"row-span-2 content-start",children:t.jsx(bs,{value:Oe,onChange:V=>{Rt(V),Ze(X=>({...X,imageUrl:void 0}))},onFileUpload:Is,error:fe.imageUrl,isUploading:m})}),t.jsxs("div",{className:"col-span-2 grid gap-1.5",children:[t.jsx(ae,{htmlFor:"registry-remote-url",children:a("registry.registryItemDialog.remoteUrl")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("div",{className:"flex-1 flex items-center rounded-xl border border-input px-3",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground mr-1",children:"https://"}),t.jsx("input",{id:"registry-remote-url",className:"flex-1 h-9 bg-transparent outline-none text-sm",placeholder:"example.com/mcp",value:Ne,onChange:V=>{const X=ls(V.target.value);z(X),Ss(X)}})]}),t.jsxs(or,{value:le,onValueChange:Ie,children:[t.jsx(lr,{id:"registry-remote-type",className:"w-[90px] h-9 shrink-0",children:t.jsx(cr,{placeholder:a("registry.registryItemDialog.type")})}),t.jsxs(dr,{children:[t.jsx(Dt,{value:"http",children:"http"}),t.jsx(Dt,{value:"sse",children:"sse"}),t.jsx(Dt,{value:"stdio",children:"stdio"})]})]})]}),fe.remoteUrl&&t.jsx("p",{className:"text-xs text-destructive",children:fe.remoteUrl}),fe.remoteType&&t.jsx("p",{className:"text-xs text-destructive",children:fe.remoteType})]}),Ne.trim()&&t.jsxs("div",{className:"col-span-2 space-y-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs(Q,{type:"button",variant:"outline",size:"sm",className:ee(xi,"gap-1.5"),onClick:ks,disabled:p==="loading",children:[p==="loading"?t.jsx(Ye,{size:12,className:"animate-spin"}):t.jsx(Lt,{size:12}),p==="loading"?a("registry.registryItemDialog.discoveringTools"):ke.length>0?a("registry.registryItemDialog.rediscoverTools"):a("registry.registryItemDialog.discoverToolsFromUrl")]}),ke.length>0&&p!=="loading"&&t.jsx("span",{className:"text-xs text-muted-foreground",children:a("registry.registryItemDialog.toolsLoaded",{count:ke.length.toString()})})]}),p==="success"&&ke.length>0&&t.jsxs("div",{className:"rounded-lg border border-success/20 bg-success/10 px-3 py-2 space-y-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2 text-xs text-success",children:[t.jsx(We,{size:14,className:"shrink-0"}),t.jsx("span",{className:"font-medium",children:a("registry.registryItemDialog.toolsDiscovered",{count:ke.length.toString()})})]}),t.jsxs("div",{className:"flex flex-wrap gap-1",children:[ke.slice(0,8).map(V=>t.jsx(H,{variant:"secondary",className:"text-[10px] px-1.5 py-0 font-mono",children:V.name},V.name)),ke.length>8&&t.jsx("span",{className:"text-[10px] text-muted-foreground self-center",children:a("registry.registryItemDialog.andMore",{count:(ke.length-8).toString()})})]}),t.jsx("p",{className:"text-[10px] text-muted-foreground",children:a("registry.registryItemDialog.toolsWillEnrich")})]}),p==="auth_required"&&g&&t.jsxs("div",{className:"flex items-center gap-2 text-xs text-warning bg-warning/10 border border-warning/20 rounded-lg px-3 py-2",children:[t.jsx(tt,{size:14,className:"shrink-0"}),t.jsx("span",{children:a("registry.registryItemDialog.authRequiredMessage")})]}),p==="error"&&g&&t.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[t.jsx(tt,{size:14,className:"shrink-0"}),t.jsx("span",{children:g})]})]})]}),Es=t.jsxs("div",{className:"grid gap-3",children:[t.jsxs("div",{className:"grid gap-1.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(ae,{htmlFor:"registry-item-short-description",children:a("registry.registryItemDialog.shortDescription")}),t.jsxs("span",{className:"text-xs text-muted-foreground",children:[se.length,"/160"]})]}),t.jsx(ye,{id:"registry-item-short-description",className:"h-9 text-sm",placeholder:a("registry.registryItemDialog.shortSummaryForStoreCard"),value:se,maxLength:160,onChange:V=>ne(V.target.value)}),fe.shortDescription&&t.jsx("p",{className:"text-xs text-destructive",children:fe.shortDescription})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(ae,{htmlFor:"registry-item-description",children:a("registry.registryItemDialog.description")}),t.jsxs("span",{className:"text-xs text-muted-foreground",children:[te.length,"/1500"]})]}),t.jsx(wt,{id:"registry-item-description",className:"text-sm max-h-28 overflow-y-auto resize-none",placeholder:a("registry.registryItemDialog.briefDescription"),rows:2,value:te,onChange:V=>me(V.target.value)}),fe.description&&t.jsx("p",{className:"text-xs text-destructive",children:fe.description})]}),t.jsx("div",{className:"border-t border-border"}),t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsx("div",{className:"grid content-start gap-2",children:t.jsx(ji,{id:"registry-category",value:Te,availableOptions:l,onChange:je})}),t.jsx("div",{className:"grid content-start gap-2",children:t.jsx(hi,{id:"registry-tags",labelKey:"registry.registryItemDialog.tags",values:_e,availableOptions:[...ui,...n],placeholderKey:"registry.registryItemDialog.typeAndPressEnter",onChange:Fe})})]}),t.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:[t.jsxs("div",{className:"grid gap-0.5",children:[t.jsx(ae,{htmlFor:"registry-is-public",className:"text-sm",children:a("registry.registryItemDialog.public")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("registry.registryItemDialog.makeThisMcpVisible")})]}),t.jsx(Ge,{id:"registry-is-public",checked:Bt,onCheckedChange:Kt})]}),t.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:[t.jsxs("div",{className:"grid gap-0.5",children:[t.jsx(ae,{htmlFor:"registry-is-verified",className:"text-sm",children:a("registry.registryItemDialog.verified")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("registry.registryItemDialog.curatedAndApproved")})]}),t.jsx(Ge,{id:"registry-is-verified",checked:Ht,onCheckedChange:Vt})]}),t.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:[t.jsxs("div",{className:"grid gap-0.5",children:[t.jsx(ae,{htmlFor:"registry-is-official",className:"text-sm",children:a("registry.registryItemDialog.official")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("registry.registryItemDialog.madeAndHostedByServiceProvider")})]}),t.jsx(Ge,{id:"registry-is-official",checked:Gt,onCheckedChange:Qt})]})]}),Ls=t.jsxs("div",{className:"grid gap-3",children:[t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{htmlFor:"registry-item-owner",children:a("registry.registryItemDialog.ownerOptional")}),t.jsx(ye,{id:"registry-item-owner",className:"h-9 text-sm",placeholder:a("registry.registryItemDialog.teamCompanyOrPerson"),value:ge,onChange:V=>de(V.target.value)})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{htmlFor:"registry-item-repository-url",children:a("registry.registryItemDialog.repositoryUrlOptional")}),t.jsx(ye,{id:"registry-item-repository-url",className:"h-9 text-sm",placeholder:"https://github.com/org/repo",value:ie,onChange:V=>C(V.target.value)}),fe.repositoryUrl&&t.jsx("p",{className:"text-xs text-destructive",children:fe.repositoryUrl})]})]}),t.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(ae,{children:a("registry.registryItemDialog.readme")}),t.jsxs("span",{className:"text-xs text-muted-foreground",children:[B.length,"/50000"]})]}),t.jsx("div",{className:"inline-flex rounded-lg border border-border p-0.5",children:["link","content"].map(V=>t.jsx("button",{type:"button",className:ee("px-2.5 py-1 text-xs rounded-md",oe===V?"bg-primary text-primary-foreground":"text-muted-foreground"),onClick:()=>Re(V),children:a(V==="link"?"registry.registryItemDialog.link":"registry.registryItemDialog.content")},V))}),oe==="link"&&t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ye,{className:"h-9 text-sm",placeholder:"https://raw.githubusercontent.com/org/repo/main/README.md",value:re,onChange:V=>xe(V.target.value)}),fe.readmeUrl&&t.jsx("p",{className:"text-xs text-destructive",children:fe.readmeUrl})]}),oe==="content"&&t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(wt,{className:"text-sm max-h-48 overflow-y-auto resize-none",placeholder:`# README
|
|
26
|
-
|
|
27
|
-
Describe your MCP here...`,rows:6,value:B,onChange:V=>K(V.target.value)}),fe.readme&&t.jsx("p",{className:"text-xs text-destructive",children:fe.readme})]})]}),t.jsx(oi,{tools:ke,onChange:mt,remoteUrl:et(Ne)||void 0,remoteType:le,externalDiscoverStatus:p,externalDiscoverError:g})]});return t.jsx(yt,{open:s,onOpenChange:Wt,children:t.jsxs(jt,{className:"sm:max-w-[820px] max-h-[90vh] overflow-hidden flex flex-col",children:[t.jsxs(Nt,{className:"space-y-3",children:[t.jsx(vt,{children:a(h?"registry.registryItemDialog.editMcpServer":"registry.registryItemDialog.addMcpServer")}),t.jsx(pi,{current:q}),t.jsxs(bt,{children:[q===1&&a("registry.registryItemDialog.step1Description"),q===2&&a("registry.registryItemDialog.step2Description"),q===3&&a("registry.registryItemDialog.step3Description")]})]}),t.jsxs("div",{className:"flex-1 overflow-y-auto pr-1 py-2",children:[q===1&&qs,q===2&&Es,q===3&&Ls]}),t.jsxs(Ct,{className:"flex items-center justify-between gap-2 sm:justify-between",children:[t.jsx("div",{children:q>1&&t.jsxs(Q,{variant:"ghost",size:"sm",onClick:Ts,children:[t.jsx(Js,{size:14}),a("registry.registryItemDialog.back")]})}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Q,{variant:"outline",size:"sm",onClick:()=>Wt(!1),disabled:c,children:a("registry.registryItemDialog.cancel")}),q<3?t.jsxs(Q,{size:"sm",onClick:Ds,children:[a("registry.registryItemDialog.next"),t.jsx(ur,{size:14})]}):t.jsx(Q,{size:"sm",onClick:Ms,disabled:c,children:a(c?"registry.registryItemDialog.saving":h?"registry.registryItemDialog.saveChanges":"registry.registryItemDialog.create")})]})]})]})})}function cs(s,e){return s.includes(e)?s.filter(r=>r!==e):[...s,e]}function bi(s){return s._meta?.["mcp.mesh"]?.tags??[]}function Ni(s){return s._meta?.["mcp.mesh"]?.categories??[]}function Ci(s){return s.server?.remotes?.[0]?.url??"-"}function wi(){const s=ce(),e="h-8",[r,i]=T.useState(""),n=T.useDeferredValue(r),[l,c]=T.useState([]),[o,a]=T.useState([]),[u,d]=T.useState(!1),[m,f]=T.useState(!1),[p,g]=T.useState(null),[x,h]=T.useState(null),[j,N]=rr("private-registry-list","cards"),w=T.useRef(null),_=js({search:n,tags:l,categories:o}),b=Lr(),{createMutation:L,updateMutation:k,deleteMutation:P,bulkCreateMutation:R}=Ot(),S=_.data?.pages.flatMap(y=>y.items??[]).filter(Boolean)??[],A=_.data?.pages[0]?.totalCount??S.length,M=l.length>0||o.length>0||n.length>0,v=b.data,I=Array.isArray(v?.tags)?v.tags:[],U=Array.isArray(v?.categories)?v.categories:[],$=y=>{w.current&&(w.current.disconnect(),w.current=null),!(!y||!_.hasNextPage||_.isFetchingNextPage)&&(w.current=new IntersectionObserver(E=>{E[0]?.isIntersecting&&_.hasNextPage&&!_.isFetchingNextPage&&_.fetchNextPage()},{rootMargin:"240px 0px"}),w.current.observe(y))},D=async y=>{try{"data"in y?(await k.mutateAsync(y),G.success(s("registry.registryItemsPage.registryItemUpdated"))):(await L.mutateAsync(y),G.success(s("registry.registryItemsPage.registryItemCreated")))}catch(E){throw G.error(E instanceof Error?E.message:s("registry.registryItemsPage.failedToSaveItem")),E}},F=async y=>{const E=y._meta?.["mcp.mesh"]?.verified===!0;try{await k.mutateAsync({id:y.id,data:{_meta:{...y._meta,"mcp.mesh":{...y._meta?.["mcp.mesh"],verified:!E}}}}),G.success(s(E?"registry.registryItemsPage.removedVerifiedStatus":"registry.registryItemsPage.markedAsVerified"))}catch(W){G.error(W instanceof Error?W.message:s("registry.registryItemsPage.failedToUpdateItem"))}},q=async y=>{const E=y._meta?.["mcp.mesh"]?.official===!0;try{await k.mutateAsync({id:y.id,data:{_meta:{...y._meta,"mcp.mesh":{...y._meta?.["mcp.mesh"],official:!E}}}}),G.success(s(E?"registry.registryItemsPage.removedOfficialStatus":"registry.registryItemsPage.markedAsOfficial"))}catch(W){G.error(W instanceof Error?W.message:s("registry.registryItemsPage.failedToUpdateItem"))}},O=async()=>{if(x)try{await P.mutateAsync(x.id),G.success(s("registry.registryItemsPage.registryItemDeleted")),h(null)}catch(y){G.error(y instanceof Error?y.message:s("registry.registryItemsPage.failedToDeleteItem"))}};return t.jsxs("div",{className:"h-full flex flex-col",children:[t.jsxs("div",{className:"shrink-0 border-b border-border",children:[t.jsxs("div",{className:"h-12 px-4 md:px-6 flex items-center justify-between gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx("h2",{className:"text-sm font-medium",children:s("registry.registryItemsPage.items")}),t.jsx(H,{variant:"secondary",className:"text-xs",children:A})]}),t.jsxs("div",{className:"flex items-center gap-2 self-stretch",children:[t.jsxs(ft,{children:[t.jsx(pt,{asChild:!0,children:t.jsxs(Q,{variant:"outline",size:"sm",className:ee(e,"gap-1.5"),children:[t.jsx(ir,{size:14}),s("registry.registryItemsPage.filters")]})}),t.jsxs(ht,{align:"end",className:"w-[260px]",children:[t.jsx(es,{children:s("registry.registryItemsPage.tags")}),I.length>0?I.map(y=>t.jsxs(ts,{checked:l.includes(y.value),onCheckedChange:()=>c(E=>cs(E,y.value)),children:[y.value," (",y.count,")"]},y.value)):t.jsx(Pe,{disabled:!0,children:s("registry.registryItemsPage.noTagsAvailable")}),t.jsx(tr,{}),t.jsx(es,{children:s("registry.registryItemsPage.categories")}),U.length>0?U.map(y=>t.jsxs(ts,{checked:o.includes(y.value),onCheckedChange:()=>a(E=>cs(E,y.value)),children:[y.value," (",y.count,")"]},y.value)):t.jsx(Pe,{disabled:!0,children:s("registry.registryItemsPage.noCategoriesAvailable")})]})]}),t.jsxs(sr,{type:"single",value:j,onValueChange:y=>{(y==="cards"||y==="table")&&N(y)},variant:"outline",className:e,children:[t.jsx(ss,{value:"cards","aria-label":s("registry.registryItemsPage.cardsViewAriaLabel"),className:e,children:s("registry.registryItemsPage.cards")}),t.jsx(ss,{value:"table","aria-label":s("registry.registryItemsPage.tableViewAriaLabel"),className:e,children:s("registry.registryItemsPage.table")})]}),t.jsx(Q,{variant:"outline",size:"sm",className:e,onClick:()=>f(!0),children:s("registry.registryItemsPage.importCsv")}),t.jsx(Q,{size:"sm",className:e,onClick:()=>d(!0),children:s("registry.registryItemsPage.addMcpServers")})]})]}),t.jsx("div",{className:"border-t border-border h-12 px-4 md:px-6 flex items-center",children:t.jsxs("label",{className:"flex items-center gap-2.5 h-12 w-full cursor-text",children:[t.jsx(ar,{size:16,className:"text-muted-foreground shrink-0"}),t.jsx(ye,{value:r,onChange:y=>i(y.target.value),placeholder:s("registry.registryItemsPage.searchPlaceholder"),className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),M&&t.jsxs("div",{className:"border-t border-border px-4 md:px-6 py-2 flex flex-wrap items-center gap-2",children:[l.map(y=>t.jsxs(H,{variant:"default",children:["#",y]},`selected-tag-${y}`)),o.map(y=>t.jsx(H,{variant:"outline",children:y},`selected-category-${y}`)),r.trim()&&t.jsxs(H,{variant:"secondary",className:"max-w-[280px] truncate",children:["Search: ",r]}),t.jsx(Q,{size:"sm",variant:"ghost",className:"h-7 ml-auto",onClick:()=>{i(""),c([]),a([])},children:s("registry.registryItemsPage.clearFilters")})]})]}),t.jsxs("div",{className:"flex-1 overflow-auto px-4 md:px-6 py-4",children:[S.length===0?t.jsx("div",{className:"min-h-[320px] rounded-xl border border-dashed border-border flex flex-col items-center justify-center gap-3 p-6 text-center",children:_.isLoading?t.jsxs(t.Fragment,{children:[t.jsx(Ye,{className:"size-5 animate-spin text-muted-foreground"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:s("registry.registryItemsPage.loadingItems")})]}):t.jsxs(t.Fragment,{children:[t.jsx("h3",{className:"text-base font-medium",children:s(M?"registry.registryItemsPage.noItemsFound":"registry.registryItemsPage.noMcpsInRegistry")}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:s(M?"registry.registryItemsPage.tryRemovingFilters":"registry.registryItemsPage.addFirstMcpItem")}),!M&&t.jsx(Q,{size:"lg",onClick:()=>d(!0),children:s("registry.registryItemsPage.addMcpServers")})]})}):j==="cards"?t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:S.map(y=>t.jsx(ii,{item:y,onEdit:g,onDelete:h,onToggleVerified:F,onToggleOfficial:q},y.id))}),_.hasNextPage&&t.jsx("div",{ref:$,className:"h-2"})]}):t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"border rounded-lg overflow-auto",children:t.jsxs(At,{children:[t.jsx(Ut,{children:t.jsxs(Je,{children:[t.jsx(pe,{className:"w-[56px]",children:s("registry.registryItemsPage.icon")}),t.jsx(pe,{children:s("registry.registryItemsPage.title")}),t.jsx(pe,{children:s("registry.registryItemsPage.id")}),t.jsx(pe,{children:s("registry.registryItemsPage.tags")}),t.jsx(pe,{children:s("registry.registryItemsPage.categories")}),t.jsx(pe,{children:s("registry.registryItemsPage.remoteUrl")}),t.jsx(pe,{children:s("registry.registryItemsPage.visibility")}),t.jsx(pe,{className:"text-right w-[68px]",children:s("registry.registryItemsPage.actions")})]})}),t.jsx(Ft,{children:S.map(y=>t.jsxs(Je,{children:[t.jsx(he,{children:t.jsx("div",{className:"size-8 rounded-md border border-border bg-muted/20 overflow-hidden flex items-center justify-center",children:y.server?.icons?.[0]?.src?t.jsx("img",{src:y.server.icons[0].src,alt:y.title,className:"h-full w-full object-cover",loading:"lazy"}):t.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground",children:y.title.charAt(0).toUpperCase()})})}),t.jsx(he,{children:y.title}),t.jsx(he,{className:"font-mono",children:y.id}),t.jsx(he,{children:t.jsx("div",{className:"flex flex-wrap gap-1",children:bi(y).slice(0,3).map(E=>t.jsx(H,{variant:"outline",children:E},`${y.id}-tag-${E}`))})}),t.jsx(he,{children:t.jsx("div",{className:"flex flex-wrap gap-1",children:Ni(y).slice(0,3).map(E=>t.jsx(H,{variant:"outline",children:E},`${y.id}-category-${E}`))})}),t.jsx(he,{children:Ci(y)}),t.jsx(he,{children:y.is_public?t.jsxs(H,{variant:"default",className:"gap-1",children:[t.jsx(xs,{size:10}),s("registry.registryItemsPage.public")]}):t.jsx(H,{variant:"secondary",children:s("registry.registryItemsPage.private")})}),t.jsx(he,{className:"text-right",children:t.jsxs(ft,{children:[t.jsx(pt,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0","aria-label":s("registry.registryItemsPage.actionsFor",{title:y.title}),children:t.jsx($t,{size:18})})}),t.jsxs(ht,{align:"end",children:[t.jsx(Pe,{onClick:()=>g(y),children:s("registry.registryItemsPage.edit")}),t.jsx(Pe,{variant:"destructive",onClick:()=>h(y),children:s("registry.registryItemsPage.delete")})]})]})})]},y.id))})]})}),_.hasNextPage&&t.jsx("div",{ref:$,className:"h-2"})]}),_.isFetchingNextPage&&t.jsxs("div",{className:"py-4 flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[t.jsx(Ye,{className:"size-4 animate-spin"}),s("registry.registryItemsPage.loadingMoreItems")]})]}),t.jsx(vi,{open:u||!!p,onOpenChange:y=>{y||(d(!1),g(null))},item:p,availableTags:I.map(y=>y.value),availableCategories:U.map(y=>y.value),isSubmitting:L.isPending||k.isPending,onSubmit:D},p?.id??"create"),t.jsx(Wr,{open:m,onOpenChange:f,isImporting:R.isPending,onImport:async y=>{try{const E=await R.mutateAsync(y);return G.success(s("registry.registryItemsPage.importedItems",{count:E.created})),E}catch(E){throw G.error(E instanceof Error?E.message:s("registry.registryItemsPage.failedToImportCsv")),E}}}),t.jsx(Xr,{open:!!x,onOpenChange:y=>{y||h(null)},title:x?.title??x?.id??"",isDeleting:P.isPending,onConfirm:O})]})}const _i=[{value:"pending",labelKey:"registry.registryRequestsPage.statusPending"},{value:"approved",labelKey:"registry.registryRequestsPage.statusApproved"},{value:"rejected",labelKey:"registry.registryRequestsPage.statusRejected"}];function ds(s){const e=new Date(s);return Number.isNaN(e.getTime())?s:e.toLocaleDateString()}function us(s){return{id:s.requested_id??s.server?.name,title:s.title,description:s.description??"",_meta:s._meta,server:s.server,is_public:!1}}function Et(s){const e=s.server?.icons?.[0]?.src;return typeof e=="string"&&e.length>0?e:null}function xt(s){const e=s._meta?.["mcp.mesh"];return{hasReadmeContent:!!e?.readme?.trim(),hasReadmeLink:!!e?.readme_url?.trim(),readmeContent:e?.readme?.trim()??"",readmeUrl:e?.readme_url?.trim()??""}}function Pi(){const s=ce(),[e,r]=T.useState("pending"),[i,n]=T.useState("created_at"),[l,c]=T.useState("asc"),[o,a]=T.useState(new Set),[u,d]=T.useState(!1),[m,f]=T.useState("private"),[p,g]=T.useState(!1),[x,h]=T.useState(null),[j,N]=T.useState(null),[w,_]=T.useState(null),[b,L]=T.useState(null),[k,P]=T.useState(""),R=Ur({status:e,sortBy:i,sortDirection:l}),{reviewMutation:S,deleteMutation:A}=Or(),{createMutation:M}=Ot(),v=R.data?.pages.flatMap(C=>C.items)??[],I=R.data?.pages[0]?.totalCount??0,U=R.isFetchingNextPage,$=!!R.hasNextPage,D=yr(()=>{R.isFetchingNextPage||R.fetchNextPage()},$,U),F=new Set(v.filter(C=>C.status==="pending").map(C=>C.id)),q=v.filter(C=>F.has(C.id)),O=o.size,y=q.filter(C=>o.has(C.id)),E=v.filter(C=>o.has(C.id)).length,W=q.length>0&&q.every(C=>o.has(C.id)),Z=()=>a(new Set),te=(C,B)=>{a(K=>{const re=new Set(K);return B?re.add(C):re.delete(C),re})},me=C=>{a(B=>{const K=new Set(B);return K.has(C)?K.delete(C):K.add(C),K})},se=()=>{a(C=>{const B=new Set(C);for(const K of q)B.add(K.id);return B})},ne=async()=>{const C=j;if(C){N(null),h(C.id);try{await S.mutateAsync({id:C.id,status:"approved",reviewerNotes:void 0});const B=us(C);await M.mutateAsync({id:B.id,title:B.title,description:B.description,_meta:B._meta,server:B.server,is_public:B.is_public}),G.success(s("registry.registryRequestsPage.requestApprovedAndAdded"))}catch(B){const K=B instanceof Error?B.message:"Failed to approve request";K.includes("UNIQUE constraint")||K.includes("already exists")?G.error(s("registry.registryRequestsPage.itemAlreadyExists")):G.error(K)}finally{h(null)}}},ge=async()=>{if(w)try{await S.mutateAsync({id:w.id,status:"rejected",reviewerNotes:k.trim()||void 0}),G.success(s("registry.registryRequestsPage.requestRejected")),_(null),P("")}catch(C){G.error(C instanceof Error?C.message:"Failed to reject request")}},de=async C=>{try{await A.mutateAsync(C.id),G.success(s("registry.registryRequestsPage.requestDeleted"))}catch(B){G.error(B instanceof Error?B.message:"Failed to delete request")}},ie=async()=>{if(y.length===0||p)return;g(!0),d(!1);let C=0;const B=new Set;for(const re of y)try{await S.mutateAsync({id:re.id,status:"approved",reviewerNotes:void 0});const xe=us(re);await M.mutateAsync({id:xe.id,title:xe.title,description:xe.description,_meta:xe._meta,server:xe.server,is_public:m==="public"}),C++}catch{B.add(re.id)}const K=B.size;C>0&&K===0?G.success(s("registry.registryRequestsPage.bulkApproveSuccess",{approvedCount:C,bulkVisibility:m})):C>0&&K>0?G.warning(s("registry.registryRequestsPage.bulkApprovePartial",{approvedCount:C,failedCount:K})):G.error(s("registry.registryRequestsPage.bulkApproveFailed")),a(B),g(!1)};return t.jsxs("div",{className:"h-full flex flex-col",children:[t.jsx("div",{className:"shrink-0 border-b border-border",children:t.jsxs("div",{className:"h-12 px-4 md:px-6 flex items-center justify-between gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx("h2",{className:"text-sm font-medium",children:s("registry.registryRequestsPage.requestsToPublish")}),t.jsx(H,{variant:"secondary",className:"text-xs",children:I})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"inline-flex rounded-lg border border-border p-0.5",children:_i.map(C=>t.jsx("button",{type:"button",className:ee("px-2.5 py-1 text-xs rounded-md transition-colors",e===C.value?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),onClick:()=>r(C.value),onClickCapture:()=>Z(),children:s(C.labelKey)},C.value))}),t.jsxs("select",{className:"h-7 rounded-md border border-input bg-background px-2 text-xs",value:`${i}:${l}`,onChange:C=>{const[B,K]=C.target.value.split(":");n(B),c(K)},children:[t.jsx("option",{value:"created_at:asc",children:s("registry.registryRequestsPage.sortCreatedOldest")}),t.jsx("option",{value:"created_at:desc",children:s("registry.registryRequestsPage.sortCreatedNewest")}),t.jsx("option",{value:"title:asc",children:s("registry.registryRequestsPage.sortAlphaAZ")}),t.jsx("option",{value:"title:desc",children:s("registry.registryRequestsPage.sortAlphaZA")})]})]})]})}),t.jsxs("div",{className:"flex-1 overflow-auto px-4 md:px-6 py-4",children:[R.isLoading?t.jsx("div",{className:"text-sm text-muted-foreground",children:s("registry.registryRequestsPage.loadingRequests")}):R.isError?t.jsxs("div",{className:"p-8 text-center rounded-lg border border-border",children:[t.jsx("p",{className:"text-sm text-destructive",children:s("registry.registryRequestsPage.failedLoadRequests")}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:R.error instanceof Error?R.error.message:s("registry.registryRequestsPage.unknownError")})]}):v.length===0?t.jsx("div",{className:"p-8 text-center rounded-lg border border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:s(e==="pending"?"registry.registryRequestsPage.noPendingRequests":e==="approved"?"registry.registryRequestsPage.noApprovedRequests":"registry.registryRequestsPage.noRejectedRequests")})}):t.jsxs(At,{children:[t.jsx(Ut,{children:t.jsxs(Je,{children:[e==="pending"&&t.jsx(pe,{className:"w-10",children:t.jsx(is,{checked:W&&q.length>0,onCheckedChange:C=>{C?se():Z()}})}),t.jsx(pe,{children:s("registry.registryRequestsPage.columnName")}),t.jsx(pe,{children:s("registry.registryRequestsPage.columnRequester")}),t.jsx(pe,{children:s("registry.registryRequestsPage.columnTags")}),t.jsx(pe,{children:s("registry.registryRequestsPage.columnStatus")}),t.jsx(pe,{children:s("registry.registryRequestsPage.columnDate")}),t.jsx(pe,{className:"text-right",children:s("registry.registryRequestsPage.columnActions")})]})}),t.jsx(Ft,{children:v.map(C=>{const B=Et(C),K=C._meta?.["mcp.mesh"]?.tags??[],re=F.has(C.id),xe=o.has(C.id);return t.jsxs(Je,{className:ee(re&&"cursor-pointer",xe&&"bg-accent/20"),onClick:()=>{re&&me(C.id)},children:[e==="pending"&&t.jsx(he,{children:t.jsx(is,{checked:xe,onCheckedChange:oe=>te(C.id,oe===!0),onClick:oe=>oe.stopPropagation()})}),t.jsx(he,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx("div",{className:"size-7 rounded-md border border-border bg-muted/30 overflow-hidden shrink-0 flex items-center justify-center",children:B?t.jsx("img",{src:B,alt:C.title,className:"h-full w-full object-cover",loading:"lazy"}):t.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground",children:C.title.slice(0,1).toUpperCase()})}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:C.title}),C.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate max-w-[300px]",children:C.description})]})]})}),t.jsx(he,{children:t.jsx("span",{className:"text-sm text-muted-foreground truncate",children:C.requester_name||C.requester_email||"-"})}),t.jsx(he,{children:t.jsx("div",{className:"flex flex-wrap gap-1",children:K.slice(0,3).map(oe=>t.jsx(H,{variant:"secondary",className:"text-[10px]",children:oe},`${C.id}-tag-${oe}`))})}),t.jsx(he,{children:t.jsx(H,{variant:"secondary",className:"capitalize text-[11px]",children:C.status})}),t.jsx(he,{children:t.jsx("span",{className:"text-sm text-muted-foreground",children:ds(C.created_at)})}),t.jsx(he,{className:"text-right",children:t.jsxs("div",{className:"flex items-center justify-end gap-1",children:[t.jsxs(Q,{size:"sm",variant:"ghost",className:"h-7 text-xs px-2",onClick:oe=>{oe.stopPropagation(),L(C)},children:[t.jsx(ps,{size:13}),s("registry.registryRequestsPage.buttonView")]}),re?t.jsxs(t.Fragment,{children:[t.jsxs(Q,{size:"sm",className:"h-7 text-xs px-2",onClick:oe=>{oe.stopPropagation(),N(C)},disabled:x!==null||p||xe,children:[t.jsx(We,{size:13}),x===C.id?s("registry.registryRequestsPage.approving"):s(xe?"registry.registryRequestsPage.selected":"registry.registryRequestsPage.buttonApprove")]}),t.jsxs(Q,{size:"sm",variant:"outline",className:"h-7 text-xs px-2",onClick:oe=>{oe.stopPropagation(),_(C),P("")},disabled:S.isPending,children:[t.jsx(xr,{size:13}),s("registry.registryRequestsPage.buttonReject")]})]}):t.jsxs(Q,{size:"sm",variant:"outline",className:"h-7 text-xs px-2",onClick:oe=>{oe.stopPropagation(),de(C)},disabled:A.isPending,children:[t.jsx(dt,{size:13}),s("registry.registryRequestsPage.buttonDelete")]})]})})]},C.id)})})]}),v.length>0&&$?t.jsx("div",{ref:D,className:"h-1 w-full"}):null,U&&v.length>0?t.jsx("div",{className:"pt-3 text-xs text-muted-foreground",children:s("registry.registryRequestsPage.loadingMoreRequests")}):null]}),O>0?t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl border border-border bg-background/95 shadow-lg backdrop-blur px-3 py-2 flex items-center gap-2",children:[t.jsx("div",{className:"text-xs text-muted-foreground pr-1",children:s("registry.registryRequestsPage.selectedCount",{selectedCount:O})}),t.jsx(Q,{size:"sm",variant:"outline",className:"h-7 text-xs px-2",onClick:se,disabled:W,children:s("registry.registryRequestsPage.selectAll")}),t.jsx(Q,{size:"sm",variant:"outline",className:"h-7 text-xs px-2",onClick:Z,children:s("registry.registryRequestsPage.clearSelection")}),t.jsxs(Q,{size:"sm",className:"h-7 text-xs px-2",onClick:()=>d(!0),disabled:p,children:[t.jsx(We,{size:13}),s("registry.registryRequestsPage.approveSelected")]})]})}):null,t.jsx(yt,{open:!!b,onOpenChange:C=>{C||L(null)},children:t.jsxs(jt,{className:"sm:max-w-[720px] max-h-[85vh] overflow-hidden flex flex-col",children:[t.jsxs(Nt,{children:[t.jsx(vt,{children:b?.title??s("registry.registryRequestsPage.requestDetails")}),t.jsx(bt,{children:s("registry.registryRequestsPage.reviewMetadataDescription")})]}),b&&t.jsxs("div",{className:"flex-1 overflow-y-auto pr-1 space-y-4",children:[t.jsxs("div",{className:"rounded-lg border border-border bg-muted/20 p-3 flex items-center gap-3",children:[t.jsx("div",{className:"size-16 rounded-lg border border-border bg-muted/30 overflow-hidden shrink-0 flex items-center justify-center",children:Et(b)?t.jsx("img",{src:Et(b)||"",alt:b.title,className:"h-full w-full object-cover",loading:"lazy"}):t.jsx("span",{className:"text-lg font-semibold text-muted-foreground",children:b.title.slice(0,1).toUpperCase()})}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:b.title}),t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b.server?.name||b.id})]})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:s("registry.registryRequestsPage.labelStatus")}),t.jsx("span",{className:"capitalize",children:b.status})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:s("registry.registryRequestsPage.labelSubmitted")}),t.jsx("span",{children:ds(b.created_at)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:s("registry.registryRequestsPage.labelRequester")}),t.jsx("span",{children:b.requester_name||"-"})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:s("registry.registryRequestsPage.labelEmail")}),t.jsx("span",{children:b.requester_email||"-"})]})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{children:s("registry.registryRequestsPage.labelRemoteURL")}),t.jsx("code",{className:"text-xs rounded-md border border-border bg-muted/30 px-2.5 py-2 break-all",children:b.server?.remotes?.[0]?.url??"-"})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{children:s("registry.registryRequestsPage.labelDescription")}),t.jsx("p",{className:"text-sm text-muted-foreground",children:b.description||s("registry.registryRequestsPage.noDescriptionProvided")})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{children:s("registry.registryRequestsPage.labelTags")}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:(b._meta?.["mcp.mesh"]?.tags??[]).length?(b._meta?.["mcp.mesh"]?.tags??[]).map(C=>t.jsx(H,{variant:"secondary",children:C},`${b.id}-detail-tag-${C}`)):t.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{children:s("registry.registryRequestsPage.labelCategories")}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:(b._meta?.["mcp.mesh"]?.categories??[]).length?(b._meta?.["mcp.mesh"]?.categories??[]).map(C=>t.jsx(H,{variant:"secondary",children:C},`${b.id}-detail-category-${C}`)):t.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{children:s("registry.registryRequestsPage.labelREADME")}),xt(b).hasReadmeContent?t.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap max-h-40 overflow-y-auto rounded-md border border-border bg-muted/20 px-2.5 py-2",children:xt(b).readmeContent}):xt(b).hasReadmeLink?t.jsxs("a",{href:xt(b).readmeUrl,target:"_blank",rel:"noreferrer",className:"text-sm inline-flex items-center gap-1.5 text-primary hover:underline",children:[s("registry.registryRequestsPage.openREADMELink"),t.jsx(fr,{size:14})]}):t.jsx("span",{className:"text-sm text-muted-foreground",children:s("registry.registryRequestsPage.noREADMEProvided")})]})]}),t.jsx(Ct,{children:t.jsx(Q,{variant:"outline",onClick:()=>L(null),children:s("registry.registryRequestsPage.buttonClose")})})]})}),t.jsx(ct,{open:!!j,onOpenChange:C=>{C||N(null)},children:t.jsxs(lt,{children:[t.jsxs(it,{children:[t.jsx(st,{children:s("registry.registryRequestsPage.approvePublishRequestTitle")}),t.jsx(rt,{children:s("registry.registryRequestsPage.approvePublishRequestDesc",{title:j?.title??""})})]}),t.jsxs(ot,{children:[t.jsx(nt,{children:s("registry.registryRequestsPage.buttonCancel")}),t.jsx(at,{onClick:ne,children:s("registry.registryRequestsPage.buttonApprove")})]})]})}),t.jsx(ct,{open:u,onOpenChange:d,children:t.jsxs(lt,{children:[t.jsxs(it,{children:[t.jsx(st,{children:s("registry.registryRequestsPage.approveSelectedRequestsTitle")}),t.jsx(rt,{children:s("registry.registryRequestsPage.approveSelectedRequestsDesc",{count:y.length})})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{htmlFor:"bulk-visibility",children:s("registry.registryRequestsPage.visibilityForAll")}),t.jsxs("select",{id:"bulk-visibility",className:"h-9 rounded-md border border-input bg-background px-3 text-sm",value:m,onChange:C=>f(C.target.value),children:[t.jsx("option",{value:"private",children:s("registry.registryRequestsPage.visibilityPrivate")}),t.jsx("option",{value:"public",children:s("registry.registryRequestsPage.visibilityPublic")})]})]}),t.jsxs(ot,{children:[t.jsx(nt,{disabled:p,children:s("registry.registryRequestsPage.buttonCancel")}),t.jsx(at,{onClick:ie,disabled:p||E===0,children:s(p?"registry.registryRequestsPage.approving":"registry.registryRequestsPage.approveSelected")})]})]})}),t.jsx(yt,{open:!!w,onOpenChange:C=>{C||(_(null),P(""))},children:t.jsxs(jt,{children:[t.jsxs(Nt,{children:[t.jsx(vt,{children:s("registry.registryRequestsPage.rejectPublishRequestTitle")}),t.jsx(bt,{children:s("registry.registryRequestsPage.rejectPublishRequestDesc")})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{htmlFor:"reject-notes",children:s("registry.registryRequestsPage.reviewerNotes")}),t.jsx(wt,{id:"reject-notes",rows:4,value:k,onChange:C=>P(C.target.value),placeholder:s("registry.registryRequestsPage.reasonForRejectionPlaceholder")})]}),t.jsxs(Ct,{children:[t.jsx(Q,{variant:"outline",onClick:()=>{_(null),P("")},children:s("registry.registryRequestsPage.buttonCancel")}),t.jsx(Q,{onClick:ge,disabled:S.isPending,children:S.isPending?s("registry.registryRequestsPage.rejecting"):s("registry.registryRequestsPage.buttonReject")})]})]})})]})}function Ri({revealedKey:s,onRevealedKeyChange:e}){const r=ce(),{org:i}=be(),{uploadImage:n,isUploading:l}=Cs(),{registryName:c,registryIcon:o,acceptPublishRequests:a,requireApiToken:u,storePrivateOnly:d,rateLimitEnabled:m,rateLimitWindow:f,rateLimitMax:p,isSaving:g,updateConfig:x}=vs(Ve),[h,j]=T.useState(c),[N,w]=T.useState(c);c!==N&&(w(c),j(c));const[_,b]=T.useState(o),[L,k]=T.useState(o);o!==L&&(k(o),b(o));const[P,R]=T.useState(String(p)),[S,A]=T.useState(p);p!==S&&(A(p),R(String(p)));const M=Br(),{generateMutation:v,revokeMutation:I}=Kr(),[U,$]=T.useState(""),[D,F]=T.useState(!1),[q,O]=T.useState(null),{handleCopy:y,copied:E}=Tt(),{handleCopy:W,copied:Z}=Tt(),{handleCopy:te,copied:me}=Tt(),se=js({search:"",tags:[],categories:[],limit:50}),ne=`${window.location.origin}/org/${i.slug}/registry/mcp`,de=(se.data?.pages.flatMap(z=>z.items??[])??[]).filter(z=>z.is_public).length,ie=`${window.location.origin}/org/${i.slug}/registry/publish-request`,C=s?.slice(0,12)??null,B=!!(C&&(M.data?.items??[]).some(z=>z.prefix===C)),K=g||l,re=()=>{const z=h.trim();!z||z===c||x({registryName:z})},xe=()=>{const z=Number.parseInt(P,10),le=Number.isFinite(z)&&z>=1?z:100;R(String(le)),le!==p&&x({rateLimitMax:le})},oe=async z=>{if(!z)return;const le=z.name.split(".").pop()||"png",Ie=`registry/${i.id}/identity/icon.${le}`,_e=await n(z,Ie);_e?(b(_e),x({registryIcon:_e})):G.error(r("registry.registrySettingsPage.failedUploadIcon"))},Re=async()=>{const z=U.trim();if(z)try{const le=await v.mutateAsync(z);le?.key&&(e(le.key),F(!1),$(""),G.success(r("registry.registrySettingsPage.apiKeyGenerated")))}catch(le){G.error(le instanceof Error?le.message:r("registry.registrySettingsPage.failedGenerateApiKey"))}},Ne=async z=>{try{await I.mutateAsync(z),e(null),O(null),G.success(r("registry.registrySettingsPage.apiKeyRevoked"))}catch(le){G.error(le instanceof Error?le.message:r("registry.registrySettingsPage.failedRevokeApiKey"))}};return t.jsxs("div",{className:"h-full overflow-auto px-4 md:px-6 py-4",children:[t.jsxs("div",{className:"grid grid-cols-1 gap-4 items-start xl:grid-cols-2",children:[t.jsx("div",{className:"grid gap-4 min-w-0 content-start",children:t.jsxs(ue,{className:"min-w-0 p-4 grid gap-4 content-start",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-base font-semibold",children:r("registry.registrySettingsPage.registryIdentity")}),t.jsx("p",{className:"text-sm text-muted-foreground",children:r("registry.registrySettingsPage.configureNameIcon")})]}),t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx(ae,{htmlFor:"identity-name",children:r("registry.registrySettingsPage.name")}),t.jsx(ye,{id:"identity-name",value:h,onChange:z=>j(z.target.value),onBlur:re,disabled:K,placeholder:r("registry.registrySettingsPage.namePlaceholder")})]}),t.jsx(bs,{value:_,onChange:b,onBlur:()=>{const z=_.trim();z!==o&&x({registryIcon:z})},onFileUpload:oe,isUploading:l})]})}),t.jsxs("div",{className:"grid gap-4 min-w-0 content-start",children:[t.jsxs(ue,{className:"min-w-0 p-4 grid gap-3 content-start",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-base font-semibold",children:r("registry.registrySettingsPage.publicRegistry")}),t.jsx("p",{className:"text-sm text-muted-foreground",children:r("registry.registrySettingsPage.publicRegistryDescription")})]}),t.jsxs(H,{variant:"secondary",children:[de," ",r(de===1?"registry.registrySettingsPage.publicItem":"registry.registrySettingsPage.publicItems")]})]}),t.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 px-3 py-2 flex items-center gap-2 min-w-0",children:[t.jsx("code",{className:"text-xs font-mono break-all leading-5 min-w-0 flex-1 select-all",children:ne}),t.jsx(Q,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:()=>y(ne),children:E?t.jsx(Mt,{size:14}):t.jsx(qt,{size:14})})]})]}),t.jsxs(ue,{className:"min-w-0 p-4 grid gap-3 content-start",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-base font-semibold",children:r("registry.registrySettingsPage.storeVisibility")}),t.jsx("p",{className:"text-sm text-muted-foreground",children:r("registry.registrySettingsPage.storeVisibilityDescription")})]}),t.jsx(Ge,{id:"store-private-only",checked:d,onCheckedChange:z=>x({storePrivateOnly:z}),disabled:K})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:r("registry.registrySettingsPage.storeVisibilityHelp")})]}),t.jsxs(ue,{className:"min-w-0 p-4 grid gap-3 content-start",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-base font-semibold",children:r("registry.registrySettingsPage.publishRequests")}),t.jsx("p",{className:"text-sm text-muted-foreground",children:r("registry.registrySettingsPage.publishRequestsDescription")})]}),t.jsx(Ge,{id:"accept-publish-requests",checked:a,onCheckedChange:z=>x({acceptPublishRequests:z}),disabled:K})]}),t.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 px-3 py-2 flex items-center gap-2 min-w-0",children:[t.jsx("code",{className:"text-xs font-mono break-all leading-5 min-w-0 flex-1 select-all",children:ie}),t.jsx(Q,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:()=>W(ie),children:Z?t.jsx(Mt,{size:14}):t.jsx(qt,{size:14})})]}),t.jsxs("div",{className:"flex items-center justify-between gap-2 pt-2 border-t border-border",children:[t.jsxs("div",{children:[t.jsx(ae,{className:"text-sm font-medium",children:r("registry.registrySettingsPage.requireApiToken")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:r("registry.registrySettingsPage.requireApiTokenHelp")})]}),t.jsx(Ge,{id:"require-api-token",checked:u,onCheckedChange:z=>x({requireApiToken:z}),disabled:K})]}),t.jsxs("div",{className:"flex items-center justify-between gap-2 pt-2 border-t border-border",children:[t.jsxs("div",{children:[t.jsx(ae,{className:"text-sm font-medium",children:r("registry.registrySettingsPage.rateLimit")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:r("registry.registrySettingsPage.rateLimitHelp")})]}),t.jsx(Ge,{id:"publish-rate-limit",checked:m,onCheckedChange:z=>x({rateLimitEnabled:z}),disabled:K})]}),m&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx(ae,{htmlFor:"rate-limit-max",className:"text-sm font-medium",children:r("registry.registrySettingsPage.maxRequests")}),t.jsx(ye,{id:"rate-limit-max",inputMode:"numeric",min:1,type:"number",value:P,onChange:z=>R(z.target.value),onBlur:xe,disabled:K,placeholder:r("registry.registrySettingsPage.maxRequestsPlaceholder")})]}),t.jsxs("div",{className:"space-y-1",children:[t.jsx(ae,{htmlFor:"rate-limit-window",className:"text-sm font-medium",children:r("registry.registrySettingsPage.window")}),t.jsxs("select",{id:"rate-limit-window",className:"h-9 rounded-md border border-input bg-background px-3 text-sm disabled:opacity-50",value:f,onChange:z=>x({rateLimitWindow:z.target.value}),disabled:K,children:[t.jsx("option",{value:"minute",children:r("registry.registrySettingsPage.perMinute")}),t.jsx("option",{value:"hour",children:r("registry.registrySettingsPage.perHour")})]})]})]}),a&&u&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-border",children:[t.jsx(jr,{size:14,className:"text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:r("registry.registrySettingsPage.apiKeys")})]}),s&&!B&&t.jsxs("div",{className:"rounded-md border border-border bg-muted/20 px-3 py-2 grid gap-1.5",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:r("registry.registrySettingsPage.newKeyRefreshing")}),t.jsx(ye,{readOnly:!0,value:s,className:"h-8 text-xs font-mono bg-background"})]}),t.jsxs("div",{className:"flex items-end gap-2",children:[t.jsxs("div",{className:"grid gap-1.5 flex-1",children:[t.jsx(ae,{htmlFor:"api-key-name",className:"text-xs",children:r("registry.registrySettingsPage.keyName")}),t.jsx(ye,{id:"api-key-name",value:U,onChange:z=>$(z.target.value),placeholder:r("registry.registrySettingsPage.keyNamePlaceholder"),className:"h-8 text-sm"})]}),t.jsxs(Q,{variant:"outline",size:"sm",className:"h-8 gap-1.5",disabled:!U.trim()||v.isPending,onClick:Re,children:[v.isPending?t.jsx(Ye,{size:14,className:"animate-spin"}):t.jsx(vr,{size:14}),r("registry.registrySettingsPage.generate")]})]}),(M.data?.items?.length??0)>0&&t.jsx("div",{className:"grid gap-2",children:M.data?.items?.map(z=>t.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border bg-background px-3 py-2",children:[t.jsxs("div",{className:"grid gap-1 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate leading-none",children:z.name}),C===z.prefix?t.jsx(ye,{readOnly:!0,value:D?s??"":"••••••••••••••••••••••••••••••••••••••••••••••••••••",className:"h-8 text-xs font-mono bg-muted/20"}):t.jsx(ye,{readOnly:!0,value:`${z.prefix}••••••••`,className:"h-8 text-xs font-mono bg-muted/20 text-muted-foreground"})]}),t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[C===z.prefix&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>F(le=>!le),children:D?t.jsx(Zs,{size:14}):t.jsx(ps,{size:14})}),t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:!s,onClick:()=>s&&te(s),children:me?t.jsx(Mt,{size:14}):t.jsx(qt,{size:14})})]}),t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-destructive hover:text-destructive",disabled:I.isPending,onClick:()=>O({id:z.id,name:z.name}),children:t.jsx(dt,{size:14})})]})]},z.id))})]})]})]})]}),t.jsx(ct,{open:!!q,onOpenChange:z=>{!z&&!I.isPending&&O(null)},children:t.jsxs(lt,{children:[t.jsxs(it,{children:[t.jsx(st,{children:r("registry.registrySettingsPage.revokeApiKeyTitle")}),t.jsx(rt,{children:r("registry.registrySettingsPage.revokeApiKeyDescription",{keyName:q?.name??""})})]}),t.jsxs(ot,{children:[t.jsx(nt,{disabled:I.isPending,children:r("registry.registrySettingsPage.cancel")}),t.jsx(at,{disabled:!q||I.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>q&&Ne(q.id),children:I.isPending?r("registry.registrySettingsPage.revoking"):r("registry.registrySettingsPage.revokeKey")})]})]})})]})}function Ii(s){const e=J.c(8),{results:r}=s,i=ce();if(r.length===0){let c;e[0]!==i?(c=i("registry.brokenMcpList.noBrokenMcps"),e[0]=i,e[1]=c):c=e[1];let o;return e[2]!==c?(o=t.jsx(ue,{className:"p-4 text-sm text-muted-foreground text-center",children:c}),e[2]=c,e[3]=o):o=e[3],o}let n;e[4]!==r?(n=r.map(ki),e[4]=r,e[5]=n):n=e[5];let l;return e[6]!==n?(l=t.jsx("div",{className:"space-y-2",children:n}),e[6]=n,e[7]=l):l=e[7],l}function ki(s){return t.jsx(Si,{result:s},s.id)}function Si(s){const e=J.c(56),{result:r}=s,i=ce(),[n,l]=T.useState(!1);let c;if(e[0]!==n||e[1]!==r.action_taken||e[2]!==r.connection_ok||e[3]!==r.duration_ms||e[4]!==r.error_message||e[5]!==r.id||e[6]!==r.item_title||e[7]!==r.status||e[8]!==r.tool_results||e[9]!==r.tools_listed||e[10]!==i){const o=r.tool_results.filter(Mi);let a;e[12]!==n?(a=()=>l(!n),e[12]=n,e[13]=a):a=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"text-destructive text-sm mt-0.5",children:"✗"}),e[14]=u):u=e[14];let d;e[15]!==r.item_title?(d=t.jsx("h4",{className:"text-sm font-medium truncate",children:r.item_title}),e[15]=r.item_title,e[16]=d):d=e[16];let m;e[17]!==r.status?(m=r.status.replace("_"," "),e[17]=r.status,e[18]=m):m=e[18];let f;e[19]!==m?(f=t.jsx(H,{variant:"destructive",className:"capitalize text-[10px] shrink-0",children:m}),e[19]=m,e[20]=f):f=e[20];let p;e[21]!==d||e[22]!==f?(p=t.jsxs("div",{className:"flex items-center gap-2",children:[d,f]}),e[21]=d,e[22]=f,e[23]=p):p=e[23];let g;e[24]!==i?(g=i("registry.brokenMcpList.connStatus"),e[24]=i,e[25]=g):g=e[25];const x=r.connection_ok?"✓":"✗";let h;e[26]!==g||e[27]!==x?(h=t.jsxs("span",{children:[g,":"," ",x]}),e[26]=g,e[27]=x,e[28]=h):h=e[28];let j;e[29]!==i?(j=i("registry.brokenMcpList.toolsListed"),e[29]=i,e[30]=j):j=e[30];const N=r.tools_listed?"✓":"✗";let w;e[31]!==j||e[32]!==N?(w=t.jsxs("span",{children:[j,":"," ",N]}),e[31]=j,e[32]=N,e[33]=w):w=e[33];let _;e[34]!==r.duration_ms?(_=t.jsxs("span",{children:[r.duration_ms,"ms"]}),e[34]=r.duration_ms,e[35]=_):_=e[35];const b=o.length>0&&t.jsx("span",{className:"text-destructive",children:i("registry.brokenMcpList.toolsFailed",{count:o.length})});let L;e[36]!==r.action_taken?(L=r.action_taken!=="none"&&t.jsx(H,{variant:"destructive",className:"text-[9px] px-1.5 py-0",children:r.action_taken.replace(/_/g," ")}),e[36]=r.action_taken,e[37]=L):L=e[37];let k;e[38]!==h||e[39]!==w||e[40]!==_||e[41]!==b||e[42]!==L?(k=t.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground flex-wrap",children:[h,w,_,b,L]}),e[38]=h,e[39]=w,e[40]=_,e[41]=b,e[42]=L,e[43]=k):k=e[43];let P;e[44]!==r.error_message?(P=r.error_message&&t.jsx("p",{className:"text-xs text-destructive line-clamp-2",children:r.error_message}),e[44]=r.error_message,e[45]=P):P=e[45];let R;e[46]!==k||e[47]!==P||e[48]!==p?(R=t.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[p,k,P]}),e[46]=k,e[47]=P,e[48]=p,e[49]=R):R=e[49];const S=n?"▲":"▼";let A;e[50]!==S?(A=t.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0 mt-1",children:S}),e[50]=S,e[51]=A):A=e[51];let M;e[52]!==R||e[53]!==a||e[54]!==A?(M=t.jsxs("button",{type:"button",className:"w-full text-left p-3 flex items-start gap-3 hover:bg-muted/30 transition-colors",onClick:a,children:[u,R,A]}),e[52]=R,e[53]=a,e[54]=A,e[55]=M):M=e[55],c=t.jsxs(ue,{className:"overflow-hidden",children:[M,n&&t.jsxs("div",{className:"border-t border-border p-3 space-y-2 bg-muted/10",children:[r.error_message&&t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-[10px] font-semibold text-destructive",children:i("registry.brokenMcpList.fullError")}),t.jsx("pre",{className:"text-[11px] bg-destructive/5 border border-destructive/10 rounded px-2.5 py-1.5 whitespace-pre-wrap break-all text-destructive",children:r.error_message})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[t.jsxs("div",{className:"rounded border border-border px-2 py-1.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:i("registry.brokenMcpList.connectionLabel")}),t.jsx("p",{className:ee("text-xs font-medium",r.connection_ok?"text-success":"text-destructive"),children:r.connection_ok?i("registry.brokenMcpList.statusOk"):i("registry.brokenMcpList.statusFailed")})]}),t.jsxs("div",{className:"rounded border border-border px-2 py-1.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:i("registry.brokenMcpList.toolsListedLabel")}),t.jsx("p",{className:ee("text-xs font-medium",r.tools_listed?"text-success":"text-destructive"),children:r.tools_listed?i("registry.brokenMcpList.yes"):i("registry.brokenMcpList.no")})]}),t.jsxs("div",{className:"rounded border border-border px-2 py-1.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:i("registry.brokenMcpList.durationLabel")}),t.jsxs("p",{className:"text-xs font-medium",children:[r.duration_ms,"ms"]})]})]}),o.length>0&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-[10px] font-semibold text-destructive",children:i("registry.brokenMcpList.failedToolsHeader",{count:o.length})}),o.map(v=>t.jsxs("div",{className:"rounded border border-destructive/10 bg-destructive/5 px-2.5 py-1.5 space-y-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-xs font-mono font-medium text-destructive",children:v.toolName}),t.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[v.durationMs,"ms"]})]}),v.error&&t.jsx("pre",{className:"text-[11px] whitespace-pre-wrap break-all text-destructive",children:v.error})]},`${r.id}-${v.toolName}`))]}),r.tool_results.length>0&&r.tool_results.some(Ti)&&t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground",children:i("registry.brokenMcpList.passingTools")}),t.jsx("div",{className:"flex flex-wrap gap-1",children:r.tool_results.filter(Di).map(v=>t.jsxs(H,{variant:"secondary",className:"text-[10px]",children:["✓ ",v.toolName]},`${r.id}-${v.toolName}-pass`))})]})]})]}),e[0]=n,e[1]=r.action_taken,e[2]=r.connection_ok,e[3]=r.duration_ms,e[4]=r.error_message,e[5]=r.id,e[6]=r.item_title,e[7]=r.status,e[8]=r.tool_results,e[9]=r.tools_listed,e[10]=i,e[11]=c}else c=e[11];return c}function Di(s){return s.success}function Ti(s){return s.success}function Mi(s){return!s.success}function qi(s,e){return s.onFailure!==e.onFailure||s.perMcpTimeoutMs!==e.perMcpTimeoutMs||s.perToolTimeoutMs!==e.perToolTimeoutMs||s.maxAgentSteps!==e.maxAgentSteps||s.testPublicOnly!==e.testPublicOnly||s.testPrivateOnly!==e.testPrivateOnly||s.includePendingRequests!==e.includePendingRequests||(s.agentContext??"")!==(e.agentContext??"")}function Ei(){const s=ce(),{settings:e,saveMutation:r}=fs(),i=T.useRef(e),[n,l]=T.useState(e),[c,o]=T.useState(!1),[a,u]=T.useState(!1);i.current!==e&&(i.current=e,l(e));const d=qi(n,e),m=p=>{o(!1),l(g=>({...g,...p}))},f=async()=>{const p={...n,agentContext:(n.agentContext??"").trim()};await r.mutateAsync(p),l(p),o(!0),setTimeout(()=>o(!1),3e3)};return t.jsxs(ue,{className:"p-4 space-y-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-semibold",children:s("registry.monitorConfiguration.qaConfiguration")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("registry.monitorConfiguration.description")})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[d&&t.jsx(H,{className:"bg-warning/10 text-warning border-warning/20 text-[10px]",children:s("registry.monitorConfiguration.unsavedChanges")}),c&&t.jsxs(H,{className:"bg-success/10 text-success border-success/20 text-[10px]",children:["✓ ",s("registry.monitorConfiguration.saved")]}),t.jsx(Q,{size:"sm",onClick:f,disabled:r.isPending||!d,children:r.isPending?s("registry.monitorConfiguration.saving"):s("registry.monitorConfiguration.saveSettings")})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx(He,{label:s("registry.monitorConfiguration.onFailureLabel"),hint:s("registry.monitorConfiguration.onFailureHint")}),t.jsxs("select",{className:"h-9 rounded-md border border-input bg-background px-3 text-sm",value:n.onFailure,onChange:p=>m({onFailure:p.target.value}),children:[t.jsx("option",{value:"none",children:s("registry.monitorConfiguration.onFailureNone")}),t.jsx("option",{value:"unlisted",children:s("registry.monitorConfiguration.onFailureUnlisted")}),t.jsx("option",{value:"remove_public",children:s("registry.monitorConfiguration.onFailureRemovePublic")}),t.jsx("option",{value:"remove_private",children:s("registry.monitorConfiguration.onFailureRemovePrivate")}),t.jsx("option",{value:"remove_all",children:s("registry.monitorConfiguration.onFailureRemoveAll")})]})]}),t.jsxs("div",{className:"space-y-1",children:[t.jsx(He,{label:s("registry.monitorConfiguration.testScopeLabel"),hint:s("registry.monitorConfiguration.testScopeHint")}),t.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-input px-3 py-2",children:[t.jsxs("label",{className:"inline-flex items-center gap-2 text-sm",children:[t.jsx("input",{type:"checkbox",checked:n.testPublicOnly,onChange:p=>m({testPublicOnly:p.target.checked,testPrivateOnly:p.target.checked?!1:n.testPrivateOnly})}),s("registry.monitorConfiguration.publicOnly")]}),t.jsxs("label",{className:"inline-flex items-center gap-2 text-sm",children:[t.jsx("input",{type:"checkbox",checked:n.testPrivateOnly,onChange:p=>m({testPrivateOnly:p.target.checked,testPublicOnly:p.target.checked?!1:n.testPublicOnly})}),s("registry.monitorConfiguration.privateOnly")]})]})]}),t.jsxs("div",{className:"space-y-1",children:[t.jsx(He,{label:s("registry.monitorConfiguration.publishRequestsLabel"),hint:s("registry.monitorConfiguration.publishRequestsHint")}),t.jsx("div",{className:"flex items-center gap-4 rounded-md border border-input px-3 py-2",children:t.jsxs("label",{className:"inline-flex items-center gap-2 text-sm",children:[t.jsx("input",{type:"checkbox",checked:n.includePendingRequests,onChange:p=>m({includePendingRequests:p.target.checked})}),s("registry.monitorConfiguration.includePendingRequests")]})})]}),t.jsxs("div",{className:"space-y-1 md:col-span-2",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx(He,{label:s("registry.monitorConfiguration.additionalTestContextLabel"),hint:s("registry.monitorConfiguration.additionalTestContextHint")}),t.jsxs(Q,{size:"sm",variant:"outline",className:"h-7",onClick:()=>u(p=>!p),children:[s(a?"registry.monitorConfiguration.hideDefaultPrompt":"registry.monitorConfiguration.viewDefaultPrompt")," ",s("registry.monitorConfiguration.defaultSystemPrompt")]})]}),t.jsx(wt,{value:n.agentContext??"",onChange:p=>m({agentContext:p.target.value}),placeholder:s("registry.monitorConfiguration.agentContextPlaceholder"),rows:3}),t.jsx("p",{className:"text-[11px] text-muted-foreground",children:s("registry.monitorConfiguration.agentContextHelper")}),a&&t.jsx("pre",{className:"text-[11px] bg-muted/50 border border-border rounded px-3 py-2 whitespace-pre-wrap max-h-64 overflow-auto",children:Rr})]}),t.jsxs("div",{className:"space-y-1",children:[t.jsx(He,{label:s("registry.monitorConfiguration.perMcpTimeoutLabel"),hint:s("registry.monitorConfiguration.perMcpTimeoutHint")}),t.jsx(ye,{type:"number",value:n.perMcpTimeoutMs,onChange:p=>m({perMcpTimeoutMs:Number(p.target.value)})})]}),t.jsxs("div",{className:"space-y-1",children:[t.jsx(He,{label:s("registry.monitorConfiguration.perToolTimeoutLabel"),hint:s("registry.monitorConfiguration.perToolTimeoutHint")}),t.jsx(ye,{type:"number",value:n.perToolTimeoutMs,onChange:p=>m({perToolTimeoutMs:Number(p.target.value)})})]}),t.jsxs("div",{className:"space-y-1",children:[t.jsx(He,{label:s("registry.monitorConfiguration.maxAgentStepsLabel"),hint:s("registry.monitorConfiguration.maxAgentStepsHint")}),t.jsx(ye,{type:"number",value:n.maxAgentSteps,onChange:p=>m({maxAgentSteps:Number(p.target.value)}),min:1,max:30})]})]})]})}function He(s){const e=J.c(16),{label:r,hint:i}=s,n=ce();let l;e[0]!==r?(l=t.jsx(ae,{children:r}),e[0]=r,e[1]=l):l=e[1];let c;e[2]!==r||e[3]!==n?(c=n("registry.monitorConfiguration.aboutLabel",{label:r}),e[2]=r,e[3]=n,e[4]=c):c=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Vs,{size:14}),e[5]=o):o=e[5];let a;e[6]!==c?(a=t.jsx(br,{asChild:!0,children:t.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground transition-colors","aria-label":c,children:o})}),e[6]=c,e[7]=a):a=e[7];let u;e[8]!==i?(u=t.jsx(Nr,{side:"top",className:"max-w-72",children:i}),e[8]=i,e[9]=u):u=e[9];let d;e[10]!==a||e[11]!==u?(d=t.jsxs(Cr,{children:[a,u]}),e[10]=a,e[11]=u,e[12]=d):d=e[12];let m;return e[13]!==l||e[14]!==d?(m=t.jsxs("div",{className:"flex items-center gap-1.5",children:[l,d]}),e[13]=l,e[14]=d,e[15]=m):m=e[15],m}function Li(s){switch(s){case"authenticated":return"bg-success/10 text-success border-success/20";case"needs_auth":return"bg-warning/10 text-warning border-warning/20";default:return"bg-muted text-muted-foreground border-border"}}function Ai(s,e){switch(s){case"authenticated":return e("registry.monitorConnectionsPanel.authenticated");case"needs_auth":return e("registry.monitorConnectionsPanel.needsAuth");default:return e("registry.monitorConnectionsPanel.notChecked")}}function Ui(s){const e=J.c(4),{icon:r,title:i}=s,[n,l]=T.useState(!1);let c;return e[0]!==r||e[1]!==n||e[2]!==i?(c=t.jsx("div",{className:"size-10 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0 flex items-center justify-center",children:r&&!n?t.jsx("img",{src:r,alt:i,className:"h-full w-full object-cover",loading:"lazy",onError:()=>l(!0)}):t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:i.charAt(0).toUpperCase()})}),e[0]=r,e[1]=n,e[2]=i,e[3]=c):c=e[3],c}function Fi({entry:s,onAuthChanged:e,failedToolsCount:r,failedResultCount:i}){const[n,l]=T.useState(!1),[c,o]=T.useState(""),[a,u]=T.useState(!1),d=ce(),m=Tr(),{updateMutation:f}=Ot(),{org:p}=be(),g=De(),x=Ae(),h=s.mapping.connection_id,j=s.mapping.auth_status,N=s.item?.title??s.mapping.item_id,w=s.item?.server?.icons?.[0]?.src??null,_=s.item?.is_public??!1,b=s.item?.is_unlisted??!1,L=s.source==="request",k=Le({queryKey:Y.monitorConnectionAuthProbe(p.id,h),queryFn:async()=>wr({url:`/api/${p.slug}/mcp/${h}`,token:null,orgId:p.id}),staleTime:1e4,retry:1,refetchOnWindowFocus:!1}),P=k.data,R=k.isLoading,S=P?.supportsOAuth??!1,A=P?.hasOAuthToken??!1,M=P?.isServerError??!1,v=P?.isAuthenticated??!1,I=R?"checking":M?"server_error":S?v?A?"oauth_connected":"connected":"oauth_available":v?"connected":"token_required",U=()=>{m.mutate({connectionId:h,authStatus:"authenticated"},{onSuccess:()=>{e(),Ks(h),x.invalidateQueries({predicate:E=>E.queryKey[1]===Hs&&E.queryKey[3]===h})},onError:E=>G.error(d("registry.monitorConnectionsPanel.failedToSaveAuthStatus",{title:N,error:E instanceof Error?E.message:String(E)}))})},$=async()=>{l(!0);try{const W=(await k.refetch()).data;if(!W){G.error(d("registry.monitorConnectionsPanel.couldNotReachConnection",{title:N}));return}if(W.isAuthenticated){G.success(d("registry.monitorConnectionsPanel.connectionReachable",{title:N}));return}if(W.isServerError){G.error(d("registry.monitorConnectionsPanel.serverErrorConnection",{title:N}));return}if(!W.supportsOAuth){G.warning(d("registry.monitorConnectionsPanel.noOAuthSupport",{title:N}));return}G.info(d("registry.monitorConnectionsPanel.openingAuthWindow",{title:N}));const Z=await _r({connectionId:h,orgSlug:p.slug,clientName:`MCP Test - ${N}`,timeout:18e4,scope:"offline_access"});if(Z.error){G.error(d("registry.monitorConnectionsPanel.oauthFailed",{title:N,error:Z.error}));return}if(Z.tokenInfo){if(!(await fetch(`/api/${p.slug}/connections/${h}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:Z.tokenInfo.accessToken,refreshToken:Z.tokenInfo.refreshToken,expiresIn:Z.tokenInfo.expiresIn,scope:Z.tokenInfo.scope,clientId:Z.tokenInfo.clientId,clientSecret:Z.tokenInfo.clientSecret,tokenEndpoint:Z.tokenInfo.tokenEndpoint})})).ok)if(Z.token)await D(Z.token);else{G.error(d("registry.monitorConnectionsPanel.failedToSaveOAuthTokens",{title:N}));return}}else Z.token&&await D(Z.token);G.success(d("registry.monitorConnectionsPanel.connectionAuthenticated",{title:N})),U(),await k.refetch()}catch(E){console.error("[MonitorConnectionsPanel] Auth error:",E),G.error(d("registry.monitorConnectionsPanel.authError",{error:E instanceof Error?E.message:String(E)}))}finally{l(!1)}},D=async E=>{await g.call("COLLECTION_CONNECTIONS_UPDATE",{id:h,data:{connection_token:E}})},F=async()=>{if(!c.trim()){G.error(d("registry.monitorConnectionsPanel.tokenCannotBeEmpty"));return}l(!0);try{await D(c),G.success(d("registry.monitorConnectionsPanel.tokenSaved",{title:N})),u(!1),o(""),U(),await k.refetch()}catch(E){G.error(d("registry.monitorConnectionsPanel.errorSavingToken",{error:E instanceof Error?E.message:String(E)}))}finally{l(!1)}},q=!R&&j==="authenticated"&&!A&&!a&&c.length===0,O=R&&j==="authenticated"&&!a&&c.length===0,y=async E=>{if(L){G.info(d("registry.monitorConnectionsPanel.visibilityOnlyForStore"));return}if(!s.item){G.error(d("registry.monitorConnectionsPanel.registryItemNotFound"));return}try{await f.mutateAsync({id:s.item.id,data:E}),G.success(d("registry.monitorConnectionsPanel.visibilityUpdated")),e()}catch(W){G.error(W instanceof Error?W.message:d("registry.monitorConnectionsPanel.failedToUpdateVisibility"))}};return t.jsxs(ue,{className:"p-3 space-y-3 h-full",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[t.jsx(Ui,{icon:w,title:N},w??N),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:N}),t.jsx("p",{className:"text-xs text-muted-foreground break-all",children:s.remoteUrl??"-"}),t.jsxs("div",{className:"mt-1 flex items-center gap-1.5 flex-wrap",children:[t.jsx(H,{variant:"outline",className:ee("text-[10px]",Li(j)),children:Ai(j,d)}),t.jsx(H,{variant:_?"default":"secondary",className:"text-[10px]",children:d(_?"registry.monitorConnectionsPanel.public":"registry.monitorConnectionsPanel.notPublic")}),t.jsx(H,{variant:"outline",className:"text-[10px]",children:d(L?"registry.monitorConnectionsPanel.request":"registry.monitorConnectionsPanel.store")}),t.jsxs(H,{variant:"outline",className:ee("text-[10px]",I==="server_error"?"border-destructive/40 text-destructive":I==="oauth_connected"?"border-success/30 text-success":I==="oauth_available"?"border-sky-500/30 text-sky-600":I==="token_required"?"border-warning/30 text-warning":"text-muted-foreground"),children:[I==="checking"&&d("registry.monitorConnectionsPanel.checkingAuth"),I==="server_error"&&d("registry.monitorConnectionsPanel.serverError"),I==="oauth_connected"&&d("registry.monitorConnectionsPanel.oauthConnected"),I==="oauth_available"&&d("registry.monitorConnectionsPanel.oauthAvailable"),I==="token_required"&&d("registry.monitorConnectionsPanel.tokenManualAuth"),I==="connected"&&d("registry.monitorConnectionsPanel.connected")]}),b&&t.jsx(H,{variant:"outline",className:"text-[10px]",children:d("registry.monitorConnectionsPanel.hiddenInPrivate")}),(i>0||r>0)&&t.jsx(H,{variant:"destructive",className:"text-[10px]",children:d("registry.monitorConnectionsPanel.failedCount",{mcpCount:i,toolsCount:r})})]})]})]}),t.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:t.jsxs(ft,{children:[t.jsx(pt,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0","aria-label":d("registry.monitorConnectionsPanel.actionsFor",{title:N}),children:t.jsx($t,{size:16})})}),t.jsx(ht,{align:"end",children:L?t.jsx(Pe,{disabled:!0,children:d("registry.monitorConnectionsPanel.requestItemNoControls")}):t.jsxs(t.Fragment,{children:[t.jsx(Pe,{onClick:()=>y({is_public:!1}),children:d("registry.monitorConnectionsPanel.hideFromPublicStore")}),t.jsx(Pe,{onClick:()=>y({is_unlisted:!0}),children:d("registry.monitorConnectionsPanel.hideFromPrivateStore")}),t.jsx(Pe,{onClick:()=>y({is_public:!0,is_unlisted:!1}),children:d("registry.monitorConnectionsPanel.showInBothStores")})]})})]})})]}),t.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 flex-wrap",children:[S&&t.jsx(Q,{size:"sm",onClick:$,disabled:n,children:n?"...":d(A?"registry.monitorConnectionsPanel.reAuthOAuth":"registry.monitorConnectionsPanel.oauth")}),t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>k.refetch(),disabled:n||R,children:d(R?"registry.monitorConnectionsPanel.checking":"registry.monitorConnectionsPanel.reCheck")})]}),t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:d("registry.monitorConnectionsPanel.tokenApiKeyDescription")}),O?t.jsx("div",{className:"h-8 px-3 flex items-center rounded-md border border-border bg-muted/30 text-muted-foreground text-xs",children:d("registry.monitorConnectionsPanel.checkingAuth")}):q?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-8 px-3 flex items-center rounded-md border border-border bg-muted/50 text-muted-foreground font-mono text-xs",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>u(!0),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted",title:d("registry.monitorConnectionsPanel.replaceToken"),children:d("registry.monitorConnectionsPanel.edit")})]}):t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ye,{type:"password",placeholder:d("registry.monitorConnectionsPanel.pasteApiTokenPlaceholder"),value:c,onChange:E=>o(E.target.value),className:"h-8 text-xs flex-1",onKeyDown:E=>{E.key==="Enter"&&F()}}),t.jsx(Q,{size:"sm",className:"h-8 text-xs",onClick:F,disabled:n||!c.trim(),children:d("registry.monitorConnectionsPanel.save")}),t.jsx(Q,{size:"sm",variant:"ghost",className:"h-8 text-xs",onClick:()=>{u(!1),o("")},children:"✕"})]})]})]})}function $i(){const s=J.c(87),e=ce(),r=hs(),n=Pt("completed").data?.items?.[0],l=ut(n?.id,void 0,n?.status),c=Dr(),[o,a]=T.useState("all");let u,d,m,f,p,g;if(s[0]!==r||s[1]!==l.data?.items||s[2]!==o||s[3]!==c||s[4]!==e){const j=r.data?.items??[];let N;s[11]!==l.data?.items?(N=(l.data?.items??[]).reduce(zi,{}),s[11]=l.data?.items,s[12]=N):N=s[12];const w=N;let _;s[13]!==o?(_=K=>o==="all"?!0:K.source===o,s[13]=o,s[14]=_):_=s[14];const b=j.filter(_);u=ue,p="p-4 space-y-3";let L;s[15]!==e?(L=e("registry.monitorConnectionsPanel.title"),s[15]=e,s[16]=L):L=s[16];let k;s[17]!==L?(k=t.jsx("h3",{className:"text-sm font-semibold",children:L}),s[17]=L,s[18]=k):k=s[18];let P;s[19]!==e?(P=e("registry.monitorConnectionsPanel.description1"),s[19]=e,s[20]=P):P=s[20];let R;s[21]!==P?(R=t.jsx("p",{className:"text-[10px] text-muted-foreground",children:P}),s[21]=P,s[22]=R):R=s[22];let S;s[23]!==e?(S=e("registry.monitorConnectionsPanel.description2"),s[23]=e,s[24]=S):S=s[24];let A;s[25]!==S?(A=t.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:S}),s[25]=S,s[26]=A):A=s[26];let M;s[27]!==e?(M=e("registry.monitorConnectionsPanel.description3"),s[27]=e,s[28]=M):M=s[28];let v;s[29]!==M?(v=t.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:M}),s[29]=M,s[30]=v):v=s[30];const I=o==="all"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground";let U;s[31]!==I?(U=ee("px-2.5 py-1 text-xs rounded-md transition-colors",I),s[31]=I,s[32]=U):U=s[32];let $;s[33]===Symbol.for("react.memo_cache_sentinel")?($=()=>a("all"),s[33]=$):$=s[33];let D;s[34]!==e?(D=e("registry.monitorConnectionsPanel.filterAll"),s[34]=e,s[35]=D):D=s[35];let F;s[36]!==U||s[37]!==D?(F=t.jsx("button",{type:"button",className:U,onClick:$,children:D}),s[36]=U,s[37]=D,s[38]=F):F=s[38];const q=o==="store"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground";let O;s[39]!==q?(O=ee("px-2.5 py-1 text-xs rounded-md transition-colors",q),s[39]=q,s[40]=O):O=s[40];let y;s[41]===Symbol.for("react.memo_cache_sentinel")?(y=()=>a("store"),s[41]=y):y=s[41];let E;s[42]!==e?(E=e("registry.monitorConnectionsPanel.filterStore"),s[42]=e,s[43]=E):E=s[43];let W;s[44]!==O||s[45]!==E?(W=t.jsx("button",{type:"button",className:O,onClick:y,children:E}),s[44]=O,s[45]=E,s[46]=W):W=s[46];const Z=o==="request"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground";let te;s[47]!==Z?(te=ee("px-2.5 py-1 text-xs rounded-md transition-colors",Z),s[47]=Z,s[48]=te):te=s[48];let me;s[49]===Symbol.for("react.memo_cache_sentinel")?(me=()=>a("request"),s[49]=me):me=s[49];let se;s[50]!==e?(se=e("registry.monitorConnectionsPanel.filterRequests"),s[50]=e,s[51]=se):se=s[51];let ne;s[52]!==te||s[53]!==se?(ne=t.jsx("button",{type:"button",className:te,onClick:me,children:se}),s[52]=te,s[53]=se,s[54]=ne):ne=s[54];let ge;s[55]!==F||s[56]!==W||s[57]!==ne?(ge=t.jsxs("div",{className:"mt-2 inline-flex rounded-lg border border-border p-0.5",children:[F,W,ne]}),s[55]=F,s[56]=W,s[57]=ne,s[58]=ge):ge=s[58];let de;s[59]!==R||s[60]!==A||s[61]!==v||s[62]!==ge||s[63]!==k?(de=t.jsxs("div",{children:[k,R,A,v,ge]}),s[59]=R,s[60]=A,s[61]=v,s[62]=ge,s[63]=k,s[64]=de):de=s[64];let ie;s[65]!==c||s[66]!==e?(ie=()=>{c.mutate(void 0,{onSuccess:()=>G.success(e("registry.monitorConnectionsPanel.connectionsSynced")),onError:K=>G.error(e("registry.monitorConnectionsPanel.syncFailed",{error:K.message}))})},s[65]=c,s[66]=e,s[67]=ie):ie=s[67];let C;s[68]!==c.isPending||s[69]!==e?(C=c.isPending?e("registry.monitorConnectionsPanel.syncing"):e("registry.monitorConnectionsPanel.sync"),s[68]=c.isPending,s[69]=e,s[70]=C):C=s[70];let B;s[71]!==c.isPending||s[72]!==ie||s[73]!==C?(B=t.jsx(Q,{size:"sm",variant:"outline",onClick:ie,disabled:c.isPending,children:C}),s[71]=c.isPending,s[72]=ie,s[73]=C,s[74]=B):B=s[74],s[75]!==de||s[76]!==B?(g=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[de,B]}),s[75]=de,s[76]=B,s[77]=g):g=s[77],d="space-y-2",m=r.isLoading?t.jsx("p",{className:"text-xs text-muted-foreground text-center py-3",children:e("registry.monitorConnectionsPanel.loadingConnections")}):r.isError?t.jsxs("div",{className:"p-8 text-center rounded-lg border border-border",children:[t.jsx("p",{className:"text-sm text-destructive",children:e("registry.monitorConnectionsPanel.loadFailed")}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:r.error instanceof Error?r.error.message:e("registry.monitorConnectionsPanel.unknownError")})]}):b.length===0&&t.jsx("p",{className:"text-xs text-muted-foreground text-center py-3",children:e("registry.monitorConnectionsPanel.noConnectionsForFilter")}),f=!r.isLoading&&!r.isError&&b.length>0&&t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3",children:b.map(K=>{const re=w[K.mapping.item_id]??{failedTools:0,failedResults:0};return t.jsx(Fi,{entry:K,onAuthChanged:()=>r.refetch(),failedToolsCount:re.failedTools,failedResultCount:re.failedResults},K.mapping.id)})}),s[0]=r,s[1]=l.data?.items,s[2]=o,s[3]=c,s[4]=e,s[5]=u,s[6]=d,s[7]=m,s[8]=f,s[9]=p,s[10]=g}else u=s[5],d=s[6],m=s[7],f=s[8],p=s[9],g=s[10];let x;s[78]!==d||s[79]!==m||s[80]!==f?(x=t.jsxs("div",{className:d,children:[m,f]}),s[78]=d,s[79]=m,s[80]=f,s[81]=x):x=s[81];let h;return s[82]!==u||s[83]!==p||s[84]!==g||s[85]!==x?(h=t.jsxs(u,{className:p,children:[g,x]}),s[82]=u,s[83]=p,s[84]=g,s[85]=x,s[86]=h):h=s[86],h}function zi(s,e){const r=s[e.item_id]??{failedTools:0,failedResults:0},i=e.tool_results.filter(Oi).length;return r.failedTools=r.failedTools+i,(e.status==="failed"||e.status==="error")&&(r.failedResults=r.failedResults+1),s[e.item_id]=r,s}function Oi(s){return!s.success}function ws(s){switch(s){case"running":return"bg-primary/10 text-primary border-primary/20";case"completed":return"bg-success/10 text-success border-success/20";case"failed":return"bg-destructive/10 text-destructive border-destructive/20";case"cancelled":return"bg-muted text-muted-foreground border-border";case"pending":return"bg-warning/10 text-warning border-warning/20";default:return""}}function _s(s,e){if(!s)return null;const r=e?new Date(e).getTime():Date.now(),i=new Date(s).getTime(),n=r-i;return n<1e3?`${n}ms`:n<6e4?`${(n/1e3).toFixed(1)}s`:`${Math.floor(n/6e4)}m ${Math.round(n%6e4/1e3)}s`}function Bi(s){const e=new Map;for(const r of s)e.has(r.toolName)&&e.delete(r.toolName),e.set(r.toolName,r);return Array.from(e.values())}function Ps(s){const e=Bi(s),r=e.every(c=>c.outputPreview==="health_check: not called"),i=e.filter(c=>c.outputPreview!=="health_check: not called"),n=i.filter(c=>c.success).length,l=i.filter(c=>!c.success).length;return{latestToolResults:e,realToolTests:i,isHealthCheck:r,passedTools:n,failedTools:l,hasToolTests:i.length>0}}function Ki(s){return s.total_items?Math.min(100,Math.round(s.tested_items/s.total_items*100)):0}function Hi(s){if(!s)return null;const e=s.match(/Not executed tools \((\d+)\/(\d+)\):/i);if(!e)return null;const r=Number(e[2]);return Number.isFinite(r)&&r>=0?r:null}function Vi(s){const e=J.c(45),{result:r,index:i,icon:n}=s,l=ce(),[c,o]=T.useState(!1);let a;if(e[0]!==c||e[1]!==n||e[2]!==i||e[3]!==r.action_taken||e[4]!==r.agent_summary||e[5]!==r.connection_ok||e[6]!==r.duration_ms||e[7]!==r.error_message||e[8]!==r.id||e[9]!==r.item_title||e[10]!==r.status||e[11]!==r.tool_results||e[12]!==r.tools_listed||e[13]!==l){const{latestToolResults:u,realToolTests:d,isHealthCheck:m,passedTools:f,failedTools:p,hasToolTests:g}=Ps(r.tool_results),x=d.length;let h;e[15]!==r.agent_summary?(h=Hi(r.agent_summary),e[15]=r.agent_summary,e[16]=h):h=e[16];const j=h,N=Math.max(u.length,j??0),w=N>0?l("registry.monitorDashboard.toolsTestedCount",{tested:x,discovered:N}):l("registry.monitorDashboard.noTools");let _;e[17]!==c?(_=()=>o(!c),e[17]=c,e[18]=_):_=e[18];const b=i+1;let L;e[19]!==b?(L=t.jsx("span",{className:"text-muted-foreground w-5 text-right shrink-0",children:b}),e[19]=b,e[20]=L):L=e[20];let k;e[21]!==n||e[22]!==r.item_title?(k=t.jsx("div",{className:"size-5 rounded border border-border bg-muted/20 overflow-hidden shrink-0 flex items-center justify-center",children:n?t.jsx("img",{src:n,alt:r.item_title,className:"h-full w-full object-cover",loading:"lazy"}):t.jsx("span",{className:"text-[9px] font-semibold text-muted-foreground",children:r.item_title.charAt(0).toUpperCase()})}),e[21]=n,e[22]=r.item_title,e[23]=k):k=e[23];const P=r.status==="passed"?"text-success":r.status==="needs_auth"?"text-warning":"text-destructive";let R;e[24]!==P?(R=ee("shrink-0",P),e[24]=P,e[25]=R):R=e[25];const S=r.status==="passed"?"✓":r.status==="needs_auth"?"🔑":"✗";let A;e[26]!==R||e[27]!==S?(A=t.jsx("span",{className:R,children:S}),e[26]=R,e[27]=S,e[28]=A):A=e[28];let M;e[29]!==r.item_title?(M=t.jsx("span",{className:"font-medium truncate flex-1 min-w-0",children:r.item_title}),e[29]=r.item_title,e[30]=M):M=e[30];let v;e[31]!==r.duration_ms?(v=t.jsxs("span",{className:"text-muted-foreground shrink-0",children:[r.duration_ms,"ms"]}),e[31]=r.duration_ms,e[32]=v):v=e[32];const I=r.status==="passed"?"text-success border-success/20":r.status==="needs_auth"?"text-warning border-warning/20":"text-destructive border-destructive/20";let U;e[33]!==I?(U=ee("text-[9px] capitalize shrink-0",I),e[33]=I,e[34]=U):U=e[34];let $;e[35]!==r.status?($=r.status.replace("_"," "),e[35]=r.status,e[36]=$):$=e[36];let D;e[37]!==U||e[38]!==$?(D=t.jsx(H,{variant:"outline",className:U,children:$}),e[37]=U,e[38]=$,e[39]=D):D=e[39];let F;e[40]!==r.connection_ok||e[41]!==l?(F=r.connection_ok?t.jsx("span",{className:"text-[10px] text-success shrink-0",title:l("registry.monitorDashboard.connOkTitle"),children:"conn✓"}):t.jsx("span",{className:"text-[10px] text-destructive shrink-0",title:l("registry.monitorDashboard.connFailTitle"),children:"conn✗"}),e[40]=r.connection_ok,e[41]=l,e[42]=F):F=e[42];const q=c?"▲":"▼";let O;e[43]!==q?(O=t.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:q}),e[43]=q,e[44]=O):O=e[44],a=t.jsxs("div",{className:"rounded border border-border overflow-hidden",children:[t.jsxs("button",{type:"button",className:"w-full text-left flex items-center gap-2 px-2 py-1.5 text-xs hover:bg-muted/30 transition-colors",onClick:_,children:[L,k,A,M,v,D,F,r.tools_listed&&t.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:g?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-success",children:[f,"✓"]})," ",t.jsxs("span",{className:ee(p>0?"text-destructive":""),children:[p,"✗"]})]}):m&&u.length>0?t.jsx("span",{children:l("registry.monitorDashboard.toolsFoundCount",{count:u.length})}):l("registry.monitorDashboard.noToolsLabel")}),t.jsx(H,{variant:"outline",className:"text-[9px] shrink-0",children:w}),O]}),c&&t.jsxs("div",{className:"border-t border-border px-3 py-2 space-y-2 bg-muted/10",children:[r.error_message&&t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-[10px] font-semibold text-destructive",children:l("registry.monitorDashboard.errorLabel")}),t.jsx("pre",{className:"text-[11px] bg-destructive/5 border border-destructive/10 rounded px-2 py-1.5 whitespace-pre-wrap break-all text-destructive max-h-20 overflow-auto",children:r.error_message})]}),t.jsxs("div",{className:"flex items-center gap-3 text-[10px] flex-wrap",children:[t.jsxs("span",{children:[l("registry.monitorDashboard.connectionLabel")," ",t.jsx("span",{className:ee(r.connection_ok?"text-success":"text-destructive"),children:r.connection_ok?l("registry.monitorDashboard.statusOk"):l("registry.monitorDashboard.statusFailed")})]}),t.jsxs("span",{children:[l("registry.monitorDashboard.toolsListedLabel")," ",t.jsx("span",{className:ee(r.tools_listed?"text-success":"text-destructive"),children:r.tools_listed?l("registry.monitorDashboard.yes"):l("registry.monitorDashboard.no")})]}),r.action_taken!=="none"&&t.jsxs(H,{variant:"destructive",className:"text-[9px] px-1.5 py-0",children:["action: ",r.action_taken]})]}),g?t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground",children:l("registry.monitorDashboard.toolsTestedDetails",{passed:f,failed:p})}),t.jsx("div",{className:"space-y-0.5",children:d.map((y,E)=>t.jsx(Gi,{tool:y},`${r.id}-${y.toolName}-${E}`))})]}):m&&u.length>0?t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground",children:l("registry.monitorDashboard.toolsDiscoveredHealthCheck",{count:u.length})}),t.jsx("div",{className:"flex flex-wrap gap-1",children:u.map((y,E)=>t.jsx(H,{variant:"outline",className:"text-[10px] font-mono",children:y.toolName},`${r.id}-${y.toolName}-${E}`))})]}):r.tools_listed?t.jsx("p",{className:"text-[10px] text-muted-foreground italic",children:l("registry.monitorDashboard.noToolsFound")}):null,r.agent_summary&&t.jsx("p",{className:"text-[11px] bg-muted/50 rounded px-2 py-1.5",children:r.agent_summary})]})]}),e[0]=c,e[1]=n,e[2]=i,e[3]=r.action_taken,e[4]=r.agent_summary,e[5]=r.connection_ok,e[6]=r.duration_ms,e[7]=r.error_message,e[8]=r.id,e[9]=r.item_title,e[10]=r.status,e[11]=r.tool_results,e[12]=r.tools_listed,e[13]=l,e[14]=a}else a=e[14];return a}function Gi(s){const e=J.c(31),{tool:r}=s,i=ce(),[n,l]=T.useState(!1);let c;e[0]!==n?(c=()=>l(!n),e[0]=n,e[1]=c):c=e[1];const o=r.success?"text-success":"text-destructive";let a;e[2]!==o?(a=ee("font-bold",o),e[2]=o,e[3]=a):a=e[3];const u=r.success?"✓":"✗";let d;e[4]!==a||e[5]!==u?(d=t.jsx("span",{className:a,children:u}),e[4]=a,e[5]=u,e[6]=d):d=e[6];let m;e[7]!==r.toolName?(m=t.jsx("span",{className:"font-mono truncate flex-1",children:r.toolName}),e[7]=r.toolName,e[8]=m):m=e[8];let f;e[9]!==r.durationMs?(f=t.jsxs("span",{className:"text-muted-foreground shrink-0",children:[r.durationMs,"ms"]}),e[9]=r.durationMs,e[10]=f):f=e[10];let p;e[11]!==r.error?(p=r.error&&t.jsx("span",{className:"text-destructive truncate max-w-28",title:r.error,children:r.error}),e[11]=r.error,e[12]=p):p=e[12];const g=n?"▲":"▼";let x;e[13]!==g?(x=t.jsx("span",{className:"text-muted-foreground",children:g}),e[13]=g,e[14]=x):x=e[14];let h;e[15]!==c||e[16]!==x||e[17]!==d||e[18]!==m||e[19]!==f||e[20]!==p?(h=t.jsxs("button",{type:"button",className:"w-full text-left flex items-center gap-2 px-2 py-1 text-[11px] hover:bg-muted/30 transition-colors",onClick:c,children:[d,m,f,p,x]}),e[15]=c,e[16]=x,e[17]=d,e[18]=m,e[19]=f,e[20]=p,e[21]=h):h=e[21];let j;e[22]!==n||e[23]!==i||e[24]!==r.error||e[25]!==r.input||e[26]!==r.outputPreview?(j=n&&t.jsxs("div",{className:"border-t border-border px-2 py-1.5 space-y-1 bg-muted/10 text-[11px]",children:[r.error&&t.jsx("pre",{className:"bg-destructive/5 border border-destructive/10 rounded px-2 py-1 whitespace-pre-wrap break-all text-destructive max-h-20 overflow-auto",children:r.error}),r.input&&Object.keys(r.input).length>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground",children:i("registry.monitorDashboard.inputLabel")}),t.jsx("pre",{className:"bg-muted/50 rounded px-2 py-1 whitespace-pre-wrap break-all max-h-16 overflow-auto",children:JSON.stringify(r.input,null,2)})]}),r.outputPreview&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground",children:i("registry.monitorDashboard.outputLabel")}),t.jsx("pre",{className:"bg-muted/50 rounded px-2 py-1 whitespace-pre-wrap break-all max-h-16 overflow-auto",children:r.outputPreview})]})]}),e[22]=n,e[23]=i,e[24]=r.error,e[25]=r.input,e[26]=r.outputPreview,e[27]=j):j=e[27];let N;return e[28]!==h||e[29]!==j?(N=t.jsxs("div",{className:"rounded border border-border overflow-hidden",children:[h,j]}),e[28]=h,e[29]=j,e[30]=N):N=e[30],N}function Qi({activeRunId:s,onRunChange:e}){const r=ce(),{settings:i}=fs(),[n,l]=T.useState(null),[c,o]=T.useState(!1),a=T.useRef(0),u=T.useRef(null),d=Ir(),m=kr(),f=zt(s),p=Pt(),g=hs(),x=f.data?.run??null,h=x?.status,j=x?.config_snapshot?.monitorMode??x?.config_snapshot?.testMode,N=ut(s,void 0,h),w=(p.data?.items??[]).find(v=>v.status==="running"),_=p.data?.items?.[0]?.id;!s&&_&&u.current!==_&&(u.current=_,queueMicrotask(()=>{e(_)}));const b=async()=>{const v=Date.now();if(v-a.current<1e3)return;a.current=v;const I=n??i.monitorMode,U=await d.mutateAsync({...i,monitorMode:I});e(U.run.id)},L=async()=>{if(w&&w.id!==s&&w.status==="running"){o(!0);return}await b()},k=async()=>{s&&await m.mutateAsync(s)},P=x?.status==="running",R=x?_s(x.started_at,x.finished_at):null,S=N.data?.items??[],A=(g.data?.items??[]).reduce((v,I)=>(v[I.mapping.item_id]=I.item?.server?.icons?.[0]?.src??null,v),{}),M=n??i.monitorMode;return t.jsxs("div",{className:"space-y-4 min-w-0",children:[t.jsxs("div",{className:"space-y-4 min-w-0",children:[t.jsxs(ue,{className:"p-4 space-y-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3 flex-wrap",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-semibold",children:r("registry.monitorDashboard.currentQaRunTitle")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:r("registry.monitorDashboard.currentQaRunDescription")})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[w&&w.id!==s&&t.jsx(H,{variant:"outline",className:"text-[10px]",children:r("registry.monitorDashboard.runInProgressBadge",{runId:w.id.slice(0,8)})}),t.jsxs(Q,{size:"sm",onClick:L,disabled:d.isPending||P,className:"gap-1.5",children:[t.jsx(Pr,{size:14}),d.isPending?r("registry.monitorDashboard.startingButton"):w&&w.id!==s?r("registry.monitorDashboard.startAnotherRunButton"):r("registry.monitorDashboard.startQaRunButton")]}),t.jsxs(Q,{size:"sm",variant:"outline",onClick:k,disabled:!s||!P,className:"gap-1.5",children:[t.jsx(Gs,{size:14}),r("registry.monitorDashboard.cancelButton")]})]})]}),t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:[t.jsxs("label",{className:"space-y-1",children:[t.jsx("span",{className:"text-[11px] text-muted-foreground",children:r("registry.monitorDashboard.qaModeLabel")}),t.jsxs("select",{className:"h-9 w-full rounded-md border border-input bg-background px-3 text-sm",value:M,onChange:v=>l(v.target.value),disabled:P,children:[t.jsx("option",{value:"health_check",children:r("registry.monitorDashboard.modeHealthCheck")}),t.jsx("option",{value:"tool_call",children:r("registry.monitorDashboard.modeToolCall")}),t.jsx("option",{value:"full_agent",children:r("registry.monitorDashboard.modeAgentic")})]})]}),t.jsxs("label",{className:"space-y-1",children:[t.jsx("span",{className:"text-[11px] text-muted-foreground",children:r("registry.monitorDashboard.qaRunHistoryLabel")}),t.jsxs("select",{className:"h-9 w-full rounded-md border border-input bg-background px-3 text-sm",value:s??"",onChange:v=>e(v.target.value||void 0),children:[t.jsx("option",{value:"",children:r("registry.monitorDashboard.autoSelectLatestRun")}),(p.data?.items??[]).map(v=>t.jsxs("option",{value:v.id,children:[new Date(v.created_at).toLocaleString()," -"," ",v.status]},v.id))]})]})]}),t.jsx("p",{className:"text-[11px] text-muted-foreground rounded-md bg-muted/30 px-2.5 py-2",children:r(M==="health_check"?"registry.monitorDashboard.modeDescriptionHealthCheck":M==="tool_call"?"registry.monitorDashboard.modeDescriptionToolCall":"registry.monitorDashboard.modeDescriptionAgentic")}),x?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[t.jsx(H,{className:ee("capitalize",ws(x.status),x.status==="running"?"animate-pulse":""),children:x.status}),t.jsx("span",{className:"text-xs text-muted-foreground",children:r("registry.monitorDashboard.itemsTestedCount",{tested:x.tested_items,total:x.total_items})}),R&&t.jsx("span",{className:"text-xs text-muted-foreground",children:R}),P&&x.current_item_id&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate max-w-64",children:[r("registry.monitorDashboard.qaOnLabel")," ",t.jsx("span",{className:"font-mono",children:x.current_item_id})]})]}),t.jsx("div",{className:"h-2.5 rounded-full bg-muted overflow-hidden",children:t.jsx("div",{className:ee("h-full transition-all duration-500",x.failed_items>0?"bg-warning":"bg-success",P?"animate-pulse":""),style:{width:`${Ki(x)}%`}})}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:[t.jsxs(ue,{className:"p-2.5 space-y-0.5",children:[t.jsx("p",{className:"text-[10px] text-success",children:r("registry.monitorDashboard.passedLabel")}),t.jsx("p",{className:"text-lg font-bold text-success",children:x.passed_items})]}),t.jsxs(ue,{className:"p-2.5 space-y-0.5",children:[t.jsx("p",{className:"text-[10px] text-destructive",children:r("registry.monitorDashboard.failedLabel")}),t.jsx("p",{className:"text-lg font-bold text-destructive",children:x.failed_items})]}),t.jsxs(ue,{className:"p-2.5 space-y-0.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:r("registry.monitorDashboard.skippedLabel")}),t.jsx("p",{className:"text-lg font-bold",children:x.skipped_items})]}),t.jsxs(ue,{className:"p-2.5 space-y-0.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:r("registry.monitorDashboard.totalLabel")}),t.jsx("p",{className:"text-lg font-bold",children:x.total_items})]})]})]}):t.jsx("p",{className:"text-xs text-muted-foreground",children:r("registry.monitorDashboard.noRunSelectedMessage")})]}),t.jsxs(ue,{className:"p-4 space-y-2 min-h-[360px]",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-semibold",children:r("registry.monitorDashboard.qaResultsLogTitle",{count:S.length})}),t.jsx("p",{className:"text-[11px] text-muted-foreground",children:r("registry.monitorDashboard.qaResultsLogDescription")})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[P&&t.jsx(H,{className:"bg-primary/10 text-primary border-primary/20 animate-pulse",children:r("registry.monitorDashboard.runInProgressLabel")}),x&&t.jsx(H,{variant:"outline",className:"text-[10px]",children:r("registry.monitorDashboard.progressBadge",{tested:x.tested_items,total:x.total_items})}),j&&t.jsx(H,{variant:"outline",className:"text-[10px]",children:r("registry.monitorDashboard.modeBadge",{mode:j.replace("_"," ")})})]})]}),S.length===0?t.jsx("div",{className:"h-[280px] rounded border border-dashed border-border flex items-center justify-center text-xs text-muted-foreground",children:r("registry.monitorDashboard.noResultsYetMessage")}):t.jsx("div",{ref:v=>{v&&P&&v.scrollHeight-v.scrollTop-v.clientHeight<120&&requestAnimationFrame(()=>{v.scrollTop=v.scrollHeight})},className:"space-y-1 max-h-[60vh] overflow-auto pr-1",children:S.map((v,I)=>t.jsx(Vi,{result:v,index:I,icon:A[v.item_id]},v.id))})]})]}),t.jsx(ct,{open:c,onOpenChange:o,children:t.jsxs(lt,{children:[t.jsxs(it,{children:[t.jsx(st,{children:r("registry.monitorDashboard.confirmStartTitle")}),t.jsx(rt,{children:r("registry.monitorDashboard.confirmStartDescription",{runId:w?` (${w.id})`:""})})]}),t.jsxs(ot,{children:[t.jsx(nt,{children:r("registry.monitorDashboard.cancelButtonDialog")}),t.jsx(at,{onClick:()=>{o(!1),b()},children:r("registry.monitorDashboard.startAnywayButton")})]})]})})]})}function Rs(s){switch(s){case"passed":return"bg-success/10 text-success border-success/20";case"failed":case"error":return"bg-destructive/10 text-destructive border-destructive/20";case"needs_auth":return"bg-warning/10 text-warning border-warning/20";case"skipped":return"bg-muted text-muted-foreground border-border";default:return""}}function Yi(s){switch(s){case"passed":return"✓";case"failed":return"✗";case"error":return"⚠";case"needs_auth":return"🔑";case"skipped":return"⏭";default:return"?"}}function Wi(s){const e=J.c(28),{tool:r}=s,i=ce(),[n,l]=T.useState(!1);let c;e[0]!==n?(c=()=>l(!n),e[0]=n,e[1]=c):c=e[1];const o=r.success?"text-success":"text-destructive";let a;e[2]!==o?(a=ee("text-xs font-bold",o),e[2]=o,e[3]=a):a=e[3];const u=r.success?"✓":"✗";let d;e[4]!==a||e[5]!==u?(d=t.jsx("span",{className:a,children:u}),e[4]=a,e[5]=u,e[6]=d):d=e[6];let m;e[7]!==r.toolName?(m=t.jsx("span",{className:"text-xs font-mono truncate flex-1",children:r.toolName}),e[7]=r.toolName,e[8]=m):m=e[8];let f;e[9]!==r.durationMs?(f=t.jsxs("span",{className:"text-[10px] text-muted-foreground shrink-0",children:[r.durationMs,"ms"]}),e[9]=r.durationMs,e[10]=f):f=e[10];const p=n?"▲":"▼";let g;e[11]!==p?(g=t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p}),e[11]=p,e[12]=g):g=e[12];let x;e[13]!==c||e[14]!==d||e[15]!==m||e[16]!==f||e[17]!==g?(x=t.jsxs("button",{type:"button",className:"w-full text-left px-3 py-2 flex items-center gap-2 hover:bg-muted/30 transition-colors",onClick:c,children:[d,m,f,g]}),e[13]=c,e[14]=d,e[15]=m,e[16]=f,e[17]=g,e[18]=x):x=e[18];let h;e[19]!==n||e[20]!==i||e[21]!==r.error||e[22]!==r.input||e[23]!==r.outputPreview?(h=n&&t.jsxs("div",{className:"border-t border-border px-3 py-2 space-y-1.5 bg-muted/20",children:[r.error&&t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-[10px] font-semibold text-destructive",children:i("registry.monitorRunDetail.error")}),t.jsx("pre",{className:"text-[11px] bg-destructive/5 border border-destructive/10 rounded px-2 py-1.5 whitespace-pre-wrap break-all text-destructive",children:r.error})]}),r.input&&Object.keys(r.input).length>0&&t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground",children:i("registry.monitorRunDetail.input")}),t.jsx("pre",{className:"text-[11px] bg-muted/50 rounded px-2 py-1.5 whitespace-pre-wrap break-all max-h-24 overflow-auto",children:JSON.stringify(r.input,null,2)})]}),r.outputPreview&&t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground",children:i("registry.monitorRunDetail.outputPreview")}),t.jsx("pre",{className:"text-[11px] bg-muted/50 rounded px-2 py-1.5 whitespace-pre-wrap break-all max-h-24 overflow-auto",children:r.outputPreview})]}),!r.error&&!r.outputPreview&&(!r.input||Object.keys(r.input).length===0)&&t.jsx("p",{className:"text-[10px] text-muted-foreground",children:i("registry.monitorRunDetail.noAdditionalDetails")})]}),e[19]=n,e[20]=i,e[21]=r.error,e[22]=r.input,e[23]=r.outputPreview,e[24]=h):h=e[24];let j;return e[25]!==x||e[26]!==h?(j=t.jsxs("div",{className:"rounded border border-border",children:[x,h]}),e[25]=x,e[26]=h,e[27]=j):j=e[27],j}function Ji(s){const e=J.c(60),{result:r}=s,i=ce(),[n,l]=T.useState(r.status!=="passed");let c;if(e[0]!==n||e[1]!==r.action_taken||e[2]!==r.agent_summary||e[3]!==r.connection_ok||e[4]!==r.duration_ms||e[5]!==r.error_message||e[6]!==r.id||e[7]!==r.item_title||e[8]!==r.status||e[9]!==r.tool_results||e[10]!==r.tools_listed||e[11]!==i){const{latestToolResults:o,realToolTests:a,isHealthCheck:u,passedTools:d,failedTools:m,hasToolTests:f}=Ps(r.tool_results);let p;e[13]!==n?(p=()=>l(!n),e[13]=n,e[14]=p):p=e[14];let g;e[15]!==r.status?(g=Yi(r.status),e[15]=r.status,e[16]=g):g=e[16];let x;e[17]!==g?(x=t.jsx("span",{className:"text-base shrink-0",children:g}),e[17]=g,e[18]=x):x=e[18];let h;e[19]!==r.item_title?(h=t.jsx("p",{className:"text-sm font-medium truncate",children:r.item_title}),e[19]=r.item_title,e[20]=h):h=e[20];let j;e[21]!==r.duration_ms?(j=t.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[r.duration_ms,"ms"]}),e[21]=r.duration_ms,e[22]=j):j=e[22];let N;e[23]!==i?(N=i("registry.monitorRunDetail.conn"),e[23]=i,e[24]=N):N=e[24];const w=r.connection_ok?"✓":"✗";let _;e[25]!==N||e[26]!==w?(_=t.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[N,":"," ",w]}),e[25]=N,e[26]=w,e[27]=_):_=e[27];let b;e[28]!==i?(b=i("registry.monitorRunDetail.toolsListed"),e[28]=i,e[29]=b):b=e[29];const L=r.tools_listed?"✓":"✗";let k;e[30]!==b||e[31]!==L?(k=t.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[b,":"," ",L]}),e[30]=b,e[31]=L,e[32]=k):k=e[32];const P=o.length>0&&t.jsx("span",{className:"text-[10px] text-muted-foreground",children:f?t.jsxs(t.Fragment,{children:[i("registry.monitorRunDetail.tools"),": ",d,"✓"," ",m,"✗"]}):t.jsxs(t.Fragment,{children:[o.length," ",i("registry.monitorRunDetail.toolsFound")]})});let R;e[33]!==r.action_taken||e[34]!==i?(R=r.action_taken!=="none"&&t.jsxs(H,{variant:"destructive",className:"text-[9px] px-1.5 py-0",children:[i("registry.monitorRunDetail.action"),": ",r.action_taken]}),e[33]=r.action_taken,e[34]=i,e[35]=R):R=e[35];let S;e[36]!==k||e[37]!==P||e[38]!==R||e[39]!==j||e[40]!==_?(S=t.jsxs("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[j,_,k,P,R]}),e[36]=k,e[37]=P,e[38]=R,e[39]=j,e[40]=_,e[41]=S):S=e[41];let A;e[42]!==S||e[43]!==h?(A=t.jsxs("div",{className:"min-w-0 flex-1",children:[h,S]}),e[42]=S,e[43]=h,e[44]=A):A=e[44];let M;e[45]!==r.status?(M=ee("capitalize shrink-0",Rs(r.status)),e[45]=r.status,e[46]=M):M=e[46];let v;e[47]!==r.status?(v=r.status.replace("_"," "),e[47]=r.status,e[48]=v):v=e[48];let I;e[49]!==M||e[50]!==v?(I=t.jsx(H,{className:M,children:v}),e[49]=M,e[50]=v,e[51]=I):I=e[51];const U=n?"▲":"▼";let $;e[52]!==U?($=t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:U}),e[52]=U,e[53]=$):$=e[53];let D;e[54]!==A||e[55]!==I||e[56]!==p||e[57]!==$||e[58]!==x?(D=t.jsxs("button",{type:"button",className:"w-full text-left px-4 py-3 flex items-center gap-3 hover:bg-muted/30 transition-colors",onClick:p,children:[x,A,I,$]}),e[54]=A,e[55]=I,e[56]=p,e[57]=$,e[58]=x,e[59]=D):D=e[59],c=t.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[D,n&&t.jsxs("div",{className:"border-t border-border px-4 py-3 space-y-2 bg-muted/10",children:[t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:[t.jsxs("div",{className:"rounded border border-border px-2 py-1.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:i("registry.monitorRunDetail.connection")}),t.jsx("p",{className:ee("text-xs font-medium",r.connection_ok?"text-success":"text-destructive"),children:r.connection_ok?i("registry.monitorRunDetail.connected"):i("registry.monitorRunDetail.failed")})]}),t.jsxs("div",{className:"rounded border border-border px-2 py-1.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:i("registry.monitorRunDetail.toolsListedLabel")}),t.jsx("p",{className:ee("text-xs font-medium",r.tools_listed?"text-success":"text-destructive"),children:r.tools_listed?i("registry.monitorRunDetail.yesWithCount",{count:o.length}):i("registry.monitorRunDetail.no")})]}),t.jsxs("div",{className:"rounded border border-border px-2 py-1.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:i("registry.monitorRunDetail.duration")}),t.jsxs("p",{className:"text-xs font-medium",children:[r.duration_ms,"ms"]})]}),t.jsxs("div",{className:"rounded border border-border px-2 py-1.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:i("registry.monitorRunDetail.actionTaken")}),t.jsx("p",{className:"text-xs font-medium capitalize",children:r.action_taken.replace(/_/g," ")})]})]}),r.error_message&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-[10px] font-semibold text-destructive",children:i("registry.monitorRunDetail.errorMessage")}),t.jsx("pre",{className:"text-xs bg-destructive/5 border border-destructive/10 rounded px-3 py-2 whitespace-pre-wrap break-all text-destructive",children:r.error_message})]}),f?t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground",children:i("registry.monitorRunDetail.toolResults",{passed:d,failed:m})}),t.jsx("div",{className:"space-y-1",children:a.map((F,q)=>t.jsx(Wi,{tool:F},`${r.id}-${F.toolName}-${q}`))})]}):u&&o.length>0?t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground",children:i("registry.monitorRunDetail.toolsDiscovered",{count:o.length})}),t.jsx("div",{className:"flex flex-wrap gap-1",children:o.map((F,q)=>t.jsx(H,{variant:"outline",className:"text-[10px] font-mono",children:F.toolName},`${r.id}-${F.toolName}-${q}`))})]}):null,r.agent_summary&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-[10px] font-semibold text-muted-foreground",children:i("registry.monitorRunDetail.agentSummary")}),t.jsx("p",{className:"text-xs bg-muted/50 rounded px-3 py-2",children:r.agent_summary})]})]})]}),e[0]=n,e[1]=r.action_taken,e[2]=r.agent_summary,e[3]=r.connection_ok,e[4]=r.duration_ms,e[5]=r.error_message,e[6]=r.id,e[7]=r.item_title,e[8]=r.status,e[9]=r.tool_results,e[10]=r.tools_listed,e[11]=i,e[12]=c}else c=e[12];return c}function Zi(s){const e=J.c(4),{value:r,onChange:i}=s,n=ce();let l;if(e[0]!==i||e[1]!==n||e[2]!==r){const c=[{value:"all",labelKey:"registry.monitorRunDetail.filterAll"},{value:"passed",labelKey:"registry.monitorRunDetail.filterPassed"},{value:"failed",labelKey:"registry.monitorRunDetail.filterFailed"},{value:"error",labelKey:"registry.monitorRunDetail.filterError"},{value:"needs_auth",labelKey:"registry.monitorRunDetail.filterNeedsAuth"},{value:"skipped",labelKey:"registry.monitorRunDetail.filterSkipped"}];l=t.jsx("div",{className:"flex items-center gap-1 flex-wrap",children:c.map(o=>t.jsx("button",{type:"button",className:ee("text-[11px] px-2 py-0.5 rounded-full border transition-colors",r===o.value?"bg-primary text-primary-foreground border-primary":"bg-muted/30 border-border hover:bg-muted/50"),onClick:()=>i(o.value),children:n(o.labelKey)},o.value))}),e[0]=i,e[1]=n,e[2]=r,e[3]=l}else l=e[3];return l}function Xi(s){const e=J.c(81),{runId:r}=s,i=ce(),[n,l]=T.useState("all"),c=zt(r),o=c.data?.run,a=ut(r,void 0,o?.status);let u,d,m,f,p,g,x,h,j,N,w,_,b;if(e[0]!==a||e[1]!==o||e[2]!==r||e[3]!==c||e[4]!==n||e[5]!==i){p=Symbol.for("react.early_return_sentinel");e:{if(u=a.data?.items??[],d=n==="all"?u:u.filter(y=>y.status===n),!r){let y;e[19]!==i?(y=i("registry.monitorRunDetail.selectRunToInspect"),e[19]=i,e[20]=y):y=e[20];let E;e[21]!==y?(E=t.jsx(ue,{className:"p-6 text-center space-y-2",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:y})}),e[21]=y,e[22]=E):E=e[22],p=E;break e}w="space-y-3";let M;e[23]!==i?(M=i("registry.monitorRunDetail.runDetail"),e[23]=i,e[24]=M):M=e[24];let v;e[25]!==M?(v=t.jsx("h3",{className:"text-sm font-semibold",children:M}),e[25]=M,e[26]=v):v=e[26];let I;e[27]!==r?(I=t.jsx("p",{className:"text-[10px] text-muted-foreground font-mono",children:r}),e[27]=r,e[28]=I):I=e[28];let U;e[29]!==v||e[30]!==I?(U=t.jsxs("div",{children:[v,I]}),e[29]=v,e[30]=I,e[31]=U):U=e[31];let $;e[32]!==o?($=o&&t.jsx(H,{className:ee("capitalize",Rs(o.status)),children:o.status}),e[32]=o,e[33]=$):$=e[33];let D;e[34]!==a||e[35]!==c?(D=()=>{c.refetch(),a.refetch()},e[34]=a,e[35]=c,e[36]=D):D=e[36];let F;e[37]!==i?(F=i("registry.monitorRunDetail.refresh"),e[37]=i,e[38]=F):F=e[38];let q;e[39]!==D||e[40]!==F?(q=t.jsx(Q,{size:"sm",variant:"outline",onClick:D,children:F}),e[39]=D,e[40]=F,e[41]=q):q=e[41];let O;e[42]!==$||e[43]!==q?(O=t.jsxs("div",{className:"flex items-center gap-2",children:[$,q]}),e[42]=$,e[43]=q,e[44]=O):O=e[44],e[45]!==U||e[46]!==O?(_=t.jsx(ue,{className:"p-4",children:t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[U,O]})}),e[45]=U,e[46]=O,e[47]=_):_=e[47],e[48]!==o||e[49]!==i?(b=o&&t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-2 text-xs",children:[t.jsxs(ue,{className:"p-2.5 space-y-0.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:i("registry.monitorRunDetail.total")}),t.jsx("p",{className:"text-lg font-bold",children:o.total_items})]}),t.jsxs(ue,{className:"p-2.5 space-y-0.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:i("registry.monitorRunDetail.tested")}),t.jsx("p",{className:"text-lg font-bold",children:o.tested_items})]}),t.jsxs(ue,{className:"p-2.5 space-y-0.5",children:[t.jsx("p",{className:"text-[10px] text-success",children:i("registry.monitorRunDetail.passed")}),t.jsx("p",{className:"text-lg font-bold text-success",children:o.passed_items})]}),t.jsxs(ue,{className:"p-2.5 space-y-0.5",children:[t.jsx("p",{className:"text-[10px] text-destructive",children:i("registry.monitorRunDetail.failed")}),t.jsx("p",{className:"text-lg font-bold text-destructive",children:o.failed_items})]}),t.jsxs(ue,{className:"p-2.5 space-y-0.5",children:[t.jsx("p",{className:"text-[10px] text-muted-foreground",children:i("registry.monitorRunDetail.skipped")}),t.jsx("p",{className:"text-lg font-bold",children:o.skipped_items})]})]}),e[48]=o,e[49]=i,e[50]=b):b=e[50],e[51]!==o||e[52]!==i?(f=o&&(o.started_at||o.finished_at)&&t.jsxs(ue,{className:"p-3 flex items-center gap-4 text-xs text-muted-foreground flex-wrap",children:[o.started_at&&t.jsxs("span",{children:[i("registry.monitorRunDetail.started"),":"," ",new Date(o.started_at).toLocaleString()]}),o.finished_at&&t.jsxs("span",{children:[i("registry.monitorRunDetail.finished"),":"," ",new Date(o.finished_at).toLocaleString()]}),o.started_at&&o.finished_at&&t.jsxs("span",{className:"font-medium text-foreground",children:[i("registry.monitorRunDetail.durationLabel"),":"," ",((new Date(o.finished_at).getTime()-new Date(o.started_at).getTime())/1e3).toFixed(1),"s"]})]}),e[51]=o,e[52]=i,e[53]=f):f=e[53],j="flex items-center justify-between gap-2",e[54]!==n?(N=t.jsx(Zi,{value:n,onChange:l}),e[54]=n,e[55]=N):N=e[55],m="text-xs text-muted-foreground",g=d.length,x=" ",h=i("registry.monitorRunDetail.result",{count:d.length})}e[0]=a,e[1]=o,e[2]=r,e[3]=c,e[4]=n,e[5]=i,e[6]=u,e[7]=d,e[8]=m,e[9]=f,e[10]=p,e[11]=g,e[12]=x,e[13]=h,e[14]=j,e[15]=N,e[16]=w,e[17]=_,e[18]=b}else u=e[6],d=e[7],m=e[8],f=e[9],p=e[10],g=e[11],x=e[12],h=e[13],j=e[14],N=e[15],w=e[16],_=e[17],b=e[18];if(p!==Symbol.for("react.early_return_sentinel"))return p;let L;e[56]!==m||e[57]!==g||e[58]!==x||e[59]!==h?(L=t.jsxs("span",{className:m,children:[g,x,h]}),e[56]=m,e[57]=g,e[58]=x,e[59]=h,e[60]=L):L=e[60];let k;e[61]!==L||e[62]!==j||e[63]!==N?(k=t.jsxs("div",{className:j,children:[N,L]}),e[61]=L,e[62]=j,e[63]=N,e[64]=k):k=e[64];let P;e[65]!==u||e[66]!==d.length||e[67]!==i?(P=d.length===0&&t.jsx(ue,{className:"p-4 text-sm text-muted-foreground text-center",children:u.length===0?i("registry.monitorRunDetail.noTestResultsYet"):i("registry.monitorRunDetail.noResultsMatchFilter")}),e[65]=u,e[66]=d.length,e[67]=i,e[68]=P):P=e[68];let R;e[69]!==d?(R=d.map(en),e[69]=d,e[70]=R):R=e[70];let S;e[71]!==P||e[72]!==R?(S=t.jsxs("div",{className:"space-y-2",children:[P,R]}),e[71]=P,e[72]=R,e[73]=S):S=e[73];let A;return e[74]!==f||e[75]!==k||e[76]!==S||e[77]!==w||e[78]!==_||e[79]!==b?(A=t.jsxs("div",{className:w,children:[_,b,f,k,S]}),e[74]=f,e[75]=k,e[76]=S,e[77]=w,e[78]=_,e[79]=b,e[80]=A):A=e[80],A}function en(s){return t.jsx(Ji,{result:s},s.id)}function tn(s){return s.tested_items?`${Math.round(s.passed_items/s.tested_items*100)}%`:"-"}function sn(s){const e=J.c(20),{selectedRunId:r,onSelectRun:i}=s,n=Pt();let l;e[0]!==n.data?.items?(l=n.data?.items??[],e[0]=n.data?.items,e[1]=l):l=e[1];const c=l;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-semibold",children:"QA run history"}),t.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Browse previous QA executions and reopen their logs."})]}),e[2]=o):o=e[2];let a;e[3]!==n?(a=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o,t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>n.refetch(),children:"Refresh"})]}),e[3]=n,e[4]=a):a=e[4];let u;e[5]!==c.length?(u=c.length===0&&t.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:"No runs yet. Start QA from the Dashboard tab."}),e[5]=c.length,e[6]=u):u=e[6];let d;if(e[7]!==i||e[8]!==c||e[9]!==r){let p;e[11]!==i||e[12]!==r?(p=g=>{const x=_s(g.started_at,g.finished_at),h=tn(g),j=r===g.id;return t.jsxs("button",{type:"button",onClick:()=>i(g.id),className:ee("w-full text-left rounded-lg border p-3 transition-colors",j?"border-primary bg-primary/5":"border-border hover:bg-muted/30"),children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("div",{className:"min-w-0 flex-1",children:t.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(g.created_at).toLocaleString()})}),t.jsx(H,{className:ee("capitalize",ws(g.status)),children:g.status})]}),t.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs flex-wrap",children:[t.jsxs("span",{className:"text-muted-foreground",children:[g.tested_items,"/",g.total_items," tested"]}),t.jsxs("span",{className:"text-success font-medium",children:[g.passed_items," passed"]}),g.failed_items>0&&t.jsxs("span",{className:"text-destructive font-medium",children:[g.failed_items," failed"]}),g.skipped_items>0&&t.jsxs("span",{className:"text-muted-foreground",children:[g.skipped_items," skipped"]}),t.jsxs("span",{className:"text-muted-foreground",children:["pass rate: ",h]}),x&&t.jsx("span",{className:"text-muted-foreground",children:x})]}),g.config_snapshot&&t.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5",children:[t.jsx(H,{variant:"outline",className:"text-[9px]",children:(g.config_snapshot.monitorMode??g.config_snapshot.testMode??"health_check").replace("_"," ")}),g.config_snapshot.onFailure!=="none"&&t.jsxs(H,{variant:"outline",className:"text-[9px] text-destructive",children:["on fail:"," ",g.config_snapshot.onFailure.replace(/_/g," ")]})]})]},g.id)},e[11]=i,e[12]=r,e[13]=p):p=e[13],d=c.map(p),e[7]=i,e[8]=c,e[9]=r,e[10]=d}else d=e[10];let m;e[14]!==u||e[15]!==d?(m=t.jsxs("div",{className:"space-y-2 max-h-[520px] overflow-auto",children:[u,d]}),e[14]=u,e[15]=d,e[16]=m):m=e[16];let f;return e[17]!==a||e[18]!==m?(f=t.jsx(ue,{className:"p-4",children:t.jsxs("div",{className:"space-y-3",children:[a,m]})}),e[17]=a,e[18]=m,e[19]=f):f=e[19],f}function rn(){const s=J.c(21),e=ce(),[r,i]=T.useState(void 0),[n,l]=T.useState("tests"),o=zt(r).data?.run?.status,a=ut(r,void 0,o);let u;s[0]!==a.data?.items?(u=a.data?.items??[],s[0]=a.data?.items,s[1]=u):u=s[1];let d;s[2]!==u?(d=u.filter(nn),s[2]=u,s[3]=d):d=s[3];const m=d;let f;s[4]!==n||s[5]!==e?(f=t.jsx("nav",{className:"flex items-center gap-2 overflow-x-auto no-scrollbar",children:[{id:"tests",labelKey:"registry.registryMonitorPage.tabTests"},{id:"configuration",labelKey:"registry.registryMonitorPage.tabConfiguration"},{id:"connections",labelKey:"registry.registryMonitorPage.tabConnections"}].map(j=>{const N=n===j.id;return t.jsx("button",{type:"button",className:ee("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center whitespace-nowrap",N?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),onClick:()=>l(j.id),children:t.jsx("span",{children:e(j.labelKey)})},j.id)})}),s[4]=n,s[5]=e,s[6]=f):f=s[6];let p;s[7]!==r||s[8]!==n||s[9]!==m||s[10]!==e?(p=n==="tests"&&t.jsxs("div",{className:"space-y-6",children:[t.jsx(Qi,{activeRunId:r,onRunChange:i}),t.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-12 gap-4 items-start",children:[t.jsxs("div",{className:"xl:col-span-8 space-y-6 min-w-0",children:[r&&t.jsx(Xi,{runId:r}),t.jsx(sn,{selectedRunId:r,onSelectRun:i})]}),t.jsxs("div",{className:"xl:col-span-4 space-y-2 min-w-0",children:[t.jsxs("h3",{className:"text-sm font-semibold",children:[e("registry.registryMonitorPage.brokenMcps")," ",m.length>0&&t.jsx(H,{variant:"destructive",className:"text-[10px] ml-1",children:m.length})]}),t.jsx(Ii,{results:m})]})]})]}),s[7]=r,s[8]=n,s[9]=m,s[10]=e,s[11]=p):p=s[11];let g;s[12]!==n?(g=n==="configuration"&&t.jsx(Ei,{}),s[12]=n,s[13]=g):g=s[13];let x;s[14]!==n?(x=n==="connections"&&t.jsx($i,{}),s[14]=n,s[15]=x):x=s[15];let h;return s[16]!==f||s[17]!==p||s[18]!==g||s[19]!==x?(h=t.jsxs("div",{className:"h-full overflow-auto px-4 md:px-6 py-4 space-y-6",children:[f,p,g,x]}),s[16]=f,s[17]=p,s[18]=g,s[19]=x,s[20]=h):h=s[20],h}function nn(s){return s.status==="failed"||s.status==="error"}function an(s){const e=J.c(9),{activeTab:r,onChange:i,items:n}=s;let l;if(e[0]!==r||e[1]!==n||e[2]!==i){let o;e[4]!==r||e[5]!==i?(o=a=>{const u=r===a.tab,d=a.icon;return t.jsxs("button",{type:"button",className:ee("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center whitespace-nowrap",u?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),onClick:()=>i(a.tab),children:[t.jsx(d,{size:14}),t.jsx("span",{children:a.label}),typeof a.count=="number"&&a.count>0&&t.jsx("span",{className:"min-w-4 h-4 px-1 inline-flex items-center justify-center rounded-full bg-primary/15 text-[10px] font-semibold",children:a.count})]},a.id)},e[4]=r,e[5]=i,e[6]=o):o=e[6],l=n.map(o),e[0]=r,e[1]=n,e[2]=i,e[3]=l}else l=e[3];let c;return e[7]!==l?(c=t.jsx("nav",{className:"flex items-center gap-2 overflow-x-auto no-scrollbar",children:l}),e[7]=l,e[8]=c):c=e[8],c}function ea(s){const e=J.c(59),{onBack:r}=s,i=ce(),[n,l]=T.useState("items"),[c,o]=T.useState(null),{registryName:a,registryIcon:u,acceptPublishRequests:d}=vs(Ve),m=zr(),f=Mr();!d&&n==="requests"&&l("items");const p=m.data?.pending??0;let g;e[0]!==i?(g=i("registry.registryLayout.itemsTab"),e[0]=i,e[1]=g):g=e[1];const x=f.brokenCount>0?f.brokenCount:void 0;let h;e[2]!==g||e[3]!==x?(h={id:"items",label:g,icon:Qs,tab:"items",count:x},e[2]=g,e[3]=x,e[4]=h):h=e[4];let j;e[5]!==d||e[6]!==p||e[7]!==i?(j=d?[{id:"requests",label:i("registry.registryLayout.requestsTab"),icon:We,tab:"requests",count:p}]:[],e[5]=d,e[6]=p,e[7]=i,e[8]=j):j=e[8];let N;e[9]!==i?(N=i("registry.registryLayout.qaTab"),e[9]=i,e[10]=N):N=e[10];let w;e[11]!==N?(w={id:"qa",label:N,icon:ms,tab:"qa"},e[11]=N,e[12]=w):w=e[12];let _;e[13]!==i?(_=i("registry.registryLayout.settingsTab"),e[13]=i,e[14]=_):_=e[14];let b;e[15]!==_?(b={id:"settings",label:_,icon:Xs,tab:"settings"},e[15]=_,e[16]=b):b=e[16];let L;e[17]!==h||e[18]!==j||e[19]!==w||e[20]!==b?(L=[h,...j,w,b],e[17]=h,e[18]=j,e[19]=w,e[20]=b,e[21]=L):L=e[21];const k=L;let P;e[22]!==r?(P=r&&t.jsx("button",{type:"button",className:"shrink-0 p-1 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors cursor-pointer",onClick:r,children:t.jsx(Ys,{size:16})}),e[22]=r,e[23]=P):P=e[23];let R;e[24]===Symbol.for("react.memo_cache_sentinel")?(R=()=>l("settings"),e[24]=R):R=e[24];let S;e[25]!==u||e[26]!==a?(S=t.jsx("div",{className:"size-7 rounded-lg border border-border overflow-hidden bg-muted/20 flex items-center justify-center shrink-0",children:u?t.jsx("img",{src:u,alt:a,className:"h-full w-full object-cover"}):t.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground",children:a.slice(0,1).toUpperCase()})}),e[25]=u,e[26]=a,e[27]=S):S=e[27];let A;e[28]!==a?(A=t.jsx("span",{className:"text-sm font-medium truncate max-w-[220px]",children:a}),e[28]=a,e[29]=A):A=e[29];let M;e[30]!==S||e[31]!==A?(M=t.jsxs("button",{type:"button",className:"min-w-0 flex items-center gap-2 hover:opacity-90 transition-opacity cursor-pointer",onClick:R,children:[S,A]}),e[30]=S,e[31]=A,e[32]=M):M=e[32];let v;e[33]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"h-6 w-px bg-border shrink-0"}),e[33]=v):v=e[33];let I;e[34]!==n||e[35]!==k?(I=t.jsx(an,{activeTab:n,onChange:l,items:k}),e[34]=n,e[35]=k,e[36]=I):I=e[36];let U;e[37]!==P||e[38]!==M||e[39]!==I?(U=t.jsx("header",{className:"shrink-0 w-full border-b border-border h-12 overflow-x-auto flex items-center justify-between gap-3 px-4 min-w-max",children:t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[P,M,v,I]})}),e[37]=P,e[38]=M,e[39]=I,e[40]=U):U=e[40];let $;e[41]!==n?($=n==="items"&&t.jsx(wi,{}),e[41]=n,e[42]=$):$=e[42];let D;e[43]!==d||e[44]!==n?(D=n==="requests"&&d&&t.jsx(Pi,{}),e[43]=d,e[44]=n,e[45]=D):D=e[45];let F;e[46]!==n?(F=n==="qa"&&t.jsx(rn,{}),e[46]=n,e[47]=F):F=e[47];let q;e[48]!==n||e[49]!==c?(q=n==="settings"&&t.jsx(Ri,{revealedKey:c,onRevealedKeyChange:o}),e[48]=n,e[49]=c,e[50]=q):q=e[50];let O;e[51]!==$||e[52]!==D||e[53]!==F||e[54]!==q?(O=t.jsxs("main",{className:"flex-1 min-w-0 overflow-hidden",children:[$,D,F,q]}),e[51]=$,e[52]=D,e[53]=F,e[54]=q,e[55]=O):O=e[55];let y;return e[56]!==U||e[57]!==O?(y=t.jsxs("div",{className:"h-full flex flex-col bg-background overflow-hidden",children:[U,O]}),e[56]=U,e[57]=O,e[58]=y):y=e[58],y}export{ea as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-C5xC0Wus.js","assets/index-DkwplL3u.js","assets/index-CnexIaKK.css","assets/Tool02-DFxQ4jst.js","assets/CheckCircle-MGAobGZ1.js","assets/Settings02-Dscqhciu.js","assets/use-mcp-client-zgLHxopZ.js","assets/auth-8muKPtVE.js","assets/useInfiniteQuery-C0q03X4e.js","assets/use-infinite-scroll-BGAnkyVV.js","assets/studio-tools-CRofv6kx.js","assets/badge-T9uXWFRv.js","assets/input-Bs4Ffj-i.js","assets/dropdown-menu-Dei8Q_a1.js","assets/Check-DjOk0Rkq.js","assets/ChevronRight-BlnNawqe.js","assets/DotsVertical-Bn-DgixF.js","assets/table-DAruPHNm.js","assets/toggle-group-nEH6HUl5.js","assets/use-view-mode-Rnz2KAlb.js","assets/use-mobile-BZt0_HZC.js","assets/FilterLines-DB1N8tt3.js","assets/Globe01-DwSYSUPv.js","assets/SearchMd-DdLJZdaD.js","assets/dialog-r8u0MUEv.js","assets/X-CjNSNcc_.js","assets/AlertCircle-J91Uub-h.js","assets/Upload01-CfQLoJy4.js","assets/alert-dialog-CqJGfT9S.js","assets/card-Bx6QHURH.js","assets/Trash01-O50YwY-1.js","assets/label-PLcboP7g.js","assets/select-DF9H4oT6.js","assets/tooltip-RwubIrk3.js","assets/ChevronDown-BjlTvh0G.js","assets/ChevronUp-CBeaIN1f.js","assets/switch-CGJLGYj-.js","assets/textarea-EgMsnMGx.js","assets/ArrowRight-zq5HcvPy.js","assets/XCircle-7VCYmnt6.js","assets/checkbox-CwZjKbuN.js","assets/Eye-x9PmMwPD.js","assets/LinkExternal01-EQdea3eE.js","assets/use-copy-DL_GuuBr.js","assets/Copy01-Bs6JU_rS.js","assets/Key01-CPUmZmyM.js","assets/Plus-D9_97xSP.js","assets/mcp-oauth-fPq59FMN.js","assets/Play-DhCU58Zq.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as m,d as n,f as c,j as t,k as f,r as l,aY as p}from"./index-DkwplL3u.js";import{R as u}from"./require-capability-C-CrR8hY.js";import"./use-capability-CnZkm8yn.js";import"./access-gate-wAnqH70g.js";import"./capability-load-error-CZBjXSsy.js";const g=l.lazy(()=>p(()=>import("./registry-layout-C5xC0Wus.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./use-infinite-scroll-BGAnkyVV.js";import{e1 as i}from"./index-DkwplL3u.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./use-infinite-scroll-BGAnkyVV.js";import{e1 as u,ac as n}from"./index-DkwplL3u.js";function a(e,r){return u({...e,enabled:!0,suspense:!0,throwOnError:n},s,r)}export{a as u};
|