decocms 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-I5aAKx5s.js → AlertCircle-eeQ8IQAG.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DUqwCMWv.js → ArrowUpRight-Byg2JlTz.js} +1 -1
- package/dist/client/assets/{Check-5-utiman.js → Check-DA5UKh5X.js} +1 -1
- package/dist/client/assets/{CheckCircle-CA1UzIEX.js → CheckCircle-mjn-ZBg3.js} +1 -1
- package/dist/client/assets/{ChevronDown-BRUPOd-D.js → ChevronDown-CYgGBXvc.js} +1 -1
- package/dist/client/assets/ChevronLeft-BE2hdOnx.js +1 -0
- package/dist/client/assets/{ChevronRight-AaMPC6ii.js → ChevronRight-Bp_pdC8P.js} +1 -1
- package/dist/client/assets/{ChevronUp-B3N7TOrA.js → ChevronUp-BwxnNvDR.js} +1 -1
- package/dist/client/assets/{Container-Bjo8FVL5.js → Container-DZK-zSnO.js} +1 -1
- package/dist/client/assets/{DotsVertical-kyMVsMi3.js → DotsVertical-L-zHFr4w.js} +1 -1
- package/dist/client/assets/{Eye-FA0T_9KR.js → Eye-6gmxXOun.js} +1 -1
- package/dist/client/assets/{FilterLines-Dx0-KOH1.js → FilterLines-DaVWBoHw.js} +1 -1
- package/dist/client/assets/{Globe01-BdrXaQ4t.js → Globe01-DLq7QB09.js} +1 -1
- package/dist/client/assets/{HardDrive-uqc3Mfxn.js → HardDrive-UOXMLLuN.js} +1 -1
- package/dist/client/assets/{Key01-4CEC30CH.js → Key01-DQUmqdKK.js} +1 -1
- package/dist/client/assets/{LinkExternal01-sg0X3i7p.js → LinkExternal01-BbkedL4y.js} +1 -1
- package/dist/client/assets/{Monitor01-CTE-M7aU.js → Monitor01-me2M7qcF.js} +1 -1
- package/dist/client/assets/{Palette-DW_AOTeX.js → Palette-cwbQQzjc.js} +1 -1
- package/dist/client/assets/{Play-P4fR-0E_.js → Play-D39faotb.js} +1 -1
- package/dist/client/assets/{Plus-WVvC1Th4.js → Plus-CxUOnaMo.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Dg7_NhVx.js → RefreshCcw01-drWDN7HN.js} +1 -1
- package/dist/client/assets/{SearchMd-cBVn0Mcd.js → SearchMd-Cd3-NscL.js} +1 -1
- package/dist/client/assets/{Settings02-J55NFzUl.js → Settings02-DWxCysLt.js} +1 -1
- package/dist/client/assets/{Shield01-CITJSPye.js → Shield01-CgUSh4ss.js} +1 -1
- package/dist/client/assets/{Star01-DQCFITlh.js → Star01-BCTguvLh.js} +1 -1
- package/dist/client/assets/{Stars01-BQqwEiIH.js → Stars01-CScMgUNS.js} +1 -1
- package/dist/client/assets/{Stars02-CnxGzx_a.js → Stars02-DhCmA77R.js} +1 -1
- package/dist/client/assets/{Sun-CvvLh7O4.js → Sun-Cl4W5MYc.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-D6GIRPJ1.js → SwitchHorizontal01-M-IO9U7X.js} +1 -1
- package/dist/client/assets/{Tool01-DBZmckgJ.js → Tool01-BGfKCaOe.js} +1 -1
- package/dist/client/assets/{Trash01-BMiuF02D.js → Trash01-BOqsHAki.js} +1 -1
- package/dist/client/assets/{Upload01-DhlN2oeP.js → Upload01-cIFihtD7.js} +1 -1
- package/dist/client/assets/{User01-D0BthoTv.js → User01-CRsYdqKf.js} +1 -1
- package/dist/client/assets/{Users01-B6kJjdmQ.js → Users01-CwvwFmnT.js} +1 -1
- package/dist/client/assets/{Users03-a4EwkzcR.js → Users03-Cy6p41F6.js} +1 -1
- package/dist/client/assets/{X-BwvdKywg.js → X-D4woLNFq.js} +1 -1
- package/dist/client/assets/{XCircle-BVR438yI.js → XCircle-CdiDJXb-.js} +1 -1
- package/dist/client/assets/{XClose-CeXjq2Ks.js → XClose-REUNo7hV.js} +1 -1
- package/dist/client/assets/{Zap-Cbw9kHWr.js → Zap-mREy1Qov.js} +1 -1
- package/dist/client/assets/ZapSquare-DZf6Sug7.js +1 -0
- package/dist/client/assets/ZoomOut-aDyKTD6y.js +1 -0
- package/dist/client/assets/{access-gate-CFCd65pW.js → access-gate-CzQMusXf.js} +1 -1
- package/dist/client/assets/accordion-CxUU-7zP.js +1 -0
- package/dist/client/assets/add-section-modal-Le33kmS8.js +1 -0
- package/dist/client/assets/{agent-capabilities-P2Ed3uET.js → agent-capabilities-C24cyovb.js} +1 -1
- package/dist/client/assets/agent-icon-DQY5C0N2.js +1 -0
- package/dist/client/assets/{agent-icons-VZFS25ox.js → agent-icons-CiX6fHGt.js} +1 -1
- package/dist/client/assets/agents-list-DmjHmKun.js +1 -0
- package/dist/client/assets/{ai-providers-C1nH-38Z.js → ai-providers-mUhUziNN.js} +1 -1
- package/dist/client/assets/{alert-CQF_YV7o.js → alert-BbsUklRQ.js} +1 -1
- package/dist/client/assets/{alert-dialog-Bvyir_5o.js → alert-dialog-BPHTzN62.js} +1 -1
- package/dist/client/assets/app-editor-Cv2zA-6I.js +1 -0
- package/dist/client/assets/{auth-catchall-BnV7GUx1.js → auth-catchall-lSq11uBl.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DzSTdIYV.js → auth-split-layout-BCUlxOAp.js} +1 -1
- package/dist/client/assets/{automation-list-row-Bo6miFHP.js → automation-list-row-zUvBCUZa.js} +1 -1
- package/dist/client/assets/{automation-runs-CDd6q4GC.js → automation-runs-v18Lkih8.js} +1 -1
- package/dist/client/assets/automations-Qm0D-6AG.js +1 -0
- package/dist/client/assets/{avatar-DRLQAp0U.js → avatar-C8mqvhp_.js} +1 -1
- package/dist/client/assets/{badge-DKUnZ67J.js → badge-aL_u7ZDP.js} +1 -1
- package/dist/client/assets/{brand-context-Co32YwBP.js → brand-context-CGxwlq0O.js} +1 -1
- package/dist/client/assets/{buckets-DhUJ8i8x.js → buckets-DYPtvGJ1.js} +1 -1
- package/dist/client/assets/calendar-DddAMJZc.js +1 -0
- package/dist/client/assets/{capability-load-error-mrR6n6ef.js → capability-load-error-So5ymzsn.js} +1 -1
- package/dist/client/assets/{card-mrz_YqFP.js → card-BIxqjUba.js} +1 -1
- package/dist/client/assets/{chat-context-xK_w16Am.js → chat-context-B5R7Bsxn.js} +1 -1
- package/dist/client/assets/{checkbox-D4JiAIiY.js → checkbox-DXKahMoV.js} +1 -1
- package/dist/client/assets/{cli-auth-success-D9eaRLqQ.js → cli-auth-success-C2saOMke.js} +1 -1
- package/dist/client/assets/collection-detail-D8ggdXLI.js +1 -0
- package/dist/client/assets/{collection-display-button-9zcw0Pse.js → collection-display-button-DvEoSW0w.js} +1 -1
- package/dist/client/assets/{collection-search-CBN_q_XM.js → collection-search-ChQblPf0.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CN3rSGu3.js → collection-table-wrapper-CHFC6KhT.js} +1 -1
- package/dist/client/assets/{collection-tabs-BoWMCCpv.js → collection-tabs-GHQguzy_.js} +1 -1
- package/dist/client/assets/{collections-D3-t_Oif.js → collections-B2PRHYqJ.js} +1 -1
- package/dist/client/assets/{command-DT1FhdNv.js → command-A1tt2dvQ.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BDYQrQzN.js → connect-desktop-dialog-CUc_k3J7.js} +1 -1
- package/dist/client/assets/{connection-card-CWg85UPa.js → connection-card-ChcbOLys.js} +1 -1
- package/dist/client/assets/connection-detail-U_5KXkyF.js +1 -0
- package/dist/client/assets/{connection-form-helpers-I069qG8R.js → connection-form-helpers--wI2Mdjh.js} +1 -1
- package/dist/client/assets/connections-07oXzLs7.js +1 -0
- package/dist/client/assets/{constants-bvvELg6A.js → constants-BrUmWQ5v.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DZUcRlvx.js → decopilot-sse-pool-bx3Tzt-N.js} +1 -1
- package/dist/client/assets/dialog-DJ-H5eyi.js +1 -0
- package/dist/client/assets/{domain-settings-D_JQJ-_q.js → domain-settings-Bj8qY-gX.js} +1 -1
- package/dist/client/assets/{drawer-D-eRrcRE.js → drawer-BDlt-eEN.js} +1 -1
- package/dist/client/assets/{dropdown-menu-39FgxtLo.js → dropdown-menu-D2H5uhoI.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-d4yFw-ZE.js → dynamic-plugin-layout-Cf_TaIUq.js} +1 -1
- package/dist/client/assets/{empty-state-Cs0Tx7DE.js → empty-state-DxUsOjfR.js} +1 -1
- package/dist/client/assets/{empty-state-Cv3pDKB-.js → empty-state-PvmElhTC.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DRKXxZ8i.js → extract-connection-data-BVH-NR56.js} +1 -1
- package/dist/client/assets/{features-BrIK7ax2.js → features-CNIUazHE.js} +1 -1
- package/dist/client/assets/file-explorer-B_0gIGYU.js +2 -0
- package/dist/client/assets/{file-type-icon-J1MyTx05.js → file-type-icon-5-Jlm8ee.js} +1 -1
- package/dist/client/assets/{files-Gd1f-YUl.js → files-Dmr-ntT-.js} +1 -1
- package/dist/client/assets/{form-BFCHHJw7.js → form-CO8TZWfS.js} +1 -1
- package/dist/client/assets/{general-Hc1ImFmK.js → general-DH2-DqRy.js} +1 -1
- package/dist/client/assets/{generate-id-BoTFc93G.js → generate-id-5eMpRIJR.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CJ1plqRU.js → github-repo-picker-D1NpZ6ct.js} +1 -1
- package/dist/client/assets/header-tab-button-B5RTsjq3.js +3 -0
- package/dist/client/assets/{hover-card-CW2-sshf.js → hover-card-B0ZnutE8.js} +1 -1
- package/dist/client/assets/{image-field-GBQBz7jx.js → image-field-DH6NL7As.js} +1 -1
- package/dist/client/assets/{index-Dlj9BqPT.js → index--2_kkJgD.js} +1 -1
- package/dist/client/assets/{index-CbPPWvrX.js → index--ipoW5Od.js} +2 -2
- package/dist/client/assets/index-BK9ucwVY.js +11 -0
- package/dist/client/assets/index-BQA4WrEz.js +1 -0
- package/dist/client/assets/{index-XCMOYuFO.js → index-BZB5wdSX.js} +1 -1
- package/dist/client/assets/{index-BpHDMydO.js → index-C8xgZP7Q.js} +1 -1
- package/dist/client/assets/{index-NkmnXqLU.js → index-CTonnX5C.js} +3 -3
- package/dist/client/assets/{index-D-h2wBuz.js → index-CX5zsV6g.js} +1 -1
- package/dist/client/assets/{index-Dh31lfjw.js → index-CohPXzOU.js} +1 -1
- package/dist/client/assets/{index-DG1wYdtC.js → index-DY-bhBl7.js} +24 -26
- package/dist/client/assets/index-Dd3eFW2j.js +1 -0
- package/dist/client/assets/{index-C8tR8eRp.js → index-Dh_ZP8gM.js} +1 -1
- package/dist/client/assets/{index-0jxZXjT_.js → index-Dj0KvohQ.js} +4 -4
- package/dist/client/assets/index-DzP6PZZ7.css +1 -0
- package/dist/client/assets/index-d4-4-LoF.js +3 -0
- package/dist/client/assets/{index-redirect-CtRf-K0w.js → index-redirect-DcDs3uRh.js} +1 -1
- package/dist/client/assets/{index-B0yf3v8e.js → index-zuFZRdMw.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BHyRmyuw.js → infiniteQueryObserver-By84F0-S.js} +1 -1
- package/dist/client/assets/{input-BJ1rHrAh.js → input-D7b0qTbD.js} +1 -1
- package/dist/client/assets/{integration-icon-B34NO5DZ.js → integration-icon-CfgTtI5o.js} +1 -1
- package/dist/client/assets/{label-Ces90Ob6.js → label-CYTFcC5V.js} +1 -1
- package/dist/client/assets/{layout-BObWYQOR.js → layout-CPR4jtia.js} +1 -1
- package/dist/client/assets/{login-CmFqIafL.js → login-C3iJJq1l.js} +1 -1
- package/dist/client/assets/{members-Ldm47cLr.js → members-C4ocetfC.js} +1 -1
- package/dist/client/assets/monaco-editor-KhKv-sJZ.js +9 -0
- package/dist/client/assets/{monitoring-stats-row-Bi90V9hM.js → monitoring-stats-row-CKv35kXI.js} +1 -1
- package/dist/client/assets/{oauth-callback-BajSrp4p.js → oauth-callback-DYj7ZiBe.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-M6LqzdG-.js → oauth-callback-ai-provider-BGdEvz_Y.js} +1 -1
- package/dist/client/assets/{onboarding-BOdaHuUD.js → onboarding-D6Xk0wL6.js} +1 -1
- package/dist/client/assets/{org-install-BXFui3MR.js → org-install-CEC4BLF-.js} +1 -1
- package/dist/client/assets/{org-layout-DLehdBZw.js → org-layout-BE5MLVkw.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-Dc3cW9pW.js → org-plugin-layout-L5iGkhHt.js} +1 -1
- package/dist/client/assets/{page-seo-form-Ba6J76YC.js → page-seo-form-jxY-H_g3.js} +1 -1
- package/dist/client/assets/page-seo-sheet-DsZP33VR.js +1 -0
- package/dist/client/assets/{pair-8URjhbdi.js → pair-BBpXnc-h.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-nbJy5gbu.js → plugin-empty-state-DWClfnpF.js} +1 -1
- package/dist/client/assets/{plugin-header-BOwZcASL.js → plugin-header-Z6RQivcP.js} +1 -1
- package/dist/client/assets/{plugin-layout-DnOSNazi.js → plugin-layout-vnnJlQxa.js} +1 -1
- package/dist/client/assets/{popover-CvKJiX83.js → popover-lyccXPhR.js} +1 -1
- package/dist/client/assets/{post-editor-DYIIhxtg.js → post-editor-DxyYIPy4.js} +2 -2
- package/dist/client/assets/{primitives-CCwkgknT.js → primitives-BJLFwP4M.js} +1 -1
- package/dist/client/assets/{profile-nmeOosOi.js → profile-D0mq2N64.js} +1 -1
- package/dist/client/assets/project-app-view-Cf5PFYO6.js +1 -0
- package/dist/client/assets/record-editor-CNQSVEjq.js +1 -0
- package/dist/client/assets/registry-Ee2akcS9.js +2 -0
- package/dist/client/assets/{registry-layout-uxAOVQng.js → registry-layout-DJdGkFsS.js} +1 -1
- package/dist/client/assets/{require-capability-CA7mIlLg.js → require-capability-l0UYKnJd.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Bsfg7CLj.js → required-auth-layout-BGUftSDY.js} +1 -1
- package/dist/client/assets/{reset-password-Ul1CROcF.js → reset-password-FUpnkHMr.js} +1 -1
- package/dist/client/assets/resizable-DwJvPNj4.js +1 -0
- package/dist/client/assets/roles-BuPsd2Xq.js +1 -0
- package/dist/client/assets/{save-status-Cfu7sTcH.js → save-status-QxvffYyD.js} +1 -1
- package/dist/client/assets/schema-form-BdWc4cV5.js +1 -0
- package/dist/client/assets/{scroll-area-43OyCToQ.js → scroll-area-B_h8lIJ9.js} +2 -2
- package/dist/client/assets/{search-input-CIl-bXGa.js → search-input-BKOtoJjA.js} +1 -1
- package/dist/client/assets/{secrets-Debl4Ngu.js → secrets-Dtlt9ZmS.js} +1 -1
- package/dist/client/assets/{sections-editor-CcwffiQl.js → sections-editor-Dqu3z5Ot.js} +2 -2
- package/dist/client/assets/{select-CvDnclqc.js → select-Beg_2fXg.js} +1 -1
- package/dist/client/assets/{select-model-cqeqhVQK.js → select-model-BMbD_9Ia.js} +1 -1
- package/dist/client/assets/seo-editor-DPjxt-kB.js +1 -0
- package/dist/client/assets/settings-layout-BmGeDfut.js +1 -0
- package/dist/client/assets/{settings-section-z_q4ruf_.js → settings-section-BTmXhjqn.js} +1 -1
- package/dist/client/assets/{sheet-ChXXkoux.js → sheet-D-WSQKVa.js} +1 -1
- package/dist/client/assets/{shell-controls-BHiQ5Vjs.js → shell-controls-Cjwnc3rm.js} +1 -1
- package/dist/client/assets/{shell-layout-0JObD2s1.js → shell-layout-B5BcGCUv.js} +1 -1
- package/dist/client/assets/{shell-route-loading-DBlx6e0Z.js → shell-route-loading-CwaZaGaY.js} +1 -1
- package/dist/client/assets/{sidebar-DxS-nB9C.js → sidebar-B3SUDWcE.js} +1 -1
- package/dist/client/assets/{skeleton-BnhJTtVi.js → skeleton-CFHIS59D.js} +1 -1
- package/dist/client/assets/{sortable.esm-DjicLksl.js → sortable.esm-qUS1Ad1E.js} +1 -1
- package/dist/client/assets/{spinner-Cecl_L8X.js → spinner-w0j4pkm6.js} +1 -1
- package/dist/client/assets/{sso-CCvO1qtH.js → sso-BzO1v4AH.js} +1 -1
- package/dist/client/assets/{store-Bms8WhNQ.js → store-DDnRAbDj.js} +1 -1
- package/dist/client/assets/store-registry-DdmX5Xjk.js +2 -0
- package/dist/client/assets/{switch-BOQ2PJeb.js → switch-DigajlLH.js} +1 -1
- package/dist/client/assets/{tab-id-B2HRXc_q.js → tab-id-Dqk0Iqqp.js} +1 -1
- package/dist/client/assets/{table-Cz11eDpz.js → table-CG9TNjwG.js} +1 -1
- package/dist/client/assets/{tabs-CeDin4k7.js → tabs-hJQcRyAi.js} +1 -1
- package/dist/client/assets/{task-status-BLPz-4sC.js → task-status-BPOI6tWP.js} +1 -1
- package/dist/client/assets/{textarea-SDIeylNJ.js → textarea-F1h3gKD-.js} +1 -1
- package/dist/client/assets/{toggle-group-CefnzENU.js → toggle-group-DBo9mYwI.js} +1 -1
- package/dist/client/assets/toolbar-Chbc6IV1.js +1 -0
- package/dist/client/assets/{tools-list-CqDkzdE6.js → tools-list-CabDoS9o.js} +1 -1
- package/dist/client/assets/{tooltip-CeP603hH.js → tooltip-DR0ou5_h.js} +1 -1
- package/dist/client/assets/{types-B_duTJl-.js → types-B8jc6i3t.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BVFxEa9L.js → use-ai-providers-Crp3aL-d.js} +1 -1
- package/dist/client/assets/{use-automations-BefuyBQd.js → use-automations-CvPaoJpy.js} +1 -1
- package/dist/client/assets/{use-capability-BrFRIPu5.js → use-capability-C_bdrk_p.js} +1 -1
- package/dist/client/assets/{use-collections-DPnWGTP7.js → use-collections-CIhR2Sfk.js} +1 -1
- package/dist/client/assets/{use-connection-CzM_WXMN.js → use-connection-B9u8CAro.js} +1 -1
- package/dist/client/assets/{use-copy-wKwDCbum.js → use-copy-BQU7kOTS.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CwM2ND5a.js → use-create-virtual-mcp-B-ZztG0t.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D4-Vb6JZ.js → use-debounced-autosave-DSkO6_zp.js} +1 -1
- package/dist/client/assets/{use-delete-connection-0bGCksoc.js → use-delete-connection--aJNKbDc.js} +1 -1
- package/dist/client/assets/{use-file-configs-DXzZdUlN.js → use-file-configs-DpObIFgQ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-COXLEab2.js → use-infinite-scroll-cj_fIBkS.js} +1 -1
- package/dist/client/assets/{use-list-state-1DLqfcvM.js → use-list-state-CJLRzORi.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-EWCIJOcj.js → use-mcp-prompts-CbFGc10Q.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-YMWJX9tN.js → use-mcp-tools-5agNAepF.js} +1 -1
- package/dist/client/assets/{use-members-CMjFtY8-.js → use-members-BxYNXFJP.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DbTKvOZS.js → use-navigate-to-agent-BF3wV5AT.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-PFGUMv0N.js → use-org-auth-client-CXXJeS8t.js} +1 -1
- package/dist/client/assets/{use-org-sso-KYe6rDaT.js → use-org-sso-78wZG6-f.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CzafvuiG.js → use-organization-roles-8xWgqzTV.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CQEWT13Z.js → use-organization-settings-CTFAMDf3.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bxq_77g6.js → use-registry-connections-DLQyW9bq.js} +1 -1
- package/dist/client/assets/{use-secrets-CgnCxvTW.js → use-secrets-Cmx_245Q.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CWk7re-G.js → use-status-sounds-B-QYeuIF.js} +1 -1
- package/dist/client/assets/{use-view-mode-C8ehq-d0.js → use-view-mode-DmcUzuJT.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DflWVTuF.js → use-virtual-mcp-CLwhjRff.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DiBUJYe_.js +1 -0
- package/dist/client/assets/{useRouterState-Br8Ksrwr.js → useRouterState-Dsvmx6NW.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Bu_otJLP.js +1 -0
- package/dist/client/assets/{user-Dz7iwzYF.js → user-C_mdefEx.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DI_qGqci.js → view-mode-toggle-CBJdrX89.js} +1 -1
- package/dist/client/assets/workflow-Bs2NMxKI.js +1 -0
- package/dist/client/assets/workflow-detail-BovMNGKv.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +433 -433
- package/dist/server/server.js +290 -290
- package/package.json +1 -1
- package/dist/client/assets/ZapSquare-B2q8WEX1.js +0 -1
- package/dist/client/assets/ZoomOut-DnoKIS59.js +0 -1
- package/dist/client/assets/accordion-BVwnr-Ph.js +0 -1
- package/dist/client/assets/add-section-modal-DhovoW-j.js +0 -1
- package/dist/client/assets/agent-icon-BJOP--6N.js +0 -1
- package/dist/client/assets/agents-list-BXn-hA0n.js +0 -1
- package/dist/client/assets/app-editor-BNURPsQU.js +0 -1
- package/dist/client/assets/automations-GZ_mGUjn.js +0 -1
- package/dist/client/assets/calendar-C2n-TFID.js +0 -1
- package/dist/client/assets/collection-detail-CY7EGtz7.js +0 -1
- package/dist/client/assets/connection-detail-P3V5HPH7.js +0 -1
- package/dist/client/assets/connections-OTmgMsxB.js +0 -1
- package/dist/client/assets/dialog-Br598C89.js +0 -1
- package/dist/client/assets/file-explorer-D4_0I4su.js +0 -2
- package/dist/client/assets/file-preview-B4Zho1Y6.js +0 -1
- package/dist/client/assets/index-Dah3mtyQ.js +0 -1
- package/dist/client/assets/index-RWntp561.js +0 -1
- package/dist/client/assets/index-VJJ8U_LK.js +0 -2
- package/dist/client/assets/index-uXid0yMu.css +0 -1
- package/dist/client/assets/monaco-editor-D4JSTdws.js +0 -19
- package/dist/client/assets/page-seo-sheet-GBqlqXbH.js +0 -1
- package/dist/client/assets/project-app-view-0IenPExc.js +0 -1
- package/dist/client/assets/record-editor-B_xzO2rA.js +0 -1
- package/dist/client/assets/registry-GiOtrI6p.js +0 -2
- package/dist/client/assets/roles-FrRjzVah.js +0 -1
- package/dist/client/assets/schema-form-yjRGF1Qo.js +0 -1
- package/dist/client/assets/seo-editor-BPl-B1OI.js +0 -1
- package/dist/client/assets/settings-layout-D1eS1NN7.js +0 -1
- package/dist/client/assets/store-registry-Cs3BGFgx.js +0 -2
- package/dist/client/assets/toolbar-B8vAkOP3.js +0 -1
- package/dist/client/assets/useInfiniteQuery-2A4J-MZz.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-vt45tURh.js +0 -1
- package/dist/client/assets/workflow-CF5qm1Zf.js +0 -1
- package/dist/client/assets/workflow-detail-CDrDJwxR.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as se,j as s,B as Z,q as me,r as Y,t as v,o as de}from"./index-0jxZXjT_.js";import{c as k,b as ne,a as ee,D as te}from"./dropdown-menu-39FgxtLo.js";import{s as pe}from"./Star01-DQCFITlh.js";import{a as fe}from"./Users03-a4EwkzcR.js";import{S as ge,G as ue,u as he,H as ie,W as oe,a as xe,I as je}from"./github-repo-picker-CJ1plqRU.js";import{a as _e,b as Ce,c as be}from"./use-virtual-mcp-DflWVTuF.js";import{P as q}from"./index-B0yf3v8e.js";import{i as ye}from"./DotsVertical-kyMVsMi3.js";import{a as Ne}from"./Settings02-J55NFzUl.js";import{s as Se}from"./Trash01-BMiuF02D.js";import{A as De,ap as ve}from"./agent-icon-BJOP--6N.js";import{k as Ae}from"./use-navigate-to-agent-DbTKvOZS.js";import{C as ke}from"./card-mrz_YqFP.js";import{f as re}from"./formatDistanceToNow-Cb2QZZJn.js";import{u as we}from"./use-capability-BrFRIPu5.js";import{E as Te}from"./empty-state-Cv3pDKB-.js";import{u as ze}from"./use-create-virtual-mcp-CwM2ND5a.js";import{c as Ie,b as Pe,d as He,f as Ee,e as Me,g as Oe,a as Be,A as Ge}from"./alert-dialog-Bvyir_5o.js";import{S as $e}from"./search-input-CIl-bXGa.js";import{s as le}from"./Plus-WVvC1Th4.js";import"./Check-5-utiman.js";import"./ChevronRight-AaMPC6ii.js";import"./use-connection-CzM_WXMN.js";import"./use-collections-DPnWGTP7.js";import"./constants-bvvELg6A.js";import"./dialog-Br598C89.js";import"./X-BwvdKywg.js";import"./RefreshCcw01-Dg7_NhVx.js";import"./collection-search-CBN_q_XM.js";import"./SearchMd-cBVn0Mcd.js";import"./checkbox-D4JiAIiY.js";import"./use-mcp-tools-YMWJX9tN.js";import"./extract-connection-data-DRKXxZ8i.js";import"./generate-id-BoTFc93G.js";import"./collections-D3-t_Oif.js";import"./sidebar-DxS-nB9C.js";import"./sheet-ChXXkoux.js";import"./tooltip-CeP603hH.js";import"./AlertCircle-I5aAKx5s.js";import"./Tool01-DBZmckgJ.js";import"./SwitchHorizontal01-D6GIRPJ1.js";import"./XCircle-BVR438yI.js";import"./ArrowUpRight-DUqwCMWv.js";import"./ZapSquare-B2q8WEX1.js";import"./CheckCircle-CA1UzIEX.js";import"./ChevronDown-BRUPOd-D.js";import"./ChevronUp-B3N7TOrA.js";import"./Container-Bjo8FVL5.js";import"./Eye-FA0T_9KR.js";import"./Globe01-BdrXaQ4t.js";import"./FilterLines-Dx0-KOH1.js";import"./ZoomOut-DnoKIS59.js";import"./Palette-DW_AOTeX.js";import"./HardDrive-uqc3Mfxn.js";import"./Stars02-CnxGzx_a.js";import"./Key01-4CEC30CH.js";import"./LinkExternal01-sg0X3i7p.js";import"./Monitor01-CTE-M7aU.js";import"./Sun-CvvLh7O4.js";import"./Play-P4fR-0E_.js";import"./Shield01-CITJSPye.js";import"./Stars01-BQqwEiIH.js";import"./Upload01-DhlN2oeP.js";import"./User01-D0BthoTv.js";import"./Users01-B6kJjdmQ.js";import"./XClose-CeXjq2Ks.js";import"./Zap-Cbw9kHWr.js";import"./differenceInSeconds-NQ4PDo0z.js";function ae(t){const e=se.c(29),{onCreateFromScratch:i,onCreateWebsite:D,onCreateHydrogenStore:l,onImportGitHub:S,onImportDeco:f,isCreating:o,align:y,side:g,showBetaBadge:u}=t,h=y===void 0?"end":y;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(fe,{size:14}),e[0]=x):x=e[0];let a;e[1]!==o||e[2]!==i?(a=s.jsxs(k,{disabled:o,onClick:i,children:[x,"Create from scratch"]}),e[1]=o,e[2]=i,e[3]=a):a=e[3];let j;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(pe,{size:14}),e[4]=j):j=e[4];let n;e[5]!==o||e[6]!==D?(n=s.jsxs(k,{disabled:o,onClick:D,children:[j,"Start Website"]}),e[5]=o,e[6]=D,e[7]=n):n=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("img",{src:ge,alt:"",className:"size-3.5 object-contain"}),e[8]=_):_=e[8];let c;e[9]!==o||e[10]!==l?(c=s.jsxs(k,{disabled:o,onClick:l,children:[_,"Create Shopify Headless Store"]}),e[9]=o,e[10]=l,e[11]=c):c=e[11];let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ue,{className:"size-3.5"}),e[12]=N):N=e[12];let r;e[13]!==u?(r=u&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[13]=u,e[14]=r):r=e[14];let C;e[15]!==S||e[16]!==r?(C=s.jsxs(k,{onClick:S,children:[N,"Import from GitHub",r]}),e[15]=S,e[16]=r,e[17]=C):C=e[17];let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[18]=p):p=e[18];let m;e[19]!==f?(m=s.jsxs(k,{onClick:f,children:[p,"Import from deco.cx"]}),e[19]=f,e[20]=m):m=e[20];let b;return e[21]!==h||e[22]!==g||e[23]!==C||e[24]!==m||e[25]!==a||e[26]!==n||e[27]!==c?(b=s.jsxs(ne,{side:g,align:h,className:"w-48",children:[a,n,c,C,m]}),e[21]=h,e[22]=g,e[23]=C,e[24]=m,e[25]=a,e[26]=n,e[27]=c,e[28]=b):b=e[28],b}function Fe(t){const e=se.c(45),{project:i,lastUsedAt:D,onDeleteClick:l}=t,S=Ae();let f;e[0]!==S||e[1]!==i.id?(f=()=>S(i.id),e[0]=S,e[1]=i.id,e[2]=f):f=e[2];let o;e[3]!==i.title||e[4]!==f?(o=s.jsx("button",{type:"button",onClick:f,className:"absolute inset-0 z-0","aria-label":i.title}),e[3]=i.title,e[4]=f,e[5]=o):o=e[5];let y;e[6]!==i.icon||e[7]!==i.title?(y=s.jsx(De,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[6]=i.icon,e[7]=i.title,e[8]=y):y=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ee,{asChild:!0,children:s.jsx(Z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(ye,{size:20})})}),e[9]=g):g=e[9];let u;e[10]!==S||e[11]!==i.id?(u=()=>S(i.id,{search:{main:"settings"}}),e[10]=S,e[11]=i.id,e[12]=u):u=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ne,{size:16}),e[13]=h):h=e[13];let x;e[14]!==u?(x=s.jsxs(k,{onClick:u,children:[h,"Settings"]}),e[14]=u,e[15]=x):x=e[15];let a;e[16]!==l?(a=l&&s.jsxs(k,{variant:"destructive",onClick:w=>{w.stopPropagation(),l(w)},children:[s.jsx(Se,{size:16}),"Delete"]}),e[16]=l,e[17]=a):a=e[17];let j;e[18]!==x||e[19]!==a?(j=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(te,{children:[g,s.jsxs(ne,{align:"end",children:[x,a]})]})}),e[18]=x,e[19]=a,e[20]=j):j=e[20];let n;e[21]!==y||e[22]!==j?(n=s.jsxs("div",{className:"flex items-start justify-between",children:[y,j]}),e[21]=y,e[22]=j,e[23]=n):n=e[23];let _;e[24]!==i.title?(_=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[24]=i.title,e[25]=_):_=e[25];const c=i.description||"No description";let N;e[26]!==c?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:c}),e[26]=c,e[27]=N):N=e[27];let r;e[28]!==_||e[29]!==N?(r=s.jsxs("div",{className:"flex flex-col gap-1",children:[_,N]}),e[28]=_,e[29]=N,e[30]=r):r=e[30];let C;e[31]!==n||e[32]!==r?(C=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[n,r]}),e[31]=n,e[32]=r,e[33]=C):C=e[33];let p;e[34]!==D||e[35]!==i.updated_at?(p=D?`Last used ${re(new Date(D),{addSuffix:!0})}`:`Updated ${re(new Date(i.updated_at),{addSuffix:!0})}`,e[34]=D,e[35]=i.updated_at,e[36]=p):p=e[36];let m;e[37]!==p?(m=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:p})})}),e[37]=p,e[38]=m):m=e[38];let b;e[39]!==C||e[40]!==m?(b=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[C,m]}),e[39]=C,e[40]=m,e[41]=b):b=e[41];let A;return e[42]!==b||e[43]!==o?(A=s.jsxs(ke,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[o,b]}),e[42]=b,e[43]=o,e[44]=A):A=e[44],A}function is(){const t=se.c(48),{org:e}=me(),i=_e(),D=Ce(),[l,S]=Y.useState("");let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},t[0]=f):f=t[0];const{createVirtualMCP:o,isCreating:y}=ze(f),{createFromTemplate:g,isCreating:u}=he(),[h,x]=Y.useState(null),[a,j]=Y.useState(!1),[n,_]=Y.useState(!1),{granted:c}=we("agents:manage"),N=l.toLowerCase(),r=i.filter(d=>d.id!==e.id&&(d.title.toLowerCase().includes(N)||d.description?.toLowerCase().includes(N))),{data:C}=be(r.map(Le));let p;t[1]!==D||t[2]!==h?(p=async()=>{if(!h)return;const{id:d,title:ce}=h;x(null);try{await D.delete.mutateAsync(d),v("agent_deleted",{agent_id:d,source:"agents_list"}),de.success(`Deleted "${ce}"`)}catch{}},t[1]=D,t[2]=h,t[3]=p):p=t[3];const m=p,b=q,A=q,w=q;let F;t[4]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(q.Title,{children:"Agents"}),t[4]=F):F=t[4];let L;t[5]===Symbol.for("react.memo_cache_sentinel")?(L=d=>{d.key==="Escape"&&(S(""),d.target.blur())},t[5]=L):L=t[5];let T;t[6]!==l?(T=s.jsx($e,{value:l,onChange:S,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:L}),t[6]=l,t[7]=T):T=t[7];let z;t[8]!==c||t[9]!==g||t[10]!==o||t[11]!==y||t[12]!==u?(z=c&&s.jsxs(te,{children:[s.jsx(ee,{asChild:!0,children:s.jsxs(Z,{size:"sm",children:[s.jsx(le,{size:14}),"Create Agent"]})}),s.jsx(ae,{onCreateFromScratch:()=>{v("agent_create_clicked",{source:"agents_list",method:"scratch"}),o()},onCreateWebsite:()=>{v("agent_create_clicked",{source:"agents_list",method:"website"}),g(oe)},onCreateHydrogenStore:()=>{v("agent_create_clicked",{source:"agents_list",method:"hydrogen"}),g(ie)},onImportGitHub:()=>{v("agent_create_clicked",{source:"agents_list",method:"github"}),_(!0)},onImportDeco:()=>{v("agent_create_clicked",{source:"agents_list",method:"deco"}),j(!0)},isCreating:y||u,align:"end"})]}),t[8]=c,t[9]=g,t[10]=o,t[11]=y,t[12]=u,t[13]=z):z=t[13];let I;t[14]!==T||t[15]!==z?(I=s.jsxs("div",{className:"flex flex-col gap-6",children:[F,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[T,z]})]}),t[14]=T,t[15]=z,t[16]=I):I=t[16];const K=r.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Te,{image:s.jsx(ve,{size:48,className:"text-muted-foreground"}),title:l?"No agents found":"No agents yet",description:l?`No agents match "${l}"`:c?"Create an agent to get started.":"Ask an organization admin to create one.",actions:!l&&c&&s.jsxs(te,{children:[s.jsx(ee,{asChild:!0,children:s.jsxs(Z,{size:"sm",children:[s.jsx(le,{size:14}),"Create Agent"]})}),s.jsx(ae,{onCreateFromScratch:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),o()},onCreateWebsite:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"website"}),g(oe)},onCreateHydrogenStore:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"hydrogen"}),g(ie)},onImportGitHub:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"github"}),_(!0)},onImportDeco:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),j(!0)},isCreating:y||u,align:"center",showBetaBadge:!0})]})})}),J=r.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:r.map(d=>s.jsx(Fe,{project:d,lastUsedAt:C?.get(d.id)?.last_used_at,onDeleteClick:c?()=>x({id:d.id,title:d.title}):void 0},d.id))})]});let P;t[17]!==J||t[18]!==w.Body||t[19]!==I||t[20]!==K?(P=s.jsxs(w.Body,{children:[I,K,J]}),t[17]=J,t[18]=w.Body,t[19]=I,t[20]=K,t[21]=P):P=t[21];let H;t[22]!==P||t[23]!==A.Content?(H=s.jsx(A.Content,{children:P}),t[22]=P,t[23]=A.Content,t[24]=H):H=t[24];let E;t[25]!==n?(E=s.jsx(xe,{open:n,onOpenChange:_}),t[25]=n,t[26]=E):E=t[26];let M;t[27]!==a?(M=s.jsx(je,{open:a,onOpenChange:j}),t[27]=a,t[28]=M):M=t[28];const Q=!!h;let W;t[29]===Symbol.for("react.memo_cache_sentinel")?(W=d=>!d&&x(null),t[29]=W):W=t[29];let R;t[30]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ie,{children:"Delete Agent?"}),t[30]=R):R=t[30];const X=h?.title;let O;t[31]!==X?(O=s.jsxs(Pe,{children:[R,s.jsxs(He,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:X}),"."]})]}),t[31]=X,t[32]=O):O=t[32];let U;t[33]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Ee,{children:"Cancel"}),t[33]=U):U=t[33];let B;t[34]!==m?(B=s.jsxs(Me,{children:[U,s.jsx(Oe,{onClick:m,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[34]=m,t[35]=B):B=t[35];let G;t[36]!==O||t[37]!==B?(G=s.jsxs(Be,{children:[O,B]}),t[36]=O,t[37]=B,t[38]=G):G=t[38];let $;t[39]!==Q||t[40]!==G?($=s.jsx(Ge,{open:Q,onOpenChange:W,children:G}),t[39]=Q,t[40]=G,t[41]=$):$=t[41];let V;return t[42]!==b||t[43]!==H||t[44]!==E||t[45]!==M||t[46]!==$?(V=s.jsxs(b,{children:[H,E,M,$]}),t[42]=b,t[43]=H,t[44]=E,t[45]=M,t[46]=$,t[47]=V):V=t[47],V}function Le(t){return t.id}export{is as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as M,r as S,j as o,l as q}from"./index-0jxZXjT_.js";import{S as G}from"./scroll-area-43OyCToQ.js";import{j as H,al as J,d as Q}from"./index-DG1wYdtC.js";import{S as U}from"./schema-form-yjRGF1Qo.js";import{S as W}from"./save-status-Cfu7sTcH.js";import"./select-CvDnclqc.js";import"./tooltip-CeP603hH.js";import"./Check-5-utiman.js";import"./ChevronDown-BRUPOd-D.js";import"./ChevronUp-B3N7TOrA.js";import"./agent-capabilities-P2Ed3uET.js";import"./pair-8URjhbdi.js";import"./agent-icon-BJOP--6N.js";import"./AlertCircle-I5aAKx5s.js";import"./Tool01-DBZmckgJ.js";import"./SwitchHorizontal01-D6GIRPJ1.js";import"./RefreshCcw01-Dg7_NhVx.js";import"./XCircle-BVR438yI.js";import"./ArrowUpRight-DUqwCMWv.js";import"./ZapSquare-B2q8WEX1.js";import"./Users03-a4EwkzcR.js";import"./CheckCircle-CA1UzIEX.js";import"./ChevronRight-AaMPC6ii.js";import"./DotsVertical-kyMVsMi3.js";import"./Container-Bjo8FVL5.js";import"./Eye-FA0T_9KR.js";import"./Globe01-BdrXaQ4t.js";import"./FilterLines-Dx0-KOH1.js";import"./ZoomOut-DnoKIS59.js";import"./Star01-DQCFITlh.js";import"./Palette-DW_AOTeX.js";import"./HardDrive-uqc3Mfxn.js";import"./Stars02-CnxGzx_a.js";import"./Key01-4CEC30CH.js";import"./sheet-ChXXkoux.js";import"./X-BwvdKywg.js";import"./LinkExternal01-sg0X3i7p.js";import"./Monitor01-CTE-M7aU.js";import"./Sun-CvvLh7O4.js";import"./Play-P4fR-0E_.js";import"./Plus-WVvC1Th4.js";import"./SearchMd-cBVn0Mcd.js";import"./Settings02-J55NFzUl.js";import"./Shield01-CITJSPye.js";import"./Stars01-BQqwEiIH.js";import"./Trash01-BMiuF02D.js";import"./Upload01-DhlN2oeP.js";import"./User01-D0BthoTv.js";import"./Users01-B6kJjdmQ.js";import"./XClose-CeXjq2Ks.js";import"./Zap-Cbw9kHWr.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-wKwDCbum.js";import"./file-type-icon-J1MyTx05.js";import"./dialog-Br598C89.js";import"./content-blocks-o63cs2vh.js";import"./types-B_duTJl-.js";import"./constants-bvvELg6A.js";import"./chat-context-xK_w16Am.js";import"./tab-id-B2HRXc_q.js";import"./decopilot-sse-pool-DZUcRlvx.js";import"./create-sse-subscription-BS5983N4.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-virtual-mcp-DflWVTuF.js";import"./use-collections-DPnWGTP7.js";import"./use-ai-providers-BVFxEa9L.js";import"./use-organization-settings-CQEWT13Z.js";import"./shell-layout-0JObD2s1.js";import"./avatar-DRLQAp0U.js";import"./required-auth-layout-Bsfg7CLj.js";import"./useRouterState-Br8Ksrwr.js";import"./use-org-sso-KYe6rDaT.js";import"./integration-icon-B34NO5DZ.js";import"./use-navigate-to-agent-DbTKvOZS.js";import"./use-connection-CzM_WXMN.js";import"./use-mcp-prompts-EWCIJOcj.js";import"./form-BFCHHJw7.js";import"./label-Ces90Ob6.js";import"./input-BJ1rHrAh.js";import"./spinner-Cecl_L8X.js";import"./drawer-D-eRrcRE.js";import"./collection-search-CBN_q_XM.js";import"./tabs-CeDin4k7.js";import"./toggle-group-CefnzENU.js";import"./agent-icons-VZFS25ox.js";import"./checkbox-D4JiAIiY.js";import"./skeleton-BnhJTtVi.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-z_q4ruf_.js";import"./card-mrz_YqFP.js";import"./connect-desktop-dialog-BDYQrQzN.js";import"./popover-CvKJiX83.js";import"./command-DT1FhdNv.js";import"./index-Dlj9BqPT.js";import"./useInfiniteQuery-2A4J-MZz.js";import"./infiniteQueryObserver-BHyRmyuw.js";import"./sortable.esm-DjicLksl.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CWg85UPa.js";import"./use-registry-connections-Bxq_77g6.js";import"./extract-connection-data-DRKXxZ8i.js";import"./generate-id-BoTFc93G.js";import"./collections-D3-t_Oif.js";import"./collection-tabs-BoWMCCpv.js";import"./badge-DKUnZ67J.js";import"./textarea-SDIeylNJ.js";import"./connection-form-helpers-I069qG8R.js";import"./use-infinite-scroll-COXLEab2.js";import"./useSuspenseInfiniteQuery-vt45tURh.js";import"./index-D-h2wBuz.js";import"./dropdown-menu-39FgxtLo.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-DBlx6e0Z.js";import"./sidebar-DxS-nB9C.js";import"./toolbar-B8vAkOP3.js";import"./use-create-virtual-mcp-CwM2ND5a.js";import"./github-repo-picker-CJ1plqRU.js";import"./use-mcp-tools-YMWJX9tN.js";import"./alert-dialog-Bvyir_5o.js";import"./index-XCMOYuFO.js";import"./use-org-auth-client-PFGUMv0N.js";import"./hover-card-CW2-sshf.js";import"./task-status-BLPz-4sC.js";import"./use-status-sounds-CWk7re-G.js";import"./empty-state-Cv3pDKB-.js";import"./accordion-BVwnr-Ph.js";import"./use-capability-BrFRIPu5.js";import"./monaco-editor-D4JSTdws.js";import"./user-Dz7iwzYF.js";import"./tools-list-CqDkzdE6.js";import"./switch-BOQ2PJeb.js";import"./use-debounced-autosave-D4-Vb6JZ.js";import"./index-B0yf3v8e.js";import"./search-input-CIl-bXGa.js";import"./use-secrets-CgnCxvTW.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-DI_qGqci.js";import"./select-model-cqeqhVQK.js";import"./use-automations-BefuyBQd.js";import"./automation-runs-CDd6q4GC.js";import"./table-Cz11eDpz.js";import"./use-members-CMjFtY8-.js";import"./automation-list-row-Bo6miFHP.js";import"./file-preview-B4Zho1Y6.js";import"./calendar-C2n-TFID.js";import"./image-field-GBQBz7jx.js";import"./use-file-configs-DXzZdUlN.js";function zo(g){const t=M.c(38),{orgSlug:N,virtualMcpId:_,branch:k,blockKey:r,block:i,meta:m,title:E,excludeFields:n,schemaPending:C}=g,P=C===void 0?!1:C,e=typeof i?.__resolveType=="string"?i.__resolveType:"";let d;if(t[0]!==n||t[1]!==m||t[2]!==e){const c=e?H(e,m):null;d=c&&n?.length?{...c,properties:Object.fromEntries(Object.entries(c.properties??{}).filter(y=>{const[I]=y;return!n.includes(I)}))}:c,t[0]=n,t[1]=m,t[2]=e,t[3]=d}else d=t[3];const f=d;let u;t[4]!==i||t[5]!==r||t[6]!==m||t[7]!==E?(u=E??(i?J(r,i,m):r),t[4]=i,t[5]=r,t[6]=m,t[7]=E,t[8]=u):u=t[8];const B=u;let x;t[9]!==k||t[10]!==N||t[11]!==_?(x={orgSlug:N,virtualMcpId:_,branch:k},t[9]=k,t[10]=N,t[11]=_,t[12]=x):x=t[12];const{save:K,isPending:R}=Q(x),[A,L]=S.useState(r),[z,O]=S.useState(null),[V,D]=S.useState(0);let h;t[13]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[13]=h):h=t[13];const[w,$]=S.useState(h);A!==r&&(L(r),O(null),D(X),$([]));let v;t[14]!==i?(v=i??{},t[14]=i,t[15]=v):v=t[15];const F=z??v;let b;t[16]!==r||t[17]!==e||t[18]!==K?(b=c=>{const y=c;O(y),K(r,{...y,__resolveType:e})},t[16]=r,t[17]=e,t[18]=K,t[19]=b):b=t[19];const T=b;let p;t[20]!==B?(p=o.jsx("span",{className:"text-sm font-medium",children:B}),t[20]=B,t[21]=p):p=t[21];let s;t[22]!==R?(s=o.jsx(W,{isPending:R,isError:!1}),t[22]=R,t[23]=s):s=t[23];let l;t[24]!==p||t[25]!==s?(l=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[p,s]}),t[24]=p,t[25]=s,t[26]=l):l=t[26];let a;t[27]!==r||t[28]!==w||t[29]!==F||t[30]!==V||t[31]!==T||t[32]!==f||t[33]!==P?(a=o.jsx(G,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl",children:f?o.jsx(U,{schema:f,value:F,onChange:T,basePath:"",breadcrumbPath:w,onBreadcrumbChange:$},`${r}:${V}`):P?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(q,{size:16,className:"animate-spin"}),"Loading app schema…"]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:"No editable schema found for this app."})})})}),t[27]=r,t[28]=w,t[29]=F,t[30]=V,t[31]=T,t[32]=f,t[33]=P,t[34]=a):a=t[34];let j;return t[35]!==l||t[36]!==a?(j=o.jsxs("div",{className:"flex h-full flex-col",children:[l,a]}),t[35]=l,t[36]=a,t[37]=j):j=t[37],j}function X(g){return g+1}export{zo as AppEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as k,j as o,q as L,f as T,r as $,B as M,t as N}from"./index-0jxZXjT_.js";import{s as q}from"./Plus-WVvC1Th4.js";import{i as S}from"./Zap-Cbw9kHWr.js";import{S as D}from"./search-input-CIl-bXGa.js";import{P as l}from"./index-B0yf3v8e.js";import{E as b}from"./empty-state-Cv3pDKB-.js";import{c as O}from"./use-automations-BefuyBQd.js";import{k as V}from"./use-navigate-to-agent-DbTKvOZS.js";import{A as F}from"./automation-list-row-Bo6miFHP.js";import{h as G}from"./constants-bvvELg6A.js";import{a as H}from"./use-virtual-mcp-DflWVTuF.js";import{R as J}from"./require-capability-CA7mIlLg.js";import"./SearchMd-cBVn0Mcd.js";import"./sidebar-DxS-nB9C.js";import"./sheet-ChXXkoux.js";import"./X-BwvdKywg.js";import"./tooltip-CeP603hH.js";import"./alert-dialog-Bvyir_5o.js";import"./dropdown-menu-39FgxtLo.js";import"./Check-5-utiman.js";import"./ChevronRight-AaMPC6ii.js";import"./DotsVertical-kyMVsMi3.js";import"./agent-icon-BJOP--6N.js";import"./AlertCircle-I5aAKx5s.js";import"./Tool01-DBZmckgJ.js";import"./SwitchHorizontal01-D6GIRPJ1.js";import"./RefreshCcw01-Dg7_NhVx.js";import"./XCircle-BVR438yI.js";import"./ArrowUpRight-DUqwCMWv.js";import"./ZapSquare-B2q8WEX1.js";import"./Users03-a4EwkzcR.js";import"./CheckCircle-CA1UzIEX.js";import"./ChevronDown-BRUPOd-D.js";import"./ChevronUp-B3N7TOrA.js";import"./Container-Bjo8FVL5.js";import"./Eye-FA0T_9KR.js";import"./Globe01-BdrXaQ4t.js";import"./FilterLines-Dx0-KOH1.js";import"./ZoomOut-DnoKIS59.js";import"./Star01-DQCFITlh.js";import"./Palette-DW_AOTeX.js";import"./HardDrive-uqc3Mfxn.js";import"./Stars02-CnxGzx_a.js";import"./Key01-4CEC30CH.js";import"./LinkExternal01-sg0X3i7p.js";import"./Monitor01-CTE-M7aU.js";import"./Sun-CvvLh7O4.js";import"./Play-P4fR-0E_.js";import"./Settings02-J55NFzUl.js";import"./Shield01-CITJSPye.js";import"./Stars01-BQqwEiIH.js";import"./Trash01-BMiuF02D.js";import"./Upload01-DhlN2oeP.js";import"./User01-D0BthoTv.js";import"./Users01-B6kJjdmQ.js";import"./XClose-CeXjq2Ks.js";import"./use-collections-DPnWGTP7.js";import"./use-capability-BrFRIPu5.js";import"./access-gate-CFCd65pW.js";import"./capability-load-error-mrR6n6ef.js";function K(){const t=k.c(16),{org:i}=L(),{data:w}=O(void 0),u=w===void 0?[]:w,B=H(),R=V(),d=T(),[f,E]=$.useState(""),g=f.toLowerCase(),y=new Map(B.map(Q)),C=u.filter(e=>{if(!g||e.name.toLowerCase().includes(g))return!0;if(e.virtual_mcp_id){const m=y.get(e.virtual_mcp_id);if(m&&m.title.toLowerCase().includes(g))return!0}return!1}),P=(e,m)=>{const A=m&&y.has(m)?m:G(i.id);N("automations_list_row_clicked",{automation_id:e,agent_id:A,source:"settings_automations"}),R(A,{search:{main:"automation:"+e}})};let n;t[0]!==d||t[1]!==i.slug?(n=()=>{N("automations_empty_state_browse_agents_clicked"),d({to:"/$org/settings/agents",params:{org:i.slug}})},t[0]=d,t[1]=i.slug,t[2]=n):n=t[2];const z=n,x=l,h=l,j=l;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(l.Title,{children:"Automations"}),t[3]=p):p=t[3];const _=u.length>0&&o.jsx(D,{value:f,onChange:E,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let r;t[4]!==_?(r=o.jsxs("div",{className:"flex flex-col gap-6",children:[p,_]}),t[4]=_,t[5]=r):r=t[5];const v=u.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:o.jsxs(M,{size:"sm",onClick:z,children:[o.jsx(q,{size:14}),"Browse agents"]})})}):C.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${f}"`})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:C.map(e=>o.jsx(F,{automation:e,showAgent:!0,onClick:()=>P(e.id,e.virtual_mcp_id)},e.id))});let s;t[6]!==j.Body||t[7]!==r||t[8]!==v?(s=o.jsxs(j.Body,{children:[r,v]}),t[6]=j.Body,t[7]=r,t[8]=v,t[9]=s):s=t[9];let a;t[10]!==h.Content||t[11]!==s?(a=o.jsx(h.Content,{children:s}),t[10]=h.Content,t[11]=s,t[12]=a):a=t[12];let c;return t[13]!==x||t[14]!==a?(c=o.jsx(x,{children:a}),t[13]=x,t[14]=a,t[15]=c):c=t[15],c}function Q(t){return[t.id,t]}function to(){const t=k.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(J,{capability:"automations:manage",area:"automations",children:o.jsx(K,{})}),t[0]=i):i=t[0],i}export{to as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as D,j as u,e as ht,c as H,ds as Pe}from"./index-0jxZXjT_.js";import{n as mt}from"./ZapSquare-B2q8WEX1.js";import{i as vt}from"./ChevronRight-AaMPC6ii.js";function w(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function S(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function C(e,t){const n=w(e);return isNaN(t)?S(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function j(e,t){const n=w(e);if(isNaN(t))return S(e,NaN);if(!t)return n;const a=n.getDate(),r=S(e,n.getTime());r.setMonth(n.getMonth()+t+1,0);const o=r.getDate();return a>=o?r:(n.setFullYear(r.getFullYear(),r.getMonth(),a),n)}const ye=6048e5,yt=864e5;let gt={};function z(){return gt}function Y(e,t){const n=z(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=w(e),o=r.getDay(),i=(o<a?7:0)+o-a;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function I(e){return Y(e,{weekStartsOn:1})}function Ie(e){const t=w(e),n=t.getFullYear(),a=S(e,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const r=I(a),o=S(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const i=I(o);return t.getTime()>=r.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function A(e){const t=w(e);return t.setHours(0,0,0,0),t}function Z(e){const t=w(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function T(e,t){const n=A(e),a=A(t),r=+n-Z(n),o=+a-Z(a);return Math.round((r-o)/yt)}function bt(e){const t=Ie(e),n=S(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),I(n)}function me(e,t){const n=t*7;return C(e,n)}function pt(e,t){return j(e,t*12)}function wt(e){let t;return e.forEach(function(n){const a=w(n);(t===void 0||t<a||isNaN(Number(a)))&&(t=a)}),t||new Date(NaN)}function xt(e){let t;return e.forEach(n=>{const a=w(n);(!t||t>a||isNaN(+a))&&(t=a)}),t||new Date(NaN)}function P(e,t){const n=A(e),a=A(t);return+n==+a}function ge(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _t(e){if(!ge(e)&&typeof e!="number")return!1;const t=w(e);return!isNaN(Number(t))}function G(e,t){const n=w(e),a=w(t),r=n.getFullYear()-a.getFullYear(),o=n.getMonth()-a.getMonth();return r*12+o}function Dt(e,t,n){const a=Y(e,n),r=Y(t,n),o=+a-Z(a),i=+r-Z(r);return Math.round((o-i)/ye)}function be(e){const t=w(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function O(e){const t=w(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Re(e){const t=w(e),n=S(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function pe(e,t){const n=z(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=w(e),o=r.getDay(),i=(o<a?-7:0)+6-(o-a);return r.setDate(r.getDate()+i),r.setHours(23,59,59,999),r}function Be(e){return pe(e,{weekStartsOn:1})}const Mt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},kt=(e,t,n)=>{let a;const r=Mt[e];return typeof r=="string"?a=r:t===1?a=r.one:a=r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function se(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Nt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ct={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Pt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ot={date:se({formats:Nt,defaultWidth:"full"}),time:se({formats:Ct,defaultWidth:"full"}),dateTime:se({formats:Pt,defaultWidth:"full"})},St={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jt=(e,t,n,a)=>St[e];function X(e){return(t,n)=>{const a=n?.context?String(n.context):"standalone";let r;if(a==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):i;r=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return r[o]}}const Wt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Tt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Yt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ft={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Et={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Lt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},It=(e,t)=>{const n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Rt={ordinalNumber:It,era:X({values:Wt,defaultWidth:"wide"}),quarter:X({values:Tt,defaultWidth:"wide",argumentCallback:e=>e-1}),month:X({values:Yt,defaultWidth:"wide"}),day:X({values:Ft,defaultWidth:"wide"}),dayPeriod:X({values:Et,defaultWidth:"wide",formattingValues:Lt,defaultFormattingWidth:"wide"})};function V(e){return(t,n={})=>{const a=n.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;const i=o[0],s=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?Ht(s,f=>f.test(i)):Bt(s,f=>f.test(i));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const l=t.slice(i.length);return{value:d,rest:l}}}function Bt(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ht(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function At(e){return(t,n={})=>{const a=t.match(e.matchPattern);if(!a)return null;const r=a[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(r.length);return{value:i,rest:s}}}const qt=/^(\d+)(th|st|nd|rd)?/i,Qt=/\d+/i,Xt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Vt={any:[/^b/i,/^(a|c)/i]},Gt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zt={any:[/1/i,/2/i,/3/i,/4/i]},Ut={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Jt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Kt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},$t={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Zt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},en={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},tn={ordinalNumber:At({matchPattern:qt,parsePattern:Qt,valueCallback:e=>parseInt(e,10)}),era:V({matchPatterns:Xt,defaultMatchWidth:"wide",parsePatterns:Vt,defaultParseWidth:"any"}),quarter:V({matchPatterns:Gt,defaultMatchWidth:"wide",parsePatterns:zt,defaultParseWidth:"any",valueCallback:e=>e+1}),month:V({matchPatterns:Ut,defaultMatchWidth:"wide",parsePatterns:Jt,defaultParseWidth:"any"}),day:V({matchPatterns:Kt,defaultMatchWidth:"wide",parsePatterns:$t,defaultParseWidth:"any"}),dayPeriod:V({matchPatterns:Zt,defaultMatchWidth:"any",parsePatterns:en,defaultParseWidth:"any"})},He={code:"en-US",formatDistance:kt,formatLong:Ot,formatRelative:jt,localize:Rt,match:tn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function nn(e){const t=w(e);return T(t,Re(t))+1}function Ae(e){const t=w(e),n=+I(t)-+bt(t);return Math.round(n/ye)+1}function qe(e,t){const n=w(e),a=n.getFullYear(),r=z(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=S(e,0);i.setFullYear(a+1,0,o),i.setHours(0,0,0,0);const s=Y(i,t),c=S(e,0);c.setFullYear(a,0,o),c.setHours(0,0,0,0);const d=Y(c,t);return n.getTime()>=s.getTime()?a+1:n.getTime()>=d.getTime()?a:a-1}function an(e,t){const n=z(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=qe(e,t),o=S(e,0);return o.setFullYear(r,0,a),o.setHours(0,0,0,0),Y(o,t)}function Qe(e,t){const n=w(e),a=+Y(n,t)-+an(n,t);return Math.round(a/ye)+1}function _(e,t){const n=e<0?"-":"",a=Math.abs(e).toString().padStart(t,"0");return n+a}const E={y(e,t){const n=e.getFullYear(),a=n>0?n:1-n;return _(t==="yy"?a%100:a,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):_(n+1,2)},d(e,t){return _(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return _(e.getHours()%12||12,t.length)},H(e,t){return _(e.getHours(),t.length)},m(e,t){return _(e.getMinutes(),t.length)},s(e,t){return _(e.getSeconds(),t.length)},S(e,t){const n=t.length,a=e.getMilliseconds(),r=Math.trunc(a*Math.pow(10,n-3));return _(r,t.length)}},B={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Oe={G:function(e,t,n){const a=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});default:return n.era(a,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const a=e.getFullYear(),r=a>0?a:1-a;return n.ordinalNumber(r,{unit:"year"})}return E.y(e,t)},Y:function(e,t,n,a){const r=qe(e,a),o=r>0?r:1-r;if(t==="YY"){const i=o%100;return _(i,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):_(o,t.length)},R:function(e,t){const n=Ie(e);return _(n,t.length)},u:function(e,t){const n=e.getFullYear();return _(n,t.length)},Q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return _(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return _(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,n){const a=e.getMonth();switch(t){case"M":case"MM":return E.M(e,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,n){const a=e.getMonth();switch(t){case"L":return String(a+1);case"LL":return _(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,n,a){const r=Qe(e,a);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):_(r,t.length)},I:function(e,t,n){const a=Ae(e);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):_(a,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):E.d(e,t)},D:function(e,t,n){const a=nn(e);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):_(a,t.length)},E:function(e,t,n){const a=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,n,a){const r=e.getDay(),o=(r-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return _(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,a){const r=e.getDay(),o=(r-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return _(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const a=e.getDay(),r=a===0?7:a;switch(t){case"i":return String(r);case"ii":return _(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const a=e.getHours();let r;switch(a===12?r=B.noon:a===0?r=B.midnight:r=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const a=e.getHours();let r;switch(a>=17?r=B.evening:a>=12?r=B.afternoon:a>=4?r=B.morning:r=B.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let a=e.getHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return E.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):E.H(e,t)},K:function(e,t,n){const a=e.getHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):_(a,t.length)},k:function(e,t,n){let a=e.getHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):_(a,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):E.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):E.s(e,t)},S:function(e,t){return E.S(e,t)},X:function(e,t,n){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return je(a);case"XXXX":case"XX":return L(a);default:return L(a,":")}},x:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"x":return je(a);case"xxxx":case"xx":return L(a);default:return L(a,":")}},O:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Se(a,":");default:return"GMT"+L(a,":")}},z:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Se(a,":");default:return"GMT"+L(a,":")}},t:function(e,t,n){const a=Math.trunc(e.getTime()/1e3);return _(a,t.length)},T:function(e,t,n){const a=e.getTime();return _(a,t.length)}};function Se(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=Math.trunc(a/60),o=a%60;return o===0?n+String(r):n+String(r)+t+_(o,2)}function je(e,t){return e%60===0?(e>0?"-":"+")+_(Math.abs(e)/60,2):L(e,t)}function L(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=_(Math.trunc(a/60),2),o=_(a%60,2);return n+r+t+o}const We=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Xe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},rn=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],a=n[1],r=n[2];if(!r)return We(e,t);let o;switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",We(a,t)).replace("{{time}}",Xe(r,t))},on={p:Xe,P:rn},sn=/^D+$/,un=/^Y+$/,ln=["D","DD","YY","YYYY"];function cn(e){return sn.test(e)}function dn(e){return un.test(e)}function fn(e,t,n){const a=hn(e,t,n);if(console.warn(a),ln.includes(e))throw new RangeError(a)}function hn(e,t,n){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${a} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const mn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yn=/^'([^]*?)'?$/,gn=/''/g,bn=/[a-zA-Z]/;function R(e,t,n){const a=z(),r=n?.locale??a.locale??He,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,s=w(e);if(!_t(s))throw new RangeError("Invalid time value");let c=t.match(vn).map(l=>{const f=l[0];if(f==="p"||f==="P"){const h=on[f];return h(l,r.formatLong)}return l}).join("").match(mn).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const f=l[0];if(f==="'")return{isToken:!1,value:pn(l)};if(Oe[f])return{isToken:!0,value:l};if(f.match(bn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:l}});r.localize.preprocessor&&(c=r.localize.preprocessor(s,c));const d={firstWeekContainsDate:o,weekStartsOn:i,locale:r};return c.map(l=>{if(!l.isToken)return l.value;const f=l.value;(!n?.useAdditionalWeekYearTokens&&dn(f)||!n?.useAdditionalDayOfYearTokens&&cn(f))&&fn(f,t,String(e));const h=Oe[f[0]];return h(s,f,r.localize,d)}).join("")}function pn(e){const t=e.match(yn);return t?t[1].replace(gn,"'"):e}function wn(e){const t=w(e),n=t.getFullYear(),a=t.getMonth(),r=S(e,0);return r.setFullYear(n,a+1,0),r.setHours(0,0,0,0),r.getDate()}function xn(e){return Math.trunc(+w(e)/1e3)}function _n(e){const t=w(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function Dn(e,t){return Dt(_n(e),O(e),t)+1}function ve(e,t){const n=w(e),a=w(t);return n.getTime()>a.getTime()}function Ve(e,t){const n=w(e),a=w(t);return+n<+a}function we(e,t){const n=w(e),a=w(t);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}function Mn(e,t){const n=w(e),a=w(t);return n.getFullYear()===a.getFullYear()}function ue(e,t){return C(e,-t)}function le(e,t){const n=w(e),a=n.getFullYear(),r=n.getDate(),o=S(e,0);o.setFullYear(a,t,15),o.setHours(0,0,0,0);const i=wn(o);return n.setMonth(t,Math.min(r,i)),n}function Te(e,t){const n=w(e);return isNaN(+n)?S(e,NaN):(n.setFullYear(t),n)}var g=function(){return g=Object.assign||function(t){for(var n,a=1,r=arguments.length;a<r;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},g.apply(this,arguments)};function kn(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n}function Ge(e,t,n){for(var a=0,r=t.length,o;a<r;a++)(o||!(a in t))&&(o||(o=Array.prototype.slice.call(t,0,a)),o[a]=t[a]);return e.concat(o||Array.prototype.slice.call(t))}function U(e){return e.mode==="multiple"}function J(e){return e.mode==="range"}function te(e){return e.mode==="single"}var Nn={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function Cn(e,t){return R(e,"LLLL y",t)}function Pn(e,t){return R(e,"d",t)}function On(e,t){return R(e,"LLLL",t)}function Sn(e){return"".concat(e)}function jn(e,t){return R(e,"cccccc",t)}function Wn(e,t){return R(e,"yyyy",t)}var Tn=Object.freeze({__proto__:null,formatCaption:Cn,formatDay:Pn,formatMonthCaption:On,formatWeekNumber:Sn,formatWeekdayName:jn,formatYearCaption:Wn}),Yn=function(e,t,n){return R(e,"do MMMM (EEEE)",n)},Fn=function(){return"Month: "},En=function(){return"Go to next month"},Ln=function(){return"Go to previous month"},In=function(e,t){return R(e,"cccc",t)},Rn=function(e){return"Week n. ".concat(e)},Bn=function(){return"Year: "},Hn=Object.freeze({__proto__:null,labelDay:Yn,labelMonthDropdown:Fn,labelNext:En,labelPrevious:Ln,labelWeekNumber:Rn,labelWeekday:In,labelYearDropdown:Bn});function An(){var e="buttons",t=Nn,n=He,a={},r={},o=1,i={},s=new Date;return{captionLayout:e,classNames:t,formatters:Tn,labels:Hn,locale:n,modifiersClassNames:a,modifiers:r,numberOfMonths:o,styles:i,today:s,mode:"default"}}function qn(e){var t=e.fromYear,n=e.toYear,a=e.fromMonth,r=e.toMonth,o=e.fromDate,i=e.toDate;return a?o=O(a):t&&(o=new Date(t,0,1)),r?i=be(r):n&&(i=new Date(n,11,31)),{fromDate:o?A(o):void 0,toDate:i?A(i):void 0}}var ze=D.createContext(void 0);function Qn(e){var t,n=e.initialProps,a=An(),r=qn(n),o=r.fromDate,i=r.toDate,s=(t=n.captionLayout)!==null&&t!==void 0?t:a.captionLayout;s!=="buttons"&&(!o||!i)&&(s="buttons");var c;(te(n)||U(n)||J(n))&&(c=n.onSelect);var d=g(g(g({},a),n),{captionLayout:s,classNames:g(g({},a.classNames),n.classNames),components:g({},n.components),formatters:g(g({},a.formatters),n.formatters),fromDate:o,labels:g(g({},a.labels),n.labels),mode:n.mode||a.mode,modifiers:g(g({},a.modifiers),n.modifiers),modifiersClassNames:g(g({},a.modifiersClassNames),n.modifiersClassNames),onSelect:c,styles:g(g({},a.styles),n.styles),toDate:i});return u.jsx(ze.Provider,{value:d,children:e.children})}function M(){var e=D.useContext(ze);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function Ue(e){var t=M(),n=t.locale,a=t.classNames,r=t.styles,o=t.formatters.formatCaption;return u.jsx("div",{className:a.caption_label,style:r.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:o(e.displayMonth,{locale:n})})}function Xn(e){return u.jsx("svg",g({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:u.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Je(e){var t,n,a=e.onChange,r=e.value,o=e.children,i=e.caption,s=e.className,c=e.style,d=M(),l=(n=(t=d.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&n!==void 0?n:Xn;return u.jsxs("div",{className:s,style:c,children:[u.jsx("span",{className:d.classNames.vhidden,children:e["aria-label"]}),u.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:d.classNames.dropdown,style:d.styles.dropdown,value:r,onChange:a,children:o}),u.jsxs("div",{className:d.classNames.caption_label,style:d.styles.caption_label,"aria-hidden":"true",children:[i,u.jsx(l,{className:d.classNames.dropdown_icon,style:d.styles.dropdown_icon})]})]})}function Vn(e){var t,n=M(),a=n.fromDate,r=n.toDate,o=n.styles,i=n.locale,s=n.formatters.formatMonthCaption,c=n.classNames,d=n.components,l=n.labels.labelMonthDropdown;if(!a)return u.jsx(u.Fragment,{});if(!r)return u.jsx(u.Fragment,{});var f=[];if(Mn(a,r))for(var h=O(a),m=a.getMonth();m<=r.getMonth();m++)f.push(le(h,m));else for(var h=O(new Date),m=0;m<=11;m++)f.push(le(h,m));var y=function(p){var N=Number(p.target.value),k=le(O(e.displayMonth),N);e.onChange(k)},x=(t=d?.Dropdown)!==null&&t!==void 0?t:Je;return u.jsx(x,{name:"months","aria-label":l(),className:c.dropdown_month,style:o.dropdown_month,onChange:y,value:e.displayMonth.getMonth(),caption:s(e.displayMonth,{locale:i}),children:f.map(function(p){return u.jsx("option",{value:p.getMonth(),children:s(p,{locale:i})},p.getMonth())})})}function Gn(e){var t,n=e.displayMonth,a=M(),r=a.fromDate,o=a.toDate,i=a.locale,s=a.styles,c=a.classNames,d=a.components,l=a.formatters.formatYearCaption,f=a.labels.labelYearDropdown,h=[];if(!r)return u.jsx(u.Fragment,{});if(!o)return u.jsx(u.Fragment,{});for(var m=r.getFullYear(),y=o.getFullYear(),x=m;x<=y;x++)h.push(Te(Re(new Date),x));var p=function(k){var q=Te(O(n),Number(k.target.value));e.onChange(q)},N=(t=d?.Dropdown)!==null&&t!==void 0?t:Je;return u.jsx(N,{name:"years","aria-label":f(),className:c.dropdown_year,style:s.dropdown_year,onChange:p,value:n.getFullYear(),caption:l(n,{locale:i}),children:h.map(function(k){return u.jsx("option",{value:k.getFullYear(),children:l(k,{locale:i})},k.getFullYear())})})}function zn(e,t){var n=D.useState(e),a=n[0],r=n[1],o=t===void 0?a:t;return[o,r]}function Un(e){var t=e.month,n=e.defaultMonth,a=e.today,r=t||n||a||new Date,o=e.toDate,i=e.fromDate,s=e.numberOfMonths,c=s===void 0?1:s;if(o&&G(o,r)<0){var d=-1*(c-1);r=j(o,d)}return i&&G(r,i)<0&&(r=i),O(r)}function Jn(){var e=M(),t=Un(e),n=zn(t,e.month),a=n[0],r=n[1],o=function(i){var s;if(!e.disableNavigation){var c=O(i);r(c),(s=e.onMonthChange)===null||s===void 0||s.call(e,c)}};return[a,o]}function Kn(e,t){for(var n=t.reverseMonths,a=t.numberOfMonths,r=O(e),o=O(j(r,a)),i=G(o,r),s=[],c=0;c<i;c++){var d=j(r,c);s.push(d)}return n&&(s=s.reverse()),s}function $n(e,t){if(!t.disableNavigation){var n=t.toDate,a=t.pagedNavigation,r=t.numberOfMonths,o=r===void 0?1:r,i=a?o:1,s=O(e);if(!n)return j(s,i);var c=G(n,e);if(!(c<o))return j(s,i)}}function Zn(e,t){if(!t.disableNavigation){var n=t.fromDate,a=t.pagedNavigation,r=t.numberOfMonths,o=r===void 0?1:r,i=a?o:1,s=O(e);if(!n)return j(s,-i);var c=G(s,n);if(!(c<=0))return j(s,-i)}}var Ke=D.createContext(void 0);function ea(e){var t=M(),n=Jn(),a=n[0],r=n[1],o=Kn(a,t),i=$n(a,t),s=Zn(a,t),c=function(f){return o.some(function(h){return we(f,h)})},d=function(f,h){c(f)||(h&&Ve(f,h)?r(j(f,1+t.numberOfMonths*-1)):r(f))},l={currentMonth:a,displayMonths:o,goToMonth:r,goToDate:d,previousMonth:s,nextMonth:i,isDateDisplayed:c};return u.jsx(Ke.Provider,{value:l,children:e.children})}function K(){var e=D.useContext(Ke);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function Ye(e){var t,n=M(),a=n.classNames,r=n.styles,o=n.components,i=K().goToMonth,s=function(l){i(j(l,e.displayIndex?-e.displayIndex:0))},c=(t=o?.CaptionLabel)!==null&&t!==void 0?t:Ue,d=u.jsx(c,{id:e.id,displayMonth:e.displayMonth});return u.jsxs("div",{className:a.caption_dropdowns,style:r.caption_dropdowns,children:[u.jsx("div",{className:a.vhidden,children:d}),u.jsx(Vn,{onChange:s,displayMonth:e.displayMonth}),u.jsx(Gn,{onChange:s,displayMonth:e.displayMonth})]})}function ta(e){return u.jsx("svg",g({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:u.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function na(e){return u.jsx("svg",g({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:u.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var ee=D.forwardRef(function(e,t){var n=M(),a=n.classNames,r=n.styles,o=[a.button_reset,a.button];e.className&&o.push(e.className);var i=o.join(" "),s=g(g({},r.button_reset),r.button);return e.style&&Object.assign(s,e.style),u.jsx("button",g({},e,{ref:t,type:"button",className:i,style:s}))});function aa(e){var t,n,a=M(),r=a.dir,o=a.locale,i=a.classNames,s=a.styles,c=a.labels,d=c.labelPrevious,l=c.labelNext,f=a.components;if(!e.nextMonth&&!e.previousMonth)return u.jsx(u.Fragment,{});var h=d(e.previousMonth,{locale:o}),m=[i.nav_button,i.nav_button_previous].join(" "),y=l(e.nextMonth,{locale:o}),x=[i.nav_button,i.nav_button_next].join(" "),p=(t=f?.IconRight)!==null&&t!==void 0?t:na,N=(n=f?.IconLeft)!==null&&n!==void 0?n:ta;return u.jsxs("div",{className:i.nav,style:s.nav,children:[!e.hidePrevious&&u.jsx(ee,{name:"previous-month","aria-label":h,className:m,style:s.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:r==="rtl"?u.jsx(p,{className:i.nav_icon,style:s.nav_icon}):u.jsx(N,{className:i.nav_icon,style:s.nav_icon})}),!e.hideNext&&u.jsx(ee,{name:"next-month","aria-label":y,className:x,style:s.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:r==="rtl"?u.jsx(N,{className:i.nav_icon,style:s.nav_icon}):u.jsx(p,{className:i.nav_icon,style:s.nav_icon})})]})}function Fe(e){var t=M().numberOfMonths,n=K(),a=n.previousMonth,r=n.nextMonth,o=n.goToMonth,i=n.displayMonths,s=i.findIndex(function(y){return we(e.displayMonth,y)}),c=s===0,d=s===i.length-1,l=t>1&&(c||!d),f=t>1&&(d||!c),h=function(){a&&o(a)},m=function(){r&&o(r)};return u.jsx(aa,{displayMonth:e.displayMonth,hideNext:l,hidePrevious:f,nextMonth:r,previousMonth:a,onPreviousClick:h,onNextClick:m})}function ra(e){var t,n=M(),a=n.classNames,r=n.disableNavigation,o=n.styles,i=n.captionLayout,s=n.components,c=(t=s?.CaptionLabel)!==null&&t!==void 0?t:Ue,d;return r?d=u.jsx(c,{id:e.id,displayMonth:e.displayMonth}):i==="dropdown"?d=u.jsx(Ye,{displayMonth:e.displayMonth,id:e.id}):i==="dropdown-buttons"?d=u.jsxs(u.Fragment,{children:[u.jsx(Ye,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),u.jsx(Fe,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):d=u.jsxs(u.Fragment,{children:[u.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),u.jsx(Fe,{displayMonth:e.displayMonth,id:e.id})]}),u.jsx("div",{className:a.caption,style:o.caption,children:d})}function oa(e){var t=M(),n=t.footer,a=t.styles,r=t.classNames.tfoot;return n?u.jsx("tfoot",{className:r,style:a.tfoot,children:u.jsx("tr",{children:u.jsx("td",{colSpan:8,children:n})})}):u.jsx(u.Fragment,{})}function ia(e,t,n){for(var a=n?I(new Date):Y(new Date,{locale:e,weekStartsOn:t}),r=[],o=0;o<7;o++){var i=C(a,o);r.push(i)}return r}function sa(){var e=M(),t=e.classNames,n=e.styles,a=e.showWeekNumber,r=e.locale,o=e.weekStartsOn,i=e.ISOWeek,s=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,d=ia(r,o,i);return u.jsxs("tr",{style:n.head_row,className:t.head_row,children:[a&&u.jsx("td",{style:n.head_cell,className:t.head_cell}),d.map(function(l,f){return u.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":c(l,{locale:r}),children:s(l,{locale:r})},f)})]})}function ua(){var e,t=M(),n=t.classNames,a=t.styles,r=t.components,o=(e=r?.HeadRow)!==null&&e!==void 0?e:sa;return u.jsx("thead",{style:a.head,className:n.head,children:u.jsx(o,{})})}function la(e){var t=M(),n=t.locale,a=t.formatters.formatDay;return u.jsx(u.Fragment,{children:a(e.date,{locale:n})})}var xe=D.createContext(void 0);function ca(e){if(!U(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return u.jsx(xe.Provider,{value:t,children:e.children})}return u.jsx(da,{initialProps:e.initialProps,children:e.children})}function da(e){var t=e.initialProps,n=e.children,a=t.selected,r=t.min,o=t.max,i=function(d,l,f){var h,m;(h=t.onDayClick)===null||h===void 0||h.call(t,d,l,f);var y=!!(l.selected&&r&&a?.length===r);if(!y){var x=!!(!l.selected&&o&&a?.length===o);if(!x){var p=a?Ge([],a):[];if(l.selected){var N=p.findIndex(function(k){return P(d,k)});p.splice(N,1)}else p.push(d);(m=t.onSelect)===null||m===void 0||m.call(t,p,d,l,f)}}},s={disabled:[]};a&&s.disabled.push(function(d){var l=o&&a.length>o-1,f=a.some(function(h){return P(h,d)});return!!(l&&!f)});var c={selected:a,onDayClick:i,modifiers:s};return u.jsx(xe.Provider,{value:c,children:n})}function _e(){var e=D.useContext(xe);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function fa(e,t){var n=t||{},a=n.from,r=n.to;return a&&r?P(r,e)&&P(a,e)?void 0:P(r,e)?{from:r,to:void 0}:P(a,e)?void 0:ve(a,e)?{from:e,to:r}:{from:a,to:e}:r?ve(e,r)?{from:r,to:e}:{from:e,to:r}:a?Ve(e,a)?{from:e,to:a}:{from:a,to:e}:{from:e,to:void 0}}var De=D.createContext(void 0);function ha(e){if(!J(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return u.jsx(De.Provider,{value:t,children:e.children})}return u.jsx(ma,{initialProps:e.initialProps,children:e.children})}function ma(e){var t=e.initialProps,n=e.children,a=t.selected,r=a||{},o=r.from,i=r.to,s=t.min,c=t.max,d=function(m,y,x){var p,N;(p=t.onDayClick)===null||p===void 0||p.call(t,m,y,x);var k=fa(m,a);(N=t.onSelect)===null||N===void 0||N.call(t,k,m,y,x)},l={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(l.range_start=[o],i?(l.range_end=[i],P(o,i)||(l.range_middle=[{after:o,before:i}])):l.range_end=[o]):i&&(l.range_start=[i],l.range_end=[i]),s&&(o&&!i&&l.disabled.push({after:ue(o,s-1),before:C(o,s-1)}),o&&i&&l.disabled.push({after:o,before:C(o,s-1)}),!o&&i&&l.disabled.push({after:ue(i,s-1),before:C(i,s-1)})),c){if(o&&!i&&(l.disabled.push({before:C(o,-c+1)}),l.disabled.push({after:C(o,c-1)})),o&&i){var f=T(i,o)+1,h=c-f;l.disabled.push({before:ue(o,h)}),l.disabled.push({after:C(i,h)})}!o&&i&&(l.disabled.push({before:C(i,-c+1)}),l.disabled.push({after:C(i,c-1)}))}return u.jsx(De.Provider,{value:{selected:a,onDayClick:d,modifiers:l},children:n})}function Me(){var e=D.useContext(De);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function $(e){return Array.isArray(e)?Ge([],e):e!==void 0?[e]:[]}function va(e){var t={};return Object.entries(e).forEach(function(n){var a=n[0],r=n[1];t[a]=$(r)}),t}var W;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(W||(W={}));var ya=W.Selected,F=W.Disabled,ga=W.Hidden,ba=W.Today,ce=W.RangeEnd,de=W.RangeMiddle,fe=W.RangeStart,pa=W.Outside;function wa(e,t,n){var a,r=(a={},a[ya]=$(e.selected),a[F]=$(e.disabled),a[ga]=$(e.hidden),a[ba]=[e.today],a[ce]=[],a[de]=[],a[fe]=[],a[pa]=[],a);return e.fromDate&&r[F].push({before:e.fromDate}),e.toDate&&r[F].push({after:e.toDate}),U(e)?r[F]=r[F].concat(t.modifiers[F]):J(e)&&(r[F]=r[F].concat(n.modifiers[F]),r[fe]=n.modifiers[fe],r[de]=n.modifiers[de],r[ce]=n.modifiers[ce]),r}var $e=D.createContext(void 0);function xa(e){var t=M(),n=_e(),a=Me(),r=wa(t,n,a),o=va(t.modifiers),i=g(g({},r),o);return u.jsx($e.Provider,{value:i,children:e.children})}function Ze(){var e=D.useContext($e);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function _a(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Da(e){return!!(e&&typeof e=="object"&&"from"in e)}function Ma(e){return!!(e&&typeof e=="object"&&"after"in e)}function ka(e){return!!(e&&typeof e=="object"&&"before"in e)}function Na(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Ca(e,t){var n,a=t.from,r=t.to;if(a&&r){var o=T(r,a)<0;o&&(n=[r,a],a=n[0],r=n[1]);var i=T(e,a)>=0&&T(r,e)>=0;return i}return r?P(r,e):a?P(a,e):!1}function Pa(e){return ge(e)}function Oa(e){return Array.isArray(e)&&e.every(ge)}function Sa(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(Pa(n))return P(e,n);if(Oa(n))return n.includes(e);if(Da(n))return Ca(e,n);if(Na(n))return n.dayOfWeek.includes(e.getDay());if(_a(n)){var a=T(n.before,e),r=T(n.after,e),o=a>0,i=r<0,s=ve(n.before,n.after);return s?i&&o:o||i}return Ma(n)?T(e,n.after)>0:ka(n)?T(n.before,e)>0:typeof n=="function"?n(e):!1})}function ke(e,t,n){var a=Object.keys(t).reduce(function(o,i){var s=t[i];return Sa(e,s)&&o.push(i),o},[]),r={};return a.forEach(function(o){return r[o]=!0}),n&&!we(e,n)&&(r.outside=!0),r}function ja(e,t){for(var n=O(e[0]),a=be(e[e.length-1]),r,o,i=n;i<=a;){var s=ke(i,t),c=!s.disabled&&!s.hidden;if(!c){i=C(i,1);continue}if(s.selected)return i;s.today&&!o&&(o=i),r||(r=i),i=C(i,1)}return o||r}var Wa=365;function et(e,t){var n=t.moveBy,a=t.direction,r=t.context,o=t.modifiers,i=t.retry,s=i===void 0?{count:0,lastFocused:e}:i,c=r.weekStartsOn,d=r.fromDate,l=r.toDate,f=r.locale,h={day:C,week:me,month:j,year:pt,startOfWeek:function(p){return r.ISOWeek?I(p):Y(p,{locale:f,weekStartsOn:c})},endOfWeek:function(p){return r.ISOWeek?Be(p):pe(p,{locale:f,weekStartsOn:c})}},m=h[n](e,a==="after"?1:-1);a==="before"&&d?m=wt([d,m]):a==="after"&&l&&(m=xt([l,m]));var y=!0;if(o){var x=ke(m,o);y=!x.disabled&&!x.hidden}return y?m:s.count>Wa?s.lastFocused:et(m,{moveBy:n,direction:a,context:r,modifiers:o,retry:g(g({},s),{count:s.count+1})})}var tt=D.createContext(void 0);function Ta(e){var t=K(),n=Ze(),a=D.useState(),r=a[0],o=a[1],i=D.useState(),s=i[0],c=i[1],d=ja(t.displayMonths,n),l=r??(s&&t.isDateDisplayed(s))?s:d,f=function(){c(r),o(void 0)},h=function(p){o(p)},m=M(),y=function(p,N){if(r){var k=et(r,{moveBy:p,direction:N,context:m,modifiers:n});P(r,k)||(t.goToDate(k,r),h(k))}},x={focusedDay:r,focusTarget:l,blur:f,focus:h,focusDayAfter:function(){return y("day","after")},focusDayBefore:function(){return y("day","before")},focusWeekAfter:function(){return y("week","after")},focusWeekBefore:function(){return y("week","before")},focusMonthBefore:function(){return y("month","before")},focusMonthAfter:function(){return y("month","after")},focusYearBefore:function(){return y("year","before")},focusYearAfter:function(){return y("year","after")},focusStartOfWeek:function(){return y("startOfWeek","before")},focusEndOfWeek:function(){return y("endOfWeek","after")}};return u.jsx(tt.Provider,{value:x,children:e.children})}function Ne(){var e=D.useContext(tt);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function Ya(e,t){var n=Ze(),a=ke(e,n,t);return a}var Ce=D.createContext(void 0);function Fa(e){if(!te(e.initialProps)){var t={selected:void 0};return u.jsx(Ce.Provider,{value:t,children:e.children})}return u.jsx(Ea,{initialProps:e.initialProps,children:e.children})}function Ea(e){var t=e.initialProps,n=e.children,a=function(o,i,s){var c,d,l;if((c=t.onDayClick)===null||c===void 0||c.call(t,o,i,s),i.selected&&!t.required){(d=t.onSelect)===null||d===void 0||d.call(t,void 0,o,i,s);return}(l=t.onSelect)===null||l===void 0||l.call(t,o,o,i,s)},r={selected:t.selected,onDayClick:a};return u.jsx(Ce.Provider,{value:r,children:n})}function nt(){var e=D.useContext(Ce);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function La(e,t){var n=M(),a=nt(),r=_e(),o=Me(),i=Ne(),s=i.focusDayAfter,c=i.focusDayBefore,d=i.focusWeekAfter,l=i.focusWeekBefore,f=i.blur,h=i.focus,m=i.focusMonthBefore,y=i.focusMonthAfter,x=i.focusYearBefore,p=i.focusYearAfter,N=i.focusStartOfWeek,k=i.focusEndOfWeek,q=function(b){var v,re,oe,ie;te(n)?(v=a.onDayClick)===null||v===void 0||v.call(a,e,t,b):U(n)?(re=r.onDayClick)===null||re===void 0||re.call(r,e,t,b):J(n)?(oe=o.onDayClick)===null||oe===void 0||oe.call(o,e,t,b):(ie=n.onDayClick)===null||ie===void 0||ie.call(n,e,t,b)},ne=function(b){var v;h(e),(v=n.onDayFocus)===null||v===void 0||v.call(n,e,t,b)},ae=function(b){var v;f(),(v=n.onDayBlur)===null||v===void 0||v.call(n,e,t,b)},Q=function(b){var v;(v=n.onDayMouseEnter)===null||v===void 0||v.call(n,e,t,b)},at=function(b){var v;(v=n.onDayMouseLeave)===null||v===void 0||v.call(n,e,t,b)},rt=function(b){var v;(v=n.onDayPointerEnter)===null||v===void 0||v.call(n,e,t,b)},ot=function(b){var v;(v=n.onDayPointerLeave)===null||v===void 0||v.call(n,e,t,b)},it=function(b){var v;(v=n.onDayTouchCancel)===null||v===void 0||v.call(n,e,t,b)},st=function(b){var v;(v=n.onDayTouchEnd)===null||v===void 0||v.call(n,e,t,b)},ut=function(b){var v;(v=n.onDayTouchMove)===null||v===void 0||v.call(n,e,t,b)},lt=function(b){var v;(v=n.onDayTouchStart)===null||v===void 0||v.call(n,e,t,b)},ct=function(b){var v;(v=n.onDayKeyUp)===null||v===void 0||v.call(n,e,t,b)},dt=function(b){var v;switch(b.key){case"ArrowLeft":b.preventDefault(),b.stopPropagation(),n.dir==="rtl"?s():c();break;case"ArrowRight":b.preventDefault(),b.stopPropagation(),n.dir==="rtl"?c():s();break;case"ArrowDown":b.preventDefault(),b.stopPropagation(),d();break;case"ArrowUp":b.preventDefault(),b.stopPropagation(),l();break;case"PageUp":b.preventDefault(),b.stopPropagation(),b.shiftKey?x():m();break;case"PageDown":b.preventDefault(),b.stopPropagation(),b.shiftKey?p():y();break;case"Home":b.preventDefault(),b.stopPropagation(),N();break;case"End":b.preventDefault(),b.stopPropagation(),k();break}(v=n.onDayKeyDown)===null||v===void 0||v.call(n,e,t,b)},ft={onClick:q,onFocus:ne,onBlur:ae,onKeyDown:dt,onKeyUp:ct,onMouseEnter:Q,onMouseLeave:at,onPointerEnter:rt,onPointerLeave:ot,onTouchCancel:it,onTouchEnd:st,onTouchMove:ut,onTouchStart:lt};return ft}function Ia(){var e=M(),t=nt(),n=_e(),a=Me(),r=te(e)?t.selected:U(e)?n.selected:J(e)?a.selected:void 0;return r}function Ra(e){return Object.values(W).includes(e)}function Ba(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(a){var r=e.modifiersClassNames[a];if(r)n.push(r);else if(Ra(a)){var o=e.classNames["day_".concat(a)];o&&n.push(o)}}),n}function Ha(e,t){var n=g({},e.styles.day);return Object.keys(t).forEach(function(a){var r;n=g(g({},n),(r=e.modifiersStyles)===null||r===void 0?void 0:r[a])}),n}function Aa(e,t,n){var a,r,o,i=M(),s=Ne(),c=Ya(e,t),d=La(e,c),l=Ia(),f=!!(i.onDayClick||i.mode!=="default");D.useEffect(function(){var Q;c.outside||s.focusedDay&&f&&P(s.focusedDay,e)&&((Q=n.current)===null||Q===void 0||Q.focus())},[s.focusedDay,e,n,f,c.outside]);var h=Ba(i,c).join(" "),m=Ha(i,c),y=!!(c.outside&&!i.showOutsideDays||c.hidden),x=(o=(r=i.components)===null||r===void 0?void 0:r.DayContent)!==null&&o!==void 0?o:la,p=u.jsx(x,{date:e,displayMonth:t,activeModifiers:c}),N={style:m,className:h,children:p,role:"gridcell"},k=s.focusTarget&&P(s.focusTarget,e)&&!c.outside,q=s.focusedDay&&P(s.focusedDay,e),ne=g(g(g({},N),(a={disabled:c.disabled,role:"gridcell"},a["aria-selected"]=c.selected,a.tabIndex=q||k?0:-1,a)),d),ae={isButton:f,isHidden:y,activeModifiers:c,selectedDays:l,buttonProps:ne,divProps:N};return ae}function qa(e){var t=D.useRef(null),n=Aa(e.date,e.displayMonth,t);return n.isHidden?u.jsx("div",{role:"gridcell"}):n.isButton?u.jsx(ee,g({name:"day",ref:t},n.buttonProps)):u.jsx("div",g({},n.divProps))}function Qa(e){var t=e.number,n=e.dates,a=M(),r=a.onWeekNumberClick,o=a.styles,i=a.classNames,s=a.locale,c=a.labels.labelWeekNumber,d=a.formatters.formatWeekNumber,l=d(Number(t),{locale:s});if(!r)return u.jsx("span",{className:i.weeknumber,style:o.weeknumber,children:l});var f=c(Number(t),{locale:s}),h=function(m){r(t,n,m)};return u.jsx(ee,{name:"week-number","aria-label":f,className:i.weeknumber,style:o.weeknumber,onClick:h,children:l})}function Xa(e){var t,n,a=M(),r=a.styles,o=a.classNames,i=a.showWeekNumber,s=a.components,c=(t=s?.Day)!==null&&t!==void 0?t:qa,d=(n=s?.WeekNumber)!==null&&n!==void 0?n:Qa,l;return i&&(l=u.jsx("td",{className:o.cell,style:r.cell,children:u.jsx(d,{number:e.weekNumber,dates:e.dates})})),u.jsxs("tr",{className:o.row,style:r.row,children:[l,e.dates.map(function(f){return u.jsx("td",{className:o.cell,style:r.cell,role:"presentation",children:u.jsx(c,{displayMonth:e.displayMonth,date:f})},xn(f))})]})}function Ee(e,t,n){for(var a=n?.ISOWeek?Be(t):pe(t,n),r=n?.ISOWeek?I(e):Y(e,n),o=T(a,r),i=[],s=0;s<=o;s++)i.push(C(r,s));var c=i.reduce(function(d,l){var f=n?.ISOWeek?Ae(l):Qe(l,n),h=d.find(function(m){return m.weekNumber===f});return h?(h.dates.push(l),d):(d.push({weekNumber:f,dates:[l]}),d)},[]);return c}function Va(e,t){var n=Ee(O(e),be(e),t);if(t?.useFixedWeeks){var a=Dn(e,t);if(a<6){var r=n[n.length-1],o=r.dates[r.dates.length-1],i=me(o,6-a),s=Ee(me(o,1),i,t);n.push.apply(n,s)}}return n}function Ga(e){var t,n,a,r=M(),o=r.locale,i=r.classNames,s=r.styles,c=r.hideHead,d=r.fixedWeeks,l=r.components,f=r.weekStartsOn,h=r.firstWeekContainsDate,m=r.ISOWeek,y=Va(e.displayMonth,{useFixedWeeks:!!d,ISOWeek:m,locale:o,weekStartsOn:f,firstWeekContainsDate:h}),x=(t=l?.Head)!==null&&t!==void 0?t:ua,p=(n=l?.Row)!==null&&n!==void 0?n:Xa,N=(a=l?.Footer)!==null&&a!==void 0?a:oa;return u.jsxs("table",{id:e.id,className:i.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&u.jsx(x,{}),u.jsx("tbody",{className:i.tbody,style:s.tbody,children:y.map(function(k){return u.jsx(p,{displayMonth:e.displayMonth,dates:k.dates,weekNumber:k.weekNumber},k.weekNumber)})}),u.jsx(N,{displayMonth:e.displayMonth})]})}function za(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Ua=za()?D.useLayoutEffect:D.useEffect,he=!1,Ja=0;function Le(){return"react-day-picker-".concat(++Ja)}function Ka(e){var t,n=e??(he?Le():null),a=D.useState(n),r=a[0],o=a[1];return Ua(function(){r===null&&o(Le())},[]),D.useEffect(function(){he===!1&&(he=!0)},[]),(t=e??r)!==null&&t!==void 0?t:void 0}function $a(e){var t,n,a=M(),r=a.dir,o=a.classNames,i=a.styles,s=a.components,c=K().displayMonths,d=Ka(a.id?"".concat(a.id,"-").concat(e.displayIndex):void 0),l=a.id?"".concat(a.id,"-grid-").concat(e.displayIndex):void 0,f=[o.month],h=i.month,m=e.displayIndex===0,y=e.displayIndex===c.length-1,x=!m&&!y;r==="rtl"&&(t=[m,y],y=t[0],m=t[1]),m&&(f.push(o.caption_start),h=g(g({},h),i.caption_start)),y&&(f.push(o.caption_end),h=g(g({},h),i.caption_end)),x&&(f.push(o.caption_between),h=g(g({},h),i.caption_between));var p=(n=s?.Caption)!==null&&n!==void 0?n:ra;return u.jsxs("div",{className:f.join(" "),style:h,children:[u.jsx(p,{id:d,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),u.jsx(Ga,{id:l,"aria-labelledby":d,displayMonth:e.displayMonth})]},e.displayIndex)}function Za(e){var t=M(),n=t.classNames,a=t.styles;return u.jsx("div",{className:n.months,style:a.months,children:e.children})}function er(e){var t,n,a=e.initialProps,r=M(),o=Ne(),i=K(),s=D.useState(!1),c=s[0],d=s[1];D.useEffect(function(){r.initialFocus&&o.focusTarget&&(c||(o.focus(o.focusTarget),d(!0)))},[r.initialFocus,c,o.focus,o.focusTarget,o]);var l=[r.classNames.root,r.className];r.numberOfMonths>1&&l.push(r.classNames.multiple_months),r.showWeekNumber&&l.push(r.classNames.with_weeknumber);var f=g(g({},r.styles.root),r.style),h=Object.keys(a).filter(function(y){return y.startsWith("data-")}).reduce(function(y,x){var p;return g(g({},y),(p={},p[x]=a[x],p))},{}),m=(n=(t=a.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:Za;return u.jsx("div",g({className:l.join(" "),style:f,dir:r.dir,id:r.id,nonce:a.nonce,title:a.title,lang:a.lang},h,{children:u.jsx(m,{children:i.displayMonths.map(function(y,x){return u.jsx($a,{displayIndex:x,displayMonth:y},x)})})}))}function tr(e){var t=e.children,n=kn(e,["children"]);return u.jsx(Qn,{initialProps:n,children:u.jsx(ea,{children:u.jsx(Fa,{initialProps:n,children:u.jsx(ca,{initialProps:n,children:u.jsx(ha,{initialProps:n,children:u.jsx(xa,{children:u.jsx(Ta,{children:t})})})})})})})}function nr(e){return u.jsx(tr,g({},e,{children:u.jsx(er,{initialProps:e})}))}function ur(e){const t=ht.c(20);let n,a,r,o;t[0]!==e?({className:n,classNames:a,showOutsideDays:o,...r}=e,t[0]=e,t[1]=n,t[2]=a,t[3]=r,t[4]=o):(n=t[1],a=t[2],r=t[3],o=t[4]);const i=o===void 0?!0:o;let s;t[5]!==n?(s=H("p-3",n),t[5]=n,t[6]=s):s=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=H(Pe({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),t[7]=c):c=t[7];const d=r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md";let l;t[8]!==d?(l=H("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",d),t[8]=d,t[9]=l):l=t[9];let f;t[10]===Symbol.for("react.memo_cache_sentinel")?(f=H(Pe({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),t[10]=f):f=t[10];let h;t[11]!==a||t[12]!==l?(h={months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:c,nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:l,day:f,day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...a},t[11]=a,t[12]=l,t[13]=h):h=t[13];let m;t[14]===Symbol.for("react.memo_cache_sentinel")?(m={IconLeft:rr,IconRight:ar},t[14]=m):m=t[14];let y;return t[15]!==r||t[16]!==i||t[17]!==s||t[18]!==h?(y=u.jsx(nr,{showOutsideDays:i,className:s,classNames:h,components:m,...r}),t[15]=r,t[16]=i,t[17]=s,t[18]=h,t[19]=y):y=t[19],y}function ar(e){const{className:t,...n}=e;return u.jsx(vt,{className:H("size-4",t),...n})}function rr(e){const{className:t,...n}=e;return u.jsx(mt,{className:H("size-4",t),...n})}export{ur as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as Ke,U as te,e as C,j as t,E as Te,r as w,q as le,G as Ge,c as J,bg as Qe,l as ie,d as Ye,M as G,B as W,o as Xe,g as ae,bh as ke}from"./index-0jxZXjT_.js";import{E as Pe}from"./empty-state-Cv3pDKB-.js";import{u as Ze,a as Ee}from"./use-collections-DPnWGTP7.js";import{u as ce}from"./constants-bvvELg6A.js";import{F as se,a as et,b as de,d as me}from"./form-BFCHHJw7.js";import{I as ue}from"./input-BJ1rHrAh.js";import{T as re}from"./textarea-SDIeylNJ.js";import{a as tt,b as st,V as pe}from"./layout-BObWYQOR.js";import{S as ot,W as nt,a as rt}from"./index-NkmnXqLU.js";import{g as lt,M as it,b as je}from"./types-B_duTJl-.js";import{A as at,a as ct,b as dt}from"./alert-CQF_YV7o.js";import{d as be,S as Ne,a as ve,b as Se,c as oe}from"./select-CvDnclqc.js";import{c as mt,b as ye,T as we,a as Ce}from"./tooltip-CeP603hH.js";import{i as ut}from"./AlertCircle-I5aAKx5s.js";import{R as pt,P as xt,a7 as ft,M as ht,a8 as gt,E as Ie}from"./agent-icon-BJOP--6N.js";import{a as jt}from"./Eye-FA0T_9KR.js";import{i as bt}from"./Play-P4fR-0E_.js";import{i as Nt}from"./ChevronRight-AaMPC6ii.js";import{O as vt,M as St}from"./index-C8tR8eRp.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./tools-list-CqDkzdE6.js";import{a as Re,u as _e}from"./use-connection-CzM_WXMN.js";import{b as It}from"./use-mcp-tools-YMWJX9tN.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as $e}from"./integration-icon-B34NO5DZ.js";import{f as Tt,i as kt}from"./chat-context-xK_w16Am.js";import{u as Pt}from"./shell-layout-0JObD2s1.js";import{M as Et}from"./monaco-editor-D4JSTdws.js";import{E as Rt}from"./empty-state-Cs0Tx7DE.js";import{n as _t}from"./Container-Bjo8FVL5.js";import"./label-Ces90Ob6.js";import"./index-B0yf3v8e.js";import"./sidebar-DxS-nB9C.js";import"./sheet-ChXXkoux.js";import"./X-BwvdKywg.js";import"./index-Dh31lfjw.js";import"./collections-D3-t_Oif.js";import"./index-BpHDMydO.js";import"./use-virtual-mcp-DflWVTuF.js";import"./accordion-BVwnr-Ph.js";import"./scroll-area-43OyCToQ.js";import"./badge-DKUnZ67J.js";import"./spinner-Cecl_L8X.js";import"./view-mode-toggle-DI_qGqci.js";import"./dialog-Br598C89.js";import"./index-D-h2wBuz.js";import"./hover-card-CW2-sshf.js";import"./dropdown-menu-39FgxtLo.js";import"./Check-5-utiman.js";import"./DotsVertical-kyMVsMi3.js";import"./Plus-WVvC1Th4.js";import"./Tool01-DBZmckgJ.js";import"./XClose-CeXjq2Ks.js";import"./index-XCMOYuFO.js";import"./create-sse-subscription-BS5983N4.js";import"./ChevronDown-BRUPOd-D.js";import"./ChevronUp-B3N7TOrA.js";import"./SwitchHorizontal01-D6GIRPJ1.js";import"./RefreshCcw01-Dg7_NhVx.js";import"./XCircle-BVR438yI.js";import"./ArrowUpRight-DUqwCMWv.js";import"./ZapSquare-B2q8WEX1.js";import"./Users03-a4EwkzcR.js";import"./CheckCircle-CA1UzIEX.js";import"./Globe01-BdrXaQ4t.js";import"./FilterLines-Dx0-KOH1.js";import"./ZoomOut-DnoKIS59.js";import"./Star01-DQCFITlh.js";import"./Palette-DW_AOTeX.js";import"./HardDrive-uqc3Mfxn.js";import"./Stars02-CnxGzx_a.js";import"./Key01-4CEC30CH.js";import"./LinkExternal01-sg0X3i7p.js";import"./Monitor01-CTE-M7aU.js";import"./Sun-CvvLh7O4.js";import"./SearchMd-cBVn0Mcd.js";import"./Settings02-J55NFzUl.js";import"./Shield01-CITJSPye.js";import"./Stars01-BQqwEiIH.js";import"./Trash01-BMiuF02D.js";import"./Upload01-DhlN2oeP.js";import"./User01-D0BthoTv.js";import"./Users01-B6kJjdmQ.js";import"./Zap-Cbw9kHWr.js";import"./extract-connection-data-DRKXxZ8i.js";import"./generate-id-BoTFc93G.js";import"./use-registry-connections-Bxq_77g6.js";import"./use-organization-settings-CQEWT13Z.js";import"./index-Dlj9BqPT.js";import"./popover-CvKJiX83.js";import"./use-create-virtual-mcp-CwM2ND5a.js";import"./use-navigate-to-agent-DbTKvOZS.js";import"./tab-id-B2HRXc_q.js";import"./decopilot-sse-pool-DZUcRlvx.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-ai-providers-BVFxEa9L.js";import"./avatar-DRLQAp0U.js";import"./required-auth-layout-Bsfg7CLj.js";import"./useRouterState-Br8Ksrwr.js";import"./use-org-sso-KYe6rDaT.js";Ke({title:te().min(1),description:te().nullable(),body:te()});function ne(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function At(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Ot(s){const e=C.c(13),{form:n}=s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=o):o=e[0];let r;e[1]!==n.control?(r=t.jsxs("div",{className:"flex flex-col gap-4",children:[o,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(se,{control:n.control,name:"title",render:Ut}),t.jsx(se,{control:n.control,name:"description",render:Dt})]})]}),e[1]=n.control,e[2]=r):r=e[2];let l,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=l,e[4]=a):(l=e[3],a=e[4]);let c;e[5]!==n.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[l,a,t.jsx(se,{control:n.control,name:"body",render:Mt})]}),e[5]=n.control,e[6]=c):c=e[6];let i;e[7]!==r||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[r,c]}),e[7]=r,e[8]=c,e[9]=i):i=e[9];let p;return e[10]!==n||e[11]!==i?(p=t.jsx(et,{...n,children:i}),e[10]=n,e[11]=i,e[12]=p):p=e[12],p}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Ut(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const e=C.c(36),{providerId:n,promptId:o}=s,{org:r}=le(),l=n||null;let a;e[0]!==r.id||e[1]!==r.slug||e[2]!==l?(a={connectionId:l,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=l,e[3]=a):a=e[3];const c=ce(a),i=Ze(n,"PROMPT",o,c),p=Ee(n,"PROMPT",c),f=p.update.isPending;let u;e[4]!==i?(u=i?{title:i.title,description:i.description??null,body:ne(i)}:void 0,e[4]=i,e[5]=u):u=e[5];let h;e[6]!==u?(h={values:u},e[6]=u,e[7]=h):h=e[7];const N=Ge(h);let T;e[8]!==N||e[9]!==i?(T=()=>{i&&N.reset({title:i.title,description:i.description??null,body:ne(i)})},e[8]=N,e[9]=i,e[10]=T):T=e[10];const R=T;let _;e[11]!==p.update||e[12]!==N||e[13]!==o?(_=N.handleSubmit(async j=>{const P=await p.update.mutateAsync({id:o,data:{title:j.title,description:j.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:j.body}}]}});N.reset({title:P.title,description:P.description??null,body:ne(P)})}),e[11]=p.update,e[12]=N,e[13]=o,e[14]=_):_=e[14];const A=_;if(!i){let j;return e[15]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=j):j=e[15],j}let y;e[16]!==i.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=y):y=e[17];let k;e[18]!==i.description?(k=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=k):k=e[19];let I;e[20]!==y||e[21]!==k?(I=t.jsx(st,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,k]})}),e[20]=y,e[21]=k,e[22]=I):I=e[22];let g;e[23]!==A?(g=()=>{A()},e[23]=A,e[24]=g):g=e[24];let v;e[25]!==N.formState.isDirty||e[26]!==f||e[27]!==R||e[28]!==g?(v=t.jsx(tt,{children:t.jsx(ot,{onSave:g,onUndo:R,isDirty:N.formState.isDirty,isSaving:f})}),e[25]=N.formState.isDirty,e[26]=f,e[27]=R,e[28]=g,e[29]=v):v=e[29];let S;e[30]!==N?(S=t.jsx("div",{className:"h-full",children:t.jsx(Ot,{form:N})}),e[30]=N,e[31]=S):S=e[31];let $;return e[32]!==v||e[33]!==S||e[34]!==I?($=t.jsxs(pe,{children:[I,v,S]}),e[32]=v,e[33]=S,e[34]=I,e[35]=$):$=e[35],$}function Bt(s){const e=C.c(4),{itemId:n}=s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=At(),e[0]=o):o=e[0];const r=o;if(!r){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let l;return e[2]!==n?(l=t.jsx(Te,{children:t.jsx(w.Suspense,{fallback:null,children:t.jsx(zt,{providerId:r,promptId:n})})}),e[2]=n,e[3]=l):l=e[3],l}function Ae(s){const e=C.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let r;e[3]!==n?(r=J("min-w-0 overflow-hidden",n),e[3]=n,e[4]=r):r=e[4];let l;return e[5]!==o||e[6]!==r?(l=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:r,...o}),e[5]=o,e[6]=r,e[7]=l):l=e[7],l}function Oe(s){const e=C.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let r;e[3]!==n?(r=J("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=r):r=e[4];let l;return e[5]!==o||e[6]!==r?(l=t.jsx("ol",{"data-slot":"breadcrumb-list",className:r,...o}),e[5]=o,e[6]=r,e[7]=l):l=e[7],l}function V(s){const e=C.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let r;e[3]!==n?(r=J("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=r):r=e[4];let l;return e[5]!==o||e[6]!==r?(l=t.jsx("li",{"data-slot":"breadcrumb-item",className:r,...o}),e[5]=o,e[6]=r,e[7]=l):l=e[7],l}function Q(s){const e=C.c(10);let n,o,r;e[0]!==s?({asChild:n,className:o,...r}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=r):(n=e[1],o=e[2],r=e[3]);const l=n?Qe:"a";let a;e[4]!==o?(a=J("hover:text-foreground transition-colors truncate",o),e[4]=o,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==r||e[8]!==a?(c=t.jsx(l,{"data-slot":"breadcrumb-link",className:a,...r}),e[6]=l,e[7]=r,e[8]=a,e[9]=c):c=e[9],c}function Me(s){const e=C.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let r;e[3]!==n?(r=J("text-foreground font-medium truncate",n),e[3]=n,e[4]=r):r=e[4];let l;return e[5]!==o||e[6]!==r?(l=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:r,...o}),e[5]=o,e[6]=r,e[7]=l):l=e[7],l}function Y(s){const e=C.c(12);let n,o,r;e[0]!==s?({children:n,className:o,...r}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=r):(n=e[1],o=e[2],r=e[3]);let l;e[4]!==o?(l=J("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",o),e[4]=o,e[5]=l):l=e[5];let a;e[6]!==n?(a=n??t.jsx(Nt,{}),e[6]=n,e[7]=a):a=e[7];let c;return e[8]!==r||e[9]!==l||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...r,children:a}),e[8]=r,e[9]=l,e[10]=a,e[11]=c):c=e[11],c}const Lt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=C.c(11),{toolName:n,connectionId:o,siblings:r,onSelectInstance:l,onBack:a}=s;let c;e[0]!==o?(c={connectionId:o},e[0]=o,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let u;return e[2]!==i.supportsOAuth||e[3]!==a?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(vt,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(St,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=u):u=e[4],u}const p=`${o}:${n}`;let f;return e[5]!==o||e[6]!==l||e[7]!==r||e[8]!==p||e[9]!==n?(f=t.jsx(Vt,{toolName:n,connectionId:o,siblings:r,onSelectInstance:l},p),e[5]=o,e[6]=l,e[7]=r,e[8]=p,e[9]=n,e[10]=f):f=e[10],f}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:o}){const{replayId:r}=Ye({strict:!1}),l=(()=>{if(!r)return null;const d=`replay-${r}`,m=sessionStorage.getItem(d);if(!m)return null;sessionStorage.removeItem(d);try{return JSON.parse(m)}catch{return null}})(),a=(()=>{if(!l)return null;const d={};for(const[m,b]of Object.entries(l))b!==null&&typeof b=="object"?d[m]=JSON.stringify(b,null,2):d[m]=b;return d})(),[c,i]=w.useState(a??{}),[p,f]=w.useState(l?JSON.stringify(l,null,2):"{}"),[u,h]=w.useState(null),[N,T]=w.useState(null),[R,_]=w.useState(null),[A,y]=w.useState(null),[k,I]=w.useState(!1),[g,v]=w.useState(null),{org:S}=le(),$=Re(e),j=Tt(),P=kt(),{setChatOpen:z}=Pt(),D=`${e}:${s}`,O=ce({connectionId:e,orgId:S.id,orgSlug:S.slug}),U=It({client:O}),x=U.data?.tools?.find(d=>d.name===s),E=lt(x?._meta),B=d=>{if(!j)return;const m=$t(d.content);m.content.length>0&&(z(!0),j.sendMessage({tiptapDoc:m}))},[M,X]=w.useState("json"),[De,Ue]=w.useState(!1);E&&!De&&(X("ui"),Ue(!0));const xe=x?.inputSchema?.properties,fe=xe?Object.keys(xe):[],q=fe.length>0,H={};if(q&&x?.inputSchema?.properties)for(const d of fe)H[d]=x.inputSchema.required?.includes(d)?"":void 0;const Z=d=>Object.prototype.hasOwnProperty.call(c,d),ze=async()=>{I(!0),y(null),h(null),T(null),_(null),v(null);const d=performance.now();try{if(!O)throw new Error("MCP client is not available");const m=q?{...H,...c}:(()=>{const L=p.trim();if(!L)return{};const F=JSON.parse(L);if(F&&typeof F=="object")return F;throw new Error("Raw JSON input must be an object.")})();q&&x?.inputSchema?.properties&&Object.entries(x.inputSchema.properties).forEach(([L,F])=>{if((F.type==="object"||F.type==="array")&&typeof m[L]=="string")try{m[L]=JSON.parse(m[L])}catch{}});const b=await O.callTool({name:s,arguments:m}),K=b.structuredContent??b,qe=performance.now(),We=Math.round(qe-d);h(K),T(b),_(m);const He=JSON.stringify(K),ge=new TextEncoder().encode(He).length;v({duration:`${We}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(m){const b=m instanceof Error?m.message:String(m);y(b||"Unknown error occurred");const K=performance.now();v({duration:`${Math.round(K-d)}ms`})}finally{I(!1)}},ee=(d,m)=>{i(b=>({...b,[d]:m}))},Be=()=>{h(null),T(null),_(null),y(null),v(null)},Le=x?.name??Lt(s),Fe=t.jsx(Ae,{children:t.jsxs(Oe,{children:[t.jsx(V,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:S.slug},children:"Connections"})})}),t.jsx(Y,{}),$&&t.jsxs(t.Fragment,{children:[t.jsx(V,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:S.slug,appSlug:yt($)},search:{tab:"tools"},children:$.title})})}),t.jsx(Y,{})]}),t.jsx(V,{children:t.jsx(Me,{children:Le})})]})}),he=n.length>1&&t.jsxs(be,{value:e,onValueChange:o,children:[t.jsx(Ne,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ve,{})}),t.jsx(Se,{children:n.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx($e,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Ve=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),x?.inputSchema?.required&&x.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:q&&x?.inputSchema?.properties?Object.entries(x.inputSchema.properties).map(([d,m])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,x.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:m.type})]}),m.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:m.description}),m.type==="object"||m.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:Z(d)?c[d]??"":H[d]??"",onChange:b=>ee(d,b.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):m.type==="boolean"?t.jsxs(be,{value:Z(d)?String(c[d]??""):"",onValueChange:b=>ee(d,b==="true"),children:[t.jsx(Ne,{children:t.jsx(ve,{placeholder:"Select true or false..."})}),t.jsxs(Se,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:Z(d)?c[d]??"":H[d]??"",onChange:b=>ee(d,b.target.value),placeholder:`Enter ${d}...`})]},d)):x?.inputSchema&&!q?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:p,onChange:d=>f(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:k?t.jsxs(W,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(pt,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(W,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:ze,children:[t.jsx(bt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),Je=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[g&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.duration})]}),g.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ft,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.tokens})]}),g.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ht,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.bytes})]}),g.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:g.cost})})]}),E&&t.jsx(mt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(W,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(gt,{size:14})})}),t.jsx(Ce,{children:"Interactive view"})]}),t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(W,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(Ie,{size:14})})}),t.jsx(Ce,{children:"JSON view"})]})]})})]})]}),A&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(at,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ut,{className:"h-4 w-4"}),t.jsx(ct,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(dt,{className:"text-xs text-destructive",children:A})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:E&&M==="ui"&&O?t.jsx(w.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(it,{resourceURI:E,toolInfo:x?{tool:x}:void 0,toolInput:R??void 0,toolResult:N??void 0,displayMode:"fullscreen",minHeight:je.view.minHeight,maxHeight:je.view.maxHeight,client:O,onMessage:B,onUpdateModelContext:d=>P?.setAppContext(D,d),onTeardown:()=>P?.clearAppContext(D),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(Et,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(W,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),Xe.success("Copied to clipboard")},children:t.jsx(jt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(Ie,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(pe,{breadcrumb:Fe,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx($e,{icon:$?.icon||null,name:$?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[U.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):U.isLoading?t.jsx(ie,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:U.isSuccess?"ready":U.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:x?.annotations,_meta:x?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:x?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Ve}),Je]})})]})})}function Jt(s){const e=C.c(10),{itemId:n,siblings:o,onBack:r}=s,[l,a]=w.useState(o[0]?.id??"");let c;e[0]!==l||e[1]!==o?(c=o.find(h=>h.id===l)?.id??o[0]?.id??"",e[0]=l,e[1]=o,e[2]=c):c=e[2];const i=c;if(!Re(i||void 0)||!i){let h;return e[3]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=h):h=e[3],h}let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=f):f=e[4];let u;return e[5]!==i||e[6]!==r||e[7]!==o||e[8]!==n?(u=t.jsx(w.Suspense,{fallback:f,children:t.jsx(Ft,{toolName:n,connectionId:i,siblings:o,onSelectInstance:a,onBack:r})}),e[5]=i,e[6]=r,e[7]=o,e[8]=n,e[9]=u):u=e[9],u}const qt={workflow:rt,workflow_execution:nt,prompt:Bt};function Wt(){const s=C.c(9),e=ke();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=ae(n),r=decodeURIComponent(o.itemId);let l;s[1]!==o.appSlug?(l={slug:o.appSlug},s[1]=o.appSlug,s[2]=l):l=s[2];const a=_e(l);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,p=Ht;let f;return s[5]!==i||s[6]!==r||s[7]!==a?(f=t.jsx(Jt,{itemId:r,siblings:a,onBack:i,onUpdate:p}),s[5]=i,s[6]=r,s[7]=a,s[8]=f):f=s[8],f}async function Ht(s){return Promise.resolve()}function Kt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Gt(){const s=C.c(41),e=ke();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=ae(n),r=decodeURIComponent(o.collectionName),l=decodeURIComponent(o.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=le();let p;s[3]!==o.appSlug?(p={slug:o.appSlug},s[3]=o.appSlug,s[4]=p):p=s[4];const u=_e(p)[0]??null,h=u?.id??"",N=h||"no-connection",T=h??null;let R;s[5]!==i.id||s[6]!==i.slug||s[7]!==T?(R={connectionId:T,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=T,s[8]=R):R=s[8];const _=ce(R),A=Ee(N,r,_);let y;s[9]!==A||s[10]!==l?(y=async M=>{l&&await A.update.mutateAsync({id:l,data:M})},s[9]=A,s[10]=l,s[11]=y):y=s[11];const k=y;let I;s[12]!==r?(I=r?.toLowerCase(),s[12]=r,s[13]=I):I=s[13];const g=I,v=g&&qt[g];let S;s[14]!==r?(S=Kt(r),s[14]=r,s[15]=S):S=s[15];const $=S;let j;s[16]!==i.slug?(j=t.jsx(V,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=j):j=s[17];let P;s[18]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Y,{}),s[18]=P):P=s[18];let z;s[19]!==r||s[20]!==u||s[21]!==i.slug||s[22]!==o.appSlug?(z=u&&t.jsxs(t.Fragment,{children:[t.jsx(V,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:o.appSlug},search:{tab:r},children:u.title})})}),t.jsx(Y,{})]}),s[19]=r,s[20]=u,s[21]=i.slug,s[22]=o.appSlug,s[23]=z):z=s[23];let D;s[24]!==$?(D=t.jsx(V,{children:t.jsx(Me,{children:$})}),s[24]=$,s[25]=D):D=s[25];let O;s[26]!==z||s[27]!==D||s[28]!==j?(O=t.jsx(Ae,{children:t.jsxs(Oe,{children:[j,P,z,D]})}),s[26]=z,s[27]=D,s[28]=j,s[29]=O):O=s[29];const U=O;if(v){let M;return s[30]!==v||s[31]!==c||s[32]!==k||s[33]!==l?(M=t.jsx(v,{itemId:l,onBack:c,onUpdate:k}),s[30]=v,s[31]=c,s[32]=k,s[33]=l,s[34]=M):M=s[34],M}let x;s[35]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(_t,{size:36,className:"text-muted-foreground"}),s[35]=x):x=s[35];let E;s[36]!==c?(E=t.jsx(Rt,{icon:x,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=E):E=s[37];let B;return s[38]!==U||s[39]!==E?(B=t.jsx(pe,{breadcrumb:U,children:E}),s[38]=U,s[39]=E,s[40]=B):B=s[40],B}function Qt(){const s=C.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=ae(e);if(decodeURIComponent(n.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Wt,{}),s[1]=a):a=s[1],a}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Gt,{}),s[2]=l):l=s[2],l}function Jo(){const s=C.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Te,{children:t.jsx(w.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Qt,{})})}),s[0]=e):e=s[0],e}export{Jo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as ge,aI as Ie,b6 as Ae,U as ce,aG as $e,e as P,j as t,l as je,B as G,r as X,c as ve,q as J,s as De,K as ne,f as Y,w as de,u as Pe,b7 as Oe,E as Me,g as ze,F as Ve,G as Ee,H as Ue,J as Fe,b8 as Re,o as K,I as Le}from"./index-0jxZXjT_.js";import{g as He}from"./generate-id-BoTFc93G.js";import{E as be}from"./empty-state-Cv3pDKB-.js";import{E as Be,c as Ge,r as We,b as Xe,d as qe}from"./connection-form-helpers-I069qG8R.js";import{c as Qe,S as Ke}from"./index-C8tR8eRp.js";import{u as Ne,T as Je}from"./tools-list-CqDkzdE6.js";import{u as Ye}from"./use-members-CMjFtY8-.js";import{A as Ze}from"./avatar-DRLQAp0U.js";import{a as ye,b as _e,u as et}from"./use-connection-CzM_WXMN.js";import{u as re,S as tt}from"./constants-bvvELg6A.js";import{b as st}from"./use-mcp-tools-YMWJX9tN.js";import{g as ae,M as nt,a as ot}from"./types-B_duTJl-.js";import{a as it}from"./use-mcp-prompts-EWCIJOcj.js";import{I as oe}from"./integration-icon-B34NO5DZ.js";import{s as rt}from"./Plus-WVvC1Th4.js";import{a as Se}from"./Settings02-J55NFzUl.js";import{s as le}from"./Trash01-BMiuF02D.js";import{b as at,a as lt,d as ct,S as dt,c as mt}from"./sheet-ChXXkoux.js";import{F as R,b as L,c as H,d as V,f as B,e as ut,a as xt}from"./form-BFCHHJw7.js";import{I as W}from"./input-BJ1rHrAh.js";import{u as pt,D as ft}from"./use-delete-connection-0bGCksoc.js";import{V as ht}from"./layout-BObWYQOR.js";import{c as gt,C as jt,B as vt,a as bt,b as Nt,d as yt,e as _t}from"./monitoring-stats-row-Bi90V9hM.js";import{a as St}from"./use-virtual-mcp-DflWVTuF.js";import{i as Ce}from"./ChevronRight-AaMPC6ii.js";import{a as we}from"./Users03-a4EwkzcR.js";import{T as ee,a as Ct,b as te,c as wt}from"./tabs-CeDin4k7.js";import{g as ke}from"./connection-slug-eyAPH6o3.js";import{a as kt}from"./ZapSquare-B2q8WEX1.js";import{a6 as Tt,Q as It}from"./agent-icon-BJOP--6N.js";import{b as At}from"./Tool01-DBZmckgJ.js";import{C as $t}from"./collection-search-CBN_q_XM.js";import{C as Dt}from"./card-mrz_YqFP.js";import{B as Pt}from"./badge-DKUnZ67J.js";import{D as Ot,a as Mt,b as zt,c as me}from"./dropdown-menu-39FgxtLo.js";import{d as ue,S as xe,a as pe,b as fe,c as F}from"./select-CvDnclqc.js";import{i as Vt}from"./CheckCircle-CA1UzIEX.js";import{t as Et}from"./ChevronDown-BRUPOd-D.js";import{n as Ut}from"./Container-Bjo8FVL5.js";import{s as se}from"./Star01-DQCFITlh.js";import{s as Ft}from"./RefreshCcw01-Dg7_NhVx.js";import{s as Rt}from"./XClose-CeXjq2Ks.js";import"./collections-D3-t_Oif.js";import"./Key01-4CEC30CH.js";import"./index-Dh31lfjw.js";import"./index-BpHDMydO.js";import"./extract-connection-data-DRKXxZ8i.js";import"./use-registry-connections-Bxq_77g6.js";import"./use-organization-settings-CQEWT13Z.js";import"./index-Dlj9BqPT.js";import"./popover-CvKJiX83.js";import"./tooltip-CeP603hH.js";import"./Check-5-utiman.js";import"./SearchMd-cBVn0Mcd.js";import"./use-create-virtual-mcp-CwM2ND5a.js";import"./use-navigate-to-agent-DbTKvOZS.js";import"./Eye-FA0T_9KR.js";import"./use-org-auth-client-PFGUMv0N.js";import"./User01-D0BthoTv.js";import"./use-collections-DPnWGTP7.js";import"./X-BwvdKywg.js";import"./label-Ces90Ob6.js";import"./alert-dialog-Bvyir_5o.js";import"./index-B0yf3v8e.js";import"./sidebar-DxS-nB9C.js";import"./AlertCircle-I5aAKx5s.js";import"./SwitchHorizontal01-D6GIRPJ1.js";import"./XCircle-BVR438yI.js";import"./ArrowUpRight-DUqwCMWv.js";import"./ChevronUp-B3N7TOrA.js";import"./DotsVertical-kyMVsMi3.js";import"./Globe01-BdrXaQ4t.js";import"./FilterLines-Dx0-KOH1.js";import"./ZoomOut-DnoKIS59.js";import"./Palette-DW_AOTeX.js";import"./HardDrive-uqc3Mfxn.js";import"./Stars02-CnxGzx_a.js";import"./LinkExternal01-sg0X3i7p.js";import"./Monitor01-CTE-M7aU.js";import"./Sun-CvvLh7O4.js";import"./Play-P4fR-0E_.js";import"./Shield01-CITJSPye.js";import"./Stars01-BQqwEiIH.js";import"./Upload01-DhlN2oeP.js";import"./Users01-B6kJjdmQ.js";import"./Zap-Cbw9kHWr.js";const Lt=ge({scopes:$e(ce()).describe("List of scopes available"),stateSchema:Ie(ce(),Ae()).describe("JSON Schema (draft-07) defining the state structure")}),Ht=[{name:"MCP_CONFIGURATION",inputSchema:ge({}),outputSchema:Lt}];function Bt(s){const e=P.c(39),{instance:n,onConfigure:i,onAuthenticate:a,onDelete:o}=s;let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const c=Ne(r),d=!(n.connection_type==="VIRTUAL")&&c.supportsOAuth&&!c.isAuthenticated,u=d?"border-destructive/50 bg-destructive/5":"border-transparent";let p;e[2]!==u?(p=ve("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",u),e[2]=u,e[3]=p):p=e[3];let l;e[4]!==n.icon||e[5]!==n.title?(l=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=l):l=e[6];let f;e[7]!==n.title?(f=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=f):f=e[8];let g;e[9]!==d?(g=d&&t.jsx("span",{className:"text-xs text-destructive font-medium",children:"Needs authorization"}),e[9]=d,e[10]=g):g=e[10];let v;e[11]!==f||e[12]!==g?(v=t.jsxs("div",{className:"flex-1 min-w-0",children:[f,g]}),e[11]=f,e[12]=g,e[13]=v):v=e[13];let b;e[14]!==n||e[15]!==d||e[16]!==a?(b=d&&t.jsx(G,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>a(n),children:"Authorize"}),e[14]=n,e[15]=d,e[16]=a,e[17]=b):b=e[17];let j;e[18]!==n||e[19]!==i?(j=()=>i(n),e[18]=n,e[19]=i,e[20]=j):j=e[20];let _;e[21]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(Se,{size:13}),e[21]=_):_=e[21];let w;e[22]!==j?(w=t.jsx(G,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,title:"Configure",children:_}),e[22]=j,e[23]=w):w=e[23];let S;e[24]!==n||e[25]!==o?(S=()=>o(n),e[24]=n,e[25]=o,e[26]=S):S=e[26];let N;e[27]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(le,{size:13}),e[27]=N):N=e[27];let k;e[28]!==S?(k=t.jsx(G,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:S,title:"Delete",children:N}),e[28]=S,e[29]=k):k=e[29];let y;e[30]!==w||e[31]!==k||e[32]!==b?(y=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[b,w,k]}),e[30]=w,e[31]=k,e[32]=b,e[33]=y):y=e[33];let C;return e[34]!==y||e[35]!==p||e[36]!==l||e[37]!==v?(C=t.jsxs("div",{className:p,children:[l,v,y]}),e[34]=y,e[35]=p,e[36]=l,e[37]=v,e[38]=C):C=e[38],C}function Gt(s){const e=P.c(15),{instance:n,onConfigure:i}=s;let a;e[0]!==n.icon||e[1]!==n.title?(a=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=a):a=e[2];let o;e[3]!==n.title?(o=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=o):o=e[4];let r;e[5]!==n||e[6]!==i?(r=()=>i(n),e[5]=n,e[6]=i,e[7]=r):r=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Se,{size:13}),e[8]=c):c=e[8];let m;e[9]!==r?(m=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(G,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:r,title:"Configure",children:c})}),e[9]=r,e[10]=m):m=e[10];let d;return e[11]!==a||e[12]!==o||e[13]!==m?(d=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[a,o,m]}),e[11]=a,e[12]=o,e[13]=m,e[14]=d):d=e[14],d}function Wt(s){const e=P.c(25),{instances:n,onConfigure:i,onAuthenticate:a,onDelete:o,onAdd:r,isAdding:c}=s;if(n.length===0)return null;const m=n.length===1?"Instance":"Instances";let d;e[0]!==m?(d=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:m}),e[0]=m,e[1]=d):d=e[1];let u;e[2]!==c?(u=c?t.jsx(je,{size:13,className:"animate-spin"}):t.jsx(rt,{size:13}),e[2]=c,e[3]=u):u=e[3];let p;e[4]!==c||e[5]!==r||e[6]!==u?(p=t.jsxs(G,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:r,disabled:c,children:[u,"Add instance"]}),e[4]=c,e[5]=r,e[6]=u,e[7]=p):p=e[7];let l;e[8]!==d||e[9]!==p?(l=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[d,p]}),e[8]=d,e[9]=p,e[10]=l):l=e[10];let f;if(e[11]!==n||e[12]!==a||e[13]!==i||e[14]!==o){let b;e[16]!==a||e[17]!==i||e[18]!==o?(b=j=>t.jsx(X.Suspense,{fallback:t.jsx(Gt,{instance:j,onConfigure:i}),children:t.jsx(Bt,{instance:j,onConfigure:i,onAuthenticate:a,onDelete:o})},j.id),e[16]=a,e[17]=i,e[18]=o,e[19]=b):b=e[19],f=n.map(b),e[11]=n,e[12]=a,e[13]=i,e[14]=o,e[15]=f}else f=e[15];let g;e[20]!==f?(g=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:f}),e[20]=f,e[21]=g):g=e[21];let v;return e[22]!==l||e[23]!==g?(v=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[l,g]}),e[22]=l,e[23]=g,e[24]=v):v=e[24],v}const Xt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function qt(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const Qt={calls:{label:"Tool calls"},errors:{label:"Errors"}};function Kt(s){const e=P.c(4),{connectionId:n,orgId:i,orgSlug:a,timeframe:o}=s;let r;e[0]!==i||e[1]!==a?(r={connectionId:tt,orgId:i,orgSlug:a},e[0]=i,e[1]=a,e[2]=r):r=e[2];const c=re(r),m=qt(o),{data:d}=De({queryKey:ne.connectionActivity(n,o,i),queryFn:async()=>{const g=await c.callTool({name:"MONITORING_LOGS_LIST",arguments:{startDate:m.startDate.toISOString(),endDate:m.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}});return g.structuredContent??g},staleTime:3e5}),u=gt(d?.logs??[],m),p=u.data,l=u.totalCalls>0;let f;return e[3]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Tool calls"}),e[3]=f):f=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:u.totalCalls.toLocaleString()}),f]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Errors"})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Avg latency"})]})]}),l?t.jsxs("div",{children:[t.jsx(jt,{config:Qt,className:"h-16 w-full",children:t.jsxs(vt,{data:p,barCategoryGap:"4%",children:[t.jsx(bt,{content:t.jsx(Nt,{labelFormatter:Yt}),cursor:{fill:"var(--muted)"}}),t.jsx(yt,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:p.map(Jt)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[p.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No activity in this period"})})]})}function Jt(s,e){return t.jsx(_t,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function Yt(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function Zt(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function es(s){const e=P.c(14),{connectionId:n}=s,[i,a]=X.useState("14d"),{org:o}=J();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Activity"})}),e[0]=r):r=e[0];let c;e[1]!==i?(c=Xt.map(l=>t.jsx("button",{type:"button",onClick:()=>a(l.value),className:ve("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",i===l.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:l.label},l.value)),e[1]=i,e[2]=c):c=e[2];let m;e[3]!==c?(m=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:c})]}),e[3]=c,e[4]=m):m=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Zt,{}),e[5]=d):d=e[5];let u;e[6]!==n||e[7]!==o.id||e[8]!==o.slug||e[9]!==i?(u=t.jsx(X.Suspense,{fallback:d,children:t.jsx(Kt,{connectionId:n,orgId:o.id,orgSlug:o.slug,timeframe:i})}),e[6]=n,e[7]=o.id,e[8]=o.slug,e[9]=i,e[10]=u):u=e[10];let p;return e[11]!==m||e[12]!==u?(p=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[m,u]}),e[11]=m,e[12]=u,e[13]=p):p=e[13],p}function ts(s){const e=P.c(15),{virtualMcp:n,org:i}=s,a=Y();let o;e[0]!==a||e[1]!==i||e[2]!==n.id?(o=()=>{const p=crypto.randomUUID();a({to:"/$org/$taskId",params:{org:i,taskId:p},search:{virtualmcpid:n.id}})},e[0]=a,e[1]=i,e[2]=n.id,e[3]=o):o=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(we,{size:16}),e[4]=r):r=e[4];let c;e[5]!==n.icon||e[6]!==n.title?(c=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r}),e[5]=n.icon,e[6]=n.title,e[7]=c):c=e[7];let m;e[8]!==n.title?(m=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=m):m=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ce,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=d):d=e[10];let u;return e[11]!==o||e[12]!==c||e[13]!==m?(u=t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[c,m,d]}),e[11]=o,e[12]=c,e[13]=m,e[14]=u):u=e[14],u}function ss(s){const e=P.c(7),{virtualMcps:n,org:i}=s;let a;if(e[0]!==i||e[1]!==n){let r;e[3]!==i?(r=c=>t.jsx(ts,{virtualMcp:c,org:i},c.id),e[3]=i,e[4]=r):r=e[4],a=n.map(r),e[0]=i,e[1]=n,e[2]=a}else a=e[2];let o;return e[5]!==a?(o=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:a})}),e[5]=a,e[6]=o):o=e[6],o}function ns(s){const e=P.c(7),{connection:n}=s,{org:i}=J();let a;e[0]!==n.id?(a={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=a):a=e[1];const o=St(a);if(!(o.length>0)){let d;return e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(t.Fragment,{}),e[2]=d):d=e[2],d}let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=c):c=e[3];let m;return e[4]!==i.slug||e[5]!==o?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[c,t.jsx("div",{className:"px-5 py-4",children:t.jsx(ss,{virtualMcps:o,org:i.slug})})]}),e[4]=i.slug,e[5]=o,e[6]=m):m=e[6],m}function os(s){const e=P.c(31),{tools:n,connectionId:i,org:a}=s,o=Y(),{org:r}=J();let c;e[0]!==i||e[1]!==r.id||e[2]!==r.slug?(c={connectionId:i,orgId:r.id,orgSlug:r.slug},e[0]=i,e[1]=r.id,e[2]=r.slug,e[3]=c):c=e[3];const m=re(c),d=ye(i);let u;e[4]!==d||e[5]!==i?(u=d?ke(d):i,e[4]=d,e[5]=i,e[6]=u):u=e[6];const p=u,[l,f]=X.useState("");let g,v,b,j;if(e[7]!==p||e[8]!==m||e[9]!==o||e[10]!==a||e[11]!==l||e[12]!==n){const S=(n??[]).filter(is),N=l.toLowerCase().trim(),k=N?S.filter(h=>h.name.toLowerCase().includes(N)||h.description&&h.description.toLowerCase().includes(N)):S;let y;e[17]!==p||e[18]!==o||e[19]!==a?(y=h=>{o({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:a,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(h.name)}})},e[17]=p,e[18]=o,e[19]=a,e[20]=y):y=e[20];const C=y;b="flex flex-col h-full overflow-hidden";let I;e[21]===Symbol.for("react.memo_cache_sentinel")?(I=h=>{h.key==="Escape"&&(f(""),h.target.blur())},e[21]=I):I=e[21],e[22]!==l?(j=t.jsx($t,{value:l,onChange:f,placeholder:"Search apps...",onKeyDown:I}),e[22]=l,e[23]=j):j=e[23],g="flex-1 overflow-auto p-5",v=k.length===0?t.jsx(be,{image:null,title:l?"No apps found":"No apps available",description:l?"Try adjusting your search terms":"This connection doesn't have any tools with interactive UIs yet."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:k.map(h=>{const A=ae(h._meta);return t.jsxs(Dt,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>C(h),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(nt,{resourceURI:A,toolInfo:{tool:h},displayMode:"inline",minHeight:200,maxHeight:200,client:m})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:h.name}),t.jsx(Je,{annotations:h.annotations,_meta:h._meta})]}),h.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:h.description})]})]},h.name)})}),e[7]=p,e[8]=m,e[9]=o,e[10]=a,e[11]=l,e[12]=n,e[13]=g,e[14]=v,e[15]=b,e[16]=j}else g=e[13],v=e[14],b=e[15],j=e[16];let _;e[24]!==g||e[25]!==v?(_=t.jsx("div",{className:g,children:v}),e[24]=g,e[25]=v,e[26]=_):_=e[26];let w;return e[27]!==b||e[28]!==j||e[29]!==_?(w=t.jsxs("div",{className:b,children:[j,_]}),e[27]=b,e[28]=j,e[29]=_,e[30]=w):w=e[30],w}function is(s){return!!ae(s._meta)}function Te(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=r=>r.charAt(0).toUpperCase()+r.slice(1),i=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),a=e.map(n),o=e[e.length-1];return a.length>=2&&o&&i.has(o)?[a.pop(),...a].join(" "):a.join(" ")}function ie(s){const e=P.c(2),{label:n}=s;let i;return e[0]!==n?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:["No ",n," available."]})}),e[0]=n,e[1]=i):i=e[1],i}function rs(s){const e=P.c(50),{tools:n,prompts:i,resources:a,connectionId:o,org:r}=s;let c;e[0]!==i?(c=i===void 0?[]:i,e[0]=i,e[1]=c):c=e[1];const m=c;let d;e[2]!==a?(d=a===void 0?[]:a,e[2]=a,e[3]=d):d=e[3];const u=d,p=Y(),l=ye(o??"");let f;e[4]!==l||e[5]!==o?(f=l?ke(l):o,e[4]=l,e[5]=o,e[6]=f):f=e[6];const g=f;let v;e[7]!==g||e[8]!==o||e[9]!==p||e[10]!==r?(v=function($){!o||!r||p({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:g,collectionName:"tools",itemId:encodeURIComponent($)}})},e[7]=g,e[8]=o,e[9]=p,e[10]=r,e[11]=v):v=e[11];const b=v;let j;e[12]!==o||e[13]!==r||e[14]!==n?(j=o&&r&&n.some(cs),e[12]=o,e[13]=r,e[14]=n,e[15]=j):j=e[15];const _=j;if(n.length+m.length+u.length===0){let x;return e[16]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Capabilities"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No capabilities discovered yet. The connection may still be connecting."})]}),e[16]=x):x=e[16],x}let S;e[17]!==n.length?(S=t.jsxs(ee,{value:"tools",variant:"underline",children:["Tools (",n.length,")"]}),e[17]=n.length,e[18]=S):S=e[18];let N;e[19]!==_?(N=_&&t.jsx(ee,{value:"apps",variant:"underline",children:"UI"}),e[19]=_,e[20]=N):N=e[20];let k,y;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(ee,{value:"prompts",variant:"underline",children:"Prompts"}),y=t.jsx(ee,{value:"resources",variant:"underline",children:"Resources"}),e[21]=k,e[22]=y):(k=e[21],y=e[22]);let C;e[23]!==S||e[24]!==N?(C=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Ct,{variant:"underline",className:"gap-1",children:[S,N,k,y]})}),e[23]=S,e[24]=N,e[25]=C):C=e[25];let I;e[26]!==b||e[27]!==n?(I=n.length>0?n.map(x=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>b(x.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(At,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(x.name)}),x.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:x.description})]}),t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},x.name)):t.jsx(ie,{label:"tools"}),e[26]=b,e[27]=n,e[28]=I):I=e[28];let h;e[29]!==I?(h=t.jsx(te,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:I})}),e[29]=I,e[30]=h):h=e[30];let A;e[31]!==o||e[32]!==_||e[33]!==r||e[34]!==n?(A=_&&t.jsx(te,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(os,{tools:n,connectionId:o,org:r})}),e[31]=o,e[32]=_,e[33]=r,e[34]=n,e[35]=A):A=e[35];let M;e[36]!==m?(M=m.length>0?m.map(ls):t.jsx(ie,{label:"prompts"}),e[36]=m,e[37]=M):M=e[37];let O;e[38]!==M?(O=t.jsx(te,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:M})}),e[38]=M,e[39]=O):O=e[39];let T;e[40]!==u?(T=u.length>0?u.map(as):t.jsx(ie,{label:"resources"}),e[40]=u,e[41]=T):T=e[41];let z;e[42]!==T?(z=t.jsx(te,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:T})}),e[42]=T,e[43]=z):z=e[43];let E;return e[44]!==C||e[45]!==h||e[46]!==A||e[47]!==O||e[48]!==z?(E=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(wt,{defaultValue:"tools",variant:"underline",children:[C,h,A,O,z]})}),e[44]=C,e[45]=h,e[46]=A,e[47]=O,e[48]=z,e[49]=E):E=e[49],E}function as(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Tt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function ls(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(kt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function cs(s){return ae(s._meta)}function ds(s){const e=P.c(13),{connection:n,displayTitle:i}=s,a=i??n.title;let o;e[0]!==n.icon||e[1]!==a?(o=t.jsx(oe,{icon:n.icon,name:a,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=a,e[2]=o):o=e[2];let r;e[3]!==a?(r=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:a})}),e[3]=a,e[4]=r):r=e[4];let c;e[5]!==n.description?(c=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=c):c=e[6];let m;e[7]!==r||e[8]!==c?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,c]}),e[7]=r,e[8]=c,e[9]=m):m=e[9];let d;return e[10]!==o||e[11]!==m?(d=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[o,m]}),e[10]=o,e[11]=m,e[12]=d):d=e[12],d}function ms({form:s,connection:e,hasOAuthToken:n,onReauthenticate:i,onRemoveOAuth:a}){const o=de({control:s.control,name:"ui_type"}),r=de({control:s.control,name:"connection_url"}),{stdioEnabled:c}=Pe(),m=(()=>{if(typeof r!="string"||!r)return!1;try{const l=new URL(r);return l.hostname==="api.githubcopilot.com"&&l.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),d=c||e.connection_type==="STDIO",u=e.connection_type==="VIRTUAL",p=u?Oe(e.connection_url):null;return u?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Type"}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(we,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(R,{control:s.control,name:"ui_type",render:({field:l})=>t.jsxs(L,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),o!=="NPX"&&o!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(ue,{value:l.value,onValueChange:l.onChange,children:[t.jsx(V,{children:t.jsxs(xe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(se,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(pe,{})]})}),t.jsxs(fe,{children:[t.jsx(F,{value:"HTTP",children:"HTTP"}),t.jsx(F,{value:"SSE",children:"SSE"}),t.jsx(F,{value:"Websocket",children:"Websocket"}),d&&t.jsxs(t.Fragment,{children:[t.jsx(F,{value:"NPX",children:"NPX Package"}),t.jsx(F,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(R,{control:s.control,name:"connection_url",render:({field:f})=>t.jsx(L,{className:"flex-1 min-w-0",children:t.jsx(V,{children:t.jsx(W,{placeholder:"https://example.com/mcp",...f,value:f.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(ue,{value:l.value,onValueChange:l.onChange,children:[t.jsx(V,{children:t.jsx(xe,{className:"h-10",children:t.jsx(pe,{})})}),t.jsxs(fe,{children:[t.jsx(F,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(F,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(F,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"Websocket"]})}),d&&t.jsxs(t.Fragment,{children:[t.jsx(F,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ut,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(F,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(It,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(B,{})]})}),o==="NPX"&&t.jsx(R,{control:s.control,name:"npx_package",render:({field:l})=>t.jsxs(L,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(V,{children:t.jsx(W,{placeholder:"@perplexity-ai/mcp-server",...l,value:l.value||"",className:"h-10 rounded-lg"})}),t.jsx(B,{})]})}),o==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(R,{control:s.control,name:"stdio_command",render:({field:l})=>t.jsxs(L,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(V,{children:t.jsx(W,{placeholder:"node, bun, python...",...l,value:l.value||"",className:"h-10 rounded-lg"})}),t.jsx(B,{})]})}),t.jsx(R,{control:s.control,name:"stdio_args",render:({field:l})=>t.jsxs(L,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(V,{children:t.jsx(W,{placeholder:"arg1 arg2 --flag value",...l,value:l.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(B,{})]})})]}),t.jsx(R,{control:s.control,name:"stdio_cwd",render:({field:l})=>t.jsxs(L,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(V,{children:t.jsx(W,{placeholder:"/path/to/project (optional)",...l,value:l.value||"",className:"h-10 rounded-lg"})}),t.jsx(B,{})]})})]}),(o==="NPX"||o==="STDIO")&&t.jsx(R,{control:s.control,name:"env_vars",render:({field:l})=>t.jsxs(L,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(V,{children:t.jsx(Be,{value:l.value??[],onChange:l.onChange})}),t.jsx(B,{})]})}),o!=="NPX"&&o!=="STDIO"&&t.jsx(R,{control:s.control,name:"connection_token",render:({field:l})=>t.jsxs(L,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:m?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Ot,{children:[t.jsx(Mt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Pt,{variant:"success",className:"gap-1.5",children:[t.jsx(Vt,{size:12}),"Authenticated via OAuth",t.jsx(Et,{size:12})]})})}),t.jsxs(zt,{align:"start",children:[t.jsxs(me,{onClick:i,children:[t.jsx(Ft,{size:16}),"Re-authenticate"]}),t.jsxs(me,{variant:"destructive",onClick:a,children:[t.jsx(le,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&l.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>l.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(Rt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(V,{children:t.jsx(W,{type:"password",placeholder:m?"Paste your GitHub PAT":"Enter access token...",...l,value:l.value||"",className:"h-10 rounded-lg"})}),m&&t.jsxs(ut,{children:["Create a PAT at"," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(B,{})]})})]})}function us(s){return s.command==="npx"}function xs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function ps(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function he(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Re(s.connection_headers)){const i=s.connection_headers,a=We(i.envVars);if(us(i)){const r=xs(i);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:r,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:a}}const o=ps(i);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:o.command,stdio_args:o.args,stdio_cwd:o.cwd,env_vars:a}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function fs(s){let e,n=null,i=null,a=null;return s.ui_type==="NPX"?(e="STDIO",n="",a=Xe(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",a=qe(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",i=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...i&&{connection_token:i},...a&&{connection_headers:a},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function hs({connection:s,connectionId:e,org:n,isUpdating:i,tools:a,prompts:o,resources:r,siblings:c}){const m=Y({from:"/$org/settings/connections/$appSlug"}),d=Ve(),u=_e(),{org:p}=J(),l=pt({onSuccess:()=>{c.length<=1&&m({to:"/$org/settings/connections",params:{org:n}})}}),[f,g]=X.useState(null),[v,b]=X.useState(!1),j=Ne({connectionId:e}),{data:_}=Ye(),w=_?.data?.members??[],S=f??s,N=w.find(x=>x.userId===S.created_by),y=s?.connection_type==="VIRTUAL"||j.isAuthenticated,C={...s,tools:a},I=Qe(C,Ht),h=Ee({resolver:Ue(Ge),values:he(f??s)}),A=h.formState.isDirty,M=async()=>{if(!await h.trigger())return;const $=h.getValues(),D=fs($),U=f?.id??e;await u.update.mutateAsync({id:U,data:D}),h.reset($)},O=()=>{h.reset(he(f??s))},T=async x=>{const{token:$,tokenInfo:D,error:U}=await Le({connectionId:x,orgSlug:p.slug,scope:"offline_access"});if(U||!$){K.error(`Authentication failed: ${U}`);return}if(D)try{const q=await fetch(`/api/${p.slug}/connections/${x}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:D.accessToken,refreshToken:D.refreshToken,expiresIn:D.expiresIn,scope:D.scope,clientId:D.clientId,clientSecret:D.clientSecret,tokenEndpoint:D.tokenEndpoint})});if(!q.ok)console.error("Failed to save OAuth token:",await q.text()),await u.update.mutateAsync({id:x,data:{connection_token:$}});else try{await u.update.mutateAsync({id:x,data:{}})}catch(Z){console.warn("Failed to refresh connection tools after OAuth:",Z)}}catch(q){console.error("Error saving OAuth token:",q),await u.update.mutateAsync({id:x,data:{connection_token:$}})}else await u.update.mutateAsync({id:x,data:{connection_token:$}});const Q=new URL(`/api/${p.slug}/mcp/${x}`,window.location.origin);await d.invalidateQueries({queryKey:ne.isMCPAuthenticated(Q.href,null)}),await d.invalidateQueries({queryKey:ne.mcpClientPrefix()}),K.success("Authentication successful")},z=()=>T(s.id),E=async()=>{try{const x=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!x.ok){const D=await x.text();K.error(`Failed to remove OAuth: ${D}`);return}const $=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await d.invalidateQueries({queryKey:ne.isMCPAuthenticated($.href,null)}),K.success("OAuth removed. You can now re-authenticate with a different account.")}catch(x){console.error("Error removing OAuth token:",x),K.error("Failed to remove OAuth")}};return t.jsxs(t.Fragment,{children:[t.jsx(ft,{...l}),t.jsx(at,{open:f!==null,onOpenChange:x=>{x||g(null)},children:t.jsxs(lt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(ct,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(dt,{className:"text-base",children:f?.title??s.title}),t.jsx(mt,{className:"text-xs",children:"Update URL, authentication, and other settings"}),N&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected by"}),t.jsx(Ze,{url:N.user?.image??void 0,fallback:N.user?.name??N.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:N.user?.name||N.user?.email})]})]}),t.jsxs(xt,{...h,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(R,{control:h.control,name:"title",render:({field:x})=>t.jsxs(L,{children:[t.jsx(H,{children:"Name"}),t.jsx(V,{children:t.jsx(W,{...x})}),t.jsx(B,{})]})}),t.jsx(R,{control:h.control,name:"description",render:({field:x})=>t.jsxs(L,{children:[t.jsx(H,{children:"Description"}),t.jsx(V,{children:t.jsx(W,{...x,value:x.value||""})}),t.jsx(B,{})]})})]}),t.jsx(ms,{form:h,connection:f??s,hasOAuthToken:j.hasOAuthToken,onReauthenticate:z,onRemoveOAuth:E}),t.jsx(Ke,{connection:f??s,form:h,hasMcpBinding:I,isMCPAuthenticated:y,supportsOAuth:j.supportsOAuth,isServerError:j.isServerError,onAuthenticate:z,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(G,{onClick:M,disabled:!A||i,className:"flex-1",children:i?"Saving…":"Save changes"}),A&&t.jsx(G,{variant:"outline",onClick:O,children:"Undo"}),t.jsxs(G,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const x=f??s;g(null),l.requestDelete(x)},children:[t.jsx(le,{size:15}),"Delete"]})]})]},f?.id??s.id)]})}),t.jsx(ht,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(ds,{connection:s,displayTitle:(()=>{const x=c[0]??s;return x.app_name?x.title.replace(/\s*\(\d+\)\s*$/,""):x.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(es,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Wt,{instances:c,onConfigure:x=>g(x),onAuthenticate:x=>T(x.id),onDelete:x=>l.requestDelete(x),isAdding:v,onAdd:async()=>{b(!0);try{const x=c[0]??s,$=x.title.replace(/\s*\(\d+\)\s*$/,""),D=c.length+1,U=`${$} (${D})`,Q=He("conn");await u.create.mutateAsync({id:Q,title:U,description:x.description??null,connection_type:x.connection_type,connection_url:x.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:x.created_by,organization_id:x.organization_id,icon:x.icon??null,app_name:x.app_name??null,app_id:x.app_id??null,connection_headers:x.connection_headers??null,oauth_config:null,configuration_state:x.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const q=new URL(`/api/${p.slug}/mcp/${Q}`,window.location.origin),Z=await Fe({url:q.href,token:null,orgId:p.id});Z.supportsOAuth&&!Z.isAuthenticated&&await T(Q)}finally{b(!1)}}}),t.jsx(ns,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(rs,{tools:a,prompts:o,resources:r,connectionId:e,org:n})})]})})]})})]})}function gs(){const s=P.c(39);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/settings/connections/$appSlug"},s[0]=e):e=s[0];const n=Y(e);let i;s[1]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org/settings/connections/$appSlug"},s[1]=i):i=s[1];const{appSlug:a,org:o}=ze(i),{org:r}=J(),c=_e();let m;s[2]!==a?(m={slug:a},s[2]=a,s[3]=m):m=s[3];const d=et(m),u=d[0]??null,p=u?.id??"",l=p||null;let f;s[4]!==r.id||s[5]!==r.slug||s[6]!==l?(f={connectionId:l,orgId:r.id,orgSlug:r.slug},s[4]=r.id,s[5]=r.slug,s[6]=l,s[7]=f):f=s[7];const g=re(f);let v;s[8]!==g?(v={client:g},s[8]=g,s[9]=v):v=s[9];const{data:b}=st(v);let j;if(s[10]!==u?.tools||s[11]!==p||s[12]!==d||s[13]!==b){const T=b?b.tools.map(_s):(u?.tools??[]).map(ys);e:{if(d.length<=1){j=T;break e}const z=new Set,E=[],x=bs;for(const $ of d){const D=$.id===p?T:x($.tools);for(const U of D)z.has(U.name)||(z.add(U.name),E.push(U))}j=E.length>0?E:T}s[10]=u?.tools,s[11]=p,s[12]=d,s[13]=b,s[14]=j}else j=s[14];const _=j;let w;s[15]!==g?(w={client:g},s[15]=g,s[16]=w):w=s[16];const{data:S}=it(w);let N;s[17]!==g?(N={client:g},s[17]=g,s[18]=N):N=s[18];const{data:k}=ot(N);let y;s[19]!==S?.prompts?(y=S?.prompts??[],s[19]=S?.prompts,s[20]=y):y=s[20];let C;s[21]!==y?(C=y.map(vs),s[21]=y,s[22]=C):C=s[22];const I=C;let h;s[23]!==k?.resources?(h=k?.resources??[],s[23]=k?.resources,s[24]=h):h=s[24];let A;s[25]!==h?(A=h.map(js),s[25]=h,s[26]=A):A=s[26];const M=A;if(!u){let T;return s[27]!==n||s[28]!==o?(T=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(be,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(G,{variant:"outline",onClick:()=>n({to:"/$org/settings/connections",params:{org:o}}),children:"Back to connections"})})}),s[27]=n,s[28]=o,s[29]=T):T=s[29],T}let O;return s[30]!==c.update.isPending||s[31]!==_||s[32]!==u||s[33]!==p||s[34]!==o||s[35]!==I||s[36]!==M||s[37]!==d?(O=t.jsx(hs,{org:o,connection:u,connectionId:p,isUpdating:c.update.isPending,tools:_,prompts:I,resources:M,siblings:d}),s[30]=c.update.isPending,s[31]=_,s[32]=u,s[33]=p,s[34]=o,s[35]=I,s[36]=M,s[37]=d,s[38]=O):O=s[38],O}function js(s){return{name:s.name,description:s.description,uri:s.uri}}function vs(s){return{name:s.name,description:s.description}}function bs(s){return(s??[]).map(Ns)}function Ns(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function ys(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function _s(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ss(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Me,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(je,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(gs,{})})}),s[0]=e):e=s[0],e}function oo(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ss,{}),s[0]=e):e=s[0],e}export{oo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as ae,j as t,E as et,r as W,l as re,q as Ne,f as ke,d as tt,b as De,u as nt,p as st,L as ot,G as it,H as at,B as z,t as ne,F as ct,c as le,o as Q,J as rt,I as lt,K as dt}from"./index-0jxZXjT_.js";import{g as mt}from"./generate-id-BoTFc93G.js";import{C as ut}from"./collection-display-button-9zcw0Pse.js";import{S as pt}from"./search-input-CIl-bXGa.js";import{C as ht}from"./collection-tabs-BoWMCCpv.js";import{u as xt,a as Ae,g as gt,C as Ce}from"./connection-card-CWg85UPa.js";import{E as ft}from"./empty-state-Cv3pDKB-.js";import{I as jt}from"./integration-icon-B34NO5DZ.js";import{P as me}from"./index-B0yf3v8e.js";import{u as yt,D as Ct}from"./use-delete-connection-0bGCksoc.js";import{u as ye}from"./use-capability-BrFRIPu5.js";import{u as vt}from"./use-infinite-scroll-COXLEab2.js";import{u as _t}from"./use-list-state-1DLqfcvM.js";import{g as we,a as St,e as bt}from"./extract-connection-data-DRKXxZ8i.js";import{g as pe}from"./connection-slug-eyAPH6o3.js";import{c as Te,d as Ie,b as Pe,f as Le,e as Oe,g as $e,a as Ee,A as Me}from"./alert-dialog-Bvyir_5o.js";import{C as ze}from"./checkbox-D4JiAIiY.js";import{D as Fe,a as Ve,b as Be,c as Ue,e as He,d as Re}from"./dialog-Br598C89.js";import{b as Nt,a as kt,c as Dt,D as At,d as wt,e as Tt,f as It}from"./drawer-D-eRrcRE.js";import{u as Pt}from"./tooltip-CeP603hH.js";import{D as Ke,a as We,b as Xe,c as he}from"./dropdown-menu-39FgxtLo.js";import{F as J,b as Y,c as Z,d as ee,f as te,a as Se}from"./form-BFCHHJw7.js";import{I as ie}from"./input-BJ1rHrAh.js";import{d as Lt,S as Ot,a as $t,b as Et,c as ce}from"./select-CvDnclqc.js";import{T as Mt}from"./textarea-SDIeylNJ.js";import{b as qe,u as zt}from"./use-connection-CzM_WXMN.js";import{u as Ft,S as Vt}from"./constants-bvvELg6A.js";import{a as Bt}from"./use-virtual-mcp-DflWVTuF.js";import{Q as Ut,a5 as Ht}from"./agent-icon-BJOP--6N.js";import{n as xe}from"./Container-Bjo8FVL5.js";import{i as Ge}from"./DotsVertical-kyMVsMi3.js";import{s as Qe}from"./Eye-FA0T_9KR.js";import{s as je}from"./Star01-DQCFITlh.js";import{s as Je}from"./Plus-WVvC1Th4.js";import{s as Ye}from"./Trash01-BMiuF02D.js";import{s as Ze}from"./XClose-CeXjq2Ks.js";import{i as ue,a as be,E as Rt,c as Kt,p as Wt,b as Xt,d as qt}from"./connection-form-helpers-I069qG8R.js";import"./collections-D3-t_Oif.js";import"./SwitchHorizontal01-D6GIRPJ1.js";import"./Check-5-utiman.js";import"./view-mode-toggle-DI_qGqci.js";import"./badge-DKUnZ67J.js";import"./SearchMd-cBVn0Mcd.js";import"./use-registry-connections-Bxq_77g6.js";import"./use-organization-settings-CQEWT13Z.js";import"./useInfiniteQuery-2A4J-MZz.js";import"./infiniteQueryObserver-BHyRmyuw.js";import"./card-mrz_YqFP.js";import"./sidebar-DxS-nB9C.js";import"./sheet-ChXXkoux.js";import"./X-BwvdKywg.js";import"./use-view-mode-C8ehq-d0.js";import"./ChevronRight-AaMPC6ii.js";import"./label-Ces90Ob6.js";import"./ChevronDown-BRUPOd-D.js";import"./ChevronUp-B3N7TOrA.js";import"./use-collections-DPnWGTP7.js";import"./AlertCircle-I5aAKx5s.js";import"./Tool01-DBZmckgJ.js";import"./RefreshCcw01-Dg7_NhVx.js";import"./XCircle-BVR438yI.js";import"./ArrowUpRight-DUqwCMWv.js";import"./ZapSquare-B2q8WEX1.js";import"./Users03-a4EwkzcR.js";import"./CheckCircle-CA1UzIEX.js";import"./Globe01-BdrXaQ4t.js";import"./FilterLines-Dx0-KOH1.js";import"./ZoomOut-DnoKIS59.js";import"./Palette-DW_AOTeX.js";import"./HardDrive-uqc3Mfxn.js";import"./Stars02-CnxGzx_a.js";import"./Key01-4CEC30CH.js";import"./LinkExternal01-sg0X3i7p.js";import"./Monitor01-CTE-M7aU.js";import"./Sun-CvvLh7O4.js";import"./Play-P4fR-0E_.js";import"./Settings02-J55NFzUl.js";import"./Shield01-CITJSPye.js";import"./Stars01-BQqwEiIH.js";import"./Upload01-DhlN2oeP.js";import"./User01-D0BthoTv.js";import"./Users01-B6kJjdmQ.js";import"./Zap-Cbw9kHWr.js";function Gt(v){const e=ae.c(51),{group:n,onOpen:p,selectionMode:u,selectedIds:m,onToggleSelect:a}=v;let h;if(e[0]!==n.connections||e[1]!==m){let C;e[3]!==m?(C=P=>m.has(P.id),e[3]=m,e[4]=C):C=e[4],h=n.connections.every(C),e[0]=n.connections,e[1]=m,e[2]=h}else h=e[2];const x=h;let y;if(e[5]!==n.connections||e[6]!==m){let C;e[8]!==m?(C=P=>m.has(P.id),e[8]=m,e[9]=C):C=e[9],y=n.connections.some(C),e[5]=n.connections,e[6]=m,e[7]=y}else y=e[7];const g=y,b=`${n.connections.length} instances`;let N;e[10]!==n.icon||e[11]!==n.title||e[12]!==b?(N={title:n.title,icon:n.icon,description:b},e[10]=n.icon,e[11]=n.title,e[12]=b,e[13]=N):N=e[13];let l;e[14]!==x||e[15]!==n.connections||e[16]!==p||e[17]!==a||e[18]!==m||e[19]!==u?(l=()=>u?(()=>{for(const C of n.connections)x?m.has(C.id)&&a(C.id):m.has(C.id)||a(C.id)})():p(),e[14]=x,e[15]=n.connections,e[16]=p,e[17]=a,e[18]=m,e[19]=u,e[20]=l):l=e[20];const j=u&&x&&"ring-2 ring-primary",d=u&&g&&!x&&"ring-1 ring-primary/50";let k;e[21]!==j||e[22]!==d?(k=le(j,d),e[21]=j,e[22]=d,e[23]=k):k=e[23];let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(xe,{}),e[24]=_):_=e[24];let D;e[25]!==x||e[26]!==n.connections||e[27]!==a||e[28]!==m||e[29]!==u||e[30]!==g?(D=u?t.jsx(ze,{checked:x?!0:g?"indeterminate":!1,onCheckedChange:()=>{for(const C of n.connections)x?m.has(C.id)&&a(C.id):m.has(C.id)||a(C.id)}}):t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}),t.jsxs("span",{className:"text-xs text-muted-foreground font-normal tabular-nums",children:["x",n.connections.length]})]}),e[25]=x,e[26]=n.connections,e[27]=a,e[28]=m,e[29]=u,e[30]=g,e[31]=D):D=e[31];const U=u?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let F;e[32]!==U?(F=le("overflow-hidden transition-all duration-150 ease-out",U),e[32]=U,e[33]=F):F=e[33];let s;e[34]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(We,{asChild:!0,children:t.jsx(z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Jt,children:t.jsx(Ge,{size:20})})}),e[34]=s):s=e[34];let A;e[35]!==p?(A=C=>{C.stopPropagation(),p()},e[35]=p,e[36]=A):A=e[36];let V;e[37]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(Qe,{size:16}),e[37]=V):V=e[37];let $;e[38]!==A?($=t.jsxs(Ke,{children:[s,t.jsx(Xe,{align:"end",onClick:Qt,children:t.jsxs(he,{onClick:A,children:[V,"Open"]})})]}),e[38]=A,e[39]=$):$=e[39];let w;e[40]!==F||e[41]!==$?(w=t.jsx("div",{className:F,children:$}),e[40]=F,e[41]=$,e[42]=w):w=e[42];let L;e[43]!==D||e[44]!==w?(L=t.jsxs("div",{className:"flex items-center gap-1",children:[D,w]}),e[43]=D,e[44]=w,e[45]=L):L=e[45];let B;return e[46]!==L||e[47]!==N||e[48]!==l||e[49]!==k?(B=t.jsx(t.Fragment,{children:t.jsx(Ce,{connection:N,onClick:l,className:k,fallbackIcon:_,headerActionsAlwaysVisible:!0,headerActions:L})}),e[46]=L,e[47]=N,e[48]=l,e[49]=k,e[50]=B):B=e[50],B}function Qt(v){return v.stopPropagation()}function Jt(v){return v.stopPropagation()}function Yt(v){const e=ae.c(23),{count:n,total:p,canManage:u,canManageAgents:m,onSelectAll:a,onDeselectAll:h,onDelete:x,onAddToAgent:y,onToggleStatus:g,onCancel:b}=v;if(n===0)return null;let N;e[0]!==n?(N=t.jsxs("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=N):N=e[1];let l;e[2]!==n||e[3]!==h||e[4]!==a||e[5]!==p?(l=n<p?t.jsxs(z,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:a,children:["Select all (",p,")"]}):t.jsx(z,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:h,children:"Clear selection"}),e[2]=n,e[3]=h,e[4]=a,e[5]=p,e[6]=l):l=e[6];let j;e[7]!==m||e[8]!==y?(j=m&&t.jsxs(z,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:y,children:[t.jsx(Je,{size:13}),"Add to Agent"]}),e[7]=m,e[8]=y,e[9]=j):j=e[9];let d;e[10]!==u||e[11]!==x||e[12]!==g?(d=u&&t.jsxs(t.Fragment,{children:[t.jsx(z,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>g("active"),children:"Enable"}),t.jsx(z,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>g("inactive"),children:"Disable"}),t.jsxs(z,{variant:"destructive",size:"sm",className:"h-7 text-xs px-2",onClick:x,children:[t.jsx(Ye,{size:13}),"Delete"]})]}),e[10]=u,e[11]=x,e[12]=g,e[13]=d):d=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Ze,{size:13}),e[14]=k):k=e[14];let _;e[15]!==b?(_=t.jsx(z,{variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:b,children:k}),e[15]=b,e[16]=_):_=e[16];let D;return e[17]!==N||e[18]!==l||e[19]!==j||e[20]!==d||e[21]!==_?(D=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:[N,l,j,d,_]})}),e[17]=N,e[18]=l,e[19]=j,e[20]=d,e[21]=_,e[22]=D):D=e[22],D}function Zt(v){const e=ae.c(25),{open:n,onOpenChange:p,agents:u,onConfirm:m}=v,[a,h]=W.useState(null);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsxs(Be,{children:[t.jsx(Ue,{children:"Add to Agent"}),t.jsx(He,{children:"Select an agent to add the selected connections to."})]}),e[0]=x):x=e[0];let y;e[1]!==u||e[2]!==a?(y=u.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No agents found"}):u.map(D=>t.jsxs("button",{type:"button",onClick:()=>h(D.id),className:le("flex items-center gap-3 w-full rounded-md px-3 py-2 text-left transition-colors",a===D.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-muted/50"),children:[t.jsx(jt,{icon:D.icon,name:D.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:D.title}),D.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:D.description})]})]},D.id)),e[1]=u,e[2]=a,e[3]=y):y=e[3];let g;e[4]!==y?(g=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:y}),e[4]=y,e[5]=g):g=e[5];let b;e[6]!==p?(b=t.jsx(z,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),e[6]=p,e[7]=b):b=e[7];const N=!a;let l;e[8]!==m||e[9]!==p||e[10]!==a?(l=()=>{a&&(m(a),p(!1),h(null))},e[8]=m,e[9]=p,e[10]=a,e[11]=l):l=e[11];let j;e[12]!==N||e[13]!==l?(j=t.jsx(z,{disabled:N,onClick:l,children:"Add"}),e[12]=N,e[13]=l,e[14]=j):j=e[14];let d;e[15]!==b||e[16]!==j?(d=t.jsxs(Re,{children:[b,j]}),e[15]=b,e[16]=j,e[17]=d):d=e[17];let k;e[18]!==g||e[19]!==d?(k=t.jsxs(Ve,{className:"sm:max-w-[400px]",children:[x,g,d]}),e[18]=g,e[19]=d,e[20]=k):k=e[20];let _;return e[21]!==p||e[22]!==n||e[23]!==k?(_=t.jsx(Fe,{open:n,onOpenChange:p,children:k}),e[21]=p,e[22]=n,e[23]=k,e[24]=_):_=e[24],_}function en(v){const e=ae.c(20),{open:n,onOpenChange:p,count:u,onConfirm:m}=v,a=u!==1?"s":"";let h;e[0]!==u||e[1]!==a?(h=t.jsxs(Te,{children:["Delete ",u," connection",a,"?"]}),e[0]=u,e[1]=a,e[2]=h):h=e[2];const x=u!==1?"s":"";let y;e[3]!==x?(y=t.jsxs(Ie,{children:["This will permanently delete the selected connection",x,". This action cannot be undone."]}),e[3]=x,e[4]=y):y=e[4];let g;e[5]!==h||e[6]!==y?(g=t.jsxs(Pe,{children:[h,y]}),e[5]=h,e[6]=y,e[7]=g):g=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(Le,{children:"Cancel"}),e[8]=b):b=e[8];const N=u!==1?"s":"";let l;e[9]!==u||e[10]!==m||e[11]!==N?(l=t.jsxs(Oe,{children:[b,t.jsxs($e,{onClick:m,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:["Delete ",u," connection",N]})]}),e[9]=u,e[10]=m,e[11]=N,e[12]=l):l=e[12];let j;e[13]!==g||e[14]!==l?(j=t.jsxs(Ee,{children:[g,l]}),e[13]=g,e[14]=l,e[15]=j):j=e[15];let d;return e[16]!==p||e[17]!==n||e[18]!==j?(d=t.jsx(Me,{open:n,onOpenChange:p,children:j}),e[16]=p,e[17]=n,e[18]=j,e[19]=d):d=e[19],d}function tn(v){return v._registryId?.includes("community-registry")===!0}function nn(v){const e=ae.c(58),{item:n,canManage:p,allConnections:u,connectedAppNames:m,connectingItemId:a,onNavigateConnected:h,onConnect:x}=v,[y,g]=W.useState(!1),[b,N]=W.useState(null);let l,j;e[0]!==m||e[1]!==n?(l=we(n)??"",j=m.has(l),e[0]=m,e[1]=n,e[2]=l,e[3]=j):(l=e[2],j=e[3]);const d=j,k=n._meta?.["mcp.mesh"],_=k?.friendlyName||k?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",D=n.server?.description||n.description||null;let U;e[4]!==n.server?.icons?.[0]?.src||e[5]!==n.server?.repository?(U=n.server?.icons?.[0]?.src||St(n.server?.repository)||null,e[4]=n.server?.icons?.[0]?.src,e[5]=n.server?.repository,e[6]=U):U=e[6];const F=U;let s;if(e[7]!==u||e[8]!==l){let S;e[10]!==l?(S=oe=>oe.connection_type!=="VIRTUAL"&&oe.app_name===l,e[10]=l,e[11]=S):S=e[11],s=u.filter(S),e[7]=u,e[8]=l,e[9]=s}else s=e[9];const A=s;let V;e[12]!==n?(V=tn(n),e[12]=n,e[13]=V):V=e[13];const $=V;let w,L;e[14]!==A||e[15]!==p||e[16]!==$||e[17]!==d||e[18]!==n||e[19]!==x||e[20]!==h?(w=()=>{if(d){const S=A[0];S&&h(S);return}p&&L()},L=()=>{$?(N("connect"),g(!0)):x(n)},e[14]=A,e[15]=p,e[16]=$,e[17]=d,e[18]=n,e[19]=x,e[20]=h,e[21]=w,e[22]=L):(w=e[21],L=e[22]);let B;e[23]!==n||e[24]!==x||e[25]!==b?(B=()=>{ne("connections_community_warning_confirmed",{registry_item_id:n.id}),g(!1),b==="connect"&&x(n),N(null)},e[23]=n,e[24]=x,e[25]=b,e[26]=B):B=e[26];const C=B;let P;e[27]!==D||e[28]!==F||e[29]!==_?(P={title:_,description:D,icon:F},e[27]=D,e[28]=F,e[29]=_,e[30]=P):P=e[30];let G;e[31]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(xe,{}),e[31]=G):G=e[31];let R;e[32]!==$||e[33]!==n._sourceIcon?(R=$&&n._sourceIcon&&t.jsx("img",{src:n._sourceIcon,alt:"Community",className:"size-4 rounded-sm object-contain"}),e[32]=$,e[33]=n._sourceIcon,e[34]=R):R=e[34];let X;e[35]!==p||e[36]!==a||e[37]!==L||e[38]!==d||e[39]!==n.id?(X=d?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}):p&&t.jsx(z,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:a!==null,onClick:S=>{S.stopPropagation(),L()},children:a===n.id?t.jsx(re,{size:14,className:"animate-spin"}):"Connect"}),e[35]=p,e[36]=a,e[37]=L,e[38]=d,e[39]=n.id,e[40]=X):X=e[40];let o;e[41]!==R||e[42]!==X?(o=t.jsxs("div",{className:"flex items-center gap-2",children:[R,X]}),e[41]=R,e[42]=X,e[43]=o):o=e[43];let f;e[44]!==w||e[45]!==o||e[46]!==P?(f=t.jsx(Ce,{connection:P,fallbackIcon:G,onClick:w,headerActionsAlwaysVisible:!0,headerActions:o}),e[44]=w,e[45]=o,e[46]=P,e[47]=f):f=e[47];let O;e[48]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(Pe,{children:[t.jsx(Te,{children:"Community MCP Server"}),t.jsx(Ie,{children:"This MCP server is from the Community MCP Registry and is not maintained or verified by Deco. Community servers may have varying levels of quality, security, and reliability. Proceed with caution and review the server details before connecting."})]}),e[48]=O):O=e[48];let H;e[49]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(Le,{children:"Cancel"}),e[49]=H):H=e[49];let E;e[50]!==C?(E=t.jsxs(Ee,{children:[O,t.jsxs(Oe,{children:[H,t.jsx($e,{onClick:C,children:"Continue"})]})]}),e[50]=C,e[51]=E):E=e[51];let c;e[52]!==y||e[53]!==E?(c=t.jsx(Me,{open:y,onOpenChange:g,children:E}),e[52]=y,e[53]=E,e[54]=c):c=e[54];let T;return e[55]!==f||e[56]!==c?(T=t.jsxs(t.Fragment,{children:[f,c]}),e[55]=f,e[56]=c,e[57]=T):T=e[57],T}function sn({listState:v,activeTab:e,typeFilter:n,statusFilter:p,registryFilter:u,enabledRegistries:m}){const{org:a}=Ne(),h=ct(),x=ke(),{data:y}=De.useSession(),g=qe(),b=zt(v),N=yt(),{granted:l}=ye("connections:manage"),{granted:j}=ye("agents:manage"),[d,k]=W.useState(new Set),_=d.size>0,[D,U]=W.useState(!1),[F,s]=W.useState(!1),[A,V]=W.useState(null),$=Bt(),w=b.filter(r=>!(n!=="ALL"&&r.connection_type!==n||p!=="ALL"&&r.status!==p)),L=gt(w),B=r=>{k(i=>{const M=new Set(i);return M.has(r)?M.delete(r):M.add(r),M})},C=()=>{k(new Set)},P=Ae(m,v.searchTerm),G=P.items,R=vt(P.loadMore,P.hasMore,P.isLoadingMore),X=new Set(b.filter(r=>r.app_name).map(r=>r.app_name)),o=u==="ALL"||m.some(r=>r.id===u)?u:"ALL",f=v.search.length>0,O=e==="all"||f?G.filter(r=>{if(o!=="ALL"&&r._registryId!==o)return!1;if(f){const i=we(r);if(i&&X.has(i))return!1}return!0}):[],H=e==="connected"||f?L:[],E=async r=>{if(!(!a||!y?.user?.id)){ne("connection_add_clicked",{action:"connect_new",registry_item_id:r.id,source:"connections_page"}),V(r.id);try{const i=bt(r,a.id,y.user.id,{remoteIndex:0}),M=i.connection_type==="STDIO",I=!!i.connection_url,q=M&&i.connection_headers&&typeof i.connection_headers=="object"&&"command"in i.connection_headers;if(!I&&!q){Q.error("This MCP Server cannot be connected: no connection method available"),V(null);return}const{id:K}=await g.create.mutateAsync(i),ve=new URL(`/api/${a.slug}/mcp/${K}`,window.location.origin),_e=await rt({url:ve.href,token:null,orgId:a.id});if(_e.supportsOAuth&&!_e.isAuthenticated){const{token:de,tokenInfo:se,error:fe}=await lt({connectionId:K,orgSlug:a.slug,scope:"offline_access"});if(fe||!de){ne("connection_oauth_failed",{connection_id:K,flow:"connections_page_connect",error:fe??"no_token"}),Q.error(`Authentication failed: ${fe??"no token received"}`);return}else{if(ne("connection_oauth_succeeded",{connection_id:K,flow:"connections_page_connect"}),se)try{(await fetch(`/api/${a.slug}/connections/${K}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:se.accessToken,refreshToken:se.refreshToken,expiresIn:se.expiresIn,scope:se.scope,clientId:se.clientId,clientSecret:se.clientSecret,tokenEndpoint:se.tokenEndpoint})})).ok?await g.update.mutateAsync({id:K,data:{}}):await g.update.mutateAsync({id:K,data:{connection_token:de}})}catch{await g.update.mutateAsync({id:K,data:{connection_token:de}})}else await g.update.mutateAsync({id:K,data:{connection_token:de}});await h.invalidateQueries({queryKey:dt.isMCPAuthenticated(ve.href,null)}),Q.success("Authentication successful")}}Q.success("Connected successfully")}catch(i){Q.error(`Failed to connect: ${i instanceof Error?i.message:String(i)}`)}finally{V(null)}}},c=Ft({connectionId:Vt,orgId:a.id,orgSlug:a.slug}),T=()=>{h.invalidateQueries({predicate:r=>{const i=r.queryKey;return i[1]===a.id&&i[3]==="collection"&&i[4]==="CONNECTIONS"}})},S=async()=>{U(!1);const r=[...d];ne("connections_bulk_delete",{count:r.length});let i=0;for(const M of r)try{(await c.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:M,force:!0}})).isError||i++}catch{}T(),Q.success(`Deleted ${i} connection${i!==1?"s":""}`),C()},oe=async r=>{const i=[...d];ne("connections_bulk_status_toggled",{count:i.length,to_status:r});let M=0;for(const I of i)try{await g.update.mutateAsync({id:I,data:{status:r}}),M++}catch{}T(),Q.success(`${r==="active"?"Enabled":"Disabled"} ${M} connection${M!==1?"s":""}`),C()},ge=async r=>{const i=$.find(q=>q.id===r);if(!i||!c)return;ne("connections_bulk_add_to_agent",{agent_id:r,count:d.size});const M=new Set(i.connections.map(q=>q.connection_id)),I=[...d].filter(q=>!M.has(q)).map(q=>({connection_id:q,selected_tools:null,selected_resources:null,selected_prompts:null}));if(I.length===0){Q.info("All selected connections are already in that agent");return}try{await c.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:r,data:{connections:[...i.connections,...I]}}}),h.invalidateQueries({predicate:q=>{const K=q.queryKey;return K[1]===a.id&&K[3]==="collection"&&K[4]==="VIRTUAL_MCP"}}),Q.success(`Added ${I.length} connection${I.length!==1?"s":""} to "${i.title}"`),C()}catch{Q.error("Failed to add connections to agent")}};return t.jsxs(t.Fragment,{children:[t.jsx(Ct,{...N}),t.jsx(en,{open:D,onOpenChange:U,count:d.size,onConfirm:S}),t.jsx(Zt,{open:F,onOpenChange:s,agents:$,onConfirm:ge}),P.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(re,{size:32,className:"animate-spin text-muted-foreground"})}):t.jsx("div",{children:(f?O.length===0&&w.length===0:e==="all"?O.length===0:w.length===0)?t.jsx(ft,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:"No Connections found",description:v.search?`No Connections match "${v.search}"`:l?"Create a connection to get started.":"Ask an organization admin to add one."}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[H.map(r=>{if(r.type==="group")return t.jsx(Gt,{group:r,onOpen:()=>{x({to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:r.key}})},selectionMode:_,selectedIds:d,onToggleSelect:B},r.key);const i=r.connection,M=d.has(i.id);return t.jsx(Ce,{connection:i,fallbackIcon:t.jsx(xe,{}),onClick:()=>_?B(i.id):x({to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:pe(i)}}),className:le(M&&"ring-2 ring-primary bg-primary/5"),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1",children:[_?t.jsx(ze,{checked:M,onCheckedChange:()=>B(i.id),onClick:I=>I.stopPropagation()}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}),t.jsx("div",{className:le("overflow-hidden transition-all duration-150 ease-out",_?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100"),children:t.jsxs(Ke,{children:[t.jsx(We,{asChild:!0,children:t.jsx(z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:I=>I.stopPropagation(),children:t.jsx(Ge,{size:20})})}),t.jsxs(Xe,{align:"end",onClick:I=>I.stopPropagation(),children:[t.jsxs(he,{onClick:I=>{I.stopPropagation(),x({to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:pe(i)}})},children:[t.jsx(Qe,{size:16}),"Open"]}),(l||j)&&t.jsxs(he,{onClick:I=>{I.stopPropagation(),B(i.id)},children:[t.jsx(Ht,{size:16}),"Select"]}),l&&t.jsxs(he,{variant:"destructive",onClick:I=>{I.stopPropagation(),N.requestDelete(i)},children:[t.jsx(Ye,{size:16}),"Delete"]})]})]})})]})},i.id)}),O.map(r=>t.jsx(nn,{item:r,canManage:l,allConnections:b,connectedAppNames:X,connectingItemId:A,onNavigateConnected:i=>x({to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:pe(i)}}),onConnect:E},`catalog-${r._registryId}:${r.id}`)),(e==="all"||f)&&m.length>0&&t.jsx("div",{ref:R,className:"col-span-full h-4"}),(e==="all"||f)&&P.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(re,{size:24,className:"animate-spin text-muted-foreground"})})]})}),_&&t.jsx(Yt,{count:d.size,total:w.length,canManage:l,canManageAgents:j,onSelectAll:()=>{k(new Set(w.map(r=>r.id)))},onDeselectAll:()=>k(new Set),onDelete:()=>U(!0),onAddToAgent:()=>s(!0),onToggleStatus:oe,onCancel:C})]})}function on(){const{org:v}=Ne(),e=ke(),n=tt({strict:!1}),{data:p}=De.useSession(),{stdioEnabled:u}=nt(),m=Pt(),{granted:a}=ye("connections:manage"),h=_t({namespace:v.slug,resource:"connections"}),x=qe(),[y,g]=st(ot.connectionsTab(v.slug),o=>n.tab==="all"||n.tab==="connected"?n.tab:o??"all"),[b,N]=W.useState("ALL"),[l,j]=W.useState("ALL"),[d,k]=W.useState("ALL"),_=xt(),U=Ae(_,h.searchTerm).items,F=h.search!==h.searchTerm,s=it({resolver:at(Kt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),A=s.watch("ui_type"),V=s.watch("connection_url"),$=s.watch("npx_package"),w=ue({uiType:A,connectionUrl:V??"",npxPackage:$??""})??be({uiType:A,connectionUrl:V??"",registryItems:U}),L=a&&n.action==="create",B=()=>{ne("connections_custom_dialog_opened",{source:"connections_page"}),e({to:"/$org/settings/connections",params:{org:v.slug},search:{action:"create"}})},C=()=>{e({to:"/$org/settings/connections",params:{org:v.slug},search:{}})},P=async o=>{let f,O=null,H=null,E=null;o.ui_type==="NPX"?(f="STDIO",O="",E=Xt(o.npx_package||"",o.env_vars||[])):o.ui_type==="STDIO"?(f="STDIO",O="",E=qt(o.stdio_command||"",o.stdio_args||"",o.stdio_cwd,o.env_vars||[])):(f=o.ui_type,O=o.connection_url||"",H=o.connection_token||null);const c=mt("conn");ne("connection_custom_created",{connection_type:f,ui_type:o.ui_type}),await x.create.mutateAsync({id:c,title:o.title,description:o.description||null,connection_type:f,connection_url:O,connection_token:H,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:p?.user?.id||"system",organization_id:v.id,icon:o.icon??null,app_name:null,app_id:null,connection_headers:E,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),C(),s.reset(),e({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:pe({app_name:null,connection_url:O,title:o.title,id:c})}})},G=o=>{o||(L&&C(),s.reset())},R=o=>{const f=o.trim();if(!f)return;const O=!!s.formState.dirtyFields.title,H=!!s.formState.dirtyFields.description,E=!!s.formState.dirtyFields.env_vars,c=S=>{if(S&&(!O&&!s.getValues("title").trim()&&S.title&&s.setValue("title",S.title,{shouldDirty:!1}),!H&&!(s.getValues("description")??"").trim()&&S.description&&s.setValue("description",S.description,{shouldDirty:!1}),!E&&S.envVarKeys?.length)){const oe=s.getValues("env_vars")??[],ge=new Set(oe.map(i=>i.key)),r=S.envVarKeys.filter(i=>!ge.has(i));r.length>0&&s.setValue("env_vars",[...oe,...r.map(i=>({key:i,value:""}))],{shouldDirty:!0})}},T=Wt(f);if(T&&u){s.setValue("ui_type","NPX",{shouldDirty:!0}),s.setValue("npx_package",T.packageName,{shouldDirty:!0}),s.setValue("connection_url","",{shouldDirty:!0}),s.setValue("connection_token",null,{shouldDirty:!0}),c(ue({uiType:"NPX",npxPackage:T.packageName}));return}if(f.startsWith("http://")||f.startsWith("https://")){const S=A==="HTTP"||A==="SSE"||A==="Websocket"?A:"HTTP";s.setValue("ui_type",S,{shouldDirty:!0}),s.setValue("connection_url",f,{shouldDirty:!0}),c(ue({uiType:S,connectionUrl:f})??be({uiType:S,connectionUrl:f,registryItems:U}));return}A==="NPX"&&c(ue({uiType:"NPX",npxPackage:f}))},X=a?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(z,{variant:"outline",onClick:B,children:[t.jsx(Je,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:"Custom Connection"})]})}):null;return t.jsx(t.Fragment,{children:t.jsxs(me,{children:[(()=>{const o="Create Connection",f="Create a custom connection in your organization. Fill in the details below.",O=s.formState.isSubmitting?"Saving...":"Create Connection",H=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(J,{control:s.control,name:"ui_type",render:({field:c})=>t.jsxs(Y,{children:[t.jsx(Z,{children:"Type *"}),t.jsxs(Lt,{value:c.value,onValueChange:c.onChange,children:[t.jsx(ee,{children:t.jsx(Ot,{children:t.jsx($t,{})})}),t.jsxs(Et,{children:[t.jsx(ce,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(ce,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(ce,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"Websocket"]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(ce,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(xe,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(ce,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ut,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(te,{})]})}),A==="NPX"&&t.jsx(J,{control:s.control,name:"npx_package",render:({field:c})=>t.jsxs(Y,{children:[t.jsx(Z,{children:"NPM Package *"}),t.jsx(ee,{children:t.jsx(ie,{placeholder:"@perplexity-ai/mcp-server",...c,value:c.value??"",onPaste:T=>{const S=T.clipboardData.getData("text");S&&(T.preventDefault(),s.setValue("npx_package",S.trim(),{shouldDirty:!0}),R(S))},onBlur:T=>{R(T.target.value),c.onBlur()}})}),t.jsx(te,{})]})}),A==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(J,{control:s.control,name:"stdio_command",render:({field:c})=>t.jsxs(Y,{children:[t.jsx(Z,{children:"Command *"}),t.jsx(ee,{children:t.jsx(ie,{placeholder:"node, bun, python...",...c,value:c.value??""})}),t.jsx(te,{})]})}),t.jsx(J,{control:s.control,name:"stdio_args",render:({field:c})=>t.jsxs(Y,{children:[t.jsx(Z,{children:"Arguments"}),t.jsx(ee,{children:t.jsx(ie,{placeholder:"arg1 arg2 --flag value",...c,value:c.value??""})}),t.jsx(te,{})]})})]}),t.jsx(J,{control:s.control,name:"stdio_cwd",render:({field:c})=>t.jsxs(Y,{children:[t.jsx(Z,{children:"Working Directory"}),t.jsx(ee,{children:t.jsx(ie,{placeholder:"/path/to/project (optional)",...c,value:c.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),t.jsx(te,{})]})})]}),(A==="NPX"||A==="STDIO")&&t.jsx(J,{control:s.control,name:"env_vars",render:({field:c})=>t.jsxs(Y,{children:[t.jsx(Z,{children:"Environment Variables"}),t.jsx(ee,{children:t.jsx(Rt,{value:c.value??[],onChange:c.onChange})}),t.jsx(te,{})]})}),A!=="NPX"&&A!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(J,{control:s.control,name:"connection_url",render:({field:c})=>t.jsxs(Y,{children:[t.jsx(Z,{children:"URL *"}),t.jsx(ee,{children:t.jsx(ie,{placeholder:"https://example.com/mcp",...c,value:c.value??"",onPaste:T=>{const S=T.clipboardData.getData("text");S&&(T.preventDefault(),s.setValue("connection_url",S.trim(),{shouldDirty:!0}),R(S))},onBlur:T=>{R(T.target.value),c.onBlur()}})}),t.jsx(te,{})]})}),t.jsx(J,{control:s.control,name:"connection_token",render:({field:c})=>t.jsxs(Y,{children:[t.jsx(Z,{children:w?.token?.label??"Token (optional)"}),t.jsx(ee,{children:t.jsx(ie,{type:"password",placeholder:w?.token?.placeholder??"Bearer token or API key",...c,value:c.value??""})}),w?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[w.token.helperText,w.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),t.jsx(te,{})]})})]}),t.jsx(J,{control:s.control,name:"title",render:({field:c})=>t.jsxs(Y,{children:[t.jsx(Z,{children:"Name *"}),t.jsx(ee,{children:t.jsx(ie,{placeholder:"My Connection",...c})}),t.jsx(te,{})]})}),t.jsx(J,{control:s.control,name:"description",render:({field:c})=>t.jsxs(Y,{children:[t.jsx(Z,{children:"Description"}),t.jsx(ee,{children:t.jsx(Mt,{placeholder:"A brief description of this connection",rows:3,...c,value:c.value??""})}),t.jsx(te,{})]})})]}),E=L;return m?t.jsx(Nt,{open:E,onOpenChange:G,children:t.jsxs(kt,{className:"max-h-[90vh]",children:[t.jsx(Dt,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(At,{children:o}),t.jsx(wt,{className:"mt-1",children:f})]}),t.jsx(Tt,{asChild:!0,children:t.jsx(z,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(Ze,{size:16})})})]})}),t.jsx(Se,{...s,children:t.jsxs("form",{onSubmit:s.handleSubmit(P),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:H}),t.jsx(It,{children:t.jsx(z,{type:"submit",disabled:s.formState.isSubmitting,className:"w-full",children:O})})]})})]})}):t.jsx(Fe,{open:E,onOpenChange:G,children:t.jsxs(Ve,{className:"sm:max-w-[525px]",children:[t.jsxs(Be,{children:[t.jsx(Ue,{children:o}),t.jsx(He,{children:f})]}),t.jsx(Se,{...s,children:t.jsxs("form",{onSubmit:s.handleSubmit(P),children:[t.jsx("div",{className:"py-4",children:H}),t.jsxs(Re,{children:[t.jsx(z,{type:"button",variant:"outline",onClick:()=>G(!1),children:"Cancel"}),t.jsx(z,{type:"submit",disabled:s.formState.isSubmitting,className:"min-w-40",children:O})]})]})})]})})})(),t.jsx(me.Content,{children:t.jsx(me.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(me.Title,{children:"Connections"}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pt,{value:h.search,onChange:h.setSearch,placeholder:"Search for a connection",className:"w-full md:w-[375px]",onKeyDown:o=>{o.key==="Escape"&&(h.setSearch(""),o.target.blur())}}),t.jsx(ut,{sortKey:h.sortKey,sortDirection:h.sortDirection,onSort:h.handleSort,sortOptions:[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"connection_type",label:"Type"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],filters:[{label:"Type",value:b,onChange:o=>N(o||"ALL"),options:[{id:"ALL",label:"All"},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:"Status",value:l,onChange:o=>j(o||"ALL"),options:[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"},{id:"error",label:"Error"}]},..._.length>1?[{label:"Registry",value:d,onChange:o=>k(o||"ALL"),options:[{id:"ALL",label:"All registries"},..._.map(o=>({id:o.id,label:o.id.includes("community-registry")?"Community MCP Registry":o.title}))]}]:[]]})]}),X]}),t.jsx(ht,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:y,onTabChange:o=>{const f=o;f!==y&&ne("connections_page_tab_changed",{to_tab:f}),g(f)}}),t.jsx(W.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(re,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:F?.5:1,transition:F?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:F?"none":"auto"},children:t.jsx(sn,{listState:h,activeTab:y,typeFilter:b,statusFilter:l,registryFilter:d,enabledRegistries:_})})})]})})})]})})}function Es(){const v=ae.c(1);let e;return v[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(et,{children:t.jsx(W.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(re,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(on,{})})}),v[0]=e):e=v[0],e}export{Es as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as n,j as i,co as g,c,bx as u,d3 as m,d4 as x,cp as j,cq as N,d5 as b,d6 as h}from"./index-0jxZXjT_.js";import{i as D}from"./X-BwvdKywg.js";function C(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(b,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(N,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(D,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(h,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function w(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(u,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function T(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(m,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{C as D,w as a,T as b,B as c,R as d,E as e,v as f,y as g,k as h};
|