decocms 4.414.0 → 4.415.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-DaJjYzK7.js → AlertCircle-CvaSOOO8.js} +1 -1
- package/dist/client/assets/AreaChart-C1zWMN3A.js +1 -0
- package/dist/client/assets/{ArrowLeft-CwZA6hhm.js → ArrowLeft-BsqlBCdi.js} +1 -1
- package/dist/client/assets/{ArrowRight-DlEEL0oL.js → ArrowRight-B6VZdTtP.js} +1 -1
- package/dist/client/assets/{ArrowUp-BVYCIIGM.js → ArrowUp-C1c3cSMN.js} +1 -1
- package/dist/client/assets/CartesianChart-DT33HVeq.js +6 -0
- package/dist/client/assets/{Check-OcoBiXmm.js → Check-ClKm876e.js} +1 -1
- package/dist/client/assets/{CheckCircle-Dd90iqND.js → CheckCircle-B38I9lsp.js} +1 -1
- package/dist/client/assets/{ChevronUp-CD5mSK7Y.js → ChevronUp-BBBSFlle.js} +1 -1
- package/dist/client/assets/{Copy01-BJqw8z9b.js → Copy01-kb1901QR.js} +1 -1
- package/dist/client/assets/{CreditCard01-BWWARSB9.js → CreditCard01-DkYuXaNf.js} +1 -1
- package/dist/client/assets/{DotsVertical-Chnn0E-M.js → DotsVertical-OXZ2C8qE.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CWEL9dCO.js → ErrorBarContext-CSFQ9ttu.js} +1 -1
- package/dist/client/assets/Image01-xbxm22_Y.js +1 -0
- package/dist/client/assets/{Key01-CD0lgLSw.js → Key01-ZIYydTtn.js} +1 -1
- package/dist/client/assets/{Line-Bg6fTk0a.js → Line-C_txxRhK.js} +1 -1
- package/dist/client/assets/{Link01-CDLS3D8E.js → Link01-cXYRJQde.js} +1 -1
- package/dist/client/assets/{LinkExternal01-ClZInLaB.js → LinkExternal01-UxTfoueY.js} +1 -1
- package/dist/client/assets/{Monitor01-BdQ0e4n3.js → Monitor01-CINH3FWT.js} +1 -1
- package/dist/client/assets/{Globe04-BrBw0Avb.js → Palette-C2svjF4J.js} +1 -1
- package/dist/client/assets/{Plus-Du1X0BSn.js → Plus-Bv10xzXZ.js} +1 -1
- package/dist/client/assets/{SearchMd-BhrVtQgO.js → SearchMd-DRAIsS0-.js} +1 -1
- package/dist/client/assets/{Sector-qDv_EV21.js → Sector-TihpQ2pX.js} +5 -5
- package/dist/client/assets/{ShoppingBag01-DTuXZ14Y.js → ShoppingBag01-DsBku-zP.js} +1 -1
- package/dist/client/assets/{Sun-BOBnFu4U.js → Sun-CJOAGa8i.js} +1 -1
- package/dist/client/assets/{Tool01-B1l7rMbN.js → Tool01-gY-gdMF4.js} +1 -1
- package/dist/client/assets/{Trash01-5dU05cxX.js → Trash01-DUhLvzYZ.js} +1 -1
- package/dist/client/assets/{Upload01-HggPmwVR.js → Upload01-BsdejHE0.js} +1 -1
- package/dist/client/assets/{User01-DCaSZH6y.js → User01-B4dCU7oy.js} +1 -1
- package/dist/client/assets/{UserSquare-oitDkmCz.js → UserSquare-BA1qsXhU.js} +1 -1
- package/dist/client/assets/{Users01-C5KisUmx.js → Users01-BLSNtVXz.js} +1 -1
- package/dist/client/assets/{X-C_n07v-r.js → X-BTpPaU7c.js} +1 -1
- package/dist/client/assets/XAxis-Cj_1oR4W.js +1 -0
- package/dist/client/assets/{XClose-CH7JGbnX.js → XClose-DnZUIdlK.js} +1 -1
- package/dist/client/assets/{ZoomOut-CE1oJlBX.js → ZoomOut-DvQpsf4w.js} +1 -1
- package/dist/client/assets/{access-gate-djSuo48h.js → access-gate-BYf0rE33.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-ks_Gm8LK.js → add-connection-dialog-BdXnmDrQ.js} +1 -1
- package/dist/client/assets/agent-analytics-DQZgiL7L.js +2 -0
- package/dist/client/assets/agent-app-C7k2151J.js +1 -0
- package/dist/client/assets/agent-assets-B-r7ioGn.js +1 -0
- package/dist/client/assets/agent-automation-BkxL2BIZ.js +20 -0
- package/dist/client/assets/agent-automations-pf_bDZZ5.js +1 -0
- package/dist/client/assets/agent-connect-sources-Do412j4U.js +1 -0
- package/dist/client/assets/agent-deck-CYuHMzf-.js +1 -0
- package/dist/client/assets/agent-e2e-Db1tY-Py.js +1 -0
- package/dist/client/assets/agent-experiments-a-194CZ0.js +1 -0
- package/dist/client/assets/agent-file-DcPThm01.js +1 -0
- package/dist/client/assets/{agent-git-BTa_DVHj.js → agent-git-I5DAbFxV.js} +2 -2
- package/dist/client/assets/agent-hosting-8wURqYK1.js +1 -0
- package/dist/client/assets/agent-icon-BvDKYGuI.js +1 -0
- package/dist/client/assets/agent-library-DP9jULfe.js +1 -0
- package/dist/client/assets/agent-library-file-C2CuO8zG.js +1 -0
- package/dist/client/assets/agent-monitor-DU5E9xAR.js +1 -0
- package/dist/client/assets/agent-overview-BBH7XkKk.js +1 -0
- package/dist/client/assets/agent-settings-DBkRHp58.js +1 -0
- package/dist/client/assets/{agent-site-editor-CHHHOnLg.js → agent-site-editor-DSbFppgh.js} +4 -4
- package/dist/client/assets/agent-site-editor-code-CGBlhTFD.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-D7eFLsTa.js → agent-site-editor-content-C6CyUicz.js} +6 -6
- package/dist/client/assets/{agent-site-editor-preview-CU4mKdzV.js → agent-site-editor-preview-Bm6vi5GO.js} +3 -3
- package/dist/client/assets/{agent-view-guard-Dc-tIwiR.js → agent-view-guard-BHFZQ084.js} +1 -1
- package/dist/client/assets/agent-view-iS5vUDqd.js +1 -0
- package/dist/client/assets/agents-list-BmcrOH9K.js +1 -0
- package/dist/client/assets/{ai-providers-dlDhTyuB.js → ai-providers-D07lihCf.js} +2 -2
- package/dist/client/assets/{alert-CwBw9dro.js → alert-CbVRyYdn.js} +1 -1
- package/dist/client/assets/{alert-dialog-DIB7QD28.js → alert-dialog-D5AYweb7.js} +1 -1
- package/dist/client/assets/analytics-sections-C7kQuinp.js +1 -0
- package/dist/client/assets/{api-keys-3zmZWwRN.js → api-keys-CRcL5tuf.js} +1 -1
- package/dist/client/assets/api-keys-DrGX-MFg.js +1 -0
- package/dist/client/assets/app-editor-BH13ZfO_.js +1 -0
- package/dist/client/assets/{asset-utils-DwWjXWho.js → asset-utils-DxlUH6fM.js} +1 -1
- package/dist/client/assets/{auth-D5I2s61A.js → auth-DqmsEfIB.js} +1 -1
- package/dist/client/assets/{auth-catchall-WSWKM_Gq.js → auth-catchall-BMmDsnzK.js} +1 -1
- package/dist/client/assets/auth-entry-B26Aq39u.js +1 -0
- package/dist/client/assets/{auth-split-layout-DWTgZBat.js → auth-split-layout-D5nNb-G8.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-hhMpxZ3e.js → authenticate-and-persist-oauth-CtghXoSr.js} +1 -1
- package/dist/client/assets/{automation-list-row-DdEGsJ2i.js → automation-list-row-CkyFpQMb.js} +1 -1
- package/dist/client/assets/automation-runs-CoqjOPyS.js +1 -0
- package/dist/client/assets/automations-2UeJll3f.js +1 -0
- package/dist/client/assets/{autosend-Cxmy5f7O.js → autosend-D__v3v-c.js} +1 -1
- package/dist/client/assets/{avatar-foon9v7B.js → avatar-JoRElFKl.js} +1 -1
- package/dist/client/assets/badge-B0yp_bFb.js +1 -0
- package/dist/client/assets/{block-document-B8Nfg62J.js → block-document-iObAvspI.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BaVmSFTq.js → blocks-preview-workspace-context-CroMcTkl.js} +1 -1
- package/dist/client/assets/{buckets-CUx3pPZV.js → buckets-CdF9xMMp.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BygXIWi2.js → build-improve-prompt-doc-CXnpM7kh.js} +1 -1
- package/dist/client/assets/{calendar-G6mILgu2.js → calendar-_lAvk6Nt.js} +1 -1
- package/dist/client/assets/{capability-load-error-CO1VC4nF.js → capability-load-error-8qZRldzC.js} +1 -1
- package/dist/client/assets/category-editor-fWmRfYwN.js +1 -0
- package/dist/client/assets/{chart-oCBL-j7a.js → chart-B8A_E9YA.js} +5 -5
- package/dist/client/assets/{chat-context-Cugy5hDa.js → chat-context-DCpRbJmR.js} +5 -5
- package/dist/client/assets/{chat-draft-BdIaAbi7.js → chat-draft-BiPOqsxD.js} +1 -1
- package/dist/client/assets/{checkbox-Catn0jym.js → checkbox-DYn5BX_y.js} +1 -1
- package/dist/client/assets/choose-editor-9psJgCK3.js +1 -0
- package/dist/client/assets/{claim-phase-copy-BQxiL9ur.js → claim-phase-copy-CaNBNXR7.js} +1 -1
- package/dist/client/assets/{cli-auth-success-C8L7TKTw.js → cli-auth-success-B-HmvL0Z.js} +1 -1
- package/dist/client/assets/{client-icons-wx82VsS4.js → client-icons-DRAmgBv8.js} +1 -1
- package/dist/client/assets/{collapsible-BW-qIR3J.js → collapsible-Bg1MAa8S.js} +1 -1
- package/dist/client/assets/collection-detail-CzcE81KP.js +1 -0
- package/dist/client/assets/{collection-display-button-C7gBvlDS.js → collection-display-button-BbOo6z7N.js} +1 -1
- package/dist/client/assets/{collection-search-Bq1nxKvP.js → collection-search-EssCGlF9.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DVdtt0cC.js → collection-table-wrapper-BktaVXNL.js} +1 -1
- package/dist/client/assets/{collection-tabs-C36RG4Vf.js → collection-tabs-C2dMZ-Yz.js} +1 -1
- package/dist/client/assets/{combobox-DCIUJ1uY.js → combobox-DnOhf0WD.js} +1 -1
- package/dist/client/assets/command-DljL6hzf.js +1 -0
- package/dist/client/assets/{companion-mcps-section-DWDTtMpt.js → companion-mcps-section-DHfjmvo2.js} +1 -1
- package/dist/client/assets/config-BRt8XM2Q.js +1 -0
- package/dist/client/assets/{connect-jOPX0XiI.js → connect-COAAkNAe.js} +2 -2
- package/dist/client/assets/{connect-layout-CyFIUESs.js → connect-layout-D_XB9JJD.js} +1 -1
- package/dist/client/assets/{connection-CPFeF6nm.js → connection-DZucsf0o.js} +1 -1
- package/dist/client/assets/{connection-card-CTMJB3fp.js → connection-card-DrvsNBSo.js} +1 -1
- package/dist/client/assets/connection-detail-DELb5RqN.js +1 -0
- package/dist/client/assets/{connection-form-helpers-C5t2ERoW.js → connection-form-helpers-BOYwqVWG.js} +1 -1
- package/dist/client/assets/connections-BTjmigpS.js +1 -0
- package/dist/client/assets/context-t3HzYqzN.js +1 -0
- package/dist/client/assets/{create-organization-dialog-CZ1lcSy0.js → create-organization-dialog-BCIcZ5Ce.js} +1 -1
- package/dist/client/assets/{decopilot-BbmoQjBz.js → decopilot-BbS9GPYA.js} +2 -2
- package/dist/client/assets/{dialog-D5ye6U_D.js → dialog-CfIoHDlJ.js} +1 -1
- package/dist/client/assets/discover-C6NL6AwE.js +1 -0
- package/dist/client/assets/{domain-settings-BzTmzHwn.js → domain-settings-I8HFU1tc.js} +1 -1
- package/dist/client/assets/download-app-dialog-bvP5yIID.js +1 -0
- package/dist/client/assets/{drawer-CgCvwNdV.js → drawer-gbdrTv3r.js} +1 -1
- package/dist/client/assets/{editor-DCI3ZH5o.js → editor-CUtbeyZe.js} +1 -1
- package/dist/client/assets/{empty-state-DSA1rktW.js → empty-state-B7JCSTCX.js} +1 -1
- package/dist/client/assets/{empty-state-BpRvqX3b.js → empty-state-B_xAVz84.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DIQFM_Rl.js → extract-connection-data-CHpjURut.js} +1 -1
- package/dist/client/assets/feature-gate-CSCbG-02.js +1 -0
- package/dist/client/assets/feature-paywall-BK6fjPbO.js +1 -0
- package/dist/client/assets/file-explorer-BEA-kxcu.js +2 -0
- package/dist/client/assets/file-preview-Bk7_4BhT.js +1 -0
- package/dist/client/assets/file-share-button-CtEMEEnP.js +3 -0
- package/dist/client/assets/{file-type-icon-w64MSOpN.js → file-type-icon-C_2K-vjQ.js} +1 -1
- package/dist/client/assets/flat-project-Bp2uxu0m.js +1 -0
- package/dist/client/assets/folder-icon-D2srQ6r8.js +1 -0
- package/dist/client/assets/{form-F3knQ3ef.js → form-Bw-12Nua.js} +1 -1
- package/dist/client/assets/format-time-CjIPQhCN.js +1 -0
- package/dist/client/assets/{gateway-client-BkDoJc3i.js → gateway-client-DDRZPNgE.js} +1 -1
- package/dist/client/assets/{general-DRrG1HLu.js → general-DFurEwpf.js} +1 -1
- package/dist/client/assets/github-repo-22x8y8Tm.js +1 -0
- package/dist/client/assets/home-BEfet_Bo.js +1 -0
- package/dist/client/assets/{index-D9Qjyoct.js → index-B1gW_UZi.js} +12 -12
- package/dist/client/assets/index-BADnYX4j.css +1 -0
- package/dist/client/assets/{index-1xlnSxuL.js → index-BBClJhS5.js} +1 -1
- package/dist/client/assets/{index-B_6_b10B.js → index-BBn8QmOY.js} +1 -1
- package/dist/client/assets/{index-PWbqH2G3.js → index-BGw3HTPr.js} +1 -1
- package/dist/client/assets/index-C23QqnY4.js +1 -0
- package/dist/client/assets/{index-C1LXcrdL.js → index-CBJQH72Z.js} +1 -1
- package/dist/client/assets/{index-CQTi57zC.js → index-CP9MPNu2.js} +2 -2
- package/dist/client/assets/{index-DwGlegEL.js → index-Cc_Zqhkn.js} +1 -1
- package/dist/client/assets/{index-799YT1X7.js → index-Ccktnu9A.js} +1 -1
- package/dist/client/assets/index-CdYIy8eY.js +1 -0
- package/dist/client/assets/index-DRvgWruv.js +1 -0
- package/dist/client/assets/{index-BxbJS58j.js → index-DTVMnS9R.js} +1 -1
- package/dist/client/assets/{index-DXncJrGS.js → index-TvCpAFy_.js} +15 -15
- package/dist/client/assets/index-Ty5Jzwnf.js +10 -0
- package/dist/client/assets/{index-DUhG4tsR.js → index-oPco2Z7Q.js} +36 -36
- package/dist/client/assets/{index-redirect-W-CDsNw_.js → index-redirect-D8rObEfr.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CnSA8MF_.js → infiniteQueryObserver-BiKAGWol.js} +1 -1
- package/dist/client/assets/infra-billing-DM30eRIB.js +1 -0
- package/dist/client/assets/{input-DY62oxPZ.js → input-Dk8ExXFi.js} +1 -1
- package/dist/client/assets/{input-DaUsOzcS.js → input-MYwET4H0.js} +1 -1
- package/dist/client/assets/input-ZcuegaFq.js +1 -0
- package/dist/client/assets/{integration-icon-Didv4P2d.js → integration-icon-cSotbhTg.js} +1 -1
- package/dist/client/assets/{label-BypgdEhS.js → label-9S9F78nK.js} +1 -1
- package/dist/client/assets/{last-preview-page-BGLkyqI1.js → last-preview-page-BqZ-yKjx.js} +1 -1
- package/dist/client/assets/{layout-CPzExRWR.js → layout-XmYuHyUp.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-GQn_HHLF.js → legacy-agents-deep-Cos55l5T.js} +1 -1
- package/dist/client/assets/legacy-main-redirect-SvbBzQfx.js +1 -0
- package/dist/client/assets/library-DwuPF4v9.js +1 -0
- package/dist/client/assets/library-tab-jc2e6zcQ.js +168 -0
- package/dist/client/assets/location-DBePU4bz.js +1 -0
- package/dist/client/assets/{login-BRrTc0gG.js → login-Dk9tmaQV.js} +1 -1
- package/dist/client/assets/{markdown-Bc3TbOnL.js → markdown-D8NZ8Hcx.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-x41adwrD.js → mcp-app-renderer-CMM_xZGY.js} +1 -1
- package/dist/client/assets/{mcp-oauth-jFxfSUra.js → mcp-oauth-Rwm2gO51.js} +1 -1
- package/dist/client/assets/members-C7CWAgRC.js +1 -0
- package/dist/client/assets/{message-templates-nlH50gJ2.js → message-templates-LZ9bQOkh.js} +1 -1
- package/dist/client/assets/{mini-report-page-CxePAPTE.js → mini-report-page-Djd5YLq-.js} +1 -1
- package/dist/client/assets/mock-board-wLpRW8bx.js +1 -0
- package/dist/client/assets/{monaco-editor-D8GdrnPh.js → monaco-editor-gMJT6cpK.js} +2 -2
- package/dist/client/assets/monitoring-stats-row-DGiOnVB-.js +1 -0
- package/dist/client/assets/{multi-select-DhVdXTHb.js → multi-select-CgJiEc6d.js} +1 -1
- package/dist/client/assets/{mustache-Da5_vbMS.js → mustache-C_QlIzWy.js} +1 -1
- package/dist/client/assets/new-project-dialog-BaZdnvse.js +1 -0
- package/dist/client/assets/{oauth-callback-DTAJ88cJ.js → oauth-callback-DKlgv_Gu.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-zQxL0ybs.js → oauth-callback-ai-provider-bpHWEFSR.js} +1 -1
- package/dist/client/assets/onboarding-BCfoU2BS.js +1 -0
- package/dist/client/assets/optimistic-project-sidebar-views-CmwJxzI1.js +1 -0
- package/dist/client/assets/{org-file-open-context-CRfULtcz.js → org-file-open-context-Bv73tl5K.js} +1 -1
- package/dist/client/assets/{organization-choice-DrNVkNJX.js → organization-choice-1eorpCYU.js} +1 -1
- package/dist/client/assets/{orgs-CRvqTOkY.js → orgs-zhbMCzP-.js} +1 -1
- package/dist/client/assets/{page-seo-form-VepXUh7G.js → page-seo-form-CshajZtl.js} +1 -1
- package/dist/client/assets/{pair-CIPjczyu.js → pair-C-k8zr2J.js} +7 -7
- package/dist/client/assets/plan-ladder-BlKhVXlg.js +1 -0
- package/dist/client/assets/{popover-CLlJmv-M.js → popover-BgkxtrX7.js} +1 -1
- package/dist/client/assets/post-calendar-B-WdFfky.js +1 -0
- package/dist/client/assets/post-editor-CsDksmyM.js +2 -0
- package/dist/client/assets/preview-content-C6mifSrd.js +1 -0
- package/dist/client/assets/{preview-dialog-oInIOpgo.js → preview-dialog-CIYvMHEx.js} +1 -1
- package/dist/client/assets/profile-C0w8Yfz5.js +1 -0
- package/dist/client/assets/project-app-view-Sevz3SK2.js +1 -0
- package/dist/client/assets/project-feed-BMtZcRjf.js +1 -0
- package/dist/client/assets/{project-icon-BzJ0b0Ay.js → project-icon-C29pLjaM.js} +1 -1
- package/dist/client/assets/project-profile-B8BUGXs3.js +1 -0
- package/dist/client/assets/project-reports-DLR8Px_E.js +1 -0
- package/dist/client/assets/project-tasks-BpKda9bF.js +1 -0
- package/dist/client/assets/projects-B_9wM2AG.js +1 -0
- package/dist/client/assets/projects-empty-state-D2roHEQS.js +1 -0
- package/dist/client/assets/{prompts-DDV76PD8.js → prompts-SqPXo2ej.js} +1 -1
- package/dist/client/assets/record-editor-DwoOuklP.js +1 -0
- package/dist/client/assets/redirect-editor-BROySec3.js +1 -0
- package/dist/client/assets/reports-7388ESEV.js +1 -0
- package/dist/client/assets/{reports-x7ZW7jY1.js → reports-BAoHRlcZ.js} +1 -1
- package/dist/client/assets/reports-onboarding-DuXWRm1J.js +1 -0
- package/dist/client/assets/reports-tab-BTG8fjPp.js +2 -0
- package/dist/client/assets/repositories-dyiTYnan.js +1 -0
- package/dist/client/assets/{repository-import-picker-DdC8LWMV.js → repository-import-picker-OR5DGZp9.js} +1 -1
- package/dist/client/assets/repository-picker-BSwi4b8i.js +1 -0
- package/dist/client/assets/require-capability-Bqc8OMTK.js +1 -0
- package/dist/client/assets/{required-auth-layout-BeA6YeYQ.js → required-auth-layout-Byop8Zzr.js} +1 -1
- package/dist/client/assets/{reset-password-CZB-h_dr.js → reset-password-BJ7ek2C_.js} +1 -1
- package/dist/client/assets/{resizable-ChG3qNIS.js → resizable-3VTCAPsm.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-CmlW-pVX.js +1 -0
- package/dist/client/assets/{review-settings-1_C-_b80.js → review-settings-DV0Kgix-.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-B4JFOCzI.js → rich-text-link-control-DHguSqou.js} +2 -2
- package/dist/client/assets/roles-BddVa5rc.js +1 -0
- package/dist/client/assets/route-BTyvu5tm.js +1 -0
- package/dist/client/assets/route-Dv07Kl62.js +1 -0
- package/dist/client/assets/route-wKh3eUlH.js +1 -0
- package/dist/client/assets/{runnable-block-editor-DZC0Baz4.js → runnable-block-editor-Do2tVSLe.js} +4 -4
- package/dist/client/assets/{sandbox-lifecycle-context-BonuevCJ.js → sandbox-lifecycle-context-DqykpNrC.js} +1 -1
- package/dist/client/assets/{schema-GqB2SNE_.js → schema-DN-s_HG6.js} +1 -1
- package/dist/client/assets/{scroll-area-9EhbhV4n.js → scroll-area--yTJQfnp.js} +1 -1
- package/dist/client/assets/{search-input-B84gMTxu.js → search-input-BNUWPEYj.js} +1 -1
- package/dist/client/assets/search-toggle-QxOnD3UE.js +1 -0
- package/dist/client/assets/{secret-picker-FZs_qkUu.js → secret-picker-B-IAzUKw.js} +1 -1
- package/dist/client/assets/{secrets-DQnlXKqx.js → secrets-BfsxO5FG.js} +1 -1
- package/dist/client/assets/sections-editor-BSMpRRaP.js +1 -0
- package/dist/client/assets/{select-CcGyx8ty.js → select-BSSRUEpK.js} +1 -1
- package/dist/client/assets/{select-model-BXKVjHOx.js → select-model-BpoA_wtD.js} +1 -1
- package/dist/client/assets/seo-editor-BLMg-jAb.js +1 -0
- package/dist/client/assets/{separator-CIgATGUR.js → separator-B-ZEExAQ.js} +1 -1
- package/dist/client/assets/settings-tab-Bjk0NW75.js +5 -0
- package/dist/client/assets/{sheet-HsqEW5k_.js → sheet--8zhfSHm.js} +1 -1
- package/dist/client/assets/shell-layout-DE5WStxe.js +1 -0
- package/dist/client/assets/skills-5oEukgyq.js +1 -0
- package/dist/client/assets/{sso-w-CGny8A.js → sso-p_1To1BG.js} +1 -1
- package/dist/client/assets/{suggestion-YJaAoX7G.js → suggestion-tikPUWB4.js} +1 -1
- package/dist/client/assets/{switch-BVaVIxoj.js → switch-XXcZ9CO9.js} +1 -1
- package/dist/client/assets/synced-repos-6N09TwCW.js +1 -0
- package/dist/client/assets/{tab-icon-glyph-D7xp64UN.js → tab-icon-glyph-Cg30pNjq.js} +1 -1
- package/dist/client/assets/{table-C4wC7jcA.js → table-UDk1rGCz.js} +1 -1
- package/dist/client/assets/{tabs-CtBDwYTw.js → tabs-DddEqGpk.js} +1 -1
- package/dist/client/assets/{task-board-DTEg_hTj.js → task-board-BQC0qjBI.js} +1 -1
- package/dist/client/assets/task-route-BIVpLzI_.js +1 -0
- package/dist/client/assets/{task-status-yZrVtsEU.js → task-status-5qx4S30L.js} +1 -1
- package/dist/client/assets/taskboard-analytics-BUkhCXum.js +1 -0
- package/dist/client/assets/{tasks-Ay-mjiXF.js → tasks-B2IZJpCB.js} +2 -2
- package/dist/client/assets/tasks-JL_Q5QmF.js +1 -0
- package/dist/client/assets/{textarea-Bd9BZaa2.js → textarea-mkcrN5g-.js} +1 -1
- package/dist/client/assets/thread-analytics-BL_w94D4.js +1 -0
- package/dist/client/assets/thread-button-DwWAsFW7.js +1 -0
- package/dist/client/assets/{hooks-C-YaiNLT.js → thread-intent-1MB6k5b2.js} +6 -6
- package/dist/client/assets/thread-route-BCeXxLYH.js +1 -0
- package/dist/client/assets/{thread-route-BfqlgN7w.js → thread-route-CRhZ1osu.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-C8gQ6cXL.js → thread-sheet-body-Bo7LPBv_.js} +1 -1
- package/dist/client/assets/{toggle-group-BgFCagKD.js → toggle-group-Cz7RSOBM.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CFttHyWN.js → toolbar-icon-button-CiJmHymh.js} +1 -1
- package/dist/client/assets/{tooltip-CGhrZMes.js → tooltip-CF6AcK-h.js} +1 -1
- package/dist/client/assets/{track-ZExbUuzl.js → track-OWWDrnQ-.js} +1 -1
- package/dist/client/assets/{types-pZX4k5UI.js → types-C-gwtfMH.js} +2 -2
- package/dist/client/assets/usage-stats-CBSbrOk_.js +1 -0
- package/dist/client/assets/{use-ai-providers-CFjUtZPr.js → use-ai-providers-B1JZFVlj.js} +1 -1
- package/dist/client/assets/{use-automations-C8WXPSJY.js → use-automations-D_9NQm3c.js} +1 -1
- package/dist/client/assets/{use-autosave-vgysQ9m_.js → use-autosave-DlgDe-Tc.js} +1 -1
- package/dist/client/assets/use-chat-layout-state-D4JUtDU_.js +1 -0
- package/dist/client/assets/use-connect-companion-DeEhFjbg.js +1 -0
- package/dist/client/assets/{use-connection-mxLfDMRW.js → use-connection-BSRKwy2j.js} +1 -1
- package/dist/client/assets/{use-copy-DUJ6ltm0.js → use-copy-BOgEqZMm.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-zRgZOr46.js +1 -0
- package/dist/client/assets/{use-date-fns-locale-DyxqZQPj.js → use-date-fns-locale-DLQqaR-J.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DuPXl9wb.js → use-debounced-autosave-D_28bChm.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BUDe5Br2.js → use-debounced-value-DD9mnPT_.js} +1 -1
- package/dist/client/assets/{use-deco-credits-xeUqHdn1.js → use-deco-credits-BVTpTeQe.js} +1 -1
- package/dist/client/assets/use-decopilot-events-DrrVrYNR.js +1 -0
- package/dist/client/assets/{use-delete-connection-CATogPT_.js → use-delete-connection-XxANt-J1.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BDkUFo0H.js → use-deployment-admin-2URfC53G.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DPJWXzMA.js → use-fast-preview-draft-url-DEazNknV.js} +1 -1
- package/dist/client/assets/{use-file-configs-CaiCm4YC.js → use-file-configs-CoaidzsY.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CaPw6C-5.js → use-infinite-scroll-BPqj-R_X.js} +1 -1
- package/dist/client/assets/{use-join-requests-Dpz06WqH.js → use-join-requests-Drw7IeW0.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-qFkwsuao.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-CZ-0Pvu1.js +1 -0
- package/dist/client/assets/{use-mcp-client-Bax4L87A.js → use-mcp-client-DDH2Tr05.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DjwM3Aih.js → use-mcp-prompts-CogjK1bQ.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CbB7jVMv.js → use-mcp-tools-B7MXLlq3.js} +1 -1
- package/dist/client/assets/{use-members-D9drExEq.js → use-members-BLvVhz4X.js} +1 -1
- package/dist/client/assets/{use-mobile-BkNVLn-e.js → use-mobile-BCSnRACa.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-DYNDpstL.js +1 -0
- package/dist/client/assets/use-new-blocks-editor-DGdBBbiW.js +1 -0
- package/dist/client/assets/{use-open-billing-url-YekIfrRD.js → use-open-billing-url-Dq7moyEm.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BFMVTZYa.js → use-org-auth-client-BaoVl8Zl.js} +1 -1
- package/dist/client/assets/use-org-fs-gM-Wauv_.js +1 -0
- package/dist/client/assets/use-org-repo-syncs-DFgGELdf.js +1 -0
- package/dist/client/assets/{use-org-sso-TEOX56yY.js → use-org-sso-GwZiS-qS.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C2hucAQ7.js → use-organization-roles-CqvDOd51.js} +1 -1
- package/dist/client/assets/{use-organization-settings-3QYUfCpW.js → use-organization-settings-mKOaKHuY.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-KvJ_j5rh.js → use-panel-navigate-CQHE_TAW.js} +1 -1
- package/dist/client/assets/use-project-native-view-presence-CjADt2wx.js +1 -0
- package/dist/client/assets/use-project-scope-UozAP0t-.js +1 -0
- package/dist/client/assets/use-releases-D-iqlxR6.js +1 -0
- package/dist/client/assets/{use-reports-diagnostic-B7R_a5Kv.js → use-reports-diagnostic-CknaDfb_.js} +1 -1
- package/dist/client/assets/{use-secrets-CNuvKS59.js → use-secrets-Bl8vA-cD.js} +1 -1
- package/dist/client/assets/use-section-preview-base-BqbdcWw1.js +1 -0
- package/dist/client/assets/use-session-runtime-B5XfJc8H.js +1 -0
- package/dist/client/assets/{use-tags-DSm1Zgi6.js → use-tags-C0g04rDb.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-Bt0Ix7m9.js → use-task-board-analytics-DQMIr-R3.js} +1 -1
- package/dist/client/assets/use-task-metadata--2QUxhiK.js +1 -0
- package/dist/client/assets/use-thread-analytics-CVoZDp6i.js +1 -0
- package/dist/client/assets/{use-thread-outputs-C38ocjxH.js → use-thread-outputs-CYriWIIs.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-U12d5VJc.js +1 -0
- package/dist/client/assets/{useQueries-CLsJAj_M.js → useQueries-tUSXojRG.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B912YJiX.js +1 -0
- package/dist/client/assets/{users-Db27IK-5.js → users-DFvmfIoV.js} +1 -1
- package/dist/client/assets/{utils-CwpmExkA.js → utils-BaPwSBi2.js} +1 -1
- package/dist/client/assets/variant-calendar-sxqpD_Oi.js +1 -0
- package/dist/client/assets/{variant-matcher-override-szW3kzoV.js → variant-matcher-override-C-94qzoj.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BBcGKlDx.js → view-mode-toggle-DrlZskFH.js} +1 -1
- package/dist/client/assets/{virtual-mcp-COzLXyrd.js → virtual-mcp-DBFF2brO.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/AreaChart-C8Vo_8Ig.js +0 -1
- package/dist/client/assets/CartesianChart-l7Ajhkvs.js +0 -6
- package/dist/client/assets/Eye-DR1l_Pl4.js +0 -1
- package/dist/client/assets/Image01-DMj_7b2c.js +0 -1
- package/dist/client/assets/LayoutLeft-7YdGH3zt.js +0 -1
- package/dist/client/assets/Palette-CJ_H2Ji8.js +0 -1
- package/dist/client/assets/Share07-3t9nqqkD.js +0 -1
- package/dist/client/assets/Zap-D3wZltKp.js +0 -1
- package/dist/client/assets/agent-analytics-By50bpU5.js +0 -2
- package/dist/client/assets/agent-app-CcBru_Dc.js +0 -1
- package/dist/client/assets/agent-assets-CoBq8gk-.js +0 -1
- package/dist/client/assets/agent-automation-YwmQKN06.js +0 -20
- package/dist/client/assets/agent-automations-Cq5KP2f5.js +0 -1
- package/dist/client/assets/agent-connect-sources-DxRi8BCM.js +0 -1
- package/dist/client/assets/agent-deck-DVLEuDhA.js +0 -1
- package/dist/client/assets/agent-e2e-5IoZIrla.js +0 -1
- package/dist/client/assets/agent-experiments-Int37iX5.js +0 -1
- package/dist/client/assets/agent-file-Ch99Gr0p.js +0 -1
- package/dist/client/assets/agent-hosting-DELLHkBv.js +0 -1
- package/dist/client/assets/agent-icon-CJ1up34I.js +0 -1
- package/dist/client/assets/agent-library-file-CS1rjRRh.js +0 -1
- package/dist/client/assets/agent-monitor-Ciy1E_-Q.js +0 -1
- package/dist/client/assets/agent-overview-BC_RAnEB.js +0 -1
- package/dist/client/assets/agent-settings-DTx-4cAY.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DMrXO_8H.js +0 -2
- package/dist/client/assets/agent-view-CorDejXP.js +0 -1
- package/dist/client/assets/agents-list-CfDIHVDD.js +0 -1
- package/dist/client/assets/analytics-sections-C5_87xUx.js +0 -1
- package/dist/client/assets/api-keys-DmjbbAZ9.js +0 -1
- package/dist/client/assets/app-editor-Dk5jSXjv.js +0 -1
- package/dist/client/assets/auth-entry-BJ1WxKvH.js +0 -1
- package/dist/client/assets/automation-runs-CRr7g14c.js +0 -1
- package/dist/client/assets/automations-PMz-u3eU.js +0 -1
- package/dist/client/assets/badge-B8dizlCT.js +0 -1
- package/dist/client/assets/cards-ByVpaFgO.js +0 -8
- package/dist/client/assets/category-editor-BVzm0zUq.js +0 -1
- package/dist/client/assets/choose-editor-DwovNL0Y.js +0 -1
- package/dist/client/assets/collection-detail-Djse0DNa.js +0 -1
- package/dist/client/assets/command-DBqQ-b8W.js +0 -1
- package/dist/client/assets/config-9m7obEVv.js +0 -1
- package/dist/client/assets/connection-detail-CtFxBJog.js +0 -1
- package/dist/client/assets/connections-DYm-50T2.js +0 -1
- package/dist/client/assets/context-Cen00PJ2.js +0 -1
- package/dist/client/assets/discover-f-IlJYkY.js +0 -1
- package/dist/client/assets/download-app-dialog-CK-GvdAK.js +0 -1
- package/dist/client/assets/feature-gate-CEAThaDY.js +0 -1
- package/dist/client/assets/feature-paywall-DCqda5W4.js +0 -1
- package/dist/client/assets/file-explorer-IsG6Ynrb.js +0 -2
- package/dist/client/assets/file-preview-DkTtYjnK.js +0 -1
- package/dist/client/assets/file-share-button-BhqfoTyo.js +0 -3
- package/dist/client/assets/folder-icon-0KKPDvC_.js +0 -1
- package/dist/client/assets/format-time-BtXRrtv4.js +0 -1
- package/dist/client/assets/github-icon-BPkd3ouG.js +0 -1
- package/dist/client/assets/github-repo-B15wwZ1g.js +0 -1
- package/dist/client/assets/home-WT_7dde5.js +0 -1
- package/dist/client/assets/icon-button-C4M15Chh.js +0 -1
- package/dist/client/assets/index-B7QeXpyw.css +0 -1
- package/dist/client/assets/index-BlluJU8T.js +0 -1
- package/dist/client/assets/index-BvEM-dvH.js +0 -1
- package/dist/client/assets/index-CKALiP-j.js +0 -1
- package/dist/client/assets/infra-billing-IOD9NeWW.js +0 -1
- package/dist/client/assets/input-BM0pNmJR.js +0 -1
- package/dist/client/assets/legacy-main-redirect-Btysr0GK.js +0 -1
- package/dist/client/assets/library-BS4jnPds.js +0 -161
- package/dist/client/assets/location-oTTXFrSF.js +0 -1
- package/dist/client/assets/members-BkUMEbBZ.js +0 -1
- package/dist/client/assets/mock-board-CxZ6IfnT.js +0 -10
- package/dist/client/assets/monitoring-stats-row-B4HKQfEd.js +0 -1
- package/dist/client/assets/onboarding-C-Uu6LDz.js +0 -1
- package/dist/client/assets/optimistic-project-sidebar-views-QwaUX4Nu.js +0 -1
- package/dist/client/assets/plan-ladder-Io6vIIsL.js +0 -1
- package/dist/client/assets/post-calendar-DTivbJGd.js +0 -1
- package/dist/client/assets/post-editor-hRUF_q7o.js +0 -2
- package/dist/client/assets/preview-content-qYsw7P88.js +0 -1
- package/dist/client/assets/profile-DKiSx-md.js +0 -1
- package/dist/client/assets/project-app-view-BXbadkka.js +0 -1
- package/dist/client/assets/project-feed-CWlgSYJd.js +0 -1
- package/dist/client/assets/project-reports-D27FVZrO.js +0 -1
- package/dist/client/assets/project-tasks-BlwINbrD.js +0 -1
- package/dist/client/assets/record-editor-D0FEEilz.js +0 -1
- package/dist/client/assets/redirect-editor-8U0kYp-L.js +0 -1
- package/dist/client/assets/reports-SHBoIX6T.js +0 -1
- package/dist/client/assets/reports-onboarding-lz-YekBw.js +0 -1
- package/dist/client/assets/reports-tab-CQsFI9AI.js +0 -2
- package/dist/client/assets/repositories-B78A5I4U.js +0 -1
- package/dist/client/assets/repository-picker-DiXvXP64.js +0 -1
- package/dist/client/assets/require-capability-D3lYzq6i.js +0 -1
- package/dist/client/assets/resolve-tab-icon-H5U8-G1F.js +0 -1
- package/dist/client/assets/roles-BaCjCp-z.js +0 -1
- package/dist/client/assets/route-CkeTHcT5.js +0 -1
- package/dist/client/assets/route-D4LTJlBf.js +0 -1
- package/dist/client/assets/route-RUwqIRQf.js +0 -1
- package/dist/client/assets/route-page-header-BvgE0q5Z.js +0 -1
- package/dist/client/assets/search-toggle-Dllmt4oB.js +0 -1
- package/dist/client/assets/sections-editor-IVuj1qGO.js +0 -1
- package/dist/client/assets/seo-editor-DWMKmSd9.js +0 -1
- package/dist/client/assets/settings-tab-qIGPe64v.js +0 -5
- package/dist/client/assets/shell-layout-PsOcpnj-.js +0 -1
- package/dist/client/assets/skill-preview-DDuXNYxe.js +0 -1
- package/dist/client/assets/skills-C9zl4SYU.js +0 -1
- package/dist/client/assets/synced-repos-OeYTgI30.js +0 -1
- package/dist/client/assets/task-route-D8AxgdXG.js +0 -1
- package/dist/client/assets/taskboard-analytics-SldboJtr.js +0 -1
- package/dist/client/assets/tasks-B2JqGigR.js +0 -1
- package/dist/client/assets/thread-analytics-JrMutHmT.js +0 -1
- package/dist/client/assets/thread-button-CjEacYmJ.js +0 -1
- package/dist/client/assets/thread-intent-CNQdM8Ho.js +0 -1
- package/dist/client/assets/thread-route-CSSVlTLS.js +0 -1
- package/dist/client/assets/usage-stats-ClwItUaQ.js +0 -1
- package/dist/client/assets/use-chat-layout-state-Dr584zB8.js +0 -1
- package/dist/client/assets/use-connect-companion-Cgv0bZBV.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-ZvRac8CV.js +0 -1
- package/dist/client/assets/use-decopilot-events-Dy5N8Y9f.js +0 -1
- package/dist/client/assets/use-entitlements-CLVdcWhS.js +0 -1
- package/dist/client/assets/use-in-settings-Bi1UGPlh.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-D0Ib6HQf.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-DHVKLIQk.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-DWCyMlYN.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-CCZwmfNr.js +0 -1
- package/dist/client/assets/use-org-fs-tnSIwx8e.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-CWXr40Pf.js +0 -1
- package/dist/client/assets/use-project-scope-DhGOPpT1.js +0 -1
- package/dist/client/assets/use-releases-DDoVPY5_.js +0 -1
- package/dist/client/assets/use-section-preview-base-VmECEpeP.js +0 -1
- package/dist/client/assets/use-session-runtime-CiLk98Je.js +0 -1
- package/dist/client/assets/use-task-metadata-DsWPSHLO.js +0 -1
- package/dist/client/assets/use-thread-analytics-CNx40-hY.js +0 -1
- package/dist/client/assets/use-virtual-mcp-C2m1pRHH.js +0 -1
- package/dist/client/assets/useInfiniteQuery-rQtGLM3y.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DPJ-gshr.js +0 -1
- package/dist/client/assets/variant-calendar-ZscKzDf5.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{c as N
|
|
2
|
-
- ID: ${t}`),u){let I;e[11]!==u?(I=
|
|
1
|
+
import{c as N,_ as Ge,u as Fe,dH as rt,o as je,X as H,K as se,t as re,U as le,V as ue,d as Xe,bY as it,cZ as ct,ay as lt,as as ut,bT as dt,b as ke,r as k,m as pt,a2 as ft,e as ht,aB as mt,j as K,z as gt,a as yt,x as St,dI as Tt,dJ as kt,q as vt}from"./index-oPco2Z7Q.js";import{u as Ye,a as bt}from"./use-panel-navigate-CQHE_TAW.js";import{A as ze,c as It,a as Mt,w as xt}from"./autosend-D__v3v-c.js";import{S as Ct,a as wt,k as At,c as Rt,w as Ue,l as We}from"./thread-intent-1MB6k5b2.js";import{u as _t}from"./use-is-desktop-app-BNujXJc_.js";import{u as Et}from"./use-mcp-client-DDH2Tr05.js";import{f as $t,i as Pt}from"./github-repo-22x8y8Tm.js";import{b as Dt,d as Ot}from"./use-decopilot-events-DrrVrYNR.js";import{u as Ze,p as qt,a as Se,i as Nt,b as Lt}from"./use-ai-providers-B1JZFVlj.js";import{o as Ft,b as jt}from"./location-DBePU4bz.js";import{a as Qt,b as Ut}from"./thread-route-CRhZ1osu.js";import{c as Wt,a as Bt}from"./use-organization-settings-mKOaKHuY.js";const Vt={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Je(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(Vt)){const s=e(t.providerMetadata);if(s!==null)return s}return 0}function Kt(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Ht(t,e){if(!e)return t;const s=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,n=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+Je(e),cacheReadTokens:t.cacheReadTokens+s,cacheWriteTokens:t.cacheWriteTokens+n}}function tn(t){const e=Math.max(t.inputTokens,t.cacheReadTokens+t.cacheWriteTokens);return e>0?t.cacheReadTokens/e:0}function sn(t){return t.reduce((e,s)=>Ht(e,s.metadata?.usage),Kt())}function Gt(t,e=[]){return t==="stop"?"completed":t==="tool-calls"?e.some(n=>n.type==="tool-user_ask"&&n.state==="input-available"||n.state==="approval-requested")?"requires_action":"completed":"failed"}const Be={"claude-code-desktop":"claude-code","codex-desktop":"codex","opencode-desktop":"opencode"};function Xt(t){return t==="claude-code"?"claude-code-desktop":t==="codex"?"codex-desktop":t==="opencode"?"opencode-desktop":null}function Yt({pendingOption:t,lockedHarness:e}){return e?Xt(e):t}function zt(t){return t.thread?.harness_id!=null?{}:{branch:t.globals.branch??null}}const Zt=new Set(["decopilot","claude-code"]);function Jt({isDesktopApp:t,harnessId:e}){return e!=null&&!Zt.has(e)}function es(t){const e=N.c(19);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=s):s=e[0];const n=Ge(s);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Fe(a),r=Ye();let c;e[2]!==r||e[3]!==o?(c=rt(r)?.path??o.preview??o.skill??o.brand??null,e[2]=r,e[3]=o,e[4]=c):c=e[4];const u=c;let h;if(e[5]!==n?.params.appSlug||e[6]!==n?.params.collectionName||e[7]!==n?.params.itemId||e[8]!==u||e[9]!==t){if(h=[],t&&h.push(`### Selected Agent
|
|
2
|
+
- ID: ${t}`),u){let I;e[11]!==u?(I=Ft(u),e[11]=u,e[12]=I):I=e[12];const x=I;let p;e[13]!==u?(p=jt(u),e[13]=u,e[14]=p):p=e[14],h.push(`### Currently Open File
|
|
3
3
|
The user has this file open in the Library and is most likely referring to it:
|
|
4
4
|
- Name: ${p}
|
|
5
5
|
- Library path: ${u}${x?`
|
|
@@ -28,10 +28,10 @@ ${r.text}`}):"blob"in r&&r.blob&&r.mimeType&&s.push({type:"file",url:`data:${r.m
|
|
|
28
28
|
`;else if(a.type==="text"&&"text"in a&&typeof a.text=="string")s+=a.text;else if(a.type==="mention"&&a.attrs){const o=a.attrs.char??"/",r=`${o}${a.attrs.name}`;if(a.attrs.kind==="task"){const c=a.attrs.metadata,u=c?.title??a.attrs.name??"",h=c?.context?.trim()||[u,c?.description?.trim()].filter(Boolean).join(`
|
|
29
29
|
|
|
30
30
|
`);h&&e.push({type:"text",text:h});return}if(s+=r,o==="@"){const c=a.attrs.metadata;c&&typeof c=="object"&&!Array.isArray(c)&&"agentId"in c?e.push({type:"text",text:`[DELEGATE TO AGENT: ${c.title??a.attrs.name} (agent_id: ${c.agentId})]
|
|
31
|
-
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(c)&&e.push(...Ve(c,r))}else if(a.attrs.kind==="skill"){const c=a.attrs.metadata;c&&!Array.isArray(c)&&Array.isArray(c.files)&&e.push(...os(c,r))}else{const c=a.attrs.metadata||a.attrs.prompts||[];Array.isArray(c)&&c.length>0&&typeof c[0]=="object"&&c[0]!==null&&"role"in c[0]?e.push(...rs(c,r)):Array.isArray(c)&&e.push(...Ve(c,r))}}else if(a.type==="file"&&a.attrs){const o=a.attrs,r=`[file:://${encodeURIComponent(o.name)}]`;s+=r,e.push(...as(o,r))}if("content"in a&&Array.isArray(a.content))for(const o of a.content)n(o)}};return n(t),s.trim()&&e.unshift({type:"text",text:s.trim()}),e}function
|
|
32
|
-
`);if(!g){fe(i);return}new TextEncoder().encode(g).length>As||xe(y=>Object.keys(y).length>=Rs&&!(i in y)?y:{...y,[i]:g})},fe=i=>{xe(T=>{const{[i]:
|
|
31
|
+
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(c)&&e.push(...Ve(c,r))}else if(a.attrs.kind==="skill"){const c=a.attrs.metadata;c&&!Array.isArray(c)&&Array.isArray(c.files)&&e.push(...os(c,r))}else{const c=a.attrs.metadata||a.attrs.prompts||[];Array.isArray(c)&&c.length>0&&typeof c[0]=="object"&&c[0]!==null&&"role"in c[0]?e.push(...rs(c,r)):Array.isArray(c)&&e.push(...Ve(c,r))}}else if(a.type==="file"&&a.attrs){const o=a.attrs,r=`[file:://${encodeURIComponent(o.name)}]`;s+=r,e.push(...as(o,r))}if("content"in a&&Array.isArray(a.content))for(const o of a.content)n(o)}};return n(t),s.trim()&&e.unshift({type:"text",text:s.trim()}),e}function nn(t){const e=tt(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function an(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function cs(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function on(t){return t.filter(e=>e.status==="queued").sort((e,s)=>e.enqueuedAt-s.enqueuedAt)}function ls(t,e){return t.some(s=>s.messageId===e.messageId)?t:[...t,e]}function us(t,e){return t.filter(s=>s.messageId!==e)}const ne=new Map,ds=200;function ps(t){if(ne.size<ds||ne.has(t))return;const e=ne.keys().next().value;if(e!==void 0){ne.delete(e),$e.delete(e);for(const s of de.keys())s.startsWith(`${e}:`)&&de.delete(s)}}const $e=new Set;function fs(t){$e.add(t)}function hs(t){return $e.has(t)}function ms(t){$e.delete(t)}function ve(t){const e=ne.get(t);if(e)return ne.delete(t),ne.set(t,e),e;ps(t);const s=new Ct([]);return ne.set(t,s),s}function st(t,e){ve(t).update(s=>ls(s,e))}function Le(t,e){ve(t).update(s=>us(s,e))}function gs(t,e){ve(t).set(e)}const de=new Map;function ys(t,e){de.set(`${t}:${e.id}`,e)}function Ss(t,e){const s=`${t}:${e}`,n=de.get(s);return de.delete(s),n}function Ke(t,e){de.delete(`${t}:${e}`)}async function te(t,e){try{const s=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!s.ok)return;const n=await s.json();gs(e,n.items??[])}catch{}}function rn(t){const e=N.c(2);let s;e[0]!==t?(s=ve(t),e[0]=t,e[1]=s):s=e[1];const n=s;return k.useSyncExternalStore(n.subscribe,n.get,n.get)}function Ts(){const{org:t}=H(),e=ke();return{enqueue:st,refresh:s=>te(t.slug,s),cancel:async(s,n)=>{const a=`thread-run:${s}:${n}`;Le(s,n);try{const o=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(s)}/cancel/${encodeURIComponent(a)}`,{method:"POST",credentials:"include"});if(!o.ok&&o.status!==404)throw new Error(`Cancel failed: ${o.status}`);return!0}catch{return re.error(e("chat.queueTray.cancelFailed")),!1}finally{await te(t.slug,s)}}}}function Ee(t,e){return t.find(s=>s!=null&&e.has(s.keyId))??null}function ks(t,e,s){const n=a=>Ee([a],s);return{tiers:{fast:Ee([e.tiers.fast,t.tiers.fast],s),smart:Ee([e.tiers.smart,t.tiers.smart],s),thinking:Ee([e.tiers.thinking,t.tiers.thinking],s),image:n(t.tiers.image),web_search:n(t.tiers.web_search),deep_research:n(t.tiers.deep_research)}}}const Te={tiers:{}};function vs(){const t=N.c(7),{org:e}=H();let s;t[0]!==e.id?(s=se.userModelPreferences(e.id),t[0]=e.id,t[1]=s):s=t[1];let n;t[2]!==e.slug?(n=async()=>{const o=await mt(e.slug,"USER_MODEL_PREFERENCES_GET",{});return o?.tiers?o:Te},t[2]=e.slug,t[3]=n):n=t[3];let a;return t[4]!==s||t[5]!==n?(a={queryKey:s,queryFn:n,staleTime:6e4},t[4]=s,t[5]=n,t[6]=a):a=t[6],pt(a)}function bs(){return vs().data??Te}function cn(){const t=N.c(19),{org:e}=H(),s=ft(),n=je();let a;t[0]!==e.id?(a=se.userModelPreferences(e.id),t[0]=e.id,t[1]=a):a=t[1];const o=a;let r;t[2]!==o||t[3]!==n||t[4]!==s?(r=async x=>{const p=n.getQueryData(o)??Te;return await s.call("USER_MODEL_PREFERENCES_UPDATE",p)??p},t[2]=o,t[3]=n,t[4]=s,t[5]=r):r=t[5];let c,u,h,m;t[6]!==o||t[7]!==n?(c=x=>{const{tier:p,slot:M}=x,$=n.getQueryData(o),P=$??Te;return n.setQueryData(o,{tiers:{...P.tiers,[p]:M}}),{prev:$}},u=(x,p,M)=>{n.setQueryData(o,M?.prev??Te)},h=x=>{n.setQueryData(o,x)},m=()=>{n.isMutating({mutationKey:o})===1&&n.invalidateQueries({queryKey:o})},t[6]=o,t[7]=n,t[8]=c,t[9]=u,t[10]=h,t[11]=m):(c=t[8],u=t[9],h=t[10],m=t[11]);let I;return t[12]!==o||t[13]!==r||t[14]!==c||t[15]!==u||t[16]!==h||t[17]!==m?(I={mutationKey:o,mutationFn:r,onMutate:c,onError:u,onSuccess:h,onSettled:m},t[12]=o,t[13]=r,t[14]=c,t[15]=u,t[16]=h,t[17]=m,t[18]=I):I=t[18],ht(I)}function Is(){const t=N.c(4),e=Wt(),s=bs(),n=Ze();let a;return t[0]!==n||t[1]!==e||t[2]!==s?(a=ks(e,s,new Set(n.map(Ms))),t[0]=n,t[1]=e,t[2]=s,t[3]=a):a=t[3],a}function Ms(t){return t.id}function oe(t,e,s,n){if(!t)return null;const a=e.find(r=>r.id===t.keyId);if(!a)return null;const o=s.find(r=>r.modelId===t.modelId);return o?{...o,keyId:t.keyId}:{modelId:t.modelId,title:n??t.modelId,keyId:t.keyId,providerId:a.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function xs(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function Cs(t,e,s,n){if(!s||n.length===0)return null;const a=e.find(u=>u.id===s);if(!a)return null;const o=qt([a],{[s]:n}),r=t==="fast"?o.chat.fast:t==="thinking"?o.chat.thinking:o.chat.smart;if(!r)return null;const c=n.find(u=>u.modelId===r.modelId);return c?{...c,keyId:s}:null}const He=new Set,W=new Set;function ce(t){return k.useSyncExternalStore(t.subscribe,t.get,t.get)}function ws(t){return t.kind==="loading"?"ready":t.kind}function nt(t){return t&&typeof t=="object"&&"type"in t?{tiptapDoc:t}:t}const As=1e4,Rs=10,be=k.createContext(null),Pe=k.createContext(null),Qe=k.createContext(null),at=k.createContext(null);function _s(t){const e=N.c(3),{value:s,children:n}=t;let a;return e[0]!==n||e[1]!==s?(a=K.jsx(be.Provider,{value:s,children:n}),e[0]=n,e[1]=s,e[2]=a):a=e[2],a}function ln(t){const e=N.c(2),{children:s}=t;let n;return e[0]!==s?(n=K.jsx(be.Provider,{value:null,children:K.jsx(Pe.Provider,{value:null,children:s})}),e[0]=s,e[1]=n):n=e[1],n}function Es({children:t}){const{locator:e}=H(),{virtualMcpId:s}=et(),[n,a]=le(ue.chatSelectedImageModel(e),null),[o,r]=le(ue.chatSelectedWebSearchModel(e),null),[c,u]=le(ue.chatSelectedDeepResearchModel(e),null),[h,m]=k.useState(null),[I,x]=k.useState("default"),p=Is(),[M,$]=le(ue.chatSimpleModeTier(e),null),P=xs(M),v=Ze(),C=p.tiers[P],w=v.some(i=>i.id===C?.keyId)?C?.keyId:void 0,j=h&&v.some(i=>i.id===h)?h:w??v[0]?.id??null,{models:L,isLoading:G}=Se(j??void 0),{models:b}=Se(w),Q=v.some(i=>i.id===p.tiers.image?.keyId)?p.tiers.image?.keyId:void 0,{models:ae}=Se(Q),X=v.some(i=>i.id===p.tiers.web_search?.keyId)?p.tiers.web_search?.keyId:void 0,{models:q}=Se(X),D=v.some(i=>i.id===p.tiers.deep_research?.keyId)?p.tiers.deep_research?.keyId:void 0,{models:B}=Se(D),Y=oe(C,v,b,C?.title)??Cs(P,v,j,L),U=G,V=L.filter(i=>i.capabilities?.includes("image")),F=oe(n,v,V),z=oe(p.tiers.image,v,ae,p.tiers.image?.title)??F??V[0]??null,d=L.filter(Nt),S=oe(o,v,d),_=d.find(i=>i.modelId==="perplexity/sonar")??d[0]??null,Z=oe(p.tiers.web_search,v,q,p.tiers.web_search?.title)??S??_,ie=L.filter(Lt),De=oe(c,v,ie),Oe=ie.find(i=>i.modelId==="perplexity/deep-research")??ie.find(i=>i.asyncResearch===!0)??ie[0]??null,O=oe(p.tiers.deep_research,v,B,p.tiers.deep_research?.title)??De??Oe,Ie=$t(s),pe=Pt().find(i=>i.id===s),qe=Ie??pe??{id:s,title:"",description:null,icon:null},[Me,xe]=k.useState({}),Ce=(i,T)=>{const E=[];for(const y of T.content??[])y.type==="text"&&y.text?.trim()&&E.push(y.text.trim());const g=E.join(`
|
|
32
|
+
`);if(!g){fe(i);return}new TextEncoder().encode(g).length>As||xe(y=>Object.keys(y).length>=Rs&&!(i in y)?y:{...y,[i]:g})},fe=i=>{xe(T=>{const{[i]:E,...g}=T;return g})},[he,me]=le(ue.chatLastAgentOption(e),i=>i&&i in Be?i:null),we=Us(),ge=Yt({pendingOption:he,lockedHarness:we?.isThreadLocked?we.lockedHarness:null}),Ne=ge?Be[ge]:null,[Ae,Re]=k.useState(void 0),_e=k.useRef(Ae);_e.current=Ae;const l={selectedModel:Y,setModel:()=>{},credentialId:j,setCredentialId:m,allModelsConnections:v,isModelsLoading:U,selectedVirtualMcp:qe,imageModel:z,setImageModel:i=>{a(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},webSearchModel:Z,setWebSearchModel:i=>{r(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},deepResearchModel:O,setDeepResearchModel:i=>{u(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},chatMode:I,setChatMode:x,appContexts:Me,setAppContext:Ce,clearAppContext:fe,tiptapDoc:Ae,setTiptapDoc:Re,tiptapDocRef:_e,resetInteraction:()=>{},simpleModeTier:P,setSimpleModeTier:i=>$(i),pendingAgentOption:ge,setPendingAgentOption:me,pendingHarnessId:Ne};return K.jsx(Qe.Provider,{value:l,children:t})}function un(t){const e=N.c(41),{virtualMcpId:s,task:n,children:a}=t,{locator:o}=H(),{data:r}=yt.useSession(),c=r?.user??null,{taskId:u,virtualMcpId:h,navigateToTask:m}=et(),[I]=St(),{markTaskRead:x}=ss(),p=Rt(),M=u,$=h,P=es($);let v;e[0]!==x||e[1]!==m?(v=(d,S)=>{x(d),m(d,{virtualMcpId:S?.virtualMcpId,autosend:S?.autosend})},e[0]=x,e[1]=m,e[2]=v):v=e[2];const C=v,w=M!==null&&n?.id===M?n:null,j=w?.harness_id??null,L=w?.branch??null,G=j!=null,b=L;let Q;e[3]!==b||e[4]!==o||e[5]!==C||e[6]!==p||e[7]!==s?(Q=d=>{const S=crypto.randomUUID(),_=d?.branch??b;return Ue(sessionStorage,o,S,{...d?.runtime?{runtime:d.runtime}:{},..._?{branch:_}:{}}),p.create({id:S,virtual_mcp_id:s,..._?{branch:_}:{},...d?.runtime?{runtime:d.runtime}:{}}).then(()=>{We(sessionStorage,o,S),C(S)}).catch(()=>{C(S)}),S},e[3]=b,e[4]=o,e[5]=C,e[6]=p,e[7]=s,e[8]=Q):Q=e[8];const ae=Q;let X;e[9]!==b||e[10]!==o||e[11]!==C||e[12]!==p||e[13]!==s?(X=d=>{const S=crypto.randomUUID(),_=d.virtualMcpId??s,Z=_===s?b:null;xt(sessionStorage,o,S,d.message),Z&&Ue(sessionStorage,o,S,{branch:Z}),p.create({id:S,virtual_mcp_id:_,...Z?{branch:Z}:{}}).then(()=>{We(sessionStorage,o,S),C(S,{virtualMcpId:d.virtualMcpId,autosend:!0})}).catch(()=>{C(S,{virtualMcpId:d.virtualMcpId,autosend:!0})})},e[9]=b,e[10]=o,e[11]=C,e[12]=p,e[13]=s,e[14]=X):X=e[14];const q=X;let D;e[15]!==M||e[16]!==p?(D=d=>{M&&p.setBranch(M,d)},e[15]=M,e[16]=p,e[17]=D):D=e[17];let B;e[18]!==w||e[19]!==ae||e[20]!==q||e[21]!==b||e[22]!==M||e[23]!==$||e[24]!==G||e[25]!==L||e[26]!==j||e[27]!==C||e[28]!==D?(B={virtualMcpId:$,taskId:M,openTask:C,createTask:ae,createTaskWithMessage:q,activeTask:w,isThreadLocked:G,lockedHarness:j,lockedBranch:L,currentBranch:b,setCurrentTaskBranch:D},e[18]=w,e[19]=ae,e[20]=q,e[21]=b,e[22]=M,e[23]=$,e[24]=G,e[25]=L,e[26]=j,e[27]=C,e[28]=D,e[29]=B):B=e[29];const Y=B;let U;e[30]!==P||e[31]!==I||e[32]!==m||e[33]!==c?(U={user:c,contextPrompt:P,preferences:I,rawNavigateToTask:m},e[30]=P,e[31]=I,e[32]=m,e[33]=c,e[34]=U):U=e[34];const V=U;let F;e[35]!==a||e[36]!==V?(F=K.jsx(Es,{children:K.jsx(at.Provider,{value:V,children:a})}),e[35]=a,e[36]=V,e[37]=F):F=e[37];let z;return e[38]!==F||e[39]!==Y?(z=K.jsx(Pe.Provider,{value:Y,children:F}),e[38]=F,e[39]=Y,e[40]=z):z=e[40],z}const $s=[];function dn(t){const e=N.c(5),{children:s}=t,{createTaskWithMessage:n}=ot();let a;e[0]!==n?(a={messages:$s,status:"ready",sendMessage:async c=>{n({message:nt(c)})},editQueuedMessage:js,stop:Fs,submit:Ls,removeLocalMessage:Ns,isSendInFlight:qs,error:null,clearError:Os,finishReason:null,runStatusStage:null,clearFinishReason:Ds,isStreaming:!1,isChatEmpty:!0,isWaitingForApprovals:!1,isRunInProgress:!1,hasMoreOlder:!1,isFetchingOlder:!1,fetchOlderMessages:Ps},e[0]=n,e[1]=a):a=e[1];const o=a;let r;return e[2]!==s||e[3]!==o?(r=K.jsx(_s,{value:o,children:s}),e[2]=s,e[3]=o,e[4]=r):r=e[4],r}async function Ps(){}function Ds(){}function Os(){}function qs(){return!1}function Ns(){}async function Ls(){}function Fs(){}async function js(){return!1}function pn({taskId:t,children:e}){const s=ke(),n=_t(),a=Bt("voice_mode"),{virtualMcpId:o,activeTask:r,currentBranch:c}=ot(),u=Jt({isDesktopApp:n,harnessId:r?.harness_id}),h=s("chat.input.codingAgentRequiresDesktop");He.has(t)||(He.add(t),vt("chat_opened",{thread_id:t}));const{imageModel:m,webSearchModel:I,deepResearchModel:x,chatMode:p,setChatMode:M,appContexts:$,setTiptapDoc:P,simpleModeTier:v}=Qs(),C=k.useContext(at);if(!C)throw new Error(s("chat.chatContext.activeTaskProviderMissingContext"));const{user:w,contextPrompt:j,preferences:L,rawNavigateToTask:G}=C,{org:b,locator:Q}=H(),ae=Ts(),[X,q]=k.useState(null),D=()=>{q(new Error(h))},B=ts(),Y=je(),U=wt(),V=Xe(),{openPanel:F}=bt(),z=Et({connectionId:gt,orgId:b.id,orgSlug:b.slug}),d=At(b.slug,t,{client:z});k.use(d.ready);const S=ce(d.messages),_=ce(d.status),Z=ce(d.finishReason),ie=ce(d.runStatusStage),De=ce(d.hasMoreOlder),Oe=ce(d.isFetchingOlder),O=k.useRef({onToolCall:B,queryClient:Y,rawNavigateToTask:G,taskId:t,manager:U,navigate:V,openPanel:F,orgId:b.id,orgSlug:b.slug});O.current={onToolCall:B,queryClient:Y,rawNavigateToTask:G,taskId:t,manager:U,navigate:V,openPanel:F,orgId:b.id,orgSlug:b.slug};const Ie=()=>{const l=O.current;hs(l.taskId)&&(async()=>(await te(l.orgSlug,l.taskId),await d.reconcileFromServer()&&ve(l.taskId).get().length===0&&ms(l.taskId)))()};Dt({orgSlug:b.slug,taskId:t,onTaskStatus:l=>{const i=O.current,T=l.data.message_id;if(l.data.status==="in_progress"&&T){Le(i.taskId,T);const E=Ss(i.taskId,T);E&&d.applyLocalMessage(E),te(i.orgSlug,i.taskId)}Ie()},onReconnect:Ie}),k.useEffect(()=>{const l={onData:g=>{if(g.type==="data-thread-title"){const y=g.data;if(!y?.title)return;const A=O.current;if(!A.taskId)return;A.manager.patchThread({id:A.taskId,title:y.title,updated_at:new Date().toISOString()});return}if(g.type==="data-deck-updated"){const y=g.data;if(!y?.path)return;const A=y.path,f=O.current;f.queryClient.invalidateQueries({queryKey:se.orgFsStat(f.orgId,"home",A)}),f.queryClient.invalidateQueries({queryKey:se.orgFsRecent(f.orgId)}),f.openPanel(Tt(A));return}if(g.type==="data-open-preview"){const y=g.data,A=O.current,f=A.taskId;if(f){const ye=A.manager.threads.get().find(J=>J.id===f);A.manager.patchThread({id:f,...y?.branch?{branch:y.branch}:{},metadata:{...ye?.metadata??{},...y?.githubRepo?{githubRepo:y.githubRepo}:{},...y?.sandboxMap?{sandboxMap:y.sandboxMap}:{}}})}A.openPanel("site-editor");return}},onFinish:(g,y,A)=>{const f=O.current;Ot(f.queryClient,f.orgId,Je(g.metadata?.usage)),f.queryClient.invalidateQueries({queryKey:se.aiPlanEntitlements(f.orgId),refetchType:"none"}),f.taskId&&te(f.orgSlug,f.taskId),f.taskId&&f.manager.patchThread({id:f.taskId,status:Gt(A,g.parts),updated_at:new Date().toISOString()});const ye=g.parts?.some(ee=>{const R=ee;return(R.type==="tool-bash"||R.type==="tool-write")&&R.state==="output-available"});if(f.taskId&&ye){const ee=se.threadOutputs(f.taskId);for(const R of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{f.queryClient.invalidateQueries({queryKey:ee})},R)}f.queryClient.invalidateQueries({queryKey:se.homeNextActions(f.orgSlug)});const J=g.metadata?.thread_id;J&&J!==f.taskId&&f.rawNavigateToTask(J)},onError:g=>{q(g),console.error("[chat] Error",g)},onToolCall:g=>O.current.onToolCall(g)};d.observer=l,te(O.current.orgSlug,O.current.taskId);const i=g=>g==="submitted"||g==="streaming";let T=i(d.status.get().kind);const E=d.status.subscribe(()=>{const g=i(d.status.get().kind);if(g===T)return;T=g;const y=O.current;te(y.orgSlug,y.taskId)});return()=>{d.observer===l&&(d.observer=null),E()}},[d]);const pe=_.kind==="submitted"||_.kind==="streaming",qe=S.length===0,Me=S.at(-1),xe=!pe&&Me?.role==="assistant"&&Me.parts.some(l=>"state"in l&&l.state==="approval-requested"),Ce=r,fe=(Ce?.status==="in_progress"||Ce?.status==="expired")&&_.kind==="ready"&&S.length>0;async function he(l,i=!1){const T=t,E=o;if(u)return D(),W.delete(T),!1;const g=Object.entries($),y=g.length>0?g.map(([ee,R])=>`### App Context: ${ee}
|
|
33
33
|
${R}`).join(`
|
|
34
34
|
|
|
35
35
|
`):"",A=[j,y].filter(Boolean).join(`
|
|
36
36
|
|
|
37
|
-
`);let f=p;f==="gen-image"&&!m&&(f="default"),f==="web-search"&&!I&&(f="default"),f==="deep-research"&&!x&&(f="default"),(f==="web-search"||f==="deep-research")&&M("default");const ye=zt({thread:r?{harness_id:r.harness_id??null,branch:r.branch??null}:null,globals:{branch:c}});r?.harness_id||U.patchThread({id:T,harness_id:"decopilot",updated_at:new Date().toISOString()});const J={...i||a?{voiceMode:i}:{},tier:v,mode:f,toolApprovalLevel:L.toolApprovalLevel??kt(),system:A||void 0,agent:{id:
|
|
37
|
+
`);let f=p;f==="gen-image"&&!m&&(f="default"),f==="web-search"&&!I&&(f="default"),f==="deep-research"&&!x&&(f="default"),(f==="web-search"||f==="deep-research")&&M("default");const ye=zt({thread:r?{harness_id:r.harness_id??null,branch:r.branch??null}:null,globals:{branch:c}});r?.harness_id||U.patchThread({id:T,harness_id:"decopilot",updated_at:new Date().toISOString()});const J={...i||a?{voiceMode:i}:{},tier:v,mode:f,toolApprovalLevel:L.toolApprovalLevel??kt(),system:A||void 0,agent:{id:E},thread_id:T,...ye};try{if(pe||fe){let ee=!0;try{ys(T,l),await d.enqueue(l,J),st(T,{workflowId:`thread-run:${T}:${l.id}`,messageId:l.id,text:cs(l.parts),hasAttachments:l.parts.some(R=>R.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),fs(T)}catch(R){ee=!1,Ke(T,l.id),Le(T,l.id),q(R instanceof Error?R:new Error(String(R))),re.error(R instanceof Error?R.message:s("chat.chatContext.failedToQueueMessage"))}return te(b.slug,T),ee}return await d.submit({kind:"message",message:l},J),!0}finally{W.delete(T)}}async function me(l){const i=l.parts??tt(l.tiptapDoc);if(i.length===0||W.has(t))return;W.add(t),q(null),P(void 0);const T={tiptapDoc:l.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:w?.image??void 0,name:w?.name??"you"}},E={id:crypto.randomUUID(),role:"user",parts:i,metadata:T};await he(E)}async function we(l,i){if(u)return D(),!1;if(W.has(t))return re.info(s("chat.chatContext.stillSendingPreviousMessage")),!1;if(W.add(t),!await ae.cancel(t,l))return W.delete(t),re.error(s("chat.chatContext.couldNotRemoveOriginalMessage")),!1;Ke(t,l),d.removeLocalMessage(l);const E={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:i}],metadata:{created_at:new Date().toISOString(),user:{avatar:w?.image??void 0,name:w?.name??"you"}}};try{return await he(E)}catch(g){return re.error(g instanceof Error?g.message:s("chat.chatContext.failedToSendEditedMessage")),!1}}const ge=async()=>{d.stop();try{const l=await fetch(`/api/${b.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(l.status===404)return;if(!l.ok){const i=await l.json().catch(()=>({}));throw new Error(i.message??s("chat.chatContext.cancelFailedStatus",{status:l.status}))}}catch(l){const i=l instanceof Error?l.message:s("chat.chatContext.failedToCancel");re.error(i),console.error("[chat] cancelRun",l)}},Ne=l=>me(nt(l)),Re=Fe({strict:!1}).autosend===ze;k.useEffect(()=>{if(!Re||S.length>0||u)return;const l=It(sessionStorage,Q,t);l&&me(l.message).then(()=>{Mt(sessionStorage,Q,t)})},[Re,S.length,u,Q,t,me]);const _e={sendVoiceMessage:async(l,i)=>W.has(t)?!1:(W.add(t),q(null),he({id:l,role:"user",parts:[{type:"text",text:i}],metadata:{created_at:new Date().toISOString(),user:{name:w?.name??"you",avatar:w?.image??void 0}}},!0)),messages:S,status:ws(_),sendMessage:Ne,editQueuedMessage:we,stop:()=>{if(u){D();return}ge()},submit:async(l,i)=>{if(u){D();return}await d.submit(l,i)},removeLocalMessage:l=>d.removeLocalMessage(l),isSendInFlight:()=>W.has(t),error:X,clearError:()=>q(null),finishReason:Z,runStatusStage:ie,clearFinishReason:()=>d.finishReason.set(null),isStreaming:pe,isChatEmpty:qe,isWaitingForApprovals:xe??!1,isRunInProgress:fe,hasMoreOlder:De,isFetchingOlder:Oe,fetchOlderMessages:d.fetchOlderMessages.bind(d)};return K.jsx(be.Provider,{value:_e,children:e})}function fn(){const t=ke(),e=k.useContext(be);if(!e)throw new Error(t("chat.chatContext.useChatStreamMissingContext"));return e}function hn(){return k.useContext(be)}function ot(){const t=ke(),e=k.useContext(Pe);if(!e)throw new Error(t("chat.chatContext.useChatTaskMissingContext"));return e}function Qs(){const t=ke(),e=k.useContext(Qe);if(!e)throw new Error(t("chat.chatContext.useChatPrefsMissingContext"));return e}function mn(){return k.useContext(Qe)}function Us(){return k.useContext(Pe)}export{pn as A,Es as C,ln as D,dn as T,fn as a,ot as b,Qs as c,sn as d,et as e,hn as f,tt as g,un as h,rn as i,an as j,on as k,Ts as l,Ke as m,Ee as n,vs as o,cn as p,Is as q,mn as r,Jt as s,nn as t,Us as u,Je as v,Ht as w,Kt as x,tn as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as l}from"./index-
|
|
1
|
+
import{V as l}from"./index-oPco2Z7Q.js";const y="[SUBSCRIPTION_REQUIRED]";function h(t){return t?.message.startsWith(y)?t.message.includes("used its free task executions")?"trial_exhausted":t.message.includes("used its monthly task executions")?"monthly_exhausted":t.message.includes("reached its execution limit")?"runs_exhausted":null:null}function d(t){return!t||!t.content||t.content.length===0?!0:t.content.every(e=>e.type==="paragraph"?!e.content||e.content.length===0?!0:e.content.every(n=>n.type==="hardBreak"||n.type==="text"&&(!n.text||n.text.trim()==="")):!1)}const _="__home__";function a(t,e){return l.chatDraft(t,e)}function m(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}if(!e||typeof e!="object"||typeof e.updatedAt!="number")return null;const n=e.tiptapDoc;return!n||typeof n!="object"||n.type!=="doc"||!Array.isArray(n.content)?null:n}function x(t,e,n,r,s){const u=a(e,n);if(d(r)){t.removeItem(u);return}const c={tiptapDoc:r,updatedAt:Date.now()},o=JSON.stringify(c);try{t.setItem(u,o)}catch(i){if(p(i)){const f=new TextEncoder().encode(o).byteLength;s?.onQuotaExceeded?.({docSizeBytes:f});return}throw i}}function R(t,e,n){const r=a(e,n),s=t.getItem(r),u=m(s);return s!==null&&u===null&&t.removeItem(r),u}function D(t,e,n){t.removeItem(a(e,n))}function p(t){if(!t||typeof t!="object")return!1;const e=t.name;return e==="QuotaExceededError"||e==="NS_ERROR_DOM_QUOTA_REACHED"}export{_ as H,D as c,d as i,R as r,h as s,x as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as d,j as c,ep as l,eq as m}from"./index-
|
|
1
|
+
import{c as n,l as d,j as c,ep as l,eq as m}from"./index-oPco2Z7Q.js";import{i as p}from"./Check-ClKm876e.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(p,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as y,j as i,u as w,b as S,d as v,B as N,N as C,J as K,m as $,K as T,h as I}from"./index-oPco2Z7Q.js";import{A as F}from"./agent-icon-BvDKYGuI.js";import{R as P}from"./required-auth-layout-Byop8Zzr.js";import"./AlertCircle-CvaSOOO8.js";import"./Tool01-gY-gdMF4.js";import"./ArrowUp-C1c3cSMN.js";import"./ArrowLeft-BsqlBCdi.js";import"./ArrowRight-B6VZdTtP.js";import"./ShoppingBag01-DsBku-zP.js";import"./ZoomOut-DvQpsf4w.js";import"./Palette-C2svjF4J.js";import"./CheckCircle-B38I9lsp.js";import"./Check-ClKm876e.js";import"./ChevronUp-BBBSFlle.js";import"./UserSquare-BA1qsXhU.js";import"./Copy01-kb1901QR.js";import"./CreditCard01-DkYuXaNf.js";import"./DotsVertical-OXZ2C8qE.js";import"./Image01-xbxm22_Y.js";import"./XClose-DnZUIdlK.js";import"./Key01-ZIYydTtn.js";import"./Link01-cXYRJQde.js";import"./LinkExternal01-UxTfoueY.js";import"./Monitor01-CINH3FWT.js";import"./Sun-CJOAGa8i.js";import"./Plus-Bv10xzXZ.js";import"./SearchMd-DRAIsS0-.js";import"./Trash01-DUhLvzYZ.js";import"./Upload01-BsdejHE0.js";import"./User01-B4dCU7oy.js";import"./Users01-BLSNtVXz.js";import"./X-BTpPaU7c.js";async function _(t){const e=new URLSearchParams({site:t}),l=await fetch(`/api/_editor-resolve?${e.toString()}`,{headers:{Accept:"application/json"}});if(!l.ok){const r=new Error(`editor-resolve HTTP ${l.status}`);throw r.status=l.status,r}return await l.json()}function R(t){const e=t?.status;return typeof e=="number"&&e>=400&&e<500}function k(t){return{...t.pageId?{contentPageId:t.pageId}:{},...t.path?{contentPath:t.path}:{},...t.pathTemplate?{contentPathTemplate:t.pathTemplate}:{}}}function b(t){const e=y.c(2),{children:l}=t;let r;return e[0]!==l?(r=i.jsx("div",{className:"flex min-h-screen w-full items-center justify-center bg-background p-6",children:i.jsx("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:l})}),e[0]=l,e[1]=r):r=e[1],r}function A(){const t=y.c(5),e=S();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(I,{className:"size-6 text-muted-foreground"}),t[0]=l):l=t[0];let r;t[1]!==e?(r=e("chooseEditor.resolving"),t[1]=e,t[2]=r):r=t[2];let s;return t[3]!==r?(s=i.jsxs(b,{children:[l,i.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),t[3]=r,t[4]=s):s=t[4],s}function E(t){const e=y.c(29),{titleKey:l,descriptionKey:r,onRetry:s}=t,n=S(),m=v();let d;e[0]!==n||e[1]!==l?(d=n(l),e[0]=n,e[1]=l,e[2]=d):d=e[2];let u;e[3]!==d?(u=i.jsx("h1",{className:"text-lg font-medium text-foreground",children:d}),e[3]=d,e[4]=u):u=e[4];let f;e[5]!==r||e[6]!==n?(f=n(r),e[5]=r,e[6]=n,e[7]=f):f=e[7];let a;e[8]!==f?(a=i.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[8]=f,e[9]=a):a=e[9];let c;e[10]!==u||e[11]!==a?(c=i.jsxs("div",{className:"flex flex-col gap-2",children:[u,a]}),e[10]=u,e[11]=a,e[12]=c):c=e[12];let p;e[13]!==s||e[14]!==n?(p=s?i.jsx(N,{variant:"outline",onClick:s,children:n("chooseEditor.retry")}):null,e[13]=s,e[14]=n,e[15]=p):p=e[15];let o;e[16]!==m?(o=()=>m({to:"/"}),e[16]=m,e[17]=o):o=e[17];let g;e[18]!==n?(g=n("chooseEditor.backToStudio"),e[18]=n,e[19]=g):g=e[19];let j;e[20]!==o||e[21]!==g?(j=i.jsx(N,{onClick:o,children:g}),e[20]=o,e[21]=g,e[22]=j):j=e[22];let x;e[23]!==p||e[24]!==j?(x=i.jsxs("div",{className:"flex items-center gap-2",children:[p,j]}),e[23]=p,e[24]=j,e[25]=x):x=e[25];let h;return e[26]!==x||e[27]!==c?(h=i.jsxs(b,{children:[c,x]}),e[26]=x,e[27]=c,e[28]=h):h=e[28],h}function q(t){const e=y.c(6),{orgSlug:l,projectId:r,pageSearch:s}=t;let n;e[0]!==l||e[1]!==r?(n={org:l,agentId:r},e[0]=l,e[1]=r,e[2]=n):n=e[2];let m;return e[3]!==s||e[4]!==n?(m=i.jsx(C,{to:K.siteEditorContent,params:n,search:s,replace:!0}),e[3]=s,e[4]=n,e[5]=m):m=e[5],m}function L(t){const e=y.c(26),{matches:l,pageSearch:r}=t,s=S(),n=v();let m;e[0]!==n||e[1]!==r?(m=x=>{n({to:K.siteEditorContent,params:{org:x.orgSlug,agentId:x.project.id},search:r})},e[0]=n,e[1]=r,e[2]=m):m=e[2];const d=m;let u;e[3]!==s?(u=s("chooseEditor.chooser.title"),e[3]=s,e[4]=u):u=e[4];let f;e[5]!==u?(f=i.jsx("h1",{className:"text-lg font-medium text-foreground",children:u}),e[5]=u,e[6]=f):f=e[6];let a;e[7]!==s?(a=s("chooseEditor.chooser.subtitle"),e[7]=s,e[8]=a):a=e[8];let c;e[9]!==a?(c=i.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[9]=a,e[10]=c):c=e[10];let p;e[11]!==f||e[12]!==c?(p=i.jsxs("div",{className:"flex flex-col gap-2",children:[f,c]}),e[11]=f,e[12]=c,e[13]=p):p=e[13];let o;if(e[14]!==l||e[15]!==d||e[16]!==s){let x;e[18]!==d||e[19]!==s?(x=h=>i.jsxs("button",{type:"button",onClick:()=>d(h),"aria-label":s("chooseEditor.chooser.openAriaLabel",{title:h.project.title,org:h.orgName}),className:"flex w-full items-center gap-3 rounded-lg border border-border bg-card p-3 text-left transition-colors hover:bg-accent",children:[i.jsx(F,{icon:h.project.icon,name:h.project.title,size:"sm"}),i.jsxs("div",{className:"flex min-w-0 flex-col",children:[i.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:h.project.title}),i.jsx("span",{className:"truncate text-xs text-muted-foreground",children:h.orgName})]})]},`${h.orgSlug}/${h.project.id}`),e[18]=d,e[19]=s,e[20]=x):x=e[20],o=l.map(x),e[14]=l,e[15]=d,e[16]=s,e[17]=o}else o=e[17];let g;e[21]!==o?(g=i.jsx("div",{className:"flex w-full flex-col gap-2",children:o}),e[21]=o,e[22]=g):g=e[22];let j;return e[23]!==p||e[24]!==g?(j=i.jsxs(b,{children:[p,g]}),e[23]=p,e[24]=g,e[25]=j):j=e[25],j}function z(){const t=y.c(24);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/choose-editor"},t[0]=e):e=t[0];const l=w(e);let r,s,n,m;t[1]!==l?(s=l.site?.trim()??"",r=k(l),m=$,n=T.editorResolve(s),t[1]=l,t[2]=r,t[3]=s,t[4]=n,t[5]=m):(r=t[2],s=t[3],n=t[4],m=t[5]);let d;t[6]!==s?(d=()=>_(s),t[6]=s,t[7]=d):d=t[7];const u=s.length>0;let f;t[8]!==n||t[9]!==d||t[10]!==u?(f={queryKey:n,queryFn:d,enabled:u,staleTime:1/0,retry:B},t[8]=n,t[9]=d,t[10]=u,t[11]=f):f=t[11];const a=m(f);if(!s){let o;return t[12]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[12]=o):o=t[12],o}if(a.isError){let o;return t[13]!==a?(o=R(a.error)?i.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}):i.jsx(E,{titleKey:"chooseEditor.error.title",descriptionKey:"chooseEditor.error.description",onRetry:()=>a.refetch()}),t[13]=a,t[14]=o):o=t[14],o}if(!a.data){let o;return t[15]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(A,{}),t[15]=o):o=t[15],o}const{matches:c}=a.data;if(c.length===0){let o;return t[16]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[16]=o):o=t[16],o}if(c.length===1&&c[0]){let o;return t[17]!==c[0].orgSlug||t[18]!==c[0].project.id||t[19]!==r?(o=i.jsx(q,{orgSlug:c[0].orgSlug,projectId:c[0].project.id,pageSearch:r}),t[17]=c[0].orgSlug,t[18]=c[0].project.id,t[19]=r,t[20]=o):o=t[20],o}let p;return t[21]!==c||t[22]!==r?(p=i.jsx(L,{matches:c,pageSearch:r}),t[21]=c,t[22]=r,t[23]=p):p=t[23],p}function B(t,e){return!R(e)&&t<2}function ye(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(P,{children:i.jsx(z,{})}),t[0]=e):e=t[0],e}export{ye as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Oe,U as Qe,V as ze,K as Re,m as Xe}from"./index-DUhG4tsR.js";import{s as Ae}from"./thread-intent-CNQdM8Ho.js";function It(e){const t=Oe.c(12);let n;t[0]!==e?(n=ze.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const r=n,[o,s]=Qe(r,null);let a;t[2]!==o||t[3]!==e?(a=e?Ae(o):null,t[2]=o,t[3]=e,t[4]=a):a=t[4];const f=a;let m,S;t[5]!==s?(m=k=>s(Ae(k)),S=()=>s(null),t[5]=s,t[6]=m,t[7]=S):(m=t[6],S=t[7]);let L;return t[8]!==m||t[9]!==S||t[10]!==f?(L={url:f,setUrl:m,clear:S},t[8]=m,t[9]=S,t[10]=f,t[11]=L):L=t[11],L}function Pe(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Ze(e,t,n){return["decofile-write",e,t,n]}function Ut(e,t,n){return{id:Ze(e,t,n).join(":")}}function ke(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function Je(e,t){const n=await e.json().catch(()=>({}));throw new Error(n.error??`${t} failed (${e.status})`)}function et(e,t,n){e.setQueryData(Re.decofileDraft(Pe(t)),n)}function xt(e){const t=Oe.c(4);let n;t[0]!==e?(n=Re.decofileDraft(e?Pe(e):""),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r={queryKey:n,enabled:!1,queryFn:tt,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=r):r=t[3];const{data:o}=Xe(r);return o??null}async function tt(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function Dt(e,t){const n=await fetch(ke(t),{cache:"no-store"});if(!n.ok){const o=new Error(`Failed to fetch decofile: ${n.status}`);throw o.status=n.status,o}const r=await n.json();return r.token&&et(e,t,{version:r.version,token:r.token,apiHost:r.apiHost??window.location.host}),r.decofile}async function Mt(e,t){const n=await fetch(ke(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)return Je(n,"Save");const r=await n.json();return{...r,apiHost:r.apiHost??window.location.host}}function nt(e){return e.replace(/\/+$/,"")||"/"}function Vt(e){return e.trim().replace(/^\/+|\/+$/g,"")}function rt(e){const t=e.trim();return!(!t.startsWith("/")||t.startsWith("//")||t.includes("..")||t.includes("\\"))}function Wt(e){const t=e.trim();return t?rt(t)?null:"Path must start with / and must not contain .. or //.":"Path is required."}const te=/:([A-Za-z0-9_-]+)|\*/g;function Yt(e){const t=[];for(const n of e.matchAll(te)){const r=n[1]??"*";t.includes(r)||t.push(r)}return t}function we(e){return e.replace(/\{([^{}]*)\}\?/g,"$1")}function Ft(e){e=we(e);const t=[];let n=0;for(const r of e.matchAll(te))r.index>n&&t.push({type:"text",text:e.slice(n,r.index)}),t.push({type:"param",name:r[1]??"*"}),n=r.index+r[0].length;return n<e.length&&t.push({type:"text",text:e.slice(n)}),t}function Nt(e,t){return we(e).replace(te,(n,r)=>{const o=t[r??"*"]?.trim();return o?r!==void 0?encodeURIComponent(o):o.split("/").filter(Boolean).map(encodeURIComponent).join("/")||n:n})}function be(e){if(!e.startsWith("#")||!e.includes("@"))return null;const t=e.indexOf("@");return{moduleResolveType:e.slice(1,t),blockId:e.slice(t+1)}}function qt(e){return e.includes("@")}function ve(e){const t=e.lastIndexOf("@");return t<0||t===e.length-1?null:e.slice(t+1)}function Kt(e,t){if(e===t)return!0;const n=ve(e);return n?t===n||ve(t)===n:!1}function ne(e,t){const n=e.manifest?.blocks??{};for(const[r,o]of Object.entries(n))if(t in o)return r;return null}function re(e,t){const n=ne(e,t);return n!==null&&n.includes("sections")}function it(e,t){const n=ne(e,t);return n!==null&&n.includes("apps")}function Ht(e,t){const n=ne(e,t);return n!==null&&n.includes("matchers")}function $e(e){return!(!e||/\.\w+$/.test(e)||e==="__proto__"||e==="constructor")}function je(e){try{return decodeURIComponent(e).startsWith("Preview ")}catch{return e.startsWith("Preview ")}}const Gt="oklch(0.7278 0.151 289)",ot="website/matchers/always.ts",Qt="website/matchers/never.ts",st="website/flags/multivariate.ts",Ce="website/flags/multivariate/section.ts";function zt(){return{__resolveType:ot}}function V(e){const t=e.split("/");return(t[t.length-1]??e).replace(/\.(tsx?|jsx?)$/,"").replace(/[-_]/g," ").replace(/\b\w/g,r=>r.toUpperCase())||e}const ct=12,at=8,z=32,ft=40,lt="__SECTION_REF__";function X(e){const t=e.type;return t==="array"||Array.isArray(t)&&t.includes("array")}function Te(e,t){let n=e.items;if(!n)return!1;if(typeof n.$ref=="string"&&(n=t(n.$ref)),Array.isArray(n.anyOf)||Array.isArray(n.oneOf))return!0;const o=n.properties?.__resolveType?.enum;return Array.isArray(o)&&typeof o[0]=="string"}const ut="VideoWidget";function M(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Be(e){return typeof btoa=="function"?btoa(e):Buffer.from(e).toString("base64")}function ie(e){const t=e.match(/^site\/apps\/([^/]+)\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function oe(e){const t=e.match(/^([^/]+)\/apps\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Le(e,t){return[`site/apps/${e}/${t}.ts`,`site/apps/${e}/${t}.tsx`,`${e}/apps/${t}.ts`,`${e}/apps/${t}.tsx`]}function se(e,t){const n=t.manifest?.blocks??{};for(const f of Object.values(n))if(f[e])return f[e];const r=ie(e)??oe(e);if(r){for(const f of Le(r.vendor,r.app))for(const m of Object.values(n))if(m[f])return m[f]}const o=Be(e);for(const f of Object.values(n))if(f[o])return f[o];const s=t.schema??{};return(s.$defs??s.definitions??{})[o]?{$ref:`#/definitions/${o}`}:{}}function Ie(e,t){if(it(e,t))return!0;const n=ie(t)??oe(t);if(!n)return!1;const r=e.manifest?.blocks?.apps??{};if(Le(n.vendor,n.app).some(a=>a in r))return!0;const o=Be(t),s=e.schema?.$defs??e.schema?.definitions??{};return o in s}function pt(e){return e==="site/apps/site.ts"?!1:ie(e)!==null||oe(e)!==null}function yt(e,t){const n=t.schema??{},r=se(e,t),o=n.$defs??n.definitions??{},s=n.root??{},a=c=>{if(c.startsWith("#/root/")){const i=c.slice(7);return s[i]??{}}const y=c.split("/").pop()??"",g=o[y];return g||(y===lt?s.sections??{}:{})};let f;typeof r.$ref=="string"?f=a(r.$ref):Object.keys(r).length>0?f=r:f=n;const m=c=>typeof c.$ref=="string"?a(c.$ref):c,S=c=>{const g=m(c).properties?.type;if(g){if(typeof g.const=="string")return g.const;if(typeof g.default=="string")return g.default;if(Array.isArray(g.enum)&&typeof g.enum[0]=="string")return g.enum[0]}},L=(c,y)=>{const g=m(c);return typeof g.title=="string"&&!g.title.startsWith("#")?g.title:y},k=(c,y=new Set)=>{if(typeof c.$ref!="string"||c.properties||c.anyOf||c.allOf||c.oneOf||c.type)return c;const g=c.$ref.split("/").pop()??"";return!g||y.has(g)?c:k(a(c.$ref),new Set([...y,g]))},$=c=>{const y=c.hide;return y===!0||y==="true"},fe=c=>typeof c=="string"&&(c.includes("://")||!/\s/.test(c)&&(c.includes("|")||c.includes("&")||c.includes("@"))),F=(c,y=new Set,g=0)=>{if(g>ct)return{};if(typeof c.$ref=="string"){const R=c.$ref.split("/").pop()??"";return y.has(R)?{}:F(a(c.$ref),new Set([...y,R]),g+1)}let i={};c.properties&&typeof c.properties=="object"&&(i={...i,...c.properties}),Array.isArray(c.required)&&(i.__required=[...M(i.__required),...M(c.required)]);for(const R of["allOf","anyOf","oneOf"]){const O=c[R];if(Array.isArray(O))for(const j of O){const C=M(i.__required),x=F(j,y,g+1);i={...i,...x};const w=R==="allOf"?[...C,...M(x.__required)]:C;w.length>0?i.__required=w:delete i.__required}}return i},I=(c,y=0,g=new Set)=>{let i=c,R;if(typeof c.$ref=="string"){i=a(c.$ref);const A=c.$ref.split("/").pop()??"";R=A,A===ut&&!i.format&&(i={...i,format:"video-uri"})}i=k(i);const O=R!==void 0&&g.has(R),j=R!==void 0?new Set([...g,R]):g,C=(A,p,b,h=!0)=>!O&&(!h||b<=ft)&&p<at?I(A,p,j):void 0;let x;{const A=i.anyOf??i.oneOf;if(Array.isArray(A)){const p=A.filter(h=>!(h.type==="null"||h.type===null)),b=h=>{if(typeof h.const=="string"||typeof h.const=="number")return h.const;if(Array.isArray(h.enum)&&h.enum.length===1&&(typeof h.enum[0]=="string"||typeof h.enum[0]=="number"))return h.enum[0]};p.length>0&&p.every(h=>b(h)!==void 0)&&(x=p.map(h=>b(h)))}}let w,W,ye=!1;if(i.type)w=Array.isArray(i.type)?String(i.type.find(A=>A!=="null")??i.type[0]):String(i.type);else if(i.anyOf||i.oneOf){const p=(i.anyOf??i.oneOf).filter(b=>!(b.type==="null"||b.type===null));if(p.length===0)w="null";else if(p.length===1){const b=p[0];W=b,w=b.type?Array.isArray(b.type)?String(b.type[0]):String(b.type):typeof b.$ref=="string"?"object":"string"}else{if(x){const u=l=>typeof c[l]=="string"?c[l]:typeof i[l]=="string"?i[l]:void 0;return{type:"string",title:typeof i.title=="string"?i.title:void 0,description:typeof i.description=="string"?i.description:void 0,enum:x,format:u("format"),options:u("options")}}const b=p.filter(u=>{const l=u.properties?.__resolveType?.enum;return Array.isArray(l)&&typeof l[0]=="string"}),h=p.map(u=>k(u)).find(X),G=p.filter(u=>!X(k(u))).every(u=>typeof u.$ref=="string"||b.includes(u)),Ke=b.some(u=>{const l=u.properties?.__resolveType?.enum;return Array.isArray(l)&&l[0]===st});if(h){if(!Te(h,a)&&p.length>1&&G){const l=I(h,y+1,j);return{...l,type:"array",title:typeof i.title=="string"?i.title:l.title,description:typeof i.description=="string"?i.description:l.description}}if(Ke){const l=I(h,y+1,j);return{...l,type:"array",title:typeof i.title=="string"?i.title:l.title,description:typeof i.description=="string"?i.description:l.description}}}if(b.length>0){const u=b.map(_=>{const P=_.properties?.__resolveType?.enum??[],B=String(P[0]);return{resolveType:B,title:typeof _.title=="string"?_.title:V(B),description:typeof _.description=="string"?_.description:void 0,schema:C(_,y+1,p.length)}}),l=[];for(const _ of p){if(b.includes(_)||typeof _.$ref!="string")continue;const T=a(_.$ref);let P;const B=T.properties?.__resolveType;if(Array.isArray(B?.enum)&&typeof B.enum[0]=="string"&&(P=B.enum[0]),!P&&Array.isArray(T.allOf))for(const Ge of T.allOf){const Q=Ge.properties?.__resolveType?.enum;if(Array.isArray(Q)&&typeof Q[0]=="string"){P=Q[0];break}}P&&l.push({resolveType:P,title:typeof T.title=="string"&&!T.title.startsWith("#")?T.title:V(P),description:typeof T.description=="string"?T.description:void 0,schema:C(T,y+1,p.length)})}const d=new Set(u.map(_=>_.resolveType)),v=[...u,...l.filter(_=>!d.has(_.resolveType))],E=p.filter(_=>!b.includes(_)),U=E.length===1&&!O?I(E[0],y+1,j):void 0;return{type:"block-ref",title:typeof i.title=="string"?i.title:void 0,description:typeof i.description=="string"?i.description:void 0,anyOfRefs:v,plainSchema:U,hidden:$(i)||$(c)?!0:void 0}}const ge=u=>{const l=m(u);if(typeof l.title=="string"&&be(l.title))return!0;const d=l.properties?.__resolveType?.enum;if(Array.isArray(d)&&typeof d[0]=="string")return!0;if(Array.isArray(l.allOf))for(const v of l.allOf){const E=v.properties?.__resolveType?.enum;if(Array.isArray(E)&&typeof E[0]=="string")return!0}return!1},me=p.map(u=>S(u));if(p.length>1&&me.every(u=>typeof u=="string")&&!p.some(ge)){const u=p.map((l,d)=>{const v=m(l),E=me[d];return{resolveType:E,title:L(l,E),description:typeof v.description=="string"?v.description:void 0,discriminatorValue:E,schema:C(v,y+1,p.length,!1)}});return{type:"block-ref",title:typeof c.title=="string"?c.title:typeof i.title=="string"?i.title:void 0,description:typeof c.description=="string"?c.description:typeof i.description=="string"?i.description:void 0,discriminatorKey:"type",anyOfRefs:u,hidden:$(i)||$(c)?!0:void 0}}const he=u=>{if(ge(u))return!1;const l=m(u);return l.type==="object"||!!l.properties},He=u=>{const l=k(u);return X(l)?!Te(l,a):!1},_e=y<z&&p.every(u=>he(u)||He(u))&&p.some(he);if(p.every(u=>typeof u.$ref=="string")&&!_e){const u=[];for(const l of p){const d=a(l.$ref);let v,E;if(typeof d.title=="string"){const _=be(d.title);_&&(v=_.blockId,E=_.blockId)}if(!v&&Array.isArray(d.allOf))for(const _ of d.allOf){const B=((_.properties??{}).__resolveType??{}).enum;if(Array.isArray(B)&&typeof B[0]=="string"){v=B[0];break}}if(!v){const T=d.properties?.__resolveType?.enum;Array.isArray(T)&&typeof T[0]=="string"&&(v=T[0])}v||(v=l.$ref.split("/").pop()??"");const U=v.includes("/")?void 0:S(l);!U&&!v.includes("/")||u.push({resolveType:U??v,title:E??(typeof d.title=="string"&&!d.title.startsWith("#")?d.title:V(v)),description:typeof d.description=="string"?d.description:void 0,discriminatorValue:U,schema:C(d,y+1,p.length)})}return{type:"block-ref",title:typeof i.title=="string"?i.title:void 0,description:typeof i.description=="string"?i.description:void 0,anyOfRefs:u,hidden:$(i)||$(c)?!0:void 0}}if(_e){const u=d=>{if(typeof d.const=="string"||typeof d.const=="number"||typeof d.const=="boolean")return d.const;if(Array.isArray(d.enum)&&d.enum.length===1&&(typeof d.enum[0]=="string"||typeof d.enum[0]=="number"||typeof d.enum[0]=="boolean"))return d.enum[0]},l=p.map((d,v)=>{const E=m(d).properties??{},U={};for(const[_,T]of Object.entries(E)){const P=u(T);P!==void 0&&(U[_]=P)}return{title:L(d,`Option ${v+1}`),schema:I(d,y+1),discriminators:Object.keys(U).length?U:void 0}});return{type:"inline-union",title:typeof c.title=="string"?c.title:typeof i.title=="string"?i.title:void 0,description:typeof i.description=="string"?i.description:void 0,inlineUnionBranches:l,hidden:$(i)||$(c)?!0:void 0}}w="object"}}else i.allOf?(w="object",ye=fe(i.title)):typeof c.$ref=="string"&&(w="object");let K,de;if(y<z){const A=F(i),p=M(A.__required);p.length>0&&(de=p);const b=Object.entries(A).filter(([h])=>!h.startsWith("__")&&h!=="@type");if(b.length>0){K={};for(const[h,G]of b)K[h]=I(G,y+1,j)}}let H;if((w==="array"||i.type==="array")&&y<z){let A=i.items;A&&(typeof A.$ref=="string"&&(A=a(A.$ref)),H=I(A,y+1,j),typeof A.title=="string"&&A.title.includes("{{")&&(H.titleBy=A.title))}const D=A=>{const p=W?.[A];return typeof p=="string"?p:void 0},qe=()=>{if("default"in c)return c.default;if("default"in i)return i.default;if(W&&"default"in W)return W.default};return{type:w??"string",title:typeof c.title=="string"?c.title:!ye&&typeof i.title=="string"?i.title:D("title"),description:typeof c.description=="string"?c.description:typeof i.description=="string"?i.description:D("description"),default:qe(),enum:Array.isArray(i.enum)?i.enum:x??void 0,format:typeof c.format=="string"?c.format:typeof i.format=="string"?i.format:D("format"),properties:K,required:de,items:H,hidden:$(i)||$(c)?!0:void 0,titleBy:typeof i.titleBy=="string"?i.titleBy:D("titleBy"),image:typeof i.image=="string"?i.image:D("image"),options:typeof c.options=="string"?c.options:typeof i.options=="string"?i.options:D("options")}},le=f.properties??{},Ne=Object.keys(le).every(c=>c.startsWith("__"));if(Array.isArray(f.allOf)&&f.allOf.length===1&&Ne){const c=le.__resolveType,y=Array.isArray(c?.enum)&&typeof c.enum[0]=="string"?c.enum[0]:typeof c?.const=="string"?c.const:typeof c?.default=="string"?c.default:void 0;for(const g of f.allOf){const i=k(g);if(!(Array.isArray(i.anyOf)||Array.isArray(i.oneOf))||i.properties)continue;const O=I(i,0);if(O.type==="inline-union"&&O.inlineUnionBranches){const j=fe(O.title);return{...O,title:j?void 0:O.title,inlineUnionBranches:y?O.inlineUnionBranches.map(C=>({...C,discriminators:{...C.discriminators??{},__resolveType:y}})):O.inlineUnionBranches}}}}const ue=F(f),q={};for(const[c,y]of Object.entries(ue))c.startsWith("__")||c==="@type"||(q[c]=I(y,0));if(Object.keys(q).length===0)return null;const pe=M(ue.__required);return{type:"object",title:typeof f.title=="string"?f.title:void 0,properties:q,required:pe.length>0?pe:void 0}}function Xt(e,t){const n=t.schema??{},r=se(e,t),o=n.$defs??n.definitions??{},s=typeof r.$ref=="string"?o[r.$ref.split("/").pop()??""]??{}:r,a=s.properties??{};if(Object.keys(a).some(S=>!S.startsWith("__")))return!1;if(s.additionalProperties===!0)return!0;const m=a.__resolveType;return!!m&&Array.isArray(m.enum)&&m.enum[0]===e}function Zt(e){const t=r=>{switch(typeof r){case"number":return{type:"number"};case"boolean":return{type:"boolean"};case"object":{if(r===null)return{type:"string"};if(Array.isArray(r))return{type:"array",items:t(r[0])};const o={};for(const[s,a]of Object.entries(r))s.startsWith("__")||(o[s]=t(a));return{type:"object",properties:o}}default:return{type:"string"}}},n={};for(const[r,o]of Object.entries(e))r.startsWith("__")||(n[r]=t(o));return Object.keys(n).length===0?null:{type:"object",properties:n}}function ce(e,t){const n=t.schema??{},r=se(e,t),o=n.$defs??n.definitions??{},s=typeof r.$ref=="string"?o[r.$ref.split("/").pop()??""]??{}:Object.keys(r).length>0?r:{...n,...r},a=s.icon,f=s.logo,m=s,S=k=>k===!0||k==="true",L=S(m.hide)||S(m.ignore)||S(m.unlisted);return{title:typeof s.title=="string"?s.title:void 0,description:typeof s.description=="string"?s.description:void 0,icon:typeof a=="string"?a:void 0,logo:typeof f=="string"?f:void 0,hidden:L||void 0}}const dt=["website/sections/Rendering/Lazy.tsx","website/sections/Rendering/SingleDeferred.tsx"],Jt="website/sections/Rendering/Lazy.tsx";function Ue(e){return dt.some(t=>e.endsWith(t))}const xe=["website/pages/Page.tsx","$live/pages/LivePage.tsx"],De=new Set(xe),gt=new Set(["site/sections/Theme/Theme.tsx"]);function N(e){return!!(gt.has(e)||Ue(e)||e.toLowerCase().includes("preview"))}function mt(e){const t=e.manifest?.blocks??{};for(const n of Object.values(t))for(const r of Object.keys(n))if(De.has(r))return r;return xe[0]}function Z(e){if(!e)return[];if(e.anyOfRefs?.length)return e.anyOfRefs;if(e.items)return Z(e.items);if(e.properties){const t=[];for(const n of Object.values(e.properties))t.push(...Z(n));return t}return[]}function ht(e){const t=e.manifest?.blocks??{},n=[];for(const[r,o]of Object.entries(t))if(r.includes("sections"))for(const s of Object.keys(o)){if(N(s))continue;const a=ce(s,e);n.push({resolveType:s,title:a.title??V(s),description:a.description,previewBlock:s,isSavedBlock:!1})}return n}function en(e){const t=e.manifest?.blocks??{},n=new Map;for(const[r,o]of Object.entries(t))if(r.includes("sections"))for(const s of Object.keys(o))N(s)||n.has(s)||n.set(s,{resolveType:s,title:V(s)});return[...n.values()].sort((r,o)=>r.title.localeCompare(o.title))}function Me(e,t){const n=t.__resolveType;if(typeof n!="string")return"";if(n!==Ce)return n;const r=t.variants;if(!Array.isArray(r))return n;for(const o of r){const s=o?.value;if(!s)continue;let a=s.__resolveType;if(typeof a=="string"&&Ue(a)&&(a=s.section?.__resolveType??a),typeof a=="string"&&re(e,a))return a}return n}function _t(e,t){return Me(e,t)!==t.__resolveType}function Ve(e,t){const n=[];for(const[r,o]of Object.entries(t)){if(r.includes("/")||je(r)||!o||typeof o!="object"||Array.isArray(o))continue;const s=o,a=s.__resolveType;typeof a!="string"||De.has(a)||typeof s.path=="string"||N(a)||!(re(e,a)||a===Ce&&_t(e,s))||n.push({resolveType:r,title:r,description:typeof s.name=="string"?s.name:void 0,previewBlock:r,isSavedBlock:!0})}return n}function At(e,t){const n=$e(t.resolveType),r=n?{}:ce(t.resolveType,e);return{resolveType:t.resolveType,title:t.title||r.title||V(t.resolveType),description:t.description??r.description,previewBlock:t.resolveType,isSavedBlock:n}}function tn(e,t){const n=mt(e),r=yt(n,e),o=Z(r?.properties?.sections),s=new Map,a=f=>{if(!N(f.resolveType)){if($e(f.resolveType)){je(f.resolveType)||s.set(f.resolveType,f);return}re(e,f.resolveType)&&(s.has(f.resolveType)||s.set(f.resolveType,f))}};for(const f of ht(e))a(f);for(const f of o)a(At(e,f));for(const f of Ve(e,t))a(f);return[...s.values()].sort((f,m)=>f.title.localeCompare(m.title))}function nn(e){const t=e.site;if(!t||typeof t!="object"||Array.isArray(t))return;const n=t.theme;if(!(!n||typeof n!="object"||Array.isArray(n)))return n}const ae="website/loaders/redirect.ts",rn=new Set([ae,"website/loaders/redirects.ts"]),on={temporary:307,permanent:301},Se=e=>typeof e=="string"?e:"",bt=e=>e==="permanent"?"permanent":"temporary";function We(e){const t=e&&typeof e.redirect=="object"&&e.redirect!==null&&!Array.isArray(e.redirect)?e.redirect:{};return{from:Se(t.from),to:Se(t.to),type:bt(t.type),discardQueryParameters:t.discardQueryParameters===!0}}function vt(e){const t=[];for(const[n,r]of Object.entries(e)){if(!r||typeof r!="object"||Array.isArray(r))continue;const o=r;if(o.__resolveType!==ae)continue;const{from:s,to:a,type:f,discardQueryParameters:m}=We(o);t.push({key:n,from:s,to:a,type:f,discardQueryParameters:m})}return t}function sn(e){return We(e)}function cn(e){const t={from:e.from,to:e.to,type:e.type};return e.discardQueryParameters&&(t.discardQueryParameters=!0),{redirect:t,__resolveType:ae}}function Tt(e){return(e.split(/[?#]/)[0]??"").replace(/^\/+/,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"redirect"}const St=1e3;function an(e,t){const n=Tt(t);for(let r=0;r<St;r++){const o=`redirects-${n}-${crypto.randomUUID()}`;if(!Object.hasOwn(e,o))return o}throw new Error("Could not generate a unique redirect block key")}function Et(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6)),t=t.replace(/-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,""),t=t.replace(/-[0-9a-f]{8,}$/i,"");try{return decodeURIComponent(t)}catch{return t}}function fn(e,t){const{pageId:n,path:r,pathTemplate:o}=t;if(n){const s=e.find(f=>f.key===n);if(s)return s;const a=e.find(f=>f.key.endsWith(`-${n}`));if(a)return a}if(o){const s=Ee(e,o);if(s)return s}if(r){const s=Ee(e,r);if(s)return s}return null}function Ee(e,t,n){const r=nt;if(n){const s=e.find(a=>a.key===n);if(s)return s}const o=e.filter(s=>r(s.path)===r(t));return o.length===0?null:o.length===1?o[0]??null:[...o].sort((s,a)=>s.key.localeCompare(a.key))[0]??null}const Ye=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),Y="site",Fe="site/apps/site.ts";function J(e,t){return e===Y?!0:t.__resolveType===Fe}function ln(e,t){return e?Rt(e).length>0||vt(e).length>0?!0:t?$t(e,t).length>0||kt(e,t)?!0:wt(e,t).length>0:!1:!1}function Ot(e,t){if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;return typeof n.__resolveType!="string"||!Ye.has(n.__resolveType)||typeof n.path!="string"?null:{key:e,name:typeof n.name=="string"?n.name:Et(e),path:n.path}}function Rt(e){const t=[];for(const[n,r]of Object.entries(e)){const o=Ot(n,r);o&&t.push(o)}return t}function Pt(e,t){if(typeof t.name=="string"){const n=t.name.trim();if(n)return n}return e.replace(/[-_]/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function ee(e,t,n){const r=typeof t.__resolveType=="string"?t.__resolveType:"",o=r?ce(r,n):{};if(o.title)return o.title;if(typeof t.name=="string"){const s=t.name.trim();if(s)return s}return e.replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function kt(e,t){const n=e[Y];if(n&&typeof n=="object"&&!Array.isArray(n)){const r=n,o=r.__resolveType;if(typeof o=="string"&&(J(Y,r)||Ie(t,o)))return{key:Y,name:ee(Y,r,t),resolveType:o}}for(const[r,o]of Object.entries(e)){if(r.includes("/")||!o||typeof o!="object"||Array.isArray(o))continue;const s=o;if(!J(r,s))continue;const a=typeof s.__resolveType=="string"?s.__resolveType:Fe;return{key:r,name:ee(r,s,t),resolveType:a}}return null}function wt(e,t){const n=[];for(const[r,o]of Object.entries(e)){if(r.includes("/")||!o||typeof o!="object"||Array.isArray(o))continue;const s=o,a=s.__resolveType;typeof a=="string"&&(Ye.has(a)||typeof s.path!="string"&&(J(r,s)||!Ie(t,a)&&!pt(a)||n.push({key:r,name:ee(r,s,t),resolveType:a})))}return n.sort((r,o)=>r.name.localeCompare(o.name))}function $t(e,t){return Ve(t,e).map(n=>{const r=e[n.resolveType],o=Me(t,r);return{key:n.resolveType,name:n.description??Pt(n.resolveType,r),resolveType:o}}).sort((n,r)=>n.name.localeCompare(r.name))}const un={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};export{Xt as $,vt as A,en as B,un as C,kt as D,an as E,cn as F,Gt as G,Dt as H,$e as I,je as J,Ht as K,Ce as L,V as M,Qt as N,Jt as O,st as P,zt as Q,on as R,Fe as S,rn as T,Kt as U,be as V,ve as W,ot as X,qt as Y,Z,tn as _,Et as a,Zt as a0,xt as a1,nn as a2,Yt as a3,sn as a4,Ue as b,Vt as c,$t as d,Rt as e,Nt as f,Pt as g,ln as h,J as i,Ee as j,mt as k,Ze as l,ce as m,nt as n,pt as o,Ot as p,ee as q,yt as r,Ft as s,Ut as t,It as u,Wt as v,Mt as w,et as x,Je as y,fn as z};
|
|
1
|
+
import{c as Oe,U as Qe,V as ze,K as Re,m as Xe}from"./index-oPco2Z7Q.js";import{s as Ae}from"./thread-intent-1MB6k5b2.js";function It(e){const t=Oe.c(12);let n;t[0]!==e?(n=ze.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const r=n,[o,s]=Qe(r,null);let a;t[2]!==o||t[3]!==e?(a=e?Ae(o):null,t[2]=o,t[3]=e,t[4]=a):a=t[4];const f=a;let m,S;t[5]!==s?(m=k=>s(Ae(k)),S=()=>s(null),t[5]=s,t[6]=m,t[7]=S):(m=t[6],S=t[7]);let L;return t[8]!==m||t[9]!==S||t[10]!==f?(L={url:f,setUrl:m,clear:S},t[8]=m,t[9]=S,t[10]=f,t[11]=L):L=t[11],L}function Pe(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Ze(e,t,n){return["decofile-write",e,t,n]}function Ut(e,t,n){return{id:Ze(e,t,n).join(":")}}function ke(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function Je(e,t){const n=await e.json().catch(()=>({}));throw new Error(n.error??`${t} failed (${e.status})`)}function et(e,t,n){e.setQueryData(Re.decofileDraft(Pe(t)),n)}function xt(e){const t=Oe.c(4);let n;t[0]!==e?(n=Re.decofileDraft(e?Pe(e):""),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r={queryKey:n,enabled:!1,queryFn:tt,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=r):r=t[3];const{data:o}=Xe(r);return o??null}async function tt(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function Dt(e,t){const n=await fetch(ke(t),{cache:"no-store"});if(!n.ok){const o=new Error(`Failed to fetch decofile: ${n.status}`);throw o.status=n.status,o}const r=await n.json();return r.token&&et(e,t,{version:r.version,token:r.token,apiHost:r.apiHost??window.location.host}),r.decofile}async function Mt(e,t){const n=await fetch(ke(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)return Je(n,"Save");const r=await n.json();return{...r,apiHost:r.apiHost??window.location.host}}function nt(e){return e.replace(/\/+$/,"")||"/"}function Vt(e){return e.trim().replace(/^\/+|\/+$/g,"")}function rt(e){const t=e.trim();return!(!t.startsWith("/")||t.startsWith("//")||t.includes("..")||t.includes("\\"))}function Wt(e){const t=e.trim();return t?rt(t)?null:"Path must start with / and must not contain .. or //.":"Path is required."}const te=/:([A-Za-z0-9_-]+)|\*/g;function Yt(e){const t=[];for(const n of e.matchAll(te)){const r=n[1]??"*";t.includes(r)||t.push(r)}return t}function we(e){return e.replace(/\{([^{}]*)\}\?/g,"$1")}function Ft(e){e=we(e);const t=[];let n=0;for(const r of e.matchAll(te))r.index>n&&t.push({type:"text",text:e.slice(n,r.index)}),t.push({type:"param",name:r[1]??"*"}),n=r.index+r[0].length;return n<e.length&&t.push({type:"text",text:e.slice(n)}),t}function Nt(e,t){return we(e).replace(te,(n,r)=>{const o=t[r??"*"]?.trim();return o?r!==void 0?encodeURIComponent(o):o.split("/").filter(Boolean).map(encodeURIComponent).join("/")||n:n})}function be(e){if(!e.startsWith("#")||!e.includes("@"))return null;const t=e.indexOf("@");return{moduleResolveType:e.slice(1,t),blockId:e.slice(t+1)}}function qt(e){return e.includes("@")}function ve(e){const t=e.lastIndexOf("@");return t<0||t===e.length-1?null:e.slice(t+1)}function Kt(e,t){if(e===t)return!0;const n=ve(e);return n?t===n||ve(t)===n:!1}function ne(e,t){const n=e.manifest?.blocks??{};for(const[r,o]of Object.entries(n))if(t in o)return r;return null}function re(e,t){const n=ne(e,t);return n!==null&&n.includes("sections")}function it(e,t){const n=ne(e,t);return n!==null&&n.includes("apps")}function Ht(e,t){const n=ne(e,t);return n!==null&&n.includes("matchers")}function $e(e){return!(!e||/\.\w+$/.test(e)||e==="__proto__"||e==="constructor")}function je(e){try{return decodeURIComponent(e).startsWith("Preview ")}catch{return e.startsWith("Preview ")}}const Gt="oklch(0.7278 0.151 289)",ot="website/matchers/always.ts",Qt="website/matchers/never.ts",st="website/flags/multivariate.ts",Ce="website/flags/multivariate/section.ts";function zt(){return{__resolveType:ot}}function V(e){const t=e.split("/");return(t[t.length-1]??e).replace(/\.(tsx?|jsx?)$/,"").replace(/[-_]/g," ").replace(/\b\w/g,r=>r.toUpperCase())||e}const ct=12,at=8,z=32,ft=40,lt="__SECTION_REF__";function X(e){const t=e.type;return t==="array"||Array.isArray(t)&&t.includes("array")}function Te(e,t){let n=e.items;if(!n)return!1;if(typeof n.$ref=="string"&&(n=t(n.$ref)),Array.isArray(n.anyOf)||Array.isArray(n.oneOf))return!0;const o=n.properties?.__resolveType?.enum;return Array.isArray(o)&&typeof o[0]=="string"}const ut="VideoWidget";function M(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Be(e){return typeof btoa=="function"?btoa(e):Buffer.from(e).toString("base64")}function ie(e){const t=e.match(/^site\/apps\/([^/]+)\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function oe(e){const t=e.match(/^([^/]+)\/apps\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Le(e,t){return[`site/apps/${e}/${t}.ts`,`site/apps/${e}/${t}.tsx`,`${e}/apps/${t}.ts`,`${e}/apps/${t}.tsx`]}function se(e,t){const n=t.manifest?.blocks??{};for(const f of Object.values(n))if(f[e])return f[e];const r=ie(e)??oe(e);if(r){for(const f of Le(r.vendor,r.app))for(const m of Object.values(n))if(m[f])return m[f]}const o=Be(e);for(const f of Object.values(n))if(f[o])return f[o];const s=t.schema??{};return(s.$defs??s.definitions??{})[o]?{$ref:`#/definitions/${o}`}:{}}function Ie(e,t){if(it(e,t))return!0;const n=ie(t)??oe(t);if(!n)return!1;const r=e.manifest?.blocks?.apps??{};if(Le(n.vendor,n.app).some(a=>a in r))return!0;const o=Be(t),s=e.schema?.$defs??e.schema?.definitions??{};return o in s}function pt(e){return e==="site/apps/site.ts"?!1:ie(e)!==null||oe(e)!==null}function yt(e,t){const n=t.schema??{},r=se(e,t),o=n.$defs??n.definitions??{},s=n.root??{},a=c=>{if(c.startsWith("#/root/")){const i=c.slice(7);return s[i]??{}}const y=c.split("/").pop()??"",g=o[y];return g||(y===lt?s.sections??{}:{})};let f;typeof r.$ref=="string"?f=a(r.$ref):Object.keys(r).length>0?f=r:f=n;const m=c=>typeof c.$ref=="string"?a(c.$ref):c,S=c=>{const g=m(c).properties?.type;if(g){if(typeof g.const=="string")return g.const;if(typeof g.default=="string")return g.default;if(Array.isArray(g.enum)&&typeof g.enum[0]=="string")return g.enum[0]}},L=(c,y)=>{const g=m(c);return typeof g.title=="string"&&!g.title.startsWith("#")?g.title:y},k=(c,y=new Set)=>{if(typeof c.$ref!="string"||c.properties||c.anyOf||c.allOf||c.oneOf||c.type)return c;const g=c.$ref.split("/").pop()??"";return!g||y.has(g)?c:k(a(c.$ref),new Set([...y,g]))},$=c=>{const y=c.hide;return y===!0||y==="true"},fe=c=>typeof c=="string"&&(c.includes("://")||!/\s/.test(c)&&(c.includes("|")||c.includes("&")||c.includes("@"))),F=(c,y=new Set,g=0)=>{if(g>ct)return{};if(typeof c.$ref=="string"){const R=c.$ref.split("/").pop()??"";return y.has(R)?{}:F(a(c.$ref),new Set([...y,R]),g+1)}let i={};c.properties&&typeof c.properties=="object"&&(i={...i,...c.properties}),Array.isArray(c.required)&&(i.__required=[...M(i.__required),...M(c.required)]);for(const R of["allOf","anyOf","oneOf"]){const O=c[R];if(Array.isArray(O))for(const j of O){const C=M(i.__required),x=F(j,y,g+1);i={...i,...x};const w=R==="allOf"?[...C,...M(x.__required)]:C;w.length>0?i.__required=w:delete i.__required}}return i},I=(c,y=0,g=new Set)=>{let i=c,R;if(typeof c.$ref=="string"){i=a(c.$ref);const A=c.$ref.split("/").pop()??"";R=A,A===ut&&!i.format&&(i={...i,format:"video-uri"})}i=k(i);const O=R!==void 0&&g.has(R),j=R!==void 0?new Set([...g,R]):g,C=(A,p,b,h=!0)=>!O&&(!h||b<=ft)&&p<at?I(A,p,j):void 0;let x;{const A=i.anyOf??i.oneOf;if(Array.isArray(A)){const p=A.filter(h=>!(h.type==="null"||h.type===null)),b=h=>{if(typeof h.const=="string"||typeof h.const=="number")return h.const;if(Array.isArray(h.enum)&&h.enum.length===1&&(typeof h.enum[0]=="string"||typeof h.enum[0]=="number"))return h.enum[0]};p.length>0&&p.every(h=>b(h)!==void 0)&&(x=p.map(h=>b(h)))}}let w,W,ye=!1;if(i.type)w=Array.isArray(i.type)?String(i.type.find(A=>A!=="null")??i.type[0]):String(i.type);else if(i.anyOf||i.oneOf){const p=(i.anyOf??i.oneOf).filter(b=>!(b.type==="null"||b.type===null));if(p.length===0)w="null";else if(p.length===1){const b=p[0];W=b,w=b.type?Array.isArray(b.type)?String(b.type[0]):String(b.type):typeof b.$ref=="string"?"object":"string"}else{if(x){const u=l=>typeof c[l]=="string"?c[l]:typeof i[l]=="string"?i[l]:void 0;return{type:"string",title:typeof i.title=="string"?i.title:void 0,description:typeof i.description=="string"?i.description:void 0,enum:x,format:u("format"),options:u("options")}}const b=p.filter(u=>{const l=u.properties?.__resolveType?.enum;return Array.isArray(l)&&typeof l[0]=="string"}),h=p.map(u=>k(u)).find(X),G=p.filter(u=>!X(k(u))).every(u=>typeof u.$ref=="string"||b.includes(u)),Ke=b.some(u=>{const l=u.properties?.__resolveType?.enum;return Array.isArray(l)&&l[0]===st});if(h){if(!Te(h,a)&&p.length>1&&G){const l=I(h,y+1,j);return{...l,type:"array",title:typeof i.title=="string"?i.title:l.title,description:typeof i.description=="string"?i.description:l.description}}if(Ke){const l=I(h,y+1,j);return{...l,type:"array",title:typeof i.title=="string"?i.title:l.title,description:typeof i.description=="string"?i.description:l.description}}}if(b.length>0){const u=b.map(_=>{const P=_.properties?.__resolveType?.enum??[],B=String(P[0]);return{resolveType:B,title:typeof _.title=="string"?_.title:V(B),description:typeof _.description=="string"?_.description:void 0,schema:C(_,y+1,p.length)}}),l=[];for(const _ of p){if(b.includes(_)||typeof _.$ref!="string")continue;const T=a(_.$ref);let P;const B=T.properties?.__resolveType;if(Array.isArray(B?.enum)&&typeof B.enum[0]=="string"&&(P=B.enum[0]),!P&&Array.isArray(T.allOf))for(const Ge of T.allOf){const Q=Ge.properties?.__resolveType?.enum;if(Array.isArray(Q)&&typeof Q[0]=="string"){P=Q[0];break}}P&&l.push({resolveType:P,title:typeof T.title=="string"&&!T.title.startsWith("#")?T.title:V(P),description:typeof T.description=="string"?T.description:void 0,schema:C(T,y+1,p.length)})}const d=new Set(u.map(_=>_.resolveType)),v=[...u,...l.filter(_=>!d.has(_.resolveType))],E=p.filter(_=>!b.includes(_)),U=E.length===1&&!O?I(E[0],y+1,j):void 0;return{type:"block-ref",title:typeof i.title=="string"?i.title:void 0,description:typeof i.description=="string"?i.description:void 0,anyOfRefs:v,plainSchema:U,hidden:$(i)||$(c)?!0:void 0}}const ge=u=>{const l=m(u);if(typeof l.title=="string"&&be(l.title))return!0;const d=l.properties?.__resolveType?.enum;if(Array.isArray(d)&&typeof d[0]=="string")return!0;if(Array.isArray(l.allOf))for(const v of l.allOf){const E=v.properties?.__resolveType?.enum;if(Array.isArray(E)&&typeof E[0]=="string")return!0}return!1},me=p.map(u=>S(u));if(p.length>1&&me.every(u=>typeof u=="string")&&!p.some(ge)){const u=p.map((l,d)=>{const v=m(l),E=me[d];return{resolveType:E,title:L(l,E),description:typeof v.description=="string"?v.description:void 0,discriminatorValue:E,schema:C(v,y+1,p.length,!1)}});return{type:"block-ref",title:typeof c.title=="string"?c.title:typeof i.title=="string"?i.title:void 0,description:typeof c.description=="string"?c.description:typeof i.description=="string"?i.description:void 0,discriminatorKey:"type",anyOfRefs:u,hidden:$(i)||$(c)?!0:void 0}}const he=u=>{if(ge(u))return!1;const l=m(u);return l.type==="object"||!!l.properties},He=u=>{const l=k(u);return X(l)?!Te(l,a):!1},_e=y<z&&p.every(u=>he(u)||He(u))&&p.some(he);if(p.every(u=>typeof u.$ref=="string")&&!_e){const u=[];for(const l of p){const d=a(l.$ref);let v,E;if(typeof d.title=="string"){const _=be(d.title);_&&(v=_.blockId,E=_.blockId)}if(!v&&Array.isArray(d.allOf))for(const _ of d.allOf){const B=((_.properties??{}).__resolveType??{}).enum;if(Array.isArray(B)&&typeof B[0]=="string"){v=B[0];break}}if(!v){const T=d.properties?.__resolveType?.enum;Array.isArray(T)&&typeof T[0]=="string"&&(v=T[0])}v||(v=l.$ref.split("/").pop()??"");const U=v.includes("/")?void 0:S(l);!U&&!v.includes("/")||u.push({resolveType:U??v,title:E??(typeof d.title=="string"&&!d.title.startsWith("#")?d.title:V(v)),description:typeof d.description=="string"?d.description:void 0,discriminatorValue:U,schema:C(d,y+1,p.length)})}return{type:"block-ref",title:typeof i.title=="string"?i.title:void 0,description:typeof i.description=="string"?i.description:void 0,anyOfRefs:u,hidden:$(i)||$(c)?!0:void 0}}if(_e){const u=d=>{if(typeof d.const=="string"||typeof d.const=="number"||typeof d.const=="boolean")return d.const;if(Array.isArray(d.enum)&&d.enum.length===1&&(typeof d.enum[0]=="string"||typeof d.enum[0]=="number"||typeof d.enum[0]=="boolean"))return d.enum[0]},l=p.map((d,v)=>{const E=m(d).properties??{},U={};for(const[_,T]of Object.entries(E)){const P=u(T);P!==void 0&&(U[_]=P)}return{title:L(d,`Option ${v+1}`),schema:I(d,y+1),discriminators:Object.keys(U).length?U:void 0}});return{type:"inline-union",title:typeof c.title=="string"?c.title:typeof i.title=="string"?i.title:void 0,description:typeof i.description=="string"?i.description:void 0,inlineUnionBranches:l,hidden:$(i)||$(c)?!0:void 0}}w="object"}}else i.allOf?(w="object",ye=fe(i.title)):typeof c.$ref=="string"&&(w="object");let K,de;if(y<z){const A=F(i),p=M(A.__required);p.length>0&&(de=p);const b=Object.entries(A).filter(([h])=>!h.startsWith("__")&&h!=="@type");if(b.length>0){K={};for(const[h,G]of b)K[h]=I(G,y+1,j)}}let H;if((w==="array"||i.type==="array")&&y<z){let A=i.items;A&&(typeof A.$ref=="string"&&(A=a(A.$ref)),H=I(A,y+1,j),typeof A.title=="string"&&A.title.includes("{{")&&(H.titleBy=A.title))}const D=A=>{const p=W?.[A];return typeof p=="string"?p:void 0},qe=()=>{if("default"in c)return c.default;if("default"in i)return i.default;if(W&&"default"in W)return W.default};return{type:w??"string",title:typeof c.title=="string"?c.title:!ye&&typeof i.title=="string"?i.title:D("title"),description:typeof c.description=="string"?c.description:typeof i.description=="string"?i.description:D("description"),default:qe(),enum:Array.isArray(i.enum)?i.enum:x??void 0,format:typeof c.format=="string"?c.format:typeof i.format=="string"?i.format:D("format"),properties:K,required:de,items:H,hidden:$(i)||$(c)?!0:void 0,titleBy:typeof i.titleBy=="string"?i.titleBy:D("titleBy"),image:typeof i.image=="string"?i.image:D("image"),options:typeof c.options=="string"?c.options:typeof i.options=="string"?i.options:D("options")}},le=f.properties??{},Ne=Object.keys(le).every(c=>c.startsWith("__"));if(Array.isArray(f.allOf)&&f.allOf.length===1&&Ne){const c=le.__resolveType,y=Array.isArray(c?.enum)&&typeof c.enum[0]=="string"?c.enum[0]:typeof c?.const=="string"?c.const:typeof c?.default=="string"?c.default:void 0;for(const g of f.allOf){const i=k(g);if(!(Array.isArray(i.anyOf)||Array.isArray(i.oneOf))||i.properties)continue;const O=I(i,0);if(O.type==="inline-union"&&O.inlineUnionBranches){const j=fe(O.title);return{...O,title:j?void 0:O.title,inlineUnionBranches:y?O.inlineUnionBranches.map(C=>({...C,discriminators:{...C.discriminators??{},__resolveType:y}})):O.inlineUnionBranches}}}}const ue=F(f),q={};for(const[c,y]of Object.entries(ue))c.startsWith("__")||c==="@type"||(q[c]=I(y,0));if(Object.keys(q).length===0)return null;const pe=M(ue.__required);return{type:"object",title:typeof f.title=="string"?f.title:void 0,properties:q,required:pe.length>0?pe:void 0}}function Xt(e,t){const n=t.schema??{},r=se(e,t),o=n.$defs??n.definitions??{},s=typeof r.$ref=="string"?o[r.$ref.split("/").pop()??""]??{}:r,a=s.properties??{};if(Object.keys(a).some(S=>!S.startsWith("__")))return!1;if(s.additionalProperties===!0)return!0;const m=a.__resolveType;return!!m&&Array.isArray(m.enum)&&m.enum[0]===e}function Zt(e){const t=r=>{switch(typeof r){case"number":return{type:"number"};case"boolean":return{type:"boolean"};case"object":{if(r===null)return{type:"string"};if(Array.isArray(r))return{type:"array",items:t(r[0])};const o={};for(const[s,a]of Object.entries(r))s.startsWith("__")||(o[s]=t(a));return{type:"object",properties:o}}default:return{type:"string"}}},n={};for(const[r,o]of Object.entries(e))r.startsWith("__")||(n[r]=t(o));return Object.keys(n).length===0?null:{type:"object",properties:n}}function ce(e,t){const n=t.schema??{},r=se(e,t),o=n.$defs??n.definitions??{},s=typeof r.$ref=="string"?o[r.$ref.split("/").pop()??""]??{}:Object.keys(r).length>0?r:{...n,...r},a=s.icon,f=s.logo,m=s,S=k=>k===!0||k==="true",L=S(m.hide)||S(m.ignore)||S(m.unlisted);return{title:typeof s.title=="string"?s.title:void 0,description:typeof s.description=="string"?s.description:void 0,icon:typeof a=="string"?a:void 0,logo:typeof f=="string"?f:void 0,hidden:L||void 0}}const dt=["website/sections/Rendering/Lazy.tsx","website/sections/Rendering/SingleDeferred.tsx"],Jt="website/sections/Rendering/Lazy.tsx";function Ue(e){return dt.some(t=>e.endsWith(t))}const xe=["website/pages/Page.tsx","$live/pages/LivePage.tsx"],De=new Set(xe),gt=new Set(["site/sections/Theme/Theme.tsx"]);function N(e){return!!(gt.has(e)||Ue(e)||e.toLowerCase().includes("preview"))}function mt(e){const t=e.manifest?.blocks??{};for(const n of Object.values(t))for(const r of Object.keys(n))if(De.has(r))return r;return xe[0]}function Z(e){if(!e)return[];if(e.anyOfRefs?.length)return e.anyOfRefs;if(e.items)return Z(e.items);if(e.properties){const t=[];for(const n of Object.values(e.properties))t.push(...Z(n));return t}return[]}function ht(e){const t=e.manifest?.blocks??{},n=[];for(const[r,o]of Object.entries(t))if(r.includes("sections"))for(const s of Object.keys(o)){if(N(s))continue;const a=ce(s,e);n.push({resolveType:s,title:a.title??V(s),description:a.description,previewBlock:s,isSavedBlock:!1})}return n}function en(e){const t=e.manifest?.blocks??{},n=new Map;for(const[r,o]of Object.entries(t))if(r.includes("sections"))for(const s of Object.keys(o))N(s)||n.has(s)||n.set(s,{resolveType:s,title:V(s)});return[...n.values()].sort((r,o)=>r.title.localeCompare(o.title))}function Me(e,t){const n=t.__resolveType;if(typeof n!="string")return"";if(n!==Ce)return n;const r=t.variants;if(!Array.isArray(r))return n;for(const o of r){const s=o?.value;if(!s)continue;let a=s.__resolveType;if(typeof a=="string"&&Ue(a)&&(a=s.section?.__resolveType??a),typeof a=="string"&&re(e,a))return a}return n}function _t(e,t){return Me(e,t)!==t.__resolveType}function Ve(e,t){const n=[];for(const[r,o]of Object.entries(t)){if(r.includes("/")||je(r)||!o||typeof o!="object"||Array.isArray(o))continue;const s=o,a=s.__resolveType;typeof a!="string"||De.has(a)||typeof s.path=="string"||N(a)||!(re(e,a)||a===Ce&&_t(e,s))||n.push({resolveType:r,title:r,description:typeof s.name=="string"?s.name:void 0,previewBlock:r,isSavedBlock:!0})}return n}function At(e,t){const n=$e(t.resolveType),r=n?{}:ce(t.resolveType,e);return{resolveType:t.resolveType,title:t.title||r.title||V(t.resolveType),description:t.description??r.description,previewBlock:t.resolveType,isSavedBlock:n}}function tn(e,t){const n=mt(e),r=yt(n,e),o=Z(r?.properties?.sections),s=new Map,a=f=>{if(!N(f.resolveType)){if($e(f.resolveType)){je(f.resolveType)||s.set(f.resolveType,f);return}re(e,f.resolveType)&&(s.has(f.resolveType)||s.set(f.resolveType,f))}};for(const f of ht(e))a(f);for(const f of o)a(At(e,f));for(const f of Ve(e,t))a(f);return[...s.values()].sort((f,m)=>f.title.localeCompare(m.title))}function nn(e){const t=e.site;if(!t||typeof t!="object"||Array.isArray(t))return;const n=t.theme;if(!(!n||typeof n!="object"||Array.isArray(n)))return n}const ae="website/loaders/redirect.ts",rn=new Set([ae,"website/loaders/redirects.ts"]),on={temporary:307,permanent:301},Se=e=>typeof e=="string"?e:"",bt=e=>e==="permanent"?"permanent":"temporary";function We(e){const t=e&&typeof e.redirect=="object"&&e.redirect!==null&&!Array.isArray(e.redirect)?e.redirect:{};return{from:Se(t.from),to:Se(t.to),type:bt(t.type),discardQueryParameters:t.discardQueryParameters===!0}}function vt(e){const t=[];for(const[n,r]of Object.entries(e)){if(!r||typeof r!="object"||Array.isArray(r))continue;const o=r;if(o.__resolveType!==ae)continue;const{from:s,to:a,type:f,discardQueryParameters:m}=We(o);t.push({key:n,from:s,to:a,type:f,discardQueryParameters:m})}return t}function sn(e){return We(e)}function cn(e){const t={from:e.from,to:e.to,type:e.type};return e.discardQueryParameters&&(t.discardQueryParameters=!0),{redirect:t,__resolveType:ae}}function Tt(e){return(e.split(/[?#]/)[0]??"").replace(/^\/+/,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"redirect"}const St=1e3;function an(e,t){const n=Tt(t);for(let r=0;r<St;r++){const o=`redirects-${n}-${crypto.randomUUID()}`;if(!Object.hasOwn(e,o))return o}throw new Error("Could not generate a unique redirect block key")}function Et(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6)),t=t.replace(/-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,""),t=t.replace(/-[0-9a-f]{8,}$/i,"");try{return decodeURIComponent(t)}catch{return t}}function fn(e,t){const{pageId:n,path:r,pathTemplate:o}=t;if(n){const s=e.find(f=>f.key===n);if(s)return s;const a=e.find(f=>f.key.endsWith(`-${n}`));if(a)return a}if(o){const s=Ee(e,o);if(s)return s}if(r){const s=Ee(e,r);if(s)return s}return null}function Ee(e,t,n){const r=nt;if(n){const s=e.find(a=>a.key===n);if(s)return s}const o=e.filter(s=>r(s.path)===r(t));return o.length===0?null:o.length===1?o[0]??null:[...o].sort((s,a)=>s.key.localeCompare(a.key))[0]??null}const Ye=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),Y="site",Fe="site/apps/site.ts";function J(e,t){return e===Y?!0:t.__resolveType===Fe}function ln(e,t){return e?Rt(e).length>0||vt(e).length>0?!0:t?$t(e,t).length>0||kt(e,t)?!0:wt(e,t).length>0:!1:!1}function Ot(e,t){if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;return typeof n.__resolveType!="string"||!Ye.has(n.__resolveType)||typeof n.path!="string"?null:{key:e,name:typeof n.name=="string"?n.name:Et(e),path:n.path}}function Rt(e){const t=[];for(const[n,r]of Object.entries(e)){const o=Ot(n,r);o&&t.push(o)}return t}function Pt(e,t){if(typeof t.name=="string"){const n=t.name.trim();if(n)return n}return e.replace(/[-_]/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function ee(e,t,n){const r=typeof t.__resolveType=="string"?t.__resolveType:"",o=r?ce(r,n):{};if(o.title)return o.title;if(typeof t.name=="string"){const s=t.name.trim();if(s)return s}return e.replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function kt(e,t){const n=e[Y];if(n&&typeof n=="object"&&!Array.isArray(n)){const r=n,o=r.__resolveType;if(typeof o=="string"&&(J(Y,r)||Ie(t,o)))return{key:Y,name:ee(Y,r,t),resolveType:o}}for(const[r,o]of Object.entries(e)){if(r.includes("/")||!o||typeof o!="object"||Array.isArray(o))continue;const s=o;if(!J(r,s))continue;const a=typeof s.__resolveType=="string"?s.__resolveType:Fe;return{key:r,name:ee(r,s,t),resolveType:a}}return null}function wt(e,t){const n=[];for(const[r,o]of Object.entries(e)){if(r.includes("/")||!o||typeof o!="object"||Array.isArray(o))continue;const s=o,a=s.__resolveType;typeof a=="string"&&(Ye.has(a)||typeof s.path!="string"&&(J(r,s)||!Ie(t,a)&&!pt(a)||n.push({key:r,name:ee(r,s,t),resolveType:a})))}return n.sort((r,o)=>r.name.localeCompare(o.name))}function $t(e,t){return Ve(t,e).map(n=>{const r=e[n.resolveType],o=Me(t,r);return{key:n.resolveType,name:n.description??Pt(n.resolveType,r),resolveType:o}}).sort((n,r)=>n.name.localeCompare(r.name))}const un={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};export{Xt as $,vt as A,en as B,un as C,kt as D,an as E,cn as F,Gt as G,Dt as H,$e as I,je as J,Ht as K,Ce as L,V as M,Qt as N,Jt as O,st as P,zt as Q,on as R,Fe as S,rn as T,Kt as U,be as V,ve as W,ot as X,qt as Y,Z,tn as _,Et as a,Zt as a0,xt as a1,nn as a2,Yt as a3,sn as a4,Ue as b,Vt as c,$t as d,Rt as e,Nt as f,Pt as g,ln as h,J as i,Ee as j,mt as k,Ze as l,ce as m,nt as n,pt as o,Ot as p,ee as q,yt as r,Ft as s,Ut as t,It as u,Wt as v,Mt as w,et as x,Je as y,fn as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as c,r as m,j as o}from"./index-
|
|
1
|
+
import{c as a,a as c,r as m,j as o}from"./index-oPco2Z7Q.js";import{A as u}from"./auth-split-layout-D5nNb-G8.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,j as n}from"./index-
|
|
1
|
+
import{c as l,j as n}from"./index-oPco2Z7Q.js";function a(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function d(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function h(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}export{a as C,h as a,d as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,br as O,j as i,bo as g,bn as $,bp as S,
|
|
1
|
+
import{r as a,br as O,j as i,bo as g,bn as $,bp as S,dc as D,bm as M,bu as F,bF as L,c as v,l as k}from"./index-oPco2Z7Q.js";var f="Collapsible",[B,J]=L(f),[G,x]=B(f),A=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,open:n,defaultOpen:s,disabled:l,onOpenChange:c,...b}=o,[d,p]=O({prop:n,defaultProp:s??!1,onChange:c,caller:f});return i.jsx(G,{scope:t,disabled:l,contentId:$(),open:d,onOpenToggle:a.useCallback(()=>p(C=>!C),[p]),children:i.jsx(g.div,{"data-state":y(d),"data-disabled":l?"":void 0,...b,ref:e})})});A.displayName=f;var I="CollapsibleTrigger",R=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,...n}=o,s=x(I,t);return i.jsx(g.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":y(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:S(o.onClick,s.onOpenToggle)})});R.displayName=I;var h="CollapsibleContent",N=a.forwardRef((o,e)=>{const{forceMount:t,...n}=o,s=x(h,o.__scopeCollapsible);return i.jsx(D,{present:t||s.open,children:({present:l})=>i.jsx(q,{...n,ref:e,present:l})})});N.displayName=h;var q=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,present:n,children:s,...l}=o,c=x(h,t),[b,d]=a.useState(n),p=a.useRef(null),C=M(e,p),P=a.useRef(0),E=P.current,j=a.useRef(0),_=j.current,m=c.open||b,w=a.useRef(m),u=a.useRef(void 0);return a.useEffect(()=>{const r=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(r)},[]),F(()=>{const r=p.current;if(r){u.current=u.current||{transitionDuration:r.style.transitionDuration,animationName:r.style.animationName},r.style.transitionDuration="0s",r.style.animationName="none";const T=r.getBoundingClientRect();P.current=T.height,j.current=T.width,w.current||(r.style.transitionDuration=u.current.transitionDuration,r.style.animationName=u.current.animationName),d(n)}},[c.open,n]),i.jsx(g.div,{"data-state":y(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!m,...l,ref:C,style:{"--radix-collapsible-content-height":E?`${E}px`:void 0,"--radix-collapsible-content-width":_?`${_}px`:void 0,...o.style},children:m&&s})});function y(o){return o?"open":"closed"}var H=A,K=R,Q=N;function U(o){const e=v.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let n;return e[2]!==t?(n=i.jsx(H,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=n):n=e[3],n}function V(o){const e=v.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let n;return e[2]!==t?(n=i.jsx(R,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=n):n=e[3],n}function W(o){const e=v.c(8);let t,n;e[0]!==o?({className:t,...n}=o,e[0]=o,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s;e[3]!==t?(s=k("overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:animate-none",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==n||e[6]!==s?(l=i.jsx(N,{"data-slot":"collapsible-content",className:s,...n}),e[5]=n,e[6]=s,e[7]=l):l=e[7],l}export{V as C,H as R,K as T,W as a,U as b,J as c,Q as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as A,j as t,B as K,h as G,ao as Ze,ap as re,b as W,E as Ee,r as E,X as fe,d7 as Ge,d6 as Re,an as et,n as Oe,l as Y,bd as tt,af as st,u as ot,L as se,t as lt,f as he,bZ as Me}from"./index-oPco2Z7Q.js";import{E as Fe}from"./empty-state-B_xAVz84.js";import{u as ge}from"./use-mcp-client-DDH2Tr05.js";import{F as ae,a as nt,b as ce,d as de}from"./form-Bw-12Nua.js";import{I as pe}from"./input-MYwET4H0.js";import{T as xe}from"./textarea-mkcrN5g-.js";import{D as je,O as it,M as rt}from"./index-TvCpAFy_.js";import{ax as at,a7 as ct,bv as dt,H as mt,M as ut,N as pt,aR as xt,F as ye,at as ft}from"./agent-icon-BvDKYGuI.js";import{M as ht}from"./mcp-app-renderer-CMM_xZGY.js";import{g as gt,M as we}from"./types-C-gwtfMH.js";import{a as jt,b as bt,A as Nt}from"./alert-CbVRyYdn.js";import{S as Ce,b as Ie,a as Te,d as $e,c as me}from"./select-BSSRUEpK.js";import{c as vt,b as Pe,T as ke,a as De}from"./tooltip-CF6AcK-h.js";import{i as St}from"./AlertCircle-CvaSOOO8.js";import{a as yt}from"./Copy01-kb1901QR.js";import{i as wt}from"./Sun-CJOAGa8i.js";import{g as Ct}from"./connection-slug-CITJ0kGN.js";import{u as It,T as Tt}from"./use-mcp-auth-status-CZ-0Pvu1.js";import{a as ze,u as Be}from"./use-connection-BSRKwy2j.js";import{u as $t}from"./use-mcp-tools-B7MXLlq3.js";import{c as Pt}from"./content-blocks-o63cs2vh.js";import{I as Ae}from"./integration-icon-cSotbhTg.js";import{f as kt,r as Dt}from"./chat-context-DCpRbJmR.js";import{a as At}from"./shell-layout-DE5WStxe.js";import{M as Et}from"./monaco-editor-gMJT6cpK.js";import{E as Rt}from"./empty-state-B7JCSTCX.js";import"./auth-DqmsEfIB.js";import"./label-9S9F78nK.js";import"./Key01-ZIYydTtn.js";import"./extract-connection-data-CHpjURut.js";import"./metadata-D72DunRR.js";import"./connection-DZucsf0o.js";import"./Plus-Bv10xzXZ.js";import"./index-CBJQH72Z.js";import"./index-BGw3HTPr.js";import"./index-DTVMnS9R.js";import"./popover-BgkxtrX7.js";import"./github-repo-22x8y8Tm.js";import"./Check-ClKm876e.js";import"./SearchMd-DRAIsS0-.js";import"./use-mobile-BCSnRACa.js";import"./use-create-virtual-mcp-zRgZOr46.js";import"./use-navigate-to-agent-DYNDpstL.js";import"./thread-intent-1MB6k5b2.js";import"./backoff-8mStPHYB.js";import"./task-board-BQC0qjBI.js";import"./schema-DN-s_HG6.js";import"./slugify-CEUa2lfQ.js";import"./Tool01-gY-gdMF4.js";import"./ArrowUp-C1c3cSMN.js";import"./ArrowLeft-BsqlBCdi.js";import"./ArrowRight-B6VZdTtP.js";import"./ShoppingBag01-DsBku-zP.js";import"./ZoomOut-DvQpsf4w.js";import"./Palette-C2svjF4J.js";import"./CheckCircle-B38I9lsp.js";import"./ChevronUp-BBBSFlle.js";import"./UserSquare-BA1qsXhU.js";import"./CreditCard01-DkYuXaNf.js";import"./DotsVertical-OXZ2C8qE.js";import"./Image01-xbxm22_Y.js";import"./XClose-DnZUIdlK.js";import"./Link01-cXYRJQde.js";import"./LinkExternal01-UxTfoueY.js";import"./Monitor01-CINH3FWT.js";import"./Trash01-DUhLvzYZ.js";import"./Upload01-BsdejHE0.js";import"./User01-B4dCU7oy.js";import"./Users01-BLSNtVXz.js";import"./X-BTpPaU7c.js";import"./index-BBClJhS5.js";import"./badge-B0yp_bFb.js";import"./mcp-oauth-Rwm2gO51.js";import"./use-panel-navigate-CQHE_TAW.js";import"./thread-route-CRhZ1osu.js";import"./use-project-scope-UozAP0t-.js";import"./autosend-D__v3v-c.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-DrrVrYNR.js";import"./use-ai-providers-B1JZFVlj.js";import"./location-DBePU4bz.js";import"./use-organization-settings-mKOaKHuY.js";import"./avatar-JoRElFKl.js";import"./download-app-dialog-bvP5yIID.js";import"./dialog-CfIoHDlJ.js";import"./command-DljL6hzf.js";import"./project-icon-C29pLjaM.js";import"./new-project-dialog-BaZdnvse.js";import"./repository-import-picker-OR5DGZp9.js";import"./repository-picker-BSwi4b8i.js";import"./useInfiniteQuery-U12d5VJc.js";import"./infiniteQueryObserver-BiKAGWol.js";import"./collection-search-EssCGlF9.js";import"./use-debounced-value-DD9mnPT_.js";import"./required-auth-layout-Byop8Zzr.js";import"./use-org-sso-GwZiS-qS.js";import"./editor-CUtbeyZe.js";function Ot(s){const e=A.c(15),{onSave:n,onUndo:o,isDirty:l,isSaving:i,saveLabel:a,undoLabel:c}=s,d=a===void 0?"Save":a,r=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let g;e[1]!==i||e[2]!==o||e[3]!==r?(g=t.jsxs(K,{variant:"outline",size:"sm",onClick:o,disabled:i,"aria-label":r,children:[x,r]}),e[1]=i,e[2]=o,e[3]=r,e[4]=g):g=e[4];let u;e[5]!==i?(u=i?t.jsx(G,{className:"size-3.5"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=u):u=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==u?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[u,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=u,e[11]=f):f=e[11];let p;return e[12]!==g||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[g,f]}),e[12]=g,e[13]=f,e[14]=p):p=e[14],p}Ze({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Mt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Ft(s){const e=A.c(43),{form:n}=s,o=W();let l;e[0]!==o?(l=o("details.prompt.details"),e[0]=o,e[1]=l):l=e[1];let i;e[2]!==l?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==o?(a=w=>{const{field:b}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...b,placeholder:o("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=o,e[5]=a):a=e[5];let c;e[6]!==n.control||e[7]!==a?(c=t.jsx(ae,{control:n.control,name:"title",render:a}),e[6]=n.control,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==o?(d=w=>{const{field:b}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...b,value:b.value??"",placeholder:o("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=o,e[10]=d):d=e[10];let r;e[11]!==n.control||e[12]!==d?(r=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=r):r=e[13];let x;e[14]!==c||e[15]!==r?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,r]}),e[14]=c,e[15]=r,e[16]=x):x=e[16];let g;e[17]!==i||e[18]!==x?(g=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=g):g=e[19];let u;e[20]!==o?(u=o("details.prompt.message"),e[20]=o,e[21]=u):u=e[21];let f;e[22]!==u?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:u}),e[22]=u,e[23]=f):f=e[23];let p;e[24]!==o?(p=o("details.prompt.messageDescription"),e[24]=o,e[25]=p):p=e[25];let j;e[26]!==p?(j=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=j):j=e[27];let N;e[28]!==o?(N=w=>{const{field:b}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...b,value:b.value??"",placeholder:o("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=o,e[29]=N):N=e[29];let S;e[30]!==n.control||e[31]!==N?(S=t.jsx(ae,{control:n.control,name:"body",render:N}),e[30]=n.control,e[31]=N,e[32]=S):S=e[32];let $;e[33]!==f||e[34]!==j||e[35]!==S?($=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,j,S]}),e[33]=f,e[34]=j,e[35]=S,e[36]=$):$=e[36];let y;e[37]!==$||e[38]!==g?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[g,$]}),e[37]=$,e[38]=g,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(nt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function zt(s){const e=A.c(42),{providerId:n,promptId:o}=s,l=W(),{org:i}=fe(),a=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==a?(c={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=a,e[3]=c):c=e[3];const d=ge(c),r=Ge(n,"PROMPT",o,d),x=Re(n,"PROMPT",d),g=x.update.isPending;let u;e[4]!==r?(u=r?{title:r.title,description:r.description??null,body:ue(r)}:void 0,e[4]=r,e[5]=u):u=e[5];let f;e[6]!==u?(f={values:u},e[6]=u,e[7]=f):f=e[7];const p=et(f);let j;e[8]!==p||e[9]!==r?(j=()=>{r&&p.reset({title:r.title,description:r.description??null,body:ue(r)})},e[8]=p,e[9]=r,e[10]=j):j=e[10];const N=j;let S;e[11]!==x.update||e[12]!==p||e[13]!==o?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:o,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=o,e[14]=S):S=e[14];const $=S;if(!r){let C;e[15]!==l?(C=l("details.prompt.notFoundTitle"),e[15]=l,e[16]=C):C=e[16];let I;e[17]!==l?(I=l("details.prompt.notFoundDescription"),e[17]=l,e[18]=I):I=e[18];let O;return e[19]!==C||e[20]!==I?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=O):O=e[21],O}let y;e[22]!==$?(y=()=>{$()},e[22]=$,e[23]=y):y=e[23];let P;e[24]!==p.formState.isDirty||e[25]!==g||e[26]!==N||e[27]!==y?(P=t.jsx(Ot,{onSave:y,onUndo:N,isDirty:p.formState.isDirty,isSaving:g}),e[24]=p.formState.isDirty,e[25]=g,e[26]=N,e[27]=y,e[28]=P):P=e[28];let w;e[29]!==r.title||e[30]!==P?(w=t.jsx(Oe.Title,{actions:P,children:r.title}),e[29]=r.title,e[30]=P,e[31]=w):w=e[31];let b;e[32]!==r.description?(b=r.description&&t.jsx("p",{className:"px-4 py-3 text-sm text-muted-foreground",children:r.description}),e[32]=r.description,e[33]=b):b=e[33];let k;e[34]!==b||e[35]!==w?(k=t.jsxs(t.Fragment,{children:[w,b]}),e[34]=b,e[35]=w,e[36]=k):k=e[36];let D;e[37]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(Ft,{form:p})}),e[37]=p,e[38]=D):D=e[38];let R;return e[39]!==k||e[40]!==D?(R=t.jsxs(je,{children:[k,D]}),e[39]=k,e[40]=D,e[41]=R):R=e[41],R}function Bt(s){const e=A.c(10),{itemId:n}=s,o=W();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Mt(),e[0]=l):l=e[0];const i=l;if(!i){let c;e[1]!==o?(c=o("details.prompt.notFoundTitle"),e[1]=o,e[2]=c):c=e[2];let d;e[3]!==o?(d=o("details.prompt.missingConnectionDescription"),e[3]=o,e[4]=d):d=e[4];let r;return e[5]!==c||e[6]!==d?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=r):r=e[7],r}let a;return e[8]!==n?(a=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(zt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=a):a=e[9],a}function Le(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("min-w-0 overflow-hidden",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function Ue(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden text-muted-foreground",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function X(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function oe(s){const e=A.c(10);let n,o,l;e[0]!==s?({asChild:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);const i=n?tt:"a";let a;e[4]!==o?(a=Y("hover:text-foreground transition-colors truncate",o),e[4]=o,e[5]=a):a=e[5];let c;return e[6]!==i||e[7]!==l||e[8]!==a?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=i,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function _e(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("text-foreground font-medium truncate",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function le(s){const e=A.c(12);let n,o,l;e[0]!==s?({children:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);let i;e[4]!==o?(i=Y("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",o),e[4]=o,e[5]=i):i=e[5];let a;e[6]!==n?(a=n??t.jsx(st,{}),e[6]=n,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==i||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...l,children:a}),e[8]=l,e[9]=i,e[10]=a,e[11]=c):c=e[11],c}const Lt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=A.c(12),{toolName:n,connectionId:o,siblings:l,onSelectInstance:i,onBack:a}=s,c=W();let d;e[0]!==o?(d={connectionId:o},e[0]=o,e[1]=d):d=e[1];const r=It(d);if(!r.isAuthenticated){let u;return e[2]!==r.supportsOAuth||e[3]!==a||e[4]!==c?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:r.supportsOAuth?t.jsx(it,{onAuthenticate:()=>a(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=r.supportsOAuth,e[3]=a,e[4]=c,e[5]=u):u=e[5],u}const x=`${o}:${n}`;let g;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==x||e[10]!==n?(g=t.jsx(_t,{toolName:n,connectionId:o,siblings:l,onSelectInstance:i},x),e[6]=o,e[7]=i,e[8]=l,e[9]=x,e[10]=n,e[11]=g):g=e[11],g}function _t({toolName:s,connectionId:e,siblings:n,onSelectInstance:o}){const l=W(),{replayId:i}=ot({strict:!1}),a=(()=>{if(!i)return null;const m=`replay-${i}`,h=sessionStorage.getItem(m);if(!h)return null;sessionStorage.removeItem(m);try{return JSON.parse(h)}catch{return null}})(),c=(()=>{if(!a)return null;const m={};for(const[h,T]of Object.entries(a))T!==null&&typeof T=="object"?m[h]=JSON.stringify(T,null,2):m[h]=T;return m})(),[d,r]=E.useState(c??{}),[x,g]=E.useState(a?JSON.stringify(a,null,2):"{}"),[u,f]=E.useState(null),[p,j]=E.useState(null),[N,S]=E.useState(null),[$,y]=E.useState(null),[P,w]=E.useState(!1),[b,k]=E.useState(null),{org:D}=fe(),R=ze(e),C=kt(),I=Dt(),{openSidePanel:O}=At(),U=`${e}:${s}`,F=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),_=$t({client:F}),v=_.data?.tools?.find(m=>m.name===s),M=gt(v?._meta),V=m=>{if(!C)return;const h=Pt(m.content);h.content.length>0&&(O(),C.sendMessage({tiptapDoc:h}))},[z,B]=E.useState("json"),[q,Q]=E.useState(!1);M&&!q&&(B("ui"),Q(!0));const J=v?.inputSchema?.properties,be=J?Object.keys(J):[],Z=be.length>0,ee={};if(Z&&v?.inputSchema?.properties)for(const m of be)ee[m]=v.inputSchema.required?.includes(m)?"":void 0;const ne=m=>Object.prototype.hasOwnProperty.call(d,m),Je=async()=>{w(!0),y(null),f(null),j(null),S(null),k(null);const m=performance.now();try{if(!F)throw new Error("MCP client is not available");const h=Z?{...ee,...d}:(()=>{const L=x.trim();if(!L)return{};const H=JSON.parse(L);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([L,H])=>{if((H.type==="object"||H.type==="array")&&typeof h[L]=="string")try{h[L]=JSON.parse(h[L])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof h[L]=="string"&&h[L]!==""){const Se=Number(h[L]);Number.isNaN(Se)||(h[L]=Se)}});const T=await F.callTool({name:s,arguments:h}),te=T.structuredContent??T,Qe=performance.now(),Xe=Math.round(Qe-m);f(te),j(T),S(h);const Ye=JSON.stringify(te),ve=new TextEncoder().encode(Ye).length;k({duration:`${Xe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(h){const T=h instanceof Error?h.message:String(h);y(T||"Unknown error occurred");const te=performance.now();k({duration:`${Math.round(te-m)}ms`})}finally{w(!1)}},ie=(m,h)=>{r(T=>({...T,[m]:h}))},Ve=()=>{f(null),j(null),S(null),y(null),k(null)},qe=v?.name??Lt(s),He=t.jsx(Le,{children:t.jsxs(Ue,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:D.slug},children:l("details.tool.connections")})})}),t.jsx(le,{}),R&&t.jsxs(t.Fragment,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(R)},search:{tab:"tools"},children:R.title})})}),t.jsx(le,{})]}),t.jsx(X,{children:t.jsx(_e,{children:qe})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:o,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(Te,{})}),t.jsx($e,{children:n.map(m=>t.jsx(me,{value:m.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ae,{icon:m.icon,name:m.title,size:"xs",className:"shrink-0"}),m.title]})},m.id))})]}),Ke=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:l("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",l("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([m,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[m,v.inputSchema?.required?.includes(m)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(m)?d[m]??"":ee[m]??"",onChange:T=>ie(m,T.target.value),placeholder:l("details.tool.enterAsJson",{key:m}),rows:3}):h.type==="boolean"?t.jsxs(Ce,{value:ne(m)?String(d[m]??""):"",onValueChange:T=>ie(m,T==="true"),children:[t.jsx(Ie,{children:t.jsx(Te,{placeholder:l("details.tool.selectTrueOrFalse")})}),t.jsxs($e,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(m)?d[m]??"":ee[m]??"",onChange:T=>ie(m,T.target.value),placeholder:l("details.tool.enter",{key:m})})]},m)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:l("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:m=>g(m.target.value),placeholder:l("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:l("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),l("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Je,children:[t.jsx(wt,{className:"h-3.5 w-3.5 fill-current"}),l("details.tool.executeTool")]})})]}),We=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:l("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),M&&t.jsx(vt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>B("ui"),children:t.jsx(xt,{size:14})})}),t.jsx(De,{children:l("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>B("json"),children:t.jsx(ye,{size:14})})}),t.jsx(De,{children:l("details.tool.jsonView")})]})]})})]})]}),$&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(jt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(St,{className:"h-4 w-4"}),t.jsx(bt,{className:"mb-0",children:l("details.tool.executionFailed")})]}),t.jsx(Nt,{className:"text-xs text-destructive",children:$})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:M&&z==="ui"&&F?t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(G,{className:"size-4"}),t.jsx("span",{className:"text-sm",children:l("details.tool.loadingApp")})]})}),children:t.jsx(ht,{resourceURI:M,toolInfo:v?{tool:v}:void 0,toolInput:N??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:F,onMessage:V,onUpdateModelContext:m=>I?.setAppContext(U,m),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(Et,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),lt.success(l("details.tool.copiedToClipboard"))},children:t.jsx(yt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:l("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{leading:He,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Ae,{icon:R?.icon||null,name:R?.title||s,size:"xl",className:"shrink-0"}),t.jsx(Oe.Title,{children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[_.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):_.isLoading?t.jsx(G,{className:"size-[10px] text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:_.isSuccess?"ready":_.isLoading?"connecting":"error"})]}),t.jsx(Tt,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:l("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Ke}),We]})})]})})}function Jt(s){const e=A.c(20),{itemId:n,siblings:o,onBack:l}=s,i=W(),[a,c]=E.useState(o[0]?.id??"");let d;e[0]!==a||e[1]!==o?(d=o.find(f=>f.id===a)?.id??o[0]?.id??"",e[0]=a,e[1]=o,e[2]=d):d=e[2];const r=d;if(!ze(r||void 0)||!r){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let j;e[7]!==i?(j=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=j):j=e[8];let N;e[9]!==j?(N=t.jsx("p",{className:"text-sm text-muted-foreground",children:j}),e[9]=j,e[10]=N):N=e[10];let S;return e[11]!==p||e[12]!==N?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,N]})}),e[11]=p,e[12]=N,e[13]=S):S=e[13],S}let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{className:"size-8 text-muted-foreground"})}),e[14]=g):g=e[14];let u;return e[15]!==r||e[16]!==l||e[17]!==o||e[18]!==n?(u=t.jsx(E.Suspense,{fallback:g,children:t.jsx(Ut,{toolName:n,connectionId:r,siblings:o,onSelectInstance:c,onBack:l})}),e[15]=r,e[16]=l,e[17]=o,e[18]=n,e[19]=u):u=e[19],u}const Vt={prompt:Bt};function qt(){const s=A.c(9),e=Me();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=decodeURIComponent(o.itemId);let i;s[1]!==o.appSlug?(i={slug:o.appSlug},s[1]=o.appSlug,s[2]=i):i=s[2];const a=Be(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,r=Ht;let x;return s[5]!==d||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:d,onUpdate:r}),s[5]=d,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Ht(s){return Promise.resolve()}function Kt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Wt(){const s=A.c(52),e=Me();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=W(),i=decodeURIComponent(o.collectionName),a=decodeURIComponent(o.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:r}=fe();let x;s[3]!==o.appSlug?(x={slug:o.appSlug},s[3]=o.appSlug,s[4]=x):x=s[4];const u=Be(x)[0]??null,f=u?.id??"",p=f||"no-connection",j=f??null;let N;s[5]!==r.id||s[6]!==r.slug||s[7]!==j?(N={connectionId:j,orgId:r.id,orgSlug:r.slug},s[5]=r.id,s[6]=r.slug,s[7]=j,s[8]=N):N=s[8];const S=ge(N),$=Re(p,i,S);let y;s[9]!==$||s[10]!==a?(y=async J=>{a&&await $.update.mutateAsync({id:a,data:J})},s[9]=$,s[10]=a,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const b=w,k=b&&Vt[b];let D;s[14]!==i?(D=Kt(i),s[14]=i,s[15]=D):D=s[15];const R=D;let C;s[16]!==r.slug?(C=t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:r.slug},children:"Connections"})})}),s[16]=r.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let O;s[19]!==i||s[20]!==u||s[21]!==r.slug||s[22]!==o.appSlug?(O=u&&t.jsxs(t.Fragment,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:o.appSlug},search:{tab:i},children:u.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=u,s[21]=r.slug,s[22]=o.appSlug,s[23]=O):O=s[23];let U;s[24]!==R?(U=t.jsx(X,{children:t.jsx(_e,{children:R})}),s[24]=R,s[25]=U):U=s[25];let F;s[26]!==O||s[27]!==U||s[28]!==C?(F=t.jsx(Le,{children:t.jsxs(Ue,{children:[C,I,O,U]})}),s[26]=O,s[27]=U,s[28]=C,s[29]=F):F=s[29];const _=F;if(k){let J;return s[30]!==k||s[31]!==d||s[32]!==P||s[33]!==a?(J=t.jsx(k,{itemId:a,onBack:d,onUpdate:P}),s[30]=k,s[31]=d,s[32]=P,s[33]=a,s[34]=J):J=s[34],J}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(ft,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let M;s[36]!==l?(M=l("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=l,s[37]=M):M=s[37];let V;s[38]!==l?(V=l("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=l,s[39]=V):V=s[39];let z;s[40]!==l?(z=l("orgs.collectionDetail.goBackButton"),s[40]=l,s[41]=z):z=s[41];let B;s[42]!==d||s[43]!==z?(B={onClick:d,children:z},s[42]=d,s[43]=z,s[44]=B):B=s[44];let q;s[45]!==M||s[46]!==V||s[47]!==B?(q=t.jsx(Rt,{icon:v,title:M,description:V,buttonProps:B}),s[45]=M,s[46]=V,s[47]=B,s[48]=q):q=s[48];let Q;return s[49]!==_||s[50]!==q?(Q=t.jsx(je,{leading:_,children:q}),s[49]=_,s[50]=q,s[51]=Q):Q=s[51],Q}function Qt(){const s=A.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(qt,{}),s[1]=a):a=s[1],a}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Wt,{}),s[2]=i):i=s[2],i}function Lo(){const s=A.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Qt,{})})}),s[0]=e):e=s[0],e}export{Lo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as R,b as S,j as s,G as z,l as A,F as V,B as $,H as E,I as _}from"./index-
|
|
1
|
+
import{c as R,b as S,j as s,G as z,l as A,F as V,B as $,H as E,I as _}from"./index-oPco2Z7Q.js";import{i as I,n as L}from"./ArrowUp-C1c3cSMN.js";import{i as F}from"./Check-ClKm876e.js";import{a as O,i as P,c as Y}from"./XClose-DnZUIdlK.js";import{T as G,a as H,c as K,b as W}from"./tooltip-CF6AcK-h.js";import{V as q}from"./view-mode-toggle-DrlZskFH.js";import{B as J}from"./badge-B0yp_bFb.js";const M=[];function oe(t){const e=R.c(35),{viewMode:i,onViewModeChange:h,sortKey:T,sortDirection:g,onSort:j,sortOptions:B,filters:D}=t,b=B===void 0?M:B,o=D===void 0?M:D,l=S();let v;e[0]!==o?(v=o.filter(U),e[0]=o,e[1]=v):v=e[1];const N=v.length;let r;e[2]!==l?(r=l("collections.collectionDisplayButton.displayAndFilters"),e[2]=l,e[3]=r):r=e[3];let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(O,{size:16}),e[4]=w):w=e[4];let n;e[5]!==N?(n=N>0&&s.jsx(J,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[5]=N,e[6]=n):n=e[6];let a;e[7]!==r||e[8]!==n?(a=s.jsx(G,{asChild:!0,children:s.jsx(V,{asChild:!0,children:s.jsxs($,{variant:"outline",size:"icon",className:"relative","aria-label":r,children:[w,n]})})}),e[7]=r,e[8]=n,e[9]=a):a=e[9];let c;e[10]!==l?(c=l("collections.collectionDisplayButton.displayAndFilters"),e[10]=l,e[11]=c):c=e[11];let d;e[12]!==c?(d=s.jsx(H,{children:c}),e[12]=c,e[13]=d):d=e[13];let x;e[14]!==a||e[15]!==d?(x=s.jsx(K,{children:s.jsxs(W,{children:[a,d]})}),e[14]=a,e[15]=d,e[16]=x):x=e[16];let m;e[17]!==h||e[18]!==i?(m=h&&i&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:i,onValueChange:h,fullWidth:!0,options:[{value:"table",icon:s.jsx(P,{})},{value:"cards",icon:s.jsx(Y,{})}]})}),e[17]=h,e[18]=i,e[19]=m):m=e[19];let p;e[20]!==j||e[21]!==g||e[22]!==T||e[23]!==b||e[24]!==l?(p=b.length>0&&j&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:l("collections.collectionDisplayButton.sortBy")}),b.map(C=>{const k=T===C.id;return s.jsx(z,{onClick:()=>j(C.id),className:A("h-8 px-2 py-0 cursor-pointer",k&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[k&&s.jsx(F,{size:16,className:"text-foreground shrink-0"}),!k&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:C.label}),k&&g&&(g==="asc"?s.jsx(I,{size:16,className:"text-foreground shrink-0"}):s.jsx(L,{size:16,className:"text-foreground shrink-0"}))]})},C.id)})]}),e[20]=j,e[21]=g,e[22]=T,e[23]=b,e[24]=l,e[25]=p):p=e[25];let u;e[26]!==o?(u=o.map(Q),e[26]=o,e[27]=u):u=e[27];let f;e[28]!==m||e[29]!==p||e[30]!==u?(f=s.jsxs(E,{align:"end",className:"w-[200px] p-0 gap-0",children:[m,p,u]}),e[28]=m,e[29]=p,e[30]=u,e[31]=f):f=e[31];let y;return e[32]!==x||e[33]!==f?(y=s.jsxs(_,{children:[x,f]}),e[32]=x,e[33]=f,e[34]=y):y=e[34],y}function Q(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const i=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:A("h-8 px-2 py-0 cursor-pointer",i&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[i&&s.jsx(F,{size:16,className:"text-foreground shrink-0"}),!i&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function U(t){return t.value!=="ALL"}export{oe as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as b,j as a,h as w}from"./index-
|
|
1
|
+
import{c as v,l as b,j as a,h as w}from"./index-oPco2Z7Q.js";import{i as C}from"./SearchMd-DRAIsS0-.js";function y(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,h=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const p=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==p?(s=b("flex items-center gap-2.5 h-12 px-4",p),e[2]=p,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{className:"size-4 text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==h||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:h,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=h,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{y as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,j as n,l as y,b as D}from"./index-
|
|
1
|
+
import{c as S,j as n,l as y,b as D}from"./index-oPco2Z7Q.js";import{T as I,a as R,b as T,c as E,d as H,e as K}from"./table-UDk1rGCz.js";import{i as W,n as z}from"./ArrowUp-C1c3cSMN.js";function L(C){const e=S.c(31),{columns:o,data:u,sortKey:x,sortDirection:i,onSort:c,onRowClick:l,rowClassName:m}=C;let p;e[0]!==i?(p=function(t,b){return n.jsx("div",{className:"w-4 flex items-center justify-center",children:b&&i&&(i==="asc"?n.jsx(W,{size:16,className:"text-muted-foreground transition-colors"}):n.jsx(z,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=i,e[1]=p):p=e[1];const h=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,b){let g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===b-1&&(g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),g},e[2]=d):d=e[2];const v=d;let s;if(e[3]!==o||e[4]!==c||e[5]!==h||e[6]!==i||e[7]!==x){let f;e[9]!==o.length||e[10]!==c||e[11]!==h||e[12]!==i||e[13]!==x?(f=(t,b)=>{const g=x===t.id,r=t.sortable&&c;return n.jsx(I,{className:y(v(b,o.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),"aria-sort":g&&i?i==="asc"?"ascending":"descending":t.sortable?"none":void 0,role:r?"button":void 0,tabIndex:r?0:void 0,onClick:r?()=>c(t.id):void 0,onKeyDown:r?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),c(t.id))}:void 0,children:n.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&h(t.id,g)]})},t.id)},e[9]=o.length,e[10]=c,e[11]=h,e[12]=i,e[13]=x,e[14]=f):f=e[14],s=o.map(f),e[3]=o,e[4]=c,e[5]=h,e[6]=i,e[7]=x,e[8]=s}else s=e[8];let a;e[15]!==s?(a=n.jsx(R,{className:"border-b-0",children:n.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:s})}),e[15]=s,e[16]=a):a=e[16];let j;if(e[17]!==o||e[18]!==u||e[19]!==l||e[20]!==m){let f;e[22]!==o||e[23]!==l||e[24]!==m?(f=(t,b)=>{const g=m?.(t);return n.jsx(T,{"data-row-index":b,className:y("group/data-row transition-colors border-b-0 hover:bg-accent/50",l?"cursor-pointer":"",g),role:l?"button":void 0,tabIndex:l?0:void 0,onClick:l?()=>l(t):void 0,onKeyDown:l?r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),l(t))}:void 0,children:o.map(r=>n.jsx(E,{className:y("px-5 py-4 h-16 align-middle text-sm text-foreground",r.cellClassName,r.wrap?"whitespace-normal wrap-break-word":""),children:n.jsx("div",{className:y(r.wrap?"w-full":"min-w-0 w-full",!r.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:r.render?r.render(t):r.accessor?r.accessor(t):null})},r.id))},b)},e[22]=o,e[23]=l,e[24]=m,e[25]=f):f=e[25],j=u.map(f),e[17]=o,e[18]=u,e[19]=l,e[20]=m,e[21]=j}else j=e[21];let w;e[26]!==j?(w=n.jsx(H,{children:j}),e[26]=j,e[27]=w):w=e[27];let N;return e[28]!==a||e[29]!==w?(N=n.jsxs(K,{className:"w-full border-collapse",children:[a,w]}),e[28]=a,e[29]=w,e[30]=N):N=e[30],N}function F(C){const e=S.c(16),{columns:o,data:u,isLoading:x,sortKey:i,sortDirection:c,onSort:l,onRowClick:m,emptyState:p}=C,h=x===void 0?!1:x,d=D();if(h){let s;e[0]!==d?(s=d("collections.collectionTableWrapper.loading"),e[0]=d,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-muted-foreground",children:s})}),e[2]=s,e[3]=a):a=e[3],a}if(u.length===0){let s;e[4]!==p||e[5]!==d?(s=p||n.jsx("div",{className:"text-center py-12 text-muted-foreground",children:d("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=d,e[6]=s):s=e[6];let a;return e[7]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:s}),e[7]=s,e[8]=a):a=e[8],a}let v;return e[9]!==o||e[10]!==u||e[11]!==m||e[12]!==l||e[13]!==c||e[14]!==i?(v=n.jsx("div",{className:"flex-1",children:n.jsx(L,{columns:o,data:u,sortKey:i,sortDirection:c,onSort:l,onRowClick:m})}),e[9]=o,e[10]=u,e[11]=m,e[12]=l,e[13]=c,e[14]=i,e[15]=v):v=e[15],v}export{F as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,j as r,n as p,P as j,l as h}from"./index-
|
|
1
|
+
import{c as b,j as r,n as p,P as j,l as h}from"./index-oPco2Z7Q.js";import{B as v}from"./badge-B0yp_bFb.js";function P(g){const e=b.c(13),{tabs:d,activeTab:o,onTabChange:s,className:m,placement:u}=g,f=u===void 0?"inline":u;let t;if(e[0]!==o||e[1]!==s||e[2]!==d){let c;e[4]!==o||e[5]!==s?(c=n=>{const x=o===n.id;return r.jsxs(p.Tab,{active:x,onClick:()=>s(n.id),children:[n.label,n.count!==void 0&&r.jsx(v,{variant:"secondary",className:h("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",x?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:n.count})]},n.id)},e[4]=o,e[5]=s,e[6]=c):c=e[6],t=d.map(c),e[0]=o,e[1]=s,e[2]=d,e[3]=t}else t=e[3];let l;e[7]!==m||e[8]!==t?(l=r.jsx(p.Tabs,{className:m,children:t}),e[7]=m,e[8]=t,e[9]=l):l=e[9];const i=l;let a;return e[10]!==i||e[11]!==f?(a=f==="page"?r.jsx(j.Toolbar.Left.Portal,{fallback:i,children:i}):i,e[10]=i,e[11]=f,e[12]=a):a=e[12],a}export{P as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as J,r as K,j as s,l as y,B as Q}from"./index-
|
|
1
|
+
import{c as J,r as K,j as s,l as y,B as Q}from"./index-oPco2Z7Q.js";import{i as U}from"./Check-ClKm876e.js";import{i as V}from"./Tool01-gY-gdMF4.js";import{C as W,a as X,b as Y,e as Z,c as _,f as ee}from"./command-DljL6hzf.js";import{a as se,P as te,b as le}from"./popover-BgkxtrX7.js";function ne(q){const e=J.c(45),{options:j,value:l,onChange:v,placeholder:R,triggerClassName:$,contentClassName:N,width:A,renderTrigger:F,renderItem:r,emptyMessage:G,searchPlaceholder:L,filter:S,renderSearchAction:w}=q,z=R===void 0?"Select...":R,D=A===void 0?"w-[200px]":A,P=G===void 0?"No results found.":G,E=L===void 0?"Search...":L;let C;e[0]!==l?(C=x=>x.value===l,e[0]=l,e[1]=C):C=e[1];const T=j.find(C),[I,t]=K.useState(!1),O=te,B=se,H=!0,M=F?s.jsx("div",{className:y("cursor-pointer",$),children:F(T)}):s.jsxs(Q,{variant:"outline",role:"combobox",className:y("justify-between",D,$),children:[T?T.label:z,s.jsx(V,{className:"opacity-50"})]});let o;e[2]!==B||e[3]!==M?(o=s.jsx(B,{asChild:H,children:M}),e[2]=B,e[3]=M,e[4]=o):o=e[4];let i;e[5]!==N?(i=y("p-0",N),e[5]=N,e[6]=i):i=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g={width:"var(--radix-popover-trigger-width)"},e[7]=g):g=e[7];let c;e[8]!==w||e[9]!==t?(c=w?.(()=>t(!1)),e[8]=w,e[9]=t,e[10]=c):c=e[10];let n;e[11]!==E||e[12]!==c?(n=s.jsx(W,{placeholder:E,className:"h-9",action:c}),e[11]=E,e[12]=c,e[13]=n):n=e[13];let m;e[14]!==P?(m=s.jsx(X,{children:P}),e[14]=P,e[15]=m):m=e[15];let d;if(e[16]!==v||e[17]!==j||e[18]!==r||e[19]!==t||e[20]!==l){let x;e[22]!==v||e[23]!==r||e[24]!==t||e[25]!==l?(x=a=>{const k=l===a.value;return s.jsx(Y,{value:a.label,onSelect:()=>{v(a.value===l?"":a.value),t(!1)},children:r?r(a,k):s.jsxs(s.Fragment,{children:[a.label,s.jsx(U,{className:y("ml-auto",k?"opacity-100":"opacity-0")})]})},a.value)},e[22]=v,e[23]=r,e[24]=t,e[25]=l,e[26]=x):x=e[26],d=j.map(x),e[16]=v,e[17]=j,e[18]=r,e[19]=t,e[20]=l,e[21]=d}else d=e[21];let f;e[27]!==d?(f=s.jsx(Z,{children:d}),e[27]=d,e[28]=f):f=e[28];let h;e[29]!==m||e[30]!==f?(h=s.jsxs(_,{children:[m,f]}),e[29]=m,e[30]=f,e[31]=h):h=e[31];let p;e[32]!==S||e[33]!==n||e[34]!==h?(p=s.jsxs(ee,{filter:S,children:[n,h]}),e[32]=S,e[33]=n,e[34]=h,e[35]=p):p=e[35];let u;e[36]!==p||e[37]!==i?(u=s.jsx(le,{className:i,style:g,children:p}),e[36]=p,e[37]=i,e[38]=u):u=e[38];let b;return e[39]!==O||e[40]!==I||e[41]!==t||e[42]!==u||e[43]!==o?(b=s.jsxs(O,{open:I,onOpenChange:t,children:[o,u]}),e[39]=O,e[40]=I,e[41]=t,e[42]=u,e[43]=o,e[44]=b):b=e[44],b}export{ne as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as v,l as h,j as r,aC as N}from"./index-oPco2Z7Q.js";import{_ as b}from"./index-DTVMnS9R.js";import{D as j,d as w,h as y,c as C,b as z}from"./dialog-CfIoHDlJ.js";import{i as D}from"./SearchMd-DRAIsS0-.js";function $(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function R(a){const e=v.c(28);let t,s,o,l,n,_,u;e[0]!==a?({title:_,description:u,children:t,className:s,filter:o,shouldFilter:n,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=n,e[6]=_,e[7]=u):(t=e[1],s=e[2],o=e[3],l=e[4],n=e[5],_=e[6],u=e[7]);const f=_===void 0?"Command Palette":_,x=u===void 0?"Search for a command to run...":u;let g;e[8]!==f?(g=r.jsx(w,{children:f}),e[8]=f,e[9]=g):g=e[9];let i;e[10]!==x?(i=r.jsx(y,{children:x}),e[10]=x,e[11]=i):i=e[11];let d;e[12]!==g||e[13]!==i?(d=r.jsxs(C,{className:"sr-only",children:[g,i]}),e[12]=g,e[13]=i,e[14]=d):d=e[14];let c;e[15]!==s?(c=h("overflow-hidden p-0",s),e[15]=s,e[16]=c):c=e[16];let m;e[17]!==t||e[18]!==o||e[19]!==n?(m=r.jsx($,{filter:o,shouldFilter:n,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg:not([class*='size-'])]:h-5 [&_[cmdk-item]_svg:not([class*='size-'])]:w-5",children:t}),e[17]=t,e[18]=o,e[19]=n,e[20]=m):m=e[20];let p;e[21]!==c||e[22]!==m?(p=r.jsx(z,{className:c,closeButtonClassName:"hidden",children:m}),e[21]=c,e[22]=m,e[23]=p):p=e[23];let k;return e[24]!==l||e[25]!==d||e[26]!==p?(k=r.jsxs(j,{...l,children:[d,p]}),e[24]=l,e[25]=d,e[26]=p,e[27]=k):k=e[27],k}function V(a){const e=v.c(23);let t,s,o,l,n;e[0]!==a?({className:s,size:l,variant:n,action:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=n):(t=e[1],s=e[2],o=e[3],l=e[4],n=e[5]);const _=l===void 0?"default":l,u=n===void 0?"underline":n,f=_==="sm"?"h-9":"h-10",x=u==="boxed",g=x?"rounded-xl border border-input bg-transparent focus-within:border-ring":"border-b";let i;e[6]!==f||e[7]!==g?(i=h("flex items-center gap-2 px-3",f,g),e[6]=f,e[7]=g,e[8]=i):i=e[8];let d;e[9]!==x?(d=!x&&r.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[9]=x,e[10]=d):d=e[10];let c;e[11]!==s||e[12]!==f?(c=h("placeholder:text-muted-foreground flex w-full rounded-md bg-transparent text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",f,s),e[11]=s,e[12]=f,e[13]=c):c=e[13];let m;e[14]!==o||e[15]!==c?(m=r.jsx(b.Input,{"data-slot":"command-input",className:c,...o}),e[14]=o,e[15]=c,e[16]=m):m=e[16];let p;return e[17]!==t||e[18]!==i||e[19]!==d||e[20]!==m||e[21]!==u?(p=r.jsxs("div",{"data-slot":"command-input-wrapper","data-variant":u,className:i,children:[d,m,t]}),e[17]=t,e[18]=i,e[19]=d,e[20]=m,e[21]=u,e[22]=p):p=e[22],p}function B(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function F(a){const e=v.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=r.jsx(b.Empty,{"data-slot":"command-empty",className:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function H(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function P(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}const I=N("[&_svg:not([class*='text-'])]:text-muted-foreground relative flex min-h-8 cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{highlight:{selected:"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",hover:"w-full hover:bg-accent hover:text-accent-foreground"},size:{default:"",lg:"min-h-11 gap-3 rounded-lg px-2.5 py-2"}},defaultVariants:{highlight:"selected",size:"default"}});function T(a){const e=v.c(10);let t,s,o;e[0]!==a?({className:t,size:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let l;e[4]!==t||e[5]!==o?(l=h(I({size:o}),t),e[4]=t,e[5]=o,e[6]=l):l=e[6];let n;return e[7]!==s||e[8]!==l?(n=r.jsx(b.Item,{"data-slot":"command-item",className:l,...s}),e[7]=s,e[8]=l,e[9]=n):n=e[9],n}export{V as C,F as a,T as b,B as c,R as d,H as e,$ as f,I as g,P as h};
|