decocms 4.372.2 → 4.372.3
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-CBmZyziw.js → AlertCircle-CMjsP_Tk.js} +1 -1
- package/dist/client/assets/{AreaChart-S0mQzrWT.js → AreaChart-Bh_grNQZ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B69K0kVk.js → ArrowLeft-CjYy5Nhj.js} +1 -1
- package/dist/client/assets/{ArrowRight-xPNMNz_B.js → ArrowRight-CLncCNat.js} +1 -1
- package/dist/client/assets/{ArrowUp-u0dcFMS5.js → ArrowUp-Cii1LHW7.js} +1 -1
- package/dist/client/assets/{CartesianChart-C3sk-6j9.js → CartesianChart-CD-5y_pX.js} +1 -1
- package/dist/client/assets/{Check-B1dsRB6C.js → Check-B3RSsr_D.js} +1 -1
- package/dist/client/assets/{CheckCircle-DWLeIAIi.js → CheckCircle-DHXQFnpK.js} +1 -1
- package/dist/client/assets/{ChevronRight-B6hcwUgO.js → ChevronRight-USKkhEpL.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Cyo58PlY.js → ChevronSelectorVertical-DpRb2z1l.js} +1 -1
- package/dist/client/assets/{ChevronUp-CLfesB4Y.js → ChevronUp-DiYhGG4T.js} +1 -1
- package/dist/client/assets/{Copy01-BmdYCu9M.js → Copy01-nMxlBfeT.js} +1 -1
- package/dist/client/assets/{CreditCard01-CwXLRxxa.js → CreditCard01-CWXVH3ZM.js} +1 -1
- package/dist/client/assets/{Database01-DtsDBLPS.js → Database01-C0YJpjc3.js} +1 -1
- package/dist/client/assets/{DotsVertical-CVHL4KPF.js → DotsVertical-CsjwfYzf.js} +1 -1
- package/dist/client/assets/{Download01-CSXusgOH.js → Download01-BRrSA3Yx.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Cr0hYOrs.js → ErrorBarContext-fXvhmekg.js} +1 -1
- package/dist/client/assets/{Eye-cBhNaih2.js → Eye-Dyg2WPG4.js} +1 -1
- package/dist/client/assets/{File02-BhN-1ALj.js → File02-BvR-HYxK.js} +1 -1
- package/dist/client/assets/{GitBranch01--s8uEzME.js → GitBranch01-rWb2SJK9.js} +1 -1
- package/dist/client/assets/{Globe01-fgEMsm16.js → Globe01-D6FaaFR2.js} +1 -1
- package/dist/client/assets/{HardDrive-TyjleYaj.js → HardDrive-DNTPLPT4.js} +1 -1
- package/dist/client/assets/{Image01-O24XNmwN.js → Image01-CxnjAzbb.js} +1 -1
- package/dist/client/assets/{Key01-CtPEI4Eg.js → Key01-CIXwHMRo.js} +1 -1
- package/dist/client/assets/{Line-DL6BR25n.js → Line-YO4Ozgbt.js} +1 -1
- package/dist/client/assets/{Link01-CcL48lHm.js → Link01-C0FvgZZB.js} +1 -1
- package/dist/client/assets/{LinkExternal01-rfdoJ7W0.js → LinkExternal01-AWlhN5o7.js} +1 -1
- package/dist/client/assets/{MessageCircle01-C-CyP7IO.js → MessageCircle01-DBcg2aiD.js} +1 -1
- package/dist/client/assets/{Monitor01-D5zc1Ggz.js → Monitor01-Ccs1gh2Z.js} +1 -1
- package/dist/client/assets/{Package-BUXYnAsJ.js → Package-nTbucmaQ.js} +1 -1
- package/dist/client/assets/{Palette-BCFMI_Wq.js → Palette-DSdn1Xis.js} +1 -1
- package/dist/client/assets/{Play-CKEbdlIO.js → Play-lMuWOObF.js} +1 -1
- package/dist/client/assets/{Plus-DhTGO6OU.js → Plus-CVauOqLT.js} +1 -1
- package/dist/client/assets/{Printer-Cqaundx-.js → Printer-CvyxF9Jo.js} +1 -1
- package/dist/client/assets/{SearchLg-Cqrhx8lj.js → SearchLg-BrrPVuXr.js} +1 -1
- package/dist/client/assets/{SearchMd-fdzDozsD.js → SearchMd-C45D2PMI.js} +1 -1
- package/dist/client/assets/{Sector-jcjEFxz0.js → Sector-9mXbxJ9i.js} +1 -1
- package/dist/client/assets/{Settings02-BQWj4mrx.js → Settings02-Cyf85ea0.js} +1 -1
- package/dist/client/assets/{Share07-DL7pSoYx.js → Share07-wC47qn2E.js} +1 -1
- package/dist/client/assets/{Shield01-BwfDPRaf.js → Shield01-CqB4I7qm.js} +1 -1
- package/dist/client/assets/{Stars01-OOrCszDj.js → Stars01-oAh9h5b5.js} +1 -1
- package/dist/client/assets/{Sun-DbDrPFGS.js → Sun-0Ied-kyZ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-D-erjhEy.js → SwitchHorizontal01-DpXsFGyJ.js} +1 -1
- package/dist/client/assets/{Tool01-C1iMp6Qn.js → Tool01-DouqPjim.js} +1 -1
- package/dist/client/assets/{Tool02-C0Kk7KSA.js → Tool02-CATStXCy.js} +1 -1
- package/dist/client/assets/{Trash01-UhB0CRb8.js → Trash01-nl-t4IoV.js} +1 -1
- package/dist/client/assets/{TrendUp01-CnwsmsBB.js → TrendUp01-BFAEMx9E.js} +1 -1
- package/dist/client/assets/{Upload01-CZDGBHSw.js → Upload01-B4Fqdkae.js} +1 -1
- package/dist/client/assets/{User01-fZfVT6XZ.js → User01-ClMaVCaJ.js} +1 -1
- package/dist/client/assets/{UserSquare-CxfIKRZH.js → UserSquare-B2lKdt4w.js} +1 -1
- package/dist/client/assets/{Users01-DtXUy7uu.js → Users01-BFhxJVhO.js} +1 -1
- package/dist/client/assets/{Users03-Dw5nWIKh.js → Users03-Y0Jco4zL.js} +1 -1
- package/dist/client/assets/{X-DdrxBhnS.js → X-CFCE4a-Q.js} +1 -1
- package/dist/client/assets/{XCircle-BmfJL_8e.js → XCircle-CleKT0Id.js} +1 -1
- package/dist/client/assets/{XClose-MLfi0Jji.js → XClose-BgzK-Dwz.js} +1 -1
- package/dist/client/assets/{Zap-DRR3UUhJ.js → Zap-B6zkqKWB.js} +1 -1
- package/dist/client/assets/{ZoomOut-7sZYwmin.js → ZoomOut-BPxprY2s.js} +1 -1
- package/dist/client/assets/{access-gate-C6q3nVJm.js → access-gate-Ds4n25mC.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-GCEfUHNn.js → add-connection-dialog-DZjTm9W3.js} +1 -1
- package/dist/client/assets/{agent-analytics-DCkhWf9p.js → agent-analytics-DmvdLg8B.js} +1 -1
- package/dist/client/assets/agent-app-BvmFdS4C.js +1 -0
- package/dist/client/assets/{agent-assets-ojJ8Xiqs.js → agent-assets-czUGY90q.js} +1 -1
- package/dist/client/assets/{agent-automation-B4eHDQrX.js → agent-automation-C5Kr5Oj3.js} +1 -1
- package/dist/client/assets/{agent-automations-ff2RUxFe.js → agent-automations-D-3-Opoc.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CcPIf5gR.js → agent-connect-sources-CjhmYssY.js} +1 -1
- package/dist/client/assets/agent-deck-BC5MWVm-.js +1 -0
- package/dist/client/assets/{agent-e2e-rPac5L3D.js → agent-e2e-DkL4Ltr6.js} +1 -1
- package/dist/client/assets/{agent-experiments-DaPdd-X9.js → agent-experiments--rXT-2aB.js} +1 -1
- package/dist/client/assets/agent-file-C3XkHLMm.js +1 -0
- package/dist/client/assets/{agent-git-DcEJ2X4i.js → agent-git-D4IYczGa.js} +1 -1
- package/dist/client/assets/{agent-hosting-DuNL_wpb.js → agent-hosting-DaIfm8Hu.js} +1 -1
- package/dist/client/assets/{agent-icon-CG9LA776.js → agent-icon-CczrFEe7.js} +1 -1
- package/dist/client/assets/agent-library-file-Dji653pU.js +1 -0
- package/dist/client/assets/{agent-monitor-BM-OnMxj.js → agent-monitor-C-HIyaF_.js} +1 -1
- package/dist/client/assets/{agent-overview-D6iBUiTw.js → agent-overview-cm15sxNU.js} +1 -1
- package/dist/client/assets/agent-settings-XmhY1FOi.js +1 -0
- package/dist/client/assets/{agent-site-editor-ejdHfOFM.js → agent-site-editor-DJSdtoNU.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-_Tz57RqE.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-_Pf4joQg.js → agent-site-editor-content-DOAcxz0t.js} +2 -2
- package/dist/client/assets/{agent-site-editor-preview-DjTBMAQa.js → agent-site-editor-preview-mg5Q6hoW.js} +3 -3
- package/dist/client/assets/agent-view-ClMILC98.js +1 -0
- package/dist/client/assets/{agent-view-guard-DXWg2Gk-.js → agent-view-guard-DHJpzCVR.js} +1 -1
- package/dist/client/assets/{agents-list-CKNjfI6O.js → agents-list-rKFF5b3o.js} +1 -1
- package/dist/client/assets/{ai-providers-DK9rldFg.js → ai-providers-jxGd6MbV.js} +1 -1
- package/dist/client/assets/{alert-CCseTQ3U.js → alert-U2IStW1f.js} +1 -1
- package/dist/client/assets/{alert-dialog-D1mw46Sk.js → alert-dialog-BI-B_8hq.js} +1 -1
- package/dist/client/assets/{api-keys-CKHrd_7x.js → api-keys-AIfL76r6.js} +1 -1
- package/dist/client/assets/api-keys-B6ry5Bc6.js +1 -0
- package/dist/client/assets/app-editor-BZKFeBmU.js +1 -0
- package/dist/client/assets/{asset-utils-D_zaQTaK.js → asset-utils-DhbLEVKo.js} +1 -1
- package/dist/client/assets/{auth-DD_Ixcci.js → auth-DhzAq_9m.js} +1 -1
- package/dist/client/assets/{auth-catchall-cbZs_0W-.js → auth-catchall-Dar7OygY.js} +1 -1
- package/dist/client/assets/{auth-entry-CnbW7-3f.js → auth-entry-CwWjlqGu.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Bdz_uyrq.js → auth-split-layout-DLFqjvPt.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-C-rkDcUs.js → authenticate-and-persist-oauth-DkJ4g-X5.js} +1 -1
- package/dist/client/assets/{automation-list-row-CR6JdgMc.js → automation-list-row-Btr-Kty6.js} +1 -1
- package/dist/client/assets/{automation-runs-CZTAHOWn.js → automation-runs-CnOOOwZJ.js} +1 -1
- package/dist/client/assets/automations-CtLmB1Eo.js +1 -0
- package/dist/client/assets/{autosend-Ui23lPKc.js → autosend-BberXmli.js} +1 -1
- package/dist/client/assets/{avatar-B4O8VfWG.js → avatar-C9HiP4eS.js} +1 -1
- package/dist/client/assets/{badge-Dt3iCXyZ.js → badge-Bu51Hlti.js} +1 -1
- package/dist/client/assets/{block-document-B4aPeXms.js → block-document-BLCekKXO.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-DHWKuZAa.js → blocks-preview-workspace-context-Bwmvvd4S.js} +1 -1
- package/dist/client/assets/{breadcrumb-C1f6kD30.js → breadcrumb-Dhdru7Jh.js} +1 -1
- package/dist/client/assets/{buckets-6ACibqOT.js → buckets-BndbOAGO.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-B6wx1rP9.js → build-improve-prompt-doc-Cedp3vV1.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-F9HNDtYy.js → bulk-category-panel-D3c_qJDk.js} +1 -1
- package/dist/client/assets/{calendar-vO7jAMoX.js → calendar-DIQx67oO.js} +1 -1
- package/dist/client/assets/{capability-load-error-H0rjgWhr.js → capability-load-error-CJMvYDf4.js} +1 -1
- package/dist/client/assets/{cards-kf5vSVVS.js → cards-BVw8sRdW.js} +1 -1
- package/dist/client/assets/category-editor-C7sRrVfl.js +1 -0
- package/dist/client/assets/{chart-BzMhag8P.js → chart-8nXuVw9P.js} +1 -1
- package/dist/client/assets/{chat-context-CyABXc7f.js → chat-context-tZCX_cqt.js} +1 -1
- package/dist/client/assets/{chat-draft-D7-8Bmdq.js → chat-draft-BCeqPSxA.js} +1 -1
- package/dist/client/assets/{checkbox-CtOL1W3M.js → checkbox-jLf7fBuW.js} +1 -1
- package/dist/client/assets/{choose-editor-BtO73yE_.js → choose-editor-Cbu3-nVC.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CoTXpnpD.js → cli-auth-success-D39z_FO3.js} +1 -1
- package/dist/client/assets/{client-icons-CQZdxqWS.js → client-icons-DpcP1bht.js} +1 -1
- package/dist/client/assets/{collapsible-pX1z8P9s.js → collapsible-CTgXdVQa.js} +1 -1
- package/dist/client/assets/{collection-detail-BZDl7xyG.js → collection-detail-BF7WM7Gn.js} +1 -1
- package/dist/client/assets/{collection-display-button-CbltoNVs.js → collection-display-button-C-4xB6xx.js} +1 -1
- package/dist/client/assets/{collection-search-CDJVma9q.js → collection-search-J9Bt25gS.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DcmT6WdT.js → collection-table-wrapper-DBeauaNS.js} +1 -1
- package/dist/client/assets/{collection-tabs-BxK4CJTN.js → collection-tabs-CrXIJeNf.js} +1 -1
- package/dist/client/assets/{combobox-DXVa1WHx.js → combobox-BHrqHmge.js} +1 -1
- package/dist/client/assets/{command-DQAiupfD.js → command-B-XD29Nx.js} +1 -1
- package/dist/client/assets/{command-palette-store-BAKFtSbo.js → command-palette-store-DK-56E2K.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BTo1SG3V.js → companion-mcps-section-xmRpNJBK.js} +1 -1
- package/dist/client/assets/{connect-D69kUPQ6.js → connect-D4qCE3TM.js} +1 -1
- package/dist/client/assets/{connect-layout-CCzmI4dZ.js → connect-layout-DGO84ImO.js} +1 -1
- package/dist/client/assets/{connection-HbykX7y1.js → connection-DD0omVHZ.js} +1 -1
- package/dist/client/assets/{connection-card-CVCUQ3aW.js → connection-card-fcMCwbTh.js} +1 -1
- package/dist/client/assets/{connection-detail-26OGwpTw.js → connection-detail-DS015J4e.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BbPIPH0F.js → connection-form-helpers-CHlcdgAK.js} +1 -1
- package/dist/client/assets/{connections-DfOC15A2.js → connections-C98FMYyY.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CQqrzhNr.js → create-organization-dialog-1mI4Ad1B.js} +1 -1
- package/dist/client/assets/{decofile-api-D4EZXGFG.js → decofile-api-BNWbEMR6.js} +1 -1
- package/dist/client/assets/{decopilot-CS4SGQVN.js → decopilot-BvepxP_-.js} +1 -1
- package/dist/client/assets/{dialog-DqEzjMAL.js → dialog-llvhXw2o.js} +1 -1
- package/dist/client/assets/{discover-BzlMmTOv.js → discover-DNPHmIfF.js} +1 -1
- package/dist/client/assets/{domain-settings-B8sQXZqE.js → domain-settings-CXxEmIjB.js} +1 -1
- package/dist/client/assets/{download-app-dialog-BAvoyDUp.js → download-app-dialog-D_4eQbbs.js} +1 -1
- package/dist/client/assets/{drawer-CcQRz4y-.js → drawer-BIjkXMV3.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B91kH2ef.js → dropdown-menu-C5iafa8S.js} +1 -1
- package/dist/client/assets/{editor-B5kh_87R.js → editor-D4Ls62vg.js} +1 -1
- package/dist/client/assets/{empty-state-DxrEQWmF.js → empty-state-BdiOfgle.js} +1 -1
- package/dist/client/assets/{empty-state-CsX1FA1W.js → empty-state-CyICQznD.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Chw2Aon_.js → extract-connection-data-Dbm_cKaX.js} +1 -1
- package/dist/client/assets/{feature-gate-BGURuoWY.js → feature-gate-Bp7Cydio.js} +1 -1
- package/dist/client/assets/{feature-paywall-BnPg6xWO.js → feature-paywall-DEy2mpV2.js} +1 -1
- package/dist/client/assets/{file-explorer-CzROIsmv.js → file-explorer-Bs7B2-rr.js} +1 -1
- package/dist/client/assets/{file-preview-4gOrulnp.js → file-preview-CARebwHJ.js} +1 -1
- package/dist/client/assets/{file-share-button-4P1UpMsl.js → file-share-button-Dk1ugrdV.js} +1 -1
- package/dist/client/assets/{file-type-icon-ajQojKQT.js → file-type-icon-C9Qn36v4.js} +1 -1
- package/dist/client/assets/{folder-icon-C8L4j1L7.js → folder-icon-BLBZBD_a.js} +1 -1
- package/dist/client/assets/{form-DMzpEXyE.js → form-CSXgIHLz.js} +1 -1
- package/dist/client/assets/{gateway-client-D6HrO7KA.js → gateway-client-BuiOykcN.js} +1 -1
- package/dist/client/assets/{general-DzSsaIiU.js → general-BYFfG0fF.js} +1 -1
- package/dist/client/assets/{github-icon-DDXLGNgI.js → github-icon-huXDOAgf.js} +1 -1
- package/dist/client/assets/{home-C7Nc_ynT.js → home-DTaaCW3K.js} +1 -1
- package/dist/client/assets/{hooks-B2j1s3nm.js → hooks-BoX5BC-f.js} +1 -1
- package/dist/client/assets/{hooks-Cb68QwoE.js → hooks-DZOMRp7D.js} +1 -1
- package/dist/client/assets/{index-CKrLkZIn.js → index-2eKztu7k.js} +1 -1
- package/dist/client/assets/{index-CxD5N3g_.js → index-2gtoysbs.js} +1 -1
- package/dist/client/assets/{index-JOfrpEq3.js → index-BD213WLU.js} +1 -1
- package/dist/client/assets/{index-BZ60Q2vF.js → index-BH7uCYoT.js} +1 -1
- package/dist/client/assets/{index-Df1kyaWx.js → index-BWpNlf6e.js} +1 -1
- package/dist/client/assets/{index-CwzlBp8e.js → index-Bb-Re5q8.js} +1 -1
- package/dist/client/assets/{index-CUYQAaOU.js → index-CSd_k8Np.js} +1 -1
- package/dist/client/assets/{index-rDWCi11h.js → index-CiMUXLco.js} +1 -1
- package/dist/client/assets/{index-CQDDfSqE.js → index-D4RUT3q0.js} +1 -1
- package/dist/client/assets/{index-Lc7giPgZ.js → index-DWw5wi2G.js} +1 -1
- package/dist/client/assets/{index-Byp-1yx-.js → index-D_X-LIyA.js} +1 -1
- package/dist/client/assets/{index-zEbfx_2K.js → index-Dc7hzqoi.js} +2 -2
- package/dist/client/assets/{index-CZK4_x46.js → index-DiULBiX9.js} +1 -1
- package/dist/client/assets/{index-C1mE9nWp.js → index-DqT4mG5l.js} +1 -1
- package/dist/client/assets/{index-redirect-BuWy9Z6S.js → index-redirect-BQTLrDGT.js} +1 -1
- package/dist/client/assets/{index-Diborc_9.js → index-tj4CWdxr.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-sPk7QDR1.js → infiniteQueryObserver-CjWlcBHD.js} +1 -1
- package/dist/client/assets/{infra-billing-C4xv4inC.js → infra-billing-D6jrbNxA.js} +1 -1
- package/dist/client/assets/{input-BYddSsu_.js → input-DXlaTX4w.js} +1 -1
- package/dist/client/assets/{input-C_NYYd89.js → input-D_FfvHr0.js} +1 -1
- package/dist/client/assets/{input-wjpeVemQ.js → input-uIV5S_EX.js} +1 -1
- package/dist/client/assets/{integration-icon-CdbMa5vl.js → integration-icon-BeEdjsn9.js} +1 -1
- package/dist/client/assets/{label-DeeZ_khO.js → label-BMxIRiEr.js} +1 -1
- package/dist/client/assets/{last-preview-page-Bs7lLAHU.js → last-preview-page-B_H0ubHa.js} +1 -1
- package/dist/client/assets/{layout-CGB6UTjd.js → layout-Dli4i2a0.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-KBnG2EVw.js → legacy-agents-deep-CoiLV3QJ.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DpIQ14bR.js → legacy-main-redirect-BZ4nzqkQ.js} +1 -1
- package/dist/client/assets/{library-CceKr55E.js → library-Dste3SFA.js} +1 -1
- package/dist/client/assets/{login-Ch-rMjOh.js → login-C4Dx9xMO.js} +1 -1
- package/dist/client/assets/{markdown-CxV2eB4e.js → markdown-DGWjAeXL.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BV8BWgXU.js → mcp-app-renderer-BTjC7Gse.js} +1 -1
- package/dist/client/assets/{mcp-oauth-YLkkgmwu.js → mcp-oauth-C4khbNJJ.js} +1 -1
- package/dist/client/assets/{members-Cf9YeQtc.js → members-CRtKrUle.js} +1 -1
- package/dist/client/assets/{message-templates-BdE6dkny.js → message-templates-B8kOo0Kk.js} +1 -1
- package/dist/client/assets/{mini-report-page-BGQ5cRDa.js → mini-report-page-Ci4cxCz8.js} +1 -1
- package/dist/client/assets/{mock-board-BKlTNwzx.js → mock-board-DRa60E6i.js} +3 -3
- package/dist/client/assets/{monaco-editor-CM8IdJ5Z.js → monaco-editor-CMRYkmyb.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B8YXJIqJ.js → monitoring-stats-row-PncjnNwy.js} +1 -1
- package/dist/client/assets/{multi-select-CAw7QXMy.js → multi-select-DzAZ8Rb8.js} +1 -1
- package/dist/client/assets/{mustache-BYUJMv8S.js → mustache-CPZS2ebG.js} +1 -1
- package/dist/client/assets/{oauth-callback-Cx9sp11t.js → oauth-callback-CETK2WZB.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Daw9NS6o.js → oauth-callback-ai-provider-DqbbngEF.js} +1 -1
- package/dist/client/assets/{onboarding-4smvmYpm.js → onboarding-B5zAGi2B.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BaFWHjow.js → optimistic-project-sidebar-views-CrZ9OeIk.js} +1 -1
- package/dist/client/assets/{org-file-open-context--Mwc-yMq.js → org-file-open-context-BCUpiY_R.js} +1 -1
- package/dist/client/assets/{organization-choice-CDn7Mna7.js → organization-choice-BNulT5zU.js} +1 -1
- package/dist/client/assets/{orgs-D-lV9-X0.js → orgs-B1TBklWZ.js} +1 -1
- package/dist/client/assets/{page-seo-form-BIFPULvd.js → page-seo-form-BrHgBXF1.js} +1 -1
- package/dist/client/assets/{pair-DQUrmxV6.js → pair-B46EBBjF.js} +1 -1
- package/dist/client/assets/{plan-ladder-87xBAt0E.js → plan-ladder-B2pv9Y73.js} +1 -1
- package/dist/client/assets/{popover-Bq4WOviU.js → popover-yk_ePqAA.js} +1 -1
- package/dist/client/assets/{post-calendar-NmXDxp_f.js → post-calendar-Bx8YiCbs.js} +1 -1
- package/dist/client/assets/{post-editor-CyV8-7qm.js → post-editor-B1fD7o8C.js} +1 -1
- package/dist/client/assets/{preview-content-lLPCW88q.js → preview-content-CfbsbElk.js} +1 -1
- package/dist/client/assets/{preview-dialog-CYHTLvBD.js → preview-dialog-CA2C3DS4.js} +1 -1
- package/dist/client/assets/{primitives-B7wT1jpV.js → primitives-JiGRyPkw.js} +1 -1
- package/dist/client/assets/{profile-2MWkYt1W.js → profile-CDR0JVtv.js} +1 -1
- package/dist/client/assets/{project-app-view-DnD6ABvi.js → project-app-view-8VWdrWMf.js} +1 -1
- package/dist/client/assets/{project-feed-9ymkpfIM.js → project-feed-ChJRKxhk.js} +1 -1
- package/dist/client/assets/{project-icon-CnsTRQs7.js → project-icon-MWmzrrm8.js} +1 -1
- package/dist/client/assets/project-reports-D31utlHg.js +1 -0
- package/dist/client/assets/project-tasks-D2AAgqxo.js +1 -0
- package/dist/client/assets/{prompts-BTWUWzEW.js → prompts-4lILOzK9.js} +1 -1
- package/dist/client/assets/record-editor-DPAL8Tq5.js +1 -0
- package/dist/client/assets/{redirect-editor-BrOsxFBz.js → redirect-editor-EPs_GX-_.js} +1 -1
- package/dist/client/assets/registry-Dw8UrRRZ.js +2 -0
- package/dist/client/assets/{registry-layout-ybJm-zJ1.js → registry-layout-CC2lewiS.js} +1 -1
- package/dist/client/assets/{reports-gjPyOi1V.js → reports-BpxYdv2_.js} +1 -1
- package/dist/client/assets/reports-Ch9UvBcS.js +1 -0
- package/dist/client/assets/{reports-onboarding-zrsVhRJJ.js → reports-onboarding-Dhm8IBuD.js} +1 -1
- package/dist/client/assets/{reports-tab-CSxOpMBu.js → reports-tab-BJWrZp37.js} +2 -2
- package/dist/client/assets/{repositories-DhB53p4v.js → repositories-CMIGVJwC.js} +1 -1
- package/dist/client/assets/{repository-import-picker-G5-hX7A2.js → repository-import-picker-DhVniDI2.js} +1 -1
- package/dist/client/assets/{repository-picker-CqYIk9Jh.js → repository-picker-BkoSI-jm.js} +1 -1
- package/dist/client/assets/{require-capability-ClQfFfk3.js → require-capability-CmtOZnXt.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DSCX2iMO.js → required-auth-layout-RoMNnMPO.js} +1 -1
- package/dist/client/assets/{reset-password-BwIVBrTT.js → reset-password-BeUL8IgX.js} +1 -1
- package/dist/client/assets/{resizable-Cfhvj7Gy.js → resizable-Bt7dvMCc.js} +1 -1
- package/dist/client/assets/{review-settings-DYJgy9wi.js → review-settings-Cx_Yzx40.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-D3Q8eCOs.js → rich-text-link-control-CHsxXHIo.js} +1 -1
- package/dist/client/assets/{roles-IFbGtvaS.js → roles-BNleKwt9.js} +1 -1
- package/dist/client/assets/{route-BPQK-oME.js → route-CHqG9ihd.js} +1 -1
- package/dist/client/assets/{route-3RXQg1rv.js → route-DqJoK5dW.js} +1 -1
- package/dist/client/assets/{route-Dio936vS.js → route-x8jgkj5T.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-DOljNlCw.js → runnable-block-editor-xmOnaiFL.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-tfkoXu0L.js → sandbox-lifecycle-context-C7VKOJoV.js} +1 -1
- package/dist/client/assets/{schema-CpmuStS2.js → schema-1zAO-l7e.js} +1 -1
- package/dist/client/assets/{scroll-area-BUwrzwMz.js → scroll-area-C-wtbVS1.js} +1 -1
- package/dist/client/assets/{search-input-CT4D4zLR.js → search-input-Pobww52G.js} +1 -1
- package/dist/client/assets/{secrets-DS5_dizq.js → secrets-BF5nuoR4.js} +1 -1
- package/dist/client/assets/{sections-editor-BxFRL2DR.js → sections-editor-B1LpXw4X.js} +1 -1
- package/dist/client/assets/{select-5CD79m_H.js → select-BkKPcZFe.js} +1 -1
- package/dist/client/assets/{select-model-BBl_olhQ.js → select-model-DPv-zVVj.js} +1 -1
- package/dist/client/assets/{seo-editor-pCv-C3du.js → seo-editor-9G7mQFJ5.js} +1 -1
- package/dist/client/assets/{settings-tab-BDnT7VBW.js → settings-tab-D1V5Uszb.js} +1 -1
- package/dist/client/assets/{sheet-D-CTuaTd.js → sheet-i72Qx7sL.js} +1 -1
- package/dist/client/assets/{shell-layout-DVwBW-8f.js → shell-layout-Ce0aCJuX.js} +1 -1
- package/dist/client/assets/{sidebar-CnKCwozZ.js → sidebar-C5KRz1Pj.js} +1 -1
- package/dist/client/assets/{skill-preview-Br1NvL8D.js → skill-preview-gfYVdSdM.js} +1 -1
- package/dist/client/assets/{skills-DQbBqdux.js → skills-CgTiBPyO.js} +1 -1
- package/dist/client/assets/{sso-BVr60kN3.js → sso-BK-aRT5P.js} +1 -1
- package/dist/client/assets/{store-aWb7HUd8.js → store-Nm6KtwbD.js} +1 -1
- package/dist/client/assets/store-registry-Cs6bPPkP.js +2 -0
- package/dist/client/assets/{switch-ClJqQzki.js → switch-BQFtt3BH.js} +1 -1
- package/dist/client/assets/{synced-repos-D7iLaGtW.js → synced-repos-B1z4DDCt.js} +1 -1
- package/dist/client/assets/{table-Da5i0DDT.js → table-6I6YKvFY.js} +1 -1
- package/dist/client/assets/{tabs-CXXWDRig.js → tabs-CLziM0Ww.js} +1 -1
- package/dist/client/assets/{task-board-DgAEwWBa.js → task-board-DrUf5p-Z.js} +1 -1
- package/dist/client/assets/{task-route-D9BNUMx2.js → task-route-BCTCy27Q.js} +1 -1
- package/dist/client/assets/{task-status-Bt8iPML5.js → task-status-DhCT2ly_.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-B88KUIje.js → taskboard-analytics-Cf1r1f7I.js} +1 -1
- package/dist/client/assets/tasks-BNvHI7hJ.js +1 -0
- package/dist/client/assets/{tasks-B9UZq7u-.js → tasks-Drgd6az8.js} +1 -1
- package/dist/client/assets/{textarea-Cmx8DtdI.js → textarea-BU6xemAP.js} +1 -1
- package/dist/client/assets/{thread-intent-B0Twy-Y4.js → thread-intent-F-sZEflj.js} +1 -1
- package/dist/client/assets/{thread-route-BqVXF90R.js → thread-route-BBf64Mwk.js} +1 -1
- package/dist/client/assets/{thread-route-DS6Bc_kc.js → thread-route-BSYRqZDg.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-FLXrrZaF.js → thread-sheet-body-B4OUWlMn.js} +1 -1
- package/dist/client/assets/{toggle-group-DjgZ3Fw8.js → toggle-group-BiU_UDOq.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BnICfdNs.js → toolbar-icon-button-PuQFE8Y9.js} +1 -1
- package/dist/client/assets/{tooltip-CgGnYGtj.js → tooltip-DV2xHesQ.js} +1 -1
- package/dist/client/assets/{track-CLzcG0zs.js → track-ZuOMvhd2.js} +1 -1
- package/dist/client/assets/{types-_4eK3VIa.js → types-27TVsPN_.js} +1 -1
- package/dist/client/assets/{usage-stats-BCiFcxmR.js → usage-stats-vMRDbAUM.js} +1 -1
- package/dist/client/assets/{use-ai-providers-D1prvpLy.js → use-ai-providers-BnF5Rw_n.js} +1 -1
- package/dist/client/assets/{use-automations-DQOVDERk.js → use-automations-Bo0S3g8m.js} +1 -1
- package/dist/client/assets/{use-autosave-CgR3xjdo.js → use-autosave-DOzyZumC.js} +1 -1
- package/dist/client/assets/{use-connect-companion-VfoTFThS.js → use-connect-companion-CClQCUMS.js} +1 -1
- package/dist/client/assets/{use-connection-DYvm3CFt.js → use-connection-Ba04fHwa.js} +1 -1
- package/dist/client/assets/{use-copy-ryXIsHmg.js → use-copy-C_ctOeuP.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CBo7Jhzx.js → use-create-virtual-mcp-D1w9d4ex.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BW93JelV.js → use-date-fns-locale-onM9TTf8.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-XooE91Oe.js → use-debounced-autosave-DqyNKPJM.js} +1 -1
- package/dist/client/assets/{use-debounced-value-o4QMDSqG.js → use-debounced-value-B9nG3bW5.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CA-pBDW2.js → use-deco-credits-BGBshlLi.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CQEvF74O.js → use-decopilot-events-BpuQrfKN.js} +1 -1
- package/dist/client/assets/{use-delete-connection-TJEFMdZF.js → use-delete-connection-Cns6x8UC.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-B__P-eVb.js → use-deployment-admin-BVfgEagI.js} +1 -1
- package/dist/client/assets/{use-entitlements-CtB8_mAv.js → use-entitlements-Dl7pAsQ5.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-B-DOK-ru.js → use-fast-preview-draft-url-mcfOeAAq.js} +1 -1
- package/dist/client/assets/{use-file-configs-COihRw2M.js → use-file-configs-DYGSdjth.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BaFLbkIz.js → use-infinite-scroll-PhBGPm8H.js} +1 -1
- package/dist/client/assets/{use-join-requests-DqOkUzx0.js → use-join-requests-DjeVFQr9.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BlyDpOj8.js → use-main-panel-tabs-sSRGo66A.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-n6X-ANPT.js → use-mcp-auth-status-I377R0Kg.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Dpy2Y_w9.js → use-mcp-client-e_hCatGm.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Dh294adh.js → use-mcp-prompts-DJRXjL4_.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DErOx9G_.js → use-mcp-tools-g86k4oib.js} +1 -1
- package/dist/client/assets/{use-members-p6-jNNXz.js → use-members-DPYHJDe2.js} +1 -1
- package/dist/client/assets/{use-mobile-DI9_UYOG.js → use-mobile-hIijCK0k.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent--7G-5-aE.js → use-navigate-to-agent-C8pu0B4z.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-DZl00gsn.js → use-open-billing-url-Df7K1DCF.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CwCwgSJe.js → use-org-auth-client-DbPU3bA-.js} +1 -1
- package/dist/client/assets/{use-org-fs-HohNEA-L.js → use-org-fs-Du-ErRPs.js} +1 -1
- package/dist/client/assets/{use-org-notice-D1-emMG_.js → use-org-notice-CyiiFkRG.js} +1 -1
- package/dist/client/assets/{use-org-sso-htHtfKs8.js → use-org-sso-BvfIL0yq.js} +1 -1
- package/dist/client/assets/{use-organization-roles-ff44n98g.js → use-organization-roles-FAEtbpE5.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BIkwHnT4.js → use-organization-settings-CKbX2SdA.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-jpI-ng6I.js → use-panel-navigate-WrD0KEYx.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-lTz9hDFO.js → use-project-native-view-presence-DWzPH-Sc.js} +1 -1
- package/dist/client/assets/{use-project-scope-1l5jykdC.js → use-project-scope-DU0-JxYr.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BC2lTMUS.js → use-registry-connections-SLFMHpqj.js} +1 -1
- package/dist/client/assets/{use-releases-BIlaWt_C.js → use-releases-CFNTwgY3.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-D3ATdgVr.js → use-reports-diagnostic-8BvW2in8.js} +1 -1
- package/dist/client/assets/{use-route-default-main-Bn6e9_Md.js → use-route-default-main-Djaj_cL9.js} +1 -1
- package/dist/client/assets/{use-secrets-CQys3abK.js → use-secrets-DVry--sz.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DdpOVR5d.js → use-section-preview-base-BOFovHh4.js} +1 -1
- package/dist/client/assets/{use-session-runtime-DfUQQIgJ.js → use-session-runtime-BR1aW1y5.js} +1 -1
- package/dist/client/assets/{use-tags-DrMO9XPS.js → use-tags-CZXCbbwL.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics--aa1q8Xf.js → use-task-board-analytics-Ci1AhxvH.js} +1 -1
- package/dist/client/assets/{use-task-metadata-C0KiQ70L.js → use-task-metadata-Dt9l5S_a.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-Cr0IwDUd.js → use-thread-outputs-Dq-RN0P_.js} +1 -1
- package/dist/client/assets/{use-view-mode-Bj8v6WKY.js → use-view-mode-B0LeaJg7.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-4ZF94-K-.js → use-virtual-mcp-DkK7ErtB.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CspLjV7h.js +1 -0
- package/dist/client/assets/{useQueries-BPL3ni2A.js → useQueries-C-SV8tD7.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BiQYAhJn.js +1 -0
- package/dist/client/assets/{users-DB_UA5AH.js → users-BiOPZ43X.js} +1 -1
- package/dist/client/assets/{utils-CirfulKG.js → utils-DsvmRe8M.js} +1 -1
- package/dist/client/assets/{variant-calendar-Dr5L9BOb.js → variant-calendar-DImnsJnP.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-vR8HAnnC.js → variant-matcher-override-BFQoXu82.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-wxXVeUM6.js → view-mode-toggle-DvGhnpsV.js} +1 -1
- package/dist/client/assets/{virtual-mcp-Beu0ehlX.js → virtual-mcp-ldxphi5G.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +603 -603
- package/dist/server/server.js +409 -409
- package/package.json +1 -1
- package/dist/client/assets/agent-app-CzCHojcy.js +0 -1
- package/dist/client/assets/agent-deck-D8wRpPkn.js +0 -1
- package/dist/client/assets/agent-file-Do2RcnWv.js +0 -1
- package/dist/client/assets/agent-library-file-BuWcxxL9.js +0 -1
- package/dist/client/assets/agent-settings-BzjnuB_y.js +0 -1
- package/dist/client/assets/agent-site-editor-code-2yBGi2Ha.js +0 -2
- package/dist/client/assets/agent-view-DnqS13ka.js +0 -1
- package/dist/client/assets/api-keys-CIgCoePx.js +0 -1
- package/dist/client/assets/app-editor-O01UEByL.js +0 -1
- package/dist/client/assets/automations-V9ZwFDwX.js +0 -1
- package/dist/client/assets/category-editor-CTdcJ7FT.js +0 -1
- package/dist/client/assets/project-reports-ucVO7tht.js +0 -1
- package/dist/client/assets/project-tasks-BkwjlR7M.js +0 -1
- package/dist/client/assets/record-editor-fArJyWhH.js +0 -1
- package/dist/client/assets/registry-hucrdHOL.js +0 -2
- package/dist/client/assets/reports-DK2KYT30.js +0 -1
- package/dist/client/assets/store-registry-9bzkx-m3.js +0 -2
- package/dist/client/assets/tasks-Dn9XFRM-.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BMvdD4sR.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DxuC0K9H.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ue,b as pe,j as o,a5 as Ae,B as le,eC as Te,M as ge,W as Le,a as we,n as Se,r as O,d8 as Ee,m as Fe,K as je,e as ke,o as U,t as fe,l as Pe,x as Ge,ao as Me,P as de}from"./index-zEbfx_2K.js";import{a as ce,b as _e,D as he,c as xe}from"./dropdown-menu-B91kH2ef.js";import{i as Oe}from"./GitBranch01--s8uEzME.js";import{b as Re}from"./Users03-Dw5nWIKh.js";import{b as ze,c as Ue,g as $e}from"./use-virtual-mcp-4ZF94-K-.js";import{i as Be}from"./DotsVertical-CVHL4KPF.js";import{a as Ve}from"./Settings02-BQWj4mrx.js";import{s as He}from"./Trash01-UhB0CRb8.js";import{A as Ke,bd as Qe}from"./agent-icon-CG9LA776.js";import{u as qe,f as Ce}from"./use-date-fns-locale-BW93JelV.js";import{u as ve}from"./use-navigate-to-agent--7G-5-aE.js";import{n as Ye}from"./use-organization-settings-BIkwHnT4.js";import{E as We}from"./empty-state-CsX1FA1W.js";import{u as Je}from"./use-create-virtual-mcp-CBo7Jhzx.js";import{b as Xe,u as Ze}from"./use-connection-DYvm3CFt.js";import{u as be}from"./use-mcp-client-Dpy2Y_w9.js";import{a as et}from"./authenticate-and-persist-oauth-C-rkDcUs.js";import{c as tt}from"./use-mcp-tools-DErOx9G_.js";import{e as ot}from"./extract-connection-data-Chw2Aon_.js";import{f as st,g as rt}from"./thread-intent-B0Twy-Y4.js";import{a as it}from"./github-repo-scope-C8GSbvaz.js";import{f as nt,a as lt,G as at,p as ct}from"./provision-repo-scoped-github-connection-B6zdkC6p.js";import{D as mt,b as dt,c as ut,d as pt,e as gt}from"./dialog-DqEzjMAL.js";import{i as ft}from"./ArrowLeft-B69K0kVk.js";import{C as ht}from"./collection-search-CDJVma9q.js";import{G as xt}from"./github-icon-DDXLGNgI.js";import{A as bt,a as jt,b as Ct,c as Dt,g as yt,d as wt,e as St,f as _t}from"./alert-dialog-D1mw46Sk.js";import{S as vt}from"./search-input-CT4D4zLR.js";import{s as De}from"./Plus-DhTGO6OU.js";import{R as Nt}from"./repository-import-picker-G5-hX7A2.js";import{u as It}from"./use-debounced-value-o4QMDSqG.js";import"./Check-B1dsRB6C.js";import"./ChevronRight-B6hcwUgO.js";import"./AlertCircle-CBmZyziw.js";import"./Tool01-C1iMp6Qn.js";import"./ArrowUp-u0dcFMS5.js";import"./Tool02-C0Kk7KSA.js";import"./ArrowRight-xPNMNz_B.js";import"./TrendUp01-CnwsmsBB.js";import"./ZoomOut-7sZYwmin.js";import"./CheckCircle-DWLeIAIi.js";import"./ChevronUp-CLfesB4Y.js";import"./ChevronSelectorVertical-Cyo58PlY.js";import"./UserSquare-CxfIKRZH.js";import"./Copy01-BmdYCu9M.js";import"./CreditCard01-CwXLRxxa.js";import"./Database01-DtsDBLPS.js";import"./MessageCircle01-C-CyP7IO.js";import"./Download01-CSXusgOH.js";import"./Printer-Cqaundx-.js";import"./Eye-cBhNaih2.js";import"./File02-BhN-1ALj.js";import"./Share07-DL7pSoYx.js";import"./Globe01-fgEMsm16.js";import"./SwitchHorizontal01-D-erjhEy.js";import"./HardDrive-TyjleYaj.js";import"./Image01-O24XNmwN.js";import"./Key01-CtPEI4Eg.js";import"./Link01-CcL48lHm.js";import"./LinkExternal01-rfdoJ7W0.js";import"./Monitor01-D5zc1Ggz.js";import"./Sun-DbDrPFGS.js";import"./Package-BUXYnAsJ.js";import"./Palette-BCFMI_Wq.js";import"./Play-CKEbdlIO.js";import"./SearchLg-Cqrhx8lj.js";import"./SearchMd-fdzDozsD.js";import"./Shield01-BwfDPRaf.js";import"./Stars01-OOrCszDj.js";import"./Upload01-CZDGBHSw.js";import"./User01-fZfVT6XZ.js";import"./Users01-DtXUy7uu.js";import"./XCircle-BmfJL_8e.js";import"./XClose-MLfi0Jji.js";import"./X-DdrxBhnS.js";import"./Zap-DRR3UUhJ.js";import"./differenceInSeconds-C3x8sHUj.js";import"./hooks-Cb68QwoE.js";import"./backoff-8mStPHYB.js";import"./task-board-DgAEwWBa.js";import"./schema-CpmuStS2.js";import"./github-repo-BknN0SVI.js";import"./auth-DD_Ixcci.js";import"./mcp-oauth-YLkkgmwu.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-HbykX7y1.js";import"./slugify-CEUa2lfQ.js";import"./repository-picker-CqYIk9Jh.js";import"./tooltip-CgGnYGtj.js";import"./index-Lc7giPgZ.js";import"./input-BYddSsu_.js";import"./label-DeeZ_khO.js";import"./useInfiniteQuery-BMvdD4sR.js";import"./infiniteQueryObserver-sPk7QDR1.js";import"./avatar-B4O8VfWG.js";function ye(t){const e=ue.c(26),{onCreateFromScratch:s,onImportGitHub:r,onImportDeco:n,isCreating:h,align:p,side:y,showBetaBadge:m,showDecoImport:b}=t,j=p===void 0?"end":p,u=pe();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Re,{size:14}),e[0]=g):g=e[0];let f;e[1]!==u?(f=u("common.createAgentDropdown.createFromScratch"),e[1]=u,e[2]=f):f=e[2];let x;e[3]!==h||e[4]!==s||e[5]!==f?(x=o.jsxs(ce,{disabled:h,onClick:s,children:[g,f]}),e[3]=h,e[4]=s,e[5]=f,e[6]=x):x=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(Oe,{className:"size-3.5"}),e[7]=C):C=e[7];let c;e[8]!==u?(c=u("common.createAgentDropdown.importFromGitHub"),e[8]=u,e[9]=c):c=e[9];let l;e[10]!==m?(l=m&&o.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[10]=m,e[11]=l):l=e[11];let a;e[12]!==r||e[13]!==c||e[14]!==l?(a=o.jsxs(ce,{onClick:r,children:[C,c,l]}),e[12]=r,e[13]=c,e[14]=l,e[15]=a):a=e[15];let d;e[16]!==n||e[17]!==b||e[18]!==u?(d=b&&o.jsxs(ce,{onClick:n,children:[o.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),u("common.createAgentDropdown.importFromDeco")]}),e[16]=n,e[17]=b,e[18]=u,e[19]=d):d=e[19];let D;return e[20]!==j||e[21]!==y||e[22]!==x||e[23]!==a||e[24]!==d?(D=o.jsxs(_e,{side:y,align:j,className:"w-48",children:[x,a,d]}),e[20]=j,e[21]=y,e[22]=x,e[23]=a,e[24]=d,e[25]=D):D=e[25],D}function At(t){const e=ue.c(50),{project:s,lastUsedAt:r,onDeleteClick:n}=t,h=ve(),p=pe(),y=qe(),m=s.metadata?.ui?.layout;let b;e[0]!==m?(b=Ae(m),e[0]=m,e[1]=b):b=e[1];const j=b;let u;e[2]!==j||e[3]!==h||e[4]!==s.id?(u=()=>h(s.id,{panel:j}),e[2]=j,e[3]=h,e[4]=s.id,e[5]=u):u=e[5];let g;e[6]!==s.title||e[7]!==u?(g=o.jsx("button",{type:"button",onClick:u,className:"absolute inset-0 z-0","aria-label":s.title}),e[6]=s.title,e[7]=u,e[8]=g):g=e[8];let f;e[9]!==s.icon||e[10]!==s.title?(f=o.jsx(Ke,{icon:s.icon,name:s.title,size:"sm",className:"shrink-0 shadow-sm"}),e[9]=s.icon,e[10]=s.title,e[11]=f):f=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(he,{asChild:!0,children:o.jsx(le,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:o.jsx(Be,{size:20})})}),e[12]=x):x=e[12];let C;e[13]!==h||e[14]!==s.id?(C=()=>h(s.id,{panel:"settings"}),e[13]=h,e[14]=s.id,e[15]=C):C=e[15];let c;e[16]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(Ve,{size:16}),e[16]=c):c=e[16];let l;e[17]!==C?(l=o.jsxs(ce,{onClick:C,children:[c,"Settings"]}),e[17]=C,e[18]=l):l=e[18];let a;e[19]!==n?(a=n&&o.jsxs(ce,{variant:"destructive",onClick:i=>{i.stopPropagation(),n(i)},children:[o.jsx(He,{size:16}),"Delete"]}),e[19]=n,e[20]=a):a=e[20];let d;e[21]!==a||e[22]!==l?(d=o.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:o.jsxs(xe,{children:[x,o.jsxs(_e,{align:"end",children:[l,a]})]})}),e[21]=a,e[22]=l,e[23]=d):d=e[23];let D;e[24]!==d||e[25]!==f?(D=o.jsxs("div",{className:"flex items-start justify-between",children:[f,d]}),e[24]=d,e[25]=f,e[26]=D):D=e[26];let w;e[27]!==s.title?(w=o.jsx("div",{className:"flex items-center gap-2 min-w-0",children:o.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:s.title})}),e[27]=s.title,e[28]=w):w=e[28];const K=s.description||"No description";let S;e[29]!==K?(S=o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:K}),e[29]=K,e[30]=S):S=e[30];let G;e[31]!==w||e[32]!==S?(G=o.jsxs("div",{className:"flex flex-col gap-1",children:[w,S]}),e[31]=w,e[32]=S,e[33]=G):G=e[33];let N;e[34]!==D||e[35]!==G?(N=o.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[D,G]}),e[34]=D,e[35]=G,e[36]=N):N=e[36];let T;e[37]!==r||e[38]!==y||e[39]!==s.updated_at||e[40]!==p?(T=r?p("home.projectCard.lastUsed",{time:Ce(new Date(r),{addSuffix:!0,locale:y})}):p("home.projectCard.updated",{time:Ce(new Date(s.updated_at),{addSuffix:!0,locale:y})}),e[37]=r,e[38]=y,e[39]=s.updated_at,e[40]=p,e[41]=T):T=e[41];let L;e[42]!==T?(L=o.jsx("div",{className:"border-t border-border mt-auto",children:o.jsx("div",{className:"h-10 flex items-center px-4.5",children:o.jsx("p",{className:"text-xs text-muted-foreground",children:T})})}),e[42]=T,e[43]=L):L=e[43];let I;e[44]!==N||e[45]!==L?(I=o.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[N,L]}),e[44]=N,e[45]=L,e[46]=I):I=e[46];let _;return e[47]!==I||e[48]!==g?(_=o.jsxs(Te,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[g,I]}),e[47]=I,e[48]=g,e[49]=_):_=e[49],_}function Tt(t,e){const s=ue.c(12),{org:r}=ge();let n;s[0]!==r.id?(n=Le.REGISTRY(r.id),s[0]=r.id,s[1]=n):n=s[1];const h=n;let p;s[2]!==r.id||s[3]!==r.slug||s[4]!==h?(p={connectionId:h,orgId:r.id,orgSlug:r.slug},s[2]=r.id,s[3]=r.slug,s[4]=h,s[5]=p):p=s[5];const y=be(p);let m;s[6]!==t?(m={name:t},s[6]=t,s[7]=m):m=s[7];const b=e?.enabled??!0;let j;return s[8]!==y||s[9]!==m||s[10]!==b?(j={client:y,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:m,enabled:b,staleTime:3e5,select:Lt},s[8]=y,s[9]=m,s[10]=b,s[11]=j):j=s[11],tt(j)}function Lt(t){return t.structuredContent?.item??null}const Et="deco/mcp-github";function Ft(t){const{org:e}=ge(),{data:s}=we.useSession(),r=Xe(),n=Se(),[h,p]=O.useState("idle"),[y,m]=O.useState(null),[b,j]=O.useState(null),{data:u,isLoading:g}=Tt(Et,{enabled:t.enabled}),f=O.useRef(!1);t.enabled&&u&&!g&&!f.current&&s?.user?.id&&h==="idle"&&(f.current=!0,x());async function x(){if(!(!u||!s?.user?.id||!e))try{p("installing"),m(null);const c=ot(u,e.id,s.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:a}=await r.create.mutateAsync(c);p("authenticating");const d=await et({connectionId:a,orgId:e.id,orgSlug:e.slug,persistFallback:D=>r.update.mutateAsync({id:a,data:{connection_token:D}}).then(()=>{})});if(d.ran&&!d.ok){try{await r.delete.mutateAsync(a)}catch{}throw new Error(d.error&&d.error!=="no token received"?d.error:"No token received from GitHub")}Ee(n,e.id),j(c),p("ready")}catch(c){m(c instanceof Error?c.message:String(c)),p("error")}}function C(){p("idle"),m(null),j(null),f.current=!1}return t.enabled&&g&&h==="idle"?{status:"installing",error:null,connection:null,retry:C}:{status:h,error:y,connection:b,retry:C}}const kt="deco-sites";function Pt(t){if(!t||typeof t!="object")return null;const e=t.github;if(!e||typeof e!="object")return null;const s=e.owner,r=e.repo;return typeof s!="string"||typeof r!="string"||s.length===0||r.length===0?null:{owner:s,repo:r}}function Gt(t,e){const s=e?Pt(e):null,r=s?.owner??kt,n=s?.repo??t;return{owner:r,name:n,url:`https://github.com/${r}/${n}`}}function Mt(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function Ne(t,e,s){const r=await fetch(t,e),n=await r.json().catch(()=>({}));if(!r.ok)throw new Error(n.error??`${s} (${r.status})`);return n}function Ot(t){return Ne(`/api/${t}/deco-sites`,void 0,"Failed to load sites")}function Rt({open:t,onOpenChange:e,onBack:s}){const r=pe(),{org:n}=ge(),h=ve(),p=Se(),{data:y}=we.useSession(),[m,b]=O.useState(null),[j,u]=O.useState(null),[g,f]=O.useState(""),x=be({connectionId:Ge,orgId:n.id,orgSlug:n.slug}),C=Ze({slug:"mcp-github"}),c=it(C),l=Ft({enabled:t&&c.length===0}),a=c.length===1?c[0]??null:j,d=c.length>1&&!a,D=be({connectionId:a?.id??"",orgId:n.id,orgSlug:n.slug}),w=t&&c.length===0&&(l.status==="installing"||l.status==="authenticating"||l.status==="idle"),{data:K,isLoading:S,error:G}=Fe({queryKey:je.decoSites(y?.user?.email),queryFn:()=>Ot(n.slug),enabled:t&&!!y?.user?.email,staleTime:6e4,retry:!1}),N=K?.sites??[],T=i=>{i||(b(null),u(null),f("")),e(i)},L=N.filter(i=>i.name.toLowerCase().includes(g.toLowerCase())||(i.domains?.[0]?.domain?.toLowerCase().includes(g.toLowerCase())??!1)),I=!m||L.some(i=>i.name===m),_=ke({mutationFn:async i=>{if(!a)throw new Error(r("common.importFromDecoDialog.githubNotConnected"));U("deco_site_import_started",{site_name:i});const{installations:P}=await nt(k=>x.callTool(k),a.id),E=N.find(k=>k.name===i);if(!E)throw new Error(r("common.importFromDecoDialog.siteNoLongerAvailable"));const v=Gt(i,E.metadata),F=lt(P,v.owner);if(!F)throw new Error(r("common.importFromDecoDialog.installGithubApp",{owner:v.owner,installUrl:at}));let R=null,Q=null;const ae=async()=>{Q&&await x.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:Q}}).catch(()=>{}),R&&await x.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:R,force:!0}}).catch(()=>{})};try{const k=await Ne(`/api/${n.slug}/deco-sites/prepare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:i})},r("common.importFromDecoDialog.failedToPrepareImport")),{childConnectionId:z,reused:H}=await ct({orgSlug:n.slug,sourceConnection:a,installationId:F.installationId,owner:v.owner,repo:v.name,githubCallTool:q=>D.callTool(q),selfCallTool:q=>x.callTool(q)});R=H?null:z;const $=k.icon??null,Y=Mt(i),W=i.toLowerCase(),B=st(i),V=await x.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i,description:"Imported from deco.cx",pinned:!1,icon:$??null,metadata:{instructions:null,enabled_plugins:[],siteSlug:W,previewServerUrl:B,productionUrl:B,githubRepo:{owner:v.owner,name:v.name,url:v.url,installationId:F.installationId,connectionId:z},ui:{banner:null,bannerColor:"#22C55E",icon:$,themeColor:"#22C55E",slug:Y,pinnedViews:null,layout:{defaultMainView:{type:"site-editor"},chatDefaultOpen:!1}}},connections:[{connection_id:z}]}}}),M=V.structuredContent??V;if(!M.item?.id)throw new Error(r("common.importFromDecoDialog.failedToCreateAgent"));return Q=M.item.id,{slug:Y,virtualMcpId:M.item.id,item:M.item}}catch(k){throw await ae(),k}},onSuccess:({slug:i,virtualMcpId:P,item:E})=>{U("deco_site_import_succeeded",{site_name:E.title,virtual_mcp_id:P,slug:i}),p.setQueryData(je.collectionItem(x,n.id,"","VIRTUAL_MCP",P),{item:E}),p.invalidateQueries({predicate:v=>{const F=v.queryKey;return F[1]===n.id&&F[3]==="collection"&&F[4]==="VIRTUAL_MCP"}}),fe.success(r("common.importFromDecoDialog.importSuccess",{slug:i})),T(!1),h(P)},onError:i=>{U("deco_site_import_failed",{error:i instanceof Error?i.message:"Unknown error"}),fe.error(r("common.importFromDecoDialog.importFailed",{error:(i instanceof Error?i.message:r("common.importFromDecoDialog.unknownError"))??""}))}});return o.jsx(mt,{open:t,onOpenChange:T,children:o.jsxs(dt,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[o.jsx(ut,{className:"sr-only",children:o.jsx(pt,{children:r("common.importFromDecoDialog.title")})}),o.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[s&&o.jsx("button",{type:"button",onClick:s,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":r("common.importFromDecoDialog.goBack"),children:o.jsx(ft,{size:18})}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:r("common.importFromDecoDialog.title")})]}),o.jsx("div",{children:o.jsx(ht,{value:g,onChange:f,placeholder:r("common.importFromDecoDialog.searchPlaceholder"),onKeyDown:i=>{i.key==="Escape"&&f("")}})}),o.jsxs("div",{className:"pb-0 min-h-[300px]",children:[l.status==="error"&&o.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[o.jsx("p",{className:"text-sm text-destructive",children:l.error??r("common.importFromDecoDialog.failedToConnectGithub")}),o.jsx(le,{variant:"outline",size:"sm",onClick:l.retry,children:r("common.importFromDecoDialog.retryGithubSetup")})]}),w&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:r("common.importFromDecoDialog.settingUpGithub")}),d&&!w&&l.status!=="error"&&o.jsxs("div",{className:"flex flex-col py-2",children:[o.jsx("div",{className:"px-8 py-2",children:o.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:r("common.importFromDecoDialog.selectGithubConnection")})}),c.map(i=>o.jsxs("button",{type:"button",onClick:()=>u(i),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?o.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):o.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:o.jsx(xt,{className:"size-3.5 text-muted-foreground"})}),o.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}),S&&!w&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:r("common.importFromDecoDialog.loadingSites")}),!S&&!w&&!d&&l.status!=="error"&&!G&&N.length===0&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:r("common.importFromDecoDialog.noSitesFound")}),!S&&!w&&!d&&l.status!=="error"&&N.length>0&&o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[L.length===0&&o.jsx("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:r("common.importFromDecoDialog.noSitesMatch",{search:g})}),L.map(i=>{const P=rt(i.domains),E=m===i.name;return o.jsxs("button",{type:"button",onClick:()=>b(i.name),className:Pe("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",E?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[o.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:i.thumb_url?o.jsx("img",{src:i.thumb_url,alt:i.name,className:"w-full h-full object-cover",loading:"lazy"}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsxs("div",{className:"px-4 py-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:i.name}),P&&o.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:P})]})]},i.name)})]})]}),o.jsxs(gt,{className:"px-8 py-5 border-t border-border",children:[o.jsx(le,{variant:"outline",onClick:()=>T(!1),disabled:_.isPending,children:r("common.importFromDecoDialog.cancel")}),o.jsx(le,{disabled:!m||!I||_.isPending||S||w||d||!a||l.status==="error",onClick:()=>m&&_.mutate(m),children:_.isPending?r("common.importFromDecoDialog.importing"):r("common.importFromDecoDialog.import")})]})]})})}function Ts(){const t=ue.c(82),e=pe(),{org:s}=ge(),[r,n]=O.useState(""),h=It(r,300);let p;t[0]!==h?(p={searchTerm:h},t[0]=h,t[1]=p):p=t[1];const y=ze(p),m=Ue();let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b={navigateOnCreate:!0},t[2]=b):b=t[2];const{createVirtualMCP:j,isCreating:u}=Je(b),[g,f]=O.useState(null),[x,C]=O.useState(!1),[c,l]=O.useState(!1),{granted:a}=Me("agents:manage"),d=Ye();let D;t[3]!==s?(D=A=>A.id!==s.id,t[3]=s,t[4]=D):D=t[4];const w=y.filter(D),{data:K}=$e(w.map(zt));let S;t[5]!==m||t[6]!==g||t[7]!==e?(S=async()=>{if(!g)return;const{id:A,title:Ie}=g;f(null);try{await m.delete.mutateAsync(A),U("agent_deleted",{agent_id:A,source:"agents_list"}),fe.success(e("routes.agentsList.deletedAgent",{title:Ie}))}catch{}},t[5]=m,t[6]=g,t[7]=e,t[8]=S):S=t[8];const G=S,N=de,T=de,L=de;let I;t[9]!==e?(I=e("routes.agentsList.title"),t[9]=e,t[10]=I):I=t[10];let _;t[11]!==I?(_=o.jsx(de.Title,{children:I}),t[11]=I,t[12]=_):_=t[12];let i;t[13]!==e?(i=e("routes.agentsList.searchPlaceholder"),t[13]=e,t[14]=i):i=t[14];let P;t[15]===Symbol.for("react.memo_cache_sentinel")?(P=A=>{A.key==="Escape"&&(n(""),A.target.blur())},t[15]=P):P=t[15];let E;t[16]!==r||t[17]!==i?(E=o.jsx(vt,{value:r,onChange:n,placeholder:i,className:"w-full md:w-[375px]",onKeyDown:P}),t[16]=r,t[17]=i,t[18]=E):E=t[18];let v;t[19]!==a||t[20]!==j||t[21]!==u||t[22]!==d||t[23]!==e?(v=a&&o.jsxs(xe,{children:[o.jsx(he,{asChild:!0,children:o.jsxs(le,{size:"sm",children:[o.jsx(De,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(ye,{onCreateFromScratch:()=>{U("agent_create_clicked",{source:"agents_list",method:"scratch"}),j()},onImportGitHub:()=>{U("agent_create_clicked",{source:"agents_list",method:"github"}),l(!0)},onImportDeco:()=>{U("agent_create_clicked",{source:"agents_list",method:"deco"}),C(!0)},isCreating:u,align:"end",showDecoImport:d})]}),t[19]=a,t[20]=j,t[21]=u,t[22]=d,t[23]=e,t[24]=v):v=t[24];let F;t[25]!==E||t[26]!==v?(F=o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[E,v]}),t[25]=E,t[26]=v,t[27]=F):F=t[27];let R;t[28]!==F||t[29]!==_?(R=o.jsxs("div",{className:"flex flex-col gap-6",children:[_,F]}),t[28]=F,t[29]=_,t[30]=R):R=t[30];const Q=w.length===0&&o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(We,{image:o.jsx(Qe,{size:48,className:"text-muted-foreground"}),title:e(r?"routes.agentsList.noAgentsFound":"routes.agentsList.noAgentsYet"),description:r?e("routes.agentsList.noAgentsMatchSearch",{search:r}):e(a?"routes.agentsList.createAgentToGetStarted":"routes.agentsList.askAdminToCreate"),actions:!r&&a&&o.jsxs(xe,{children:[o.jsx(he,{asChild:!0,children:o.jsxs(le,{size:"sm",children:[o.jsx(De,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(ye,{onCreateFromScratch:()=>{U("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),j()},onImportGitHub:()=>{U("agent_create_clicked",{source:"agents_list_empty",method:"github"}),l(!0)},onImportDeco:()=>{U("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),C(!0)},isCreating:u,align:"center",showBetaBadge:!0,showDecoImport:d})]})})}),ae=w.length>0&&o.jsxs("div",{className:"mt-6 @container",children:[o.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:e("routes.agentsList.agentsHeading")}),o.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:w.map(A=>o.jsx(At,{project:A,lastUsedAt:K?.get(A.id)?.last_used_at,onDeleteClick:a?()=>f({id:A.id,title:A.title}):void 0},A.id))})]});let k;t[31]!==R||t[32]!==Q||t[33]!==ae||t[34]!==L.Container?(k=o.jsxs(L.Container,{children:[R,Q,ae]}),t[31]=R,t[32]=Q,t[33]=ae,t[34]=L.Container,t[35]=k):k=t[35];let z;t[36]!==k||t[37]!==T.Content?(z=o.jsx(T.Content,{children:k}),t[36]=k,t[37]=T.Content,t[38]=z):z=t[38];let H;t[39]!==c?(H=o.jsx(Nt,{open:c,onOpenChange:l}),t[39]=c,t[40]=H):H=t[40];let $;t[41]!==x?($=o.jsx(Rt,{open:x,onOpenChange:C}),t[41]=x,t[42]=$):$=t[42];const Y=!!g;let W;t[43]===Symbol.for("react.memo_cache_sentinel")?(W=A=>!A&&f(null),t[43]=W):W=t[43];let B;t[44]!==e?(B=e("routes.agentsList.deleteAgentTitle"),t[44]=e,t[45]=B):B=t[45];let V;t[46]!==B?(V=o.jsx(bt,{children:B}),t[46]=B,t[47]=V):V=t[47];let M;t[48]!==e?(M=e("routes.agentsList.deleteAgentDescription"),t[48]=e,t[49]=M):M=t[49];const q=g?.title;let J;t[50]!==q?(J=o.jsx("span",{className:"font-medium text-foreground",children:q}),t[50]=q,t[51]=J):J=t[51];let X;t[52]!==M||t[53]!==J?(X=o.jsxs(jt,{children:[M," ",J,"."]}),t[52]=M,t[53]=J,t[54]=X):X=t[54];let Z;t[55]!==V||t[56]!==X?(Z=o.jsxs(Ct,{children:[V,X]}),t[55]=V,t[56]=X,t[57]=Z):Z=t[57];let ee;t[58]!==e?(ee=e("routes.agentsList.cancelButton"),t[58]=e,t[59]=ee):ee=t[59];let te;t[60]!==ee?(te=o.jsx(Dt,{children:ee}),t[60]=ee,t[61]=te):te=t[61];let oe;t[62]!==e?(oe=e("routes.agentsList.deleteButton"),t[62]=e,t[63]=oe):oe=t[63];let se;t[64]!==G||t[65]!==oe?(se=o.jsx(yt,{onClick:G,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:oe}),t[64]=G,t[65]=oe,t[66]=se):se=t[66];let re;t[67]!==te||t[68]!==se?(re=o.jsxs(wt,{children:[te,se]}),t[67]=te,t[68]=se,t[69]=re):re=t[69];let ie;t[70]!==Z||t[71]!==re?(ie=o.jsxs(St,{children:[Z,re]}),t[70]=Z,t[71]=re,t[72]=ie):ie=t[72];let ne;t[73]!==Y||t[74]!==ie?(ne=o.jsx(_t,{open:Y,onOpenChange:W,children:ie}),t[73]=Y,t[74]=ie,t[75]=ne):ne=t[75];let me;return t[76]!==N||t[77]!==z||t[78]!==H||t[79]!==$||t[80]!==ne?(me=o.jsxs(N,{children:[z,H,$,ne]}),t[76]=N,t[77]=z,t[78]=H,t[79]=$,t[80]=ne,t[81]=me):me=t[81],me}function zt(t){return t.id}export{Ts as default};
|
|
1
|
+
import{c as ue,b as pe,j as o,a5 as Ae,B as le,eC as Te,M as ge,W as Le,a as we,n as Se,r as O,d8 as Ee,m as Fe,K as je,e as ke,o as U,t as fe,l as Pe,x as Ge,ao as Me,P as de}from"./index-Dc7hzqoi.js";import{a as ce,b as _e,D as he,c as xe}from"./dropdown-menu-C5iafa8S.js";import{i as Oe}from"./GitBranch01-rWb2SJK9.js";import{b as Re}from"./Users03-Y0Jco4zL.js";import{b as ze,c as Ue,g as $e}from"./use-virtual-mcp-DkK7ErtB.js";import{i as Be}from"./DotsVertical-CsjwfYzf.js";import{a as Ve}from"./Settings02-Cyf85ea0.js";import{s as He}from"./Trash01-nl-t4IoV.js";import{A as Ke,bd as Qe}from"./agent-icon-CczrFEe7.js";import{u as qe,f as Ce}from"./use-date-fns-locale-onM9TTf8.js";import{u as ve}from"./use-navigate-to-agent-C8pu0B4z.js";import{n as Ye}from"./use-organization-settings-CKbX2SdA.js";import{E as We}from"./empty-state-CyICQznD.js";import{u as Je}from"./use-create-virtual-mcp-D1w9d4ex.js";import{b as Xe,u as Ze}from"./use-connection-Ba04fHwa.js";import{u as be}from"./use-mcp-client-e_hCatGm.js";import{a as et}from"./authenticate-and-persist-oauth-DkJ4g-X5.js";import{c as tt}from"./use-mcp-tools-g86k4oib.js";import{e as ot}from"./extract-connection-data-Dbm_cKaX.js";import{f as st,g as rt}from"./thread-intent-F-sZEflj.js";import{a as it}from"./github-repo-scope-C8GSbvaz.js";import{f as nt,a as lt,G as at,p as ct}from"./provision-repo-scoped-github-connection-B6zdkC6p.js";import{D as mt,b as dt,c as ut,d as pt,e as gt}from"./dialog-llvhXw2o.js";import{i as ft}from"./ArrowLeft-CjYy5Nhj.js";import{C as ht}from"./collection-search-J9Bt25gS.js";import{G as xt}from"./github-icon-huXDOAgf.js";import{A as bt,a as jt,b as Ct,c as Dt,g as yt,d as wt,e as St,f as _t}from"./alert-dialog-BI-B_8hq.js";import{S as vt}from"./search-input-Pobww52G.js";import{s as De}from"./Plus-CVauOqLT.js";import{R as Nt}from"./repository-import-picker-DhVniDI2.js";import{u as It}from"./use-debounced-value-B9nG3bW5.js";import"./Check-B3RSsr_D.js";import"./ChevronRight-USKkhEpL.js";import"./AlertCircle-CMjsP_Tk.js";import"./Tool01-DouqPjim.js";import"./ArrowUp-Cii1LHW7.js";import"./Tool02-CATStXCy.js";import"./ArrowRight-CLncCNat.js";import"./TrendUp01-BFAEMx9E.js";import"./ZoomOut-BPxprY2s.js";import"./CheckCircle-DHXQFnpK.js";import"./ChevronUp-DiYhGG4T.js";import"./ChevronSelectorVertical-DpRb2z1l.js";import"./UserSquare-B2lKdt4w.js";import"./Copy01-nMxlBfeT.js";import"./CreditCard01-CWXVH3ZM.js";import"./Database01-C0YJpjc3.js";import"./MessageCircle01-DBcg2aiD.js";import"./Download01-BRrSA3Yx.js";import"./Printer-CvyxF9Jo.js";import"./Eye-Dyg2WPG4.js";import"./File02-BvR-HYxK.js";import"./Share07-wC47qn2E.js";import"./Globe01-D6FaaFR2.js";import"./SwitchHorizontal01-DpXsFGyJ.js";import"./HardDrive-DNTPLPT4.js";import"./Image01-CxnjAzbb.js";import"./Key01-CIXwHMRo.js";import"./Link01-C0FvgZZB.js";import"./LinkExternal01-AWlhN5o7.js";import"./Monitor01-Ccs1gh2Z.js";import"./Sun-0Ied-kyZ.js";import"./Package-nTbucmaQ.js";import"./Palette-DSdn1Xis.js";import"./Play-lMuWOObF.js";import"./SearchLg-BrrPVuXr.js";import"./SearchMd-C45D2PMI.js";import"./Shield01-CqB4I7qm.js";import"./Stars01-oAh9h5b5.js";import"./Upload01-B4Fqdkae.js";import"./User01-ClMaVCaJ.js";import"./Users01-BFhxJVhO.js";import"./XCircle-CleKT0Id.js";import"./XClose-BgzK-Dwz.js";import"./X-CFCE4a-Q.js";import"./Zap-B6zkqKWB.js";import"./differenceInSeconds-C3x8sHUj.js";import"./hooks-DZOMRp7D.js";import"./backoff-8mStPHYB.js";import"./task-board-DrUf5p-Z.js";import"./schema-1zAO-l7e.js";import"./github-repo-BknN0SVI.js";import"./auth-DhzAq_9m.js";import"./mcp-oauth-C4khbNJJ.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-DD0omVHZ.js";import"./slugify-CEUa2lfQ.js";import"./repository-picker-BkoSI-jm.js";import"./tooltip-DV2xHesQ.js";import"./index-DWw5wi2G.js";import"./input-DXlaTX4w.js";import"./label-BMxIRiEr.js";import"./useInfiniteQuery-CspLjV7h.js";import"./infiniteQueryObserver-CjWlcBHD.js";import"./avatar-C9HiP4eS.js";function ye(t){const e=ue.c(26),{onCreateFromScratch:s,onImportGitHub:r,onImportDeco:n,isCreating:h,align:p,side:y,showBetaBadge:m,showDecoImport:b}=t,j=p===void 0?"end":p,u=pe();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Re,{size:14}),e[0]=g):g=e[0];let f;e[1]!==u?(f=u("common.createAgentDropdown.createFromScratch"),e[1]=u,e[2]=f):f=e[2];let x;e[3]!==h||e[4]!==s||e[5]!==f?(x=o.jsxs(ce,{disabled:h,onClick:s,children:[g,f]}),e[3]=h,e[4]=s,e[5]=f,e[6]=x):x=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(Oe,{className:"size-3.5"}),e[7]=C):C=e[7];let c;e[8]!==u?(c=u("common.createAgentDropdown.importFromGitHub"),e[8]=u,e[9]=c):c=e[9];let l;e[10]!==m?(l=m&&o.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[10]=m,e[11]=l):l=e[11];let a;e[12]!==r||e[13]!==c||e[14]!==l?(a=o.jsxs(ce,{onClick:r,children:[C,c,l]}),e[12]=r,e[13]=c,e[14]=l,e[15]=a):a=e[15];let d;e[16]!==n||e[17]!==b||e[18]!==u?(d=b&&o.jsxs(ce,{onClick:n,children:[o.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),u("common.createAgentDropdown.importFromDeco")]}),e[16]=n,e[17]=b,e[18]=u,e[19]=d):d=e[19];let D;return e[20]!==j||e[21]!==y||e[22]!==x||e[23]!==a||e[24]!==d?(D=o.jsxs(_e,{side:y,align:j,className:"w-48",children:[x,a,d]}),e[20]=j,e[21]=y,e[22]=x,e[23]=a,e[24]=d,e[25]=D):D=e[25],D}function At(t){const e=ue.c(50),{project:s,lastUsedAt:r,onDeleteClick:n}=t,h=ve(),p=pe(),y=qe(),m=s.metadata?.ui?.layout;let b;e[0]!==m?(b=Ae(m),e[0]=m,e[1]=b):b=e[1];const j=b;let u;e[2]!==j||e[3]!==h||e[4]!==s.id?(u=()=>h(s.id,{panel:j}),e[2]=j,e[3]=h,e[4]=s.id,e[5]=u):u=e[5];let g;e[6]!==s.title||e[7]!==u?(g=o.jsx("button",{type:"button",onClick:u,className:"absolute inset-0 z-0","aria-label":s.title}),e[6]=s.title,e[7]=u,e[8]=g):g=e[8];let f;e[9]!==s.icon||e[10]!==s.title?(f=o.jsx(Ke,{icon:s.icon,name:s.title,size:"sm",className:"shrink-0 shadow-sm"}),e[9]=s.icon,e[10]=s.title,e[11]=f):f=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(he,{asChild:!0,children:o.jsx(le,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:o.jsx(Be,{size:20})})}),e[12]=x):x=e[12];let C;e[13]!==h||e[14]!==s.id?(C=()=>h(s.id,{panel:"settings"}),e[13]=h,e[14]=s.id,e[15]=C):C=e[15];let c;e[16]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(Ve,{size:16}),e[16]=c):c=e[16];let l;e[17]!==C?(l=o.jsxs(ce,{onClick:C,children:[c,"Settings"]}),e[17]=C,e[18]=l):l=e[18];let a;e[19]!==n?(a=n&&o.jsxs(ce,{variant:"destructive",onClick:i=>{i.stopPropagation(),n(i)},children:[o.jsx(He,{size:16}),"Delete"]}),e[19]=n,e[20]=a):a=e[20];let d;e[21]!==a||e[22]!==l?(d=o.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:o.jsxs(xe,{children:[x,o.jsxs(_e,{align:"end",children:[l,a]})]})}),e[21]=a,e[22]=l,e[23]=d):d=e[23];let D;e[24]!==d||e[25]!==f?(D=o.jsxs("div",{className:"flex items-start justify-between",children:[f,d]}),e[24]=d,e[25]=f,e[26]=D):D=e[26];let w;e[27]!==s.title?(w=o.jsx("div",{className:"flex items-center gap-2 min-w-0",children:o.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:s.title})}),e[27]=s.title,e[28]=w):w=e[28];const K=s.description||"No description";let S;e[29]!==K?(S=o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:K}),e[29]=K,e[30]=S):S=e[30];let G;e[31]!==w||e[32]!==S?(G=o.jsxs("div",{className:"flex flex-col gap-1",children:[w,S]}),e[31]=w,e[32]=S,e[33]=G):G=e[33];let N;e[34]!==D||e[35]!==G?(N=o.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[D,G]}),e[34]=D,e[35]=G,e[36]=N):N=e[36];let T;e[37]!==r||e[38]!==y||e[39]!==s.updated_at||e[40]!==p?(T=r?p("home.projectCard.lastUsed",{time:Ce(new Date(r),{addSuffix:!0,locale:y})}):p("home.projectCard.updated",{time:Ce(new Date(s.updated_at),{addSuffix:!0,locale:y})}),e[37]=r,e[38]=y,e[39]=s.updated_at,e[40]=p,e[41]=T):T=e[41];let L;e[42]!==T?(L=o.jsx("div",{className:"border-t border-border mt-auto",children:o.jsx("div",{className:"h-10 flex items-center px-4.5",children:o.jsx("p",{className:"text-xs text-muted-foreground",children:T})})}),e[42]=T,e[43]=L):L=e[43];let I;e[44]!==N||e[45]!==L?(I=o.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[N,L]}),e[44]=N,e[45]=L,e[46]=I):I=e[46];let _;return e[47]!==I||e[48]!==g?(_=o.jsxs(Te,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[g,I]}),e[47]=I,e[48]=g,e[49]=_):_=e[49],_}function Tt(t,e){const s=ue.c(12),{org:r}=ge();let n;s[0]!==r.id?(n=Le.REGISTRY(r.id),s[0]=r.id,s[1]=n):n=s[1];const h=n;let p;s[2]!==r.id||s[3]!==r.slug||s[4]!==h?(p={connectionId:h,orgId:r.id,orgSlug:r.slug},s[2]=r.id,s[3]=r.slug,s[4]=h,s[5]=p):p=s[5];const y=be(p);let m;s[6]!==t?(m={name:t},s[6]=t,s[7]=m):m=s[7];const b=e?.enabled??!0;let j;return s[8]!==y||s[9]!==m||s[10]!==b?(j={client:y,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:m,enabled:b,staleTime:3e5,select:Lt},s[8]=y,s[9]=m,s[10]=b,s[11]=j):j=s[11],tt(j)}function Lt(t){return t.structuredContent?.item??null}const Et="deco/mcp-github";function Ft(t){const{org:e}=ge(),{data:s}=we.useSession(),r=Xe(),n=Se(),[h,p]=O.useState("idle"),[y,m]=O.useState(null),[b,j]=O.useState(null),{data:u,isLoading:g}=Tt(Et,{enabled:t.enabled}),f=O.useRef(!1);t.enabled&&u&&!g&&!f.current&&s?.user?.id&&h==="idle"&&(f.current=!0,x());async function x(){if(!(!u||!s?.user?.id||!e))try{p("installing"),m(null);const c=ot(u,e.id,s.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:a}=await r.create.mutateAsync(c);p("authenticating");const d=await et({connectionId:a,orgId:e.id,orgSlug:e.slug,persistFallback:D=>r.update.mutateAsync({id:a,data:{connection_token:D}}).then(()=>{})});if(d.ran&&!d.ok){try{await r.delete.mutateAsync(a)}catch{}throw new Error(d.error&&d.error!=="no token received"?d.error:"No token received from GitHub")}Ee(n,e.id),j(c),p("ready")}catch(c){m(c instanceof Error?c.message:String(c)),p("error")}}function C(){p("idle"),m(null),j(null),f.current=!1}return t.enabled&&g&&h==="idle"?{status:"installing",error:null,connection:null,retry:C}:{status:h,error:y,connection:b,retry:C}}const kt="deco-sites";function Pt(t){if(!t||typeof t!="object")return null;const e=t.github;if(!e||typeof e!="object")return null;const s=e.owner,r=e.repo;return typeof s!="string"||typeof r!="string"||s.length===0||r.length===0?null:{owner:s,repo:r}}function Gt(t,e){const s=e?Pt(e):null,r=s?.owner??kt,n=s?.repo??t;return{owner:r,name:n,url:`https://github.com/${r}/${n}`}}function Mt(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function Ne(t,e,s){const r=await fetch(t,e),n=await r.json().catch(()=>({}));if(!r.ok)throw new Error(n.error??`${s} (${r.status})`);return n}function Ot(t){return Ne(`/api/${t}/deco-sites`,void 0,"Failed to load sites")}function Rt({open:t,onOpenChange:e,onBack:s}){const r=pe(),{org:n}=ge(),h=ve(),p=Se(),{data:y}=we.useSession(),[m,b]=O.useState(null),[j,u]=O.useState(null),[g,f]=O.useState(""),x=be({connectionId:Ge,orgId:n.id,orgSlug:n.slug}),C=Ze({slug:"mcp-github"}),c=it(C),l=Ft({enabled:t&&c.length===0}),a=c.length===1?c[0]??null:j,d=c.length>1&&!a,D=be({connectionId:a?.id??"",orgId:n.id,orgSlug:n.slug}),w=t&&c.length===0&&(l.status==="installing"||l.status==="authenticating"||l.status==="idle"),{data:K,isLoading:S,error:G}=Fe({queryKey:je.decoSites(y?.user?.email),queryFn:()=>Ot(n.slug),enabled:t&&!!y?.user?.email,staleTime:6e4,retry:!1}),N=K?.sites??[],T=i=>{i||(b(null),u(null),f("")),e(i)},L=N.filter(i=>i.name.toLowerCase().includes(g.toLowerCase())||(i.domains?.[0]?.domain?.toLowerCase().includes(g.toLowerCase())??!1)),I=!m||L.some(i=>i.name===m),_=ke({mutationFn:async i=>{if(!a)throw new Error(r("common.importFromDecoDialog.githubNotConnected"));U("deco_site_import_started",{site_name:i});const{installations:P}=await nt(k=>x.callTool(k),a.id),E=N.find(k=>k.name===i);if(!E)throw new Error(r("common.importFromDecoDialog.siteNoLongerAvailable"));const v=Gt(i,E.metadata),F=lt(P,v.owner);if(!F)throw new Error(r("common.importFromDecoDialog.installGithubApp",{owner:v.owner,installUrl:at}));let R=null,Q=null;const ae=async()=>{Q&&await x.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:Q}}).catch(()=>{}),R&&await x.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:R,force:!0}}).catch(()=>{})};try{const k=await Ne(`/api/${n.slug}/deco-sites/prepare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:i})},r("common.importFromDecoDialog.failedToPrepareImport")),{childConnectionId:z,reused:H}=await ct({orgSlug:n.slug,sourceConnection:a,installationId:F.installationId,owner:v.owner,repo:v.name,githubCallTool:q=>D.callTool(q),selfCallTool:q=>x.callTool(q)});R=H?null:z;const $=k.icon??null,Y=Mt(i),W=i.toLowerCase(),B=st(i),V=await x.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i,description:"Imported from deco.cx",pinned:!1,icon:$??null,metadata:{instructions:null,enabled_plugins:[],siteSlug:W,previewServerUrl:B,productionUrl:B,githubRepo:{owner:v.owner,name:v.name,url:v.url,installationId:F.installationId,connectionId:z},ui:{banner:null,bannerColor:"#22C55E",icon:$,themeColor:"#22C55E",slug:Y,pinnedViews:null,layout:{defaultMainView:{type:"site-editor"},chatDefaultOpen:!1}}},connections:[{connection_id:z}]}}}),M=V.structuredContent??V;if(!M.item?.id)throw new Error(r("common.importFromDecoDialog.failedToCreateAgent"));return Q=M.item.id,{slug:Y,virtualMcpId:M.item.id,item:M.item}}catch(k){throw await ae(),k}},onSuccess:({slug:i,virtualMcpId:P,item:E})=>{U("deco_site_import_succeeded",{site_name:E.title,virtual_mcp_id:P,slug:i}),p.setQueryData(je.collectionItem(x,n.id,"","VIRTUAL_MCP",P),{item:E}),p.invalidateQueries({predicate:v=>{const F=v.queryKey;return F[1]===n.id&&F[3]==="collection"&&F[4]==="VIRTUAL_MCP"}}),fe.success(r("common.importFromDecoDialog.importSuccess",{slug:i})),T(!1),h(P)},onError:i=>{U("deco_site_import_failed",{error:i instanceof Error?i.message:"Unknown error"}),fe.error(r("common.importFromDecoDialog.importFailed",{error:(i instanceof Error?i.message:r("common.importFromDecoDialog.unknownError"))??""}))}});return o.jsx(mt,{open:t,onOpenChange:T,children:o.jsxs(dt,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[o.jsx(ut,{className:"sr-only",children:o.jsx(pt,{children:r("common.importFromDecoDialog.title")})}),o.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[s&&o.jsx("button",{type:"button",onClick:s,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":r("common.importFromDecoDialog.goBack"),children:o.jsx(ft,{size:18})}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:r("common.importFromDecoDialog.title")})]}),o.jsx("div",{children:o.jsx(ht,{value:g,onChange:f,placeholder:r("common.importFromDecoDialog.searchPlaceholder"),onKeyDown:i=>{i.key==="Escape"&&f("")}})}),o.jsxs("div",{className:"pb-0 min-h-[300px]",children:[l.status==="error"&&o.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[o.jsx("p",{className:"text-sm text-destructive",children:l.error??r("common.importFromDecoDialog.failedToConnectGithub")}),o.jsx(le,{variant:"outline",size:"sm",onClick:l.retry,children:r("common.importFromDecoDialog.retryGithubSetup")})]}),w&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:r("common.importFromDecoDialog.settingUpGithub")}),d&&!w&&l.status!=="error"&&o.jsxs("div",{className:"flex flex-col py-2",children:[o.jsx("div",{className:"px-8 py-2",children:o.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:r("common.importFromDecoDialog.selectGithubConnection")})}),c.map(i=>o.jsxs("button",{type:"button",onClick:()=>u(i),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?o.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):o.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:o.jsx(xt,{className:"size-3.5 text-muted-foreground"})}),o.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}),S&&!w&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:r("common.importFromDecoDialog.loadingSites")}),!S&&!w&&!d&&l.status!=="error"&&!G&&N.length===0&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:r("common.importFromDecoDialog.noSitesFound")}),!S&&!w&&!d&&l.status!=="error"&&N.length>0&&o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[L.length===0&&o.jsx("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:r("common.importFromDecoDialog.noSitesMatch",{search:g})}),L.map(i=>{const P=rt(i.domains),E=m===i.name;return o.jsxs("button",{type:"button",onClick:()=>b(i.name),className:Pe("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",E?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[o.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:i.thumb_url?o.jsx("img",{src:i.thumb_url,alt:i.name,className:"w-full h-full object-cover",loading:"lazy"}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsxs("div",{className:"px-4 py-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:i.name}),P&&o.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:P})]})]},i.name)})]})]}),o.jsxs(gt,{className:"px-8 py-5 border-t border-border",children:[o.jsx(le,{variant:"outline",onClick:()=>T(!1),disabled:_.isPending,children:r("common.importFromDecoDialog.cancel")}),o.jsx(le,{disabled:!m||!I||_.isPending||S||w||d||!a||l.status==="error",onClick:()=>m&&_.mutate(m),children:_.isPending?r("common.importFromDecoDialog.importing"):r("common.importFromDecoDialog.import")})]})]})})}function Ts(){const t=ue.c(82),e=pe(),{org:s}=ge(),[r,n]=O.useState(""),h=It(r,300);let p;t[0]!==h?(p={searchTerm:h},t[0]=h,t[1]=p):p=t[1];const y=ze(p),m=Ue();let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b={navigateOnCreate:!0},t[2]=b):b=t[2];const{createVirtualMCP:j,isCreating:u}=Je(b),[g,f]=O.useState(null),[x,C]=O.useState(!1),[c,l]=O.useState(!1),{granted:a}=Me("agents:manage"),d=Ye();let D;t[3]!==s?(D=A=>A.id!==s.id,t[3]=s,t[4]=D):D=t[4];const w=y.filter(D),{data:K}=$e(w.map(zt));let S;t[5]!==m||t[6]!==g||t[7]!==e?(S=async()=>{if(!g)return;const{id:A,title:Ie}=g;f(null);try{await m.delete.mutateAsync(A),U("agent_deleted",{agent_id:A,source:"agents_list"}),fe.success(e("routes.agentsList.deletedAgent",{title:Ie}))}catch{}},t[5]=m,t[6]=g,t[7]=e,t[8]=S):S=t[8];const G=S,N=de,T=de,L=de;let I;t[9]!==e?(I=e("routes.agentsList.title"),t[9]=e,t[10]=I):I=t[10];let _;t[11]!==I?(_=o.jsx(de.Title,{children:I}),t[11]=I,t[12]=_):_=t[12];let i;t[13]!==e?(i=e("routes.agentsList.searchPlaceholder"),t[13]=e,t[14]=i):i=t[14];let P;t[15]===Symbol.for("react.memo_cache_sentinel")?(P=A=>{A.key==="Escape"&&(n(""),A.target.blur())},t[15]=P):P=t[15];let E;t[16]!==r||t[17]!==i?(E=o.jsx(vt,{value:r,onChange:n,placeholder:i,className:"w-full md:w-[375px]",onKeyDown:P}),t[16]=r,t[17]=i,t[18]=E):E=t[18];let v;t[19]!==a||t[20]!==j||t[21]!==u||t[22]!==d||t[23]!==e?(v=a&&o.jsxs(xe,{children:[o.jsx(he,{asChild:!0,children:o.jsxs(le,{size:"sm",children:[o.jsx(De,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(ye,{onCreateFromScratch:()=>{U("agent_create_clicked",{source:"agents_list",method:"scratch"}),j()},onImportGitHub:()=>{U("agent_create_clicked",{source:"agents_list",method:"github"}),l(!0)},onImportDeco:()=>{U("agent_create_clicked",{source:"agents_list",method:"deco"}),C(!0)},isCreating:u,align:"end",showDecoImport:d})]}),t[19]=a,t[20]=j,t[21]=u,t[22]=d,t[23]=e,t[24]=v):v=t[24];let F;t[25]!==E||t[26]!==v?(F=o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[E,v]}),t[25]=E,t[26]=v,t[27]=F):F=t[27];let R;t[28]!==F||t[29]!==_?(R=o.jsxs("div",{className:"flex flex-col gap-6",children:[_,F]}),t[28]=F,t[29]=_,t[30]=R):R=t[30];const Q=w.length===0&&o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(We,{image:o.jsx(Qe,{size:48,className:"text-muted-foreground"}),title:e(r?"routes.agentsList.noAgentsFound":"routes.agentsList.noAgentsYet"),description:r?e("routes.agentsList.noAgentsMatchSearch",{search:r}):e(a?"routes.agentsList.createAgentToGetStarted":"routes.agentsList.askAdminToCreate"),actions:!r&&a&&o.jsxs(xe,{children:[o.jsx(he,{asChild:!0,children:o.jsxs(le,{size:"sm",children:[o.jsx(De,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(ye,{onCreateFromScratch:()=>{U("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),j()},onImportGitHub:()=>{U("agent_create_clicked",{source:"agents_list_empty",method:"github"}),l(!0)},onImportDeco:()=>{U("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),C(!0)},isCreating:u,align:"center",showBetaBadge:!0,showDecoImport:d})]})})}),ae=w.length>0&&o.jsxs("div",{className:"mt-6 @container",children:[o.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:e("routes.agentsList.agentsHeading")}),o.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:w.map(A=>o.jsx(At,{project:A,lastUsedAt:K?.get(A.id)?.last_used_at,onDeleteClick:a?()=>f({id:A.id,title:A.title}):void 0},A.id))})]});let k;t[31]!==R||t[32]!==Q||t[33]!==ae||t[34]!==L.Container?(k=o.jsxs(L.Container,{children:[R,Q,ae]}),t[31]=R,t[32]=Q,t[33]=ae,t[34]=L.Container,t[35]=k):k=t[35];let z;t[36]!==k||t[37]!==T.Content?(z=o.jsx(T.Content,{children:k}),t[36]=k,t[37]=T.Content,t[38]=z):z=t[38];let H;t[39]!==c?(H=o.jsx(Nt,{open:c,onOpenChange:l}),t[39]=c,t[40]=H):H=t[40];let $;t[41]!==x?($=o.jsx(Rt,{open:x,onOpenChange:C}),t[41]=x,t[42]=$):$=t[42];const Y=!!g;let W;t[43]===Symbol.for("react.memo_cache_sentinel")?(W=A=>!A&&f(null),t[43]=W):W=t[43];let B;t[44]!==e?(B=e("routes.agentsList.deleteAgentTitle"),t[44]=e,t[45]=B):B=t[45];let V;t[46]!==B?(V=o.jsx(bt,{children:B}),t[46]=B,t[47]=V):V=t[47];let M;t[48]!==e?(M=e("routes.agentsList.deleteAgentDescription"),t[48]=e,t[49]=M):M=t[49];const q=g?.title;let J;t[50]!==q?(J=o.jsx("span",{className:"font-medium text-foreground",children:q}),t[50]=q,t[51]=J):J=t[51];let X;t[52]!==M||t[53]!==J?(X=o.jsxs(jt,{children:[M," ",J,"."]}),t[52]=M,t[53]=J,t[54]=X):X=t[54];let Z;t[55]!==V||t[56]!==X?(Z=o.jsxs(Ct,{children:[V,X]}),t[55]=V,t[56]=X,t[57]=Z):Z=t[57];let ee;t[58]!==e?(ee=e("routes.agentsList.cancelButton"),t[58]=e,t[59]=ee):ee=t[59];let te;t[60]!==ee?(te=o.jsx(Dt,{children:ee}),t[60]=ee,t[61]=te):te=t[61];let oe;t[62]!==e?(oe=e("routes.agentsList.deleteButton"),t[62]=e,t[63]=oe):oe=t[63];let se;t[64]!==G||t[65]!==oe?(se=o.jsx(yt,{onClick:G,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:oe}),t[64]=G,t[65]=oe,t[66]=se):se=t[66];let re;t[67]!==te||t[68]!==se?(re=o.jsxs(wt,{children:[te,se]}),t[67]=te,t[68]=se,t[69]=re):re=t[69];let ie;t[70]!==Z||t[71]!==re?(ie=o.jsxs(St,{children:[Z,re]}),t[70]=Z,t[71]=re,t[72]=ie):ie=t[72];let ne;t[73]!==Y||t[74]!==ie?(ne=o.jsx(_t,{open:Y,onOpenChange:W,children:ie}),t[73]=Y,t[74]=ie,t[75]=ne):ne=t[75];let me;return t[76]!==N||t[77]!==z||t[78]!==H||t[79]!==$||t[80]!==ne?(me=o.jsxs(N,{children:[z,H,$,ne]}),t[76]=N,t[77]=z,t[78]=H,t[79]=$,t[80]=ne,t[81]=me):me=t[81],me}function zt(t){return t.id}export{Ts as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as V,b as Q,ac as Oe,ad as Fe,r as G,j as s,az as st,dP as Le,t as Z,dO as de,dN as ae,as as Be,M as se,_ as te,n as oe,e as ie,v as he,B as W,K as X,m as pe,ax as ue,l as re,cN as He,fj as it,eC as ve,ao as lt,L as rt,o as Ke,h as nt,aa as at,ab as xe,fi as ot}from"./index-zEbfx_2K.js";import{i as ct}from"./AlertCircle-CBmZyziw.js";import{u as qe,a as me,i as dt,b as ut,p as mt,e as be,f as ft,d as ze}from"./use-ai-providers-D1prvpLy.js";import{i as pt}from"./CheckCircle-DWLeIAIi.js";import{d as gt,l as xt}from"./use-organization-settings-BIkwHnT4.js";import{S as ht}from"./schema-CpmuStS2.js";import{M as vt}from"./select-model-BBl_olhQ.js";import{u as bt}from"./use-debounced-autosave-XooE91Oe.js";import{I as ce}from"./input-BYddSsu_.js";import{T as Ae,a as jt}from"./toggle-group-DjgZ3Fw8.js";import{A as je,a as ye,b as Ne,c as Se,g as Ce,d as Pe,e as _e,f as Ie}from"./alert-dialog-D1mw46Sk.js";import{u as ge,d as we,a as Ve,e as yt}from"./use-entitlements-CtB8_mAv.js";import{i as Nt}from"./ChevronRight-B6hcwUgO.js";import{u as Ge}from"./use-open-billing-url-DZl00gsn.js";import{u as Qe,P as Ye,a as St,c as Ct,f as Pt,F as _t}from"./plan-ladder-87xBAt0E.js";import{i as It}from"./Check-B1dsRB6C.js";import{a as wt,i as kt}from"./Tool01-C1iMp6Qn.js";import{s as Dt}from"./Plus-DhTGO6OU.js";import{s as Kt}from"./Trash01-UhB0CRb8.js";import{A as At}from"./avatar-B4O8VfWG.js";import{u as Et,f as Tt}from"./use-date-fns-locale-BW93JelV.js";import{c as We,P as Rt,C as Ee}from"./decopilot-CS4SGQVN.js";import{P as Ut}from"./ai-providers-logos-DD3qZ33J.js";import{i as Mt}from"./Settings02-BQWj4mrx.js";import{s as $t}from"./Eye-cBhNaih2.js";import{d as Ot,c as Ft,b as Lt,D as Bt,e as Ht}from"./dialog-DqEzjMAL.js";import{R as qt}from"./require-capability-ClQfFfk3.js";import"./task-board-DgAEwWBa.js";import"./drawer-CcQRz4y-.js";import"./use-mobile-DI9_UYOG.js";import"./chat-context-CyABXc7f.js";import"./use-panel-navigate-jpI-ng6I.js";import"./thread-route-BqVXF90R.js";import"./use-project-scope-1l5jykdC.js";import"./use-virtual-mcp-4ZF94-K-.js";import"./use-mcp-client-Dpy2Y_w9.js";import"./auth-DD_Ixcci.js";import"./github-repo-BknN0SVI.js";import"./autosend-Ui23lPKc.js";import"./thread-intent-B0Twy-Y4.js";import"./slugify-CEUa2lfQ.js";import"./hooks-Cb68QwoE.js";import"./backoff-8mStPHYB.js";import"./use-is-desktop-app-BNujXJc_.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-CQEvF74O.js";import"./index-CwzlBp8e.js";import"./User01-fZfVT6XZ.js";import"./differenceInSeconds-C3x8sHUj.js";import"./checkbox-CtOL1W3M.js";import"./select-5CD79m_H.js";import"./index-Lc7giPgZ.js";import"./ChevronUp-CLfesB4Y.js";import"./ArrowLeft-B69K0kVk.js";import"./ChevronSelectorVertical-Cyo58PlY.js";import"./Key01-CtPEI4Eg.js";import"./SearchMd-fdzDozsD.js";import"./Monitor01-D5zc1Ggz.js";import"./download-app-dialog-BAvoyDUp.js";import"./Copy01-BmdYCu9M.js";import"./Download01-CSXusgOH.js";import"./Image01-O24XNmwN.js";import"./Stars01-OOrCszDj.js";import"./X-DdrxBhnS.js";import"./access-gate-C6q3nVJm.js";import"./capability-load-error-H0rjgWhr.js";const zt=e=>e.capabilities?.includes("image")===!0,Vt=e=>dt(e),Gt=e=>ut(e),Qt=[{key:"fast",filter:void 0},{key:"smart",filter:void 0},{key:"thinking",filter:void 0},{key:"image",filter:zt},{key:"web_search",filter:Vt},{key:"deep_research",filter:Gt}];function Yt(e){const t=V.c(30),{slot:i,onSlotChange:r,filterModels:o,defaultKeyId:n}=e,c=qe(),l=c.some(I=>I.id===i?.keyId)?i?.keyId:null,[d,g]=G.useState(l??n);let f,a;t[0]!==l?(f=()=>{l&&g(l)},a=[l],t[0]=l,t[1]=f,t[2]=a):(f=t[1],a=t[2]),G.useEffect(f,a);let x;t[3]!==c||t[4]!==n||t[5]!==d?(x=c.some(I=>I.id===d)?d:n,t[3]=c,t[4]=n,t[5]=d,t[6]=x):x=t[6];const u=x;let v;t[7]!==u||t[8]!==c?(v=u?c.find(I=>I.id===u):null,t[7]=u,t[8]=c,t[9]=v):v=t[9];const C=v,{models:y,isLoading:h}=me(o?u??void 0:void 0),j=o?h||y.some(o):!0;let N;t[10]!==i||t[11]!==C?.providerId||t[12]!==l?(N=i&&l?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:C?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[10]=i,t[11]=C?.providerId,t[12]=l,t[13]=N):N=t[13];const w=N,m=Q();if(o&&!j){let I;t[14]!==m?(I=m("settings.simpleModeSection.notAvailableWithCurrentProvider"),t[14]=m,t[15]=I):I=t[15];let k;return t[16]!==I?(k=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:I}),t[16]=I,t[17]=k):k=t[17],k}let b;t[18]!==m?(b=m("settings.simpleModeSection.pickModel"),t[18]=m,t[19]=b):b=t[19];let S;t[20]===Symbol.for("react.memo_cache_sentinel")?(S=I=>g(I),t[20]=S):S=t[20];let p;t[21]!==u||t[22]!==r?(p=I=>{const k=I.keyId??u??"";g(k),r({keyId:k,modelId:I.modelId,title:I.title})},t[21]=u,t[22]=r,t[23]=p):p=t[23];let P;return t[24]!==u||t[25]!==o||t[26]!==w||t[27]!==b||t[28]!==p?(P=s.jsx(vt,{variant:"bordered",placeholder:b,model:w,credentialId:u,filterModels:o,onCredentialChange:S,onModelChange:p}),t[24]=u,t[25]=o,t[26]=w,t[27]=b,t[28]=p,t[29]=P):P=t[29],P}function Wt(e){const t=V.c(10),{isPending:i,showSaved:r}=e,o=Q();if(i){let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Be,{size:12,className:"animate-spin"}),t[0]=n):n=t[0];let c;t[1]!==o?(c=o("settings.simpleModeSection.saving"),t[1]=o,t[2]=c):c=t[2];let l;return t[3]!==c?(l=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[n,c]}),t[3]=c,t[4]=l):l=t[4],l}if(r){let n;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(pt,{size:12}),t[5]=n):n=t[5];let c;t[6]!==o?(c=o("settings.simpleModeSection.saved"),t[6]=o,t[7]=c):c=t[7];let l;return t[8]!==c?(l=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[n,c]}),t[8]=c,t[9]=l):l=t[9],l}return null}function Zt(){const e=V.c(58),t=Q(),i=qe(),r=gt(),o=i.length>0;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Oe(ht),e[0]=n):n=e[0];let c;e[1]!==r?(c={resolver:n,values:r,mode:"onChange"},e[1]=r,e[2]=c):c=e[2];const l=Fe(c),{mutate:d,isPending:g,isSuccess:f}=xt(),a=l.formState.isDirty;let x;e[3]!==l||e[4]!==r||e[5]!==t||e[6]!==d?(x={delayMs:250,save:async()=>{const _=l.getValues();d(_,{onSuccess:()=>l.reset(_,{keepValues:!0}),onError:M=>{l.reset(r),Z.error(t("settings.simpleModeSection.failedToSave",{error:M.message}))}})}},e[3]=l,e[4]=r,e[5]=t,e[6]=d,e[7]=x):x=e[7];const{schedule:u}=bt(x),v=i[0],C=i[1],y=i[2],{models:h}=me(v?.id),{models:j}=me(C?.id),{models:N}=me(y?.id);let w,m;e[8]!==l||e[9]!==o?(w=()=>{o||l.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}})},m=[o,l],e[8]=l,e[9]=o,e[10]=w,e[11]=m):(w=e[10],m=e[11]),G.useEffect(w,m);let b;e[12]!==i||e[13]!==l||e[14]!==v||e[15]!==C||e[16]!==y||e[17]!==h||e[18]!==j||e[19]!==N?(b=()=>{const _=l.getValues(),M=new Set(i.map(Xt)),H={};v?.id&&(H[v.id]=h),C?.id&&(H[C.id]=j),y?.id&&(H[y.id]=N);const z=le=>le!=null&&!M.has(le.keyId),K={fast:z(_.tiers.fast)?null:_.tiers.fast,smart:z(_.tiers.smart)?null:_.tiers.smart,thinking:z(_.tiers.thinking)?null:_.tiers.thinking,image:z(_.tiers.image)?null:_.tiers.image,web_search:z(_.tiers.web_search)?null:_.tiers.web_search,deep_research:z(_.tiers.deep_research)?null:_.tiers.deep_research},Y=!K.fast||!K.smart||!K.thinking||!K.image||!K.web_search||!K.deep_research,J=K.fast===_.tiers.fast&&K.smart===_.tiers.smart&&K.thinking===_.tiers.thinking&&K.image===_.tiers.image&&K.web_search===_.tiers.web_search&&K.deep_research===_.tiers.deep_research;if(!Y&&J)return;const ee=mt(i,H);l.reset({tiers:{fast:K.fast??ee.chat.fast,smart:K.smart??ee.chat.smart,thinking:K.thinking??ee.chat.thinking,image:K.image??ee.image,web_search:K.web_search??ee.webSearch,deep_research:K.deep_research??ee.deepResearch}},{keepDirty:!0})},e[12]=i,e[13]=l,e[14]=v,e[15]=C,e[16]=y,e[17]=h,e[18]=j,e[19]=N,e[20]=b):b=e[20];const S=v?.id,p=C?.id,P=y?.id;let I;e[21]!==i||e[22]!==l||e[23]!==h||e[24]!==j||e[25]!==N||e[26]!==S||e[27]!==p||e[28]!==P?(I=[l,i,h,j,N,S,p,P],e[21]=i,e[22]=l,e[23]=h,e[24]=j,e[25]=N,e[26]=S,e[27]=p,e[28]=P,e[29]=I):I=e[29],G.useEffect(b,I);let k;e[30]!==t?(k=_=>({fast:t("settings.simpleModeSection.tierFast"),smart:t("settings.simpleModeSection.tierSmart"),thinking:t("settings.simpleModeSection.tierThinking"),image:t("settings.simpleModeSection.tierImage"),web_search:t("settings.simpleModeSection.tierWebSearch"),deep_research:t("settings.simpleModeSection.tierDeepResearch")})[_]||_,e[30]=t,e[31]=k):k=e[31];const T=k;let A;e[32]!==t?(A=_=>({fast:t("settings.simpleModeSection.tierFastDesc"),smart:t("settings.simpleModeSection.tierSmartDesc"),thinking:t("settings.simpleModeSection.tierThinkingDesc"),image:t("settings.simpleModeSection.tierImageDesc"),web_search:t("settings.simpleModeSection.tierWebSearchDesc"),deep_research:t("settings.simpleModeSection.tierDeepResearchDesc")})[_]||"",e[32]=t,e[33]=A):A=e[33];const U=A;let E;e[34]!==t?(E=t("settings.simpleModeSection.defaultModels"),e[34]=t,e[35]=E):E=e[35];let R;e[36]!==t?(R=t("settings.simpleModeSection.modelsPowerDescription"),e[36]=t,e[37]=R):R=e[37];let $;e[38]!==R?($=s.jsx("p",{className:"text-sm text-muted-foreground",children:R}),e[38]=R,e[39]=$):$=e[39];const B=f&&!a;let O;e[40]!==g||e[41]!==B?(O=s.jsx(Wt,{isPending:g,showSaved:B}),e[40]=g,e[41]=B,e[42]=O):O=e[42];let F;e[43]!==$||e[44]!==O?(F=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2",children:[$,O]}),e[43]=$,e[44]=O,e[45]=F):F=e[45];let L;e[46]!==i[0]?.id||e[47]!==l.control||e[48]!==U||e[49]!==T||e[50]!==u?(L=Qt.map(_=>s.jsx(st,{control:l.control,name:`tiers.${_.key}`,render:M=>{const{field:H}=M;return s.jsx(Le,{title:T(_.key),description:U(_.key),action:s.jsx(Yt,{slot:H.value,defaultKeyId:i[0]?.id??null,filterModels:_.filter,onSlotChange:z=>{H.onChange(z),u()}})})}},_.key)),e[46]=i[0]?.id,e[47]=l.control,e[48]=U,e[49]=T,e[50]=u,e[51]=L):L=e[51];let q;e[52]!==L?(q=s.jsx(de,{children:L}),e[52]=L,e[53]=q):q=e[53];let D;return e[54]!==E||e[55]!==F||e[56]!==q?(D=s.jsxs(ae,{title:E,headerClassName:"pl-0",children:[F,q]}),e[54]=E,e[55]=F,e[56]=q,e[57]=D):D=e[57],D}function Xt(e){return e.id}const Jt={usd:[10,20,100],brl:[50,100,500]};function Ze(){const e=V.c(30),t=Q(),i=te(),[r]=he(),[o,n]=G.useState(!1);let c;e[0]!==t?(c=p=>{Z.error(t("settings.decoCreditsHero.topUpFailed",{message:p.message}))},e[0]=t,e[1]=c):c=e[1];const{mutate:l,isPending:d}=ie({mutationFn:async p=>{const{url:P}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:p,currency:u});return P},onSuccess:es,onError:c}),[g,f]=G.useState(""),[a,x]=G.useState(r.language==="pt-BR"?"brl":"usd"),u=a,v=parseFloat(g),C=!isNaN(v)&&v>=1,y=u==="brl"?"R$":"$";let h;e[2]!==x?(h=p=>{p&&x(p)},e[2]=x,e[3]=h):h=e[3];let j,N;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ae,{value:"usd",className:"h-8 px-3 text-sm",children:"USD"}),N=s.jsx(Ae,{value:"brl",className:"h-8 px-3 text-sm",children:"BRL"}),e[4]=j,e[5]=N):(j=e[4],N=e[5]);let w;e[6]!==u||e[7]!==h?(w=s.jsxs(jt,{type:"single",variant:"outline",size:"sm",value:u,onValueChange:h,children:[j,N]}),e[6]=u,e[7]=h,e[8]=w):w=e[8];let m;e[9]!==u||e[10]!==y||e[11]!==o||e[12]!==d||e[13]!==t||e[14]!==l?(m=!o&&s.jsxs(s.Fragment,{children:[Jt[u].map(p=>s.jsxs(W,{variant:"outline",className:"tabular-nums",disabled:d,onClick:()=>l(p*100),children:[y,p]},p)),s.jsx(W,{variant:"ghost",className:"text-muted-foreground",onClick:()=>n(!0),disabled:d,children:t("settings.decoCreditsHero.custom")})]}),e[9]=u,e[10]=y,e[11]=o,e[12]=d,e[13]=t,e[14]=l,e[15]=m):m=e[15];let b;e[16]!==y||e[17]!==g||e[18]!==v||e[19]!==o||e[20]!==C||e[21]!==d||e[22]!==f||e[23]!==t||e[24]!==l?(b=o&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:y}),s.jsx(ce,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:g,onChange:p=>f(p.target.value),className:"h-8 text-sm pl-7",autoFocus:!0})]}),s.jsx(W,{disabled:!C||d,onClick:()=>l(Math.round(v*100)),children:d?"...":t("settings.decoCreditsHero.add")}),s.jsx(W,{variant:"ghost",className:"text-muted-foreground",onClick:()=>{n(!1),f("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=y,e[17]=g,e[18]=v,e[19]=o,e[20]=C,e[21]=d,e[22]=f,e[23]=t,e[24]=l,e[25]=b):b=e[25];let S;return e[26]!==w||e[27]!==m||e[28]!==b?(S=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[w,m,b]})}),e[26]=w,e[27]=m,e[28]=b,e[29]=S):S=e[29],S}function es(e){e&&window.open(e,"_blank","noopener,noreferrer")}function ts(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function ss(e){const t=V.c(38),{enabled:i}=e,r=Q(),{org:o}=se(),n=te();let c;t[0]!==o.id?(c=X.aiProviderCredits(o.id,"deco"),t[0]=o.id,t[1]=c):c=t[1];let l;t[2]!==n?(l=async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},t[2]=n,t[3]=l):l=t[3];let d;t[4]!==i||t[5]!==c||t[6]!==l?(d={queryKey:c,enabled:i,staleTime:6e4,queryFn:l},t[4]=i,t[5]=c,t[6]=l,t[7]=d):d=t[7];const{data:g,isLoading:f,refetch:a,isFetching:x}=pe(d);if(!i)return null;const u=g?.balanceCents!=null?g.balanceCents/100:null;let v;t[8]!==u?(v=u!=null?`$${u.toFixed(2)}`:"—",t[8]=u,t[9]=v):v=t[9];const C=v;let y;t[10]!==u||t[11]!==C||t[12]!==x||t[13]!==f?(y=f||x?s.jsx(ue,{className:"h-9 w-24"}):s.jsx("span",{className:re("text-3xl font-semibold tabular-nums tracking-tight",u!=null&&ts(u)),children:C}),t[10]=u,t[11]=C,t[12]=x,t[13]=f,t[14]=y):y=t[14];let h;t[15]!==a?(h=()=>a(),t[15]=a,t[16]=h):h=t[16];let j;t[17]!==r?(j=r("settings.decoCreditsHero.refreshBalance"),t[17]=r,t[18]=j):j=t[18];const N=x&&"animate-spin";let w;t[19]!==N?(w=re(N),t[19]=N,t[20]=w):w=t[20];let m;t[21]!==w?(m=s.jsx(Be,{size:14,className:w}),t[21]=w,t[22]=m):m=t[22];let b;t[23]!==x||t[24]!==m||t[25]!==h||t[26]!==j?(b=s.jsx("button",{type:"button",onClick:h,disabled:x,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 transition-colors p-1 rounded-md hover:bg-muted/50","aria-label":j,children:m}),t[23]=x,t[24]=m,t[25]=h,t[26]=j,t[27]=b):b=t[27];let S;t[28]!==b||t[29]!==y?(S=s.jsxs("div",{className:"flex items-baseline gap-2",children:[y,b]}),t[28]=b,t[29]=y,t[30]=S):S=t[30];let p;t[31]!==r?(p=r("settings.decoCreditsHero.availableBalance"),t[31]=r,t[32]=p):p=t[32];let P;t[33]!==p?(P=s.jsx("p",{className:"text-xs text-muted-foreground",children:p}),t[33]=p,t[34]=P):P=t[34];let I;return t[35]!==S||t[36]!==P?(I=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[S,P]}),t[35]=S,t[36]=P,t[37]=I):I=t[37],I}function is(){const e=V.c(74),t=Q(),{org:i}=se(),r=te(),o=oe(),n=be();let c;e[0]!==n?(c=n.find(ls),e[0]=n,e[1]=c):c=e[1];const l=c,d=ge(),g=we("credits"),[f,a]=G.useState(!1);let x;e[2]!==l||e[3]!==r?(x=async()=>{l&&await r.call("AI_PROVIDER_KEY_DELETE",{keyId:l.id})},e[2]=l,e[3]=r,e[4]=x):x=e[4];let u;e[5]!==i||e[6]!==o||e[7]!==t?(u=()=>{o.invalidateQueries({queryKey:X.aiProviderKeys(i.id)}),o.invalidateQueries({queryKey:X.aiProviders(i.id)}),Z.success(t("settings.decoCreditsHero.disconnectSuccess")),a(!1)},e[5]=i,e[6]=o,e[7]=t,e[8]=u):u=e[8];let v;e[9]!==t?(v=z=>{Z.error(t("settings.decoCreditsHero.disconnectError",{message:z.message}))},e[9]=t,e[10]=v):v=e[10];let C;e[11]!==x||e[12]!==u||e[13]!==v?(C={mutationFn:x,onSuccess:u,onError:v},e[11]=x,e[12]=u,e[13]=v,e[14]=C):C=e[14];const{mutate:y,isPending:h}=ie(C);if(!l)return null;let j;e[15]!==t?(j=t("settings.decoCreditsHero.title"),e[15]=t,e[16]=j):j=e[16];let N;e[17]!==t?(N=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[17]=t,e[18]=N):N=e[18];let w;e[19]!==N?(w=s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:N,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"})}),e[19]=N,e[20]=w):w=e[20];let m;e[21]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),e[21]=m):m=e[21];let b;e[22]!==t?(b=t("settings.decoCreditsHero.disconnect"),e[22]=t,e[23]=b):b=e[23];let S;e[24]!==h||e[25]!==b?(S=s.jsx(W,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-destructive",onClick:m,disabled:h,children:b}),e[24]=h,e[25]=b,e[26]=S):S=e[26];let p;e[27]!==S||e[28]!==w?(p=s.jsxs("div",{className:"flex items-center justify-between",children:[w,S]}),e[27]=S,e[28]=w,e[29]=p):p=e[29];let P;e[30]!==t?(P=t("settings.decoCreditsHero.disconnectTitle"),e[30]=t,e[31]=P):P=e[31];let I;e[32]!==P?(I=s.jsx(je,{children:P}),e[32]=P,e[33]=I):I=e[33];let k;e[34]!==t?(k=t("settings.decoCreditsHero.disconnectDescription"),e[34]=t,e[35]=k):k=e[35];let T;e[36]!==k?(T=s.jsx(ye,{children:k}),e[36]=k,e[37]=T):T=e[37];let A;e[38]!==I||e[39]!==T?(A=s.jsxs(Ne,{children:[I,T]}),e[38]=I,e[39]=T,e[40]=A):A=e[40];let U;e[41]!==t?(U=t("settings.decoCreditsHero.cancelButton"),e[41]=t,e[42]=U):U=e[42];let E;e[43]!==U?(E=s.jsx(Se,{children:U}),e[43]=U,e[44]=E):E=e[44];let R;e[45]!==y?(R=()=>y(),e[45]=y,e[46]=R):R=e[46];let $;e[47]!==t?($=t("settings.decoCreditsHero.disconnectButton"),e[47]=t,e[48]=$):$=e[48];let B;e[49]!==R||e[50]!==$?(B=s.jsx(Ce,{onClick:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:$}),e[49]=R,e[50]=$,e[51]=B):B=e[51];let O;e[52]!==E||e[53]!==B?(O=s.jsxs(Pe,{children:[E,B]}),e[52]=E,e[53]=B,e[54]=O):O=e[54];let F;e[55]!==A||e[56]!==O?(F=s.jsxs(_e,{children:[A,O]}),e[55]=A,e[56]=O,e[57]=F):F=e[57];let L;e[58]!==f||e[59]!==F?(L=s.jsx(Ie,{open:f,onOpenChange:a,children:F}),e[58]=f,e[59]=F,e[60]=L):L=e[60];const q=!d;let D;e[61]!==q?(D=s.jsx(ss,{enabled:q}),e[61]=q,e[62]=D):D=e[62];let _;e[63]!==g||e[64]!==t?(_=g?s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:t("settings.decoCreditsHero.addCredits")}),s.jsx(Ze,{})]}):null,e[63]=g,e[64]=t,e[65]=_):_=e[65];let M;e[66]!==p||e[67]!==L||e[68]!==D||e[69]!==_?(M=s.jsx(de,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[p,L,D,_]})}),e[66]=p,e[67]=L,e[68]=D,e[69]=_,e[70]=M):M=e[70];let H;return e[71]!==M||e[72]!==j?(H=s.jsx(ae,{title:j,children:M}),e[71]=M,e[72]=j,e[73]=H):H=e[73],H}function ls(e){return e.providerId==="deco"}var ke="Progress",De=100,[rs]=it(ke),[ns,as]=rs(ke),Xe=G.forwardRef((e,t)=>{const{__scopeProgress:i,value:r=null,max:o,getValueLabel:n=os,...c}=e;(o||o===0)&&!Te(o)&&console.error(cs(`${o}`,"Progress"));const l=Te(o)?o:De;r!==null&&!Re(r,l)&&console.error(ds(`${r}`,"Progress"));const d=Re(r,l)?r:null,g=fe(d)?n(d,l):void 0;return s.jsx(ns,{scope:i,value:d,max:l,children:s.jsx(He.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":fe(d)?d:void 0,"aria-valuetext":g,role:"progressbar","data-state":tt(d,l),"data-value":d??void 0,"data-max":l,...c,ref:t})})});Xe.displayName=ke;var Je="ProgressIndicator",et=G.forwardRef((e,t)=>{const{__scopeProgress:i,...r}=e,o=as(Je,i);return s.jsx(He.div,{"data-state":tt(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});et.displayName=Je;function os(e,t){return`${Math.round(e/t*100)}%`}function tt(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function fe(e){return typeof e=="number"}function Te(e){return fe(e)&&!isNaN(e)&&e>0}function Re(e,t){return fe(e)&&!isNaN(e)&&e<=t&&e>=0}function cs(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${De}\`.`}function ds(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
1
|
+
import{c as V,b as Q,ac as Oe,ad as Fe,r as G,j as s,az as st,dP as Le,t as Z,dO as de,dN as ae,as as Be,M as se,_ as te,n as oe,e as ie,v as he,B as W,K as X,m as pe,ax as ue,l as re,cN as He,fj as it,eC as ve,ao as lt,L as rt,o as Ke,h as nt,aa as at,ab as xe,fi as ot}from"./index-Dc7hzqoi.js";import{i as ct}from"./AlertCircle-CMjsP_Tk.js";import{u as qe,a as me,i as dt,b as ut,p as mt,e as be,f as ft,d as ze}from"./use-ai-providers-BnF5Rw_n.js";import{i as pt}from"./CheckCircle-DHXQFnpK.js";import{d as gt,l as xt}from"./use-organization-settings-CKbX2SdA.js";import{S as ht}from"./schema-1zAO-l7e.js";import{M as vt}from"./select-model-DPv-zVVj.js";import{u as bt}from"./use-debounced-autosave-DqyNKPJM.js";import{I as ce}from"./input-DXlaTX4w.js";import{T as Ae,a as jt}from"./toggle-group-BiU_UDOq.js";import{A as je,a as ye,b as Ne,c as Se,g as Ce,d as Pe,e as _e,f as Ie}from"./alert-dialog-BI-B_8hq.js";import{u as ge,d as we,a as Ve,e as yt}from"./use-entitlements-Dl7pAsQ5.js";import{i as Nt}from"./ChevronRight-USKkhEpL.js";import{u as Ge}from"./use-open-billing-url-Df7K1DCF.js";import{u as Qe,P as Ye,a as St,c as Ct,f as Pt,F as _t}from"./plan-ladder-B2pv9Y73.js";import{i as It}from"./Check-B3RSsr_D.js";import{a as wt,i as kt}from"./Tool01-DouqPjim.js";import{s as Dt}from"./Plus-CVauOqLT.js";import{s as Kt}from"./Trash01-nl-t4IoV.js";import{A as At}from"./avatar-C9HiP4eS.js";import{u as Et,f as Tt}from"./use-date-fns-locale-onM9TTf8.js";import{c as We,P as Rt,C as Ee}from"./decopilot-BvepxP_-.js";import{P as Ut}from"./ai-providers-logos-DD3qZ33J.js";import{i as Mt}from"./Settings02-Cyf85ea0.js";import{s as $t}from"./Eye-Dyg2WPG4.js";import{d as Ot,c as Ft,b as Lt,D as Bt,e as Ht}from"./dialog-llvhXw2o.js";import{R as qt}from"./require-capability-CmtOZnXt.js";import"./task-board-DrUf5p-Z.js";import"./drawer-BIjkXMV3.js";import"./use-mobile-hIijCK0k.js";import"./chat-context-tZCX_cqt.js";import"./use-panel-navigate-WrD0KEYx.js";import"./thread-route-BBf64Mwk.js";import"./use-project-scope-DU0-JxYr.js";import"./use-virtual-mcp-DkK7ErtB.js";import"./use-mcp-client-e_hCatGm.js";import"./auth-DhzAq_9m.js";import"./github-repo-BknN0SVI.js";import"./autosend-BberXmli.js";import"./thread-intent-F-sZEflj.js";import"./slugify-CEUa2lfQ.js";import"./hooks-DZOMRp7D.js";import"./backoff-8mStPHYB.js";import"./use-is-desktop-app-BNujXJc_.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BpuQrfKN.js";import"./index-Bb-Re5q8.js";import"./User01-ClMaVCaJ.js";import"./differenceInSeconds-C3x8sHUj.js";import"./checkbox-jLf7fBuW.js";import"./select-BkKPcZFe.js";import"./index-DWw5wi2G.js";import"./ChevronUp-DiYhGG4T.js";import"./ArrowLeft-CjYy5Nhj.js";import"./ChevronSelectorVertical-DpRb2z1l.js";import"./Key01-CIXwHMRo.js";import"./SearchMd-C45D2PMI.js";import"./Monitor01-Ccs1gh2Z.js";import"./download-app-dialog-D_4eQbbs.js";import"./Copy01-nMxlBfeT.js";import"./Download01-BRrSA3Yx.js";import"./Image01-CxnjAzbb.js";import"./Stars01-oAh9h5b5.js";import"./X-CFCE4a-Q.js";import"./access-gate-Ds4n25mC.js";import"./capability-load-error-CJMvYDf4.js";const zt=e=>e.capabilities?.includes("image")===!0,Vt=e=>dt(e),Gt=e=>ut(e),Qt=[{key:"fast",filter:void 0},{key:"smart",filter:void 0},{key:"thinking",filter:void 0},{key:"image",filter:zt},{key:"web_search",filter:Vt},{key:"deep_research",filter:Gt}];function Yt(e){const t=V.c(30),{slot:i,onSlotChange:r,filterModels:o,defaultKeyId:n}=e,c=qe(),l=c.some(I=>I.id===i?.keyId)?i?.keyId:null,[d,g]=G.useState(l??n);let f,a;t[0]!==l?(f=()=>{l&&g(l)},a=[l],t[0]=l,t[1]=f,t[2]=a):(f=t[1],a=t[2]),G.useEffect(f,a);let x;t[3]!==c||t[4]!==n||t[5]!==d?(x=c.some(I=>I.id===d)?d:n,t[3]=c,t[4]=n,t[5]=d,t[6]=x):x=t[6];const u=x;let v;t[7]!==u||t[8]!==c?(v=u?c.find(I=>I.id===u):null,t[7]=u,t[8]=c,t[9]=v):v=t[9];const C=v,{models:y,isLoading:h}=me(o?u??void 0:void 0),j=o?h||y.some(o):!0;let N;t[10]!==i||t[11]!==C?.providerId||t[12]!==l?(N=i&&l?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:C?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[10]=i,t[11]=C?.providerId,t[12]=l,t[13]=N):N=t[13];const w=N,m=Q();if(o&&!j){let I;t[14]!==m?(I=m("settings.simpleModeSection.notAvailableWithCurrentProvider"),t[14]=m,t[15]=I):I=t[15];let k;return t[16]!==I?(k=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:I}),t[16]=I,t[17]=k):k=t[17],k}let b;t[18]!==m?(b=m("settings.simpleModeSection.pickModel"),t[18]=m,t[19]=b):b=t[19];let S;t[20]===Symbol.for("react.memo_cache_sentinel")?(S=I=>g(I),t[20]=S):S=t[20];let p;t[21]!==u||t[22]!==r?(p=I=>{const k=I.keyId??u??"";g(k),r({keyId:k,modelId:I.modelId,title:I.title})},t[21]=u,t[22]=r,t[23]=p):p=t[23];let P;return t[24]!==u||t[25]!==o||t[26]!==w||t[27]!==b||t[28]!==p?(P=s.jsx(vt,{variant:"bordered",placeholder:b,model:w,credentialId:u,filterModels:o,onCredentialChange:S,onModelChange:p}),t[24]=u,t[25]=o,t[26]=w,t[27]=b,t[28]=p,t[29]=P):P=t[29],P}function Wt(e){const t=V.c(10),{isPending:i,showSaved:r}=e,o=Q();if(i){let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Be,{size:12,className:"animate-spin"}),t[0]=n):n=t[0];let c;t[1]!==o?(c=o("settings.simpleModeSection.saving"),t[1]=o,t[2]=c):c=t[2];let l;return t[3]!==c?(l=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[n,c]}),t[3]=c,t[4]=l):l=t[4],l}if(r){let n;t[5]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(pt,{size:12}),t[5]=n):n=t[5];let c;t[6]!==o?(c=o("settings.simpleModeSection.saved"),t[6]=o,t[7]=c):c=t[7];let l;return t[8]!==c?(l=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[n,c]}),t[8]=c,t[9]=l):l=t[9],l}return null}function Zt(){const e=V.c(58),t=Q(),i=qe(),r=gt(),o=i.length>0;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Oe(ht),e[0]=n):n=e[0];let c;e[1]!==r?(c={resolver:n,values:r,mode:"onChange"},e[1]=r,e[2]=c):c=e[2];const l=Fe(c),{mutate:d,isPending:g,isSuccess:f}=xt(),a=l.formState.isDirty;let x;e[3]!==l||e[4]!==r||e[5]!==t||e[6]!==d?(x={delayMs:250,save:async()=>{const _=l.getValues();d(_,{onSuccess:()=>l.reset(_,{keepValues:!0}),onError:M=>{l.reset(r),Z.error(t("settings.simpleModeSection.failedToSave",{error:M.message}))}})}},e[3]=l,e[4]=r,e[5]=t,e[6]=d,e[7]=x):x=e[7];const{schedule:u}=bt(x),v=i[0],C=i[1],y=i[2],{models:h}=me(v?.id),{models:j}=me(C?.id),{models:N}=me(y?.id);let w,m;e[8]!==l||e[9]!==o?(w=()=>{o||l.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}})},m=[o,l],e[8]=l,e[9]=o,e[10]=w,e[11]=m):(w=e[10],m=e[11]),G.useEffect(w,m);let b;e[12]!==i||e[13]!==l||e[14]!==v||e[15]!==C||e[16]!==y||e[17]!==h||e[18]!==j||e[19]!==N?(b=()=>{const _=l.getValues(),M=new Set(i.map(Xt)),H={};v?.id&&(H[v.id]=h),C?.id&&(H[C.id]=j),y?.id&&(H[y.id]=N);const z=le=>le!=null&&!M.has(le.keyId),K={fast:z(_.tiers.fast)?null:_.tiers.fast,smart:z(_.tiers.smart)?null:_.tiers.smart,thinking:z(_.tiers.thinking)?null:_.tiers.thinking,image:z(_.tiers.image)?null:_.tiers.image,web_search:z(_.tiers.web_search)?null:_.tiers.web_search,deep_research:z(_.tiers.deep_research)?null:_.tiers.deep_research},Y=!K.fast||!K.smart||!K.thinking||!K.image||!K.web_search||!K.deep_research,J=K.fast===_.tiers.fast&&K.smart===_.tiers.smart&&K.thinking===_.tiers.thinking&&K.image===_.tiers.image&&K.web_search===_.tiers.web_search&&K.deep_research===_.tiers.deep_research;if(!Y&&J)return;const ee=mt(i,H);l.reset({tiers:{fast:K.fast??ee.chat.fast,smart:K.smart??ee.chat.smart,thinking:K.thinking??ee.chat.thinking,image:K.image??ee.image,web_search:K.web_search??ee.webSearch,deep_research:K.deep_research??ee.deepResearch}},{keepDirty:!0})},e[12]=i,e[13]=l,e[14]=v,e[15]=C,e[16]=y,e[17]=h,e[18]=j,e[19]=N,e[20]=b):b=e[20];const S=v?.id,p=C?.id,P=y?.id;let I;e[21]!==i||e[22]!==l||e[23]!==h||e[24]!==j||e[25]!==N||e[26]!==S||e[27]!==p||e[28]!==P?(I=[l,i,h,j,N,S,p,P],e[21]=i,e[22]=l,e[23]=h,e[24]=j,e[25]=N,e[26]=S,e[27]=p,e[28]=P,e[29]=I):I=e[29],G.useEffect(b,I);let k;e[30]!==t?(k=_=>({fast:t("settings.simpleModeSection.tierFast"),smart:t("settings.simpleModeSection.tierSmart"),thinking:t("settings.simpleModeSection.tierThinking"),image:t("settings.simpleModeSection.tierImage"),web_search:t("settings.simpleModeSection.tierWebSearch"),deep_research:t("settings.simpleModeSection.tierDeepResearch")})[_]||_,e[30]=t,e[31]=k):k=e[31];const T=k;let A;e[32]!==t?(A=_=>({fast:t("settings.simpleModeSection.tierFastDesc"),smart:t("settings.simpleModeSection.tierSmartDesc"),thinking:t("settings.simpleModeSection.tierThinkingDesc"),image:t("settings.simpleModeSection.tierImageDesc"),web_search:t("settings.simpleModeSection.tierWebSearchDesc"),deep_research:t("settings.simpleModeSection.tierDeepResearchDesc")})[_]||"",e[32]=t,e[33]=A):A=e[33];const U=A;let E;e[34]!==t?(E=t("settings.simpleModeSection.defaultModels"),e[34]=t,e[35]=E):E=e[35];let R;e[36]!==t?(R=t("settings.simpleModeSection.modelsPowerDescription"),e[36]=t,e[37]=R):R=e[37];let $;e[38]!==R?($=s.jsx("p",{className:"text-sm text-muted-foreground",children:R}),e[38]=R,e[39]=$):$=e[39];const B=f&&!a;let O;e[40]!==g||e[41]!==B?(O=s.jsx(Wt,{isPending:g,showSaved:B}),e[40]=g,e[41]=B,e[42]=O):O=e[42];let F;e[43]!==$||e[44]!==O?(F=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2",children:[$,O]}),e[43]=$,e[44]=O,e[45]=F):F=e[45];let L;e[46]!==i[0]?.id||e[47]!==l.control||e[48]!==U||e[49]!==T||e[50]!==u?(L=Qt.map(_=>s.jsx(st,{control:l.control,name:`tiers.${_.key}`,render:M=>{const{field:H}=M;return s.jsx(Le,{title:T(_.key),description:U(_.key),action:s.jsx(Yt,{slot:H.value,defaultKeyId:i[0]?.id??null,filterModels:_.filter,onSlotChange:z=>{H.onChange(z),u()}})})}},_.key)),e[46]=i[0]?.id,e[47]=l.control,e[48]=U,e[49]=T,e[50]=u,e[51]=L):L=e[51];let q;e[52]!==L?(q=s.jsx(de,{children:L}),e[52]=L,e[53]=q):q=e[53];let D;return e[54]!==E||e[55]!==F||e[56]!==q?(D=s.jsxs(ae,{title:E,headerClassName:"pl-0",children:[F,q]}),e[54]=E,e[55]=F,e[56]=q,e[57]=D):D=e[57],D}function Xt(e){return e.id}const Jt={usd:[10,20,100],brl:[50,100,500]};function Ze(){const e=V.c(30),t=Q(),i=te(),[r]=he(),[o,n]=G.useState(!1);let c;e[0]!==t?(c=p=>{Z.error(t("settings.decoCreditsHero.topUpFailed",{message:p.message}))},e[0]=t,e[1]=c):c=e[1];const{mutate:l,isPending:d}=ie({mutationFn:async p=>{const{url:P}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:p,currency:u});return P},onSuccess:es,onError:c}),[g,f]=G.useState(""),[a,x]=G.useState(r.language==="pt-BR"?"brl":"usd"),u=a,v=parseFloat(g),C=!isNaN(v)&&v>=1,y=u==="brl"?"R$":"$";let h;e[2]!==x?(h=p=>{p&&x(p)},e[2]=x,e[3]=h):h=e[3];let j,N;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ae,{value:"usd",className:"h-8 px-3 text-sm",children:"USD"}),N=s.jsx(Ae,{value:"brl",className:"h-8 px-3 text-sm",children:"BRL"}),e[4]=j,e[5]=N):(j=e[4],N=e[5]);let w;e[6]!==u||e[7]!==h?(w=s.jsxs(jt,{type:"single",variant:"outline",size:"sm",value:u,onValueChange:h,children:[j,N]}),e[6]=u,e[7]=h,e[8]=w):w=e[8];let m;e[9]!==u||e[10]!==y||e[11]!==o||e[12]!==d||e[13]!==t||e[14]!==l?(m=!o&&s.jsxs(s.Fragment,{children:[Jt[u].map(p=>s.jsxs(W,{variant:"outline",className:"tabular-nums",disabled:d,onClick:()=>l(p*100),children:[y,p]},p)),s.jsx(W,{variant:"ghost",className:"text-muted-foreground",onClick:()=>n(!0),disabled:d,children:t("settings.decoCreditsHero.custom")})]}),e[9]=u,e[10]=y,e[11]=o,e[12]=d,e[13]=t,e[14]=l,e[15]=m):m=e[15];let b;e[16]!==y||e[17]!==g||e[18]!==v||e[19]!==o||e[20]!==C||e[21]!==d||e[22]!==f||e[23]!==t||e[24]!==l?(b=o&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:y}),s.jsx(ce,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:g,onChange:p=>f(p.target.value),className:"h-8 text-sm pl-7",autoFocus:!0})]}),s.jsx(W,{disabled:!C||d,onClick:()=>l(Math.round(v*100)),children:d?"...":t("settings.decoCreditsHero.add")}),s.jsx(W,{variant:"ghost",className:"text-muted-foreground",onClick:()=>{n(!1),f("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=y,e[17]=g,e[18]=v,e[19]=o,e[20]=C,e[21]=d,e[22]=f,e[23]=t,e[24]=l,e[25]=b):b=e[25];let S;return e[26]!==w||e[27]!==m||e[28]!==b?(S=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[w,m,b]})}),e[26]=w,e[27]=m,e[28]=b,e[29]=S):S=e[29],S}function es(e){e&&window.open(e,"_blank","noopener,noreferrer")}function ts(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function ss(e){const t=V.c(38),{enabled:i}=e,r=Q(),{org:o}=se(),n=te();let c;t[0]!==o.id?(c=X.aiProviderCredits(o.id,"deco"),t[0]=o.id,t[1]=c):c=t[1];let l;t[2]!==n?(l=async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},t[2]=n,t[3]=l):l=t[3];let d;t[4]!==i||t[5]!==c||t[6]!==l?(d={queryKey:c,enabled:i,staleTime:6e4,queryFn:l},t[4]=i,t[5]=c,t[6]=l,t[7]=d):d=t[7];const{data:g,isLoading:f,refetch:a,isFetching:x}=pe(d);if(!i)return null;const u=g?.balanceCents!=null?g.balanceCents/100:null;let v;t[8]!==u?(v=u!=null?`$${u.toFixed(2)}`:"—",t[8]=u,t[9]=v):v=t[9];const C=v;let y;t[10]!==u||t[11]!==C||t[12]!==x||t[13]!==f?(y=f||x?s.jsx(ue,{className:"h-9 w-24"}):s.jsx("span",{className:re("text-3xl font-semibold tabular-nums tracking-tight",u!=null&&ts(u)),children:C}),t[10]=u,t[11]=C,t[12]=x,t[13]=f,t[14]=y):y=t[14];let h;t[15]!==a?(h=()=>a(),t[15]=a,t[16]=h):h=t[16];let j;t[17]!==r?(j=r("settings.decoCreditsHero.refreshBalance"),t[17]=r,t[18]=j):j=t[18];const N=x&&"animate-spin";let w;t[19]!==N?(w=re(N),t[19]=N,t[20]=w):w=t[20];let m;t[21]!==w?(m=s.jsx(Be,{size:14,className:w}),t[21]=w,t[22]=m):m=t[22];let b;t[23]!==x||t[24]!==m||t[25]!==h||t[26]!==j?(b=s.jsx("button",{type:"button",onClick:h,disabled:x,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 transition-colors p-1 rounded-md hover:bg-muted/50","aria-label":j,children:m}),t[23]=x,t[24]=m,t[25]=h,t[26]=j,t[27]=b):b=t[27];let S;t[28]!==b||t[29]!==y?(S=s.jsxs("div",{className:"flex items-baseline gap-2",children:[y,b]}),t[28]=b,t[29]=y,t[30]=S):S=t[30];let p;t[31]!==r?(p=r("settings.decoCreditsHero.availableBalance"),t[31]=r,t[32]=p):p=t[32];let P;t[33]!==p?(P=s.jsx("p",{className:"text-xs text-muted-foreground",children:p}),t[33]=p,t[34]=P):P=t[34];let I;return t[35]!==S||t[36]!==P?(I=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[S,P]}),t[35]=S,t[36]=P,t[37]=I):I=t[37],I}function is(){const e=V.c(74),t=Q(),{org:i}=se(),r=te(),o=oe(),n=be();let c;e[0]!==n?(c=n.find(ls),e[0]=n,e[1]=c):c=e[1];const l=c,d=ge(),g=we("credits"),[f,a]=G.useState(!1);let x;e[2]!==l||e[3]!==r?(x=async()=>{l&&await r.call("AI_PROVIDER_KEY_DELETE",{keyId:l.id})},e[2]=l,e[3]=r,e[4]=x):x=e[4];let u;e[5]!==i||e[6]!==o||e[7]!==t?(u=()=>{o.invalidateQueries({queryKey:X.aiProviderKeys(i.id)}),o.invalidateQueries({queryKey:X.aiProviders(i.id)}),Z.success(t("settings.decoCreditsHero.disconnectSuccess")),a(!1)},e[5]=i,e[6]=o,e[7]=t,e[8]=u):u=e[8];let v;e[9]!==t?(v=z=>{Z.error(t("settings.decoCreditsHero.disconnectError",{message:z.message}))},e[9]=t,e[10]=v):v=e[10];let C;e[11]!==x||e[12]!==u||e[13]!==v?(C={mutationFn:x,onSuccess:u,onError:v},e[11]=x,e[12]=u,e[13]=v,e[14]=C):C=e[14];const{mutate:y,isPending:h}=ie(C);if(!l)return null;let j;e[15]!==t?(j=t("settings.decoCreditsHero.title"),e[15]=t,e[16]=j):j=e[16];let N;e[17]!==t?(N=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[17]=t,e[18]=N):N=e[18];let w;e[19]!==N?(w=s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:N,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"})}),e[19]=N,e[20]=w):w=e[20];let m;e[21]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),e[21]=m):m=e[21];let b;e[22]!==t?(b=t("settings.decoCreditsHero.disconnect"),e[22]=t,e[23]=b):b=e[23];let S;e[24]!==h||e[25]!==b?(S=s.jsx(W,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-destructive",onClick:m,disabled:h,children:b}),e[24]=h,e[25]=b,e[26]=S):S=e[26];let p;e[27]!==S||e[28]!==w?(p=s.jsxs("div",{className:"flex items-center justify-between",children:[w,S]}),e[27]=S,e[28]=w,e[29]=p):p=e[29];let P;e[30]!==t?(P=t("settings.decoCreditsHero.disconnectTitle"),e[30]=t,e[31]=P):P=e[31];let I;e[32]!==P?(I=s.jsx(je,{children:P}),e[32]=P,e[33]=I):I=e[33];let k;e[34]!==t?(k=t("settings.decoCreditsHero.disconnectDescription"),e[34]=t,e[35]=k):k=e[35];let T;e[36]!==k?(T=s.jsx(ye,{children:k}),e[36]=k,e[37]=T):T=e[37];let A;e[38]!==I||e[39]!==T?(A=s.jsxs(Ne,{children:[I,T]}),e[38]=I,e[39]=T,e[40]=A):A=e[40];let U;e[41]!==t?(U=t("settings.decoCreditsHero.cancelButton"),e[41]=t,e[42]=U):U=e[42];let E;e[43]!==U?(E=s.jsx(Se,{children:U}),e[43]=U,e[44]=E):E=e[44];let R;e[45]!==y?(R=()=>y(),e[45]=y,e[46]=R):R=e[46];let $;e[47]!==t?($=t("settings.decoCreditsHero.disconnectButton"),e[47]=t,e[48]=$):$=e[48];let B;e[49]!==R||e[50]!==$?(B=s.jsx(Ce,{onClick:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:$}),e[49]=R,e[50]=$,e[51]=B):B=e[51];let O;e[52]!==E||e[53]!==B?(O=s.jsxs(Pe,{children:[E,B]}),e[52]=E,e[53]=B,e[54]=O):O=e[54];let F;e[55]!==A||e[56]!==O?(F=s.jsxs(_e,{children:[A,O]}),e[55]=A,e[56]=O,e[57]=F):F=e[57];let L;e[58]!==f||e[59]!==F?(L=s.jsx(Ie,{open:f,onOpenChange:a,children:F}),e[58]=f,e[59]=F,e[60]=L):L=e[60];const q=!d;let D;e[61]!==q?(D=s.jsx(ss,{enabled:q}),e[61]=q,e[62]=D):D=e[62];let _;e[63]!==g||e[64]!==t?(_=g?s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:t("settings.decoCreditsHero.addCredits")}),s.jsx(Ze,{})]}):null,e[63]=g,e[64]=t,e[65]=_):_=e[65];let M;e[66]!==p||e[67]!==L||e[68]!==D||e[69]!==_?(M=s.jsx(de,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[p,L,D,_]})}),e[66]=p,e[67]=L,e[68]=D,e[69]=_,e[70]=M):M=e[70];let H;return e[71]!==M||e[72]!==j?(H=s.jsx(ae,{title:j,children:M}),e[71]=M,e[72]=j,e[73]=H):H=e[73],H}function ls(e){return e.providerId==="deco"}var ke="Progress",De=100,[rs]=it(ke),[ns,as]=rs(ke),Xe=G.forwardRef((e,t)=>{const{__scopeProgress:i,value:r=null,max:o,getValueLabel:n=os,...c}=e;(o||o===0)&&!Te(o)&&console.error(cs(`${o}`,"Progress"));const l=Te(o)?o:De;r!==null&&!Re(r,l)&&console.error(ds(`${r}`,"Progress"));const d=Re(r,l)?r:null,g=fe(d)?n(d,l):void 0;return s.jsx(ns,{scope:i,value:d,max:l,children:s.jsx(He.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":fe(d)?d:void 0,"aria-valuetext":g,role:"progressbar","data-state":tt(d,l),"data-value":d??void 0,"data-max":l,...c,ref:t})})});Xe.displayName=ke;var Je="ProgressIndicator",et=G.forwardRef((e,t)=>{const{__scopeProgress:i,...r}=e,o=as(Je,i);return s.jsx(He.div,{"data-state":tt(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});et.displayName=Je;function os(e,t){return`${Math.round(e/t*100)}%`}function tt(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function fe(e){return typeof e=="number"}function Te(e){return fe(e)&&!isNaN(e)&&e>0}function Re(e,t){return fe(e)&&!isNaN(e)&&e<=t&&e>=0}function cs(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${De}\`.`}function ds(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2
2
|
- a positive number
|
|
3
3
|
- less than the value passed to \`max\` (or ${De} if no \`max\` prop is set)
|
|
4
4
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as o,j as c,aq as d}from"./index-
|
|
1
|
+
import{c as n,l as o,j as c,aq as d}from"./index-Dc7hzqoi.js";const u=d("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function f(l){const e=n.c(10);let t,r,s;e[0]!==l?({className:t,variant:s,...r}=l,e[0]=l,e[1]=t,e[2]=r,e[3]=s):(t=e[1],r=e[2],s=e[3]);let a;e[4]!==t||e[5]!==s?(a=o(u({variant:s}),t),e[4]=t,e[5]=s,e[6]=a):a=e[6];let i;return e[7]!==r||e[8]!==a?(i=c.jsx("div",{"data-slot":"alert",role:"alert",className:a,...r}),e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function x(l){const e=n.c(8);let t,r;e[0]!==l?({className:t,...r}=l,e[0]=l,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=o("line-clamp-1 min-h-4 font-medium tracking-tight",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==r||e[6]!==s?(a=c.jsx("div",{"data-slot":"alert-title",className:s,...r}),e[5]=r,e[6]=s,e[7]=a):a=e[7],a}function v(l){const e=n.c(8);let t,r;e[0]!==l?({className:t,...r}=l,e[0]=l,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=o("text-muted-foreground leading-relaxed",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==r||e[6]!==s?(a=c.jsx("div",{"data-slot":"alert-description",className:s,...r}),e[5]=r,e[6]=s,e[7]=a):a=e[7],a}export{v as A,f as a,x as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,aW as w,r as i,b1 as m,d1 as T,ae as O,b4 as M,aX as I,aY as z,b0 as A,d2 as D,aZ as F,d3 as L,bk as k,a$ as G,a_ as W,c as n,l as p,ah as v}from"./index-
|
|
1
|
+
import{j as r,aW as w,r as i,b1 as m,d1 as T,ae as O,b4 as M,aX as I,aY as z,b0 as A,d2 as D,aZ as F,d3 as L,bk as k,a$ as G,a_ as W,c as n,l as p,ah as v}from"./index-Dc7hzqoi.js";var x="AlertDialog",[Y]=k(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(w,{...a,...t,modal:!0})};N.displayName=x;var H="AlertDialogTrigger",V=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(G,{...o,...a,ref:e})});V.displayName=H;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(F,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(W,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[X,Z]=Y(f),J=L("AlertDialogContent"),j=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(T,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:r.jsx(X,{scope:t,cancelRef:u,children:r.jsxs(O,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:M(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(J,{children:a}),r.jsx(Q,{contentRef:c})]})})})});j.displayName=f;var b="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(I,{...o,...a,ref:e})});h.displayName=b;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});R.displayName=E;var K="AlertDialogAction",$=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});$.displayName=K;var C="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=Z(C,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=C;var Q=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${f}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as A,M as Q,x as R,K as Y,m as ce,n as U,e as V,j as i,fi as de,b as F,r as O,dN as me,eC as J,B as N,t as q}from"./index-zEbfx_2K.js";import{i as fe}from"./AlertCircle-CBmZyziw.js";import{a as ue}from"./Copy01-BmdYCu9M.js";import{i as W}from"./Key01-CtPEI4Eg.js";import{s as X}from"./Plus-DhTGO6OU.js";import{s as ge}from"./Trash01-UhB0CRb8.js";import{f as pe,e as xe,b as ye,A as he,a as je,d as Ke,c as Ce,g as be}from"./alert-dialog-D1mw46Sk.js";import{d as Z,h as ee,c as te,e as se,b as ie,D as ne}from"./dialog-DqEzjMAL.js";import{I as le}from"./input-BYddSsu_.js";import{L as De}from"./label-DeeZ_khO.js";import{u as M}from"./use-mcp-client-Dpy2Y_w9.js";function H(t,e){if(t?.isError)throw new Error(t.content?.[0]?.text??e);if(!t.structuredContent)throw new Error(e);return t.structuredContent}function Ae(t){const e=A.c(11),{org:a}=Q();let r;e[0]!==a.id||e[1]!==a.slug?(r={connectionId:R,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=r):r=e[2];const l=M(r);let s;e[3]!==a.id?(s=Y.apiKeysList(a.id),e[3]=a.id,e[4]=s):s=e[4];let n;e[5]!==l?(n=async()=>{const d=await l.callTool({name:"API_KEY_LIST",arguments:{}});return H(d,"Failed to list API keys").items},e[5]=l,e[6]=n):n=e[6];const c=t?.enabled??!0;let o;return e[7]!==s||e[8]!==n||e[9]!==c?(o={queryKey:s,queryFn:n,staleTime:3e4,enabled:c},e[7]=s,e[8]=n,e[9]=c,e[10]=o):o=e[10],ce(o)}function Se(){const t=A.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=U();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_CREATE",arguments:{name:o.name,permissions:o.permissions??{"*":["*"]}}});return H(d,"Failed to create API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],V(c)}function Ne(){const t=A.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=U();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_DELETE",arguments:{keyId:o}});return H(d,"Failed to delete API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],V(c)}function ae(t){const e=A.c(6),{error:a}=t,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(fe,{size:16}),e[0]=l):l=e[0];let s;e[1]!==a.message||e[2]!==r?(s=r("settings.apiKeys.failedToLoadError",{error:a.message}),e[1]=a.message,e[2]=r,e[3]=s):s=e[3];let n;return e[4]!==s?(n=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,i.jsx("span",{className:"text-sm font-medium",children:s})]}),e[4]=s,e[5]=n):n=e[5],n}function ve(t){const e=A.c(20),{apiKey:a,onDelete:r}=t,l=F();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:i.jsx(W,{size:16,className:"text-muted-foreground"})}),e[0]=s):s=e[0];let n;e[1]!==a.name?(n=i.jsx("span",{className:"font-medium text-sm truncate block",children:a.name}),e[1]=a.name,e[2]=n):n=e[2];let c;e[3]!==a.createdAt||e[4]!==l?(c=l("settings.apiKeys.createdAt",{date:new Date(a.createdAt).toLocaleDateString()}),e[3]=a.createdAt,e[4]=l,e[5]=c):c=e[5];let o;e[6]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:c}),e[6]=c,e[7]=o):o=e[7];let d;e[8]!==n||e[9]!==o?(d=i.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s,i.jsxs("div",{className:"min-w-0",children:[n,o]})]}),e[8]=n,e[9]=o,e[10]=d):d=e[10];let m;e[11]!==l?(m=l("settings.apiKeys.deleteKey"),e[11]=l,e[12]=m):m=e[12];let u;e[13]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(ge,{size:14}),e[13]=u):u=e[13];let g;e[14]!==r||e[15]!==m?(g=i.jsx(N,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive shrink-0",onClick:r,"aria-label":m,children:u}),e[14]=r,e[15]=m,e[16]=g):g=e[16];let f;return e[17]!==d||e[18]!==g?(f=i.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[d,g]}),e[17]=d,e[18]=g,e[19]=f):f=e[19],f}function we(t){const e=A.c(21),{onCreate:a}=t,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:i.jsx(W,{size:20,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let s;e[1]!==r?(s=r("settings.apiKeys.emptyTitle"),e[1]=r,e[2]=s):s=e[2];let n;e[3]!==s?(n=i.jsx("p",{className:"font-medium text-sm",children:s}),e[3]=s,e[4]=n):n=e[4];let c;e[5]!==r?(c=r("settings.apiKeys.emptyDescription"),e[5]=r,e[6]=c):c=e[6];let o;e[7]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:c}),e[7]=c,e[8]=o):o=e[8];let d;e[9]!==n||e[10]!==o?(d=i.jsxs("div",{children:[n,o]}),e[9]=n,e[10]=o,e[11]=d):d=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(X,{size:14}),e[12]=m):m=e[12];let u;e[13]!==r?(u=r("settings.apiKeys.newKey"),e[13]=r,e[14]=u):u=e[14];let g;e[15]!==a||e[16]!==u?(g=i.jsxs(N,{onClick:a,size:"sm",className:"mt-2",children:[m,u]}),e[15]=a,e[16]=u,e[17]=g):g=e[17];let f;return e[18]!==d||e[19]!==g?(f=i.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[l,d,g]}),e[18]=d,e[19]=g,e[20]=f):f=e[20],f}function _e(t){const e=A.c(40),{createdKey:a,onClose:r}=t,l=F(),s=a!==null;let n;e[0]!==r?(n=S=>!S&&r(),e[0]=r,e[1]=n):n=e[1];let c;e[2]!==l?(c=l("settings.apiKeys.createdTitle"),e[2]=l,e[3]=c):c=e[3];let o;e[4]!==c?(o=i.jsx(Z,{children:c}),e[4]=c,e[5]=o):o=e[5];let d;e[6]!==l?(d=l("settings.apiKeys.createdDescription"),e[6]=l,e[7]=d):d=e[7];let m;e[8]!==d?(m=i.jsx(ee,{children:d}),e[8]=d,e[9]=m):m=e[9];let u;e[10]!==o||e[11]!==m?(u=i.jsxs(te,{children:[o,m]}),e[10]=o,e[11]=m,e[12]=u):u=e[12];const g=a?.key??"";let f;e[13]!==g?(f=i.jsx(le,{readOnly:!0,value:g,className:"font-mono text-xs"}),e[13]=g,e[14]=f):f=e[14];let p;e[15]!==a||e[16]!==l?(p=()=>{a&&(navigator.clipboard?.writeText(a.key),q.success(l("settings.apiKeys.copied")))},e[15]=a,e[16]=l,e[17]=p):p=e[17];let x;e[18]!==l?(x=l("settings.apiKeys.copyKey"),e[18]=l,e[19]=x):x=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(ue,{size:14}),e[20]=C):C=e[20];let y;e[21]!==p||e[22]!==x?(y=i.jsx(N,{type:"button",variant:"outline",size:"icon",onClick:p,"aria-label":x,children:C}),e[21]=p,e[22]=x,e[23]=y):y=e[23];let h;e[24]!==y||e[25]!==f?(h=i.jsxs("div",{className:"flex items-center gap-2",children:[f,y]}),e[24]=y,e[25]=f,e[26]=h):h=e[26];let j;e[27]!==l?(j=l("settings.apiKeys.done"),e[27]=l,e[28]=j):j=e[28];let K;e[29]!==r||e[30]!==j?(K=i.jsx(se,{children:i.jsx(N,{onClick:r,children:j})}),e[29]=r,e[30]=j,e[31]=K):K=e[31];let b;e[32]!==h||e[33]!==K||e[34]!==u?(b=i.jsxs(ie,{className:"sm:max-w-lg",children:[u,h,K]}),e[32]=h,e[33]=K,e[34]=u,e[35]=b):b=e[35];let D;return e[36]!==s||e[37]!==b||e[38]!==n?(D=i.jsx(ne,{open:s,onOpenChange:n,children:b}),e[36]=s,e[37]=b,e[38]=n,e[39]=D):D=e[39],D}function Pe(t){const e=A.c(64),{open:a,onOpenChange:r,onCreated:l}=t,s=F(),[n,c]=O.useState(""),o=Se();let d;e[0]!==r?(d=function(){c(""),r(!1)},e[0]=r,e[1]=d):d=e[1];const m=d;let u;e[2]!==o||e[3]!==m||e[4]!==n||e[5]!==l||e[6]!==s?(u=async function(oe){if(oe.preventDefault(),!!n.trim())try{const B=await o.mutateAsync({name:n.trim()});m(),l(B)}catch(B){const G=B;q.error(G instanceof Error?G.message:s("settings.apiKeys.failedToCreateKey"))}},e[2]=o,e[3]=m,e[4]=n,e[5]=l,e[6]=s,e[7]=u):u=e[7];const g=u;let f;e[8]!==m||e[9]!==r?(f=z=>{z?r(z):m()},e[8]=m,e[9]=r,e[10]=f):f=e[10];let p;e[11]!==s?(p=s("settings.apiKeys.newKeyTitle"),e[11]=s,e[12]=p):p=e[12];let x;e[13]!==p?(x=i.jsx(Z,{children:p}),e[13]=p,e[14]=x):x=e[14];let C;e[15]!==s?(C=s("settings.apiKeys.newKeyDescription"),e[15]=s,e[16]=C):C=e[16];let y;e[17]!==C?(y=i.jsx(ee,{children:C}),e[17]=C,e[18]=y):y=e[18];let h;e[19]!==x||e[20]!==y?(h=i.jsxs(te,{children:[x,y]}),e[19]=x,e[20]=y,e[21]=h):h=e[21];let j;e[22]!==s?(j=s("settings.apiKeys.nameLabel"),e[22]=s,e[23]=j):j=e[23];let K;e[24]!==j?(K=i.jsx(De,{htmlFor:"api-key-name",children:j}),e[24]=j,e[25]=K):K=e[25];let b;e[26]===Symbol.for("react.memo_cache_sentinel")?(b=z=>c(z.target.value),e[26]=b):b=e[26];let D;e[27]!==s?(D=s("settings.apiKeys.namePlaceholder"),e[27]=s,e[28]=D):D=e[28];let S;e[29]!==n||e[30]!==D?(S=i.jsx(le,{id:"api-key-name",value:n,onChange:b,placeholder:D,autoComplete:"off",required:!0}),e[29]=n,e[30]=D,e[31]=S):S=e[31];let v;e[32]!==K||e[33]!==S?(v=i.jsxs("div",{className:"space-y-1.5",children:[K,S]}),e[32]=K,e[33]=S,e[34]=v):v=e[34];const re=o.isPending;let w;e[35]!==s?(w=s("settings.apiKeys.cancelButton"),e[35]=s,e[36]=w):w=e[36];let _;e[37]!==o.isPending||e[38]!==m||e[39]!==w?(_=i.jsx(N,{type:"button",variant:"outline",onClick:m,disabled:re,children:w}),e[37]=o.isPending,e[38]=m,e[39]=w,e[40]=_):_=e[40];let P;e[41]!==o.isPending||e[42]!==n?(P=o.isPending||!n.trim(),e[41]=o.isPending,e[42]=n,e[43]=P):P=e[43];let E;e[44]!==o.isPending||e[45]!==s?(E=o.isPending?s("settings.apiKeys.creatingButton"):s("settings.apiKeys.createButton"),e[44]=o.isPending,e[45]=s,e[46]=E):E=e[46];let T;e[47]!==P||e[48]!==E?(T=i.jsx(N,{type:"submit",disabled:P,children:E}),e[47]=P,e[48]=E,e[49]=T):T=e[49];let k;e[50]!==_||e[51]!==T?(k=i.jsxs(se,{children:[_,T]}),e[50]=_,e[51]=T,e[52]=k):k=e[52];let I;e[53]!==g||e[54]!==v||e[55]!==k?(I=i.jsxs("form",{onSubmit:g,className:"space-y-4",children:[v,k]}),e[53]=g,e[54]=v,e[55]=k,e[56]=I):I=e[56];let L;e[57]!==I||e[58]!==h?(L=i.jsxs(ie,{className:"sm:max-w-lg",children:[h,I]}),e[57]=I,e[58]=h,e[59]=L):L=e[59];let $;return e[60]!==a||e[61]!==L||e[62]!==f?($=i.jsx(ne,{open:a,onOpenChange:f,children:L}),e[60]=a,e[61]=L,e[62]=f,e[63]=$):$=e[63],$}function Ee(){const t=F(),{data:e,isLoading:a,error:r}=Ae(),l=Ne(),[s,n]=O.useState(!1),[c,o]=O.useState(null),[d,m]=O.useState(null),u=e??[];async function g(){if(d)try{await l.mutateAsync(d.id),q.success(t("settings.apiKeys.keyDeleted",{name:d.name}))}catch(f){q.error(f instanceof Error?f.message:t("settings.apiKeys.failedToDeleteKey"))}finally{m(null)}}return i.jsxs(me,{headerClassName:"px-0",title:t("settings.apiKeys.sectionTitle"),description:t("settings.apiKeys.sectionDescription"),actions:u.length>0?i.jsxs(N,{onClick:()=>n(!0),size:"sm",children:[i.jsx(X,{size:14}),t("settings.apiKeys.newKey")]}):void 0,children:[a?i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:t("settings.apiKeys.loading")})}):r&&u.length===0?i.jsx(ae,{error:r}):u.length===0?i.jsx(we,{onCreate:()=>n(!0)}):i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("ul",{className:"divide-y divide-border",children:u.map(f=>i.jsx(ve,{apiKey:f,onDelete:()=>m(f)},f.id))})}),i.jsx(Pe,{open:s,onOpenChange:n,onCreated:o}),i.jsx(_e,{createdKey:c,onClose:()=>o(null)}),i.jsx(pe,{open:d!==null,onOpenChange:f=>{f||m(null)},children:i.jsxs(xe,{children:[i.jsxs(ye,{children:[i.jsx(he,{children:t("settings.apiKeys.deleteTitle",{name:d?.name??""})}),i.jsx(je,{children:t("settings.apiKeys.deleteDescription")})]}),i.jsxs(Ke,{children:[i.jsx(Ce,{children:t("settings.apiKeys.cancelButton")}),i.jsx(be,{onClick:g,children:t("settings.apiKeys.deleteKey")})]})]})})]})}function Ye(){const t=A.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(de,{group:"connect",errorFallback:Te,children:i.jsx(Ee,{})}),t[0]=e):e=t[0],e}function Te(t){const{error:e}=t;return i.jsx(ae,{error:e??new Error("Failed to load API keys")})}export{Ee as A,Ye as O,Ae as a,Se as u};
|
|
1
|
+
import{c as A,M as Q,x as R,K as Y,m as ce,n as U,e as V,j as i,fi as de,b as F,r as O,dN as me,eC as J,B as N,t as q}from"./index-Dc7hzqoi.js";import{i as fe}from"./AlertCircle-CMjsP_Tk.js";import{a as ue}from"./Copy01-nMxlBfeT.js";import{i as W}from"./Key01-CIXwHMRo.js";import{s as X}from"./Plus-CVauOqLT.js";import{s as ge}from"./Trash01-nl-t4IoV.js";import{f as pe,e as xe,b as ye,A as he,a as je,d as Ke,c as Ce,g as be}from"./alert-dialog-BI-B_8hq.js";import{d as Z,h as ee,c as te,e as se,b as ie,D as ne}from"./dialog-llvhXw2o.js";import{I as le}from"./input-DXlaTX4w.js";import{L as De}from"./label-BMxIRiEr.js";import{u as M}from"./use-mcp-client-e_hCatGm.js";function H(t,e){if(t?.isError)throw new Error(t.content?.[0]?.text??e);if(!t.structuredContent)throw new Error(e);return t.structuredContent}function Ae(t){const e=A.c(11),{org:a}=Q();let r;e[0]!==a.id||e[1]!==a.slug?(r={connectionId:R,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=r):r=e[2];const l=M(r);let s;e[3]!==a.id?(s=Y.apiKeysList(a.id),e[3]=a.id,e[4]=s):s=e[4];let n;e[5]!==l?(n=async()=>{const d=await l.callTool({name:"API_KEY_LIST",arguments:{}});return H(d,"Failed to list API keys").items},e[5]=l,e[6]=n):n=e[6];const c=t?.enabled??!0;let o;return e[7]!==s||e[8]!==n||e[9]!==c?(o={queryKey:s,queryFn:n,staleTime:3e4,enabled:c},e[7]=s,e[8]=n,e[9]=c,e[10]=o):o=e[10],ce(o)}function Se(){const t=A.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=U();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_CREATE",arguments:{name:o.name,permissions:o.permissions??{"*":["*"]}}});return H(d,"Failed to create API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],V(c)}function Ne(){const t=A.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=U();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_DELETE",arguments:{keyId:o}});return H(d,"Failed to delete API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],V(c)}function ae(t){const e=A.c(6),{error:a}=t,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(fe,{size:16}),e[0]=l):l=e[0];let s;e[1]!==a.message||e[2]!==r?(s=r("settings.apiKeys.failedToLoadError",{error:a.message}),e[1]=a.message,e[2]=r,e[3]=s):s=e[3];let n;return e[4]!==s?(n=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,i.jsx("span",{className:"text-sm font-medium",children:s})]}),e[4]=s,e[5]=n):n=e[5],n}function ve(t){const e=A.c(20),{apiKey:a,onDelete:r}=t,l=F();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:i.jsx(W,{size:16,className:"text-muted-foreground"})}),e[0]=s):s=e[0];let n;e[1]!==a.name?(n=i.jsx("span",{className:"font-medium text-sm truncate block",children:a.name}),e[1]=a.name,e[2]=n):n=e[2];let c;e[3]!==a.createdAt||e[4]!==l?(c=l("settings.apiKeys.createdAt",{date:new Date(a.createdAt).toLocaleDateString()}),e[3]=a.createdAt,e[4]=l,e[5]=c):c=e[5];let o;e[6]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:c}),e[6]=c,e[7]=o):o=e[7];let d;e[8]!==n||e[9]!==o?(d=i.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s,i.jsxs("div",{className:"min-w-0",children:[n,o]})]}),e[8]=n,e[9]=o,e[10]=d):d=e[10];let m;e[11]!==l?(m=l("settings.apiKeys.deleteKey"),e[11]=l,e[12]=m):m=e[12];let u;e[13]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(ge,{size:14}),e[13]=u):u=e[13];let g;e[14]!==r||e[15]!==m?(g=i.jsx(N,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive shrink-0",onClick:r,"aria-label":m,children:u}),e[14]=r,e[15]=m,e[16]=g):g=e[16];let f;return e[17]!==d||e[18]!==g?(f=i.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[d,g]}),e[17]=d,e[18]=g,e[19]=f):f=e[19],f}function we(t){const e=A.c(21),{onCreate:a}=t,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:i.jsx(W,{size:20,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let s;e[1]!==r?(s=r("settings.apiKeys.emptyTitle"),e[1]=r,e[2]=s):s=e[2];let n;e[3]!==s?(n=i.jsx("p",{className:"font-medium text-sm",children:s}),e[3]=s,e[4]=n):n=e[4];let c;e[5]!==r?(c=r("settings.apiKeys.emptyDescription"),e[5]=r,e[6]=c):c=e[6];let o;e[7]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:c}),e[7]=c,e[8]=o):o=e[8];let d;e[9]!==n||e[10]!==o?(d=i.jsxs("div",{children:[n,o]}),e[9]=n,e[10]=o,e[11]=d):d=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(X,{size:14}),e[12]=m):m=e[12];let u;e[13]!==r?(u=r("settings.apiKeys.newKey"),e[13]=r,e[14]=u):u=e[14];let g;e[15]!==a||e[16]!==u?(g=i.jsxs(N,{onClick:a,size:"sm",className:"mt-2",children:[m,u]}),e[15]=a,e[16]=u,e[17]=g):g=e[17];let f;return e[18]!==d||e[19]!==g?(f=i.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[l,d,g]}),e[18]=d,e[19]=g,e[20]=f):f=e[20],f}function _e(t){const e=A.c(40),{createdKey:a,onClose:r}=t,l=F(),s=a!==null;let n;e[0]!==r?(n=S=>!S&&r(),e[0]=r,e[1]=n):n=e[1];let c;e[2]!==l?(c=l("settings.apiKeys.createdTitle"),e[2]=l,e[3]=c):c=e[3];let o;e[4]!==c?(o=i.jsx(Z,{children:c}),e[4]=c,e[5]=o):o=e[5];let d;e[6]!==l?(d=l("settings.apiKeys.createdDescription"),e[6]=l,e[7]=d):d=e[7];let m;e[8]!==d?(m=i.jsx(ee,{children:d}),e[8]=d,e[9]=m):m=e[9];let u;e[10]!==o||e[11]!==m?(u=i.jsxs(te,{children:[o,m]}),e[10]=o,e[11]=m,e[12]=u):u=e[12];const g=a?.key??"";let f;e[13]!==g?(f=i.jsx(le,{readOnly:!0,value:g,className:"font-mono text-xs"}),e[13]=g,e[14]=f):f=e[14];let p;e[15]!==a||e[16]!==l?(p=()=>{a&&(navigator.clipboard?.writeText(a.key),q.success(l("settings.apiKeys.copied")))},e[15]=a,e[16]=l,e[17]=p):p=e[17];let x;e[18]!==l?(x=l("settings.apiKeys.copyKey"),e[18]=l,e[19]=x):x=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(ue,{size:14}),e[20]=C):C=e[20];let y;e[21]!==p||e[22]!==x?(y=i.jsx(N,{type:"button",variant:"outline",size:"icon",onClick:p,"aria-label":x,children:C}),e[21]=p,e[22]=x,e[23]=y):y=e[23];let h;e[24]!==y||e[25]!==f?(h=i.jsxs("div",{className:"flex items-center gap-2",children:[f,y]}),e[24]=y,e[25]=f,e[26]=h):h=e[26];let j;e[27]!==l?(j=l("settings.apiKeys.done"),e[27]=l,e[28]=j):j=e[28];let K;e[29]!==r||e[30]!==j?(K=i.jsx(se,{children:i.jsx(N,{onClick:r,children:j})}),e[29]=r,e[30]=j,e[31]=K):K=e[31];let b;e[32]!==h||e[33]!==K||e[34]!==u?(b=i.jsxs(ie,{className:"sm:max-w-lg",children:[u,h,K]}),e[32]=h,e[33]=K,e[34]=u,e[35]=b):b=e[35];let D;return e[36]!==s||e[37]!==b||e[38]!==n?(D=i.jsx(ne,{open:s,onOpenChange:n,children:b}),e[36]=s,e[37]=b,e[38]=n,e[39]=D):D=e[39],D}function Pe(t){const e=A.c(64),{open:a,onOpenChange:r,onCreated:l}=t,s=F(),[n,c]=O.useState(""),o=Se();let d;e[0]!==r?(d=function(){c(""),r(!1)},e[0]=r,e[1]=d):d=e[1];const m=d;let u;e[2]!==o||e[3]!==m||e[4]!==n||e[5]!==l||e[6]!==s?(u=async function(oe){if(oe.preventDefault(),!!n.trim())try{const B=await o.mutateAsync({name:n.trim()});m(),l(B)}catch(B){const G=B;q.error(G instanceof Error?G.message:s("settings.apiKeys.failedToCreateKey"))}},e[2]=o,e[3]=m,e[4]=n,e[5]=l,e[6]=s,e[7]=u):u=e[7];const g=u;let f;e[8]!==m||e[9]!==r?(f=z=>{z?r(z):m()},e[8]=m,e[9]=r,e[10]=f):f=e[10];let p;e[11]!==s?(p=s("settings.apiKeys.newKeyTitle"),e[11]=s,e[12]=p):p=e[12];let x;e[13]!==p?(x=i.jsx(Z,{children:p}),e[13]=p,e[14]=x):x=e[14];let C;e[15]!==s?(C=s("settings.apiKeys.newKeyDescription"),e[15]=s,e[16]=C):C=e[16];let y;e[17]!==C?(y=i.jsx(ee,{children:C}),e[17]=C,e[18]=y):y=e[18];let h;e[19]!==x||e[20]!==y?(h=i.jsxs(te,{children:[x,y]}),e[19]=x,e[20]=y,e[21]=h):h=e[21];let j;e[22]!==s?(j=s("settings.apiKeys.nameLabel"),e[22]=s,e[23]=j):j=e[23];let K;e[24]!==j?(K=i.jsx(De,{htmlFor:"api-key-name",children:j}),e[24]=j,e[25]=K):K=e[25];let b;e[26]===Symbol.for("react.memo_cache_sentinel")?(b=z=>c(z.target.value),e[26]=b):b=e[26];let D;e[27]!==s?(D=s("settings.apiKeys.namePlaceholder"),e[27]=s,e[28]=D):D=e[28];let S;e[29]!==n||e[30]!==D?(S=i.jsx(le,{id:"api-key-name",value:n,onChange:b,placeholder:D,autoComplete:"off",required:!0}),e[29]=n,e[30]=D,e[31]=S):S=e[31];let v;e[32]!==K||e[33]!==S?(v=i.jsxs("div",{className:"space-y-1.5",children:[K,S]}),e[32]=K,e[33]=S,e[34]=v):v=e[34];const re=o.isPending;let w;e[35]!==s?(w=s("settings.apiKeys.cancelButton"),e[35]=s,e[36]=w):w=e[36];let _;e[37]!==o.isPending||e[38]!==m||e[39]!==w?(_=i.jsx(N,{type:"button",variant:"outline",onClick:m,disabled:re,children:w}),e[37]=o.isPending,e[38]=m,e[39]=w,e[40]=_):_=e[40];let P;e[41]!==o.isPending||e[42]!==n?(P=o.isPending||!n.trim(),e[41]=o.isPending,e[42]=n,e[43]=P):P=e[43];let E;e[44]!==o.isPending||e[45]!==s?(E=o.isPending?s("settings.apiKeys.creatingButton"):s("settings.apiKeys.createButton"),e[44]=o.isPending,e[45]=s,e[46]=E):E=e[46];let T;e[47]!==P||e[48]!==E?(T=i.jsx(N,{type:"submit",disabled:P,children:E}),e[47]=P,e[48]=E,e[49]=T):T=e[49];let k;e[50]!==_||e[51]!==T?(k=i.jsxs(se,{children:[_,T]}),e[50]=_,e[51]=T,e[52]=k):k=e[52];let I;e[53]!==g||e[54]!==v||e[55]!==k?(I=i.jsxs("form",{onSubmit:g,className:"space-y-4",children:[v,k]}),e[53]=g,e[54]=v,e[55]=k,e[56]=I):I=e[56];let L;e[57]!==I||e[58]!==h?(L=i.jsxs(ie,{className:"sm:max-w-lg",children:[h,I]}),e[57]=I,e[58]=h,e[59]=L):L=e[59];let $;return e[60]!==a||e[61]!==L||e[62]!==f?($=i.jsx(ne,{open:a,onOpenChange:f,children:L}),e[60]=a,e[61]=L,e[62]=f,e[63]=$):$=e[63],$}function Ee(){const t=F(),{data:e,isLoading:a,error:r}=Ae(),l=Ne(),[s,n]=O.useState(!1),[c,o]=O.useState(null),[d,m]=O.useState(null),u=e??[];async function g(){if(d)try{await l.mutateAsync(d.id),q.success(t("settings.apiKeys.keyDeleted",{name:d.name}))}catch(f){q.error(f instanceof Error?f.message:t("settings.apiKeys.failedToDeleteKey"))}finally{m(null)}}return i.jsxs(me,{headerClassName:"px-0",title:t("settings.apiKeys.sectionTitle"),description:t("settings.apiKeys.sectionDescription"),actions:u.length>0?i.jsxs(N,{onClick:()=>n(!0),size:"sm",children:[i.jsx(X,{size:14}),t("settings.apiKeys.newKey")]}):void 0,children:[a?i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:t("settings.apiKeys.loading")})}):r&&u.length===0?i.jsx(ae,{error:r}):u.length===0?i.jsx(we,{onCreate:()=>n(!0)}):i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("ul",{className:"divide-y divide-border",children:u.map(f=>i.jsx(ve,{apiKey:f,onDelete:()=>m(f)},f.id))})}),i.jsx(Pe,{open:s,onOpenChange:n,onCreated:o}),i.jsx(_e,{createdKey:c,onClose:()=>o(null)}),i.jsx(pe,{open:d!==null,onOpenChange:f=>{f||m(null)},children:i.jsxs(xe,{children:[i.jsxs(ye,{children:[i.jsx(he,{children:t("settings.apiKeys.deleteTitle",{name:d?.name??""})}),i.jsx(je,{children:t("settings.apiKeys.deleteDescription")})]}),i.jsxs(Ke,{children:[i.jsx(Ce,{children:t("settings.apiKeys.cancelButton")}),i.jsx(be,{onClick:g,children:t("settings.apiKeys.deleteKey")})]})]})})]})}function Ye(){const t=A.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(de,{group:"connect",errorFallback:Te,children:i.jsx(Ee,{})}),t[0]=e):e=t[0],e}function Te(t){const{error:e}=t;return i.jsx(ae,{error:e??new Error("Failed to load API keys")})}export{Ee as A,Ye as O,Ae as a,Se as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as o,j as r}from"./index-Dc7hzqoi.js";import{O as m}from"./api-keys-AIfL76r6.js";import{R as p}from"./require-capability-CmtOZnXt.js";import"./AlertCircle-CMjsP_Tk.js";import"./Copy01-nMxlBfeT.js";import"./Key01-CIXwHMRo.js";import"./Plus-CVauOqLT.js";import"./Trash01-nl-t4IoV.js";import"./alert-dialog-BI-B_8hq.js";import"./dialog-llvhXw2o.js";import"./X-CFCE4a-Q.js";import"./input-DXlaTX4w.js";import"./label-BMxIRiEr.js";import"./use-mcp-client-e_hCatGm.js";import"./auth-DhzAq_9m.js";import"./access-gate-Ds4n25mC.js";import"./capability-load-error-CJMvYDf4.js";function A(){const t=o.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(p,{capability:"api-keys:manage",area:"api-keys",children:r.jsx(m,{})}),t[0]=i):i=t[0],i}export{A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as jt,b as Bt,r as A,j as o,l as wt,h as _t,t as ht}from"./index-Dc7hzqoi.js";import{u as At}from"./chat-context-tZCX_cqt.js";import{i as Et}from"./ChevronRight-USKkhEpL.js";import{S as Nt}from"./scroll-area-C-wtbVS1.js";import{u as Rt,A as Tt}from"./use-section-preview-base-BOFovHh4.js";import{o as Ct}from"./claim-phase-copy-0btUuJoC.js";import{h as Kt,u as Pt,w as Ft,aM as Ot,x as Ut,d as $t,aN as It}from"./runnable-block-editor-xmOnaiFL.js";import{n as zt,r as Lt}from"./agent-site-editor-content-DOAcxz0t.js";import"./use-panel-navigate-WrD0KEYx.js";import"./thread-route-BBf64Mwk.js";import"./use-project-scope-DU0-JxYr.js";import"./use-virtual-mcp-DkK7ErtB.js";import"./use-mcp-client-e_hCatGm.js";import"./auth-DhzAq_9m.js";import"./github-repo-BknN0SVI.js";import"./autosend-BberXmli.js";import"./thread-intent-F-sZEflj.js";import"./slugify-CEUa2lfQ.js";import"./hooks-DZOMRp7D.js";import"./backoff-8mStPHYB.js";import"./task-board-DrUf5p-Z.js";import"./schema-1zAO-l7e.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-Dl7pAsQ5.js";import"./use-ai-providers-BnF5Rw_n.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BpuQrfKN.js";import"./use-organization-settings-CKbX2SdA.js";import"./select-BkKPcZFe.js";import"./index-DWw5wi2G.js";import"./Check-B3RSsr_D.js";import"./ChevronUp-DiYhGG4T.js";import"./agent-icon-CczrFEe7.js";import"./AlertCircle-CMjsP_Tk.js";import"./Tool01-DouqPjim.js";import"./ArrowUp-Cii1LHW7.js";import"./ArrowLeft-CjYy5Nhj.js";import"./Tool02-CATStXCy.js";import"./ArrowRight-CLncCNat.js";import"./TrendUp01-BFAEMx9E.js";import"./ZoomOut-BPxprY2s.js";import"./Users03-Y0Jco4zL.js";import"./CheckCircle-DHXQFnpK.js";import"./ChevronSelectorVertical-DpRb2z1l.js";import"./DotsVertical-CsjwfYzf.js";import"./UserSquare-B2lKdt4w.js";import"./Copy01-nMxlBfeT.js";import"./CreditCard01-CWXVH3ZM.js";import"./Database01-C0YJpjc3.js";import"./MessageCircle01-DBcg2aiD.js";import"./Download01-BRrSA3Yx.js";import"./Printer-CvyxF9Jo.js";import"./Settings02-Cyf85ea0.js";import"./Eye-Dyg2WPG4.js";import"./File02-BvR-HYxK.js";import"./Share07-wC47qn2E.js";import"./GitBranch01-rWb2SJK9.js";import"./Globe01-D6FaaFR2.js";import"./SwitchHorizontal01-DpXsFGyJ.js";import"./HardDrive-DNTPLPT4.js";import"./Image01-CxnjAzbb.js";import"./Key01-CIXwHMRo.js";import"./Link01-C0FvgZZB.js";import"./LinkExternal01-AWlhN5o7.js";import"./Monitor01-Ccs1gh2Z.js";import"./Sun-0Ied-kyZ.js";import"./Package-nTbucmaQ.js";import"./Palette-DSdn1Xis.js";import"./Play-lMuWOObF.js";import"./Plus-CVauOqLT.js";import"./SearchLg-BrrPVuXr.js";import"./SearchMd-C45D2PMI.js";import"./Shield01-CqB4I7qm.js";import"./Stars01-oAh9h5b5.js";import"./Trash01-nl-t4IoV.js";import"./Upload01-B4Fqdkae.js";import"./User01-ClMaVCaJ.js";import"./Users01-BFhxJVhO.js";import"./XCircle-CleKT0Id.js";import"./XClose-BgzK-Dwz.js";import"./X-CFCE4a-Q.js";import"./Zap-B6zkqKWB.js";import"./dialog-llvhXw2o.js";import"./input-DXlaTX4w.js";import"./section-preview-url-Csj0_ZDg.js";import"./use-session-runtime-BR1aW1y5.js";import"./decofile-api-BNWbEMR6.js";import"./utils-DsvmRe8M.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-B46EBBjF.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-CTgXdVQa.js";import"./use-copy-C_ctOeuP.js";import"./usage-stats-vMRDbAUM.js";import"./markdown-DGWjAeXL.js";import"./org-file-open-context-BCUpiY_R.js";import"./use-mobile-hIijCK0k.js";import"./tooltip-DV2xHesQ.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BTjC7Gse.js";import"./types-27TVsPN_.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-BuiOykcN.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./shell-layout-Ce0aCJuX.js";import"./avatar-C9HiP4eS.js";import"./download-app-dialog-D_4eQbbs.js";import"./anchors-yqDzZN4K.js";import"./use-org-notice-CyiiFkRG.js";import"./command-palette-store-DK-56E2K.js";import"./command-B-XD29Nx.js";import"./index-BD213WLU.js";import"./integration-icon-BeEdjsn9.js";import"./project-icon-MWmzrrm8.js";import"./required-auth-layout-RoMNnMPO.js";import"./use-org-sso-BvfIL0yq.js";import"./sheet-i72Qx7sL.js";import"./use-connection-Ba04fHwa.js";import"./use-navigate-to-agent-C8pu0B4z.js";import"./use-mcp-prompts-DJRXjL4_.js";import"./index-DiULBiX9.js";import"./form-CSXgIHLz.js";import"./label-BMxIRiEr.js";import"./use-thread-outputs-Dq-RN0P_.js";import"./file-type-icon-C9Qn36v4.js";import"./popover-yk_ePqAA.js";import"./monaco-editor-CMRYkmyb.js";import"./editor-D4Ls62vg.js";import"./calendar-DIQx67oO.js";import"./textarea-BU6xemAP.js";import"./rich-text-link-control-CHsxXHIo.js";import"./switch-BQFtt3BH.js";import"./safe-image-url-D5z803Ot.js";import"./dropdown-menu-C5iafa8S.js";import"./search-input-Pobww52G.js";import"./tabs-CLziM0Ww.js";import"./use-debounced-value-B9nG3bW5.js";import"./use-file-configs-DYGSdjth.js";import"./asset-utils-DhbLEVKo.js";import"./useInfiniteQuery-CspLjV7h.js";import"./infiniteQueryObserver-CjWlcBHD.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-BiU_UDOq.js";import"./alert-dialog-BI-B_8hq.js";import"./sandbox-git-api-CMdpE2TE.js";import"./agent-view-guard-DHJpzCVR.js";import"./use-main-panel-tabs-sSRGo66A.js";import"./use-route-default-main-Djaj_cL9.js";import"./use-mcp-tools-g86k4oib.js";import"./index-D_X-LIyA.js";import"./drawer-BIjkXMV3.js";import"./collection-search-J9Bt25gS.js";import"./input-D_FfvHr0.js";import"./chat-draft-BCeqPSxA.js";import"./use-deco-credits-BGBshlLi.js";import"./use-open-billing-url-Df7K1DCF.js";import"./decopilot-BvepxP_-.js";import"./checkbox-jLf7fBuW.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-Bb-Re5q8.js";import"./input-uIV5S_EX.js";import"./hooks-BoX5BC-f.js";import"./use-org-fs-Du-ErRPs.js";import"./question-004-sINsf4GQ.js";import"./use-members-DPYHJDe2.js";import"./use-org-auth-client-DbPU3bA-.js";import"./feature-paywall-DEy2mpV2.js";import"./plan-ladder-B2pv9Y73.js";import"./add-connection-dialog-DZjTm9W3.js";import"./extract-connection-data-Dbm_cKaX.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-DD0omVHZ.js";import"./connection-card-fcMCwbTh.js";import"./use-registry-connections-SLFMHpqj.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-CHlcdgAK.js";import"./authenticate-and-persist-oauth-DkJ4g-X5.js";import"./mcp-oauth-C4khbNJJ.js";import"./collection-tabs-CrXIJeNf.js";import"./badge-Bu51Hlti.js";import"./use-infinite-scroll-PhBGPm8H.js";import"./useSuspenseInfiniteQuery-BiQYAhJn.js";import"./sandbox-lifecycle-context-C7VKOJoV.js";import"./use-task-metadata-Dt9l5S_a.js";import"./use-project-native-view-presence-DWzPH-Sc.js";import"./site-slug-uya6Wp4-.js";import"./virtual-mcp-ldxphi5G.js";import"./feature-gate-Bp7Cydio.js";import"./mustache-CPZS2ebG.js";import"./empty-state-CyICQznD.js";import"./github-icon-huXDOAgf.js";import"./repository-import-picker-DhVniDI2.js";import"./repository-picker-BkoSI-jm.js";function Vt(n,t){const m=(n.title||n.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),i=/^[A-Za-z]/.test(m)&&m.length>0?m:"Section",p=zt(t,i);return{blockKey:p,data:{__resolveType:n.resolveType,name:p}}}function Ei(n){const t=jt.c(79),{orgSlug:m,virtualMcpId:i,branch:p,blockKey:s,block:x,meta:a,decofile:l,title:bt,excludeFields:Z,schemaPending:lt,previewBaseUrl:ct}=n,D=lt===void 0?!1:lt,H=ct===void 0?null:ct,G=At()?.taskId??null,c=Bt();let N;t[0]!==H||t[1]!==i?(N={virtualMcpId:i,sandboxUrl:H},t[0]=H,t[1]=i,t[2]=N):N=t[2];const h=Rt(N),v=typeof x?.__resolveType=="string"?x.__resolveType:"";let R;t[3]!==Z||t[4]!==a||t[5]!==v?(R=Lt(v,a,Z),t[3]=Z,t[4]=a,t[5]=v,t[6]=R):R=t[6];const b=R;let T;t[7]!==b?(T=!!b&&Object.keys(b.properties??{}).length>0,t[7]=b,t[8]=T):T=t[8];const J=T,dt=bt??(x?Ct(s,x,a):s);let C;t[9]!==p||t[10]!==m||t[11]!==i?(C={orgSlug:m,virtualMcpId:i,branch:p},t[9]=p,t[10]=m,t[11]=i,t[12]=C):C=t[12];const{save:S,flush:Q,isPending:W}=Kt(C);let K;t[13]!==p||t[14]!==m||t[15]!==i?(K={orgSlug:m,virtualMcpId:i,branch:p},t[13]=p,t[14]=m,t[15]=i,t[16]=K):K=t[16];const X=Pt(K);let P;t[17]!==S?(P=$t((e,r)=>S(e,r)),t[17]=S,t[18]=P):P=t[18];const Y=P,[vt,St]=A.useState(s),[tt,ut]=A.useState(null),[et,ft]=A.useState(0);let F;t[19]===Symbol.for("react.memo_cache_sentinel")?(F=[],t[19]=F):F=t[19];const[g,xt]=A.useState(F),[ot,d]=A.useState(!1),O=A.useRef(null);vt!==s&&(St(s),ut(null),ft(Mt),xt([]));let U;t[20]!==x?(U=x??{},t[20]=x,t[21]=U):U=t[21];const rt=U;let y;t[22]!==tt?(y=tt??{},t[22]=tt,t[23]=y):y=t[23];let $;t[24]!==rt||t[25]!==y?($={...rt,...y},t[24]=rt,t[25]=y,t[26]=$):$=t[26];const it=$;let I;t[27]!==s||t[28]!==v||t[29]!==S?(I=e=>{const r=e;ut(r),S(s,{...r,__resolveType:v})},t[27]=s,t[28]=v,t[29]=S,t[30]=I):I=t[30];const mt=I;let z;t[31]===Symbol.for("react.memo_cache_sentinel")?(z=e=>{xt(e)},t[31]=z):z=t[31];const E=z;let L;t[32]!==l||t[33]!==Q||t[34]!==X||t[35]!==c?(L=async(e,r)=>{try{const{blockKey:u,data:f}=Vt(e,l);await X.mutateAsync({blockKey:u,data:f}),ht.success(c("sandbox.appEditor.createdSection",{name:u})),r({__resolveType:u}),Q()}catch(u){const f=u,kt=f instanceof Error?f.message:c("sandbox.appEditor.failedAddSection");throw ht.error(kt),f}},t[32]=l,t[33]=Q,t[34]=X,t[35]=c,t[36]=L):L=t[36];const k=L;let V;t[37]!==d?(V=e=>{O.current=e.append,d(!0)},t[37]=d,t[38]=V):V=t[38];const pt=V;let q;t[39]!==k||t[40]!==d?(q=async e=>{const r=O.current;if(r)try{await k(e,u=>{r(u),d(!1),O.current=null})}catch{}},t[39]=k,t[40]=d,t[41]=q):q=t[41];const st=q,at=g.length>0?[dt,...g]:[],gt="flex h-full flex-col",yt="flex h-12 shrink-0 items-center justify-between border-b px-6",nt=at.length>0?o.jsx("nav",{"aria-label":c("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:at.map((e,r)=>{const u=r===at.length-1,f=Ft(e);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[r>0&&o.jsx(Et,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{E(r===0?[]:Ot(g,r)),ft(qt)},title:f,className:wt("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",u?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:f})]},`${f}-${r}`)})}):o.jsx("span",{className:"text-sm font-medium",children:dt});let j;t[42]!==W?(j=o.jsx(It,{isPending:W,isError:!1}),t[42]=W,t[43]=j):j=t[43];let B;t[44]!==nt||t[45]!==j?(B=o.jsxs("div",{className:yt,children:[nt,j]}),t[44]=nt,t[45]=j,t[46]=B):B=t[46];let w;t[47]!==s||t[48]!==p||t[49]!==g||t[50]!==l||t[51]!==it||t[52]!==et||t[53]!==k||t[54]!==E||t[55]!==mt||t[56]!==pt||t[57]!==J||t[58]!==a||t[59]!==m||t[60]!==Y||t[61]!==b||t[62]!==D||t[63]!==h||t[64]!==c||t[65]!==G||t[66]!==i?(w=o.jsx(Nt,{className:"min-h-0 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:J?o.jsx(Ut,{schema:b,value:it,onChange:mt,basePath:"",breadcrumbPath:g,onBreadcrumbChange:E,decofile:l,meta:a,onSaveReferencedBlock:Y,previewBaseUrl:h,onAddSectionItem:k,onRequestAddSection:pt,sandbox:{orgSlug:m,virtualMcpId:i,branch:p,threadId:G}},`${s}:${et}`):D?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(_t,{className:"size-4"}),c("sandbox.appEditor.loadingSchema")]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:c("sandbox.appEditor.noEditableSchema")})})})}),t[47]=s,t[48]=p,t[49]=g,t[50]=l,t[51]=it,t[52]=et,t[53]=k,t[54]=E,t[55]=mt,t[56]=pt,t[57]=J,t[58]=a,t[59]=m,t[60]=Y,t[61]=b,t[62]=D,t[63]=h,t[64]=c,t[65]=G,t[66]=i,t[67]=w):w=t[67];let _;t[68]!==ot||t[69]!==l||t[70]!==st||t[71]!==a||t[72]!==h||t[73]!==d?(_=h&&o.jsx(Tt,{open:ot,onOpenChange:e=>{d(e),e||(O.current=null)},meta:a,decofile:l,previewBaseUrl:h,onSelect:e=>{st(e)}}),t[68]=ot,t[69]=l,t[70]=st,t[71]=a,t[72]=h,t[73]=d,t[74]=_):_=t[74];let M;return t[75]!==B||t[76]!==w||t[77]!==_?(M=o.jsxs("div",{className:gt,children:[B,w,_]}),t[75]=B,t[76]=w,t[77]=_,t[78]=M):M=t[78],M}function qt(n){return n+1}function Mt(n){return n+1}export{Ei as AppEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,M as d,e as g,_ as m,K as I,n as O}from"./index-
|
|
1
|
+
import{c as u,M as d,e as g,_ as m,K as I,n as O}from"./index-Dc7hzqoi.js";import{u as $}from"./useInfiniteQuery-CspLjV7h.js";function T(e){const t=u.c(17),{org:s}=d(),c=m();let i,n,o,l;t[0]!==s.id||t[1]!==e.configId||t[2]!==e.imageOnly||t[3]!==e.search?(n=e.search?.trim()||void 0,i=e.imageOnly??!1,l=$,o=I.filePickerObjects(s.id,e.configId,n,i),t[0]=s.id,t[1]=e.configId,t[2]=e.imageOnly,t[3]=e.search,t[4]=i,t[5]=n,t[6]=o,t[7]=l):(i=t[4],n=t[5],o=t[6],l=t[7]);const r=e.enabled!==!1&&!!e.configId;let a;t[8]!==i||t[9]!==e.configId||t[10]!==n||t[11]!==c?(a=async y=>{const{pageParam:p}=y;return await c.call("FILE_OBJECTS_LIST",{configId:e.configId,cursor:p??void 0,search:n,imageOnly:i||void 0})},t[8]=i,t[9]=e.configId,t[10]=n,t[11]=c,t[12]=a):a=t[12];let f;return t[13]!==o||t[14]!==r||t[15]!==a?(f={queryKey:o,enabled:r,staleTime:3e4,initialPageParam:null,queryFn:a,getNextPageParam:h},t[13]=o,t[14]=r,t[15]=a,t[16]=f):f=t[16],l(f)}function h(e){return e.nextCursor??void 0}function E(){const e=u.c(2),{org:t}=d();let s;return e[0]!==t?(s={mutationFn:async c=>{const i=c.file.type||"application/octet-stream",n=await fetch(`/api/${encodeURIComponent(t.slug)}/file-configs/${encodeURIComponent(c.configId)}/upload?filename=${encodeURIComponent(c.file.name)}`,{method:"POST",headers:{"Content-Type":i},body:c.file});if(!n.ok){const o=await n.text().catch(x);let l=`${n.status} ${n.statusText}`;try{const r=JSON.parse(o);r.message&&(l=r.message)}catch{o&&(l=o.slice(0,200))}throw new Error(`Upload failed: ${l}`)}return await n.json()}},e[0]=t,e[1]=s):s=e[1],g(s)}function x(){return""}function F(){const e=u.c(8),{org:t}=d(),s=m(),c=O();let i;e[0]!==s?(i=l=>s.call("FILE_OBJECT_DELETE",l),e[0]=s,e[1]=i):i=e[1];let n;e[2]!==t||e[3]!==c?(n=(l,r)=>{c.invalidateQueries({queryKey:I.filePickerObjectsByConfig(t.id,r.configId)})},e[2]=t,e[3]=c,e[4]=n):n=e[4];let o;return e[5]!==i||e[6]!==n?(o={mutationFn:i,onSuccess:n},e[5]=i,e[6]=n,e[7]=o):o=e[7],g(o)}function w(e){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(e)}function S(e){const t=e.lastIndexOf(".");return t<0||t===e.length-1?"file":e.slice(t+1).toLowerCase()}function _(e){const t=e.split("/");return t[t.length-1]??e}function v(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}export{E as a,_ as b,F as c,S as e,v as f,w as i,T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aC as v,aD as $,aE as W,aF as L,aG as H,aH as D,aI as V,aJ as x,aK as q,aL as j,aM as y,aN as N,aO as B,aP as F,aQ as Z}from"./index-zEbfx_2K.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function K(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function Q(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&K(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Y(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=N.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=B[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof H||n instanceof D)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof V)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await P(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new q(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof j)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:I,codeVerifier:b}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(b),await e.redirectToAuthorization(I),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function P(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return v.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?$.parse(await o.json()):W.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await P(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await Z(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=Q(r,h);Y(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return x.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return F.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,P as d,me as e};
|
|
1
|
+
import{aC as v,aD as $,aE as W,aF as L,aG as H,aH as D,aI as V,aJ as x,aK as q,aL as j,aM as y,aN as N,aO as B,aP as F,aQ as Z}from"./index-Dc7hzqoi.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function K(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function Q(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&K(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Y(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=N.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=B[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof H||n instanceof D)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof V)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await P(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new q(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof j)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:I,codeVerifier:b}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(b),await e.redirectToAuthorization(I),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function P(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return v.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?$.parse(await o.json()):W.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await P(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await Z(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=Q(r,h);Y(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return x.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return F.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,P as d,me as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-
|
|
1
|
+
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-Dc7hzqoi.js";function h(){const e=r.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(x,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function u(){const e=r.c(5);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=l(a);if(n==="accept-invitation"){let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(m,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:"accept-invitation"})})}),e[1]=s):s=e[1];let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs(t.Fragment,{children:[s,t.jsx(f,{children:t.jsx(h,{})})]}),e[2]=i):i=e[2],i}let c;return e[3]!==n?(c=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:n})}),e[3]=n,e[4]=c):c=e[4],c}export{u as default};
|