decocms 4.363.1 → 4.364.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CgERhdh6.js → AlertCircle-EniJtD8E.js} +1 -1
- package/dist/client/assets/{AreaChart-kU4sTinA.js → AreaChart-DZpAPo6a.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BVx6AQzq.js → ArrowLeft-Clu1mSdY.js} +1 -1
- package/dist/client/assets/{ArrowRight-DZQert3q.js → ArrowRight-Cu8UuHNR.js} +1 -1
- package/dist/client/assets/{ArrowUp-lpfNBlP2.js → ArrowUp-C0eratGp.js} +1 -1
- package/dist/client/assets/{Check-DClZtAIP.js → Check-BWpBE9uf.js} +1 -1
- package/dist/client/assets/{CheckCircle-BGqFZ8sM.js → CheckCircle-cinYKmPU.js} +1 -1
- package/dist/client/assets/{ChevronRight-BNfU55ld.js → ChevronRight-DzRB-rdO.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-ilm76_0p.js → ChevronSelectorVertical-BiIbFU31.js} +1 -1
- package/dist/client/assets/{ChevronUp-CbF1Gmeo.js → ChevronUp-DGrguvGW.js} +1 -1
- package/dist/client/assets/{Copy01-DiITYBuR.js → Copy01-DayLu0dF.js} +1 -1
- package/dist/client/assets/{CreditCard01-Zpy-4Wu9.js → CreditCard01-4OsjIT5f.js} +1 -1
- package/dist/client/assets/{Database01-zcGUPFsG.js → Database01-2gG_9E30.js} +1 -1
- package/dist/client/assets/{DotsVertical-LmkOTjL4.js → DotsVertical-CucJCL9y.js} +1 -1
- package/dist/client/assets/{Download01-C4blLpML.js → Download01-BC2rKbuh.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-KbkdtIBU.js → ErrorBarContext-CRh7XbJc.js} +1 -1
- package/dist/client/assets/{Eye-Cd7v-liN.js → Eye-dnrP5DkM.js} +1 -1
- package/dist/client/assets/{File02-CceuR6rF.js → File02-BhckHV8N.js} +1 -1
- package/dist/client/assets/{GitBranch01-Dil6c2wv.js → GitBranch01-BBn4dN5f.js} +1 -1
- package/dist/client/assets/{Globe01-BVji6jXS.js → Globe01-SLAc63wC.js} +1 -1
- package/dist/client/assets/{HardDrive-B4UY5qYp.js → HardDrive-FlnOYA_8.js} +1 -1
- package/dist/client/assets/{Image01-CpXdMb8x.js → Image01-BrHSH-Vi.js} +1 -1
- package/dist/client/assets/{Key01-BsAAVoJx.js → Key01-CKcg8G1v.js} +1 -1
- package/dist/client/assets/{Link01-OqB-2yPE.js → Link01-3t9JrUgl.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DobnLseV.js → LinkExternal01-Cp7uxK1i.js} +1 -1
- package/dist/client/assets/{Monitor01-BTqHf-K4.js → Monitor01-BUruMK2r.js} +1 -1
- package/dist/client/assets/{Package-CCkk0w5h.js → Package-CdfyZYxN.js} +1 -1
- package/dist/client/assets/{Palette-BBWt8owf.js → Palette-CglyAOTg.js} +1 -1
- package/dist/client/assets/{Play-CPeIBqH_.js → Play-rnw1eV52.js} +1 -1
- package/dist/client/assets/{Plus-DaErdsG1.js → Plus-Bxp02MWl.js} +1 -1
- package/dist/client/assets/{Printer-BG6NfeSZ.js → Printer-fz_zwxfT.js} +1 -1
- package/dist/client/assets/{SearchLg-DxQfk550.js → SearchLg-FC9suxna.js} +1 -1
- package/dist/client/assets/{SearchMd-BNXjQ2BV.js → SearchMd-DRRptSJN.js} +1 -1
- package/dist/client/assets/{Sector-D2wxgDkd.js → Sector-CJIPfQ5Z.js} +1 -1
- package/dist/client/assets/{Settings02-DL8f5fN1.js → Settings02-D2oiGU4q.js} +1 -1
- package/dist/client/assets/{Share07-D1Sv14jA.js → Share07-D_kiq5Fr.js} +1 -1
- package/dist/client/assets/{Shield01-BsobIEfQ.js → Shield01-CjyLhqlS.js} +1 -1
- package/dist/client/assets/{Stars01-f37Q7vDf.js → Stars01-COChWymR.js} +1 -1
- package/dist/client/assets/{Sun-DjKz3VjB.js → Sun-nKOZMh9n.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BIyO34Jw.js → SwitchHorizontal01-CxlKjkIX.js} +1 -1
- package/dist/client/assets/{Tool01-D6HOM_aJ.js → Tool01-BnKd95Y1.js} +1 -1
- package/dist/client/assets/{Tool02-BrfQeZRx.js → Tool02-C_xRWqQk.js} +1 -1
- package/dist/client/assets/{Trash01-DQjprOwc.js → Trash01-DqUm2RRh.js} +1 -1
- package/dist/client/assets/{TrendUp01-DIz6JZwT.js → TrendUp01-PFzYDizC.js} +1 -1
- package/dist/client/assets/{Upload01-BDeLrRhf.js → Upload01-CqWnAR1-.js} +1 -1
- package/dist/client/assets/{User01-B8a5ssx2.js → User01-BJoNdkjl.js} +1 -1
- package/dist/client/assets/{UserSquare-yIpHwPSn.js → UserSquare-CCDsU001.js} +1 -1
- package/dist/client/assets/{Users01-BCRhQsCX.js → Users01-DSQPwtP5.js} +1 -1
- package/dist/client/assets/{Users03-DWh3D2_T.js → Users03-CRtXqa1Q.js} +1 -1
- package/dist/client/assets/{XCircle-DudPVYQR.js → XCircle-9Cb0khfg.js} +1 -1
- package/dist/client/assets/{XClose-DpDcHm9Y.js → XClose-Cw4b4Uag.js} +1 -1
- package/dist/client/assets/{Zap-C5eiFR0N.js → Zap-ChVc0p76.js} +1 -1
- package/dist/client/assets/{ZoomOut-DdupjPFF.js → ZoomOut-BXPGwF_O.js} +1 -1
- package/dist/client/assets/{access-gate-Dnh0JyKy.js → access-gate-BZbNb1lq.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BSihy3_s.js → add-connection-dialog-s1GRGQ63.js} +1 -1
- package/dist/client/assets/{agent-analytics-C1OAYjbt.js → agent-analytics-C4aHsqYV.js} +1 -1
- package/dist/client/assets/agent-app-CzbKRw1_.js +1 -0
- package/dist/client/assets/{agent-assets-vYQq8qui.js → agent-assets-B6lPIA_2.js} +1 -1
- package/dist/client/assets/{agent-automation-BPNX454_.js → agent-automation-Bmdy2mNK.js} +1 -1
- package/dist/client/assets/{agent-automations-BLOXID0N.js → agent-automations-5exIOZ--.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BzEccd4r.js → agent-connect-sources-ozaEzrP4.js} +1 -1
- package/dist/client/assets/agent-deck-D5-mvZ5i.js +1 -0
- package/dist/client/assets/{agent-e2e-DM8adI3E.js → agent-e2e-s-Nk1F2Y.js} +1 -1
- package/dist/client/assets/agent-file-DkGApBvp.js +1 -0
- package/dist/client/assets/{agent-git-DarQSTRH.js → agent-git-Bu3r6tWp.js} +1 -1
- package/dist/client/assets/{agent-hosting-Dnr2S-TT.js → agent-hosting-CdYzW_dA.js} +1 -1
- package/dist/client/assets/{agent-icon-vDfwuZu4.js → agent-icon-DrlilhFJ.js} +1 -1
- package/dist/client/assets/agent-library-file-CK85m8fH.js +1 -0
- package/dist/client/assets/{agent-monitor-DpaaBIhL.js → agent-monitor-DEQ-34KF.js} +1 -1
- package/dist/client/assets/{agent-overview-D9IrP622.js → agent-overview-BQIF-rwN.js} +1 -1
- package/dist/client/assets/agent-settings-gb3smN_4.js +1 -0
- package/dist/client/assets/{agent-site-editor-DTFbZmEY.js → agent-site-editor-DtPpWjDD.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DkcL_YVi.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-BE26aik7.js → agent-site-editor-content-6zQLGSyR.js} +2 -2
- package/dist/client/assets/{agent-site-editor-preview-ki_D8wtP.js → agent-site-editor-preview-D8mxBZIU.js} +3 -3
- package/dist/client/assets/agent-view-D9WzU94g.js +1 -0
- package/dist/client/assets/{agent-view-guard-DomQyuot.js → agent-view-guard-nj1TYVsk.js} +1 -1
- package/dist/client/assets/{agents-list-B0vnsITA.js → agents-list-hiZ_XS0O.js} +1 -1
- package/dist/client/assets/{ai-providers-CxaMjUP7.js → ai-providers-oY9ilqJZ.js} +1 -1
- package/dist/client/assets/{alert-DcFgIKLk.js → alert-D-emvPaG.js} +1 -1
- package/dist/client/assets/{alert-dialog-CiKfgw9r.js → alert-dialog-BE9ltHtr.js} +1 -1
- package/dist/client/assets/{api-keys-CEPWE1iS.js → api-keys-4NMR09V3.js} +1 -1
- package/dist/client/assets/api-keys-BQayHq-8.js +1 -0
- package/dist/client/assets/app-editor-DeI0TeES.js +1 -0
- package/dist/client/assets/{asset-utils-DJXdpjr9.js → asset-utils-CR65HphV.js} +1 -1
- package/dist/client/assets/{auth-ksbj4Esa.js → auth-RjDDTUUT.js} +1 -1
- package/dist/client/assets/{auth-catchall-DV5KEwZ2.js → auth-catchall-qxwSZGuB.js} +1 -1
- package/dist/client/assets/{auth-entry-Fe8qT_kq.js → auth-entry-ddblLMjc.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CFJK_BXW.js → auth-split-layout-oGs_kK_4.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DMvGjBUE.js → authenticate-and-persist-oauth-DXlrPDSv.js} +1 -1
- package/dist/client/assets/{automation-list-row-CkrObNhq.js → automation-list-row-XibuWgpW.js} +1 -1
- package/dist/client/assets/{automation-runs-C-5kRp10.js → automation-runs-nZP284NC.js} +1 -1
- package/dist/client/assets/automations-CDxxuCym.js +1 -0
- package/dist/client/assets/{autosend-BzUVLyEq.js → autosend-HdosN86x.js} +1 -1
- package/dist/client/assets/{avatar-CW4PxBuN.js → avatar-DcDvs8Zz.js} +1 -1
- package/dist/client/assets/{badge-C5Ilvf_J.js → badge-DJpaBl8u.js} +1 -1
- package/dist/client/assets/{block-document-Zfk-C1Kp.js → block-document-LCYQj9PJ.js} +1 -1
- package/dist/client/assets/{breadcrumb-BajFgW5V.js → breadcrumb-BOAVRiAa.js} +1 -1
- package/dist/client/assets/{buckets-CyNocIPE.js → buckets-Ze5fok7v.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BrRLOIlw.js → build-improve-prompt-doc-Dn9xs_5X.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-e217-dmm.js → bulk-category-panel-D-Hh71MB.js} +1 -1
- package/dist/client/assets/{calendar-DGiOuDgZ.js → calendar-DTnssie4.js} +1 -1
- package/dist/client/assets/{capability-load-error-DFv8gs5U.js → capability-load-error-CJ3e1sqb.js} +1 -1
- package/dist/client/assets/{cards-XHNjVWeh.js → cards-DTFINi5r.js} +1 -1
- package/dist/client/assets/category-editor-4KcN0JRt.js +1 -0
- package/dist/client/assets/{chart-C7CmtzOp.js → chart-Jb0gHMLD.js} +1 -1
- package/dist/client/assets/{chat-context-HB_KOUNM.js → chat-context-CXknhaDs.js} +1 -1
- package/dist/client/assets/{checkbox-Dg_GkeBT.js → checkbox-D8Ab2Vb-.js} +1 -1
- package/dist/client/assets/{choose-editor-DO1mGCL1.js → choose-editor-Chy2VB_F.js} +1 -1
- package/dist/client/assets/{cli-auth-success-e-RADpiN.js → cli-auth-success-B27gos5d.js} +1 -1
- package/dist/client/assets/{client-icons-tt6oaVA2.js → client-icons-CoIMqlIz.js} +1 -1
- package/dist/client/assets/{collapsible-CycyYnXe.js → collapsible-DH_CZdwE.js} +1 -1
- package/dist/client/assets/{collection-detail-DhtfN_Wl.js → collection-detail-D8Sq0PzS.js} +1 -1
- package/dist/client/assets/{collection-display-button-BRbx9UhH.js → collection-display-button-P_aK73Om.js} +1 -1
- package/dist/client/assets/{collection-search-j4HjYlys.js → collection-search-CzGq8Uso.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-0LZ9BKlr.js → collection-table-wrapper-ChqJqpKo.js} +1 -1
- package/dist/client/assets/{collection-tabs-Bc9QOlJ8.js → collection-tabs-BLgGMB42.js} +1 -1
- package/dist/client/assets/{command-BpjWfGyr.js → command-B6LMVdkQ.js} +1 -1
- package/dist/client/assets/{command-palette-store-D19nXDNm.js → command-palette-store-BwHku_Zt.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CdG4FfWS.js → commerce-onboarding-EmIMFBqV.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CVcicsr9.js → companion-mcps-section-BszDkkOp.js} +1 -1
- package/dist/client/assets/{connect-COU6F3Do.js → connect-CM-97gwN.js} +1 -1
- package/dist/client/assets/{connect-layout-Bl-ol5HH.js → connect-layout-C_MQVbrT.js} +1 -1
- package/dist/client/assets/{connection-By77bjvj.js → connection-OmoYXqZk.js} +1 -1
- package/dist/client/assets/{connection-card-Br8jDKgZ.js → connection-card-Cy-GdKQl.js} +1 -1
- package/dist/client/assets/{connection-detail-vVdPGlxv.js → connection-detail-CuBiFvjK.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CFXh6BoJ.js → connection-form-helpers-D3hdN_Pk.js} +1 -1
- package/dist/client/assets/{connections-BBNFmXEe.js → connections-BnO49Vti.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CRl8hry2.js → create-organization-dialog--p2RMsV5.js} +1 -1
- package/dist/client/assets/{decode-html-entities-Cf7wUEql.js → decode-html-entities-DDqE27I4.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-D2Qtyl-A.js → decopilot-sse-pool-CfYFArSW.js} +1 -1
- package/dist/client/assets/{dialog-DJBpjJnY.js → dialog-otnvxVN0.js} +1 -1
- package/dist/client/assets/{discover-y7BsppSE.js → discover-BZKxvY_j.js} +1 -1
- package/dist/client/assets/{domain-settings-B_cuGCF0.js → domain-settings-QORwmdcG.js} +1 -1
- package/dist/client/assets/{download-app-dialog-DYhv8XsJ.js → download-app-dialog-BqNRF4Sn.js} +1 -1
- package/dist/client/assets/{drawer-B5NRhNfW.js → drawer-s7gtDrb4.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DzwCPltk.js → dropdown-menu-BxKUbUkE.js} +1 -1
- package/dist/client/assets/{editor-BHnwprUT.js → editor-DCxsAs7o.js} +1 -1
- package/dist/client/assets/{empty-state-CJ95hR0w.js → empty-state-CL4F2BS4.js} +1 -1
- package/dist/client/assets/{empty-state-CXolWOTn.js → empty-state-Cz1DkYZE.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B1nPGa4h.js → extract-connection-data-CqGCTPdZ.js} +1 -1
- package/dist/client/assets/{file-explorer-Dj1zqDxa.js → file-explorer-Uvp7ogK8.js} +1 -1
- package/dist/client/assets/{file-preview-kRDXQYfi.js → file-preview-18IJQMnU.js} +1 -1
- package/dist/client/assets/{file-share-button-P5GnoZYM.js → file-share-button-Cef5f1VZ.js} +1 -1
- package/dist/client/assets/{file-type-icon-Cg81au_Z.js → file-type-icon-DGllFDOf.js} +1 -1
- package/dist/client/assets/{folder-icon-Bey_C_xd.js → folder-icon-p8jB76CU.js} +1 -1
- package/dist/client/assets/{form-EGCuUtdG.js → form-KjPevg0A.js} +1 -1
- package/dist/client/assets/{general-BJ_Ksgnn.js → general-t-IB2WC3.js} +1 -1
- package/dist/client/assets/{github-icon-CiNkodR8.js → github-icon-D51q_6S8.js} +1 -1
- package/dist/client/assets/{home-Cmddezu3.js → home-Bhl8U_ph.js} +1 -1
- package/dist/client/assets/{hooks-Bb9SArul.js → hooks-BhviOOpn.js} +1 -1
- package/dist/client/assets/{hooks-BSkeWBV7.js → hooks-k1OxvonE.js} +1 -1
- package/dist/client/assets/{index-6GXqHE0w.js → index-B3yBTWEk.js} +4 -4
- package/dist/client/assets/{index-BVRQ9yUZ.js → index-Bwc7J041.js} +1 -1
- package/dist/client/assets/{index-CY40-aHW.js → index-C1N-CFMR.js} +1 -1
- package/dist/client/assets/{index-BaItIL-_.js → index-C7WIaN4y.js} +1 -1
- package/dist/client/assets/{index-DCQ3taiG.js → index-CRCvoACn.js} +1 -1
- package/dist/client/assets/{index-B9bOVdMd.js → index-D4YJGrDI.js} +3 -3
- package/dist/client/assets/{index-hC6VOnUm.js → index-DD-r2o4M.js} +1 -1
- package/dist/client/assets/{index-CUa7fAjf.js → index-DOk05MCp.js} +1 -1
- package/dist/client/assets/{index-B7ENeoW4.js → index-DlQKfvnq.js} +1 -1
- package/dist/client/assets/{index-Cu77hgR2.js → index-DqX9hbqM.js} +1 -1
- package/dist/client/assets/{index-Dg14Zpi9.js → index-fTs6ROSj.js} +1 -1
- package/dist/client/assets/{index-qEipD_7S.js → index-m01im2kT.js} +1 -1
- package/dist/client/assets/{index-redirect-BRL1uQPT.js → index-redirect-e7Kr1hOd.js} +1 -1
- package/dist/client/assets/{index-cEqwHhEg.js → index-w1d_dmEj.js} +1 -1
- package/dist/client/assets/{index-9FQARZdh.js → index-xVQnUsdi.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C7FrFXuf.js → infiniteQueryObserver-DgAoAIrN.js} +1 -1
- package/dist/client/assets/{infra-billing-B0e93_qz.js → infra-billing-B2HwpfSN.js} +1 -1
- package/dist/client/assets/{input-D8xrvlz-.js → input-BnbYz5_9.js} +1 -1
- package/dist/client/assets/{input-BRqLi1TH.js → input-DxAgQLPa.js} +1 -1
- package/dist/client/assets/{input-TvernbmY.js → input-HFOrJf5B.js} +1 -1
- package/dist/client/assets/{integration-icon-B6H5J7sl.js → integration-icon-BPwWRlNG.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CsolElt3.js → invite-member-dialog-vPcEYe6v.js} +1 -1
- package/dist/client/assets/{label-aWEsDmHM.js → label-CqlSWrLn.js} +1 -1
- package/dist/client/assets/{layout-CAwe_kK2.js → layout-aU1eoqDA.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DJ_t0QLc.js → legacy-agents-deep-CpKjJlPs.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CySqEohs.js → legacy-main-redirect-ZPChWdtD.js} +1 -1
- package/dist/client/assets/{library-DRmbr8Ht.js → library-uYIcEGdr.js} +1 -1
- package/dist/client/assets/{login-DQDbHhI7.js → login-CfxNz6kc.js} +1 -1
- package/dist/client/assets/{markdown-CBvmi8AF.js → markdown-B1038zFJ.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BQ7hPzlx.js → mcp-app-renderer-Cb8Ud-E7.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DhRKpyTH.js → mcp-oauth-D6isOO_s.js} +1 -1
- package/dist/client/assets/{members-NHaXKGgP.js → members-DHLsomPg.js} +1 -1
- package/dist/client/assets/{mini-report-page-BcG9QHwQ.js → mini-report-page-iTjakIrU.js} +1 -1
- package/dist/client/assets/{monaco-editor-C5zvkMO4.js → monaco-editor-WNMTPDp9.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CWqusnLf.js → monitoring-stats-row-B_mR1zw-.js} +1 -1
- package/dist/client/assets/{multi-select-CvACpZbb.js → multi-select-D54pM3d4.js} +1 -1
- package/dist/client/assets/{mustache-DQXz9E52.js → mustache-r9snVmI4.js} +1 -1
- package/dist/client/assets/{oauth-callback-BHJTnNxG.js → oauth-callback-GAK1H0Is.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-wF0_7wc5.js → oauth-callback-ai-provider-sdaHeEFx.js} +1 -1
- package/dist/client/assets/{onboarding-20FUHLvO.js → onboarding-BKPW4du6.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DKtRXqQ0.js → optimistic-project-sidebar-views-yrtk59Mo.js} +1 -1
- package/dist/client/assets/{org-layout-DRrVivAL.js → org-layout-BNIg984j.js} +1 -1
- package/dist/client/assets/{organization-choice-BmSYuBSE.js → organization-choice-DvXG7tgx.js} +1 -1
- package/dist/client/assets/{orgs-1ZlqeM-y.js → orgs-NTyzCYi-.js} +1 -1
- package/dist/client/assets/{page-seo-form-Cpi2Oike.js → page-seo-form-DAkbVQPg.js} +1 -1
- package/dist/client/assets/{pair-CD8Vxcvs.js → pair-C08OPQNP.js} +1 -1
- package/dist/client/assets/{popover-Ci-k968-.js → popover-DIqZ2IKF.js} +1 -1
- package/dist/client/assets/{post-calendar-CgTLYrrU.js → post-calendar-DuH_hA9y.js} +1 -1
- package/dist/client/assets/{post-editor-DyayPm7u.js → post-editor-BAf6FqSQ.js} +1 -1
- package/dist/client/assets/{preview-content-DhEgigNG.js → preview-content-B5xB74fu.js} +1 -1
- package/dist/client/assets/{preview-dialog-CKWnRekk.js → preview-dialog-b2QyOGzU.js} +1 -1
- package/dist/client/assets/{primitives-1lR28duD.js → primitives-4_D03rJK.js} +1 -1
- package/dist/client/assets/{profile-DixSbE4L.js → profile-COT-hKKD.js} +1 -1
- package/dist/client/assets/{project-app-view-DBHiU3Rg.js → project-app-view-DJ_q7UHg.js} +1 -1
- package/dist/client/assets/{project-feed-boKgu_TR.js → project-feed-DJ_jJM3E.js} +1 -1
- package/dist/client/assets/{project-icon-DIXBuD-A.js → project-icon-Bl3bXnhv.js} +1 -1
- package/dist/client/assets/project-reports-q4w3pT5T.js +1 -0
- package/dist/client/assets/project-tasks-DqlAyIfE.js +1 -0
- package/dist/client/assets/{prompts-BROxvafI.js → prompts-CI44HEcf.js} +1 -1
- package/dist/client/assets/record-editor-n0M7yiQw.js +1 -0
- package/dist/client/assets/redirect-editor-CK3YSOdb.js +1 -0
- package/dist/client/assets/registry-DkzCUqTc.js +2 -0
- package/dist/client/assets/{registry-layout-BUEF9YqP.js → registry-layout-CvRfdld3.js} +1 -1
- package/dist/client/assets/{reports-B1C9NU2m.js → reports-C-eaYxW3.js} +1 -1
- package/dist/client/assets/reports-C2LVTrmJ.js +1 -0
- package/dist/client/assets/{reports-tab-uLMivl2p.js → reports-tab-qffeKlGd.js} +2 -2
- package/dist/client/assets/repositories-ao250fUH.js +1 -0
- package/dist/client/assets/{repository-import-picker-DVnadPZ8.js → repository-import-picker-Bg_h8YsG.js} +1 -1
- package/dist/client/assets/repository-picker-BDWGy2xY.js +1 -0
- package/dist/client/assets/{require-capability-DSFKKTc-.js → require-capability-CmR_46yt.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DMNBbcf3.js → required-auth-layout-BEc3NUsQ.js} +1 -1
- package/dist/client/assets/{reset-password-GCDcBOjo.js → reset-password-BlF157J6.js} +1 -1
- package/dist/client/assets/{review-settings-VwYzzjCc.js → review-settings-BBciVvfB.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-C6A8Q9Jd.js → rich-text-link-control-CrwbAR31.js} +1 -1
- package/dist/client/assets/{roles-PgEO9KN-.js → roles-CuHUTdKb.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-Db2XbJYi.js → runnable-block-editor-2CMWc-S3.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DxbfUbxP.js → sandbox-lifecycle-context-CXd9Um8u.js} +1 -1
- package/dist/client/assets/{schema-Cnskrzk1.js → schema-BQbhQoxs.js} +1 -1
- package/dist/client/assets/{scroll-area-CaE3a4_T.js → scroll-area-BgZjjLM3.js} +1 -1
- package/dist/client/assets/{search-input-lFP9sD3O.js → search-input-uXtJ6IU8.js} +1 -1
- package/dist/client/assets/{secrets-BU_daRxy.js → secrets-C1mCKV1g.js} +1 -1
- package/dist/client/assets/{sections-editor-D-W8vM7g.js → sections-editor-Bv2odcBq.js} +1 -1
- package/dist/client/assets/{select-Ce9NznPv.js → select-Bc5UZb4n.js} +1 -1
- package/dist/client/assets/{select-model-CjTijsS7.js → select-model-BDGEzt-Y.js} +1 -1
- package/dist/client/assets/{seo-editor-O94He1NF.js → seo-editor-DJw3ydvJ.js} +1 -1
- package/dist/client/assets/settings-layout-DlH0gQXK.js +1 -0
- package/dist/client/assets/{settings-sidebar-BcAe-WS4.js → settings-sidebar-DswZBMwm.js} +1 -1
- package/dist/client/assets/{settings-tab-Cg5CqTki.js → settings-tab-Ru2atFmZ.js} +1 -1
- package/dist/client/assets/{shell-controls-gkZZS07l.js → shell-controls-DkLEUvEw.js} +1 -1
- package/dist/client/assets/{shell-layout-C3IRibnI.js → shell-layout-1dFmVwYI.js} +1 -1
- package/dist/client/assets/{skill-preview-MIddvDZe.js → skill-preview-CGe8kUoa.js} +1 -1
- package/dist/client/assets/{skills-hRnVKZ5K.js → skills-BGdKR-aF.js} +1 -1
- package/dist/client/assets/{sso-BePH_NId.js → sso-M-OsbEtw.js} +1 -1
- package/dist/client/assets/{store-CqeIEwHN.js → store-BY4ZRY7y.js} +1 -1
- package/dist/client/assets/store-registry-DQHLJpOA.js +2 -0
- package/dist/client/assets/{switch-D5GcuD9Z.js → switch-CJ5Ir2Zx.js} +1 -1
- package/dist/client/assets/{synced-repos-Cnp4m7yg.js → synced-repos-9D-CfhL7.js} +1 -1
- package/dist/client/assets/{table-O0SpY8ZO.js → table-Di_WRNkb.js} +1 -1
- package/dist/client/assets/{tabs-DQoXHeZr.js → tabs-DV8akPGb.js} +1 -1
- package/dist/client/assets/{task-board-DyZE7mH1.js → task-board-CXsHf2Zn.js} +1 -1
- package/dist/client/assets/{task-route-CayeX6cv.js → task-route-D79aS9d_.js} +1 -1
- package/dist/client/assets/{task-status-CyTozLxL.js → task-status-DIr_2V94.js} +1 -1
- package/dist/client/assets/tasks-C6DyE2q-.js +1 -0
- package/dist/client/assets/{tasks-Da-h-zLm.js → tasks-CiIHA5f1.js} +1 -1
- package/dist/client/assets/{textarea-BpFOmm9_.js → textarea-CneoU2lJ.js} +1 -1
- package/dist/client/assets/{thread-intent-AJKohiRy.js → thread-intent-DVKldCEq.js} +1 -1
- package/dist/client/assets/{thread-route-CEvVLI2K.js → thread-route-CKY-dKC0.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-Bs4b4fMK.js → thread-sheet-body-CcUGPZXB.js} +1 -1
- package/dist/client/assets/{toggle-group-Cs1yIHkK.js → toggle-group-9HQCpj-q.js} +1 -1
- package/dist/client/assets/{tool-namespace-ySa3S1AM.js → tool-namespace-BVMQcKlk.js} +1 -1
- package/dist/client/assets/{toolbar-DOOz2W24.js → toolbar-D0oe2g2b.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Dp-AbzNZ.js → toolbar-icon-button-EOE8J-Ai.js} +1 -1
- package/dist/client/assets/{track-Dns1NpdC.js → track-BzMi8kcZ.js} +1 -1
- package/dist/client/assets/{types-C1gRrnQe.js → types-Csu6Ims7.js} +1 -1
- package/dist/client/assets/{usage-stats-D5mXC24B.js → usage-stats-BNse37Wk.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bg_y9f3x.js → use-ai-providers-qnkcjapR.js} +1 -1
- package/dist/client/assets/{use-automations-BI_yIok-.js → use-automations-CYOC_eS5.js} +1 -1
- package/dist/client/assets/{use-autosave-BB0U2eiK.js → use-autosave-CCprSQ13.js} +1 -1
- package/dist/client/assets/{use-commerce-diagnostic-DqKipeip.js → use-commerce-diagnostic-mdvL2BW-.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Mci4Y6hu.js → use-connect-companion-2fL060lG.js} +1 -1
- package/dist/client/assets/{use-connection-DCUpGmsb.js → use-connection-DCLPda2h.js} +1 -1
- package/dist/client/assets/{use-copy-GVBAvo9n.js → use-copy-14DzRp8J.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CizXpVyQ.js → use-create-virtual-mcp-DoCSQs95.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CcPpBz8y.js → use-date-fns-locale-DYzMvrWB.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-wCEzYUZh.js → use-debounced-autosave-BRAVEUZc.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D0SYNQsR.js → use-debounced-value-Cud3o3Fq.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DjxZxHMq.js → use-deco-credits-rwNQ1gMg.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-zpeu2MCG.js → use-decopilot-events-DYRVevWg.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B-DNpbCU.js → use-delete-connection-ueGIYWMK.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Dpkh4HgH.js → use-deployment-admin-D6IzoXV0.js} +1 -1
- package/dist/client/assets/{use-file-configs-B1FdrMZJ.js → use-file-configs-BwD1CaWo.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BXOEU8Y7.js → use-infinite-scroll-DkLPxlOu.js} +1 -1
- package/dist/client/assets/{use-join-requests-1Ow065Yq.js → use-join-requests-DTGTfD21.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CeyJWpQP.js → use-main-panel-tabs-EW6rbxam.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CSQiZCDG.js → use-mcp-auth-status-CPh3Lmzs.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Bq-mjhw3.js → use-mcp-client-DsJzBus3.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CWmeNLXn.js → use-mcp-prompts-i0LZ2nQA.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DGdyHn8U.js → use-mcp-tools-Dc3F6Krl.js} +1 -1
- package/dist/client/assets/{use-members-Dnee1tF2.js → use-members-C0MdJrYz.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Drdqs1cr.js → use-navigate-to-agent-Bbq0oQ0Y.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-Cju1isPI.js → use-open-billing-url-DvTk9GH0.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CVFBkaiI.js → use-org-auth-client-4o0wRx2Q.js} +1 -1
- package/dist/client/assets/{use-org-fs-DG1oJieK.js → use-org-fs-BEoPvlnI.js} +1 -1
- package/dist/client/assets/{use-org-notice-PUfO84YR.js → use-org-notice-CXYMfMUq.js} +1 -1
- package/dist/client/assets/{use-org-sso-uleG21Aq.js → use-org-sso-CdSz0xa8.js} +1 -1
- package/dist/client/assets/{use-organization-roles-yO3kgQbK.js → use-organization-roles-DzWM9Nv-.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DrJN-E78.js → use-organization-settings-BAVHurZk.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CCqZdv2O.js → use-panel-navigate-Byvx0cbx.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-01L5j4lu.js → use-project-native-view-presence-D-AyEulW.js} +1 -1
- package/dist/client/assets/{use-project-scope-DZ9tacAx.js → use-project-scope-B2cuvtTy.js} +1 -1
- package/dist/client/assets/{use-registry-connections-cro5WL6A.js → use-registry-connections-DikbDR8w.js} +1 -1
- package/dist/client/assets/{use-secrets-w6G8jtp4.js → use-secrets-D-c1ciPZ.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-lro_p1nx.js → use-section-preview-base-CwIWGkgy.js} +1 -1
- package/dist/client/assets/{use-session-runtime-TS34dEJv.js → use-session-runtime-BHahDP0E.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DQ2pMmh0.js → use-status-sounds-CnCb1h48.js} +1 -1
- package/dist/client/assets/{use-tags-B6zE47mm.js → use-tags-C2LhenRb.js} +1 -1
- package/dist/client/assets/{use-task-metadata-C4MfiHBQ.js → use-task-metadata-CB3EJ29f.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CpCqTMOi.js → use-thread-outputs-9oZhiYbB.js} +1 -1
- package/dist/client/assets/{use-view-mode-B9wUn2ad.js → use-view-mode-BvOL5I4W.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CMlCV8Oj.js → use-virtual-mcp-Bk09OpEg.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-GKCP1c_7.js +1 -0
- package/dist/client/assets/{useQueries-C6OAJOs7.js → useQueries-qr8TAkZc.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DmEiIBI4.js +1 -0
- package/dist/client/assets/{users-CYflDdFv.js → users-C1ExMDuM.js} +1 -1
- package/dist/client/assets/{utils-B-5U5Z26.js → utils-B14U8IKK.js} +1 -1
- package/dist/client/assets/{variant-calendar-BsFwTl3D.js → variant-calendar-urd0wE-3.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CRlEf4IL.js → variant-matcher-override-DvY-JiuY.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-kY4gR8CN.js → view-mode-toggle-swSorpD7.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CKi1xJsO.js → virtual-mcp-DGQbDtgM.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +678 -668
- package/dist/server/migrate.js +171 -161
- package/dist/server/server.js +418 -418
- package/package.json +1 -1
- package/dist/client/assets/agent-app-62cavSHy.js +0 -1
- package/dist/client/assets/agent-deck-DVW32bsA.js +0 -1
- package/dist/client/assets/agent-file-C7nywZCe.js +0 -1
- package/dist/client/assets/agent-library-file-D4p-8dXS.js +0 -1
- package/dist/client/assets/agent-settings-CxGAsqqN.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Dcgjtfwk.js +0 -2
- package/dist/client/assets/agent-view-DYYYDEW_.js +0 -1
- package/dist/client/assets/api-keys-DoGNEUpY.js +0 -1
- package/dist/client/assets/app-editor-CRjlYU-M.js +0 -1
- package/dist/client/assets/automations-CKhgbURI.js +0 -1
- package/dist/client/assets/category-editor-zLRtagcy.js +0 -1
- package/dist/client/assets/project-reports-ChLta7_v.js +0 -1
- package/dist/client/assets/project-tasks-nUWazd1g.js +0 -1
- package/dist/client/assets/record-editor-FqHaN2k4.js +0 -1
- package/dist/client/assets/redirect-editor-CWYZom_C.js +0 -1
- package/dist/client/assets/registry-C3_EEMj-.js +0 -2
- package/dist/client/assets/reports-BY7Ca1Ey.js +0 -1
- package/dist/client/assets/repositories-BgD13VwL.js +0 -1
- package/dist/client/assets/repository-picker-BGpoa_g_.js +0 -1
- package/dist/client/assets/settings-layout-CWQI71Tg.js +0 -1
- package/dist/client/assets/store-registry-BCokMLik.js +0 -2
- package/dist/client/assets/tasks-DGTMeQBa.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CM35R0yt.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DWyGwvh9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Y,r as h,b as le,j as v,t as V,F as ct,B as ut,b7 as dt,b8 as Ke,b9 as ft,ba as z,bb as pe,ar as mt,bc as pt,bd as ge,be as gt,bf as ht,bg as bt,bh as vt,bi as xt,bj as yt,bk as wt,bl as St,l as Ue,h as Rt,n as qe,I as Be,K as ce,o as J,bm as Qe,bn as Ce,bo as oe}from"./index-6GXqHE0w.js";import{u as Ct,S as Et,a as It,b as kt,s as Pt}from"./hooks-Bb9SArul.js";import{h as Tt,j as Ft,k as Nt,i as se,l as _t,P as Ee,n as At,d as Mt,u as Dt,o as jt,f as Lt,p as Ot,F as $t,s as Kt,b as Ut}from"./usage-stats-D5mXC24B.js";import{d as qt,h as Bt,c as Qt,b as Ht,D as Vt}from"./dialog-DJBpjJnY.js";import{aj as Wt,A as zt}from"./agent-icon-vDfwuZu4.js";import"./chat-context-HB_KOUNM.js";import{m as Yt,i as Xt,b as Gt}from"./index-B7ENeoW4.js";import{u as He}from"./use-mcp-client-Bq-mjhw3.js";import{u as Jt}from"./use-virtual-mcp-CMlCV8Oj.js";import{g as ue,d as Zt,s as Ve}from"./tool-namespace-ySa3S1AM.js";import{g as en}from"./use-project-scope-DZ9tacAx.js";import{l as Ie,g as We}from"./use-mcp-prompts-CWmeNLXn.js";import{f as tn,a as nn}from"./use-org-fs-DG1oJieK.js";async function rn(t,e,n,r,o,s){if(!Yt(e)){V.error("Selected model does not support file uploads");return}const i=n.type||"application/octet-stream";if(!Xt(i,e)){const c=Gt(e).parts.map(f=>s(f)).join(", "),u=e?.title??"This model";o?o({fileName:n.name,modelName:u,accepted:c}):V.error(`"${n.name}" can't be attached`,{description:`${u} accepts ${c}.`});return}const a=10*1024*1024;if(n.size>a){V.error(`File "${n.name}" exceeds 10MB limit`);return}try{const c=new FileReader,u=new Promise((l,d)=>{c.onload=()=>{const g=c.result;if(typeof g!="string"){d(new Error("Failed to read file as data URL"));return}const m=g.includes(",")?g.split(",")[1]??g:g;l(m)},c.onerror=d});c.readAsDataURL(n);const f=await u,p={id:crypto.randomUUID(),name:n.name,mimeType:n.type||"application/octet-stream",size:n.size,data:f};Tt(t,{from:r,to:r},p)}catch(c){console.error("Failed to process file:",c),V.error(`Failed to load file "${n.name}"`)}}function on(t){const e=Y.c(9),{editor:n,selectedModel:r,onUnsupportedFile:o}=t,s=le(),i=h.useRef(an);let a,c;e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==s?(a=()=>{i.current=async(p,l)=>{await rn(n,r,p,l,o,s)}},c=[n,r,o,s],e[0]=n,e[1]=o,e[2]=r,e[3]=s,e[4]=a,e[5]=c):(a=e[4],c=e[5]),h.useEffect(a,c);let u,f;return e[6]!==n?(u=()=>{if(n?.isDestroyed)return;const p=new Ft("fileDropHandler");n.state.plugins.find(g=>g.spec.key===p)&&n.unregisterPlugin(p);const d=new Nt({key:p,props:{handleDrop:(g,m,b,y)=>{if(y)return!1;const x=m.dataTransfer?.files;if(!x||x.length===0)return!1;m.preventDefault();const w=g.posAtCoords({left:m.clientX,top:m.clientY});if(!w)return!1;const I=Array.from(x);return(async()=>{let N=w.pos;for(const T of I)await i.current?.(T,N),N=g.state.selection.to})(),!0},handlePaste:(g,m)=>{const b=m.clipboardData?.items;if(!b)return!1;const y=Array.from(b).filter(sn);return y.length===0?!1:(m.preventDefault(),(async()=>{let x=g.state.selection.from;for(const w of y){const I=w.getAsFile();I&&(await i.current?.(I,x),x=g.state.selection.to)}})(),!0)}}});return n.registerPlugin(d),()=>{n?.isDestroyed||n.unregisterPlugin(p)}},f=[n],e[6]=n,e[7]=u,e[8]=f):(u=e[7],f=e[8]),h.useEffect(u,f),null}function sn(t){return t.kind==="file"}function an(){return Promise.resolve()}function jr(t){const e=Y.c(43),{info:n,onClose:r}=t,o=le(),s=n!==null;let i;e[0]!==r?(i=A=>!A&&r(),e[0]=r,e[1]=i):i=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=a):a=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=v.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:a.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=c):c=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=v.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:v.jsx(ct,{size:18})}),e[4]=u):u=e[4];let f;e[5]!==o?(f=o("chat.uploader.fileTypeNotSupported"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=v.jsx(qt,{className:"text-xl font-semibold tracking-tight",children:f}),e[7]=f,e[8]=p):p=e[8];const l=n?.fileName;let d;e[9]!==l?(d=v.jsxs("span",{className:"font-medium text-foreground",children:["“",l,"”"]}),e[9]=l,e[10]=d):d=e[10];let g;e[11]!==o?(g=o("chat.uploader.cantAttachToChat"),e[11]=o,e[12]=g):g=e[12];let m;e[13]!==g||e[14]!==d?(m=v.jsxs(Bt,{className:"mt-1.5 text-sm leading-relaxed",children:[d," ",g]}),e[13]=g,e[14]=d,e[15]=m):m=e[15];let b;e[16]!==m||e[17]!==p?(b=v.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[c,v.jsxs(Qt,{className:"relative gap-4",children:[u,v.jsxs("div",{children:[p,m]})]})]}),e[16]=m,e[17]=p,e[18]=b):b=e[18];const y=n?.modelName??"";let x;e[19]!==o||e[20]!==y?(x=o("chat.uploader.accepts",{modelName:y}),e[19]=o,e[20]=y,e[21]=x):x=e[21];let w;e[22]!==x?(w=v.jsx("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground mb-2",children:x}),e[22]=x,e[23]=w):w=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=v.jsx(Wt,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const N=n?.accepted;let T;e[25]!==N?(T=v.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,v.jsx("span",{className:"capitalize",children:N})]}),e[25]=N,e[26]=T):T=e[26];let S;e[27]!==w||e[28]!==T?(S=v.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:v.jsxs("div",{className:"rounded-xl border border-border p-4",children:[w,T]})}),e[27]=w,e[28]=T,e[29]=S):S=e[29];let R;e[30]!==o?(R=o("chat.uploader.gotIt"),e[30]=o,e[31]=R):R=e[31];let k;e[32]!==r||e[33]!==R?(k=v.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:v.jsx(ut,{onClick:r,children:R})}),e[32]=r,e[33]=R,e[34]=k):k=e[34];let F;e[35]!==b||e[36]!==S||e[37]!==k?(F=v.jsxs(Ht,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:ln,children:[b,S,k]}),e[35]=b,e[36]=S,e[37]=k,e[38]=F):F=e[38];let D;return e[39]!==s||e[40]!==i||e[41]!==F?(D=v.jsx(Vt,{open:s,onOpenChange:i,children:F}),e[39]=s,e[40]=i,e[41]=F,e[42]=D):D=e[42],D}function ln(t){return t.preventDefault()}function Lr(){const t=Y.c(3),[e,n]=h.useState(null);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>n(null),t[0]=r):r=t[0];let o;return t[1]!==e?(o={unsupportedFile:e,onUnsupportedFile:n,clearUnsupportedFile:r},t[1]=e,t[2]=o):o=t[2],o}var cn=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],xe=cn.join(","),ze=typeof Element>"u",ie=ze?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fe=!ze&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},me=function(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=o===""||o==="true",i=s||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):me(e.parentNode));return i},un=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},dn=function(e,n,r){if(me(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(xe));return n&&ie.call(e,xe)&&o.unshift(e),o=o.filter(r),o},ye=function(e,n,r){for(var o=[],s=Array.from(e);s.length;){var i=s.shift();if(!me(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),c=a.length?a:i.children,u=ye(c,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:i,candidates:u})}else{var f=ie.call(i,xe);f&&r.filter(i)&&(n||!e.includes(i))&&o.push(i);var p=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),l=!me(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(p&&l){var d=ye(p===!0?i.children:p.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:i,candidates:d})}else s.unshift.apply(s,i.children)}}return o},Ye=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Xe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||un(e))&&!Ye(e)?0:e.tabIndex},fn=function(e,n){var r=Xe(e);return r<0&&n&&!Ye(e)?0:r},mn=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ge=function(e){return e.tagName==="INPUT"},pn=function(e){return Ge(e)&&e.type==="hidden"},gn=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},hn=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},bn=function(e){if(!e.name)return!0;var n=e.form||fe(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=hn(o,e.form);return!s||s===e},vn=function(e){return Ge(e)&&e.type==="radio"},xn=function(e){return vn(e)&&!bn(e)},yn=function(e){var n,r=e&&fe(e),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==e){var i,a,c;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));!s&&o;){var u,f,p;r=fe(o),o=(u=r)===null||u===void 0?void 0:u.host,s=!!((f=o)!==null&&f!==void 0&&(p=f.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return s},ke=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},wn=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var i=ie.call(e,"details>summary:first-of-type"),a=i?e.parentElement:e;if(ie.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var c=e;e;){var u=e.parentElement,f=fe(e);if(u&&!u.shadowRoot&&o(u)===!0)return ke(e);e.assignedSlot?e=e.assignedSlot:!u&&f!==e.ownerDocument?e=f.host:e=u}e=c}if(yn(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ke(e);return!1},Sn=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ie.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},Rn=function(e,n){return!(n.disabled||pn(n)||wn(n,e)||gn(n)||Sn(n))},Pe=function(e,n){return!(xn(n)||Xe(n)<0||!Rn(e,n))},Cn=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Je=function(e){var n=[],r=[];return e.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,c=fn(a,i),u=i?Je(o.candidates):a;c===0?i?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:c,item:o,isScope:i,content:u})}),r.sort(mn).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Ze=function(e,n){n=n||{};var r;return n.getShadowRoot?r=ye([e],n.includeContainer,{filter:Pe.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Cn}):r=dn(e,n.includeContainer,Pe.bind(null,n)),Je(r)};function En(){return/apple/i.test(navigator.vendor)}const Te="data-floating-ui-focusable";function In(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function we(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&dt(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function re(t){return"composedPath"in t?t.composedPath()[0]:t.target}function he(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function kn(t){return t.matches("html,body")}function ae(t){return t?.ownerDocument||document}function Pn(t){return t?t.hasAttribute(Te)?t:t.querySelector("["+Te+"]")||t:null}function de(t,e,n){return n===void 0&&(n=!0),t.filter(o=>{var s;return o.parentId===e&&(!n||((s=o.context)==null?void 0:s.open))}).flatMap(o=>[o,...de(t,o.id,n)])}function Tn(t){return"nativeEvent"in t}var Fn=typeof document<"u",Nn=function(){},Z=Fn?h.useLayoutEffect:Nn;const _n={...Ke},An=_n.useInsertionEffect,Mn=An||(t=>t());function te(t){const e=h.useRef(()=>{});return Mn(()=>{e.current=t}),h.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}const et=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function tt(t,e){const n=Ze(t,et()),r=n.length;if(r===0)return;const o=In(ae(t)),s=n.indexOf(o),i=s===-1?e===1?0:r-1:s+e;return n[i]}function Dn(t){return tt(ae(t).body,1)||t}function jn(t){return tt(ae(t).body,-1)||t}function be(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!we(n,r)}function Ln(t){Ze(t,et()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Fe(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const On="data-floating-ui-focusable",Ne="active",_e="selected",$n={...Ke};let Ae=!1,Kn=0;const Me=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Kn++;function Un(){const[t,e]=h.useState(()=>Ae?Me():void 0);return Z(()=>{t==null&&e(Me())},[]),h.useEffect(()=>{Ae=!0},[]),t}const qn=$n.useId,Se=qn||Un;function Bn(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const Qn=h.createContext(null),Hn=h.createContext(null),nt=()=>{var t;return((t=h.useContext(Qn))==null?void 0:t.id)||null},rt=()=>h.useContext(Hn);function Re(t){return"data-floating-ui-"+t}const Vn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},De=h.forwardRef(function(e,n){const[r,o]=h.useState();Z(()=>{En()&&o("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Re("focus-guard")]:"",style:Vn};return v.jsx("span",{...e,...s})}),Wn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},ot=h.createContext(null),je=Re("portal");function zn(t){t===void 0&&(t={});const{id:e,root:n}=t,r=Se(),o=Xn(),[s,i]=h.useState(null),a=h.useRef(null);return Z(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),Z(()=>{if(!r||a.current)return;const c=e?document.getElementById(e):null;if(!c)return;const u=document.createElement("div");u.id=r,u.setAttribute(je,""),c.appendChild(u),a.current=u,i(u)},[e,r]),Z(()=>{if(n===null||!r||a.current)return;let c=n||o?.portalNode;c&&!vt(c)&&(c=c.current),c=c||document.body;let u=null;e&&(u=document.createElement("div"),u.id=e,c.appendChild(u));const f=document.createElement("div");f.id=r,f.setAttribute(je,""),c=u||c,c.appendChild(f),a.current=f,i(f)},[e,n,r,o]),s}function Yn(t){const{children:e,id:n,root:r,preserveTabOrder:o=!0}=t,s=zn({id:n,root:r}),[i,a]=h.useState(null),c=h.useRef(null),u=h.useRef(null),f=h.useRef(null),p=h.useRef(null),l=i?.modal,d=i?.open,g=!!i&&!i.modal&&i.open&&o&&!!(r||s);return h.useEffect(()=>{if(!s||!o||l)return;function m(b){s&&be(b)&&(b.type==="focusin"?Fe:Ln)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,o,l]),h.useEffect(()=>{s&&(d||Fe(s))},[d,s]),v.jsxs(ot.Provider,{value:h.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:f,afterInsideRef:p,portalNode:s,setFocusManagerState:a}),[o,s]),children:[g&&s&&v.jsx(De,{"data-type":"outside",ref:c,onFocus:m=>{if(be(m,s)){var b;(b=f.current)==null||b.focus()}else{const y=i?i.domReference:null,x=jn(y);x?.focus()}}}),g&&s&&v.jsx("span",{"aria-owns":s.id,style:Wn}),s&&mt.createPortal(e,s),g&&s&&v.jsx(De,{"data-type":"outside",ref:u,onFocus:m=>{if(be(m,s)){var b;(b=p.current)==null||b.focus()}else{const y=i?i.domReference:null,x=Dn(y);x?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const Xn=()=>h.useContext(ot),Gn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Jn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Le=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t?.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t?.outsidePress)!=null?n:!0}};function Zn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=t,{enabled:i=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:f=!1,referencePressEvent:p="pointerdown",ancestorScroll:l=!1,bubbles:d,capture:g}=e,m=rt(),b=te(typeof c=="function"?c:()=>!1),y=typeof c=="function"?b:c,x=h.useRef(!1),{escapeKey:w,outsidePress:I}=Le(d),{escapeKey:N,outsidePress:T}=Le(g),S=h.useRef(!1),R=te(E=>{var M;if(!n||!i||!a||E.key!=="Escape"||S.current)return;const C=(M=s.current.floatingContext)==null?void 0:M.nodeId,$=m?de(m.nodesRef.current,C):[];if(!w&&(E.stopPropagation(),$.length>0)){let P=!0;if($.forEach(L=>{var O;if((O=L.context)!=null&&O.open&&!L.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,Tn(E)?E.nativeEvent:E,"escape-key")}),k=te(E=>{var M;const C=()=>{var $;R(E),($=re(E))==null||$.removeEventListener("keydown",C)};(M=re(E))==null||M.addEventListener("keydown",C)}),F=te(E=>{var M;const C=s.current.insideReactTree;s.current.insideReactTree=!1;const $=x.current;if(x.current=!1,u==="click"&&$||C||typeof y=="function"&&!y(E))return;const P=re(E),L="["+Re("inert")+"]",O=ae(o.floating).querySelectorAll(L);let H=z(P)?P:null;for(;H&&!ge(H);){const j=gt(H);if(ge(j)||!z(j))break;H=j}if(O.length&&z(P)&&!kn(P)&&!we(P,o.floating)&&Array.from(O).every(j=>!we(H,j)))return;if(ht(P)&&Q){const j=ge(P),K=bt(P),W=/auto|scroll/,q=j||W.test(K.overflowX),U=j||W.test(K.overflowY),ee=q&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,B=U&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,ne=K.direction==="rtl",at=B&&(ne?E.offsetX<=P.offsetWidth-P.clientWidth:E.offsetX>P.clientWidth),lt=ee&&E.offsetY>P.clientHeight;if(at||lt)return}const G=(M=s.current.floatingContext)==null?void 0:M.nodeId,X=m&&de(m.nodesRef.current,G).some(j=>{var K;return he(E,(K=j.context)==null?void 0:K.elements.floating)});if(he(E,o.floating)||he(E,o.domReference)||X)return;const _=m?de(m.nodesRef.current,G):[];if(_.length>0){let j=!0;if(_.forEach(K=>{var W;if((W=K.context)!=null&&W.open&&!K.context.dataRef.current.__outsidePressBubbles){j=!1;return}}),!j)return}r(!1,E,"outside-press")}),D=te(E=>{var M;const C=()=>{var $;F(E),($=re(E))==null||$.removeEventListener(u,C)};(M=re(E))==null||M.addEventListener(u,C)});h.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=I;let E=-1;function M(O){r(!1,O,"ancestor-scroll")}function C(){window.clearTimeout(E),S.current=!0}function $(){E=window.setTimeout(()=>{S.current=!1},pt()?5:0)}const P=ae(o.floating);a&&(P.addEventListener("keydown",N?k:R,N),P.addEventListener("compositionstart",C),P.addEventListener("compositionend",$)),y&&P.addEventListener(u,T?D:F,T);let L=[];return l&&(z(o.domReference)&&(L=pe(o.domReference)),z(o.floating)&&(L=L.concat(pe(o.floating))),!z(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(pe(o.reference.contextElement)))),L=L.filter(O=>{var H;return O!==((H=P.defaultView)==null?void 0:H.visualViewport)}),L.forEach(O=>{O.addEventListener("scroll",M,{passive:!0})}),()=>{a&&(P.removeEventListener("keydown",N?k:R,N),P.removeEventListener("compositionstart",C),P.removeEventListener("compositionend",$)),y&&P.removeEventListener(u,T?D:F,T),L.forEach(O=>{O.removeEventListener("scroll",M)}),window.clearTimeout(E)}},[s,o,a,y,u,n,r,l,i,w,I,R,N,k,F,T,D]),h.useEffect(()=>{s.current.insideReactTree=!1},[s,y,u]);const A=h.useMemo(()=>({onKeyDown:R,...f&&{[Gn[p]]:E=>{r(!1,E.nativeEvent,"reference-press")},...p!=="click"&&{onClick(E){r(!1,E.nativeEvent,"reference-press")}}}}),[R,r,f,p]),Q=h.useMemo(()=>{function E(M){M.button===0&&(x.current=!0)}return{onKeyDown:R,onMouseDown:E,onMouseUp:E,[Jn[u]]:()=>{s.current.insideReactTree=!0}}},[R,u,s]);return h.useMemo(()=>i?{reference:A,floating:Q}:{},[i,A,Q])}function er(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=Se(),s=h.useRef({}),[i]=h.useState(()=>Bn()),a=nt()!=null,[c,u]=h.useState(r.reference),f=te((d,g,m)=>{s.current.openEvent=d?g:void 0,i.emit("openchange",{open:d,event:g,reason:m,nested:a}),n?.(d,g,m)}),p=h.useMemo(()=>({setPositionReference:u}),[]),l=h.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return h.useMemo(()=>({dataRef:s,open:e,onOpenChange:f,elements:l,events:i,floatingId:o,refs:p}),[e,f,l,i,o,p])}function tr(t){t===void 0&&(t={});const{nodeId:e}=t,n=er({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,o=r.elements,[s,i]=h.useState(null),[a,c]=h.useState(null),f=o?.domReference||s,p=h.useRef(null),l=rt();Z(()=>{f&&(p.current=f)},[f]);const d=ft({...t,elements:{...o,...a&&{reference:a}}}),g=h.useCallback(w=>{const I=z(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;c(I),d.refs.setReference(I)},[d.refs]),m=h.useCallback(w=>{(z(w)||w===null)&&(p.current=w,i(w)),(z(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!z(w))&&d.refs.setReference(w)},[d.refs]),b=h.useMemo(()=>({...d.refs,setReference:m,setPositionReference:g,domReference:p}),[d.refs,m,g]),y=h.useMemo(()=>({...d.elements,domReference:f}),[d.elements,f]),x=h.useMemo(()=>({...d,...r,refs:b,elements:y,nodeId:e}),[d,b,y,e,r]);return Z(()=>{r.dataRef.current.floatingContext=x;const w=l?.nodesRef.current.find(I=>I.id===e);w&&(w.context=x)}),h.useMemo(()=>({...d,context:x,refs:b,elements:y}),[d,b,y,x])}function ve(t,e,n){const r=new Map,o=n==="item";let s=t;if(o&&t){const{[Ne]:i,[_e]:a,...c}=t;s=c}return{...n==="floating"&&{tabIndex:-1,[On]:""},...s,...e.map(i=>{const a=i?i[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((i,a)=>(a&&Object.entries(a).forEach(c=>{let[u,f]=c;if(!(o&&[Ne,_e].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof f=="function"){var p;(p=r.get(u))==null||p.push(f),i[u]=function(){for(var l,d=arguments.length,g=new Array(d),m=0;m<d;m++)g[m]=arguments[m];return(l=r.get(u))==null?void 0:l.map(b=>b(...g)).find(b=>b!==void 0)}}}else i[u]=f}),i),{})}}function nr(t){t===void 0&&(t=[]);const e=t.map(a=>a?.reference),n=t.map(a=>a?.floating),r=t.map(a=>a?.item),o=h.useCallback(a=>ve(a,t,"reference"),e),s=h.useCallback(a=>ve(a,t,"floating"),n),i=h.useCallback(a=>ve(a,t,"item"),r);return h.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const rr=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function or(t,e){var n,r;e===void 0&&(e={});const{open:o,elements:s,floatingId:i}=t,{enabled:a=!0,role:c="dialog"}=e,u=Se(),f=((n=s.domReference)==null?void 0:n.id)||u,p=h.useMemo(()=>{var x;return((x=Pn(s.floating))==null?void 0:x.id)||i},[s.floating,i]),l=(r=rr.get(c))!=null?r:c,g=nt()!=null,m=h.useMemo(()=>l==="tooltip"||c==="label"?{["aria-"+(c==="label"?"labelledby":"describedby")]:o?p:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":l==="alertdialog"?"dialog":l,"aria-controls":o?p:void 0,...l==="listbox"&&{role:"combobox"},...l==="menu"&&{id:f},...l==="menu"&&g&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[l,p,g,o,f,c]),b=h.useMemo(()=>{const x={id:p,...l&&{role:l}};return l==="tooltip"||c==="label"?x:{...x,...l==="menu"&&{"aria-labelledby":f}}},[l,p,f,c]),y=h.useCallback(x=>{let{active:w,selected:I}=x;const N={role:"option",...w&&{id:p+"-fui-option"}};switch(c){case"select":case"combobox":return{...N,"aria-selected":I}}return{}},[p,c]);return h.useMemo(()=>a?{reference:m,floating:b,item:y}:{},[a,m,b,y])}function sr({children:t}){const{state:e,dispatch:n}=It(),{open:r,element:o}=e,s=()=>{n({type:"ON_EXIT"})},{refs:i,floatingStyles:a,context:c}=tr({placement:"bottom-start",open:r,onOpenChange:l=>{l||s()},elements:{reference:o},middleware:[xt(10),yt(),wt()],whileElementsMounted:St}),u=Zn(c,{outsidePress:l=>!(l.target instanceof Element&&l.target.closest(".ProseMirror"))}),f=or(c,{role:"listbox"}),{getFloatingProps:p}=nr([u,f]);return r?v.jsx(Yn,{children:v.jsx("div",{ref:i.setFloating,style:a,...p(),className:"z-50 w-auto min-w-[360px] max-w-[520px] rounded-lg border bg-popover p-0 text-popover-foreground shadow-md outline-hidden overflow-hidden",children:t})}):null}const ir=t=>{const e=Y.c(29),{item:n,isSelected:r,onSelect:o,isLoading:s,ref:i}=t;let a;if(e[0]!==n){const T=ue(n._meta);a=n.title||Zt(n.name,T),e[0]=n,e[1]=a}else a=e[1];const c=a,u=n.description||null,f=n.icon,p=r&&"bg-accent text-accent-foreground",l=s&&"pointer-events-none opacity-50";let d;e[2]!==p||e[3]!==l?(d=Ue("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground",p,l),e[2]=p,e[3]=l,e[4]=d):d=e[4];let g;e[5]!==f||e[6]!==c?(g=f!==void 0&&v.jsx(zt,{icon:f,name:c,size:"xs",className:"mr-2"}),e[5]=f,e[6]=c,e[7]=g):g=e[7];let m;e[8]!==c?(m=v.jsx("span",{className:"font-medium flex items-center truncate capitalize",children:c}),e[8]=c,e[9]=m):m=e[9];let b;e[10]!==s?(b=s&&v.jsx(Rt,{size:"xs"}),e[10]=s,e[11]=b):b=e[11];let y;e[12]!==m||e[13]!==b?(y=v.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m,b]}),e[12]=m,e[13]=b,e[14]=y):y=e[14];let x;e[15]!==u?(x=u&&v.jsx("div",{className:"text-xs text-muted-foreground line-clamp-1",children:u}),e[15]=u,e[16]=x):x=e[16];let w;e[17]!==y||e[18]!==x?(w=v.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[y,x]}),e[17]=y,e[18]=x,e[19]=w):w=e[19];let I;e[20]!==n.drillable?(I=n.drillable&&v.jsx("kbd",{className:"shrink-0 ml-2 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground bg-muted border border-border rounded",children:"↵"}),e[20]=n.drillable,e[21]=I):I=e[21];let N;return e[22]!==o||e[23]!==i||e[24]!==w||e[25]!==I||e[26]!==d||e[27]!==g?(N=v.jsxs("div",{ref:i,onClick:o,className:d,children:[g,w,I]}),e[22]=o,e[23]=i,e[24]=w,e[25]=I,e[26]=d,e[27]=g,e[28]=N):N=e[28],N},ar=t=>{const e=Y.c(21),{editor:n,queryKey:r,queryFn:o,onSelect:s}=t,i=le();let a;e[0]!==n||e[1]!==s||e[2]!==o||e[3]!==r?(a={editor:n,queryKey:r,queryFn:o,onSelect:s},e[0]=n,e[1]=s,e[2]=o,e[3]=r,e[4]=a):a=e[4];const{items:c,selectedIndex:u,onSelect:f,selectedItem:p}=kt(a);if(!c.length){let m;e[5]!==i?(m=i("chat.mention.noItemsFound"),e[5]=i,e[6]=m):m=e[6];let b;return e[7]!==m?(b=v.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md border shadow-md p-3 text-sm",children:m}),e[7]=m,e[8]=b):b=e[8],b}let l;e[9]===Symbol.for("react.memo_cache_sentinel")?(l={maxHeight:"min(320px, var(--radix-popover-content-available-height, 320px))"},e[9]=l):l=e[9];let d;if(e[10]!==f||e[11]!==c||e[12]!==u||e[13]!==p?.name){let m;e[15]!==f||e[16]!==u||e[17]!==p?.name?(m=(b,y)=>v.jsx(ir,{item:b,isSelected:y===u,ref:y===u?ur:void 0,onSelect:()=>f(b,y),isLoading:p?.name===b.name},`${b.kind??"item"}:${b.name}`),e[15]=f,e[16]=u,e[17]=p?.name,e[18]=m):m=e[18],d=c.map(m),e[10]=f,e[11]=c,e[12]=u,e[13]=p?.name,e[14]=d}else d=e[14];let g;return e[19]!==d?(g=v.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md overflow-y-auto",style:l,children:v.jsx("div",{className:"p-1",children:d})}),e[19]=d,e[20]=g):g=e[20],g};function lr(){const t=Y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=v.jsx("div",{className:"p-1",children:[...Array(3)].map(cr)}),t[0]=e):e=t[0],e}function cr(t,e){return v.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 animate-pulse",children:[v.jsx("div",{className:"h-4 w-24 bg-muted rounded"}),v.jsx("div",{className:"h-3 w-32 bg-muted rounded"})]},e)}function st(t){const e=Y.c(18),{editor:n,char:r,pluginKey:o,queryKey:s,queryFn:i,onSelect:a,allow:c,onOpenChange:u}=t;let f;e[0]!==c||e[1]!==r||e[2]!==n||e[3]!==u||e[4]!==o?(f={editor:n,char:r,pluginKey:o,allow:c,onOpenChange:u},e[0]=c,e[1]=r,e[2]=n,e[3]=u,e[4]=o,e[5]=f):f=e[5];const{state:p,dispatch:l}=Ct(f);let d;e[6]!==l||e[7]!==p?(d={state:p,dispatch:l},e[6]=l,e[7]=p,e[8]=d):d=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=v.jsx(lr,{}),e[9]=g):g=e[9];let m;e[10]!==n||e[11]!==a||e[12]!==i||e[13]!==s?(m=v.jsx(sr,{children:v.jsx(h.Suspense,{fallback:g,children:v.jsx(ar,{editor:n,queryKey:s,queryFn:i,onSelect:a})})}),e[10]=n,e[11]=a,e[12]=i,e[13]=s,e[14]=m):m=e[14];let b;return e[15]!==d||e[16]!==m?(b=v.jsx(Et.Provider,{value:d,children:m}),e[15]=d,e[16]=m,e[17]=b):b=e[17],b}function ur(t){t&&t.scrollIntoView({block:"center",behavior:"smooth"})}const dr=t=>{const e=Y.c(53),{editor:n,virtualMcpId:r,suggestionOpenRef:o}=t,s=le(),i=qe(),{org:a}=Be(),c=Jt();let u;e[0]!==c?(u=en(c),e[0]=c,e[1]=u):u=e[1];const f=u;let p;e[2]!==a.id||e[3]!==a.slug||e[4]!==r?(p={connectionId:r,orgId:a.id,orgSlug:a.slug},e[2]=a.id,e[3]=a.slug,e[4]=r,e[5]=p):p=e[5];const l=He(p);let d;e[6]!==a.id||e[7]!==r?(d=ce.virtualMcpResources(r,a.id),e[6]=a.id,e[7]=r,e[8]=d):d=e[8];const g=d,[m,b]=h.useState("categories");let y;e[9]!==m?(y=()=>m,e[9]=m,e[10]=y):y=e[10];const x=h.useEffectEvent(y),w=h.useRef(null),I=h.useRef(!1),N=r??"default";let T;e[11]!==m||e[12]!==a.id||e[13]!==N?(T=["at-mention",a.id,N,m],e[11]=m,e[12]=a.id,e[13]=N,e[14]=T):T=e[14];const S=T;let R;e[15]!==s?(R=s("chat.mentionAt.agentsTitle"),e[15]=s,e[16]=R):R=e[16];let k;e[17]!==s?(k=s("chat.mentionAt.agentsDescription"),e[17]=s,e[18]=k):k=e[18];let F;e[19]!==R||e[20]!==k?(F={name:"agents",title:R,description:k,kind:"category",drillable:!0},e[19]=R,e[20]=k,e[21]=F):F=e[21];let D;e[22]!==s?(D=s("chat.mentionAt.resourcesTitle"),e[22]=s,e[23]=D):D=e[23];let A;e[24]!==s?(A=s("chat.mentionAt.resourcesDescription"),e[24]=s,e[25]=A):A=e[25];let Q;e[26]!==D||e[27]!==A?(Q={name:"resources",title:D,description:A,kind:"category",drillable:!0},e[26]=D,e[27]=A,e[28]=Q):Q=e[28];let E;e[29]!==Q||e[30]!==F?(E=[F,Q],e[29]=Q,e[30]=F,e[31]=E):E=e[31];const M=E;let C;e[32]!==l||e[33]!==n||e[34]!==s?(C=async X=>{const{item:_,range:j}=X;if(J("chat_picker_item_selected",{picker:"@",item_kind:_.kind,item_name:_.name}),_.kind!=="category"&&(I.current=!0),_.kind==="category")return b(_.name==="agents"?"agents":"resources"),!1;if(_.kind==="agent"&&_.agentId){se(n,j,{id:_.agentId,name:_.name,metadata:{agentId:_.agentId,title:_.name},char:"@"}),b("categories");return}if(_.kind==="resource"&&_.uri&&l){try{const K=await Qe(l,_.uri);se(n,j,{id:_.uri,name:_.uri,metadata:K.contents,char:"@"})}catch(K){console.error("[at-mention] Failed to fetch resource:",K),V.error(s("chat.mentionAt.failedToLoadResource"))}b("categories");return}},e[32]=l,e[33]=n,e[34]=s,e[35]=C):C=e[35];const $=C;let P;e[36]!==c||e[37]!==M||e[38]!==l||e[39]!==f||e[40]!==x||e[41]!==i||e[42]!==g||e[43]!==r?(P=async X=>{const{query:_}=X,j=x();if(j==="categories"){if(!_.trim())return M;const q=_.toLowerCase(),U=c.filter(B=>B.status==="active"&&(!B.id||!Ce(B.id))&&!f.has(B.id)&&B.id!==r&&(B.title.toLowerCase().includes(q)||B.description?.toLowerCase().includes(q))).map(fr),ee=await(async()=>{if(!l)return[];let B=i.getQueryData(g);return B||(B=await i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4})),(B?.resources??[]).filter(ne=>ne.uri.toLowerCase().includes(q)||ne.name?.toLowerCase().includes(q)||ne.description?.toLowerCase().includes(q)).map(mr)})();return[...U,...ee]}if(j==="agents"){let q=c.filter(U=>U.status==="active"&&(!U.id||!Ce(U.id))&&!f.has(U.id)&&U.id!==r);if(_.trim()){const U=_.toLowerCase();q=q.filter(ee=>ee.title.toLowerCase().includes(U)||ee.description?.toLowerCase().includes(U))}return q.map(pr)}if(!l)return[];let K=i.getQueryData(g);K?i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4}).catch(gr):K=await i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4});let W=K?.resources??[];if(_.trim()){const q=_.toLowerCase();W=W.filter(U=>U.uri.toLowerCase().includes(q)||U.name?.toLowerCase().includes(q)||U.description?.toLowerCase().includes(q))}return W.map(hr)},e[36]=c,e[37]=M,e[38]=l,e[39]=f,e[40]=x,e[41]=i,e[42]=g,e[43]=r,e[44]=P):P=e[44];const L=P;let O;e[45]!==o?(O=X=>{if(o&&(o.current=X),X)w.current=Date.now(),I.current=!1,J("chat_picker_opened",{picker:"@"});else{const _=w.current;J("chat_picker_closed",{picker:"@",outcome:I.current?"selected":"dismissed",duration_ms:_?Date.now()-_:null}),w.current=null,b("categories")}},e[45]=o,e[46]=O):O=e[46];const H=O;let G;return e[47]!==n||e[48]!==L||e[49]!==$||e[50]!==H||e[51]!==S?(G=v.jsx(st,{editor:n,char:"@",pluginKey:"atDropdownMenu",queryKey:S,queryFn:L,onSelect:$,onOpenChange:H}),e[47]=n,e[48]=L,e[49]=$,e[50]=H,e[51]=S,e[52]=G):G=e[52],G};function fr(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function mr(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}function pr(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function gr(){}function hr(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function Oe(t,e,n,r,o,s,i){try{const a=await We(n,r,s);se(t,e,{id:r,name:Ve(r,o),metadata:a.messages,char:"/",kind:"prompt",args:s})}catch(a){console.error("[slash] Failed to fetch prompt:",a),V.error(i.t("chat.mentionSlash.failedLoadPrompt"))}}async function br(t,e,n,r,o){try{const s=await Qe(n,r);se(t,e,{id:r,name:r,metadata:s.contents,char:"/",kind:"resource"})}catch(s){console.error("[slash] Failed to fetch resource:",s),V.error(o.t("chat.mentionSlash.failedLoadResource"))}}async function vr(t,e,n,r,o){try{const{files:s,omittedPaths:i}=await tn(n,r.volume,r.path),a={sandboxPath:r.sandboxPath,files:s,omittedPaths:i};se(t,e,{id:r.id,name:r.name,metadata:a,char:"/",kind:"skill"})}catch(s){console.error("[slash] Failed to fetch skill:",s),V.error(o.t("chat.mentionSlash.failedLoadSkill"))}}const xr=({editor:t,virtualMcpId:e,suggestionOpenRef:n})=>{const r=le(),o=qe(),{org:s}=Be(),i=He({connectionId:e,orgId:s.id,orgSlug:s.slug}),a=ce.virtualMcpPrompts(e,s.id),c=ce.virtualMcpResources(e,s.id),u=ce.slashSkills(s.id),f=["slash-mention",s.id,e??"default"],[p,l]=h.useState(null),[d,g]=h.useState(null),m=_t(t);m&&(m.onEditChip=async S=>{if(i)try{const k=(await $e(o,a,i)).find(F=>F.name===S.promptId);if(!k?.arguments||k.arguments.length===0)return;g({...S,prompt:k})}catch(R){console.error("[slash] Failed to load prompt for editing:",R),V.error(r("chat.mentionSlash.failedLoadPrompt"))}});const b=h.useRef(null),y=h.useRef(!1),x=async({item:S,range:R})=>{if(J("chat_picker_item_selected",{picker:"/",item_kind:S.kind,item_name:S.name}),y.current=!0,!!i)if(S.kind==="prompt"){if(S.arguments&&S.arguments.length>0){l({range:R,item:S});return}const k=ue(S._meta);await Oe(t,R,i,S.name,k,void 0,{t:r})}else S.kind==="skill"?S.skill&&await vr(t,R,s.slug,S.skill,{t:r}):S.uri&&await br(t,R,i,S.uri,{t:r})},w=async S=>{if(!p||!i)return;const{range:R,item:k}=p,F=ue(k._meta);await Oe(t,R,i,k.name,F,S,{t:r}),l(null)},I=async S=>{if(!(!d||!i)){if(!At(t,d.pos,d.promptId)){V.error(r("chat.mentionSlash.failedUpdatePrompt")),g(null);return}try{const R=await We(i,d.promptId,S),k=ue(d.prompt._meta);t.chain().focus().setNodeSelection(d.pos).deleteSelection().insertContentAt(d.pos,Mt({id:d.promptId,name:Ve(d.promptId,k),metadata:R.messages,char:"/",kind:"prompt",args:S})).run(),J("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:d.promptId})}catch(R){console.error("[slash] Failed to update prompt:",R),V.error(r("chat.mentionSlash.failedUpdatePrompt"))}g(null)}},N=async S=>{const{query:R}=S;if(!i)return[];const[k,F,D]=await Promise.all([$e(o,a,i),wr(o,c,i),yr(o,u,s.slug)]),A=R.trim().toLowerCase(),Q=(k??[]).filter(C=>!A||C.name.toLowerCase().includes(A)||C.title?.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name,title:C.title,description:C.description,kind:"prompt",arguments:C.arguments,_meta:C._meta})),E=(F??[]).filter(C=>!A||C.uri.toLowerCase().includes(A)||C.name?.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name??C.uri,title:C.name,description:C.description,kind:"resource",uri:C.uri})),M=(D??[]).filter(C=>!A||C.name.toLowerCase().includes(A)||C.id.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name,title:C.name,description:C.description??void 0,kind:"skill",skill:C}));return[...Q,...E,...M]},T=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return v.jsxs(v.Fragment,{children:[v.jsx(st,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:f,queryFn:N,onSelect:x,onOpenChange:S=>{if(n&&(n.current=S),S)b.current=Date.now(),y.current=!1,J("chat_picker_opened",{picker:"/"});else{const R=b.current;J("chat_picker_closed",{picker:"/",outcome:y.current?"selected":"dismissed",duration_ms:R?Date.now()-R:null}),b.current=null}}}),v.jsx(Ee,{prompt:T,setPrompt:()=>l(null),onSubmit:w}),v.jsx(Ee,{prompt:d?.prompt??null,setPrompt:()=>g(null),onSubmit:I,defaultValues:d?.args},d?`edit-${d.promptId}-${d.pos}`:"edit-idle")]})};async function $e(t,e,n){let r=t.getQueryData(e);return r?t.fetchQuery({queryKey:e,queryFn:()=>Ie(n),staleTime:6e4}).catch(()=>{}):r=await t.fetchQuery({queryKey:e,queryFn:()=>Ie(n),staleTime:6e4}),r?.prompts??[]}async function yr(t,e,n){const r=t.getQueryData(e),o=()=>t.fetchQuery({queryKey:e,queryFn:()=>nn(n),staleTime:6e4});return r?(o().catch(()=>{}),r):o().catch(()=>[])}async function wr(t,e,n){let r=t.getQueryData(e);return r?t.fetchQuery({queryKey:e,queryFn:()=>oe(n),staleTime:6e4}).catch(()=>{}):r=await t.fetchQuery({queryKey:e,queryFn:()=>oe(n),staleTime:6e4}),r?.resources??[]}const it="Ask anything, / for prompts & skills, @ for agents & resources...";function Sr(t){return[Kt.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),Pt.configure({placeholder:()=>t.current??it,showOnlyWhenEditable:!1}),Ot,$t]}function Or({tiptapDoc:t,setTiptapDoc:e,disabled:n=!1,enterToSubmit:r=!1,placeholder:o,onSubmit:s,suggestionOpenRef:i,children:a}){const c=h.useRef(s),u=h.useRef(e),f=h.useRef(r),p=h.useRef(o),l=Dt({extensions:Sr(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":o??it,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[15px] p-[18px]"},handleKeyDown:(d,g)=>g.key==="Enter"&&!g.shiftKey&&f.current&&!i?.current?(g.preventDefault(),c.current?.(),!0):!1},onUpdate:({editor:d})=>{u.current(d?.getJSON())}});return h.useEffect(()=>{l?.setEditable(!n)},[l,n]),h.useEffect(()=>{c.current=s},[s]),h.useEffect(()=>{u.current=e},[e]),h.useEffect(()=>{f.current=r},[r]),h.useEffect(()=>{p.current=o},[o]),h.useEffect(()=>{if(!l||l.isDestroyed)return;const d=JSON.stringify(l.getJSON()),g=JSON.stringify(t||{type:"doc",content:[]});d!==g&&l.commands.setContent(t||{type:"doc",content:[]})},[l,t]),v.jsx(jt.Provider,{value:{editor:l},children:a})}function $r(t){const e=Y.c(29),{disabled:n,virtualMcpId:r,showFileUploader:o,selectedModel:s,onUnsupportedFile:i,suggestionOpenRef:a,ref:c,className:u}=t,f=n===void 0?!1:n,p=o===void 0?!1:o,{editor:l}=Lt();let d,g;if(e[0]!==l?(d=()=>({focus:()=>{l?.commands.focus()},clear:()=>{l?.commands.clearContent(!0)},appendText:k=>{if(!l)return;const F=l.state.doc.textContent.trim()==="";l.commands.focus("end"),F||l.commands.insertContent(" "),l.commands.insertContent(k)},syncVoiceText:(k,F)=>{if(l&&(l.commands.setContent(k||{type:"doc",content:[]}),F)){l.commands.focus("end");const D=l.state.doc.textContent.trim().length>0;l.commands.insertContent({type:"text",text:D?" "+F:F})}},restoreContent:k=>{l&&l.commands.setContent(k||{type:"doc",content:[]})}}),g=[l],e[0]=l,e[1]=d,e[2]=g):(d=e[1],g=e[2]),h.useImperativeHandle(c??null,d,g),!l)return null;const m=f&&"cursor-not-allowed opacity-70",b=f&&"[&_.ProseMirror]:cursor-not-allowed";let y;e[3]!==u||e[4]!==m||e[5]!==b?(y=Ue("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",u,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",m,b),e[3]=u,e[4]=m,e[5]=b,e[6]=y):y=e[6];let x;e[7]!==l||e[8]!==y?(x=v.jsx(Ut,{editor:l,className:y}),e[7]=l,e[8]=y,e[9]=x):x=e[9];const w=r??null;let I;e[10]!==l||e[11]!==a||e[12]!==w?(I=v.jsx(h.Suspense,{fallback:null,children:v.jsx(xr,{editor:l,virtualMcpId:w,suggestionOpenRef:a})}),e[10]=l,e[11]=a,e[12]=w,e[13]=I):I=e[13];const N=r??null;let T;e[14]!==l||e[15]!==a||e[16]!==N?(T=v.jsx(h.Suspense,{fallback:null,children:v.jsx(dr,{editor:l,virtualMcpId:N,suggestionOpenRef:a})}),e[14]=l,e[15]=a,e[16]=N,e[17]=T):T=e[17];let S;e[18]!==f||e[19]!==l||e[20]!==i||e[21]!==s||e[22]!==p?(S=p&&s&&!f?v.jsx(on,{editor:l,selectedModel:s,onUnsupportedFile:i}):null,e[18]=f,e[19]=l,e[20]=i,e[21]=s,e[22]=p,e[23]=S):S=e[23];let R;return e[24]!==I||e[25]!==T||e[26]!==S||e[27]!==x?(R=v.jsxs(v.Fragment,{children:[x,I,T,S]}),e[24]=I,e[25]=T,e[26]=S,e[27]=x,e[28]=R):R=e[28],R}export{Or as T,jr as U,$r as a,rn as p,Lr as u};
|
|
1
|
+
import{c as Y,r as h,b as le,j as v,t as V,F as ct,B as ut,b7 as dt,b8 as Ke,b9 as ft,ba as z,bb as pe,ar as mt,bc as pt,bd as ge,be as gt,bf as ht,bg as bt,bh as vt,bi as xt,bj as yt,bk as wt,bl as St,l as Ue,h as Rt,n as qe,I as Be,K as ce,o as J,bm as Qe,bn as Ce,bo as oe}from"./index-B3yBTWEk.js";import{u as Ct,S as Et,a as It,b as kt,s as Pt}from"./hooks-BhviOOpn.js";import{h as Tt,j as Ft,k as Nt,i as se,l as _t,P as Ee,n as At,d as Mt,u as Dt,o as jt,f as Lt,p as Ot,F as $t,s as Kt,b as Ut}from"./usage-stats-BNse37Wk.js";import{d as qt,h as Bt,c as Qt,b as Ht,D as Vt}from"./dialog-otnvxVN0.js";import{aj as Wt,A as zt}from"./agent-icon-DrlilhFJ.js";import"./chat-context-CXknhaDs.js";import{m as Yt,i as Xt,b as Gt}from"./index-DlQKfvnq.js";import{u as He}from"./use-mcp-client-DsJzBus3.js";import{u as Jt}from"./use-virtual-mcp-Bk09OpEg.js";import{g as ue,d as Zt,s as Ve}from"./tool-namespace-BVMQcKlk.js";import{g as en}from"./use-project-scope-B2cuvtTy.js";import{l as Ie,g as We}from"./use-mcp-prompts-i0LZ2nQA.js";import{f as tn,a as nn}from"./use-org-fs-BEoPvlnI.js";async function rn(t,e,n,r,o,s){if(!Yt(e)){V.error("Selected model does not support file uploads");return}const i=n.type||"application/octet-stream";if(!Xt(i,e)){const c=Gt(e).parts.map(f=>s(f)).join(", "),u=e?.title??"This model";o?o({fileName:n.name,modelName:u,accepted:c}):V.error(`"${n.name}" can't be attached`,{description:`${u} accepts ${c}.`});return}const a=10*1024*1024;if(n.size>a){V.error(`File "${n.name}" exceeds 10MB limit`);return}try{const c=new FileReader,u=new Promise((l,d)=>{c.onload=()=>{const g=c.result;if(typeof g!="string"){d(new Error("Failed to read file as data URL"));return}const m=g.includes(",")?g.split(",")[1]??g:g;l(m)},c.onerror=d});c.readAsDataURL(n);const f=await u,p={id:crypto.randomUUID(),name:n.name,mimeType:n.type||"application/octet-stream",size:n.size,data:f};Tt(t,{from:r,to:r},p)}catch(c){console.error("Failed to process file:",c),V.error(`Failed to load file "${n.name}"`)}}function on(t){const e=Y.c(9),{editor:n,selectedModel:r,onUnsupportedFile:o}=t,s=le(),i=h.useRef(an);let a,c;e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==s?(a=()=>{i.current=async(p,l)=>{await rn(n,r,p,l,o,s)}},c=[n,r,o,s],e[0]=n,e[1]=o,e[2]=r,e[3]=s,e[4]=a,e[5]=c):(a=e[4],c=e[5]),h.useEffect(a,c);let u,f;return e[6]!==n?(u=()=>{if(n?.isDestroyed)return;const p=new Ft("fileDropHandler");n.state.plugins.find(g=>g.spec.key===p)&&n.unregisterPlugin(p);const d=new Nt({key:p,props:{handleDrop:(g,m,b,y)=>{if(y)return!1;const x=m.dataTransfer?.files;if(!x||x.length===0)return!1;m.preventDefault();const w=g.posAtCoords({left:m.clientX,top:m.clientY});if(!w)return!1;const I=Array.from(x);return(async()=>{let N=w.pos;for(const T of I)await i.current?.(T,N),N=g.state.selection.to})(),!0},handlePaste:(g,m)=>{const b=m.clipboardData?.items;if(!b)return!1;const y=Array.from(b).filter(sn);return y.length===0?!1:(m.preventDefault(),(async()=>{let x=g.state.selection.from;for(const w of y){const I=w.getAsFile();I&&(await i.current?.(I,x),x=g.state.selection.to)}})(),!0)}}});return n.registerPlugin(d),()=>{n?.isDestroyed||n.unregisterPlugin(p)}},f=[n],e[6]=n,e[7]=u,e[8]=f):(u=e[7],f=e[8]),h.useEffect(u,f),null}function sn(t){return t.kind==="file"}function an(){return Promise.resolve()}function jr(t){const e=Y.c(43),{info:n,onClose:r}=t,o=le(),s=n!==null;let i;e[0]!==r?(i=A=>!A&&r(),e[0]=r,e[1]=i):i=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=a):a=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=v.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:a.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=c):c=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=v.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:v.jsx(ct,{size:18})}),e[4]=u):u=e[4];let f;e[5]!==o?(f=o("chat.uploader.fileTypeNotSupported"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=v.jsx(qt,{className:"text-xl font-semibold tracking-tight",children:f}),e[7]=f,e[8]=p):p=e[8];const l=n?.fileName;let d;e[9]!==l?(d=v.jsxs("span",{className:"font-medium text-foreground",children:["“",l,"”"]}),e[9]=l,e[10]=d):d=e[10];let g;e[11]!==o?(g=o("chat.uploader.cantAttachToChat"),e[11]=o,e[12]=g):g=e[12];let m;e[13]!==g||e[14]!==d?(m=v.jsxs(Bt,{className:"mt-1.5 text-sm leading-relaxed",children:[d," ",g]}),e[13]=g,e[14]=d,e[15]=m):m=e[15];let b;e[16]!==m||e[17]!==p?(b=v.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[c,v.jsxs(Qt,{className:"relative gap-4",children:[u,v.jsxs("div",{children:[p,m]})]})]}),e[16]=m,e[17]=p,e[18]=b):b=e[18];const y=n?.modelName??"";let x;e[19]!==o||e[20]!==y?(x=o("chat.uploader.accepts",{modelName:y}),e[19]=o,e[20]=y,e[21]=x):x=e[21];let w;e[22]!==x?(w=v.jsx("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground mb-2",children:x}),e[22]=x,e[23]=w):w=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=v.jsx(Wt,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const N=n?.accepted;let T;e[25]!==N?(T=v.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,v.jsx("span",{className:"capitalize",children:N})]}),e[25]=N,e[26]=T):T=e[26];let S;e[27]!==w||e[28]!==T?(S=v.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:v.jsxs("div",{className:"rounded-xl border border-border p-4",children:[w,T]})}),e[27]=w,e[28]=T,e[29]=S):S=e[29];let R;e[30]!==o?(R=o("chat.uploader.gotIt"),e[30]=o,e[31]=R):R=e[31];let k;e[32]!==r||e[33]!==R?(k=v.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:v.jsx(ut,{onClick:r,children:R})}),e[32]=r,e[33]=R,e[34]=k):k=e[34];let F;e[35]!==b||e[36]!==S||e[37]!==k?(F=v.jsxs(Ht,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:ln,children:[b,S,k]}),e[35]=b,e[36]=S,e[37]=k,e[38]=F):F=e[38];let D;return e[39]!==s||e[40]!==i||e[41]!==F?(D=v.jsx(Vt,{open:s,onOpenChange:i,children:F}),e[39]=s,e[40]=i,e[41]=F,e[42]=D):D=e[42],D}function ln(t){return t.preventDefault()}function Lr(){const t=Y.c(3),[e,n]=h.useState(null);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>n(null),t[0]=r):r=t[0];let o;return t[1]!==e?(o={unsupportedFile:e,onUnsupportedFile:n,clearUnsupportedFile:r},t[1]=e,t[2]=o):o=t[2],o}var cn=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],xe=cn.join(","),ze=typeof Element>"u",ie=ze?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fe=!ze&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},me=function(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=o===""||o==="true",i=s||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):me(e.parentNode));return i},un=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},dn=function(e,n,r){if(me(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(xe));return n&&ie.call(e,xe)&&o.unshift(e),o=o.filter(r),o},ye=function(e,n,r){for(var o=[],s=Array.from(e);s.length;){var i=s.shift();if(!me(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),c=a.length?a:i.children,u=ye(c,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:i,candidates:u})}else{var f=ie.call(i,xe);f&&r.filter(i)&&(n||!e.includes(i))&&o.push(i);var p=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),l=!me(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(p&&l){var d=ye(p===!0?i.children:p.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:i,candidates:d})}else s.unshift.apply(s,i.children)}}return o},Ye=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Xe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||un(e))&&!Ye(e)?0:e.tabIndex},fn=function(e,n){var r=Xe(e);return r<0&&n&&!Ye(e)?0:r},mn=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ge=function(e){return e.tagName==="INPUT"},pn=function(e){return Ge(e)&&e.type==="hidden"},gn=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},hn=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},bn=function(e){if(!e.name)return!0;var n=e.form||fe(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=hn(o,e.form);return!s||s===e},vn=function(e){return Ge(e)&&e.type==="radio"},xn=function(e){return vn(e)&&!bn(e)},yn=function(e){var n,r=e&&fe(e),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==e){var i,a,c;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));!s&&o;){var u,f,p;r=fe(o),o=(u=r)===null||u===void 0?void 0:u.host,s=!!((f=o)!==null&&f!==void 0&&(p=f.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return s},ke=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},wn=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var i=ie.call(e,"details>summary:first-of-type"),a=i?e.parentElement:e;if(ie.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var c=e;e;){var u=e.parentElement,f=fe(e);if(u&&!u.shadowRoot&&o(u)===!0)return ke(e);e.assignedSlot?e=e.assignedSlot:!u&&f!==e.ownerDocument?e=f.host:e=u}e=c}if(yn(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ke(e);return!1},Sn=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ie.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},Rn=function(e,n){return!(n.disabled||pn(n)||wn(n,e)||gn(n)||Sn(n))},Pe=function(e,n){return!(xn(n)||Xe(n)<0||!Rn(e,n))},Cn=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Je=function(e){var n=[],r=[];return e.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,c=fn(a,i),u=i?Je(o.candidates):a;c===0?i?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:c,item:o,isScope:i,content:u})}),r.sort(mn).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Ze=function(e,n){n=n||{};var r;return n.getShadowRoot?r=ye([e],n.includeContainer,{filter:Pe.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Cn}):r=dn(e,n.includeContainer,Pe.bind(null,n)),Je(r)};function En(){return/apple/i.test(navigator.vendor)}const Te="data-floating-ui-focusable";function In(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function we(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&dt(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function re(t){return"composedPath"in t?t.composedPath()[0]:t.target}function he(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function kn(t){return t.matches("html,body")}function ae(t){return t?.ownerDocument||document}function Pn(t){return t?t.hasAttribute(Te)?t:t.querySelector("["+Te+"]")||t:null}function de(t,e,n){return n===void 0&&(n=!0),t.filter(o=>{var s;return o.parentId===e&&(!n||((s=o.context)==null?void 0:s.open))}).flatMap(o=>[o,...de(t,o.id,n)])}function Tn(t){return"nativeEvent"in t}var Fn=typeof document<"u",Nn=function(){},Z=Fn?h.useLayoutEffect:Nn;const _n={...Ke},An=_n.useInsertionEffect,Mn=An||(t=>t());function te(t){const e=h.useRef(()=>{});return Mn(()=>{e.current=t}),h.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}const et=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function tt(t,e){const n=Ze(t,et()),r=n.length;if(r===0)return;const o=In(ae(t)),s=n.indexOf(o),i=s===-1?e===1?0:r-1:s+e;return n[i]}function Dn(t){return tt(ae(t).body,1)||t}function jn(t){return tt(ae(t).body,-1)||t}function be(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!we(n,r)}function Ln(t){Ze(t,et()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Fe(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const On="data-floating-ui-focusable",Ne="active",_e="selected",$n={...Ke};let Ae=!1,Kn=0;const Me=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Kn++;function Un(){const[t,e]=h.useState(()=>Ae?Me():void 0);return Z(()=>{t==null&&e(Me())},[]),h.useEffect(()=>{Ae=!0},[]),t}const qn=$n.useId,Se=qn||Un;function Bn(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const Qn=h.createContext(null),Hn=h.createContext(null),nt=()=>{var t;return((t=h.useContext(Qn))==null?void 0:t.id)||null},rt=()=>h.useContext(Hn);function Re(t){return"data-floating-ui-"+t}const Vn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},De=h.forwardRef(function(e,n){const[r,o]=h.useState();Z(()=>{En()&&o("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Re("focus-guard")]:"",style:Vn};return v.jsx("span",{...e,...s})}),Wn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},ot=h.createContext(null),je=Re("portal");function zn(t){t===void 0&&(t={});const{id:e,root:n}=t,r=Se(),o=Xn(),[s,i]=h.useState(null),a=h.useRef(null);return Z(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),Z(()=>{if(!r||a.current)return;const c=e?document.getElementById(e):null;if(!c)return;const u=document.createElement("div");u.id=r,u.setAttribute(je,""),c.appendChild(u),a.current=u,i(u)},[e,r]),Z(()=>{if(n===null||!r||a.current)return;let c=n||o?.portalNode;c&&!vt(c)&&(c=c.current),c=c||document.body;let u=null;e&&(u=document.createElement("div"),u.id=e,c.appendChild(u));const f=document.createElement("div");f.id=r,f.setAttribute(je,""),c=u||c,c.appendChild(f),a.current=f,i(f)},[e,n,r,o]),s}function Yn(t){const{children:e,id:n,root:r,preserveTabOrder:o=!0}=t,s=zn({id:n,root:r}),[i,a]=h.useState(null),c=h.useRef(null),u=h.useRef(null),f=h.useRef(null),p=h.useRef(null),l=i?.modal,d=i?.open,g=!!i&&!i.modal&&i.open&&o&&!!(r||s);return h.useEffect(()=>{if(!s||!o||l)return;function m(b){s&&be(b)&&(b.type==="focusin"?Fe:Ln)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,o,l]),h.useEffect(()=>{s&&(d||Fe(s))},[d,s]),v.jsxs(ot.Provider,{value:h.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:f,afterInsideRef:p,portalNode:s,setFocusManagerState:a}),[o,s]),children:[g&&s&&v.jsx(De,{"data-type":"outside",ref:c,onFocus:m=>{if(be(m,s)){var b;(b=f.current)==null||b.focus()}else{const y=i?i.domReference:null,x=jn(y);x?.focus()}}}),g&&s&&v.jsx("span",{"aria-owns":s.id,style:Wn}),s&&mt.createPortal(e,s),g&&s&&v.jsx(De,{"data-type":"outside",ref:u,onFocus:m=>{if(be(m,s)){var b;(b=p.current)==null||b.focus()}else{const y=i?i.domReference:null,x=Dn(y);x?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const Xn=()=>h.useContext(ot),Gn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Jn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Le=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t?.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t?.outsidePress)!=null?n:!0}};function Zn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=t,{enabled:i=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:f=!1,referencePressEvent:p="pointerdown",ancestorScroll:l=!1,bubbles:d,capture:g}=e,m=rt(),b=te(typeof c=="function"?c:()=>!1),y=typeof c=="function"?b:c,x=h.useRef(!1),{escapeKey:w,outsidePress:I}=Le(d),{escapeKey:N,outsidePress:T}=Le(g),S=h.useRef(!1),R=te(E=>{var M;if(!n||!i||!a||E.key!=="Escape"||S.current)return;const C=(M=s.current.floatingContext)==null?void 0:M.nodeId,$=m?de(m.nodesRef.current,C):[];if(!w&&(E.stopPropagation(),$.length>0)){let P=!0;if($.forEach(L=>{var O;if((O=L.context)!=null&&O.open&&!L.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,Tn(E)?E.nativeEvent:E,"escape-key")}),k=te(E=>{var M;const C=()=>{var $;R(E),($=re(E))==null||$.removeEventListener("keydown",C)};(M=re(E))==null||M.addEventListener("keydown",C)}),F=te(E=>{var M;const C=s.current.insideReactTree;s.current.insideReactTree=!1;const $=x.current;if(x.current=!1,u==="click"&&$||C||typeof y=="function"&&!y(E))return;const P=re(E),L="["+Re("inert")+"]",O=ae(o.floating).querySelectorAll(L);let H=z(P)?P:null;for(;H&&!ge(H);){const j=gt(H);if(ge(j)||!z(j))break;H=j}if(O.length&&z(P)&&!kn(P)&&!we(P,o.floating)&&Array.from(O).every(j=>!we(H,j)))return;if(ht(P)&&Q){const j=ge(P),K=bt(P),W=/auto|scroll/,q=j||W.test(K.overflowX),U=j||W.test(K.overflowY),ee=q&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,B=U&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,ne=K.direction==="rtl",at=B&&(ne?E.offsetX<=P.offsetWidth-P.clientWidth:E.offsetX>P.clientWidth),lt=ee&&E.offsetY>P.clientHeight;if(at||lt)return}const G=(M=s.current.floatingContext)==null?void 0:M.nodeId,X=m&&de(m.nodesRef.current,G).some(j=>{var K;return he(E,(K=j.context)==null?void 0:K.elements.floating)});if(he(E,o.floating)||he(E,o.domReference)||X)return;const _=m?de(m.nodesRef.current,G):[];if(_.length>0){let j=!0;if(_.forEach(K=>{var W;if((W=K.context)!=null&&W.open&&!K.context.dataRef.current.__outsidePressBubbles){j=!1;return}}),!j)return}r(!1,E,"outside-press")}),D=te(E=>{var M;const C=()=>{var $;F(E),($=re(E))==null||$.removeEventListener(u,C)};(M=re(E))==null||M.addEventListener(u,C)});h.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=I;let E=-1;function M(O){r(!1,O,"ancestor-scroll")}function C(){window.clearTimeout(E),S.current=!0}function $(){E=window.setTimeout(()=>{S.current=!1},pt()?5:0)}const P=ae(o.floating);a&&(P.addEventListener("keydown",N?k:R,N),P.addEventListener("compositionstart",C),P.addEventListener("compositionend",$)),y&&P.addEventListener(u,T?D:F,T);let L=[];return l&&(z(o.domReference)&&(L=pe(o.domReference)),z(o.floating)&&(L=L.concat(pe(o.floating))),!z(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(pe(o.reference.contextElement)))),L=L.filter(O=>{var H;return O!==((H=P.defaultView)==null?void 0:H.visualViewport)}),L.forEach(O=>{O.addEventListener("scroll",M,{passive:!0})}),()=>{a&&(P.removeEventListener("keydown",N?k:R,N),P.removeEventListener("compositionstart",C),P.removeEventListener("compositionend",$)),y&&P.removeEventListener(u,T?D:F,T),L.forEach(O=>{O.removeEventListener("scroll",M)}),window.clearTimeout(E)}},[s,o,a,y,u,n,r,l,i,w,I,R,N,k,F,T,D]),h.useEffect(()=>{s.current.insideReactTree=!1},[s,y,u]);const A=h.useMemo(()=>({onKeyDown:R,...f&&{[Gn[p]]:E=>{r(!1,E.nativeEvent,"reference-press")},...p!=="click"&&{onClick(E){r(!1,E.nativeEvent,"reference-press")}}}}),[R,r,f,p]),Q=h.useMemo(()=>{function E(M){M.button===0&&(x.current=!0)}return{onKeyDown:R,onMouseDown:E,onMouseUp:E,[Jn[u]]:()=>{s.current.insideReactTree=!0}}},[R,u,s]);return h.useMemo(()=>i?{reference:A,floating:Q}:{},[i,A,Q])}function er(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=Se(),s=h.useRef({}),[i]=h.useState(()=>Bn()),a=nt()!=null,[c,u]=h.useState(r.reference),f=te((d,g,m)=>{s.current.openEvent=d?g:void 0,i.emit("openchange",{open:d,event:g,reason:m,nested:a}),n?.(d,g,m)}),p=h.useMemo(()=>({setPositionReference:u}),[]),l=h.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return h.useMemo(()=>({dataRef:s,open:e,onOpenChange:f,elements:l,events:i,floatingId:o,refs:p}),[e,f,l,i,o,p])}function tr(t){t===void 0&&(t={});const{nodeId:e}=t,n=er({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,o=r.elements,[s,i]=h.useState(null),[a,c]=h.useState(null),f=o?.domReference||s,p=h.useRef(null),l=rt();Z(()=>{f&&(p.current=f)},[f]);const d=ft({...t,elements:{...o,...a&&{reference:a}}}),g=h.useCallback(w=>{const I=z(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;c(I),d.refs.setReference(I)},[d.refs]),m=h.useCallback(w=>{(z(w)||w===null)&&(p.current=w,i(w)),(z(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!z(w))&&d.refs.setReference(w)},[d.refs]),b=h.useMemo(()=>({...d.refs,setReference:m,setPositionReference:g,domReference:p}),[d.refs,m,g]),y=h.useMemo(()=>({...d.elements,domReference:f}),[d.elements,f]),x=h.useMemo(()=>({...d,...r,refs:b,elements:y,nodeId:e}),[d,b,y,e,r]);return Z(()=>{r.dataRef.current.floatingContext=x;const w=l?.nodesRef.current.find(I=>I.id===e);w&&(w.context=x)}),h.useMemo(()=>({...d,context:x,refs:b,elements:y}),[d,b,y,x])}function ve(t,e,n){const r=new Map,o=n==="item";let s=t;if(o&&t){const{[Ne]:i,[_e]:a,...c}=t;s=c}return{...n==="floating"&&{tabIndex:-1,[On]:""},...s,...e.map(i=>{const a=i?i[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((i,a)=>(a&&Object.entries(a).forEach(c=>{let[u,f]=c;if(!(o&&[Ne,_e].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof f=="function"){var p;(p=r.get(u))==null||p.push(f),i[u]=function(){for(var l,d=arguments.length,g=new Array(d),m=0;m<d;m++)g[m]=arguments[m];return(l=r.get(u))==null?void 0:l.map(b=>b(...g)).find(b=>b!==void 0)}}}else i[u]=f}),i),{})}}function nr(t){t===void 0&&(t=[]);const e=t.map(a=>a?.reference),n=t.map(a=>a?.floating),r=t.map(a=>a?.item),o=h.useCallback(a=>ve(a,t,"reference"),e),s=h.useCallback(a=>ve(a,t,"floating"),n),i=h.useCallback(a=>ve(a,t,"item"),r);return h.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const rr=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function or(t,e){var n,r;e===void 0&&(e={});const{open:o,elements:s,floatingId:i}=t,{enabled:a=!0,role:c="dialog"}=e,u=Se(),f=((n=s.domReference)==null?void 0:n.id)||u,p=h.useMemo(()=>{var x;return((x=Pn(s.floating))==null?void 0:x.id)||i},[s.floating,i]),l=(r=rr.get(c))!=null?r:c,g=nt()!=null,m=h.useMemo(()=>l==="tooltip"||c==="label"?{["aria-"+(c==="label"?"labelledby":"describedby")]:o?p:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":l==="alertdialog"?"dialog":l,"aria-controls":o?p:void 0,...l==="listbox"&&{role:"combobox"},...l==="menu"&&{id:f},...l==="menu"&&g&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[l,p,g,o,f,c]),b=h.useMemo(()=>{const x={id:p,...l&&{role:l}};return l==="tooltip"||c==="label"?x:{...x,...l==="menu"&&{"aria-labelledby":f}}},[l,p,f,c]),y=h.useCallback(x=>{let{active:w,selected:I}=x;const N={role:"option",...w&&{id:p+"-fui-option"}};switch(c){case"select":case"combobox":return{...N,"aria-selected":I}}return{}},[p,c]);return h.useMemo(()=>a?{reference:m,floating:b,item:y}:{},[a,m,b,y])}function sr({children:t}){const{state:e,dispatch:n}=It(),{open:r,element:o}=e,s=()=>{n({type:"ON_EXIT"})},{refs:i,floatingStyles:a,context:c}=tr({placement:"bottom-start",open:r,onOpenChange:l=>{l||s()},elements:{reference:o},middleware:[xt(10),yt(),wt()],whileElementsMounted:St}),u=Zn(c,{outsidePress:l=>!(l.target instanceof Element&&l.target.closest(".ProseMirror"))}),f=or(c,{role:"listbox"}),{getFloatingProps:p}=nr([u,f]);return r?v.jsx(Yn,{children:v.jsx("div",{ref:i.setFloating,style:a,...p(),className:"z-50 w-auto min-w-[360px] max-w-[520px] rounded-lg border bg-popover p-0 text-popover-foreground shadow-md outline-hidden overflow-hidden",children:t})}):null}const ir=t=>{const e=Y.c(29),{item:n,isSelected:r,onSelect:o,isLoading:s,ref:i}=t;let a;if(e[0]!==n){const T=ue(n._meta);a=n.title||Zt(n.name,T),e[0]=n,e[1]=a}else a=e[1];const c=a,u=n.description||null,f=n.icon,p=r&&"bg-accent text-accent-foreground",l=s&&"pointer-events-none opacity-50";let d;e[2]!==p||e[3]!==l?(d=Ue("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground",p,l),e[2]=p,e[3]=l,e[4]=d):d=e[4];let g;e[5]!==f||e[6]!==c?(g=f!==void 0&&v.jsx(zt,{icon:f,name:c,size:"xs",className:"mr-2"}),e[5]=f,e[6]=c,e[7]=g):g=e[7];let m;e[8]!==c?(m=v.jsx("span",{className:"font-medium flex items-center truncate capitalize",children:c}),e[8]=c,e[9]=m):m=e[9];let b;e[10]!==s?(b=s&&v.jsx(Rt,{size:"xs"}),e[10]=s,e[11]=b):b=e[11];let y;e[12]!==m||e[13]!==b?(y=v.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m,b]}),e[12]=m,e[13]=b,e[14]=y):y=e[14];let x;e[15]!==u?(x=u&&v.jsx("div",{className:"text-xs text-muted-foreground line-clamp-1",children:u}),e[15]=u,e[16]=x):x=e[16];let w;e[17]!==y||e[18]!==x?(w=v.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[y,x]}),e[17]=y,e[18]=x,e[19]=w):w=e[19];let I;e[20]!==n.drillable?(I=n.drillable&&v.jsx("kbd",{className:"shrink-0 ml-2 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground bg-muted border border-border rounded",children:"↵"}),e[20]=n.drillable,e[21]=I):I=e[21];let N;return e[22]!==o||e[23]!==i||e[24]!==w||e[25]!==I||e[26]!==d||e[27]!==g?(N=v.jsxs("div",{ref:i,onClick:o,className:d,children:[g,w,I]}),e[22]=o,e[23]=i,e[24]=w,e[25]=I,e[26]=d,e[27]=g,e[28]=N):N=e[28],N},ar=t=>{const e=Y.c(21),{editor:n,queryKey:r,queryFn:o,onSelect:s}=t,i=le();let a;e[0]!==n||e[1]!==s||e[2]!==o||e[3]!==r?(a={editor:n,queryKey:r,queryFn:o,onSelect:s},e[0]=n,e[1]=s,e[2]=o,e[3]=r,e[4]=a):a=e[4];const{items:c,selectedIndex:u,onSelect:f,selectedItem:p}=kt(a);if(!c.length){let m;e[5]!==i?(m=i("chat.mention.noItemsFound"),e[5]=i,e[6]=m):m=e[6];let b;return e[7]!==m?(b=v.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md border shadow-md p-3 text-sm",children:m}),e[7]=m,e[8]=b):b=e[8],b}let l;e[9]===Symbol.for("react.memo_cache_sentinel")?(l={maxHeight:"min(320px, var(--radix-popover-content-available-height, 320px))"},e[9]=l):l=e[9];let d;if(e[10]!==f||e[11]!==c||e[12]!==u||e[13]!==p?.name){let m;e[15]!==f||e[16]!==u||e[17]!==p?.name?(m=(b,y)=>v.jsx(ir,{item:b,isSelected:y===u,ref:y===u?ur:void 0,onSelect:()=>f(b,y),isLoading:p?.name===b.name},`${b.kind??"item"}:${b.name}`),e[15]=f,e[16]=u,e[17]=p?.name,e[18]=m):m=e[18],d=c.map(m),e[10]=f,e[11]=c,e[12]=u,e[13]=p?.name,e[14]=d}else d=e[14];let g;return e[19]!==d?(g=v.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md overflow-y-auto",style:l,children:v.jsx("div",{className:"p-1",children:d})}),e[19]=d,e[20]=g):g=e[20],g};function lr(){const t=Y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=v.jsx("div",{className:"p-1",children:[...Array(3)].map(cr)}),t[0]=e):e=t[0],e}function cr(t,e){return v.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 animate-pulse",children:[v.jsx("div",{className:"h-4 w-24 bg-muted rounded"}),v.jsx("div",{className:"h-3 w-32 bg-muted rounded"})]},e)}function st(t){const e=Y.c(18),{editor:n,char:r,pluginKey:o,queryKey:s,queryFn:i,onSelect:a,allow:c,onOpenChange:u}=t;let f;e[0]!==c||e[1]!==r||e[2]!==n||e[3]!==u||e[4]!==o?(f={editor:n,char:r,pluginKey:o,allow:c,onOpenChange:u},e[0]=c,e[1]=r,e[2]=n,e[3]=u,e[4]=o,e[5]=f):f=e[5];const{state:p,dispatch:l}=Ct(f);let d;e[6]!==l||e[7]!==p?(d={state:p,dispatch:l},e[6]=l,e[7]=p,e[8]=d):d=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=v.jsx(lr,{}),e[9]=g):g=e[9];let m;e[10]!==n||e[11]!==a||e[12]!==i||e[13]!==s?(m=v.jsx(sr,{children:v.jsx(h.Suspense,{fallback:g,children:v.jsx(ar,{editor:n,queryKey:s,queryFn:i,onSelect:a})})}),e[10]=n,e[11]=a,e[12]=i,e[13]=s,e[14]=m):m=e[14];let b;return e[15]!==d||e[16]!==m?(b=v.jsx(Et.Provider,{value:d,children:m}),e[15]=d,e[16]=m,e[17]=b):b=e[17],b}function ur(t){t&&t.scrollIntoView({block:"center",behavior:"smooth"})}const dr=t=>{const e=Y.c(53),{editor:n,virtualMcpId:r,suggestionOpenRef:o}=t,s=le(),i=qe(),{org:a}=Be(),c=Jt();let u;e[0]!==c?(u=en(c),e[0]=c,e[1]=u):u=e[1];const f=u;let p;e[2]!==a.id||e[3]!==a.slug||e[4]!==r?(p={connectionId:r,orgId:a.id,orgSlug:a.slug},e[2]=a.id,e[3]=a.slug,e[4]=r,e[5]=p):p=e[5];const l=He(p);let d;e[6]!==a.id||e[7]!==r?(d=ce.virtualMcpResources(r,a.id),e[6]=a.id,e[7]=r,e[8]=d):d=e[8];const g=d,[m,b]=h.useState("categories");let y;e[9]!==m?(y=()=>m,e[9]=m,e[10]=y):y=e[10];const x=h.useEffectEvent(y),w=h.useRef(null),I=h.useRef(!1),N=r??"default";let T;e[11]!==m||e[12]!==a.id||e[13]!==N?(T=["at-mention",a.id,N,m],e[11]=m,e[12]=a.id,e[13]=N,e[14]=T):T=e[14];const S=T;let R;e[15]!==s?(R=s("chat.mentionAt.agentsTitle"),e[15]=s,e[16]=R):R=e[16];let k;e[17]!==s?(k=s("chat.mentionAt.agentsDescription"),e[17]=s,e[18]=k):k=e[18];let F;e[19]!==R||e[20]!==k?(F={name:"agents",title:R,description:k,kind:"category",drillable:!0},e[19]=R,e[20]=k,e[21]=F):F=e[21];let D;e[22]!==s?(D=s("chat.mentionAt.resourcesTitle"),e[22]=s,e[23]=D):D=e[23];let A;e[24]!==s?(A=s("chat.mentionAt.resourcesDescription"),e[24]=s,e[25]=A):A=e[25];let Q;e[26]!==D||e[27]!==A?(Q={name:"resources",title:D,description:A,kind:"category",drillable:!0},e[26]=D,e[27]=A,e[28]=Q):Q=e[28];let E;e[29]!==Q||e[30]!==F?(E=[F,Q],e[29]=Q,e[30]=F,e[31]=E):E=e[31];const M=E;let C;e[32]!==l||e[33]!==n||e[34]!==s?(C=async X=>{const{item:_,range:j}=X;if(J("chat_picker_item_selected",{picker:"@",item_kind:_.kind,item_name:_.name}),_.kind!=="category"&&(I.current=!0),_.kind==="category")return b(_.name==="agents"?"agents":"resources"),!1;if(_.kind==="agent"&&_.agentId){se(n,j,{id:_.agentId,name:_.name,metadata:{agentId:_.agentId,title:_.name},char:"@"}),b("categories");return}if(_.kind==="resource"&&_.uri&&l){try{const K=await Qe(l,_.uri);se(n,j,{id:_.uri,name:_.uri,metadata:K.contents,char:"@"})}catch(K){console.error("[at-mention] Failed to fetch resource:",K),V.error(s("chat.mentionAt.failedToLoadResource"))}b("categories");return}},e[32]=l,e[33]=n,e[34]=s,e[35]=C):C=e[35];const $=C;let P;e[36]!==c||e[37]!==M||e[38]!==l||e[39]!==f||e[40]!==x||e[41]!==i||e[42]!==g||e[43]!==r?(P=async X=>{const{query:_}=X,j=x();if(j==="categories"){if(!_.trim())return M;const q=_.toLowerCase(),U=c.filter(B=>B.status==="active"&&(!B.id||!Ce(B.id))&&!f.has(B.id)&&B.id!==r&&(B.title.toLowerCase().includes(q)||B.description?.toLowerCase().includes(q))).map(fr),ee=await(async()=>{if(!l)return[];let B=i.getQueryData(g);return B||(B=await i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4})),(B?.resources??[]).filter(ne=>ne.uri.toLowerCase().includes(q)||ne.name?.toLowerCase().includes(q)||ne.description?.toLowerCase().includes(q)).map(mr)})();return[...U,...ee]}if(j==="agents"){let q=c.filter(U=>U.status==="active"&&(!U.id||!Ce(U.id))&&!f.has(U.id)&&U.id!==r);if(_.trim()){const U=_.toLowerCase();q=q.filter(ee=>ee.title.toLowerCase().includes(U)||ee.description?.toLowerCase().includes(U))}return q.map(pr)}if(!l)return[];let K=i.getQueryData(g);K?i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4}).catch(gr):K=await i.fetchQuery({queryKey:g,queryFn:()=>oe(l),staleTime:6e4});let W=K?.resources??[];if(_.trim()){const q=_.toLowerCase();W=W.filter(U=>U.uri.toLowerCase().includes(q)||U.name?.toLowerCase().includes(q)||U.description?.toLowerCase().includes(q))}return W.map(hr)},e[36]=c,e[37]=M,e[38]=l,e[39]=f,e[40]=x,e[41]=i,e[42]=g,e[43]=r,e[44]=P):P=e[44];const L=P;let O;e[45]!==o?(O=X=>{if(o&&(o.current=X),X)w.current=Date.now(),I.current=!1,J("chat_picker_opened",{picker:"@"});else{const _=w.current;J("chat_picker_closed",{picker:"@",outcome:I.current?"selected":"dismissed",duration_ms:_?Date.now()-_:null}),w.current=null,b("categories")}},e[45]=o,e[46]=O):O=e[46];const H=O;let G;return e[47]!==n||e[48]!==L||e[49]!==$||e[50]!==H||e[51]!==S?(G=v.jsx(st,{editor:n,char:"@",pluginKey:"atDropdownMenu",queryKey:S,queryFn:L,onSelect:$,onOpenChange:H}),e[47]=n,e[48]=L,e[49]=$,e[50]=H,e[51]=S,e[52]=G):G=e[52],G};function fr(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function mr(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}function pr(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function gr(){}function hr(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function Oe(t,e,n,r,o,s,i){try{const a=await We(n,r,s);se(t,e,{id:r,name:Ve(r,o),metadata:a.messages,char:"/",kind:"prompt",args:s})}catch(a){console.error("[slash] Failed to fetch prompt:",a),V.error(i.t("chat.mentionSlash.failedLoadPrompt"))}}async function br(t,e,n,r,o){try{const s=await Qe(n,r);se(t,e,{id:r,name:r,metadata:s.contents,char:"/",kind:"resource"})}catch(s){console.error("[slash] Failed to fetch resource:",s),V.error(o.t("chat.mentionSlash.failedLoadResource"))}}async function vr(t,e,n,r,o){try{const{files:s,omittedPaths:i}=await tn(n,r.volume,r.path),a={sandboxPath:r.sandboxPath,files:s,omittedPaths:i};se(t,e,{id:r.id,name:r.name,metadata:a,char:"/",kind:"skill"})}catch(s){console.error("[slash] Failed to fetch skill:",s),V.error(o.t("chat.mentionSlash.failedLoadSkill"))}}const xr=({editor:t,virtualMcpId:e,suggestionOpenRef:n})=>{const r=le(),o=qe(),{org:s}=Be(),i=He({connectionId:e,orgId:s.id,orgSlug:s.slug}),a=ce.virtualMcpPrompts(e,s.id),c=ce.virtualMcpResources(e,s.id),u=ce.slashSkills(s.id),f=["slash-mention",s.id,e??"default"],[p,l]=h.useState(null),[d,g]=h.useState(null),m=_t(t);m&&(m.onEditChip=async S=>{if(i)try{const k=(await $e(o,a,i)).find(F=>F.name===S.promptId);if(!k?.arguments||k.arguments.length===0)return;g({...S,prompt:k})}catch(R){console.error("[slash] Failed to load prompt for editing:",R),V.error(r("chat.mentionSlash.failedLoadPrompt"))}});const b=h.useRef(null),y=h.useRef(!1),x=async({item:S,range:R})=>{if(J("chat_picker_item_selected",{picker:"/",item_kind:S.kind,item_name:S.name}),y.current=!0,!!i)if(S.kind==="prompt"){if(S.arguments&&S.arguments.length>0){l({range:R,item:S});return}const k=ue(S._meta);await Oe(t,R,i,S.name,k,void 0,{t:r})}else S.kind==="skill"?S.skill&&await vr(t,R,s.slug,S.skill,{t:r}):S.uri&&await br(t,R,i,S.uri,{t:r})},w=async S=>{if(!p||!i)return;const{range:R,item:k}=p,F=ue(k._meta);await Oe(t,R,i,k.name,F,S,{t:r}),l(null)},I=async S=>{if(!(!d||!i)){if(!At(t,d.pos,d.promptId)){V.error(r("chat.mentionSlash.failedUpdatePrompt")),g(null);return}try{const R=await We(i,d.promptId,S),k=ue(d.prompt._meta);t.chain().focus().setNodeSelection(d.pos).deleteSelection().insertContentAt(d.pos,Mt({id:d.promptId,name:Ve(d.promptId,k),metadata:R.messages,char:"/",kind:"prompt",args:S})).run(),J("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:d.promptId})}catch(R){console.error("[slash] Failed to update prompt:",R),V.error(r("chat.mentionSlash.failedUpdatePrompt"))}g(null)}},N=async S=>{const{query:R}=S;if(!i)return[];const[k,F,D]=await Promise.all([$e(o,a,i),wr(o,c,i),yr(o,u,s.slug)]),A=R.trim().toLowerCase(),Q=(k??[]).filter(C=>!A||C.name.toLowerCase().includes(A)||C.title?.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name,title:C.title,description:C.description,kind:"prompt",arguments:C.arguments,_meta:C._meta})),E=(F??[]).filter(C=>!A||C.uri.toLowerCase().includes(A)||C.name?.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name??C.uri,title:C.name,description:C.description,kind:"resource",uri:C.uri})),M=(D??[]).filter(C=>!A||C.name.toLowerCase().includes(A)||C.id.toLowerCase().includes(A)||C.description?.toLowerCase().includes(A)).map(C=>({name:C.name,title:C.name,description:C.description??void 0,kind:"skill",skill:C}));return[...Q,...E,...M]},T=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return v.jsxs(v.Fragment,{children:[v.jsx(st,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:f,queryFn:N,onSelect:x,onOpenChange:S=>{if(n&&(n.current=S),S)b.current=Date.now(),y.current=!1,J("chat_picker_opened",{picker:"/"});else{const R=b.current;J("chat_picker_closed",{picker:"/",outcome:y.current?"selected":"dismissed",duration_ms:R?Date.now()-R:null}),b.current=null}}}),v.jsx(Ee,{prompt:T,setPrompt:()=>l(null),onSubmit:w}),v.jsx(Ee,{prompt:d?.prompt??null,setPrompt:()=>g(null),onSubmit:I,defaultValues:d?.args},d?`edit-${d.promptId}-${d.pos}`:"edit-idle")]})};async function $e(t,e,n){let r=t.getQueryData(e);return r?t.fetchQuery({queryKey:e,queryFn:()=>Ie(n),staleTime:6e4}).catch(()=>{}):r=await t.fetchQuery({queryKey:e,queryFn:()=>Ie(n),staleTime:6e4}),r?.prompts??[]}async function yr(t,e,n){const r=t.getQueryData(e),o=()=>t.fetchQuery({queryKey:e,queryFn:()=>nn(n),staleTime:6e4});return r?(o().catch(()=>{}),r):o().catch(()=>[])}async function wr(t,e,n){let r=t.getQueryData(e);return r?t.fetchQuery({queryKey:e,queryFn:()=>oe(n),staleTime:6e4}).catch(()=>{}):r=await t.fetchQuery({queryKey:e,queryFn:()=>oe(n),staleTime:6e4}),r?.resources??[]}const it="Ask anything, / for prompts & skills, @ for agents & resources...";function Sr(t){return[Kt.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),Pt.configure({placeholder:()=>t.current??it,showOnlyWhenEditable:!1}),Ot,$t]}function Or({tiptapDoc:t,setTiptapDoc:e,disabled:n=!1,enterToSubmit:r=!1,placeholder:o,onSubmit:s,suggestionOpenRef:i,children:a}){const c=h.useRef(s),u=h.useRef(e),f=h.useRef(r),p=h.useRef(o),l=Dt({extensions:Sr(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":o??it,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[15px] p-[18px]"},handleKeyDown:(d,g)=>g.key==="Enter"&&!g.shiftKey&&f.current&&!i?.current?(g.preventDefault(),c.current?.(),!0):!1},onUpdate:({editor:d})=>{u.current(d?.getJSON())}});return h.useEffect(()=>{l?.setEditable(!n)},[l,n]),h.useEffect(()=>{c.current=s},[s]),h.useEffect(()=>{u.current=e},[e]),h.useEffect(()=>{f.current=r},[r]),h.useEffect(()=>{p.current=o},[o]),h.useEffect(()=>{if(!l||l.isDestroyed)return;const d=JSON.stringify(l.getJSON()),g=JSON.stringify(t||{type:"doc",content:[]});d!==g&&l.commands.setContent(t||{type:"doc",content:[]})},[l,t]),v.jsx(jt.Provider,{value:{editor:l},children:a})}function $r(t){const e=Y.c(29),{disabled:n,virtualMcpId:r,showFileUploader:o,selectedModel:s,onUnsupportedFile:i,suggestionOpenRef:a,ref:c,className:u}=t,f=n===void 0?!1:n,p=o===void 0?!1:o,{editor:l}=Lt();let d,g;if(e[0]!==l?(d=()=>({focus:()=>{l?.commands.focus()},clear:()=>{l?.commands.clearContent(!0)},appendText:k=>{if(!l)return;const F=l.state.doc.textContent.trim()==="";l.commands.focus("end"),F||l.commands.insertContent(" "),l.commands.insertContent(k)},syncVoiceText:(k,F)=>{if(l&&(l.commands.setContent(k||{type:"doc",content:[]}),F)){l.commands.focus("end");const D=l.state.doc.textContent.trim().length>0;l.commands.insertContent({type:"text",text:D?" "+F:F})}},restoreContent:k=>{l&&l.commands.setContent(k||{type:"doc",content:[]})}}),g=[l],e[0]=l,e[1]=d,e[2]=g):(d=e[1],g=e[2]),h.useImperativeHandle(c??null,d,g),!l)return null;const m=f&&"cursor-not-allowed opacity-70",b=f&&"[&_.ProseMirror]:cursor-not-allowed";let y;e[3]!==u||e[4]!==m||e[5]!==b?(y=Ue("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",u,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",m,b),e[3]=u,e[4]=m,e[5]=b,e[6]=y):y=e[6];let x;e[7]!==l||e[8]!==y?(x=v.jsx(Ut,{editor:l,className:y}),e[7]=l,e[8]=y,e[9]=x):x=e[9];const w=r??null;let I;e[10]!==l||e[11]!==a||e[12]!==w?(I=v.jsx(h.Suspense,{fallback:null,children:v.jsx(xr,{editor:l,virtualMcpId:w,suggestionOpenRef:a})}),e[10]=l,e[11]=a,e[12]=w,e[13]=I):I=e[13];const N=r??null;let T;e[14]!==l||e[15]!==a||e[16]!==N?(T=v.jsx(h.Suspense,{fallback:null,children:v.jsx(dr,{editor:l,virtualMcpId:N,suggestionOpenRef:a})}),e[14]=l,e[15]=a,e[16]=N,e[17]=T):T=e[17];let S;e[18]!==f||e[19]!==l||e[20]!==i||e[21]!==s||e[22]!==p?(S=p&&s&&!f?v.jsx(on,{editor:l,selectedModel:s,onUnsupportedFile:i}):null,e[18]=f,e[19]=l,e[20]=i,e[21]=s,e[22]=p,e[23]=S):S=e[23];let R;return e[24]!==I||e[25]!==T||e[26]!==S||e[27]!==x?(R=v.jsxs(v.Fragment,{children:[x,I,T,S]}),e[24]=I,e[25]=T,e[26]=S,e[27]=x,e[28]=R):R=e[28],R}export{Or as T,jr as U,$r as a,rn as p,Lr as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as L,b as G,r as $,l as K,j as s,ap as ze,ak as pe,a_ as Gt,am as ge,a$ as Be,B as ne,a6 as Se,a7 as ke,a9 as Ie,aF as qt,b0 as Ht,b1 as Wt,b2 as Zt,v as be,aG as Jt,b3 as me,b4 as We,I as Te,d as ct,ac as Xt,e as es,o as ee,t as je,b5 as ts,F as ss,R as ns,K as os,m as rs,h as Vs,a as as,M as is,U as ls,au as Re,D as dt,b6 as cs,aE as ds}from"./index-6GXqHE0w.js";import{d as us,e as ms,f as ut,P as ps,i as fs,c as hs,S as xs}from"./usage-stats-D5mXC24B.js";import{K as gs,i as bs}from"./command-palette-store-D19nXDNm.js";import{a as As}from"./use-virtual-mcp-CMlCV8Oj.js";import{w as vs,A as js}from"./autosend-BzUVLyEq.js";import{s as ys,u as ws,r as Ze,i as Cs,c as Ns,w as Ss,H as ks}from"./use-open-billing-url-Cju1isPI.js";import{u as Is}from"./use-session-runtime-TS34dEJv.js";import{i as mt}from"./ArrowRight-DZQert3q.js";import{i as pt}from"./ArrowUp-lpfNBlP2.js";import{t as _e,ae as Ts,a7 as ft,g as ht,a9 as _s,z as Ds,af as Ms,w as xt,h as gt,ag as bt,G as Es,ah as Ps,ai as Rs}from"./agent-icon-vDfwuZu4.js";import{i as $e}from"./Check-DClZtAIP.js";import{a as At}from"./Image01-CpXdMb8x.js";import{i as Fs}from"./Upload01-BDeLrRhf.js";import{u as Ue,a as Ls,c as De,h as zs,j as Bs,k as $s,l as Us,m as Os,n as Ks,o as Qs,p as Ys,e as Gs,b as qs,s as Hs}from"./chat-context-HB_KOUNM.js";import{t as Ws,z as Zs,u as Js}from"./hooks-BSkeWBV7.js";import{i as Xs}from"./AlertCircle-CgERhdh6.js";import{a as en}from"./Copy01-DiITYBuR.js";import{F as Fe,a as Oe,b as Ke,c as Qe,d as vt}from"./form-EGCuUtdG.js";import{c as tn,S as sn,b as nn,a as on,d as rn}from"./select-Ce9NznPv.js";import{t as jt}from"./ChevronUp-CbF1Gmeo.js";import{i as Vn}from"./ArrowLeft-BVx6AQzq.js";import{b as an,c as ln}from"./tabs-DQoXHeZr.js";import{t as Le}from"./Tool02-BrfQeZRx.js";import{T as cn,a as Je}from"./toggle-group-Cs1yIHkK.js";import{d as dn,h as un,c as mn,b as pn,D as fn}from"./dialog-DJBpjJnY.js";import{I as hn}from"./input-TvernbmY.js";import{u as xn}from"./use-deco-credits-DjxZxHMq.js";import{a as gn,d as bn,g as Xe,s as An}from"./tool-namespace-ySa3S1AM.js";import{t as vn}from"./utils-CVEq3hMx.js";import{s as jn}from"./XClose-DpDcHm9Y.js";import{M as yn,a as wn,m as Ye,g as Cn,b as Nn}from"./index-B7ENeoW4.js";import{a as yt,b as wt,P as Ct}from"./popover-Ci-k968-.js";import{d as Sn,b as kn,a as In,D as Tn}from"./drawer-B5NRhNfW.js";import{t as _n}from"./Stars01-f37Q7vDf.js";import{b as Dn}from"./use-organization-settings-DrJN-E78.js";import{u as Nt,a as Mn}from"./use-ai-providers-Bg_y9f3x.js";import{p as St,u as En,T as Pn,a as Rn,U as Fn}from"./input-D8xrvlz-.js";import{u as Ln}from"./use-mcp-client-Bq-mjhw3.js";import{l as zn,g as Bn}from"./use-mcp-prompts-CWmeNLXn.js";import{c as $n,D as Un,b as On,a as de,h as et,i as tt,j as st,e as Kn,d as Qn}from"./dropdown-menu-DzwCPltk.js";import{i as Yn}from"./Link01-OqB-2yPE.js";import{s as nt}from"./Plus-DaErdsG1.js";import"./hooks-Bb9SArul.js";import{p as Gn,q as qn}from"./question-004-sINsf4GQ.js";import{A as Hn}from"./avatar-CW4PxBuN.js";import{u as Wn}from"./use-members-Dnee1tF2.js";import{A as Zn}from"./add-connection-dialog-BSihy3_s.js";import{i as Jn}from"./ChevronRight-BNfU55ld.js";import{u as Xn}from"./use-is-desktop-app-BNujXJc_.js";const Pe="cubic-bezier(0.645, 0.045, 0.355, 1)",zV=44,eo={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},to={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},so={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function ue(t){const e=L.c(69),{icon:n,label:o,count:V,title:a,footerLeft:r,footerRight:i,children:l,defaultExpanded:m,variant:d,onClose:c}=t,u=d===void 0?"default":d,p=G(),[h,f]=$.useState(m),[x,A]=$.useState(!1);let b;e[0]!==c?(b=()=>{A(!0),c?.()},e[0]=c,e[1]=b):b=e[1];const v=b;if(x)return null;const g=to[u],C=eo[u];let j;e[2]!==g||e[3]!==C?(j=K("relative flex flex-col rounded-xl bg-background border shadow-md","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",g,C),e[2]=g,e[3]=C,e[4]=j):j=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=()=>f(no),e[5]=y):y=e[5];const N=h&&"rounded-b-none",k=!h&&"rounded-b-xl";let S;e[6]!==N||e[7]!==k?(S=K("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent/50 transition-colors rounded-t-xl",N,k),e[6]=N,e[7]=k,e[8]=S):S=e[8];const _=so[u];let I;e[9]!==_?(I=K("shrink-0",_),e[9]=_,e[10]=I):I=e[10];let D;e[11]!==n||e[12]!==I?(D=s.jsx("span",{className:I,children:n}),e[11]=n,e[12]=I,e[13]=D):D=e[13];let T;e[14]!==o?(T=s.jsx("span",{className:"flex-1 min-w-0 truncate",children:o}),e[14]=o,e[15]=T):T=e[15];let z;e[16]!==V?(z=V?s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:V}):null,e[16]=V,e[17]=z):z=e[17];const E=h?"rotate(180deg)":"rotate(0deg)";let P;e[18]!==E?(P=s.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:s.jsx(jt,{size:16,style:{transform:E,transition:`transform 180ms ${Pe}`}})}),e[18]=E,e[19]=P):P=e[19];let R;e[20]!==p?(R=p("chat.collapsibleHighlight.closeLabel"),e[20]=p,e[21]=R):R=e[21];let U;e[22]!==p?(U=p("chat.collapsibleHighlight.closeTitle"),e[22]=p,e[23]=U):U=e[23];let Y,B;e[24]!==v?(Y=ie=>{ie.stopPropagation(),v()},B=ie=>{(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),ie.stopPropagation(),v())},e[24]=v,e[25]=Y,e[26]=B):(Y=e[25],B=e[26]);let F;e[27]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(ze,{size:16}),e[27]=F):F=e[27];let M;e[28]!==R||e[29]!==U||e[30]!==Y||e[31]!==B?(M=s.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":R,title:U,onClick:Y,onKeyDown:B,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:F}),e[28]=R,e[29]=U,e[30]=Y,e[31]=B,e[32]=M):M=e[32];let H;e[33]!==h||e[34]!==D||e[35]!==T||e[36]!==z||e[37]!==P||e[38]!==M||e[39]!==S?(H=s.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":h,onClick:y,className:S,children:[D,T,z,P,M]}),e[33]=h,e[34]=D,e[35]=T,e[36]=z,e[37]=P,e[38]=M,e[39]=S,e[40]=H):H=e[40];const W=h?"1fr":"0fr";let J;e[41]!==W?(J={display:"grid",gridTemplateRows:W,transition:`grid-template-rows 180ms ${Pe}`},e[41]=W,e[42]=J):J=e[42];let w;e[43]===Symbol.for("react.memo_cache_sentinel")?(w={overflow:"hidden",minHeight:0},e[43]=w):w=e[43];const O=h?1:0;let q;e[44]!==O?(q={opacity:O,transition:`opacity 120ms ${Pe}`,maxHeight:"60vh"},e[44]=O,e[45]=q):q=e[45];let Z;e[46]!==a?(Z=a?s.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:s.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:a})}):s.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=a,e[47]=Z):Z=e[47];let X;e[48]!==l||e[49]!==a?(X=l?s.jsx("div",{className:K("pb-4",!a&&"pt-4"),children:l}):null,e[48]=l,e[49]=a,e[50]=X):X=e[50];let te;e[51]!==Z||e[52]!==X?(te=s.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[Z,X]}),e[51]=Z,e[52]=X,e[53]=te):te=e[53];let re;e[54]!==r||e[55]!==i?(re=r||i?s.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:r}),s.jsx("div",{className:"flex items-center gap-2",children:i})]})}):null,e[54]=r,e[55]=i,e[56]=re):re=e[56];let Ve;e[57]!==q||e[58]!==te||e[59]!==re?(Ve=s.jsx("div",{style:w,children:s.jsxs("div",{className:"flex flex-col",style:q,children:[te,re]})}),e[57]=q,e[58]=te,e[59]=re,e[60]=Ve):Ve=e[60];let se;e[61]!==J||e[62]!==Ve?(se=s.jsx("div",{"data-testid":"collapsible-highlight-body",style:J,children:Ve}),e[61]=J,e[62]=Ve,e[63]=se):se=e[63];let ae;return e[64]!==H||e[65]!==se||e[66]!==j||e[67]!==u?(ae=s.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":u,className:j,children:[H,se]}),e[64]=H,e[65]=se,e[66]=j,e[67]=u,e[68]=ae):ae=e[68],ae}function no(t){return!t}const oo=pe({content:ge().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:Be(["pending","in_progress","completed"]),activeForm:ge().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),kt=pe({todos:Gt(oo)}),ro="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";Ws({description:ro,inputSchema:Zs(kt),execute:async({todos:t})=>({ok:!0,count:t.length})});const Vo="tool-todo_write",ao=new Set(["input-available","output-available"]);function io(t){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n.role!=="assistant")continue;const o=n.parts;if(Array.isArray(o))for(let V=o.length-1;V>=0;V--){const a=o[V];if(a.type!==Vo||typeof a.state!="string"||!ao.has(a.state))continue;const r=kt.safeParse(a.input);if(r.success)return r.data.todos}}return[]}function It(t){const e=[];for(const n of t)if("state"in n&&n.state==="approval-requested"&&"approval"in n&&n.approval?.id&&"toolCallId"in n&&n.toolCallId){const o="toolName"in n&&typeof n.toolName=="string"?n.toolName:n.type.startsWith("tool-")?n.type.replace("tool-",""):"Tool";e.push({approvalId:n.approval.id,toolCallId:n.toolCallId,toolName:o,friendlyName:vn(gn(o)),input:n.input})}return e}function Tt(t){return t.at(-1)}function _t(t){const e=[];for(const n of t)n.type==="tool-propose_plan"&&n.state==="input-available"&&e.push({toolCallId:n.toolCallId,plan:n.input.plan,state:n.state});return e}function lo(t){return t?t.message.startsWith("[CREDITS]"):!1}const co={isCreditExhausted:!1,subscriptionErrorKind:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,todos:[]};function uo(t){const{messages:e,error:n,finishReason:o,isStreaming:V,isWaitingForApprovals:a}=t;if(!V&&n&&lo(n))return{...co,isCreditExhausted:!0};const r=e.at(-1),i=r?.role==="assistant"?r.parts:[],l=i,d=!!l.filter(g=>g.type==="tool-user_ask").filter(g=>g.state!=="output-available").length,c=_t(i),u=It(l),p=io(e),h=V?null:ys(n),f=!V&&!!n&&!h,x=u.length>0||V&&a,A=c.length>0,v=!V&&!!o&&o!=="stop"&&!(o==="tool-calls"&&(d||x||A))&&!f;return{isCreditExhausted:!1,subscriptionErrorKind:h,hasTodos:p.length>0,showError:f,showWarning:v,hasApprovals:x,hasPlans:A,isWaitingForUserInput:d,todos:p}}function Dt(){const t=L.c(6),{messages:e,error:n,finishReason:o,isStreaming:V,isWaitingForApprovals:a}=Ue(),r=n??null,i=o??null;let l;return t[0]!==V||t[1]!==a||t[2]!==e||t[3]!==r||t[4]!==i?(l=uo({messages:e,error:r,finishReason:i,isStreaming:V,isWaitingForApprovals:a}),t[0]=V,t[1]=a,t[2]=e,t[3]=r,t[4]=i,t[5]=l):l=t[5],l}function BV(){const t=Dt();return t.isCreditExhausted?0:Number(t.hasTodos)+Number(t.showError)+ +!!t.subscriptionErrorKind+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)}const ot="start-task",mo=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
|
|
1
|
+
import{c as L,b as G,r as $,l as K,j as s,ap as ze,ak as pe,a_ as Gt,am as ge,a$ as Be,B as ne,a6 as Se,a7 as ke,a9 as Ie,aF as qt,b0 as Ht,b1 as Wt,b2 as Zt,v as be,aG as Jt,b3 as me,b4 as We,I as Te,d as ct,ac as Xt,e as es,o as ee,t as je,b5 as ts,F as ss,R as ns,K as os,m as rs,h as Vs,a as as,M as is,U as ls,au as Re,D as dt,b6 as cs,aE as ds}from"./index-B3yBTWEk.js";import{d as us,e as ms,f as ut,P as ps,i as fs,c as hs,S as xs}from"./usage-stats-BNse37Wk.js";import{K as gs,i as bs}from"./command-palette-store-BwHku_Zt.js";import{a as As}from"./use-virtual-mcp-Bk09OpEg.js";import{w as vs,A as js}from"./autosend-HdosN86x.js";import{s as ys,u as ws,r as Ze,i as Cs,c as Ns,w as Ss,H as ks}from"./use-open-billing-url-DvTk9GH0.js";import{u as Is}from"./use-session-runtime-BHahDP0E.js";import{i as mt}from"./ArrowRight-Cu8UuHNR.js";import{i as pt}from"./ArrowUp-C0eratGp.js";import{t as _e,ae as Ts,a7 as ft,g as ht,a9 as _s,z as Ds,af as Ms,w as xt,h as gt,ag as bt,G as Es,ah as Ps,ai as Rs}from"./agent-icon-DrlilhFJ.js";import{i as $e}from"./Check-BWpBE9uf.js";import{a as At}from"./Image01-BrHSH-Vi.js";import{i as Fs}from"./Upload01-CqWnAR1-.js";import{u as Ue,a as Ls,c as De,h as zs,j as Bs,k as $s,l as Us,m as Os,n as Ks,o as Qs,p as Ys,e as Gs,b as qs,s as Hs}from"./chat-context-CXknhaDs.js";import{t as Ws,z as Zs,u as Js}from"./hooks-k1OxvonE.js";import{i as Xs}from"./AlertCircle-EniJtD8E.js";import{a as en}from"./Copy01-DayLu0dF.js";import{F as Fe,a as Oe,b as Ke,c as Qe,d as vt}from"./form-KjPevg0A.js";import{c as tn,S as sn,b as nn,a as on,d as rn}from"./select-Bc5UZb4n.js";import{t as jt}from"./ChevronUp-DGrguvGW.js";import{i as Vn}from"./ArrowLeft-Clu1mSdY.js";import{b as an,c as ln}from"./tabs-DV8akPGb.js";import{t as Le}from"./Tool02-C_xRWqQk.js";import{T as cn,a as Je}from"./toggle-group-9HQCpj-q.js";import{d as dn,h as un,c as mn,b as pn,D as fn}from"./dialog-otnvxVN0.js";import{I as hn}from"./input-HFOrJf5B.js";import{u as xn}from"./use-deco-credits-rwNQ1gMg.js";import{a as gn,d as bn,g as Xe,s as An}from"./tool-namespace-BVMQcKlk.js";import{t as vn}from"./utils-CVEq3hMx.js";import{s as jn}from"./XClose-Cw4b4Uag.js";import{M as yn,a as wn,m as Ye,g as Cn,b as Nn}from"./index-DlQKfvnq.js";import{a as yt,b as wt,P as Ct}from"./popover-DIqZ2IKF.js";import{d as Sn,b as kn,a as In,D as Tn}from"./drawer-s7gtDrb4.js";import{t as _n}from"./Stars01-COChWymR.js";import{b as Dn}from"./use-organization-settings-BAVHurZk.js";import{u as Nt,a as Mn}from"./use-ai-providers-qnkcjapR.js";import{p as St,u as En,T as Pn,a as Rn,U as Fn}from"./input-BnbYz5_9.js";import{u as Ln}from"./use-mcp-client-DsJzBus3.js";import{l as zn,g as Bn}from"./use-mcp-prompts-i0LZ2nQA.js";import{c as $n,D as Un,b as On,a as de,h as et,i as tt,j as st,e as Kn,d as Qn}from"./dropdown-menu-BxKUbUkE.js";import{i as Yn}from"./Link01-3t9JrUgl.js";import{s as nt}from"./Plus-Bxp02MWl.js";import"./hooks-BhviOOpn.js";import{p as Gn,q as qn}from"./question-004-sINsf4GQ.js";import{A as Hn}from"./avatar-DcDvs8Zz.js";import{u as Wn}from"./use-members-C0MdJrYz.js";import{A as Zn}from"./add-connection-dialog-s1GRGQ63.js";import{i as Jn}from"./ChevronRight-DzRB-rdO.js";import{u as Xn}from"./use-is-desktop-app-BNujXJc_.js";const Pe="cubic-bezier(0.645, 0.045, 0.355, 1)",zV=44,eo={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},to={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},so={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function ue(t){const e=L.c(69),{icon:n,label:o,count:V,title:a,footerLeft:r,footerRight:i,children:l,defaultExpanded:m,variant:d,onClose:c}=t,u=d===void 0?"default":d,p=G(),[h,f]=$.useState(m),[x,A]=$.useState(!1);let b;e[0]!==c?(b=()=>{A(!0),c?.()},e[0]=c,e[1]=b):b=e[1];const v=b;if(x)return null;const g=to[u],C=eo[u];let j;e[2]!==g||e[3]!==C?(j=K("relative flex flex-col rounded-xl bg-background border shadow-md","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",g,C),e[2]=g,e[3]=C,e[4]=j):j=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=()=>f(no),e[5]=y):y=e[5];const N=h&&"rounded-b-none",k=!h&&"rounded-b-xl";let S;e[6]!==N||e[7]!==k?(S=K("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent/50 transition-colors rounded-t-xl",N,k),e[6]=N,e[7]=k,e[8]=S):S=e[8];const _=so[u];let I;e[9]!==_?(I=K("shrink-0",_),e[9]=_,e[10]=I):I=e[10];let D;e[11]!==n||e[12]!==I?(D=s.jsx("span",{className:I,children:n}),e[11]=n,e[12]=I,e[13]=D):D=e[13];let T;e[14]!==o?(T=s.jsx("span",{className:"flex-1 min-w-0 truncate",children:o}),e[14]=o,e[15]=T):T=e[15];let z;e[16]!==V?(z=V?s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:V}):null,e[16]=V,e[17]=z):z=e[17];const E=h?"rotate(180deg)":"rotate(0deg)";let P;e[18]!==E?(P=s.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:s.jsx(jt,{size:16,style:{transform:E,transition:`transform 180ms ${Pe}`}})}),e[18]=E,e[19]=P):P=e[19];let R;e[20]!==p?(R=p("chat.collapsibleHighlight.closeLabel"),e[20]=p,e[21]=R):R=e[21];let U;e[22]!==p?(U=p("chat.collapsibleHighlight.closeTitle"),e[22]=p,e[23]=U):U=e[23];let Y,B;e[24]!==v?(Y=ie=>{ie.stopPropagation(),v()},B=ie=>{(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),ie.stopPropagation(),v())},e[24]=v,e[25]=Y,e[26]=B):(Y=e[25],B=e[26]);let F;e[27]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(ze,{size:16}),e[27]=F):F=e[27];let M;e[28]!==R||e[29]!==U||e[30]!==Y||e[31]!==B?(M=s.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":R,title:U,onClick:Y,onKeyDown:B,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:F}),e[28]=R,e[29]=U,e[30]=Y,e[31]=B,e[32]=M):M=e[32];let H;e[33]!==h||e[34]!==D||e[35]!==T||e[36]!==z||e[37]!==P||e[38]!==M||e[39]!==S?(H=s.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":h,onClick:y,className:S,children:[D,T,z,P,M]}),e[33]=h,e[34]=D,e[35]=T,e[36]=z,e[37]=P,e[38]=M,e[39]=S,e[40]=H):H=e[40];const W=h?"1fr":"0fr";let J;e[41]!==W?(J={display:"grid",gridTemplateRows:W,transition:`grid-template-rows 180ms ${Pe}`},e[41]=W,e[42]=J):J=e[42];let w;e[43]===Symbol.for("react.memo_cache_sentinel")?(w={overflow:"hidden",minHeight:0},e[43]=w):w=e[43];const O=h?1:0;let q;e[44]!==O?(q={opacity:O,transition:`opacity 120ms ${Pe}`,maxHeight:"60vh"},e[44]=O,e[45]=q):q=e[45];let Z;e[46]!==a?(Z=a?s.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:s.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:a})}):s.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=a,e[47]=Z):Z=e[47];let X;e[48]!==l||e[49]!==a?(X=l?s.jsx("div",{className:K("pb-4",!a&&"pt-4"),children:l}):null,e[48]=l,e[49]=a,e[50]=X):X=e[50];let te;e[51]!==Z||e[52]!==X?(te=s.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[Z,X]}),e[51]=Z,e[52]=X,e[53]=te):te=e[53];let re;e[54]!==r||e[55]!==i?(re=r||i?s.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:r}),s.jsx("div",{className:"flex items-center gap-2",children:i})]})}):null,e[54]=r,e[55]=i,e[56]=re):re=e[56];let Ve;e[57]!==q||e[58]!==te||e[59]!==re?(Ve=s.jsx("div",{style:w,children:s.jsxs("div",{className:"flex flex-col",style:q,children:[te,re]})}),e[57]=q,e[58]=te,e[59]=re,e[60]=Ve):Ve=e[60];let se;e[61]!==J||e[62]!==Ve?(se=s.jsx("div",{"data-testid":"collapsible-highlight-body",style:J,children:Ve}),e[61]=J,e[62]=Ve,e[63]=se):se=e[63];let ae;return e[64]!==H||e[65]!==se||e[66]!==j||e[67]!==u?(ae=s.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":u,className:j,children:[H,se]}),e[64]=H,e[65]=se,e[66]=j,e[67]=u,e[68]=ae):ae=e[68],ae}function no(t){return!t}const oo=pe({content:ge().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:Be(["pending","in_progress","completed"]),activeForm:ge().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),kt=pe({todos:Gt(oo)}),ro="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";Ws({description:ro,inputSchema:Zs(kt),execute:async({todos:t})=>({ok:!0,count:t.length})});const Vo="tool-todo_write",ao=new Set(["input-available","output-available"]);function io(t){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n.role!=="assistant")continue;const o=n.parts;if(Array.isArray(o))for(let V=o.length-1;V>=0;V--){const a=o[V];if(a.type!==Vo||typeof a.state!="string"||!ao.has(a.state))continue;const r=kt.safeParse(a.input);if(r.success)return r.data.todos}}return[]}function It(t){const e=[];for(const n of t)if("state"in n&&n.state==="approval-requested"&&"approval"in n&&n.approval?.id&&"toolCallId"in n&&n.toolCallId){const o="toolName"in n&&typeof n.toolName=="string"?n.toolName:n.type.startsWith("tool-")?n.type.replace("tool-",""):"Tool";e.push({approvalId:n.approval.id,toolCallId:n.toolCallId,toolName:o,friendlyName:vn(gn(o)),input:n.input})}return e}function Tt(t){return t.at(-1)}function _t(t){const e=[];for(const n of t)n.type==="tool-propose_plan"&&n.state==="input-available"&&e.push({toolCallId:n.toolCallId,plan:n.input.plan,state:n.state});return e}function lo(t){return t?t.message.startsWith("[CREDITS]"):!1}const co={isCreditExhausted:!1,subscriptionErrorKind:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,todos:[]};function uo(t){const{messages:e,error:n,finishReason:o,isStreaming:V,isWaitingForApprovals:a}=t;if(!V&&n&&lo(n))return{...co,isCreditExhausted:!0};const r=e.at(-1),i=r?.role==="assistant"?r.parts:[],l=i,d=!!l.filter(g=>g.type==="tool-user_ask").filter(g=>g.state!=="output-available").length,c=_t(i),u=It(l),p=io(e),h=V?null:ys(n),f=!V&&!!n&&!h,x=u.length>0||V&&a,A=c.length>0,v=!V&&!!o&&o!=="stop"&&!(o==="tool-calls"&&(d||x||A))&&!f;return{isCreditExhausted:!1,subscriptionErrorKind:h,hasTodos:p.length>0,showError:f,showWarning:v,hasApprovals:x,hasPlans:A,isWaitingForUserInput:d,todos:p}}function Dt(){const t=L.c(6),{messages:e,error:n,finishReason:o,isStreaming:V,isWaitingForApprovals:a}=Ue(),r=n??null,i=o??null;let l;return t[0]!==V||t[1]!==a||t[2]!==e||t[3]!==r||t[4]!==i?(l=uo({messages:e,error:r,finishReason:i,isStreaming:V,isWaitingForApprovals:a}),t[0]=V,t[1]=a,t[2]=e,t[3]=r,t[4]=i,t[5]=l):l=t[5],l}function BV(){const t=Dt();return t.isCreditExhausted?0:Number(t.hasTodos)+Number(t.showError)+ +!!t.subscriptionErrorKind+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)}const ot="start-task",mo=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
|
|
2
2
|
|
|
3
3
|
1. Read the report and any attached screenshots. Carry the reporter's own words into the task description, plus the URL of any attachment.
|
|
4
4
|
2. Call TASK_BOARD_ITEM_LIST. Its \`repos\` are this organization's repositories — the only valid values for a task's repo, so pick the one the report is about and never invent a name. Its \`items\` tell you whether an open task already covers this report: if one does, link it and stop.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,l as a,j as d}from"./index-
|
|
1
|
+
import{c as s,l as a,j as d}from"./index-B3yBTWEk.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as h,r as C,l as L}from"./index-
|
|
1
|
+
import{c as k,j as h,r as C,l as L}from"./index-B3yBTWEk.js";import{n as Z}from"./Tool02-C_xRWqQk.js";import{A as y}from"./agent-icon-DrlilhFJ.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
|
package/dist/client/assets/{invite-member-dialog-CsolElt3.js → invite-member-dialog-vPcEYe6v.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{am as B,r as I,I as L,n as O,a as V,aF as K,b as q,e as z,o as p,t as c,K as v,j as n,B as j}from"./index-
|
|
1
|
+
import{am as B,r as I,I as L,n as O,a as V,aF as K,b as q,e as z,o as p,t as c,K as v,j as n,B as j}from"./index-B3yBTWEk.js";import{D as Q,a as k,b as G,c as H,d as U,e as Y}from"./dialog-otnvxVN0.js";import{F as J,d as C,a as D,e as W,b as M,c as S}from"./form-KjPevg0A.js";import{S as X,b as Z,a as $,d as _,c as ee}from"./select-Bc5UZb4n.js";import{T as ne}from"./textarea-CneoU2lJ.js";import{u as oe}from"./use-org-auth-client-4o0wRx2Q.js";import{u as se}from"./use-organization-roles-DzWM9Nv-.js";const ie=B().email("Invalid email address");function te(l){if(!l.trim())return[];const u=l.split(/[,;\n]/).map(r=>r.trim().toLowerCase()).filter(r=>r.length>0);return Array.from(new Set(u))}function he({trigger:l}){const[u,r]=I.useState(!1),{locator:h}=L(),w=oe(),x=O(),{data:F}=V.useSession(),f=F?.user?.email,{roles:E,isLoading:P}=se(),T=E.filter(o=>o.role!=="owner"),t=K({mode:"onChange",defaultValues:{emailsText:"",role:"user"}}),y=t.watch("emailsText"),A=t.watch("role"),m=te(y).filter(o=>{const e=ie.safeParse(o).success,i=!f||o!==f.toLowerCase();return e&&i}),s=q(),a=z({mutationFn:async({emails:o,role:e})=>{if(!e)throw new Error(s("common.inviteMemberDialog.errorSelectRole"));const i=await Promise.allSettled(o.map(async d=>{const g=await w.organization.inviteMember({email:d,role:e});if(g.error)throw new Error(g.error.message);return g.data})),b=i.filter(d=>d.status==="rejected");if(b.length>0)throw new Error(s("common.inviteMemberDialog.errorFailedInvite",{count:b.length}));return i},onSuccess:(o,{emails:e,role:i})=>{p("member_invited",{count:e.length,role:i}),x.invalidateQueries({queryKey:v.members(h)}),x.invalidateQueries({queryKey:v.invitations(h)}),c.success(e.length===1?s("common.inviteMemberDialog.successSingle"):s("common.inviteMemberDialog.successMultiple",{count:e.length})),t.reset({emailsText:"",role:"user"}),r(!1)},onError:(o,{emails:e,role:i})=>{p("member_invite_failed",{count:e.length,role:i,error:o instanceof Error?o.message:String(o)}),c.error(o instanceof Error?o.message:s("common.inviteMemberDialog.errorGeneric"))}}),N=o=>{if(m.length===0){c.error(s("common.inviteMemberDialog.errorNoValidEmail"));return}if(!o.role){c.error(s("common.inviteMemberDialog.errorSelectRole"));return}a.mutate({emails:m,role:o.role})},R=m.length>0&&!!A;return n.jsxs(Q,{open:u,onOpenChange:r,children:[n.jsx(k,{asChild:!0,children:l}),n.jsxs(G,{className:"sm:max-w-lg",children:[n.jsx(H,{children:n.jsx(U,{children:s("common.inviteMemberDialog.title")})}),n.jsx(J,{...t,children:n.jsxs("form",{onSubmit:t.handleSubmit(N),className:"space-y-4",children:[n.jsx(C,{control:t.control,name:"emailsText",render:({field:o})=>n.jsxs(D,{children:[n.jsx(W,{children:s("common.inviteMemberDialog.emailLabel")}),n.jsx(M,{children:n.jsx(ne,{...o,disabled:a.isPending,placeholder:s("common.inviteMemberDialog.emailPlaceholder"),className:"min-h-[120px] resize-none"})}),n.jsx(S,{})]})}),n.jsx(C,{control:t.control,name:"role",render:({field:o})=>n.jsxs(D,{children:[n.jsx(M,{children:n.jsxs(X,{value:o.value,onValueChange:o.onChange,disabled:a.isPending||P,children:[n.jsx(Z,{className:"w-full",children:n.jsx($,{placeholder:s("common.inviteMemberDialog.roleSelectPlaceholder")})}),n.jsx(_,{children:T.map(e=>{const i=[];return e.isBuiltin||(e.allowsAllStaticPermissions?i.push(s("common.inviteMemberDialog.permFullOrgAccess")):e.staticPermissionCount&&e.staticPermissionCount>0&&i.push(s("common.inviteMemberDialog.permOrgPerms",{count:e.staticPermissionCount})),e.allowsAllConnections?i.push(s("common.inviteMemberDialog.permAllConnections")):e.connectionCount&&e.connectionCount>0&&i.push(s("common.inviteMemberDialog.permConnections",{count:e.connectionCount})),(e.connectionCount!==0||e.allowsAllConnections)&&(e.allowsAllTools?i.push(s("common.inviteMemberDialog.permAllTools")):e.toolCount&&e.toolCount>0&&i.push(s("common.inviteMemberDialog.permTools",{count:e.toolCount})))),n.jsx(ee,{value:e.role,children:n.jsxs("div",{className:"flex flex-col",children:[n.jsx("span",{children:e.label}),!e.isBuiltin&&i.length>0&&n.jsx("span",{className:"text-xs text-muted-foreground",children:i.join(", ")})]})},e.role)})})]})}),n.jsx(S,{})]})}),n.jsxs(Y,{children:[n.jsx(j,{variant:"outline",onClick:()=>{t.reset({emailsText:"",role:"user"}),r(!1)},type:"button",disabled:a.isPending,children:s("common.inviteMemberDialog.cancelButton")}),n.jsx(j,{type:"submit",disabled:a.isPending||!R,children:a.isPending?s("common.inviteMemberDialog.invitingButton"):s("common.inviteMemberDialog.inviteButton",{count:m.length||0})})]})]})})]})]})}export{he as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as r,j as i,bJ as p}from"./index-
|
|
1
|
+
import{c as n,l as r,j as i,bJ as p}from"./index-B3yBTWEk.js";function c(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{c as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,j as s,b,h as j,B as _,L as y,i as g,O as v,k as N,l as S}from"./index-
|
|
1
|
+
import{c as p,j as s,b,h as j,B as _,L as y,i as g,O as v,k as N,l as S}from"./index-B3yBTWEk.js";import{R as A}from"./required-auth-layout-BEc3NUsQ.js";import{u as R}from"./use-deployment-admin-D6IzoXV0.js";const T=[{to:"/_admin/users",labelKey:"admin.layout.usersTab"},{to:"/_admin/orgs",labelKey:"admin.layout.organizationsTab"},{to:"/_admin/prompts",labelKey:"admin.layout.promptsTab"}];function k(){const e=p.c(6);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={select:D},e[0]=o):o=e[0];const c=N(o),r=b();let t;e[1]!==c||e[2]!==r?(t=T.map(i=>s.jsx(y,{to:i.to,className:S("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",c.startsWith(i.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r(i.labelKey)},i.to)),e[1]=c,e[2]=r,e[3]=t):t=e[3];let a;return e[4]!==t?(a=s.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:t}),e[4]=t,e[5]=a):a=e[5],a}function D(e){return e.location.pathname}function K(){const e=p.c(22),{isAdmin:o,loading:c,needsEmailVerification:r}=R(),t=b();if(c){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:s.jsx(j,{className:"size-5 text-muted-foreground"})}),e[0]=n):n=e[0],n}if(!o){let n;e[1]!==t?(n=t("admin.layout.adminDashboardArea"),e[1]=t,e[2]=n):n=e[2];let l;e[3]!==r||e[4]!==t?(l=t(r?"admin.layout.emailVerificationRequired":"admin.layout.restrictedToDashboard"),e[3]=r,e[4]=t,e[5]=l):l=e[5];let m;e[6]!==t?(m=t("admin.layout.goHome"),e[6]=t,e[7]=m):m=e[7];let d;e[8]!==m?(d=s.jsx(_,{variant:"outline",size:"sm",asChild:!0,children:s.jsx(y,{to:"/",children:m})}),e[8]=m,e[9]=d):d=e[9];let h;return e[10]!==n||e[11]!==l||e[12]!==d?(h=s.jsx(g,{area:n,description:l,action:d}),e[10]=n,e[11]=l,e[12]=d,e[13]=h):h=e[13],h}let a;e[14]!==t?(a=t("admin.layout.adminDashboard"),e[14]=t,e[15]=a):a=e[15];let i;e[16]!==a?(i=s.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:s.jsx("h1",{className:"pb-4 text-xl font-medium",children:a})}),e[16]=a,e[17]=i):i=e[17];let u;e[18]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(k,{}),e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(v,{})}),e[19]=f):f=e[19];let x;return e[20]!==i?(x=s.jsxs("div",{className:"flex h-dvh flex-col overflow-hidden bg-background",children:[i,u,f]}),e[20]=i,e[21]=x):x=e[21],x}function E(){const e=p.c(1);let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(A,{children:s.jsx(K,{})}),e[0]=o):o=e[0],o}export{E as default};
|
package/dist/client/assets/{legacy-agents-deep-DJ_t0QLc.js → legacy-agents-deep-CpKjJlPs.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as _,f as h,u as x,I as j,en as S,au as b,fk as v,j as p,N as d}from"./index-
|
|
1
|
+
import{c as _,f as h,u as x,I as j,en as S,au as b,fk as v,j as p,N as d}from"./index-B3yBTWEk.js";import{L as I}from"./legacy-main-redirect-ZPChWdtD.js";import"./thread-route-CKY-dKC0.js";function R(){const e=_.c(16);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const g=h(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const s=x(n),{org:t}=j(),f="_splat"in g&&typeof g._splat=="string"?g._splat:"";let c,a;if(e[2]!==t.id||e[3]!==t.slug||e[4]!==s||e[5]!==f){a=Symbol.for("react.early_return_sentinel");e:{const m=f.split("/").find(Boolean);if(!m){let r;e[8]!==t.slug?(r={org:t.slug},e[8]=t.slug,e[9]=r):r=e[9];let u;e[10]!==s||e[11]!==r?(u=p.jsx(d,{to:"/$org/projects",params:r,search:s,hash:!0,replace:!0}),e[10]=s,e[11]=r,e[12]=u):u=e[12],a=u;break e}const y=S({virtualMcpIdSearch:s.virtualmcpid,fallbackAgentId:b(t.id).id});c=v({org:t.slug,agentId:y,panel:m,source:"view-first",search:s})}e[2]=t.id,e[3]=t.slug,e[4]=s,e[5]=f,e[6]=c,e[7]=a}else c=e[6],a=e[7];if(a!==Symbol.for("react.early_return_sentinel"))return a;const l=c;let i;return e[13]!==t.slug||e[14]!==l?(i=l?.kind==="canonical"?p.jsx(I,{target:{route:l.route,search:l.search}}):p.jsx(d,{to:"/$org/home",params:{org:t.slug},replace:!0}),e[13]=t.slug,e[14]=l,e[15]=i):i=e[15],i}export{R as default};
|
package/dist/client/assets/{legacy-main-redirect-CySqEohs.js → legacy-main-redirect-ZPChWdtD.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,C as t,j as p,N as m,ae as c,f as y,u as I,a0 as E,en as k,eo as R,ep as S,eq as L}from"./index-
|
|
1
|
+
import{c as v,C as t,j as p,N as m,ae as c,f as y,u as I,a0 as E,en as k,eo as R,ep as S,eq as L}from"./index-B3yBTWEk.js";import{a as b}from"./thread-route-CKY-dKC0.js";function C(x){const a=v.c(78),{target:h}=x,{route:s,search:r}=h;switch(s.to){case c.home:{let e;return a[0]!==s.params||a[1]!==r?(e=p.jsx(m,{to:c.home,params:s.params,search:r,hash:!0,replace:!0}),a[0]=s.params,a[1]=r,a[2]=e):e=a[2],e}case c.tasks:{let e;return a[3]!==s.params||a[4]!==r?(e=p.jsx(m,{to:c.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[3]=s.params,a[4]=r,a[5]=e):e=a[5],e}case c.reports:{let e;return a[6]!==s.params||a[7]!==r?(e=p.jsx(m,{to:c.reports,params:s.params,search:r,hash:!0,replace:!0}),a[6]=s.params,a[7]=r,a[8]=e):e=a[8],e}case c.discover:{let e;return a[9]!==s.params||a[10]!==r?(e=p.jsx(m,{to:c.discover,params:s.params,search:r,hash:!0,replace:!0}),a[9]=s.params,a[10]=r,a[11]=e):e=a[11],e}case c.library:{let e;return a[12]!==s.params||a[13]!==r?(e=p.jsx(m,{to:c.library,params:s.params,search:r,hash:!0,replace:!0}),a[12]=s.params,a[13]=r,a[14]=e):e=a[14],e}case t.root:{let e;return a[15]!==s.params||a[16]!==r?(e=p.jsx(m,{to:t.root,params:s.params,search:r,hash:!0,replace:!0}),a[15]=s.params,a[16]=r,a[17]=e):e=a[17],e}case t.tasks:{let e;return a[18]!==s.params||a[19]!==r?(e=p.jsx(m,{to:t.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[18]=s.params,a[19]=r,a[20]=e):e=a[20],e}case t.reports:{let e;return a[21]!==s.params||a[22]!==r?(e=p.jsx(m,{to:t.reports,params:s.params,search:r,hash:!0,replace:!0}),a[21]=s.params,a[22]=r,a[23]=e):e=a[23],e}case t.siteEditor:{let e;return a[24]!==s.params||a[25]!==r?(e=p.jsx(m,{to:t.siteEditor,params:s.params,search:r,hash:!0,replace:!0}),a[24]=s.params,a[25]=r,a[26]=e):e=a[26],e}case t.siteEditorContent:{let e;return a[27]!==s.params||a[28]!==r?(e=p.jsx(m,{to:t.siteEditorContent,params:s.params,search:r,hash:!0,replace:!0}),a[27]=s.params,a[28]=r,a[29]=e):e=a[29],e}case t.siteEditorCode:{let e;return a[30]!==s.params||a[31]!==r?(e=p.jsx(m,{to:t.siteEditorCode,params:s.params,search:r,hash:!0,replace:!0}),a[30]=s.params,a[31]=r,a[32]=e):e=a[32],e}case t.settings:{let e;return a[33]!==s.params||a[34]!==r?(e=p.jsx(m,{to:t.settings,params:s.params,search:r,hash:!0,replace:!0}),a[33]=s.params,a[34]=r,a[35]=e):e=a[35],e}case t.assets:{let e;return a[36]!==s.params||a[37]!==r?(e=p.jsx(m,{to:t.assets,params:s.params,search:r,hash:!0,replace:!0}),a[36]=s.params,a[37]=r,a[38]=e):e=a[38],e}case t.git:{let e;return a[39]!==s.params||a[40]!==r?(e=p.jsx(m,{to:t.git,params:s.params,search:r,hash:!0,replace:!0}),a[39]=s.params,a[40]=r,a[41]=e):e=a[41],e}case t.hosting:{let e;return a[42]!==s.params||a[43]!==r?(e=p.jsx(m,{to:t.hosting,params:s.params,search:r,hash:!0,replace:!0}),a[42]=s.params,a[43]=r,a[44]=e):e=a[44],e}case t.e2e:{let e;return a[45]!==s.params||a[46]!==r?(e=p.jsx(m,{to:t.e2e,params:s.params,search:r,hash:!0,replace:!0}),a[45]=s.params,a[46]=r,a[47]=e):e=a[47],e}case t.analytics:{let e;return a[48]!==s.params||a[49]!==r?(e=p.jsx(m,{to:t.analytics,params:s.params,search:r,hash:!0,replace:!0}),a[48]=s.params,a[49]=r,a[50]=e):e=a[50],e}case t.monitor:{let e;return a[51]!==s.params||a[52]!==r?(e=p.jsx(m,{to:t.monitor,params:s.params,search:r,hash:!0,replace:!0}),a[51]=s.params,a[52]=r,a[53]=e):e=a[53],e}case t.automations:{let e;return a[54]!==s.params||a[55]!==r?(e=p.jsx(m,{to:t.automations,params:s.params,search:r,hash:!0,replace:!0}),a[54]=s.params,a[55]=r,a[56]=e):e=a[56],e}case t.automation:{let e;return a[57]!==s.params||a[58]!==r?(e=p.jsx(m,{to:t.automation,params:s.params,search:r,hash:!0,replace:!0}),a[57]=s.params,a[58]=r,a[59]=e):e=a[59],e}case t.app:{let e;return a[60]!==s.params||a[61]!==r?(e=p.jsx(m,{to:t.app,params:s.params,search:r,hash:!0,replace:!0}),a[60]=s.params,a[61]=r,a[62]=e):e=a[62],e}case t.view:{let e;return a[63]!==s.params||a[64]!==r?(e=p.jsx(m,{to:t.view,params:s.params,search:r,hash:!0,replace:!0}),a[63]=s.params,a[64]=r,a[65]=e):e=a[65],e}case t.outputFile:{let e;return a[66]!==s.params||a[67]!==r?(e=p.jsx(m,{to:t.outputFile,params:s.params,search:r,hash:!0,replace:!0}),a[66]=s.params,a[67]=r,a[68]=e):e=a[68],e}case t.outputDeck:{let e;return a[69]!==s.params||a[70]!==r?(e=p.jsx(m,{to:t.outputDeck,params:s.params,search:r,hash:!0,replace:!0}),a[69]=s.params,a[70]=r,a[71]=e):e=a[71],e}case t.libraryFile:{let e;return a[72]!==s.params||a[73]!==r?(e=p.jsx(m,{to:t.libraryFile,params:s.params,search:r,hash:!0,replace:!0}),a[72]=s.params,a[73]=r,a[74]=e):e=a[74],e}case t.connectSources:{let e;return a[75]!==s.params||a[76]!==r?(e=p.jsx(m,{to:t.connectSources,params:s.params,search:r,hash:!0,replace:!0}),a[75]=s.params,a[76]=r,a[77]=e):e=a[77],e}}}function A(x){const a=v.c(17),{children:h}=x;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},a[0]=s):s=a[0];const r=y(s);let e;a[1]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},a[1]=e):e=a[1];const u=I(e),j=b(),g=E(),i=r.org;if(!i||r.taskId!==void 0||r._splat!==void 0)return h??null;let n,f;a[2]!==j||a[3]!==g||a[4]!==i||a[5]!==r.agentId||a[6]!==u?(n=k({agentIdParam:r.agentId,virtualMcpIdSearch:u.virtualmcpid,fallbackAgentId:j}),f=(u.main!==void 0?R({org:i,agentId:n,main:u.main,search:u}):null)??S({org:i,routePath:g,search:u}),a[2]=j,a[3]=g,a[4]=i,a[5]=r.agentId,a[6]=u,a[7]=n,a[8]=f):(n=a[7],f=a[8]);const o=f;if(o?.kind==="same-route"){let l;return a[9]!==o.search?(l=p.jsx(m,{to:".",search:o.search,hash:!0,replace:!0}),a[9]=o.search,a[10]=l):l=a[10],l}if(o?.kind==="canonical"){let l;return a[11]!==o?(l=p.jsx(C,{target:o}),a[11]=o,a[12]=l):l=a[12],l}if(r.agentId!==void 0&&r.agentId===n&&u.virtualmcpid!==void 0){let l;a[13]!==u?(l=L(u),a[13]=u,a[14]=l):l=a[14];let d;return a[15]!==l?(d=p.jsx(m,{to:".",search:l,hash:!0,replace:!0}),a[15]=l,a[16]=d):d=a[16],d}return h??null}export{C as L,A as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as F,b as X,j as t,as as te,I as de,n as Xe,r as T,B as H,ap as Qe,l as De,K as _,t as L,d as dt,R as ut,u as pt,aq as mt,es as ft}from"./index-
|
|
1
|
+
import{c as F,b as X,j as t,as as te,I as de,n as Xe,r as T,B as H,ap as Qe,l as De,K as _,t as L,d as dt,R as ut,u as pt,aq as mt,es as ft}from"./index-B3yBTWEk.js";import{s as ht}from"./Eye-dnrP5DkM.js";import{s as bt}from"./Plus-Bxp02MWl.js";import{i as xt}from"./SearchLg-FC9suxna.js";import{i as $e}from"./Upload01-CqWnAR1-.js";import{s as gt}from"./XClose-Cw4b4Uag.js";import{A as yt,a as vt,b as jt,c as wt,d as kt,e as St,f as Nt,g as Pt}from"./alert-dialog-BE9ltHtr.js";import{b as Le,D as Me,d as Ve,i as Ct,c as Ye,h as Ge,e as We}from"./dialog-otnvxVN0.js";import{I as ye}from"./input-HFOrJf5B.js";import{p as Ze,b as M,s as ce,H as je,h as we,a as oe,c as _e,d as et}from"./location-oTTXFrSF.js";import{u as Ot}from"./use-debounced-value-Cud3o3Fq.js";import{c as ke,i as Fe,d as Dt,h as Ue,l as tt,m as $t,n as rt,j as Ft,o as Tt}from"./use-org-fs-BEoPvlnI.js";import{f as Et,p as At,g as Rt,u as zt,e as Bt,a as Lt,F as Se,t as st,S as Mt,B as Vt,b as at,R as Ut,c as Ht}from"./cards-DTFINi5r.js";import{T as Kt}from"./textarea-CneoU2lJ.js";import{t as qt,n as It}from"./ChevronUp-DGrguvGW.js";import{a as Je}from"./Palette-CglyAOTg.js";import{b as Qt}from"./Printer-fz_zwxfT.js";import{a as Yt}from"./markdown-B1038zFJ.js";import{S as Gt}from"./file-share-button-Cef5f1VZ.js";import{L as Wt}from"./preview-dialog-b2QyOGzU.js";import{S as lt}from"./skill-preview-CGe8kUoa.js";import{i as Jt}from"./ChevronRight-DzRB-rdO.js";import{t as Xt}from"./Stars01-COChWymR.js";import{i as Zt}from"./Zap-ChVc0p76.js";import{i as _t}from"./GitBranch01-BBn4dN5f.js";import{b as er}from"./use-panel-navigate-Byvx0cbx.js";import"./DotsVertical-CucJCL9y.js";import"./Download01-BC2rKbuh.js";import"./Share07-D_kiq5Fr.js";import"./Globe01-SLAc63wC.js";import"./Key01-CKcg8G1v.js";import"./Trash01-DqUm2RRh.js";import"./dropdown-menu-BxKUbUkE.js";import"./Check-BWpBE9uf.js";import"./file-type-icon-DGllFDOf.js";import"./folder-icon-p8jB76CU.js";import"./Copy01-DayLu0dF.js";import"./ZoomOut-BXPGwF_O.js";import"./thread-route-CKY-dKC0.js";import"./LinkExternal01-Cp7uxK1i.js";import"./popover-DIqZ2IKF.js";import"./preview-content-B5xB74fu.js";import"./file-preview-18IJQMnU.js";import"./utils-B14U8IKK.js";import"./File02-BhckHV8N.js";import"./Image01-BrHSH-Vi.js";import"./editor-DCxsAs7o.js";import"./use-project-scope-B2cuvtTy.js";import"./use-virtual-mcp-Bk09OpEg.js";import"./use-mcp-client-DsJzBus3.js";import"./auth-RjDDTUUT.js";import"./github-repo-C0igpkr9.js";function tr(l){const e=l("library.brandComponentsPreview.title"),s=l("library.brandComponentsPreview.subtitle"),r=l("library.brandComponentsPreview.monthlySavingsLabel"),u=l("library.brandComponentsPreview.primaryButton"),n=l("library.brandComponentsPreview.secondaryButton"),o=l("library.brandComponentsPreview.ghostButton"),d=l("library.brandComponentsPreview.successBadge"),i=l("library.brandComponentsPreview.warningBadge"),c=l("library.brandComponentsPreview.errorBadge"),p=l("library.brandComponentsPreview.infoBadge"),h=l("library.brandComponentsPreview.allChip"),m=l("library.brandComponentsPreview.incomeChip"),w=l("library.brandComponentsPreview.spendingChip"),x=l("library.brandComponentsPreview.emailPlaceholder");return`
|
|
2
2
|
<div class="stack">
|
|
3
3
|
<div>
|
|
4
4
|
<h1>${e}</h1>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as R,a as m,r as _,u as C,j as u,N as y}from"./index-
|
|
1
|
+
import{c as R,a as m,r as _,u as C,j as u,N as y}from"./index-B3yBTWEk.js";import{u as U,A as j,a as k}from"./auth-entry-ddblLMjc.js";import{A as N}from"./auth-split-layout-oGs_kK_4.js";import"./input-HFOrJf5B.js";import"./use-is-desktop-app-BNujXJc_.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";function O(){const e=R.c(5),t=U(),o=m.useSession();_.useRef(null);const i=t.status,c=o.data!=null,r=o.isPending;let n,s;e[0]!==c||e[1]!==r||e[2]!==i?(n=()=>{},s=[i,c,r],e[0]=c,e[1]=r,e[2]=i,e[3]=n,e[4]=s):(n=e[3],s=e[4]),_.useEffect(n,s)}const h="studio_signup_ref",a="studio_signup_src",$=720*60*60,f=128;function p(e){const t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?.[1]?decodeURIComponent(t[1]):null}function g(e,t){document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=${$}; samesite=lax`}function b(e){e.ref&&e.ref.length<=f&&!p(h)&&g(h,e.ref),e.src&&e.src.length<=f&&!p(a)&&g(a,e.src)}function w(e){if(!e.client_id||e.response_type!=="code")return null;const t=new URLSearchParams;return e.client_id&&t.set("client_id",e.client_id),e.redirect_uri&&t.set("redirect_uri",e.redirect_uri),e.response_type&&t.set("response_type",e.response_type),e.state&&t.set("state",e.state),e.scope&&t.set("scope",e.scope),e.code_challenge&&t.set("code_challenge",e.code_challenge),e.code_challenge_method&&t.set("code_challenge_method",e.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function G(){const e=m.useSession();O();const t=C({from:"/login"}),{next:o="/",client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:x,code_challenge_method:A,src:S,ref:E}=t;b({src:S,ref:E});const d=o.startsWith("/")&&!o.startsWith("//")?o:"/",l=w({client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:x,code_challenge_method:A});return e.data?l?(window.location.href=l,u.jsx(j,{})):u.jsx(y,{to:d}):u.jsx(N,{children:u.jsx(k,{callbackUrl:d,redirectUrl:l})})}export{G as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cG as Yl,j as G,aI as lt,er as jn,c as Ye,b as _n,r as Ve,_ as A0,l as Vb,d as _0,R as I0,f as k0,es as R0,B as Yb}from"./index-
|
|
1
|
+
import{cG as Yl,j as G,aI as lt,er as jn,c as Ye,b as _n,r as Ve,_ as A0,l as Vb,d as _0,R as I0,f as k0,es as R0,B as Yb}from"./index-B3yBTWEk.js";import{i as Wb}from"./Check-BWpBE9uf.js";import{a as Kb}from"./Copy01-DayLu0dF.js";import{D as N0,g as C0,f as v0,d as w0}from"./dialog-otnvxVN0.js";import{n as x0}from"./Download01-BC2rKbuh.js";import{a as O0,n as L0}from"./ZoomOut-BXPGwF_O.js";import{b as D0}from"./use-panel-navigate-Byvx0cbx.js";import{c as M0}from"./thread-route-CKY-dKC0.js";function Wl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=Wl();function Xb(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},P0=/^(?:[ \t]*(?:\n|$))+/,F0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,B0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,In=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,U0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Kl=/(?:[*+-]|\d{1,9}[.)])/,Zb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Qb=le(Zb).replace(/bull/g,Kl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),H0=le(Zb).replace(/bull/g,Kl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Xl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,q0=/^[^\n]+/,Zl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,G0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Zl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Kl).getRegex(),tr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ql=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,z0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ql).replace("tag",tr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Jb=le(Xl).replace("hr",In).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tr).getRegex(),j0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Jb).getRegex(),Jl={blockquote:j0,code:F0,def:G0,fences:B0,heading:U0,hr:In,html:z0,lheading:Qb,list:$0,newline:P0,paragraph:Jb,table:ln,text:q0},Bc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",In).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tr).getRegex(),V0={...Jl,lheading:H0,table:Bc,paragraph:le(Xl).replace("hr",In).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tr).getRegex()},Y0={...Jl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ql).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Xl).replace("hr",In).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",Qb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},W0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,K0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,eE=/^( {2,}|\\)\n(?!\s*$)/,X0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,nr=/[\p{P}\p{S}]/u,ec=/[\s\p{P}\p{S}]/u,tE=/[^\s\p{P}\p{S}]/u,Z0=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ec).getRegex(),nE=/(?!~)[\p{P}\p{S}]/u,Q0=/(?!~)[\s\p{P}\p{S}]/u,J0=/(?:[^\s\p{P}\p{S}]|~)/u,eS=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,rE=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,tS=le(rE,"u").replace(/punct/g,nr).getRegex(),nS=le(rE,"u").replace(/punct/g,nE).getRegex(),aE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",rS=le(aE,"gu").replace(/notPunctSpace/g,tE).replace(/punctSpace/g,ec).replace(/punct/g,nr).getRegex(),aS=le(aE,"gu").replace(/notPunctSpace/g,J0).replace(/punctSpace/g,Q0).replace(/punct/g,nE).getRegex(),iS=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,tE).replace(/punctSpace/g,ec).replace(/punct/g,nr).getRegex(),oS=le(/\\(punct)/,"gu").replace(/punct/g,nr).getRegex(),sS=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),uS=le(Ql).replace("(?:-->|$)","-->").getRegex(),lS=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",uS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Vn=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,cS=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Vn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),iE=le(/^!?\[(label)\]\[(ref)\]/).replace("label",Vn).replace("ref",Zl).getRegex(),oE=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",Zl).getRegex(),dS=le("reflink|nolink(?!\\()","g").replace("reflink",iE).replace("nolink",oE).getRegex(),tc={_backpedal:ln,anyPunctuation:oS,autolink:sS,blockSkip:eS,br:eE,code:K0,del:ln,emStrongLDelim:tS,emStrongRDelimAst:rS,emStrongRDelimUnd:iS,escape:W0,link:cS,nolink:oE,punctuation:Z0,reflink:iE,reflinkSearch:dS,tag:lS,text:X0,url:ln},pS={...tc,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",Vn).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Vn).getRegex()},Il={...tc,emStrongRDelimAst:aS,emStrongLDelim:nS,url:le(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},fS={...Il,br:le(eE).replace("{2,}","*").getRegex(),text:le(Il.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},On={normal:Jl,gfm:V0,pedantic:Y0},Jt={normal:tc,gfm:Il,breaks:fS,pedantic:pS},gS={"&":"&","<":"<",">":">",'"':""","'":"'"},Uc=e=>gS[e];function Je(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,Uc)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,Uc);return e}function Hc(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function qc(e,t){const n=e.replace(xe.findPipe,(i,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),r=n.split(xe.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(xe.slashPipe,"|");return r}function en(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function mS(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Gc(e,t,n,r,a){const i=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,u}function hS(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
|
|
3
3
|
`).map(i=>{const o=i.match(n.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=a.length?i.slice(a.length):i}).join(`
|
|
4
4
|
`)}var Yn=class{options;rules;lexer;constructor(e){this.options=e||Nt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:en(n,`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as N,c as H,j as d,eY as G,eZ as K,o as Q,v as X,l as B,h as J}from"./index-
|
|
1
|
+
import{r as N,c as H,j as d,eY as G,eZ as K,o as Q,v as X,l as B,h as J}from"./index-B3yBTWEk.js";import{D as ee,E as te,C as ne}from"./types-Csu6Ims7.js";const z=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function oe(o,e={}){const n=`<meta http-equiv="Content-Security-Policy" content="${ie(e)}">`,s=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,i=o.match(s);if(i){const l=(i.index??0)+i[0].length;return o.slice(0,l)+`
|
|
2
2
|
`+n+o.slice(l)}const r=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,a=o.match(r);if(a){const l=(a.index??0)+a[0].length;return o.slice(0,l)+`
|
|
3
3
|
<head>
|
|
4
4
|
`+n+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as D,a as H,e as z,b as J}from"./auth-
|
|
1
|
+
import{d as D,a as H,e as z,b as J}from"./auth-RjDDTUUT.js";import{bp as L}from"./index-B3yBTWEk.js";function K(){return window.location.origin}function R(){try{const e=window.location.hostname;return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}const P="mcp:oauth:callback:";let O=null;const W=1e3,j=10*6e4,C=15e3;class F{_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(t){this._redirectUrl=t.callbackUrl??O?.redirectUrl??`${K()}/oauth/callback`,this._windowMode=t.windowMode??"popup";const n=t.scope?Array.isArray(t.scope)?t.scope.join(" "):t.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:t.clientName??"@decocms/studio MCP client",...n&&{scope:n}}}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(t){this._clientInfo=t}tokens(){return this._tokens??void 0}saveTokens(t){this._tokens=t}redirectToAuthorization(t){if(this._windowMode==="tab"){if(!window.open(t.toString(),"_blank"))throw new Error("Tab was blocked")}else{const s=window.screenX+(window.outerWidth-600)/2,o=window.screenY+(window.outerHeight-700)/2;if(!window.open(t.toString(),"mcp-oauth",`width=600,height=700,left=${s},top=${o},popup=yes`)&&!window.open(t.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(t){this._codeVerifier=t}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}}async function B(e){const t=L(e,window.location.origin),n=e.orgSlug?`/api/${encodeURIComponent(e.orgSlug)}/mcp/${e.connectionId}`:`/mcp/${e.connectionId}`,i=new URL(n,t),s=new F({serverUrl:i.href,clientName:e.clientName,clientUri:e.clientUri,callbackUrl:e.callbackUrl,scope:e.scope,windowMode:e.windowMode}),o={fn:null};try{const r=new Promise((u,d)=>{const y=e.timeout||j;let m,p,b,f=!1;const $=s.state(),S=`${P}${$}`,h=()=>{window.removeEventListener("message",E),window.removeEventListener("storage",U),clearTimeout(m),clearInterval(p),clearInterval(b);try{localStorage.removeItem(S)}catch{}};o.fn=c=>{f||(f=!0,h(),d(c))};const A=async c=>{if(f)return;if(f=!0,!c.success){h(),d(new Error(c.error||"OAuth authentication failed"));return}const{code:k,state:V}=c;if(!k){h(),d(new Error("Missing authorization code"));return}if(s.getStoredState()!==V){h(),d(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const M=(await D(i))?.authorization_servers?.[0]||i,I=await H(M),g=s.clientInformation();if(!g){h(),d(new Error("Client information not found"));return}const N=s.codeVerifier(),x=await z(M,{metadata:I,clientInformation:g,authorizationCode:k,codeVerifier:N,redirectUri:s.redirectUrl,resource:new URL(i)});h(),u({tokens:x,clientId:g.client_id??null,clientSecret:g.client_secret??null,tokenEndpoint:I?.token_endpoint??null,userinfoEndpoint:I?.userinfo_endpoint??null})}catch(v){h(),d(v)}},E=async c=>{!R()&&c.origin!==window.location.origin||c.data?.type==="mcp:oauth:callback"&&await A(c.data)},U=async c=>{if(!(c.key!==S||!c.newValue))try{const k=JSON.parse(c.newValue);await A(k)}catch{}};window.addEventListener("message",E),window.addEventListener("storage",U),b=setInterval(()=>{if(f)return;let c=null;try{c=localStorage.getItem(S)}catch{return}if(c)try{A(JSON.parse(c))}catch{}},W),m=setTimeout(()=>{f||(f=!0,h(),d(new Error("OAuth authentication timeout")))},y)});if(r.catch(()=>{}),await J(s,{serverUrl:i})==="REDIRECT"){const u=await r;return{token:u.tokens.access_token,tokenInfo:{accessToken:u.tokens.access_token,refreshToken:u.tokens.refresh_token??null,expiresIn:u.tokens.expires_in??null,scope:u.tokens.scope??null,clientId:u.clientId,clientSecret:u.clientSecret,tokenEndpoint:u.tokenEndpoint,userinfoEndpoint:u.userinfoEndpoint,idToken:u.tokens.id_token??null},error:null}}const l=s.tokens(),w=s.clientInformation();return{token:l?.access_token||null,tokenInfo:l?{accessToken:l.access_token,refreshToken:l.refresh_token??null,expiresIn:l.expires_in??null,scope:l.scope??null,clientId:w?.client_id??null,clientSecret:w?.client_secret??null,tokenEndpoint:null,userinfoEndpoint:null,idToken:l.id_token??null}:null,error:null}}catch(r){return o.fn&&o.fn(r instanceof Error?r:new Error(String(r))),{token:null,tokenInfo:null,error:r instanceof Error?r.message:String(r)}}}function T(e,t){if(window.opener&&!window.opener.closed){const n=R()?"*":window.location.origin;return window.opener.postMessage(e,n),!0}if(t)try{const n=`${P}${t}`;return localStorage.setItem(n,JSON.stringify(e)),!0}catch{}return!1}async function ee(){const e=new URLSearchParams(window.location.search),t=e.get("code");let n=e.get("state");const i=e.get("error"),s=e.get("error_description");let o=n;if(n)try{const a=atob(n),l=JSON.parse(a);l.clientState&&(o=l.clientState)}catch{}if(i){const a=s||i;return T({type:"mcp:oauth:callback",success:!1,error:a},o),{success:!1,error:a}}if(!t||!n){const a="Missing code or state parameter";return T({type:"mcp:oauth:callback",success:!1,error:a},o),{success:!1,error:a}}return n=o||n,T({type:"mcp:oauth:callback",success:!0,code:t,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function _(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function G(e){try{const t=_(),n=t?new URL(e,t):new URL(e),i=n.pathname.match(/^\/api\/[^/]+\/mcp\/([^/]+)/);return i?i[1]??null:n.pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}function Y(e){try{const t=_();return(t?new URL(e,t):new URL(e)).pathname.match(/^\/api\/([^/]+)\/mcp\//)?.[1]??null}catch{return null}}async function X(e,t,n){try{const i=`/api/${encodeURIComponent(t)}/connections/${e}/oauth-token/status`,s=n?new URL(i,n).href:i,o=_(),r=!n||new URL(n).origin===o,a=await fetch(s,{credentials:r?"include":"omit"});return a.ok?{hasToken:(await a.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function te({url:e,token:t,orgId:n,studioUrl:i,meshUrl:s}){try{const o=new Headers;o.set("Content-Type","application/json"),o.set("Accept","application/json, text/event-stream");const r=await fetch(e,{method:"POST",headers:o,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/studio MCP client",version:"1.0.0"}}}),signal:AbortSignal.timeout(C)}),a=G(e),l=Y(e),w=_(),u=L({studioUrl:i,meshUrl:s},w?new URL(e,w).origin:new URL(e).origin);if(r.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(a&&l?await X(a,l,u):{hasToken:!1}).hasToken};let d;try{const p=await r.json();d=p.error||p.message}catch{}return r.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:d||`HTTP ${r.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!r.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:d||`HTTP ${r.status}`}}catch(o){return console.error("[isConnectionAuthenticated] Error:",o),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:o instanceof Error&&o.name==="TimeoutError"?`Connection check timed out after ${C/1e3}s`:o.message}}}export{B as a,ee as h,te as i};
|